Files
shlink-web-client/dependabot/docker/node-24.8-alpine/assets/index--Osirq5i.js

804 lines
1.4 MiB
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
function uB(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[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 a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();function Pi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var D1={exports:{}},Dd={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var tA;function cB(){if(tA)return Dd;tA=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,a){var s=null;if(a!==void 0&&(s=""+a),i.key!==void 0&&(s=""+i.key),"key"in i){a={};for(var u in i)u!=="key"&&(a[u]=i[u])}else a=i;return i=a.ref,{$$typeof:e,type:r,key:s,ref:i!==void 0?i:null,props:a}}return Dd.Fragment=t,Dd.jsx=n,Dd.jsxs=n,Dd}var nA;function fB(){return nA||(nA=1,D1.exports=cB()),D1.exports}var v=fB(),k1={exports:{}},kd={},I1={exports:{}},U1={};/**
* @license React
* scheduler.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var rA;function dB(){return rA||(rA=1,function(e){function t(W,B){var I=W.length;W.push(B);e:for(;0<I;){var z=I-1>>>1,M=W[z];if(0<i(M,B))W[z]=B,W[I]=M,I=z;else break e}}function n(W){return W.length===0?null:W[0]}function r(W){if(W.length===0)return null;var B=W[0],I=W.pop();if(I!==B){W[0]=I;e:for(var z=0,M=W.length,D=M>>>1;z<D;){var Y=2*(z+1)-1,q=W[Y],re=Y+1,ue=W[re];if(0>i(q,I))re<M&&0>i(ue,q)?(W[z]=ue,W[re]=I,z=re):(W[z]=q,W[Y]=I,z=Y);else if(re<M&&0>i(ue,I))W[z]=ue,W[re]=I,z=re;else break e}}return B}function i(W,B){var I=W.sortIndex-B.sortIndex;return I!==0?I:W.id-B.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var d=[],f=[],m=1,p=null,b=3,_=!1,w=!1,x=!1,E=!1,A=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function N(W){for(var B=n(f);B!==null;){if(B.callback===null)r(f);else if(B.startTime<=W)r(f),B.sortIndex=B.expirationTime,t(d,B);else break;B=n(f)}}function U(W){if(x=!1,N(W),!w)if(n(d)!==null)w=!0,V||(V=!0,ne());else{var B=n(f);B!==null&&se(U,B.startTime-W)}}var V=!1,Z=-1,X=5,oe=-1;function ee(){return E?!0:!(e.unstable_now()-oe<X)}function J(){if(E=!1,V){var W=e.unstable_now();oe=W;var B=!0;try{e:{w=!1,x&&(x=!1,j(Z),Z=-1),_=!0;var I=b;try{t:{for(N(W),p=n(d);p!==null&&!(p.expirationTime>W&&ee());){var z=p.callback;if(typeof z=="function"){p.callback=null,b=p.priorityLevel;var M=z(p.expirationTime<=W);if(W=e.unstable_now(),typeof M=="function"){p.callback=M,N(W),B=!0;break t}p===n(d)&&r(d),N(W)}else r(d);p=n(d)}if(p!==null)B=!0;else{var D=n(f);D!==null&&se(U,D.startTime-W),B=!1}}break e}finally{p=null,b=I,_=!1}B=void 0}}finally{B?ne():V=!1}}}var ne;if(typeof O=="function")ne=function(){O(J)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,Q=he.port2;he.port1.onmessage=J,ne=function(){Q.postMessage(null)}}else ne=function(){A(J,0)};function se(W,B){Z=A(function(){W(e.unstable_now())},B)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(W){W.callback=null},e.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):X=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(W){switch(b){case 1:case 2:case 3:var B=3;break;default:B=b}var I=b;b=B;try{return W()}finally{b=I}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(W,B){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var I=b;b=W;try{return B()}finally{b=I}},e.unstable_scheduleCallback=function(W,B,I){var z=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?z+I:z):I=z,W){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=I+M,W={id:m++,callback:B,priorityLevel:W,startTime:I,expirationTime:M,sortIndex:-1},I>z?(W.sortIndex=I,t(f,W),n(d)===null&&W===n(f)&&(x?(j(Z),Z=-1):x=!0,se(U,I-z))):(W.sortIndex=M,t(d,W),w||_||(w=!0,V||(V=!0,ne()))),W},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(W){var B=b;return function(){var I=b;b=B;try{return W.apply(this,arguments)}finally{b=I}}}}(U1)),U1}var iA;function hB(){return iA||(iA=1,I1.exports=dB()),I1.exports}var B1={exports:{}},yt={};/**
* @license React
* react.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var aA;function mB(){if(aA)return yt;aA=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.iterator;function b(M){return M===null||typeof M!="object"?null:(M=p&&M[p]||M["@@iterator"],typeof M=="function"?M:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,x={};function E(M,D,Y){this.props=M,this.context=D,this.refs=x,this.updater=Y||_}E.prototype.isReactComponent={},E.prototype.setState=function(M,D){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,D,"setState")},E.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function A(){}A.prototype=E.prototype;function j(M,D,Y){this.props=M,this.context=D,this.refs=x,this.updater=Y||_}var O=j.prototype=new A;O.constructor=j,w(O,E.prototype),O.isPureReactComponent=!0;var N=Array.isArray,U={H:null,A:null,T:null,S:null,V:null},V=Object.prototype.hasOwnProperty;function Z(M,D,Y,q,re,ue){return Y=ue.ref,{$$typeof:e,type:M,key:D,ref:Y!==void 0?Y:null,props:ue}}function X(M,D){return Z(M.type,D,void 0,void 0,void 0,M.props)}function oe(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function ee(M){var D={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(Y){return D[Y]})}var J=/\/+/g;function ne(M,D){return typeof M=="object"&&M!==null&&M.key!=null?ee(""+M.key):D.toString(36)}function he(){}function Q(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(he,he):(M.status="pending",M.then(function(D){M.status==="pending"&&(M.status="fulfilled",M.value=D)},function(D){M.status==="pending"&&(M.status="rejected",M.reason=D)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function se(M,D,Y,q,re){var ue=typeof M;(ue==="undefined"||ue==="boolean")&&(M=null);var ce=!1;if(M===null)ce=!0;else switch(ue){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(M.$$typeof){case e:case t:ce=!0;break;case m:return ce=M._init,se(ce(M._payload),D,Y,q,re)}}if(ce)return re=re(M),ce=q===""?"."+ne(M,0):q,N(re)?(Y="",ce!=null&&(Y=ce.replace(J,"$&/")+"/"),se(re,D,Y,"",function(F){return F})):re!=null&&(oe(re)&&(re=X(re,Y+(re.key==null||M&&M.key===re.key?"":(""+re.key).replace(J,"$&/")+"/")+ce)),D.push(re)),1;ce=0;var ve=q===""?".":q+":";if(N(M))for(var k=0;k<M.length;k++)q=M[k],ue=ve+ne(q,k),ce+=se(q,D,Y,ue,re);else if(k=b(M),typeof k=="function")for(M=k.call(M),k=0;!(q=M.next()).done;)q=q.value,ue=ve+ne(q,k++),ce+=se(q,D,Y,ue,re);else if(ue==="object"){if(typeof M.then=="function")return se(Q(M),D,Y,q,re);throw D=String(M),Error("Objects are not valid as a React child (found: "+(D==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":D)+"). If you meant to render a collection of children, use an array instead.")}return ce}function W(M,D,Y){if(M==null)return M;var q=[],re=0;return se(M,q,"","",function(ue){return D.call(Y,ue,re++)}),q}function B(M){if(M._status===-1){var D=M._result;D=D(),D.then(function(Y){(M._status===0||M._status===-1)&&(M._status=1,M._result=Y)},function(Y){(M._status===0||M._status===-1)&&(M._status=2,M._result=Y)}),M._status===-1&&(M._status=0,M._result=D)}if(M._status===1)return M._result.default;throw M._result}var I=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var D=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(D))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)};function z(){}return yt.Children={map:W,forEach:function(M,D,Y){W(M,function(){D.apply(this,arguments)},Y)},count:function(M){var D=0;return W(M,function(){D++}),D},toArray:function(M){return W(M,function(D){return D})||[]},only:function(M){if(!oe(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},yt.Component=E,yt.Fragment=n,yt.Profiler=i,yt.PureComponent=j,yt.StrictMode=r,yt.Suspense=d,yt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,yt.__COMPILER_RUNTIME={__proto__:null,c:function(M){return U.H.useMemoCache(M)}},yt.cache=function(M){return function(){return M.apply(null,arguments)}},yt.cloneElement=function(M,D,Y){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var q=w({},M.props),re=M.key,ue=void 0;if(D!=null)for(ce in D.ref!==void 0&&(ue=void 0),D.key!==void 0&&(re=""+D.key),D)!V.call(D,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&D.ref===void 0||(q[ce]=D[ce]);var ce=arguments.length-2;if(ce===1)q.children=Y;else if(1<ce){for(var ve=Array(ce),k=0;k<ce;k++)ve[k]=arguments[k+2];q.children=ve}return Z(M.type,re,void 0,void 0,ue,q)},yt.createContext=function(M){return M={$$typeof:s,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:a,_context:M},M},yt.createElement=function(M,D,Y){var q,re={},ue=null;if(D!=null)for(q in D.key!==void 0&&(ue=""+D.key),D)V.call(D,q)&&q!=="key"&&q!=="__self"&&q!=="__source"&&(re[q]=D[q]);var ce=arguments.length-2;if(ce===1)re.children=Y;else if(1<ce){for(var ve=Array(ce),k=0;k<ce;k++)ve[k]=arguments[k+2];re.children=ve}if(M&&M.defaultProps)for(q in ce=M.defaultProps,ce)re[q]===void 0&&(re[q]=ce[q]);return Z(M,ue,void 0,void 0,null,re)},yt.createRef=function(){return{current:null}},yt.forwardRef=function(M){return{$$typeof:u,render:M}},yt.isValidElement=oe,yt.lazy=function(M){return{$$typeof:m,_payload:{_status:-1,_result:M},_init:B}},yt.memo=function(M,D){return{$$typeof:f,type:M,compare:D===void 0?null:D}},yt.startTransition=function(M){var D=U.T,Y={};U.T=Y;try{var q=M(),re=U.S;re!==null&&re(Y,q),typeof q=="object"&&q!==null&&typeof q.then=="function"&&q.then(z,I)}catch(ue){I(ue)}finally{U.T=D}},yt.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},yt.use=function(M){return U.H.use(M)},yt.useActionState=function(M,D,Y){return U.H.useActionState(M,D,Y)},yt.useCallback=function(M,D){return U.H.useCallback(M,D)},yt.useContext=function(M){return U.H.useContext(M)},yt.useDebugValue=function(){},yt.useDeferredValue=function(M,D){return U.H.useDeferredValue(M,D)},yt.useEffect=function(M,D,Y){var q=U.H;if(typeof Y=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return q.useEffect(M,D)},yt.useId=function(){return U.H.useId()},yt.useImperativeHandle=function(M,D,Y){return U.H.useImperativeHandle(M,D,Y)},yt.useInsertionEffect=function(M,D){return U.H.useInsertionEffect(M,D)},yt.useLayoutEffect=function(M,D){return U.H.useLayoutEffect(M,D)},yt.useMemo=function(M,D){return U.H.useMemo(M,D)},yt.useOptimistic=function(M,D){return U.H.useOptimistic(M,D)},yt.useReducer=function(M,D,Y){return U.H.useReducer(M,D,Y)},yt.useRef=function(M){return U.H.useRef(M)},yt.useState=function(M){return U.H.useState(M)},yt.useSyncExternalStore=function(M,D,Y){return U.H.useSyncExternalStore(M,D,Y)},yt.useTransition=function(){return U.H.useTransition()},yt.version="19.1.1",yt}var oA;function mf(){return oA||(oA=1,B1.exports=mB()),B1.exports}var z1={exports:{}},Ar={};/**
* @license React
* react-dom.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var sA;function pB(){if(sA)return Ar;sA=1;var e=mf();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function a(d,f,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:d,containerInfo:f,implementation:m}}var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return Ar.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Ar.createPortal=function(d,f){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return a(d,f,null,m)},Ar.flushSync=function(d){var f=s.T,m=r.p;try{if(s.T=null,r.p=2,d)return d()}finally{s.T=f,r.p=m,r.d.f()}},Ar.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},Ar.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},Ar.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,p=u(m,f.crossOrigin),b=typeof f.integrity=="string"?f.integrity:void 0,_=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:p,integrity:b,fetchPriority:_}):m==="script"&&r.d.X(d,{crossOrigin:p,integrity:b,fetchPriority:_,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Ar.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=u(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},Ar.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,p=u(m,f.crossOrigin);r.d.L(d,m,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},Ar.preloadModule=function(d,f){if(typeof d=="string")if(f){var m=u(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},Ar.requestFormReset=function(d){r.d.r(d)},Ar.unstable_batchedUpdates=function(d,f){return d(f)},Ar.useFormState=function(d,f,m){return s.H.useFormState(d,f,m)},Ar.useFormStatus=function(){return s.H.useHostTransitionStatus()},Ar.version="19.1.1",Ar}var lA;function nR(){if(lA)return z1.exports;lA=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),z1.exports=pB(),z1.exports}/**
* @license React
* react-dom-client.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var uA;function gB(){if(uA)return kd;uA=1;var e=hB(),t=mf(),n=nR();function r(o){var l="https://react.dev/errors/"+o;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)l+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+o+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function a(o){var l=o,h=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,(l.flags&4098)!==0&&(h=l.return),o=l.return;while(o)}return l.tag===3?h:null}function s(o){if(o.tag===13){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function u(o){if(a(o)!==o)throw Error(r(188))}function d(o){var l=o.alternate;if(!l){if(l=a(o),l===null)throw Error(r(188));return l!==o?null:o}for(var h=o,y=l;;){var C=h.return;if(C===null)break;var P=C.alternate;if(P===null){if(y=C.return,y!==null){h=y;continue}break}if(C.child===P.child){for(P=C.child;P;){if(P===h)return u(C),o;if(P===y)return u(C),l;P=P.sibling}throw Error(r(188))}if(h.return!==y.return)h=C,y=P;else{for(var K=!1,ie=C.child;ie;){if(ie===h){K=!0,h=C,y=P;break}if(ie===y){K=!0,y=C,h=P;break}ie=ie.sibling}if(!K){for(ie=P.child;ie;){if(ie===h){K=!0,h=P,y=C;break}if(ie===y){K=!0,y=P,h=C;break}ie=ie.sibling}if(!K)throw Error(r(189))}}if(h.alternate!==y)throw Error(r(190))}if(h.tag!==3)throw Error(r(188));return h.stateNode.current===h?o:l}function f(o){var l=o.tag;if(l===5||l===26||l===27||l===6)return o;for(o=o.child;o!==null;){if(l=f(o),l!==null)return l;o=o.sibling}return null}var m=Object.assign,p=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),j=Symbol.for("react.consumer"),O=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),oe=Symbol.for("react.activity"),ee=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function ne(o){return o===null||typeof o!="object"?null:(o=J&&o[J]||o["@@iterator"],typeof o=="function"?o:null)}var he=Symbol.for("react.client.reference");function Q(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===he?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case w:return"Fragment";case E:return"Profiler";case x:return"StrictMode";case U:return"Suspense";case V:return"SuspenseList";case oe:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case _:return"Portal";case O:return(o.displayName||"Context")+".Provider";case j:return(o._context.displayName||"Context")+".Consumer";case N:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case Z:return l=o.displayName||null,l!==null?l:Q(o.type)||"Memo";case X:l=o._payload,o=o._init;try{return Q(o(l))}catch{}}return null}var se=Array.isArray,W=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},z=[],M=-1;function D(o){return{current:o}}function Y(o){0>M||(o.current=z[M],z[M]=null,M--)}function q(o,l){M++,z[M]=o.current,o.current=l}var re=D(null),ue=D(null),ce=D(null),ve=D(null);function k(o,l){switch(q(ce,l),q(ue,o),q(re,null),l.nodeType){case 9:case 11:o=(o=l.documentElement)&&(o=o.namespaceURI)?jE(o):0;break;default:if(o=l.tagName,l=l.namespaceURI)l=jE(l),o=PE(l,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}Y(re),q(re,o)}function F(){Y(re),Y(ue),Y(ce)}function G(o){o.memoizedState!==null&&q(ve,o);var l=re.current,h=PE(l,o.type);l!==h&&(q(ue,o),q(re,h))}function le(o){ue.current===o&&(Y(re),Y(ue)),ve.current===o&&(Y(ve),Pd._currentValue=I)}var H=Object.prototype.hasOwnProperty,ae=e.unstable_scheduleCallback,fe=e.unstable_cancelCallback,ge=e.unstable_shouldYield,de=e.unstable_requestPaint,_e=e.unstable_now,Te=e.unstable_getCurrentPriorityLevel,Le=e.unstable_ImmediatePriority,qe=e.unstable_UserBlockingPriority,Be=e.unstable_NormalPriority,He=e.unstable_LowPriority,be=e.unstable_IdlePriority,we=e.log,De=e.unstable_setDisableYieldValue,Re=null,Ae=null;function Fe(o){if(typeof we=="function"&&De(o),Ae&&typeof Ae.setStrictMode=="function")try{Ae.setStrictMode(Re,o)}catch{}}var Ve=Math.clz32?Math.clz32:at,Ze=Math.log,ut=Math.LN2;function at(o){return o>>>=0,o===0?32:31-(Ze(o)/ut|0)|0}var pt=256,Lt=4194304;function Dt(o){var l=o&42;if(l!==0)return l;switch(o&-o){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:return 64;case 128:return 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 o&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function kt(o,l,h){var y=o.pendingLanes;if(y===0)return 0;var C=0,P=o.suspendedLanes,K=o.pingedLanes;o=o.warmLanes;var ie=y&134217727;return ie!==0?(y=ie&~P,y!==0?C=Dt(y):(K&=ie,K!==0?C=Dt(K):h||(h=ie&~o,h!==0&&(C=Dt(h))))):(ie=y&~P,ie!==0?C=Dt(ie):K!==0?C=Dt(K):h||(h=y&~o,h!==0&&(C=Dt(h)))),C===0?0:l!==0&&l!==C&&(l&P)===0&&(P=C&-C,h=l&-l,P>=h||P===32&&(h&4194048)!==0)?l:C}function wr(o,l){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&l)===0}function $n(o,l){switch(o){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32: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 l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function os(){var o=pt;return pt<<=1,(pt&4194048)===0&&(pt=256),o}function ni(){var o=Lt;return Lt<<=1,(Lt&62914560)===0&&(Lt=4194304),o}function ss(o){for(var l=[],h=0;31>h;h++)l.push(o);return l}function Oa(o,l){o.pendingLanes|=l,l!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function qu(o,l,h,y,C,P){var K=o.pendingLanes;o.pendingLanes=h,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=h,o.entangledLanes&=h,o.errorRecoveryDisabledLanes&=h,o.shellSuspendCounter=0;var ie=o.entanglements,pe=o.expirationTimes,Ee=o.hiddenUpdates;for(h=K&~h;0<h;){var ke=31-Ve(h),Ue=1<<ke;ie[ke]=0,pe[ke]=-1;var Oe=Ee[ke];if(Oe!==null)for(Ee[ke]=null,ke=0;ke<Oe.length;ke++){var je=Oe[ke];je!==null&&(je.lane&=-536870913)}h&=~Ue}y!==0&&ls(o,y,0),P!==0&&C===0&&o.tag!==0&&(o.suspendedLanes|=P&~(K&~l))}function ls(o,l,h){o.pendingLanes|=l,o.suspendedLanes&=~l;var y=31-Ve(l);o.entangledLanes|=l,o.entanglements[y]=o.entanglements[y]|1073741824|h&4194090}function ja(o,l){var h=o.entangledLanes|=l;for(o=o.entanglements;h;){var y=31-Ve(h),C=1<<y;C&l|o[y]&l&&(o[y]|=l),h&=~C}}function hn(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function on(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function Qn(){var o=B.p;return o!==0?o:(o=window.event,o===void 0?32:KE(o.type))}function Vn(o,l){var h=B.p;try{return B.p=o,l()}finally{B.p=h}}var Xt=Math.random().toString(36).slice(2),At="__reactFiber$"+Xt,Qt="__reactProps$"+Xt,Jn="__reactContainer$"+Xt,Rn="__reactEvents$"+Xt,ot="__reactListeners$"+Xt,hm="__reactHandles$"+Xt,Uf="__reactResources$"+Xt,us="__reactMarker$"+Xt;function Gu(o){delete o[At],delete o[Qt],delete o[Rn],delete o[ot],delete o[hm]}function Pa(o){var l=o[At];if(l)return l;for(var h=o.parentNode;h;){if(l=h[Jn]||h[At]){if(h=l.alternate,l.child!==null||h!==null&&h.child!==null)for(o=LE(o);o!==null;){if(h=o[At])return h;o=LE(o)}return l}o=h,h=o.parentNode}return null}function no(o){if(o=o[At]||o[Jn]){var l=o.tag;if(l===5||l===6||l===13||l===26||l===27||l===3)return o}return null}function Li(o){var l=o.tag;if(l===5||l===26||l===27||l===6)return o.stateNode;throw Error(r(33))}function ro(o){var l=o[Uf];return l||(l=o[Uf]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function In(o){o[us]=!0}var mm=new Set,pm={};function io(o,l){ao(o,l),ao(o+"Capture",l)}function ao(o,l){for(pm[o]=l,o=0;o<l.length;o++)mm.add(l[o])}var qy=RegExp("^[: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]*$"),Ll={},gm={};function Gy(o){return H.call(gm,o)?!0:H.call(Ll,o)?!1:qy.test(o)?gm[o]=!0:(Ll[o]=!0,!1)}function Yu(o,l,h){if(Gy(l))if(h===null)o.removeAttribute(l);else{switch(typeof h){case"undefined":case"function":case"symbol":o.removeAttribute(l);return;case"boolean":var y=l.toLowerCase().slice(0,5);if(y!=="data-"&&y!=="aria-"){o.removeAttribute(l);return}}o.setAttribute(l,""+h)}}function Wu(o,l,h){if(h===null)o.removeAttribute(l);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(l);return}o.setAttribute(l,""+h)}}function ta(o,l,h,y){if(y===null)o.removeAttribute(h);else{switch(typeof y){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(h);return}o.setAttributeNS(l,h,""+y)}}var Dl,cs;function oo(o){if(Dl===void 0)try{throw Error()}catch(h){var l=h.stack.trim().match(/\n( *(at )?)/);Dl=l&&l[1]||"",cs=-1<h.stack.indexOf(`
at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Dl+o+cs}var Ku=!1;function so(o,l){if(!o||Ku)return"";Ku=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var y={DetermineComponentFrameRoot:function(){try{if(l){var Ue=function(){throw Error()};if(Object.defineProperty(Ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ue,[])}catch(je){var Oe=je}Reflect.construct(o,[],Ue)}else{try{Ue.call()}catch(je){Oe=je}o.call(Ue.prototype)}}else{try{throw Error()}catch(je){Oe=je}(Ue=o())&&typeof Ue.catch=="function"&&Ue.catch(function(){})}}catch(je){if(je&&Oe&&typeof je.stack=="string")return[je.stack,Oe.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var C=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");C&&C.configurable&&Object.defineProperty(y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var P=y.DetermineComponentFrameRoot(),K=P[0],ie=P[1];if(K&&ie){var pe=K.split(`
`),Ee=ie.split(`
`);for(C=y=0;y<pe.length&&!pe[y].includes("DetermineComponentFrameRoot");)y++;for(;C<Ee.length&&!Ee[C].includes("DetermineComponentFrameRoot");)C++;if(y===pe.length||C===Ee.length)for(y=pe.length-1,C=Ee.length-1;1<=y&&0<=C&&pe[y]!==Ee[C];)C--;for(;1<=y&&0<=C;y--,C--)if(pe[y]!==Ee[C]){if(y!==1||C!==1)do if(y--,C--,0>C||pe[y]!==Ee[C]){var ke=`
`+pe[y].replace(" at new "," at ");return o.displayName&&ke.includes("<anonymous>")&&(ke=ke.replace("<anonymous>",o.displayName)),ke}while(1<=y&&0<=C);break}}}finally{Ku=!1,Error.prepareStackTrace=h}return(h=o?o.displayName||o.name:"")?oo(h):""}function Ot(o){switch(o.tag){case 26:case 27:case 5:return oo(o.type);case 16:return oo("Lazy");case 13:return oo("Suspense");case 19:return oo("SuspenseList");case 0:case 15:return so(o.type,!1);case 11:return so(o.type.render,!1);case 1:return so(o.type,!0);case 31:return oo("Activity");default:return""}}function Jt(o){try{var l="";do l+=Ot(o),o=o.return;while(o);return l}catch(h){return`
Error generating stack: `+h.message+`
`+h.stack}}function ur(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function lo(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function fs(o){var l=lo(o)?"checked":"value",h=Object.getOwnPropertyDescriptor(o.constructor.prototype,l),y=""+o[l];if(!o.hasOwnProperty(l)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var C=h.get,P=h.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return C.call(this)},set:function(K){y=""+K,P.call(this,K)}}),Object.defineProperty(o,l,{enumerable:h.enumerable}),{getValue:function(){return y},setValue:function(K){y=""+K},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function ds(o){o._valueTracker||(o._valueTracker=fs(o))}function vt(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var h=l.getValue(),y="";return o&&(y=lo(o)?o.checked?"true":"false":o.value),o=y,o!==h?(l.setValue(o),!0):!1}function en(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var Bf=/[\n"\\]/g;function cr(o){return o.replace(Bf,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Sr(o,l,h,y,C,P,K,ie){o.name="",K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?o.type=K:o.removeAttribute("type"),l!=null?K==="number"?(l===0&&o.value===""||o.value!=l)&&(o.value=""+ur(l)):o.value!==""+ur(l)&&(o.value=""+ur(l)):K!=="submit"&&K!=="reset"||o.removeAttribute("value"),l!=null?hs(o,K,ur(l)):h!=null?hs(o,K,ur(h)):y!=null&&o.removeAttribute("value"),C==null&&P!=null&&(o.defaultChecked=!!P),C!=null&&(o.checked=C&&typeof C!="function"&&typeof C!="symbol"),ie!=null&&typeof ie!="function"&&typeof ie!="symbol"&&typeof ie!="boolean"?o.name=""+ur(ie):o.removeAttribute("name")}function vm(o,l,h,y,C,P,K,ie){if(P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"&&(o.type=P),l!=null||h!=null){if(!(P!=="submit"&&P!=="reset"||l!=null))return;h=h!=null?""+ur(h):"",l=l!=null?""+ur(l):h,ie||l===o.value||(o.value=l),o.defaultValue=l}y=y??C,y=typeof y!="function"&&typeof y!="symbol"&&!!y,o.checked=ie?o.checked:!!y,o.defaultChecked=!!y,K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"&&(o.name=K)}function hs(o,l,h){l==="number"&&en(o.ownerDocument)===o||o.defaultValue===""+h||(o.defaultValue=""+h)}function qr(o,l,h,y){if(o=o.options,l){l={};for(var C=0;C<h.length;C++)l["$"+h[C]]=!0;for(h=0;h<o.length;h++)C=l.hasOwnProperty("$"+o[h].value),o[h].selected!==C&&(o[h].selected=C),C&&y&&(o[h].defaultSelected=!0)}else{for(h=""+ur(h),l=null,C=0;C<o.length;C++){if(o[C].value===h){o[C].selected=!0,y&&(o[C].defaultSelected=!0);return}l!==null||o[C].disabled||(l=o[C])}l!==null&&(l.selected=!0)}}function bn(o,l,h){if(l!=null&&(l=""+ur(l),l!==o.value&&(o.value=l),h==null)){o.defaultValue!==l&&(o.defaultValue=l);return}o.defaultValue=h!=null?""+ur(h):""}function Ma(o,l,h,y){if(l==null){if(y!=null){if(h!=null)throw Error(r(92));if(se(y)){if(1<y.length)throw Error(r(93));y=y[0]}h=y}h==null&&(h=""),l=h}h=ur(l),o.defaultValue=h,y=o.textContent,y===h&&y!==""&&y!==null&&(o.value=y)}function Di(o,l){if(l){var h=o.firstChild;if(h&&h===o.lastChild&&h.nodeType===3){h.nodeValue=l;return}}o.textContent=l}var kl=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Zu(o,l,h){var y=l.indexOf("--")===0;h==null||typeof h=="boolean"||h===""?y?o.setProperty(l,""):l==="float"?o.cssFloat="":o[l]="":y?o.setProperty(l,h):typeof h!="number"||h===0||kl.has(l)?l==="float"?o.cssFloat=h:o[l]=(""+h).trim():o[l]=h+"px"}function ms(o,l,h){if(l!=null&&typeof l!="object")throw Error(r(62));if(o=o.style,h!=null){for(var y in h)!h.hasOwnProperty(y)||l!=null&&l.hasOwnProperty(y)||(y.indexOf("--")===0?o.setProperty(y,""):y==="float"?o.cssFloat="":o[y]="");for(var C in l)y=l[C],l.hasOwnProperty(C)&&h[C]!==y&&Zu(o,C,y)}else for(var P in l)l.hasOwnProperty(P)&&Zu(o,P,l[P])}function Il(o){if(o.indexOf("-")===-1)return!1;switch(o){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 zf=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Xu=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ps(o){return Xu.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}var Ul=null;function gs(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var uo=null,Ra=null;function ym(o){var l=no(o);if(l&&(o=l.stateNode)){var h=o[Qt]||null;e:switch(o=l.stateNode,l.type){case"input":if(Sr(o,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name),l=h.name,h.type==="radio"&&l!=null){for(h=o;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll('input[name="'+cr(""+l)+'"][type="radio"]'),l=0;l<h.length;l++){var y=h[l];if(y!==o&&y.form===o.form){var C=y[Qt]||null;if(!C)throw Error(r(90));Sr(y,C.value,C.defaultValue,C.defaultValue,C.checked,C.defaultChecked,C.type,C.name)}}for(l=0;l<h.length;l++)y=h[l],y.form===o.form&&vt(y)}break e;case"textarea":bn(o,h.value,h.defaultValue);break e;case"select":l=h.value,l!=null&&qr(o,!!h.multiple,l,!1)}}}var mt=!1;function ri(o,l,h){if(mt)return o(l,h);mt=!0;try{var y=o(l);return y}finally{if(mt=!1,(uo!==null||Ra!==null)&&(dp(),uo&&(l=uo,o=Ra,Ra=uo=null,ym(l),o)))for(l=0;l<o.length;l++)ym(o[l])}}function It(o,l){var h=o.stateNode;if(h===null)return null;var y=h[Qt]||null;if(y===null)return null;h=y[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(o=o.type,y=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!y;break e;default:o=!1}if(o)return null;if(h&&typeof h!="function")throw Error(r(231,l,typeof h));return h}var ki=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bl=!1;if(ki)try{var co={};Object.defineProperty(co,"passive",{get:function(){Bl=!0}}),window.addEventListener("test",co,co),window.removeEventListener("test",co,co)}catch{Bl=!1}var Ii=null,na=null,vs=null;function ys(){if(vs)return vs;var o,l=na,h=l.length,y,C="value"in Ii?Ii.value:Ii.textContent,P=C.length;for(o=0;o<h&&l[o]===C[o];o++);var K=h-o;for(y=1;y<=K&&l[h-y]===C[P-y];y++);return vs=C.slice(o,1<y?1-y:void 0)}function Cn(o){var l=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&l===13&&(o=13)):o=l,o===10&&(o=13),32<=o||o===13?o:0}function Ui(){return!0}function Ff(){return!1}function fr(o){function l(h,y,C,P,K){this._reactName=h,this._targetInst=C,this.type=y,this.nativeEvent=P,this.target=K,this.currentTarget=null;for(var ie in o)o.hasOwnProperty(ie)&&(h=o[ie],this[ie]=h?h(P):P[ie]);return this.isDefaultPrevented=(P.defaultPrevented!=null?P.defaultPrevented:P.returnValue===!1)?Ui:Ff,this.isPropagationStopped=Ff,this}return m(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=!1),this.isDefaultPrevented=Ui)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=Ui)},persist:function(){},isPersistent:Ui}),l}var fo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zl=fr(fo),ho=m({},fo,{view:0,detail:0}),Yy=fr(ho),Qu,_t,Fl,Cr=m({},ho,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ju,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==Fl&&(Fl&&o.type==="mousemove"?(Qu=o.screenX-Fl.screenX,_t=o.screenY-Fl.screenY):_t=Qu=0,Fl=o),Qu)},movementY:function(o){return"movementY"in o?o.movementY:_t}}),bs=fr(Cr),bm=m({},Cr,{dataTransfer:0}),Wy=fr(bm),$f=m({},ho,{relatedTarget:0}),Vf=fr($f),_m=m({},fo,{animationName:0,elapsedTime:0,pseudoElement:0}),Ky=fr(_m),Zy=m({},fo,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),Hf=fr(Zy),Xy=m({},fo,{data:0}),ii=fr(Xy),Qy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xm={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Na={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wm(o){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(o):(o=Na[o])?!!l[o]:!1}function Ju(){return wm}var qf=m({},ho,{key:function(o){if(o.key){var l=Qy[o.key]||o.key;if(l!=="Unidentified")return l}return o.type==="keypress"?(o=Cn(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?xm[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ju,charCode:function(o){return o.type==="keypress"?Cn(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?Cn(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),Jy=fr(qf),Sm=m({},Cr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gf=fr(Sm),e0=m({},ho,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ju}),t0=fr(e0),Yf=m({},fo,{propertyName:0,elapsedTime:0,pseudoElement:0}),n0=fr(Yf),Cm=m({},Cr,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),Em=fr(Cm),ec=m({},fo,{newState:0,oldState:0}),mo=fr(ec),r0=[9,13,27,32],po=ki&&"CompositionEvent"in window,er=null;ki&&"documentMode"in document&&(er=document.documentMode);var Am=ki&&"TextEvent"in window&&!er,Wf=ki&&(!po||er&&8<er&&11>=er),Tm=" ",tc=!1;function nc(o,l){switch(o){case"keyup":return r0.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Om(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var _s=!1;function jm(o,l){switch(o){case"compositionend":return Om(l);case"keypress":return l.which!==32?null:(tc=!0,Tm);case"textInput":return o=l.data,o===Tm&&tc?null:o;default:return null}}function i0(o,l){if(_s)return o==="compositionend"||!po&&nc(o,l)?(o=ys(),vs=na=Ii=null,_s=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return Wf&&l.locale!=="ko"?null:l.data;default:return null}}var ai={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function go(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l==="input"?!!ai[o.type]:l==="textarea"}function Pm(o,l,h,y){uo?Ra?Ra.push(y):Ra=[y]:uo=y,l=yp(l,"onChange"),0<l.length&&(h=new zl("onChange","change",null,h,y),o.push({event:h,listeners:l}))}var Rr=null,$l=null;function xs(o){CE(o,0)}function rc(o){var l=Li(o);if(vt(l))return o}function ws(o,l){if(o==="change")return l}var Kf=!1;if(ki){var Ss;if(ki){var Zf="oninput"in document;if(!Zf){var ra=document.createElement("div");ra.setAttribute("oninput","return;"),Zf=typeof ra.oninput=="function"}Ss=Zf}else Ss=!1;Kf=Ss&&(!document.documentMode||9<document.documentMode)}function Vl(){Rr&&(Rr.detachEvent("onpropertychange",Mm),$l=Rr=null)}function Mm(o){if(o.propertyName==="value"&&rc($l)){var l=[];Pm(l,$l,o,gs(o)),ri(xs,l)}}function Xf(o,l,h){o==="focusin"?(Vl(),Rr=l,$l=h,Rr.attachEvent("onpropertychange",Mm)):o==="focusout"&&Vl()}function a0(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return rc($l)}function ia(o,l){if(o==="click")return rc(l)}function o0(o,l){if(o==="input"||o==="change")return rc(l)}function Cs(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var Nr=typeof Object.is=="function"?Object.is:Cs;function Lr(o,l){if(Nr(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var h=Object.keys(o),y=Object.keys(l);if(h.length!==y.length)return!1;for(y=0;y<h.length;y++){var C=h[y];if(!H.call(l,C)||!Nr(o[C],l[C]))return!1}return!0}function Hl(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function Qf(o,l){var h=Hl(o);o=0;for(var y;h;){if(h.nodeType===3){if(y=o+h.textContent.length,o<=l&&y>=l)return{node:h,offset:l-o};o=y}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode}h=void 0}h=Hl(h)}}function ic(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?ic(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function ql(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var l=en(o.document);l instanceof o.HTMLIFrameElement;){try{var h=typeof l.contentWindow.location.href=="string"}catch{h=!1}if(h)o=l.contentWindow;else break;l=en(o.document)}return l}function Gl(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}var ac=ki&&"documentMode"in document&&11>=document.documentMode,oi=null,Es=null,vo=null,oc=!1;function Rm(o,l,h){var y=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;oc||oi==null||oi!==en(y)||(y=oi,"selectionStart"in y&&Gl(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),vo&&Lr(vo,y)||(vo=y,y=yp(Es,"onSelect"),0<y.length&&(l=new zl("onSelect","select",null,l,h),o.push({event:l,listeners:y}),l.target=oi)))}function Bi(o,l){var h={};return h[o.toLowerCase()]=l.toLowerCase(),h["Webkit"+o]="webkit"+l,h["Moz"+o]="moz"+l,h}var As={animationend:Bi("Animation","AnimationEnd"),animationiteration:Bi("Animation","AnimationIteration"),animationstart:Bi("Animation","AnimationStart"),transitionrun:Bi("Transition","TransitionRun"),transitionstart:Bi("Transition","TransitionStart"),transitioncancel:Bi("Transition","TransitionCancel"),transitionend:Bi("Transition","TransitionEnd")},sc={},Nm={};ki&&(Nm=document.createElement("div").style,"AnimationEvent"in window||(delete As.animationend.animation,delete As.animationiteration.animation,delete As.animationstart.animation),"TransitionEvent"in window||delete As.transitionend.transition);function La(o){if(sc[o])return sc[o];if(!As[o])return o;var l=As[o],h;for(h in l)if(l.hasOwnProperty(h)&&h in Nm)return sc[o]=l[h];return o}var Lm=La("animationend"),si=La("animationiteration"),Yl=La("animationstart"),s0=La("transitionrun"),lc=La("transitionstart"),l0=La("transitioncancel"),Jf=La("transitionend"),Dm=new Map,yo="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");yo.push("scrollEnd");function li(o,l){Dm.set(o,l),io(l,[o])}var bo=new WeakMap;function Dr(o,l){if(typeof o=="object"&&o!==null){var h=bo.get(o);return h!==void 0?h:(l={value:o,source:l,stack:Jt(l)},bo.set(o,l),l)}return{value:o,source:l,stack:Jt(l)}}var kr=[],Ts=0,ui=0;function Wl(){for(var o=Ts,l=ui=Ts=0;l<o;){var h=kr[l];kr[l++]=null;var y=kr[l];kr[l++]=null;var C=kr[l];kr[l++]=null;var P=kr[l];if(kr[l++]=null,y!==null&&C!==null){var K=y.pending;K===null?C.next=C:(C.next=K.next,K.next=C),y.pending=C}P!==0&&Zl(h,C,P)}}function Kl(o,l,h,y){kr[Ts++]=o,kr[Ts++]=l,kr[Ts++]=h,kr[Ts++]=y,ui|=y,o.lanes|=y,o=o.alternate,o!==null&&(o.lanes|=y)}function _o(o,l,h,y){return Kl(o,l,h,y),Da(o)}function Os(o,l){return Kl(o,null,null,l),Da(o)}function Zl(o,l,h){o.lanes|=h;var y=o.alternate;y!==null&&(y.lanes|=h);for(var C=!1,P=o.return;P!==null;)P.childLanes|=h,y=P.alternate,y!==null&&(y.childLanes|=h),P.tag===22&&(o=P.stateNode,o===null||o._visibility&1||(C=!0)),o=P,P=P.return;return o.tag===3?(P=o.stateNode,C&&l!==null&&(C=31-Ve(h),o=P.hiddenUpdates,y=o[C],y===null?o[C]=[l]:y.push(l),l.lane=h|536870912),P):null}function Da(o){if(50<wd)throw wd=0,a1=null,Error(r(185));for(var l=o.return;l!==null;)o=l,l=o.return;return o.tag===3?o.stateNode:null}var xo={};function km(o,l,h,y){this.tag=o,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ir(o,l,h,y){return new km(o,l,h,y)}function uc(o){return o=o.prototype,!(!o||!o.isReactComponent)}function zi(o,l){var h=o.alternate;return h===null?(h=Ir(o.tag,l,o.key,o.mode),h.elementType=o.elementType,h.type=o.type,h.stateNode=o.stateNode,h.alternate=o,o.alternate=h):(h.pendingProps=l,h.type=o.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=o.flags&65011712,h.childLanes=o.childLanes,h.lanes=o.lanes,h.child=o.child,h.memoizedProps=o.memoizedProps,h.memoizedState=o.memoizedState,h.updateQueue=o.updateQueue,l=o.dependencies,h.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},h.sibling=o.sibling,h.index=o.index,h.ref=o.ref,h.refCleanup=o.refCleanup,h}function ed(o,l){o.flags&=65011714;var h=o.alternate;return h===null?(o.childLanes=0,o.lanes=l,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=h.childLanes,o.lanes=h.lanes,o.child=h.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=h.memoizedProps,o.memoizedState=h.memoizedState,o.updateQueue=h.updateQueue,o.type=h.type,l=h.dependencies,o.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),o}function Xl(o,l,h,y,C,P){var K=0;if(y=o,typeof o=="function")uc(o)&&(K=1);else if(typeof o=="string")K=ZU(o,h,re.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case oe:return o=Ir(31,h,l,C),o.elementType=oe,o.lanes=P,o;case w:return ka(h.children,C,P,l);case x:K=8,C|=24;break;case E:return o=Ir(12,h,l,C|2),o.elementType=E,o.lanes=P,o;case U:return o=Ir(13,h,l,C),o.elementType=U,o.lanes=P,o;case V:return o=Ir(19,h,l,C),o.elementType=V,o.lanes=P,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case A:case O:K=10;break e;case j:K=9;break e;case N:K=11;break e;case Z:K=14;break e;case X:K=16,y=null;break e}K=29,h=Error(r(130,o===null?"null":typeof o,"")),y=null}return l=Ir(K,h,l,C),l.elementType=o,l.type=y,l.lanes=P,l}function ka(o,l,h,y){return o=Ir(7,o,y,l),o.lanes=h,o}function td(o,l,h){return o=Ir(6,o,null,l),o.lanes=h,o}function cc(o,l,h){return l=Ir(4,o.children!==null?o.children:[],o.key,l),l.lanes=h,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}var wo=[],js=0,c=null,g=0,S=[],R=0,$=null,te=1,me="";function Se(o,l){wo[js++]=g,wo[js++]=c,c=o,g=l}function Me(o,l,h){S[R++]=te,S[R++]=me,S[R++]=$,$=o;var y=te;o=me;var C=32-Ve(y)-1;y&=~(1<<C),h+=1;var P=32-Ve(l)+C;if(30<P){var K=C-C%5;P=(y&(1<<K)-1).toString(32),y>>=K,C-=K,te=1<<32-Ve(l)+C|h<<C|y,me=P+o}else te=1<<P|h<<C|y,me=o}function $e(o){o.return!==null&&(Se(o,1),Me(o,1,0))}function Xe(o){for(;o===c;)c=wo[--js],wo[js]=null,g=wo[--js],wo[js]=null;for(;o===$;)$=S[--R],S[R]=null,me=S[--R],S[R]=null,te=S[--R],S[R]=null}var tt=null,rt=null,ht=!1,tn=null,_n=!1,tr=Error(r(519));function Gr(o){var l=Error(r(418,""));throw Ms(Dr(l,o)),tr}function Im(o){var l=o.stateNode,h=o.type,y=o.memoizedProps;switch(l[At]=o,l[Qt]=y,h){case"dialog":St("cancel",l),St("close",l);break;case"iframe":case"object":case"embed":St("load",l);break;case"video":case"audio":for(h=0;h<Cd.length;h++)St(Cd[h],l);break;case"source":St("error",l);break;case"img":case"image":case"link":St("error",l),St("load",l);break;case"details":St("toggle",l);break;case"input":St("invalid",l),vm(l,y.value,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name,!0),ds(l);break;case"select":St("invalid",l);break;case"textarea":St("invalid",l),Ma(l,y.value,y.defaultValue,y.children),ds(l)}h=y.children,typeof h!="string"&&typeof h!="number"&&typeof h!="bigint"||l.textContent===""+h||y.suppressHydrationWarning===!0||OE(l.textContent,h)?(y.popover!=null&&(St("beforetoggle",l),St("toggle",l)),y.onScroll!=null&&St("scroll",l),y.onScrollEnd!=null&&St("scrollend",l),y.onClick!=null&&(l.onclick=bp),l=!0):l=!1,l||Gr(o)}function Um(o){for(tt=o.return;tt;)switch(tt.tag){case 5:case 13:_n=!1;return;case 27:case 3:_n=!0;return;default:tt=tt.return}}function Ql(o){if(o!==tt)return!1;if(!ht)return Um(o),ht=!0,!1;var l=o.tag,h;if((h=l!==3&&l!==27)&&((h=l===5)&&(h=o.type,h=!(h!=="form"&&h!=="button")||x1(o.type,o.memoizedProps)),h=!h),h&&rt&&Gr(o),Um(o),l===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));e:{for(o=o.nextSibling,l=0;o;){if(o.nodeType===8)if(h=o.data,h==="/$"){if(l===0){rt=la(o.nextSibling);break e}l--}else h!=="$"&&h!=="$!"&&h!=="$?"||l++;o=o.nextSibling}rt=null}}else l===27?(l=rt,Gs(o.type)?(o=E1,E1=null,rt=o):rt=l):rt=tt?la(o.stateNode.nextSibling):null;return!0}function Ps(){rt=tt=null,ht=!1}function Bm(){var o=tn;return o!==null&&(Kr===null?Kr=o:Kr.push.apply(Kr,o),tn=null),o}function Ms(o){tn===null?tn=[o]:tn.push(o)}var mn=D(null),Fi=null,aa=null;function Ia(o,l,h){q(mn,l._currentValue),l._currentValue=h}function oa(o){o._currentValue=mn.current,Y(mn)}function Jl(o,l,h){for(;o!==null;){var y=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,y!==null&&(y.childLanes|=l)):y!==null&&(y.childLanes&l)!==l&&(y.childLanes|=l),o===h)break;o=o.return}}function fc(o,l,h,y){var C=o.child;for(C!==null&&(C.return=o);C!==null;){var P=C.dependencies;if(P!==null){var K=C.child;P=P.firstContext;e:for(;P!==null;){var ie=P;P=C;for(var pe=0;pe<l.length;pe++)if(ie.context===l[pe]){P.lanes|=h,ie=P.alternate,ie!==null&&(ie.lanes|=h),Jl(P.return,h,o),y||(K=null);break e}P=ie.next}}else if(C.tag===18){if(K=C.return,K===null)throw Error(r(341));K.lanes|=h,P=K.alternate,P!==null&&(P.lanes|=h),Jl(K,h,o),K=null}else K=C.child;if(K!==null)K.return=C;else for(K=C;K!==null;){if(K===o){K=null;break}if(C=K.sibling,C!==null){C.return=K.return,K=C;break}K=K.return}C=K}}function eu(o,l,h,y){o=null;for(var C=l,P=!1;C!==null;){if(!P){if((C.flags&524288)!==0)P=!0;else if((C.flags&262144)!==0)break}if(C.tag===10){var K=C.alternate;if(K===null)throw Error(r(387));if(K=K.memoizedProps,K!==null){var ie=C.type;Nr(C.pendingProps.value,K.value)||(o!==null?o.push(ie):o=[ie])}}else if(C===ve.current){if(K=C.alternate,K===null)throw Error(r(387));K.memoizedState.memoizedState!==C.memoizedState.memoizedState&&(o!==null?o.push(Pd):o=[Pd])}C=C.return}o!==null&&fc(l,o,h,y),l.flags|=262144}function zm(o){for(o=o.firstContext;o!==null;){if(!Nr(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function tu(o){Fi=o,aa=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function Er(o){return m3(Fi,o)}function Fm(o,l){return Fi===null&&tu(o),m3(o,l)}function m3(o,l){var h=l._currentValue;if(l={context:l,memoizedValue:h,next:null},aa===null){if(o===null)throw Error(r(308));aa=l,o.dependencies={lanes:0,firstContext:l},o.flags|=524288}else aa=aa.next=l;return h}var K9=typeof AbortController<"u"?AbortController:function(){var o=[],l=this.signal={aborted:!1,addEventListener:function(h,y){o.push(y)}};this.abort=function(){l.aborted=!0,o.forEach(function(h){return h()})}},Z9=e.unstable_scheduleCallback,X9=e.unstable_NormalPriority,Hn={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function u0(){return{controller:new K9,data:new Map,refCount:0}}function nd(o){o.refCount--,o.refCount===0&&Z9(X9,function(){o.controller.abort()})}var rd=null,c0=0,dc=0,hc=null;function Q9(o,l){if(rd===null){var h=rd=[];c0=0,dc=d1(),hc={status:"pending",value:void 0,then:function(y){h.push(y)}}}return c0++,l.then(p3,p3),l}function p3(){if(--c0===0&&rd!==null){hc!==null&&(hc.status="fulfilled");var o=rd;rd=null,dc=0,hc=null;for(var l=0;l<o.length;l++)(0,o[l])()}}function J9(o,l){var h=[],y={status:"pending",value:null,reason:null,then:function(C){h.push(C)}};return o.then(function(){y.status="fulfilled",y.value=l;for(var C=0;C<h.length;C++)(0,h[C])(l)},function(C){for(y.status="rejected",y.reason=C,C=0;C<h.length;C++)(0,h[C])(void 0)}),y}var g3=W.S;W.S=function(o,l){typeof l=="object"&&l!==null&&typeof l.then=="function"&&Q9(o,l),g3!==null&&g3(o,l)};var nu=D(null);function f0(){var o=nu.current;return o!==null?o:nn.pooledCache}function $m(o,l){l===null?q(nu,nu.current):q(nu,l.pool)}function v3(){var o=f0();return o===null?null:{parent:Hn._currentValue,pool:o}}var id=Error(r(460)),y3=Error(r(474)),Vm=Error(r(542)),d0={then:function(){}};function b3(o){return o=o.status,o==="fulfilled"||o==="rejected"}function Hm(){}function _3(o,l,h){switch(h=o[h],h===void 0?o.push(l):h!==l&&(l.then(Hm,Hm),l=h),l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,w3(o),o;default:if(typeof l.status=="string")l.then(Hm,Hm);else{if(o=nn,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=l,o.status="pending",o.then(function(y){if(l.status==="pending"){var C=l;C.status="fulfilled",C.value=y}},function(y){if(l.status==="pending"){var C=l;C.status="rejected",C.reason=y}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,w3(o),o}throw ad=l,id}}var ad=null;function x3(){if(ad===null)throw Error(r(459));var o=ad;return ad=null,o}function w3(o){if(o===id||o===Vm)throw Error(r(483))}var Rs=!1;function h0(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function m0(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function Ns(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function Ls(o,l,h){var y=o.updateQueue;if(y===null)return null;if(y=y.shared,(Ft&2)!==0){var C=y.pending;return C===null?l.next=l:(l.next=C.next,C.next=l),y.pending=l,l=Da(o),Zl(o,null,h),l}return Kl(o,y,l,h),Da(o)}function od(o,l,h){if(l=l.updateQueue,l!==null&&(l=l.shared,(h&4194048)!==0)){var y=l.lanes;y&=o.pendingLanes,h|=y,l.lanes=h,ja(o,h)}}function p0(o,l){var h=o.updateQueue,y=o.alternate;if(y!==null&&(y=y.updateQueue,h===y)){var C=null,P=null;if(h=h.firstBaseUpdate,h!==null){do{var K={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};P===null?C=P=K:P=P.next=K,h=h.next}while(h!==null);P===null?C=P=l:P=P.next=l}else C=P=l;h={baseState:y.baseState,firstBaseUpdate:C,lastBaseUpdate:P,shared:y.shared,callbacks:y.callbacks},o.updateQueue=h;return}o=h.lastBaseUpdate,o===null?h.firstBaseUpdate=l:o.next=l,h.lastBaseUpdate=l}var g0=!1;function sd(){if(g0){var o=hc;if(o!==null)throw o}}function ld(o,l,h,y){g0=!1;var C=o.updateQueue;Rs=!1;var P=C.firstBaseUpdate,K=C.lastBaseUpdate,ie=C.shared.pending;if(ie!==null){C.shared.pending=null;var pe=ie,Ee=pe.next;pe.next=null,K===null?P=Ee:K.next=Ee,K=pe;var ke=o.alternate;ke!==null&&(ke=ke.updateQueue,ie=ke.lastBaseUpdate,ie!==K&&(ie===null?ke.firstBaseUpdate=Ee:ie.next=Ee,ke.lastBaseUpdate=pe))}if(P!==null){var Ue=C.baseState;K=0,ke=Ee=pe=null,ie=P;do{var Oe=ie.lane&-536870913,je=Oe!==ie.lane;if(je?(jt&Oe)===Oe:(y&Oe)===Oe){Oe!==0&&Oe===dc&&(g0=!0),ke!==null&&(ke=ke.next={lane:0,tag:ie.tag,payload:ie.payload,callback:null,next:null});e:{var dt=o,ct=ie;Oe=l;var Gt=h;switch(ct.tag){case 1:if(dt=ct.payload,typeof dt=="function"){Ue=dt.call(Gt,Ue,Oe);break e}Ue=dt;break e;case 3:dt.flags=dt.flags&-65537|128;case 0:if(dt=ct.payload,Oe=typeof dt=="function"?dt.call(Gt,Ue,Oe):dt,Oe==null)break e;Ue=m({},Ue,Oe);break e;case 2:Rs=!0}}Oe=ie.callback,Oe!==null&&(o.flags|=64,je&&(o.flags|=8192),je=C.callbacks,je===null?C.callbacks=[Oe]:je.push(Oe))}else je={lane:Oe,tag:ie.tag,payload:ie.payload,callback:ie.callback,next:null},ke===null?(Ee=ke=je,pe=Ue):ke=ke.next=je,K|=Oe;if(ie=ie.next,ie===null){if(ie=C.shared.pending,ie===null)break;je=ie,ie=je.next,je.next=null,C.lastBaseUpdate=je,C.shared.pending=null}}while(!0);ke===null&&(pe=Ue),C.baseState=pe,C.firstBaseUpdate=Ee,C.lastBaseUpdate=ke,P===null&&(C.shared.lanes=0),$s|=K,o.lanes=K,o.memoizedState=Ue}}function S3(o,l){if(typeof o!="function")throw Error(r(191,o));o.call(l)}function C3(o,l){var h=o.callbacks;if(h!==null)for(o.callbacks=null,o=0;o<h.length;o++)S3(h[o],l)}var mc=D(null),qm=D(0);function E3(o,l){o=jo,q(qm,o),q(mc,l),jo=o|l.baseLanes}function v0(){q(qm,jo),q(mc,mc.current)}function y0(){jo=qm.current,Y(mc),Y(qm)}var Ds=0,bt=null,Ht=null,Un=null,Gm=!1,pc=!1,ru=!1,Ym=0,ud=0,gc=null,eU=0;function Nn(){throw Error(r(321))}function b0(o,l){if(l===null)return!1;for(var h=0;h<l.length&&h<o.length;h++)if(!Nr(o[h],l[h]))return!1;return!0}function _0(o,l,h,y,C,P){return Ds=P,bt=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,W.H=o===null||o.memoizedState===null?l4:u4,ru=!1,P=h(y,C),ru=!1,pc&&(P=T3(l,h,y,C)),A3(o),P}function A3(o){W.H=Jm;var l=Ht!==null&&Ht.next!==null;if(Ds=0,Un=Ht=bt=null,Gm=!1,ud=0,gc=null,l)throw Error(r(300));o===null||nr||(o=o.dependencies,o!==null&&zm(o)&&(nr=!0))}function T3(o,l,h,y){bt=o;var C=0;do{if(pc&&(gc=null),ud=0,pc=!1,25<=C)throw Error(r(301));if(C+=1,Un=Ht=null,o.updateQueue!=null){var P=o.updateQueue;P.lastEffect=null,P.events=null,P.stores=null,P.memoCache!=null&&(P.memoCache.index=0)}W.H=sU,P=l(h,y)}while(pc);return P}function tU(){var o=W.H,l=o.useState()[0];return l=typeof l.then=="function"?cd(l):l,o=o.useState()[0],(Ht!==null?Ht.memoizedState:null)!==o&&(bt.flags|=1024),l}function x0(){var o=Ym!==0;return Ym=0,o}function w0(o,l,h){l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~h}function S0(o){if(Gm){for(o=o.memoizedState;o!==null;){var l=o.queue;l!==null&&(l.pending=null),o=o.next}Gm=!1}Ds=0,Un=Ht=bt=null,pc=!1,ud=Ym=0,gc=null}function Yr(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Un===null?bt.memoizedState=Un=o:Un=Un.next=o,Un}function Bn(){if(Ht===null){var o=bt.alternate;o=o!==null?o.memoizedState:null}else o=Ht.next;var l=Un===null?bt.memoizedState:Un.next;if(l!==null)Un=l,Ht=o;else{if(o===null)throw bt.alternate===null?Error(r(467)):Error(r(310));Ht=o,o={memoizedState:Ht.memoizedState,baseState:Ht.baseState,baseQueue:Ht.baseQueue,queue:Ht.queue,next:null},Un===null?bt.memoizedState=Un=o:Un=Un.next=o}return Un}function C0(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function cd(o){var l=ud;return ud+=1,gc===null&&(gc=[]),o=_3(gc,o,l),l=bt,(Un===null?l.memoizedState:Un.next)===null&&(l=l.alternate,W.H=l===null||l.memoizedState===null?l4:u4),o}function Wm(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return cd(o);if(o.$$typeof===O)return Er(o)}throw Error(r(438,String(o)))}function E0(o){var l=null,h=bt.updateQueue;if(h!==null&&(l=h.memoCache),l==null){var y=bt.alternate;y!==null&&(y=y.updateQueue,y!==null&&(y=y.memoCache,y!=null&&(l={data:y.data.map(function(C){return C.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),h===null&&(h=C0(),bt.updateQueue=h),h.memoCache=l,h=l.data[l.index],h===void 0)for(h=l.data[l.index]=Array(o),y=0;y<o;y++)h[y]=ee;return l.index++,h}function So(o,l){return typeof l=="function"?l(o):l}function Km(o){var l=Bn();return A0(l,Ht,o)}function A0(o,l,h){var y=o.queue;if(y===null)throw Error(r(311));y.lastRenderedReducer=h;var C=o.baseQueue,P=y.pending;if(P!==null){if(C!==null){var K=C.next;C.next=P.next,P.next=K}l.baseQueue=C=P,y.pending=null}if(P=o.baseState,C===null)o.memoizedState=P;else{l=C.next;var ie=K=null,pe=null,Ee=l,ke=!1;do{var Ue=Ee.lane&-536870913;if(Ue!==Ee.lane?(jt&Ue)===Ue:(Ds&Ue)===Ue){var Oe=Ee.revertLane;if(Oe===0)pe!==null&&(pe=pe.next={lane:0,revertLane:0,action:Ee.action,hasEagerState:Ee.hasEagerState,eagerState:Ee.eagerState,next:null}),Ue===dc&&(ke=!0);else if((Ds&Oe)===Oe){Ee=Ee.next,Oe===dc&&(ke=!0);continue}else Ue={lane:0,revertLane:Ee.revertLane,action:Ee.action,hasEagerState:Ee.hasEagerState,eagerState:Ee.eagerState,next:null},pe===null?(ie=pe=Ue,K=P):pe=pe.next=Ue,bt.lanes|=Oe,$s|=Oe;Ue=Ee.action,ru&&h(P,Ue),P=Ee.hasEagerState?Ee.eagerState:h(P,Ue)}else Oe={lane:Ue,revertLane:Ee.revertLane,action:Ee.action,hasEagerState:Ee.hasEagerState,eagerState:Ee.eagerState,next:null},pe===null?(ie=pe=Oe,K=P):pe=pe.next=Oe,bt.lanes|=Ue,$s|=Ue;Ee=Ee.next}while(Ee!==null&&Ee!==l);if(pe===null?K=P:pe.next=ie,!Nr(P,o.memoizedState)&&(nr=!0,ke&&(h=hc,h!==null)))throw h;o.memoizedState=P,o.baseState=K,o.baseQueue=pe,y.lastRenderedState=P}return C===null&&(y.lanes=0),[o.memoizedState,y.dispatch]}function T0(o){var l=Bn(),h=l.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=o;var y=h.dispatch,C=h.pending,P=l.memoizedState;if(C!==null){h.pending=null;var K=C=C.next;do P=o(P,K.action),K=K.next;while(K!==C);Nr(P,l.memoizedState)||(nr=!0),l.memoizedState=P,l.baseQueue===null&&(l.baseState=P),h.lastRenderedState=P}return[P,y]}function O3(o,l,h){var y=bt,C=Bn(),P=ht;if(P){if(h===void 0)throw Error(r(407));h=h()}else h=l();var K=!Nr((Ht||C).memoizedState,h);K&&(C.memoizedState=h,nr=!0),C=C.queue;var ie=M3.bind(null,y,C,o);if(fd(2048,8,ie,[o]),C.getSnapshot!==l||K||Un!==null&&Un.memoizedState.tag&1){if(y.flags|=2048,vc(9,Zm(),P3.bind(null,y,C,h,l),null),nn===null)throw Error(r(349));P||(Ds&124)!==0||j3(y,l,h)}return h}function j3(o,l,h){o.flags|=16384,o={getSnapshot:l,value:h},l=bt.updateQueue,l===null?(l=C0(),bt.updateQueue=l,l.stores=[o]):(h=l.stores,h===null?l.stores=[o]:h.push(o))}function P3(o,l,h,y){l.value=h,l.getSnapshot=y,R3(l)&&N3(o)}function M3(o,l,h){return h(function(){R3(l)&&N3(o)})}function R3(o){var l=o.getSnapshot;o=o.value;try{var h=l();return!Nr(o,h)}catch{return!0}}function N3(o){var l=Os(o,2);l!==null&&mi(l,o,2)}function O0(o){var l=Yr();if(typeof o=="function"){var h=o;if(o=h(),ru){Fe(!0);try{h()}finally{Fe(!1)}}}return l.memoizedState=l.baseState=o,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:So,lastRenderedState:o},l}function L3(o,l,h,y){return o.baseState=h,A0(o,Ht,typeof y=="function"?y:So)}function nU(o,l,h,y,C){if(Qm(o))throw Error(r(485));if(o=l.action,o!==null){var P={payload:C,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(K){P.listeners.push(K)}};W.T!==null?h(!0):P.isTransition=!1,y(P),h=l.pending,h===null?(P.next=l.pending=P,D3(l,P)):(P.next=h.next,l.pending=h.next=P)}}function D3(o,l){var h=l.action,y=l.payload,C=o.state;if(l.isTransition){var P=W.T,K={};W.T=K;try{var ie=h(C,y),pe=W.S;pe!==null&&pe(K,ie),k3(o,l,ie)}catch(Ee){j0(o,l,Ee)}finally{W.T=P}}else try{P=h(C,y),k3(o,l,P)}catch(Ee){j0(o,l,Ee)}}function k3(o,l,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(y){I3(o,l,y)},function(y){return j0(o,l,y)}):I3(o,l,h)}function I3(o,l,h){l.status="fulfilled",l.value=h,U3(l),o.state=h,l=o.pending,l!==null&&(h=l.next,h===l?o.pending=null:(h=h.next,l.next=h,D3(o,h)))}function j0(o,l,h){var y=o.pending;if(o.pending=null,y!==null){y=y.next;do l.status="rejected",l.reason=h,U3(l),l=l.next;while(l!==y)}o.action=null}function U3(o){o=o.listeners;for(var l=0;l<o.length;l++)(0,o[l])()}function B3(o,l){return l}function z3(o,l){if(ht){var h=nn.formState;if(h!==null){e:{var y=bt;if(ht){if(rt){t:{for(var C=rt,P=_n;C.nodeType!==8;){if(!P){C=null;break t}if(C=la(C.nextSibling),C===null){C=null;break t}}P=C.data,C=P==="F!"||P==="F"?C:null}if(C){rt=la(C.nextSibling),y=C.data==="F!";break e}}Gr(y)}y=!1}y&&(l=h[0])}}return h=Yr(),h.memoizedState=h.baseState=l,y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:B3,lastRenderedState:l},h.queue=y,h=a4.bind(null,bt,y),y.dispatch=h,y=O0(!1),P=L0.bind(null,bt,!1,y.queue),y=Yr(),C={state:l,dispatch:null,action:o,pending:null},y.queue=C,h=nU.bind(null,bt,C,P,h),C.dispatch=h,y.memoizedState=o,[l,h,!1]}function F3(o){var l=Bn();return $3(l,Ht,o)}function $3(o,l,h){if(l=A0(o,l,B3)[0],o=Km(So)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var y=cd(l)}catch(K){throw K===id?Vm:K}else y=l;l=Bn();var C=l.queue,P=C.dispatch;return h!==l.memoizedState&&(bt.flags|=2048,vc(9,Zm(),rU.bind(null,C,h),null)),[y,P,o]}function rU(o,l){o.action=l}function V3(o){var l=Bn(),h=Ht;if(h!==null)return $3(l,h,o);Bn(),l=l.memoizedState,h=Bn();var y=h.queue.dispatch;return h.memoizedState=o,[l,y,!1]}function vc(o,l,h,y){return o={tag:o,create:h,deps:y,inst:l,next:null},l=bt.updateQueue,l===null&&(l=C0(),bt.updateQueue=l),h=l.lastEffect,h===null?l.lastEffect=o.next=o:(y=h.next,h.next=o,o.next=y,l.lastEffect=o),o}function Zm(){return{destroy:void 0,resource:void 0}}function H3(){return Bn().memoizedState}function Xm(o,l,h,y){var C=Yr();y=y===void 0?null:y,bt.flags|=o,C.memoizedState=vc(1|l,Zm(),h,y)}function fd(o,l,h,y){var C=Bn();y=y===void 0?null:y;var P=C.memoizedState.inst;Ht!==null&&y!==null&&b0(y,Ht.memoizedState.deps)?C.memoizedState=vc(l,P,h,y):(bt.flags|=o,C.memoizedState=vc(1|l,P,h,y))}function q3(o,l){Xm(8390656,8,o,l)}function G3(o,l){fd(2048,8,o,l)}function Y3(o,l){return fd(4,2,o,l)}function W3(o,l){return fd(4,4,o,l)}function K3(o,l){if(typeof l=="function"){o=o();var h=l(o);return function(){typeof h=="function"?h():l(null)}}if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function Z3(o,l,h){h=h!=null?h.concat([o]):null,fd(4,4,K3.bind(null,l,o),h)}function P0(){}function X3(o,l){var h=Bn();l=l===void 0?null:l;var y=h.memoizedState;return l!==null&&b0(l,y[1])?y[0]:(h.memoizedState=[o,l],o)}function Q3(o,l){var h=Bn();l=l===void 0?null:l;var y=h.memoizedState;if(l!==null&&b0(l,y[1]))return y[0];if(y=o(),ru){Fe(!0);try{o()}finally{Fe(!1)}}return h.memoizedState=[y,l],y}function M0(o,l,h){return h===void 0||(Ds&1073741824)!==0?o.memoizedState=l:(o.memoizedState=h,o=tE(),bt.lanes|=o,$s|=o,h)}function J3(o,l,h,y){return Nr(h,l)?h:mc.current!==null?(o=M0(o,h,y),Nr(o,l)||(nr=!0),o):(Ds&42)===0?(nr=!0,o.memoizedState=h):(o=tE(),bt.lanes|=o,$s|=o,l)}function e4(o,l,h,y,C){var P=B.p;B.p=P!==0&&8>P?P:8;var K=W.T,ie={};W.T=ie,L0(o,!1,l,h);try{var pe=C(),Ee=W.S;if(Ee!==null&&Ee(ie,pe),pe!==null&&typeof pe=="object"&&typeof pe.then=="function"){var ke=J9(pe,y);dd(o,l,ke,hi(o))}else dd(o,l,y,hi(o))}catch(Ue){dd(o,l,{then:function(){},status:"rejected",reason:Ue},hi())}finally{B.p=P,W.T=K}}function iU(){}function R0(o,l,h,y){if(o.tag!==5)throw Error(r(476));var C=t4(o).queue;e4(o,C,l,I,h===null?iU:function(){return n4(o),h(y)})}function t4(o){var l=o.memoizedState;if(l!==null)return l;l={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:So,lastRenderedState:I},next:null};var h={};return l.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:So,lastRenderedState:h},next:null},o.memoizedState=l,o=o.alternate,o!==null&&(o.memoizedState=l),l}function n4(o){var l=t4(o).next.queue;dd(o,l,{},hi())}function N0(){return Er(Pd)}function r4(){return Bn().memoizedState}function i4(){return Bn().memoizedState}function aU(o){for(var l=o.return;l!==null;){switch(l.tag){case 24:case 3:var h=hi();o=Ns(h);var y=Ls(l,o,h);y!==null&&(mi(y,l,h),od(y,l,h)),l={cache:u0()},o.payload=l;return}l=l.return}}function oU(o,l,h){var y=hi();h={lane:y,revertLane:0,action:h,hasEagerState:!1,eagerState:null,next:null},Qm(o)?o4(l,h):(h=_o(o,l,h,y),h!==null&&(mi(h,o,y),s4(h,l,y)))}function a4(o,l,h){var y=hi();dd(o,l,h,y)}function dd(o,l,h,y){var C={lane:y,revertLane:0,action:h,hasEagerState:!1,eagerState:null,next:null};if(Qm(o))o4(l,C);else{var P=o.alternate;if(o.lanes===0&&(P===null||P.lanes===0)&&(P=l.lastRenderedReducer,P!==null))try{var K=l.lastRenderedState,ie=P(K,h);if(C.hasEagerState=!0,C.eagerState=ie,Nr(ie,K))return Kl(o,l,C,0),nn===null&&Wl(),!1}catch{}finally{}if(h=_o(o,l,C,y),h!==null)return mi(h,o,y),s4(h,l,y),!0}return!1}function L0(o,l,h,y){if(y={lane:2,revertLane:d1(),action:y,hasEagerState:!1,eagerState:null,next:null},Qm(o)){if(l)throw Error(r(479))}else l=_o(o,h,y,2),l!==null&&mi(l,o,2)}function Qm(o){var l=o.alternate;return o===bt||l!==null&&l===bt}function o4(o,l){pc=Gm=!0;var h=o.pending;h===null?l.next=l:(l.next=h.next,h.next=l),o.pending=l}function s4(o,l,h){if((h&4194048)!==0){var y=l.lanes;y&=o.pendingLanes,h|=y,l.lanes=h,ja(o,h)}}var Jm={readContext:Er,use:Wm,useCallback:Nn,useContext:Nn,useEffect:Nn,useImperativeHandle:Nn,useLayoutEffect:Nn,useInsertionEffect:Nn,useMemo:Nn,useReducer:Nn,useRef:Nn,useState:Nn,useDebugValue:Nn,useDeferredValue:Nn,useTransition:Nn,useSyncExternalStore:Nn,useId:Nn,useHostTransitionStatus:Nn,useFormState:Nn,useActionState:Nn,useOptimistic:Nn,useMemoCache:Nn,useCacheRefresh:Nn},l4={readContext:Er,use:Wm,useCallback:function(o,l){return Yr().memoizedState=[o,l===void 0?null:l],o},useContext:Er,useEffect:q3,useImperativeHandle:function(o,l,h){h=h!=null?h.concat([o]):null,Xm(4194308,4,K3.bind(null,l,o),h)},useLayoutEffect:function(o,l){return Xm(4194308,4,o,l)},useInsertionEffect:function(o,l){Xm(4,2,o,l)},useMemo:function(o,l){var h=Yr();l=l===void 0?null:l;var y=o();if(ru){Fe(!0);try{o()}finally{Fe(!1)}}return h.memoizedState=[y,l],y},useReducer:function(o,l,h){var y=Yr();if(h!==void 0){var C=h(l);if(ru){Fe(!0);try{h(l)}finally{Fe(!1)}}}else C=l;return y.memoizedState=y.baseState=C,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:C},y.queue=o,o=o.dispatch=oU.bind(null,bt,o),[y.memoizedState,o]},useRef:function(o){var l=Yr();return o={current:o},l.memoizedState=o},useState:function(o){o=O0(o);var l=o.queue,h=a4.bind(null,bt,l);return l.dispatch=h,[o.memoizedState,h]},useDebugValue:P0,useDeferredValue:function(o,l){var h=Yr();return M0(h,o,l)},useTransition:function(){var o=O0(!1);return o=e4.bind(null,bt,o.queue,!0,!1),Yr().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,l,h){var y=bt,C=Yr();if(ht){if(h===void 0)throw Error(r(407));h=h()}else{if(h=l(),nn===null)throw Error(r(349));(jt&124)!==0||j3(y,l,h)}C.memoizedState=h;var P={value:h,getSnapshot:l};return C.queue=P,q3(M3.bind(null,y,P,o),[o]),y.flags|=2048,vc(9,Zm(),P3.bind(null,y,P,h,l),null),h},useId:function(){var o=Yr(),l=nn.identifierPrefix;if(ht){var h=me,y=te;h=(y&~(1<<32-Ve(y)-1)).toString(32)+h,l="«"+l+"R"+h,h=Ym++,0<h&&(l+="H"+h.toString(32)),l+="»"}else h=eU++,l="«"+l+"r"+h.toString(32)+"»";return o.memoizedState=l},useHostTransitionStatus:N0,useFormState:z3,useActionState:z3,useOptimistic:function(o){var l=Yr();l.memoizedState=l.baseState=o;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=h,l=L0.bind(null,bt,!0,h),h.dispatch=l,[o,l]},useMemoCache:E0,useCacheRefresh:function(){return Yr().memoizedState=aU.bind(null,bt)}},u4={readContext:Er,use:Wm,useCallback:X3,useContext:Er,useEffect:G3,useImperativeHandle:Z3,useInsertionEffect:Y3,useLayoutEffect:W3,useMemo:Q3,useReducer:Km,useRef:H3,useState:function(){return Km(So)},useDebugValue:P0,useDeferredValue:function(o,l){var h=Bn();return J3(h,Ht.memoizedState,o,l)},useTransition:function(){var o=Km(So)[0],l=Bn().memoizedState;return[typeof o=="boolean"?o:cd(o),l]},useSyncExternalStore:O3,useId:r4,useHostTransitionStatus:N0,useFormState:F3,useActionState:F3,useOptimistic:function(o,l){var h=Bn();return L3(h,Ht,o,l)},useMemoCache:E0,useCacheRefresh:i4},sU={readContext:Er,use:Wm,useCallback:X3,useContext:Er,useEffect:G3,useImperativeHandle:Z3,useInsertionEffect:Y3,useLayoutEffect:W3,useMemo:Q3,useReducer:T0,useRef:H3,useState:function(){return T0(So)},useDebugValue:P0,useDeferredValue:function(o,l){var h=Bn();return Ht===null?M0(h,o,l):J3(h,Ht.memoizedState,o,l)},useTransition:function(){var o=T0(So)[0],l=Bn().memoizedState;return[typeof o=="boolean"?o:cd(o),l]},useSyncExternalStore:O3,useId:r4,useHostTransitionStatus:N0,useFormState:V3,useActionState:V3,useOptimistic:function(o,l){var h=Bn();return Ht!==null?L3(h,Ht,o,l):(h.baseState=o,[o,h.queue.dispatch])},useMemoCache:E0,useCacheRefresh:i4},yc=null,hd=0;function ep(o){var l=hd;return hd+=1,yc===null&&(yc=[]),_3(yc,o,l)}function md(o,l){l=l.props.ref,o.ref=l!==void 0?l:null}function tp(o,l){throw l.$$typeof===p?Error(r(525)):(o=Object.prototype.toString.call(l),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o)))}function c4(o){var l=o._init;return l(o._payload)}function f4(o){function l(xe,ye){if(o){var Ce=xe.deletions;Ce===null?(xe.deletions=[ye],xe.flags|=16):Ce.push(ye)}}function h(xe,ye){if(!o)return null;for(;ye!==null;)l(xe,ye),ye=ye.sibling;return null}function y(xe){for(var ye=new Map;xe!==null;)xe.key!==null?ye.set(xe.key,xe):ye.set(xe.index,xe),xe=xe.sibling;return ye}function C(xe,ye){return xe=zi(xe,ye),xe.index=0,xe.sibling=null,xe}function P(xe,ye,Ce){return xe.index=Ce,o?(Ce=xe.alternate,Ce!==null?(Ce=Ce.index,Ce<ye?(xe.flags|=67108866,ye):Ce):(xe.flags|=67108866,ye)):(xe.flags|=1048576,ye)}function K(xe){return o&&xe.alternate===null&&(xe.flags|=67108866),xe}function ie(xe,ye,Ce,Ie){return ye===null||ye.tag!==6?(ye=td(Ce,xe.mode,Ie),ye.return=xe,ye):(ye=C(ye,Ce),ye.return=xe,ye)}function pe(xe,ye,Ce,Ie){var nt=Ce.type;return nt===w?ke(xe,ye,Ce.props.children,Ie,Ce.key):ye!==null&&(ye.elementType===nt||typeof nt=="object"&&nt!==null&&nt.$$typeof===X&&c4(nt)===ye.type)?(ye=C(ye,Ce.props),md(ye,Ce),ye.return=xe,ye):(ye=Xl(Ce.type,Ce.key,Ce.props,null,xe.mode,Ie),md(ye,Ce),ye.return=xe,ye)}function Ee(xe,ye,Ce,Ie){return ye===null||ye.tag!==4||ye.stateNode.containerInfo!==Ce.containerInfo||ye.stateNode.implementation!==Ce.implementation?(ye=cc(Ce,xe.mode,Ie),ye.return=xe,ye):(ye=C(ye,Ce.children||[]),ye.return=xe,ye)}function ke(xe,ye,Ce,Ie,nt){return ye===null||ye.tag!==7?(ye=ka(Ce,xe.mode,Ie,nt),ye.return=xe,ye):(ye=C(ye,Ce),ye.return=xe,ye)}function Ue(xe,ye,Ce){if(typeof ye=="string"&&ye!==""||typeof ye=="number"||typeof ye=="bigint")return ye=td(""+ye,xe.mode,Ce),ye.return=xe,ye;if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case b:return Ce=Xl(ye.type,ye.key,ye.props,null,xe.mode,Ce),md(Ce,ye),Ce.return=xe,Ce;case _:return ye=cc(ye,xe.mode,Ce),ye.return=xe,ye;case X:var Ie=ye._init;return ye=Ie(ye._payload),Ue(xe,ye,Ce)}if(se(ye)||ne(ye))return ye=ka(ye,xe.mode,Ce,null),ye.return=xe,ye;if(typeof ye.then=="function")return Ue(xe,ep(ye),Ce);if(ye.$$typeof===O)return Ue(xe,Fm(xe,ye),Ce);tp(xe,ye)}return null}function Oe(xe,ye,Ce,Ie){var nt=ye!==null?ye.key:null;if(typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint")return nt!==null?null:ie(xe,ye,""+Ce,Ie);if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case b:return Ce.key===nt?pe(xe,ye,Ce,Ie):null;case _:return Ce.key===nt?Ee(xe,ye,Ce,Ie):null;case X:return nt=Ce._init,Ce=nt(Ce._payload),Oe(xe,ye,Ce,Ie)}if(se(Ce)||ne(Ce))return nt!==null?null:ke(xe,ye,Ce,Ie,null);if(typeof Ce.then=="function")return Oe(xe,ye,ep(Ce),Ie);if(Ce.$$typeof===O)return Oe(xe,ye,Fm(xe,Ce),Ie);tp(xe,Ce)}return null}function je(xe,ye,Ce,Ie,nt){if(typeof Ie=="string"&&Ie!==""||typeof Ie=="number"||typeof Ie=="bigint")return xe=xe.get(Ce)||null,ie(ye,xe,""+Ie,nt);if(typeof Ie=="object"&&Ie!==null){switch(Ie.$$typeof){case b:return xe=xe.get(Ie.key===null?Ce:Ie.key)||null,pe(ye,xe,Ie,nt);case _:return xe=xe.get(Ie.key===null?Ce:Ie.key)||null,Ee(ye,xe,Ie,nt);case X:var xt=Ie._init;return Ie=xt(Ie._payload),je(xe,ye,Ce,Ie,nt)}if(se(Ie)||ne(Ie))return xe=xe.get(Ce)||null,ke(ye,xe,Ie,nt,null);if(typeof Ie.then=="function")return je(xe,ye,Ce,ep(Ie),nt);if(Ie.$$typeof===O)return je(xe,ye,Ce,Fm(ye,Ie),nt);tp(ye,Ie)}return null}function dt(xe,ye,Ce,Ie){for(var nt=null,xt=null,st=ye,ft=ye=0,ir=null;st!==null&&ft<Ce.length;ft++){st.index>ft?(ir=st,st=null):ir=st.sibling;var Ut=Oe(xe,st,Ce[ft],Ie);if(Ut===null){st===null&&(st=ir);break}o&&st&&Ut.alternate===null&&l(xe,st),ye=P(Ut,ye,ft),xt===null?nt=Ut:xt.sibling=Ut,xt=Ut,st=ir}if(ft===Ce.length)return h(xe,st),ht&&Se(xe,ft),nt;if(st===null){for(;ft<Ce.length;ft++)st=Ue(xe,Ce[ft],Ie),st!==null&&(ye=P(st,ye,ft),xt===null?nt=st:xt.sibling=st,xt=st);return ht&&Se(xe,ft),nt}for(st=y(st);ft<Ce.length;ft++)ir=je(st,xe,ft,Ce[ft],Ie),ir!==null&&(o&&ir.alternate!==null&&st.delete(ir.key===null?ft:ir.key),ye=P(ir,ye,ft),xt===null?nt=ir:xt.sibling=ir,xt=ir);return o&&st.forEach(function(Xs){return l(xe,Xs)}),ht&&Se(xe,ft),nt}function ct(xe,ye,Ce,Ie){if(Ce==null)throw Error(r(151));for(var nt=null,xt=null,st=ye,ft=ye=0,ir=null,Ut=Ce.next();st!==null&&!Ut.done;ft++,Ut=Ce.next()){st.index>ft?(ir=st,st=null):ir=st.sibling;var Xs=Oe(xe,st,Ut.value,Ie);if(Xs===null){st===null&&(st=ir);break}o&&st&&Xs.alternate===null&&l(xe,st),ye=P(Xs,ye,ft),xt===null?nt=Xs:xt.sibling=Xs,xt=Xs,st=ir}if(Ut.done)return h(xe,st),ht&&Se(xe,ft),nt;if(st===null){for(;!Ut.done;ft++,Ut=Ce.next())Ut=Ue(xe,Ut.value,Ie),Ut!==null&&(ye=P(Ut,ye,ft),xt===null?nt=Ut:xt.sibling=Ut,xt=Ut);return ht&&Se(xe,ft),nt}for(st=y(st);!Ut.done;ft++,Ut=Ce.next())Ut=je(st,xe,ft,Ut.value,Ie),Ut!==null&&(o&&Ut.alternate!==null&&st.delete(Ut.key===null?ft:Ut.key),ye=P(Ut,ye,ft),xt===null?nt=Ut:xt.sibling=Ut,xt=Ut);return o&&st.forEach(function(lB){return l(xe,lB)}),ht&&Se(xe,ft),nt}function Gt(xe,ye,Ce,Ie){if(typeof Ce=="object"&&Ce!==null&&Ce.type===w&&Ce.key===null&&(Ce=Ce.props.children),typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case b:e:{for(var nt=Ce.key;ye!==null;){if(ye.key===nt){if(nt=Ce.type,nt===w){if(ye.tag===7){h(xe,ye.sibling),Ie=C(ye,Ce.props.children),Ie.return=xe,xe=Ie;break e}}else if(ye.elementType===nt||typeof nt=="object"&&nt!==null&&nt.$$typeof===X&&c4(nt)===ye.type){h(xe,ye.sibling),Ie=C(ye,Ce.props),md(Ie,Ce),Ie.return=xe,xe=Ie;break e}h(xe,ye);break}else l(xe,ye);ye=ye.sibling}Ce.type===w?(Ie=ka(Ce.props.children,xe.mode,Ie,Ce.key),Ie.return=xe,xe=Ie):(Ie=Xl(Ce.type,Ce.key,Ce.props,null,xe.mode,Ie),md(Ie,Ce),Ie.return=xe,xe=Ie)}return K(xe);case _:e:{for(nt=Ce.key;ye!==null;){if(ye.key===nt)if(ye.tag===4&&ye.stateNode.containerInfo===Ce.containerInfo&&ye.stateNode.implementation===Ce.implementation){h(xe,ye.sibling),Ie=C(ye,Ce.children||[]),Ie.return=xe,xe=Ie;break e}else{h(xe,ye);break}else l(xe,ye);ye=ye.sibling}Ie=cc(Ce,xe.mode,Ie),Ie.return=xe,xe=Ie}return K(xe);case X:return nt=Ce._init,Ce=nt(Ce._payload),Gt(xe,ye,Ce,Ie)}if(se(Ce))return dt(xe,ye,Ce,Ie);if(ne(Ce)){if(nt=ne(Ce),typeof nt!="function")throw Error(r(150));return Ce=nt.call(Ce),ct(xe,ye,Ce,Ie)}if(typeof Ce.then=="function")return Gt(xe,ye,ep(Ce),Ie);if(Ce.$$typeof===O)return Gt(xe,ye,Fm(xe,Ce),Ie);tp(xe,Ce)}return typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint"?(Ce=""+Ce,ye!==null&&ye.tag===6?(h(xe,ye.sibling),Ie=C(ye,Ce),Ie.return=xe,xe=Ie):(h(xe,ye),Ie=td(Ce,xe.mode,Ie),Ie.return=xe,xe=Ie),K(xe)):h(xe,ye)}return function(xe,ye,Ce,Ie){try{hd=0;var nt=Gt(xe,ye,Ce,Ie);return yc=null,nt}catch(st){if(st===id||st===Vm)throw st;var xt=Ir(29,st,null,xe.mode);return xt.lanes=Ie,xt.return=xe,xt}finally{}}}var bc=f4(!0),d4=f4(!1),$i=D(null),Ua=null;function ks(o){var l=o.alternate;q(qn,qn.current&1),q($i,o),Ua===null&&(l===null||mc.current!==null||l.memoizedState!==null)&&(Ua=o)}function h4(o){if(o.tag===22){if(q(qn,qn.current),q($i,o),Ua===null){var l=o.alternate;l!==null&&l.memoizedState!==null&&(Ua=o)}}else Is()}function Is(){q(qn,qn.current),q($i,$i.current)}function Co(o){Y($i),Ua===o&&(Ua=null),Y(qn)}var qn=D(0);function np(o){for(var l=o;l!==null;){if(l.tag===13){var h=l.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||h.data==="$?"||C1(h)))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}function D0(o,l,h,y){l=o.memoizedState,h=h(y,l),h=h==null?l:m({},l,h),o.memoizedState=h,o.lanes===0&&(o.updateQueue.baseState=h)}var k0={enqueueSetState:function(o,l,h){o=o._reactInternals;var y=hi(),C=Ns(y);C.payload=l,h!=null&&(C.callback=h),l=Ls(o,C,y),l!==null&&(mi(l,o,y),od(l,o,y))},enqueueReplaceState:function(o,l,h){o=o._reactInternals;var y=hi(),C=Ns(y);C.tag=1,C.payload=l,h!=null&&(C.callback=h),l=Ls(o,C,y),l!==null&&(mi(l,o,y),od(l,o,y))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var h=hi(),y=Ns(h);y.tag=2,l!=null&&(y.callback=l),l=Ls(o,y,h),l!==null&&(mi(l,o,h),od(l,o,h))}};function m4(o,l,h,y,C,P,K){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(y,P,K):l.prototype&&l.prototype.isPureReactComponent?!Lr(h,y)||!Lr(C,P):!0}function p4(o,l,h,y){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(h,y),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(h,y),l.state!==o&&k0.enqueueReplaceState(l,l.state,null)}function iu(o,l){var h=l;if("ref"in l){h={};for(var y in l)y!=="ref"&&(h[y]=l[y])}if(o=o.defaultProps){h===l&&(h=m({},h));for(var C in o)h[C]===void 0&&(h[C]=o[C])}return h}var rp=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)};function g4(o){rp(o)}function v4(o){console.error(o)}function y4(o){rp(o)}function ip(o,l){try{var h=o.onUncaughtError;h(l.value,{componentStack:l.stack})}catch(y){setTimeout(function(){throw y})}}function b4(o,l,h){try{var y=o.onCaughtError;y(h.value,{componentStack:h.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(C){setTimeout(function(){throw C})}}function I0(o,l,h){return h=Ns(h),h.tag=3,h.payload={element:null},h.callback=function(){ip(o,l)},h}function _4(o){return o=Ns(o),o.tag=3,o}function x4(o,l,h,y){var C=h.type.getDerivedStateFromError;if(typeof C=="function"){var P=y.value;o.payload=function(){return C(P)},o.callback=function(){b4(l,h,y)}}var K=h.stateNode;K!==null&&typeof K.componentDidCatch=="function"&&(o.callback=function(){b4(l,h,y),typeof C!="function"&&(Vs===null?Vs=new Set([this]):Vs.add(this));var ie=y.stack;this.componentDidCatch(y.value,{componentStack:ie!==null?ie:""})})}function lU(o,l,h,y,C){if(h.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){if(l=h.alternate,l!==null&&eu(l,h,C,!0),h=$i.current,h!==null){switch(h.tag){case 13:return Ua===null?s1():h.alternate===null&&En===0&&(En=3),h.flags&=-257,h.flags|=65536,h.lanes=C,y===d0?h.flags|=16384:(l=h.updateQueue,l===null?h.updateQueue=new Set([y]):l.add(y),u1(o,y,C)),!1;case 22:return h.flags|=65536,y===d0?h.flags|=16384:(l=h.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([y])},h.updateQueue=l):(h=l.retryQueue,h===null?l.retryQueue=new Set([y]):h.add(y)),u1(o,y,C)),!1}throw Error(r(435,h.tag))}return u1(o,y,C),s1(),!1}if(ht)return l=$i.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=C,y!==tr&&(o=Error(r(422),{cause:y}),Ms(Dr(o,h)))):(y!==tr&&(l=Error(r(423),{cause:y}),Ms(Dr(l,h))),o=o.current.alternate,o.flags|=65536,C&=-C,o.lanes|=C,y=Dr(y,h),C=I0(o.stateNode,y,C),p0(o,C),En!==4&&(En=2)),!1;var P=Error(r(520),{cause:y});if(P=Dr(P,h),xd===null?xd=[P]:xd.push(P),En!==4&&(En=2),l===null)return!0;y=Dr(y,h),h=l;do{switch(h.tag){case 3:return h.flags|=65536,o=C&-C,h.lanes|=o,o=I0(h.stateNode,y,o),p0(h,o),!1;case 1:if(l=h.type,P=h.stateNode,(h.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||P!==null&&typeof P.componentDidCatch=="function"&&(Vs===null||!Vs.has(P))))return h.flags|=65536,C&=-C,h.lanes|=C,C=_4(C),x4(C,o,h,y),p0(h,C),!1}h=h.return}while(h!==null);return!1}var w4=Error(r(461)),nr=!1;function dr(o,l,h,y){l.child=o===null?d4(l,null,h,y):bc(l,o.child,h,y)}function S4(o,l,h,y,C){h=h.render;var P=l.ref;if("ref"in y){var K={};for(var ie in y)ie!=="ref"&&(K[ie]=y[ie])}else K=y;return tu(l),y=_0(o,l,h,K,P,C),ie=x0(),o!==null&&!nr?(w0(o,l,C),Eo(o,l,C)):(ht&&ie&&$e(l),l.flags|=1,dr(o,l,y,C),l.child)}function C4(o,l,h,y,C){if(o===null){var P=h.type;return typeof P=="function"&&!uc(P)&&P.defaultProps===void 0&&h.compare===null?(l.tag=15,l.type=P,E4(o,l,P,y,C)):(o=Xl(h.type,null,y,l,l.mode,C),o.ref=l.ref,o.return=l,l.child=o)}if(P=o.child,!q0(o,C)){var K=P.memoizedProps;if(h=h.compare,h=h!==null?h:Lr,h(K,y)&&o.ref===l.ref)return Eo(o,l,C)}return l.flags|=1,o=zi(P,y),o.ref=l.ref,o.return=l,l.child=o}function E4(o,l,h,y,C){if(o!==null){var P=o.memoizedProps;if(Lr(P,y)&&o.ref===l.ref)if(nr=!1,l.pendingProps=y=P,q0(o,C))(o.flags&131072)!==0&&(nr=!0);else return l.lanes=o.lanes,Eo(o,l,C)}return U0(o,l,h,y,C)}function A4(o,l,h){var y=l.pendingProps,C=y.children,P=o!==null?o.memoizedState:null;if(y.mode==="hidden"){if((l.flags&128)!==0){if(y=P!==null?P.baseLanes|h:h,o!==null){for(C=l.child=o.child,P=0;C!==null;)P=P|C.lanes|C.childLanes,C=C.sibling;l.childLanes=P&~y}else l.childLanes=0,l.child=null;return T4(o,l,y,h)}if((h&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},o!==null&&$m(l,P!==null?P.cachePool:null),P!==null?E3(l,P):v0(),h4(l);else return l.lanes=l.childLanes=536870912,T4(o,l,P!==null?P.baseLanes|h:h,h)}else P!==null?($m(l,P.cachePool),E3(l,P),Is(),l.memoizedState=null):(o!==null&&$m(l,null),v0(),Is());return dr(o,l,C,h),l.child}function T4(o,l,h,y){var C=f0();return C=C===null?null:{parent:Hn._currentValue,pool:C},l.memoizedState={baseLanes:h,cachePool:C},o!==null&&$m(l,null),v0(),h4(l),o!==null&&eu(o,l,y,!0),null}function ap(o,l){var h=l.ref;if(h===null)o!==null&&o.ref!==null&&(l.flags|=4194816);else{if(typeof h!="function"&&typeof h!="object")throw Error(r(284));(o===null||o.ref!==h)&&(l.flags|=4194816)}}function U0(o,l,h,y,C){return tu(l),h=_0(o,l,h,y,void 0,C),y=x0(),o!==null&&!nr?(w0(o,l,C),Eo(o,l,C)):(ht&&y&&$e(l),l.flags|=1,dr(o,l,h,C),l.child)}function O4(o,l,h,y,C,P){return tu(l),l.updateQueue=null,h=T3(l,y,h,C),A3(o),y=x0(),o!==null&&!nr?(w0(o,l,P),Eo(o,l,P)):(ht&&y&&$e(l),l.flags|=1,dr(o,l,h,P),l.child)}function j4(o,l,h,y,C){if(tu(l),l.stateNode===null){var P=xo,K=h.contextType;typeof K=="object"&&K!==null&&(P=Er(K)),P=new h(y,P),l.memoizedState=P.state!==null&&P.state!==void 0?P.state:null,P.updater=k0,l.stateNode=P,P._reactInternals=l,P=l.stateNode,P.props=y,P.state=l.memoizedState,P.refs={},h0(l),K=h.contextType,P.context=typeof K=="object"&&K!==null?Er(K):xo,P.state=l.memoizedState,K=h.getDerivedStateFromProps,typeof K=="function"&&(D0(l,h,K,y),P.state=l.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof P.getSnapshotBeforeUpdate=="function"||typeof P.UNSAFE_componentWillMount!="function"&&typeof P.componentWillMount!="function"||(K=P.state,typeof P.componentWillMount=="function"&&P.componentWillMount(),typeof P.UNSAFE_componentWillMount=="function"&&P.UNSAFE_componentWillMount(),K!==P.state&&k0.enqueueReplaceState(P,P.state,null),ld(l,y,P,C),sd(),P.state=l.memoizedState),typeof P.componentDidMount=="function"&&(l.flags|=4194308),y=!0}else if(o===null){P=l.stateNode;var ie=l.memoizedProps,pe=iu(h,ie);P.props=pe;var Ee=P.context,ke=h.contextType;K=xo,typeof ke=="object"&&ke!==null&&(K=Er(ke));var Ue=h.getDerivedStateFromProps;ke=typeof Ue=="function"||typeof P.getSnapshotBeforeUpdate=="function",ie=l.pendingProps!==ie,ke||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(ie||Ee!==K)&&p4(l,P,y,K),Rs=!1;var Oe=l.memoizedState;P.state=Oe,ld(l,y,P,C),sd(),Ee=l.memoizedState,ie||Oe!==Ee||Rs?(typeof Ue=="function"&&(D0(l,h,Ue,y),Ee=l.memoizedState),(pe=Rs||m4(l,h,pe,y,Oe,Ee,K))?(ke||typeof P.UNSAFE_componentWillMount!="function"&&typeof P.componentWillMount!="function"||(typeof P.componentWillMount=="function"&&P.componentWillMount(),typeof P.UNSAFE_componentWillMount=="function"&&P.UNSAFE_componentWillMount()),typeof P.componentDidMount=="function"&&(l.flags|=4194308)):(typeof P.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=y,l.memoizedState=Ee),P.props=y,P.state=Ee,P.context=K,y=pe):(typeof P.componentDidMount=="function"&&(l.flags|=4194308),y=!1)}else{P=l.stateNode,m0(o,l),K=l.memoizedProps,ke=iu(h,K),P.props=ke,Ue=l.pendingProps,Oe=P.context,Ee=h.contextType,pe=xo,typeof Ee=="object"&&Ee!==null&&(pe=Er(Ee)),ie=h.getDerivedStateFromProps,(Ee=typeof ie=="function"||typeof P.getSnapshotBeforeUpdate=="function")||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(K!==Ue||Oe!==pe)&&p4(l,P,y,pe),Rs=!1,Oe=l.memoizedState,P.state=Oe,ld(l,y,P,C),sd();var je=l.memoizedState;K!==Ue||Oe!==je||Rs||o!==null&&o.dependencies!==null&&zm(o.dependencies)?(typeof ie=="function"&&(D0(l,h,ie,y),je=l.memoizedState),(ke=Rs||m4(l,h,ke,y,Oe,je,pe)||o!==null&&o.dependencies!==null&&zm(o.dependencies))?(Ee||typeof P.UNSAFE_componentWillUpdate!="function"&&typeof P.componentWillUpdate!="function"||(typeof P.componentWillUpdate=="function"&&P.componentWillUpdate(y,je,pe),typeof P.UNSAFE_componentWillUpdate=="function"&&P.UNSAFE_componentWillUpdate(y,je,pe)),typeof P.componentDidUpdate=="function"&&(l.flags|=4),typeof P.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof P.componentDidUpdate!="function"||K===o.memoizedProps&&Oe===o.memoizedState||(l.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||K===o.memoizedProps&&Oe===o.memoizedState||(l.flags|=1024),l.memoizedProps=y,l.memoizedState=je),P.props=y,P.state=je,P.context=pe,y=ke):(typeof P.componentDidUpdate!="function"||K===o.memoizedProps&&Oe===o.memoizedState||(l.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||K===o.memoizedProps&&Oe===o.memoizedState||(l.flags|=1024),y=!1)}return P=y,ap(o,l),y=(l.flags&128)!==0,P||y?(P=l.stateNode,h=y&&typeof h.getDerivedStateFromError!="function"?null:P.render(),l.flags|=1,o!==null&&y?(l.child=bc(l,o.child,null,C),l.child=bc(l,null,h,C)):dr(o,l,h,C),l.memoizedState=P.state,o=l.child):o=Eo(o,l,C),o}function P4(o,l,h,y){return Ps(),l.flags|=256,dr(o,l,h,y),l.child}var B0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function z0(o){return{baseLanes:o,cachePool:v3()}}function F0(o,l,h){return o=o!==null?o.childLanes&~h:0,l&&(o|=Vi),o}function M4(o,l,h){var y=l.pendingProps,C=!1,P=(l.flags&128)!==0,K;if((K=P)||(K=o!==null&&o.memoizedState===null?!1:(qn.current&2)!==0),K&&(C=!0,l.flags&=-129),K=(l.flags&32)!==0,l.flags&=-33,o===null){if(ht){if(C?ks(l):Is(),ht){var ie=rt,pe;if(pe=ie){e:{for(pe=ie,ie=_n;pe.nodeType!==8;){if(!ie){ie=null;break e}if(pe=la(pe.nextSibling),pe===null){ie=null;break e}}ie=pe}ie!==null?(l.memoizedState={dehydrated:ie,treeContext:$!==null?{id:te,overflow:me}:null,retryLane:536870912,hydrationErrors:null},pe=Ir(18,null,null,0),pe.stateNode=ie,pe.return=l,l.child=pe,tt=l,rt=null,pe=!0):pe=!1}pe||Gr(l)}if(ie=l.memoizedState,ie!==null&&(ie=ie.dehydrated,ie!==null))return C1(ie)?l.lanes=32:l.lanes=536870912,null;Co(l)}return ie=y.children,y=y.fallback,C?(Is(),C=l.mode,ie=op({mode:"hidden",children:ie},C),y=ka(y,C,h,null),ie.return=l,y.return=l,ie.sibling=y,l.child=ie,C=l.child,C.memoizedState=z0(h),C.childLanes=F0(o,K,h),l.memoizedState=B0,y):(ks(l),$0(l,ie))}if(pe=o.memoizedState,pe!==null&&(ie=pe.dehydrated,ie!==null)){if(P)l.flags&256?(ks(l),l.flags&=-257,l=V0(o,l,h)):l.memoizedState!==null?(Is(),l.child=o.child,l.flags|=128,l=null):(Is(),C=y.fallback,ie=l.mode,y=op({mode:"visible",children:y.children},ie),C=ka(C,ie,h,null),C.flags|=2,y.return=l,C.return=l,y.sibling=C,l.child=y,bc(l,o.child,null,h),y=l.child,y.memoizedState=z0(h),y.childLanes=F0(o,K,h),l.memoizedState=B0,l=C);else if(ks(l),C1(ie)){if(K=ie.nextSibling&&ie.nextSibling.dataset,K)var Ee=K.dgst;K=Ee,y=Error(r(419)),y.stack="",y.digest=K,Ms({value:y,source:null,stack:null}),l=V0(o,l,h)}else if(nr||eu(o,l,h,!1),K=(h&o.childLanes)!==0,nr||K){if(K=nn,K!==null&&(y=h&-h,y=(y&42)!==0?1:hn(y),y=(y&(K.suspendedLanes|h))!==0?0:y,y!==0&&y!==pe.retryLane))throw pe.retryLane=y,Os(o,y),mi(K,o,y),w4;ie.data==="$?"||s1(),l=V0(o,l,h)}else ie.data==="$?"?(l.flags|=192,l.child=o.child,l=null):(o=pe.treeContext,rt=la(ie.nextSibling),tt=l,ht=!0,tn=null,_n=!1,o!==null&&(S[R++]=te,S[R++]=me,S[R++]=$,te=o.id,me=o.overflow,$=l),l=$0(l,y.children),l.flags|=4096);return l}return C?(Is(),C=y.fallback,ie=l.mode,pe=o.child,Ee=pe.sibling,y=zi(pe,{mode:"hidden",children:y.children}),y.subtreeFlags=pe.subtreeFlags&65011712,Ee!==null?C=zi(Ee,C):(C=ka(C,ie,h,null),C.flags|=2),C.return=l,y.return=l,y.sibling=C,l.child=y,y=C,C=l.child,ie=o.child.memoizedState,ie===null?ie=z0(h):(pe=ie.cachePool,pe!==null?(Ee=Hn._currentValue,pe=pe.parent!==Ee?{parent:Ee,pool:Ee}:pe):pe=v3(),ie={baseLanes:ie.baseLanes|h,cachePool:pe}),C.memoizedState=ie,C.childLanes=F0(o,K,h),l.memoizedState=B0,y):(ks(l),h=o.child,o=h.sibling,h=zi(h,{mode:"visible",children:y.children}),h.return=l,h.sibling=null,o!==null&&(K=l.deletions,K===null?(l.deletions=[o],l.flags|=16):K.push(o)),l.child=h,l.memoizedState=null,h)}function $0(o,l){return l=op({mode:"visible",children:l},o.mode),l.return=o,o.child=l}function op(o,l){return o=Ir(22,o,null,l),o.lanes=0,o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},o}function V0(o,l,h){return bc(l,o.child,null,h),o=$0(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function R4(o,l,h){o.lanes|=l;var y=o.alternate;y!==null&&(y.lanes|=l),Jl(o.return,l,h)}function H0(o,l,h,y,C){var P=o.memoizedState;P===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:y,tail:h,tailMode:C}:(P.isBackwards=l,P.rendering=null,P.renderingStartTime=0,P.last=y,P.tail=h,P.tailMode=C)}function N4(o,l,h){var y=l.pendingProps,C=y.revealOrder,P=y.tail;if(dr(o,l,y.children,h),y=qn.current,(y&2)!==0)y=y&1|2,l.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&R4(o,h,l);else if(o.tag===19)R4(o,h,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}y&=1}switch(q(qn,y),C){case"forwards":for(h=l.child,C=null;h!==null;)o=h.alternate,o!==null&&np(o)===null&&(C=h),h=h.sibling;h=C,h===null?(C=l.child,l.child=null):(C=h.sibling,h.sibling=null),H0(l,!1,C,h,P);break;case"backwards":for(h=null,C=l.child,l.child=null;C!==null;){if(o=C.alternate,o!==null&&np(o)===null){l.child=C;break}o=C.sibling,C.sibling=h,h=C,C=o}H0(l,!0,h,null,P);break;case"together":H0(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function Eo(o,l,h){if(o!==null&&(l.dependencies=o.dependencies),$s|=l.lanes,(h&l.childLanes)===0)if(o!==null){if(eu(o,l,h,!1),(h&l.childLanes)===0)return null}else return null;if(o!==null&&l.child!==o.child)throw Error(r(153));if(l.child!==null){for(o=l.child,h=zi(o,o.pendingProps),l.child=h,h.return=l;o.sibling!==null;)o=o.sibling,h=h.sibling=zi(o,o.pendingProps),h.return=l;h.sibling=null}return l.child}function q0(o,l){return(o.lanes&l)!==0?!0:(o=o.dependencies,!!(o!==null&&zm(o)))}function uU(o,l,h){switch(l.tag){case 3:k(l,l.stateNode.containerInfo),Ia(l,Hn,o.memoizedState.cache),Ps();break;case 27:case 5:G(l);break;case 4:k(l,l.stateNode.containerInfo);break;case 10:Ia(l,l.type,l.memoizedProps.value);break;case 13:var y=l.memoizedState;if(y!==null)return y.dehydrated!==null?(ks(l),l.flags|=128,null):(h&l.child.childLanes)!==0?M4(o,l,h):(ks(l),o=Eo(o,l,h),o!==null?o.sibling:null);ks(l);break;case 19:var C=(o.flags&128)!==0;if(y=(h&l.childLanes)!==0,y||(eu(o,l,h,!1),y=(h&l.childLanes)!==0),C){if(y)return N4(o,l,h);l.flags|=128}if(C=l.memoizedState,C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),q(qn,qn.current),y)break;return null;case 22:case 23:return l.lanes=0,A4(o,l,h);case 24:Ia(l,Hn,o.memoizedState.cache)}return Eo(o,l,h)}function L4(o,l,h){if(o!==null)if(o.memoizedProps!==l.pendingProps)nr=!0;else{if(!q0(o,h)&&(l.flags&128)===0)return nr=!1,uU(o,l,h);nr=(o.flags&131072)!==0}else nr=!1,ht&&(l.flags&1048576)!==0&&Me(l,g,l.index);switch(l.lanes=0,l.tag){case 16:e:{o=l.pendingProps;var y=l.elementType,C=y._init;if(y=C(y._payload),l.type=y,typeof y=="function")uc(y)?(o=iu(y,o),l.tag=1,l=j4(null,l,y,o,h)):(l.tag=0,l=U0(null,l,y,o,h));else{if(y!=null){if(C=y.$$typeof,C===N){l.tag=11,l=S4(null,l,y,o,h);break e}else if(C===Z){l.tag=14,l=C4(null,l,y,o,h);break e}}throw l=Q(y)||y,Error(r(306,l,""))}}return l;case 0:return U0(o,l,l.type,l.pendingProps,h);case 1:return y=l.type,C=iu(y,l.pendingProps),j4(o,l,y,C,h);case 3:e:{if(k(l,l.stateNode.containerInfo),o===null)throw Error(r(387));y=l.pendingProps;var P=l.memoizedState;C=P.element,m0(o,l),ld(l,y,null,h);var K=l.memoizedState;if(y=K.cache,Ia(l,Hn,y),y!==P.cache&&fc(l,[Hn],h,!0),sd(),y=K.element,P.isDehydrated)if(P={element:y,isDehydrated:!1,cache:K.cache},l.updateQueue.baseState=P,l.memoizedState=P,l.flags&256){l=P4(o,l,y,h);break e}else if(y!==C){C=Dr(Error(r(424)),l),Ms(C),l=P4(o,l,y,h);break e}else{switch(o=l.stateNode.containerInfo,o.nodeType){case 9:o=o.body;break;default:o=o.nodeName==="HTML"?o.ownerDocument.body:o}for(rt=la(o.firstChild),tt=l,ht=!0,tn=null,_n=!0,h=d4(l,null,y,h),l.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling}else{if(Ps(),y===C){l=Eo(o,l,h);break e}dr(o,l,y,h)}l=l.child}return l;case 26:return ap(o,l),o===null?(h=UE(l.type,null,l.pendingProps,null))?l.memoizedState=h:ht||(h=l.type,o=l.pendingProps,y=_p(ce.current).createElement(h),y[At]=l,y[Qt]=o,mr(y,h,o),In(y),l.stateNode=y):l.memoizedState=UE(l.type,o.memoizedProps,l.pendingProps,o.memoizedState),null;case 27:return G(l),o===null&&ht&&(y=l.stateNode=DE(l.type,l.pendingProps,ce.current),tt=l,_n=!0,C=rt,Gs(l.type)?(E1=C,rt=la(y.firstChild)):rt=C),dr(o,l,l.pendingProps.children,h),ap(o,l),o===null&&(l.flags|=4194304),l.child;case 5:return o===null&&ht&&((C=y=rt)&&(y=IU(y,l.type,l.pendingProps,_n),y!==null?(l.stateNode=y,tt=l,rt=la(y.firstChild),_n=!1,C=!0):C=!1),C||Gr(l)),G(l),C=l.type,P=l.pendingProps,K=o!==null?o.memoizedProps:null,y=P.children,x1(C,P)?y=null:K!==null&&x1(C,K)&&(l.flags|=32),l.memoizedState!==null&&(C=_0(o,l,tU,null,null,h),Pd._currentValue=C),ap(o,l),dr(o,l,y,h),l.child;case 6:return o===null&&ht&&((o=h=rt)&&(h=UU(h,l.pendingProps,_n),h!==null?(l.stateNode=h,tt=l,rt=null,o=!0):o=!1),o||Gr(l)),null;case 13:return M4(o,l,h);case 4:return k(l,l.stateNode.containerInfo),y=l.pendingProps,o===null?l.child=bc(l,null,y,h):dr(o,l,y,h),l.child;case 11:return S4(o,l,l.type,l.pendingProps,h);case 7:return dr(o,l,l.pendingProps,h),l.child;case 8:return dr(o,l,l.pendingProps.children,h),l.child;case 12:return dr(o,l,l.pendingProps.children,h),l.child;case 10:return y=l.pendingProps,Ia(l,l.type,y.value),dr(o,l,y.children,h),l.child;case 9:return C=l.type._context,y=l.pendingProps.children,tu(l),C=Er(C),y=y(C),l.flags|=1,dr(o,l,y,h),l.child;case 14:return C4(o,l,l.type,l.pendingProps,h);case 15:return E4(o,l,l.type,l.pendingProps,h);case 19:return N4(o,l,h);case 31:return y=l.pendingProps,h=l.mode,y={mode:y.mode,children:y.children},o===null?(h=op(y,h),h.ref=l.ref,l.child=h,h.return=l,l=h):(h=zi(o.child,y),h.ref=l.ref,l.child=h,h.return=l,l=h),l;case 22:return A4(o,l,h);case 24:return tu(l),y=Er(Hn),o===null?(C=f0(),C===null&&(C=nn,P=u0(),C.pooledCache=P,P.refCount++,P!==null&&(C.pooledCacheLanes|=h),C=P),l.memoizedState={parent:y,cache:C},h0(l),Ia(l,Hn,C)):((o.lanes&h)!==0&&(m0(o,l),ld(l,null,null,h),sd()),C=o.memoizedState,P=l.memoizedState,C.parent!==y?(C={parent:y,cache:y},l.memoizedState=C,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=C),Ia(l,Hn,y)):(y=P.cache,Ia(l,Hn,y),y!==C.cache&&fc(l,[Hn],h,!0))),dr(o,l,l.pendingProps.children,h),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function Ao(o){o.flags|=4}function D4(o,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!VE(l)){if(l=$i.current,l!==null&&((jt&4194048)===jt?Ua!==null:(jt&62914560)!==jt&&(jt&536870912)===0||l!==Ua))throw ad=d0,y3;o.flags|=8192}}function sp(o,l){l!==null&&(o.flags|=4),o.flags&16384&&(l=o.tag!==22?ni():536870912,o.lanes|=l,Sc|=l)}function pd(o,l){if(!ht)switch(o.tailMode){case"hidden":l=o.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?o.tail=null:h.sibling=null;break;case"collapsed":h=o.tail;for(var y=null;h!==null;)h.alternate!==null&&(y=h),h=h.sibling;y===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:y.sibling=null}}function xn(o){var l=o.alternate!==null&&o.alternate.child===o.child,h=0,y=0;if(l)for(var C=o.child;C!==null;)h|=C.lanes|C.childLanes,y|=C.subtreeFlags&65011712,y|=C.flags&65011712,C.return=o,C=C.sibling;else for(C=o.child;C!==null;)h|=C.lanes|C.childLanes,y|=C.subtreeFlags,y|=C.flags,C.return=o,C=C.sibling;return o.subtreeFlags|=y,o.childLanes=h,l}function cU(o,l,h){var y=l.pendingProps;switch(Xe(l),l.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xn(l),null;case 1:return xn(l),null;case 3:return h=l.stateNode,y=null,o!==null&&(y=o.memoizedState.cache),l.memoizedState.cache!==y&&(l.flags|=2048),oa(Hn),F(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(o===null||o.child===null)&&(Ql(l)?Ao(l):o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Bm())),xn(l),null;case 26:return h=l.memoizedState,o===null?(Ao(l),h!==null?(xn(l),D4(l,h)):(xn(l),l.flags&=-16777217)):h?h!==o.memoizedState?(Ao(l),xn(l),D4(l,h)):(xn(l),l.flags&=-16777217):(o.memoizedProps!==y&&Ao(l),xn(l),l.flags&=-16777217),null;case 27:le(l),h=ce.current;var C=l.type;if(o!==null&&l.stateNode!=null)o.memoizedProps!==y&&Ao(l);else{if(!y){if(l.stateNode===null)throw Error(r(166));return xn(l),null}o=re.current,Ql(l)?Im(l):(o=DE(C,y,h),l.stateNode=o,Ao(l))}return xn(l),null;case 5:if(le(l),h=l.type,o!==null&&l.stateNode!=null)o.memoizedProps!==y&&Ao(l);else{if(!y){if(l.stateNode===null)throw Error(r(166));return xn(l),null}if(o=re.current,Ql(l))Im(l);else{switch(C=_p(ce.current),o){case 1:o=C.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:o=C.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":o=C.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":o=C.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":o=C.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof y.is=="string"?C.createElement("select",{is:y.is}):C.createElement("select"),y.multiple?o.multiple=!0:y.size&&(o.size=y.size);break;default:o=typeof y.is=="string"?C.createElement(h,{is:y.is}):C.createElement(h)}}o[At]=l,o[Qt]=y;e:for(C=l.child;C!==null;){if(C.tag===5||C.tag===6)o.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===l)break e;for(;C.sibling===null;){if(C.return===null||C.return===l)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}l.stateNode=o;e:switch(mr(o,h,y),h){case"button":case"input":case"select":case"textarea":o=!!y.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Ao(l)}}return xn(l),l.flags&=-16777217,null;case 6:if(o&&l.stateNode!=null)o.memoizedProps!==y&&Ao(l);else{if(typeof y!="string"&&l.stateNode===null)throw Error(r(166));if(o=ce.current,Ql(l)){if(o=l.stateNode,h=l.memoizedProps,y=null,C=tt,C!==null)switch(C.tag){case 27:case 5:y=C.memoizedProps}o[At]=l,o=!!(o.nodeValue===h||y!==null&&y.suppressHydrationWarning===!0||OE(o.nodeValue,h)),o||Gr(l)}else o=_p(o).createTextNode(y),o[At]=l,l.stateNode=o}return xn(l),null;case 13:if(y=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(C=Ql(l),y!==null&&y.dehydrated!==null){if(o===null){if(!C)throw Error(r(318));if(C=l.memoizedState,C=C!==null?C.dehydrated:null,!C)throw Error(r(317));C[At]=l}else Ps(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;xn(l),C=!1}else C=Bm(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=C),C=!0;if(!C)return l.flags&256?(Co(l),l):(Co(l),null)}if(Co(l),(l.flags&128)!==0)return l.lanes=h,l;if(h=y!==null,o=o!==null&&o.memoizedState!==null,h){y=l.child,C=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(C=y.alternate.memoizedState.cachePool.pool);var P=null;y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(P=y.memoizedState.cachePool.pool),P!==C&&(y.flags|=2048)}return h!==o&&h&&(l.child.flags|=8192),sp(l,l.updateQueue),xn(l),null;case 4:return F(),o===null&&g1(l.stateNode.containerInfo),xn(l),null;case 10:return oa(l.type),xn(l),null;case 19:if(Y(qn),C=l.memoizedState,C===null)return xn(l),null;if(y=(l.flags&128)!==0,P=C.rendering,P===null)if(y)pd(C,!1);else{if(En!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(P=np(o),P!==null){for(l.flags|=128,pd(C,!1),o=P.updateQueue,l.updateQueue=o,sp(l,o),l.subtreeFlags=0,o=h,h=l.child;h!==null;)ed(h,o),h=h.sibling;return q(qn,qn.current&1|2),l.child}o=o.sibling}C.tail!==null&&_e()>cp&&(l.flags|=128,y=!0,pd(C,!1),l.lanes=4194304)}else{if(!y)if(o=np(P),o!==null){if(l.flags|=128,y=!0,o=o.updateQueue,l.updateQueue=o,sp(l,o),pd(C,!0),C.tail===null&&C.tailMode==="hidden"&&!P.alternate&&!ht)return xn(l),null}else 2*_e()-C.renderingStartTime>cp&&h!==536870912&&(l.flags|=128,y=!0,pd(C,!1),l.lanes=4194304);C.isBackwards?(P.sibling=l.child,l.child=P):(o=C.last,o!==null?o.sibling=P:l.child=P,C.last=P)}return C.tail!==null?(l=C.tail,C.rendering=l,C.tail=l.sibling,C.renderingStartTime=_e(),l.sibling=null,o=qn.current,q(qn,y?o&1|2:o&1),l):(xn(l),null);case 22:case 23:return Co(l),y0(),y=l.memoizedState!==null,o!==null?o.memoizedState!==null!==y&&(l.flags|=8192):y&&(l.flags|=8192),y?(h&536870912)!==0&&(l.flags&128)===0&&(xn(l),l.subtreeFlags&6&&(l.flags|=8192)):xn(l),h=l.updateQueue,h!==null&&sp(l,h.retryQueue),h=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),y=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(y=l.memoizedState.cachePool.pool),y!==h&&(l.flags|=2048),o!==null&&Y(nu),null;case 24:return h=null,o!==null&&(h=o.memoizedState.cache),l.memoizedState.cache!==h&&(l.flags|=2048),oa(Hn),xn(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function fU(o,l){switch(Xe(l),l.tag){case 1:return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return oa(Hn),F(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 26:case 27:case 5:return le(l),null;case 13:if(Co(l),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(r(340));Ps()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return Y(qn),null;case 4:return F(),null;case 10:return oa(l.type),null;case 22:case 23:return Co(l),y0(),o!==null&&Y(nu),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 24:return oa(Hn),null;case 25:return null;default:return null}}function k4(o,l){switch(Xe(l),l.tag){case 3:oa(Hn),F();break;case 26:case 27:case 5:le(l);break;case 4:F();break;case 13:Co(l);break;case 19:Y(qn);break;case 10:oa(l.type);break;case 22:case 23:Co(l),y0(),o!==null&&Y(nu);break;case 24:oa(Hn)}}function gd(o,l){try{var h=l.updateQueue,y=h!==null?h.lastEffect:null;if(y!==null){var C=y.next;h=C;do{if((h.tag&o)===o){y=void 0;var P=h.create,K=h.inst;y=P(),K.destroy=y}h=h.next}while(h!==C)}}catch(ie){Wt(l,l.return,ie)}}function Us(o,l,h){try{var y=l.updateQueue,C=y!==null?y.lastEffect:null;if(C!==null){var P=C.next;y=P;do{if((y.tag&o)===o){var K=y.inst,ie=K.destroy;if(ie!==void 0){K.destroy=void 0,C=l;var pe=h,Ee=ie;try{Ee()}catch(ke){Wt(C,pe,ke)}}}y=y.next}while(y!==P)}}catch(ke){Wt(l,l.return,ke)}}function I4(o){var l=o.updateQueue;if(l!==null){var h=o.stateNode;try{C3(l,h)}catch(y){Wt(o,o.return,y)}}}function U4(o,l,h){h.props=iu(o.type,o.memoizedProps),h.state=o.memoizedState;try{h.componentWillUnmount()}catch(y){Wt(o,l,y)}}function vd(o,l){try{var h=o.ref;if(h!==null){switch(o.tag){case 26:case 27:case 5:var y=o.stateNode;break;case 30:y=o.stateNode;break;default:y=o.stateNode}typeof h=="function"?o.refCleanup=h(y):h.current=y}}catch(C){Wt(o,l,C)}}function Ba(o,l){var h=o.ref,y=o.refCleanup;if(h!==null)if(typeof y=="function")try{y()}catch(C){Wt(o,l,C)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(C){Wt(o,l,C)}else h.current=null}function B4(o){var l=o.type,h=o.memoizedProps,y=o.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":h.autoFocus&&y.focus();break e;case"img":h.src?y.src=h.src:h.srcSet&&(y.srcset=h.srcSet)}}catch(C){Wt(o,o.return,C)}}function G0(o,l,h){try{var y=o.stateNode;RU(y,o.type,h,l),y[Qt]=l}catch(C){Wt(o,o.return,C)}}function z4(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&Gs(o.type)||o.tag===4}function Y0(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||z4(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&Gs(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function W0(o,l,h){var y=o.tag;if(y===5||y===6)o=o.stateNode,l?(h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h).insertBefore(o,l):(l=h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h,l.appendChild(o),h=h._reactRootContainer,h!=null||l.onclick!==null||(l.onclick=bp));else if(y!==4&&(y===27&&Gs(o.type)&&(h=o.stateNode,l=null),o=o.child,o!==null))for(W0(o,l,h),o=o.sibling;o!==null;)W0(o,l,h),o=o.sibling}function lp(o,l,h){var y=o.tag;if(y===5||y===6)o=o.stateNode,l?h.insertBefore(o,l):h.appendChild(o);else if(y!==4&&(y===27&&Gs(o.type)&&(h=o.stateNode),o=o.child,o!==null))for(lp(o,l,h),o=o.sibling;o!==null;)lp(o,l,h),o=o.sibling}function F4(o){var l=o.stateNode,h=o.memoizedProps;try{for(var y=o.type,C=l.attributes;C.length;)l.removeAttributeNode(C[0]);mr(l,y,h),l[At]=o,l[Qt]=h}catch(P){Wt(o,o.return,P)}}var To=!1,Ln=!1,K0=!1,$4=typeof WeakSet=="function"?WeakSet:Set,rr=null;function dU(o,l){if(o=o.containerInfo,b1=Ap,o=ql(o),Gl(o)){if("selectionStart"in o)var h={start:o.selectionStart,end:o.selectionEnd};else e:{h=(h=o.ownerDocument)&&h.defaultView||window;var y=h.getSelection&&h.getSelection();if(y&&y.rangeCount!==0){h=y.anchorNode;var C=y.anchorOffset,P=y.focusNode;y=y.focusOffset;try{h.nodeType,P.nodeType}catch{h=null;break e}var K=0,ie=-1,pe=-1,Ee=0,ke=0,Ue=o,Oe=null;t:for(;;){for(var je;Ue!==h||C!==0&&Ue.nodeType!==3||(ie=K+C),Ue!==P||y!==0&&Ue.nodeType!==3||(pe=K+y),Ue.nodeType===3&&(K+=Ue.nodeValue.length),(je=Ue.firstChild)!==null;)Oe=Ue,Ue=je;for(;;){if(Ue===o)break t;if(Oe===h&&++Ee===C&&(ie=K),Oe===P&&++ke===y&&(pe=K),(je=Ue.nextSibling)!==null)break;Ue=Oe,Oe=Ue.parentNode}Ue=je}h=ie===-1||pe===-1?null:{start:ie,end:pe}}else h=null}h=h||{start:0,end:0}}else h=null;for(_1={focusedElem:o,selectionRange:h},Ap=!1,rr=l;rr!==null;)if(l=rr,o=l.child,(l.subtreeFlags&1024)!==0&&o!==null)o.return=l,rr=o;else for(;rr!==null;){switch(l=rr,P=l.alternate,o=l.flags,l.tag){case 0:break;case 11:case 15:break;case 1:if((o&1024)!==0&&P!==null){o=void 0,h=l,C=P.memoizedProps,P=P.memoizedState,y=h.stateNode;try{var dt=iu(h.type,C,h.elementType===h.type);o=y.getSnapshotBeforeUpdate(dt,P),y.__reactInternalSnapshotBeforeUpdate=o}catch(ct){Wt(h,h.return,ct)}}break;case 3:if((o&1024)!==0){if(o=l.stateNode.containerInfo,h=o.nodeType,h===9)S1(o);else if(h===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":S1(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(r(163))}if(o=l.sibling,o!==null){o.return=l.return,rr=o;break}rr=l.return}}function V4(o,l,h){var y=h.flags;switch(h.tag){case 0:case 11:case 15:Bs(o,h),y&4&&gd(5,h);break;case 1:if(Bs(o,h),y&4)if(o=h.stateNode,l===null)try{o.componentDidMount()}catch(K){Wt(h,h.return,K)}else{var C=iu(h.type,l.memoizedProps);l=l.memoizedState;try{o.componentDidUpdate(C,l,o.__reactInternalSnapshotBeforeUpdate)}catch(K){Wt(h,h.return,K)}}y&64&&I4(h),y&512&&vd(h,h.return);break;case 3:if(Bs(o,h),y&64&&(o=h.updateQueue,o!==null)){if(l=null,h.child!==null)switch(h.child.tag){case 27:case 5:l=h.child.stateNode;break;case 1:l=h.child.stateNode}try{C3(o,l)}catch(K){Wt(h,h.return,K)}}break;case 27:l===null&&y&4&&F4(h);case 26:case 5:Bs(o,h),l===null&&y&4&&B4(h),y&512&&vd(h,h.return);break;case 12:Bs(o,h);break;case 13:Bs(o,h),y&4&&G4(o,h),y&64&&(o=h.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(h=xU.bind(null,h),BU(o,h))));break;case 22:if(y=h.memoizedState!==null||To,!y){l=l!==null&&l.memoizedState!==null||Ln,C=To;var P=Ln;To=y,(Ln=l)&&!P?zs(o,h,(h.subtreeFlags&8772)!==0):Bs(o,h),To=C,Ln=P}break;case 30:break;default:Bs(o,h)}}function H4(o){var l=o.alternate;l!==null&&(o.alternate=null,H4(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&Gu(l)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var pn=null,Wr=!1;function Oo(o,l,h){for(h=h.child;h!==null;)q4(o,l,h),h=h.sibling}function q4(o,l,h){if(Ae&&typeof Ae.onCommitFiberUnmount=="function")try{Ae.onCommitFiberUnmount(Re,h)}catch{}switch(h.tag){case 26:Ln||Ba(h,l),Oo(o,l,h),h.memoizedState?h.memoizedState.count--:h.stateNode&&(h=h.stateNode,h.parentNode.removeChild(h));break;case 27:Ln||Ba(h,l);var y=pn,C=Wr;Gs(h.type)&&(pn=h.stateNode,Wr=!1),Oo(o,l,h),Ad(h.stateNode),pn=y,Wr=C;break;case 5:Ln||Ba(h,l);case 6:if(y=pn,C=Wr,pn=null,Oo(o,l,h),pn=y,Wr=C,pn!==null)if(Wr)try{(pn.nodeType===9?pn.body:pn.nodeName==="HTML"?pn.ownerDocument.body:pn).removeChild(h.stateNode)}catch(P){Wt(h,l,P)}else try{pn.removeChild(h.stateNode)}catch(P){Wt(h,l,P)}break;case 18:pn!==null&&(Wr?(o=pn,NE(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,h.stateNode),Ld(o)):NE(pn,h.stateNode));break;case 4:y=pn,C=Wr,pn=h.stateNode.containerInfo,Wr=!0,Oo(o,l,h),pn=y,Wr=C;break;case 0:case 11:case 14:case 15:Ln||Us(2,h,l),Ln||Us(4,h,l),Oo(o,l,h);break;case 1:Ln||(Ba(h,l),y=h.stateNode,typeof y.componentWillUnmount=="function"&&U4(h,l,y)),Oo(o,l,h);break;case 21:Oo(o,l,h);break;case 22:Ln=(y=Ln)||h.memoizedState!==null,Oo(o,l,h),Ln=y;break;default:Oo(o,l,h)}}function G4(o,l){if(l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{Ld(o)}catch(h){Wt(l,l.return,h)}}function hU(o){switch(o.tag){case 13:case 19:var l=o.stateNode;return l===null&&(l=o.stateNode=new $4),l;case 22:return o=o.stateNode,l=o._retryCache,l===null&&(l=o._retryCache=new $4),l;default:throw Error(r(435,o.tag))}}function Z0(o,l){var h=hU(o);l.forEach(function(y){var C=wU.bind(null,o,y);h.has(y)||(h.add(y),y.then(C,C))})}function ci(o,l){var h=l.deletions;if(h!==null)for(var y=0;y<h.length;y++){var C=h[y],P=o,K=l,ie=K;e:for(;ie!==null;){switch(ie.tag){case 27:if(Gs(ie.type)){pn=ie.stateNode,Wr=!1;break e}break;case 5:pn=ie.stateNode,Wr=!1;break e;case 3:case 4:pn=ie.stateNode.containerInfo,Wr=!0;break e}ie=ie.return}if(pn===null)throw Error(r(160));q4(P,K,C),pn=null,Wr=!1,P=C.alternate,P!==null&&(P.return=null),C.return=null}if(l.subtreeFlags&13878)for(l=l.child;l!==null;)Y4(l,o),l=l.sibling}var sa=null;function Y4(o,l){var h=o.alternate,y=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:ci(l,o),fi(o),y&4&&(Us(3,o,o.return),gd(3,o),Us(5,o,o.return));break;case 1:ci(l,o),fi(o),y&512&&(Ln||h===null||Ba(h,h.return)),y&64&&To&&(o=o.updateQueue,o!==null&&(y=o.callbacks,y!==null&&(h=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=h===null?y:h.concat(y))));break;case 26:var C=sa;if(ci(l,o),fi(o),y&512&&(Ln||h===null||Ba(h,h.return)),y&4){var P=h!==null?h.memoizedState:null;if(y=o.memoizedState,h===null)if(y===null)if(o.stateNode===null){e:{y=o.type,h=o.memoizedProps,C=C.ownerDocument||C;t:switch(y){case"title":P=C.getElementsByTagName("title")[0],(!P||P[us]||P[At]||P.namespaceURI==="http://www.w3.org/2000/svg"||P.hasAttribute("itemprop"))&&(P=C.createElement(y),C.head.insertBefore(P,C.querySelector("head > title"))),mr(P,y,h),P[At]=o,In(P),y=P;break e;case"link":var K=FE("link","href",C).get(y+(h.href||""));if(K){for(var ie=0;ie<K.length;ie++)if(P=K[ie],P.getAttribute("href")===(h.href==null||h.href===""?null:h.href)&&P.getAttribute("rel")===(h.rel==null?null:h.rel)&&P.getAttribute("title")===(h.title==null?null:h.title)&&P.getAttribute("crossorigin")===(h.crossOrigin==null?null:h.crossOrigin)){K.splice(ie,1);break t}}P=C.createElement(y),mr(P,y,h),C.head.appendChild(P);break;case"meta":if(K=FE("meta","content",C).get(y+(h.content||""))){for(ie=0;ie<K.length;ie++)if(P=K[ie],P.getAttribute("content")===(h.content==null?null:""+h.content)&&P.getAttribute("name")===(h.name==null?null:h.name)&&P.getAttribute("property")===(h.property==null?null:h.property)&&P.getAttribute("http-equiv")===(h.httpEquiv==null?null:h.httpEquiv)&&P.getAttribute("charset")===(h.charSet==null?null:h.charSet)){K.splice(ie,1);break t}}P=C.createElement(y),mr(P,y,h),C.head.appendChild(P);break;default:throw Error(r(468,y))}P[At]=o,In(P),y=P}o.stateNode=y}else $E(C,o.type,o.stateNode);else o.stateNode=zE(C,y,o.memoizedProps);else P!==y?(P===null?h.stateNode!==null&&(h=h.stateNode,h.parentNode.removeChild(h)):P.count--,y===null?$E(C,o.type,o.stateNode):zE(C,y,o.memoizedProps)):y===null&&o.stateNode!==null&&G0(o,o.memoizedProps,h.memoizedProps)}break;case 27:ci(l,o),fi(o),y&512&&(Ln||h===null||Ba(h,h.return)),h!==null&&y&4&&G0(o,o.memoizedProps,h.memoizedProps);break;case 5:if(ci(l,o),fi(o),y&512&&(Ln||h===null||Ba(h,h.return)),o.flags&32){C=o.stateNode;try{Di(C,"")}catch(je){Wt(o,o.return,je)}}y&4&&o.stateNode!=null&&(C=o.memoizedProps,G0(o,C,h!==null?h.memoizedProps:C)),y&1024&&(K0=!0);break;case 6:if(ci(l,o),fi(o),y&4){if(o.stateNode===null)throw Error(r(162));y=o.memoizedProps,h=o.stateNode;try{h.nodeValue=y}catch(je){Wt(o,o.return,je)}}break;case 3:if(Sp=null,C=sa,sa=xp(l.containerInfo),ci(l,o),sa=C,fi(o),y&4&&h!==null&&h.memoizedState.isDehydrated)try{Ld(l.containerInfo)}catch(je){Wt(o,o.return,je)}K0&&(K0=!1,W4(o));break;case 4:y=sa,sa=xp(o.stateNode.containerInfo),ci(l,o),fi(o),sa=y;break;case 12:ci(l,o),fi(o);break;case 13:ci(l,o),fi(o),o.child.flags&8192&&o.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(n1=_e()),y&4&&(y=o.updateQueue,y!==null&&(o.updateQueue=null,Z0(o,y)));break;case 22:C=o.memoizedState!==null;var pe=h!==null&&h.memoizedState!==null,Ee=To,ke=Ln;if(To=Ee||C,Ln=ke||pe,ci(l,o),Ln=ke,To=Ee,fi(o),y&8192)e:for(l=o.stateNode,l._visibility=C?l._visibility&-2:l._visibility|1,C&&(h===null||pe||To||Ln||au(o)),h=null,l=o;;){if(l.tag===5||l.tag===26){if(h===null){pe=h=l;try{if(P=pe.stateNode,C)K=P.style,typeof K.setProperty=="function"?K.setProperty("display","none","important"):K.display="none";else{ie=pe.stateNode;var Ue=pe.memoizedProps.style,Oe=Ue!=null&&Ue.hasOwnProperty("display")?Ue.display:null;ie.style.display=Oe==null||typeof Oe=="boolean"?"":(""+Oe).trim()}}catch(je){Wt(pe,pe.return,je)}}}else if(l.tag===6){if(h===null){pe=l;try{pe.stateNode.nodeValue=C?"":pe.memoizedProps}catch(je){Wt(pe,pe.return,je)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===o)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break e;for(;l.sibling===null;){if(l.return===null||l.return===o)break e;h===l&&(h=null),l=l.return}h===l&&(h=null),l.sibling.return=l.return,l=l.sibling}y&4&&(y=o.updateQueue,y!==null&&(h=y.retryQueue,h!==null&&(y.retryQueue=null,Z0(o,h))));break;case 19:ci(l,o),fi(o),y&4&&(y=o.updateQueue,y!==null&&(o.updateQueue=null,Z0(o,y)));break;case 30:break;case 21:break;default:ci(l,o),fi(o)}}function fi(o){var l=o.flags;if(l&2){try{for(var h,y=o.return;y!==null;){if(z4(y)){h=y;break}y=y.return}if(h==null)throw Error(r(160));switch(h.tag){case 27:var C=h.stateNode,P=Y0(o);lp(o,P,C);break;case 5:var K=h.stateNode;h.flags&32&&(Di(K,""),h.flags&=-33);var ie=Y0(o);lp(o,ie,K);break;case 3:case 4:var pe=h.stateNode.containerInfo,Ee=Y0(o);W0(o,Ee,pe);break;default:throw Error(r(161))}}catch(ke){Wt(o,o.return,ke)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function W4(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var l=o;W4(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),o=o.sibling}}function Bs(o,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)V4(o,l.alternate,l),l=l.sibling}function au(o){for(o=o.child;o!==null;){var l=o;switch(l.tag){case 0:case 11:case 14:case 15:Us(4,l,l.return),au(l);break;case 1:Ba(l,l.return);var h=l.stateNode;typeof h.componentWillUnmount=="function"&&U4(l,l.return,h),au(l);break;case 27:Ad(l.stateNode);case 26:case 5:Ba(l,l.return),au(l);break;case 22:l.memoizedState===null&&au(l);break;case 30:au(l);break;default:au(l)}o=o.sibling}}function zs(o,l,h){for(h=h&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var y=l.alternate,C=o,P=l,K=P.flags;switch(P.tag){case 0:case 11:case 15:zs(C,P,h),gd(4,P);break;case 1:if(zs(C,P,h),y=P,C=y.stateNode,typeof C.componentDidMount=="function")try{C.componentDidMount()}catch(Ee){Wt(y,y.return,Ee)}if(y=P,C=y.updateQueue,C!==null){var ie=y.stateNode;try{var pe=C.shared.hiddenCallbacks;if(pe!==null)for(C.shared.hiddenCallbacks=null,C=0;C<pe.length;C++)S3(pe[C],ie)}catch(Ee){Wt(y,y.return,Ee)}}h&&K&64&&I4(P),vd(P,P.return);break;case 27:F4(P);case 26:case 5:zs(C,P,h),h&&y===null&&K&4&&B4(P),vd(P,P.return);break;case 12:zs(C,P,h);break;case 13:zs(C,P,h),h&&K&4&&G4(C,P);break;case 22:P.memoizedState===null&&zs(C,P,h),vd(P,P.return);break;case 30:break;default:zs(C,P,h)}l=l.sibling}}function X0(o,l){var h=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),o=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(o=l.memoizedState.cachePool.pool),o!==h&&(o!=null&&o.refCount++,h!=null&&nd(h))}function Q0(o,l){o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&nd(o))}function za(o,l,h,y){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)K4(o,l,h,y),l=l.sibling}function K4(o,l,h,y){var C=l.flags;switch(l.tag){case 0:case 11:case 15:za(o,l,h,y),C&2048&&gd(9,l);break;case 1:za(o,l,h,y);break;case 3:za(o,l,h,y),C&2048&&(o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&nd(o)));break;case 12:if(C&2048){za(o,l,h,y),o=l.stateNode;try{var P=l.memoizedProps,K=P.id,ie=P.onPostCommit;typeof ie=="function"&&ie(K,l.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(pe){Wt(l,l.return,pe)}}else za(o,l,h,y);break;case 13:za(o,l,h,y);break;case 23:break;case 22:P=l.stateNode,K=l.alternate,l.memoizedState!==null?P._visibility&2?za(o,l,h,y):yd(o,l):P._visibility&2?za(o,l,h,y):(P._visibility|=2,_c(o,l,h,y,(l.subtreeFlags&10256)!==0)),C&2048&&X0(K,l);break;case 24:za(o,l,h,y),C&2048&&Q0(l.alternate,l);break;default:za(o,l,h,y)}}function _c(o,l,h,y,C){for(C=C&&(l.subtreeFlags&10256)!==0,l=l.child;l!==null;){var P=o,K=l,ie=h,pe=y,Ee=K.flags;switch(K.tag){case 0:case 11:case 15:_c(P,K,ie,pe,C),gd(8,K);break;case 23:break;case 22:var ke=K.stateNode;K.memoizedState!==null?ke._visibility&2?_c(P,K,ie,pe,C):yd(P,K):(ke._visibility|=2,_c(P,K,ie,pe,C)),C&&Ee&2048&&X0(K.alternate,K);break;case 24:_c(P,K,ie,pe,C),C&&Ee&2048&&Q0(K.alternate,K);break;default:_c(P,K,ie,pe,C)}l=l.sibling}}function yd(o,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var h=o,y=l,C=y.flags;switch(y.tag){case 22:yd(h,y),C&2048&&X0(y.alternate,y);break;case 24:yd(h,y),C&2048&&Q0(y.alternate,y);break;default:yd(h,y)}l=l.sibling}}var bd=8192;function xc(o){if(o.subtreeFlags&bd)for(o=o.child;o!==null;)Z4(o),o=o.sibling}function Z4(o){switch(o.tag){case 26:xc(o),o.flags&bd&&o.memoizedState!==null&&QU(sa,o.memoizedState,o.memoizedProps);break;case 5:xc(o);break;case 3:case 4:var l=sa;sa=xp(o.stateNode.containerInfo),xc(o),sa=l;break;case 22:o.memoizedState===null&&(l=o.alternate,l!==null&&l.memoizedState!==null?(l=bd,bd=16777216,xc(o),bd=l):xc(o));break;default:xc(o)}}function X4(o){var l=o.alternate;if(l!==null&&(o=l.child,o!==null)){l.child=null;do l=o.sibling,o.sibling=null,o=l;while(o!==null)}}function _d(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var h=0;h<l.length;h++){var y=l[h];rr=y,J4(y,o)}X4(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)Q4(o),o=o.sibling}function Q4(o){switch(o.tag){case 0:case 11:case 15:_d(o),o.flags&2048&&Us(9,o,o.return);break;case 3:_d(o);break;case 12:_d(o);break;case 22:var l=o.stateNode;o.memoizedState!==null&&l._visibility&2&&(o.return===null||o.return.tag!==13)?(l._visibility&=-3,up(o)):_d(o);break;default:_d(o)}}function up(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var h=0;h<l.length;h++){var y=l[h];rr=y,J4(y,o)}X4(o)}for(o=o.child;o!==null;){switch(l=o,l.tag){case 0:case 11:case 15:Us(8,l,l.return),up(l);break;case 22:h=l.stateNode,h._visibility&2&&(h._visibility&=-3,up(l));break;default:up(l)}o=o.sibling}}function J4(o,l){for(;rr!==null;){var h=rr;switch(h.tag){case 0:case 11:case 15:Us(8,h,l);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var y=h.memoizedState.cachePool.pool;y!=null&&y.refCount++}break;case 24:nd(h.memoizedState.cache)}if(y=h.child,y!==null)y.return=h,rr=y;else e:for(h=o;rr!==null;){y=rr;var C=y.sibling,P=y.return;if(H4(y),y===h){rr=null;break e}if(C!==null){C.return=P,rr=C;break e}rr=P}}}var mU={getCacheForType:function(o){var l=Er(Hn),h=l.data.get(o);return h===void 0&&(h=o(),l.data.set(o,h)),h}},pU=typeof WeakMap=="function"?WeakMap:Map,Ft=0,nn=null,wt=null,jt=0,$t=0,di=null,Fs=!1,wc=!1,J0=!1,jo=0,En=0,$s=0,ou=0,e1=0,Vi=0,Sc=0,xd=null,Kr=null,t1=!1,n1=0,cp=1/0,fp=null,Vs=null,hr=0,Hs=null,Cc=null,Ec=0,r1=0,i1=null,eE=null,wd=0,a1=null;function hi(){if((Ft&2)!==0&&jt!==0)return jt&-jt;if(W.T!==null){var o=dc;return o!==0?o:d1()}return Qn()}function tE(){Vi===0&&(Vi=(jt&536870912)===0||ht?os():536870912);var o=$i.current;return o!==null&&(o.flags|=32),Vi}function mi(o,l,h){(o===nn&&($t===2||$t===9)||o.cancelPendingCommit!==null)&&(Ac(o,0),qs(o,jt,Vi,!1)),Oa(o,h),((Ft&2)===0||o!==nn)&&(o===nn&&((Ft&2)===0&&(ou|=h),En===4&&qs(o,jt,Vi,!1)),Fa(o))}function nE(o,l,h){if((Ft&6)!==0)throw Error(r(327));var y=!h&&(l&124)===0&&(l&o.expiredLanes)===0||wr(o,l),C=y?yU(o,l):l1(o,l,!0),P=y;do{if(C===0){wc&&!y&&qs(o,l,0,!1);break}else{if(h=o.current.alternate,P&&!gU(h)){C=l1(o,l,!1),P=!1;continue}if(C===2){if(P=l,o.errorRecoveryDisabledLanes&P)var K=0;else K=o.pendingLanes&-536870913,K=K!==0?K:K&536870912?536870912:0;if(K!==0){l=K;e:{var ie=o;C=xd;var pe=ie.current.memoizedState.isDehydrated;if(pe&&(Ac(ie,K).flags|=256),K=l1(ie,K,!1),K!==2){if(J0&&!pe){ie.errorRecoveryDisabledLanes|=P,ou|=P,C=4;break e}P=Kr,Kr=C,P!==null&&(Kr===null?Kr=P:Kr.push.apply(Kr,P))}C=K}if(P=!1,C!==2)continue}}if(C===1){Ac(o,0),qs(o,l,0,!0);break}e:{switch(y=o,P=C,P){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:qs(y,l,Vi,!Fs);break e;case 2:Kr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(C=n1+300-_e(),10<C)){if(qs(y,l,Vi,!Fs),kt(y,0,!0)!==0)break e;y.timeoutHandle=ME(rE.bind(null,y,h,Kr,fp,t1,l,Vi,ou,Sc,Fs,P,2,-0,0),C);break e}rE(y,h,Kr,fp,t1,l,Vi,ou,Sc,Fs,P,0,-0,0)}}break}while(!0);Fa(o)}function rE(o,l,h,y,C,P,K,ie,pe,Ee,ke,Ue,Oe,je){if(o.timeoutHandle=-1,Ue=l.subtreeFlags,(Ue&8192||(Ue&16785408)===16785408)&&(jd={stylesheets:null,count:0,unsuspend:XU},Z4(l),Ue=JU(),Ue!==null)){o.cancelPendingCommit=Ue(cE.bind(null,o,l,P,h,y,C,K,ie,pe,ke,1,Oe,je)),qs(o,P,K,!Ee);return}cE(o,l,P,h,y,C,K,ie,pe)}function gU(o){for(var l=o;;){var h=l.tag;if((h===0||h===11||h===15)&&l.flags&16384&&(h=l.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var y=0;y<h.length;y++){var C=h[y],P=C.getSnapshot;C=C.value;try{if(!Nr(P(),C))return!1}catch{return!1}}if(h=l.child,l.subtreeFlags&16384&&h!==null)h.return=l,l=h;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function qs(o,l,h,y){l&=~e1,l&=~ou,o.suspendedLanes|=l,o.pingedLanes&=~l,y&&(o.warmLanes|=l),y=o.expirationTimes;for(var C=l;0<C;){var P=31-Ve(C),K=1<<P;y[P]=-1,C&=~K}h!==0&&ls(o,h,l)}function dp(){return(Ft&6)===0?(Sd(0),!1):!0}function o1(){if(wt!==null){if($t===0)var o=wt.return;else o=wt,aa=Fi=null,S0(o),yc=null,hd=0,o=wt;for(;o!==null;)k4(o.alternate,o),o=o.return;wt=null}}function Ac(o,l){var h=o.timeoutHandle;h!==-1&&(o.timeoutHandle=-1,LU(h)),h=o.cancelPendingCommit,h!==null&&(o.cancelPendingCommit=null,h()),o1(),nn=o,wt=h=zi(o.current,null),jt=l,$t=0,di=null,Fs=!1,wc=wr(o,l),J0=!1,Sc=Vi=e1=ou=$s=En=0,Kr=xd=null,t1=!1,(l&8)!==0&&(l|=l&32);var y=o.entangledLanes;if(y!==0)for(o=o.entanglements,y&=l;0<y;){var C=31-Ve(y),P=1<<C;l|=o[C],y&=~P}return jo=l,Wl(),h}function iE(o,l){bt=null,W.H=Jm,l===id||l===Vm?(l=x3(),$t=3):l===y3?(l=x3(),$t=4):$t=l===w4?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,di=l,wt===null&&(En=1,ip(o,Dr(l,o.current)))}function aE(){var o=W.H;return W.H=Jm,o===null?Jm:o}function oE(){var o=W.A;return W.A=mU,o}function s1(){En=4,Fs||(jt&4194048)!==jt&&$i.current!==null||(wc=!0),($s&134217727)===0&&(ou&134217727)===0||nn===null||qs(nn,jt,Vi,!1)}function l1(o,l,h){var y=Ft;Ft|=2;var C=aE(),P=oE();(nn!==o||jt!==l)&&(fp=null,Ac(o,l)),l=!1;var K=En;e:do try{if($t!==0&&wt!==null){var ie=wt,pe=di;switch($t){case 8:o1(),K=6;break e;case 3:case 2:case 9:case 6:$i.current===null&&(l=!0);var Ee=$t;if($t=0,di=null,Tc(o,ie,pe,Ee),h&&wc){K=0;break e}break;default:Ee=$t,$t=0,di=null,Tc(o,ie,pe,Ee)}}vU(),K=En;break}catch(ke){iE(o,ke)}while(!0);return l&&o.shellSuspendCounter++,aa=Fi=null,Ft=y,W.H=C,W.A=P,wt===null&&(nn=null,jt=0,Wl()),K}function vU(){for(;wt!==null;)sE(wt)}function yU(o,l){var h=Ft;Ft|=2;var y=aE(),C=oE();nn!==o||jt!==l?(fp=null,cp=_e()+500,Ac(o,l)):wc=wr(o,l);e:do try{if($t!==0&&wt!==null){l=wt;var P=di;t:switch($t){case 1:$t=0,di=null,Tc(o,l,P,1);break;case 2:case 9:if(b3(P)){$t=0,di=null,lE(l);break}l=function(){$t!==2&&$t!==9||nn!==o||($t=7),Fa(o)},P.then(l,l);break e;case 3:$t=7;break e;case 4:$t=5;break e;case 7:b3(P)?($t=0,di=null,lE(l)):($t=0,di=null,Tc(o,l,P,7));break;case 5:var K=null;switch(wt.tag){case 26:K=wt.memoizedState;case 5:case 27:var ie=wt;if(!K||VE(K)){$t=0,di=null;var pe=ie.sibling;if(pe!==null)wt=pe;else{var Ee=ie.return;Ee!==null?(wt=Ee,hp(Ee)):wt=null}break t}}$t=0,di=null,Tc(o,l,P,5);break;case 6:$t=0,di=null,Tc(o,l,P,6);break;case 8:o1(),En=6;break e;default:throw Error(r(462))}}bU();break}catch(ke){iE(o,ke)}while(!0);return aa=Fi=null,W.H=y,W.A=C,Ft=h,wt!==null?0:(nn=null,jt=0,Wl(),En)}function bU(){for(;wt!==null&&!ge();)sE(wt)}function sE(o){var l=L4(o.alternate,o,jo);o.memoizedProps=o.pendingProps,l===null?hp(o):wt=l}function lE(o){var l=o,h=l.alternate;switch(l.tag){case 15:case 0:l=O4(h,l,l.pendingProps,l.type,void 0,jt);break;case 11:l=O4(h,l,l.pendingProps,l.type.render,l.ref,jt);break;case 5:S0(l);default:k4(h,l),l=wt=ed(l,jo),l=L4(h,l,jo)}o.memoizedProps=o.pendingProps,l===null?hp(o):wt=l}function Tc(o,l,h,y){aa=Fi=null,S0(l),yc=null,hd=0;var C=l.return;try{if(lU(o,C,l,h,jt)){En=1,ip(o,Dr(h,o.current)),wt=null;return}}catch(P){if(C!==null)throw wt=C,P;En=1,ip(o,Dr(h,o.current)),wt=null;return}l.flags&32768?(ht||y===1?o=!0:wc||(jt&536870912)!==0?o=!1:(Fs=o=!0,(y===2||y===9||y===3||y===6)&&(y=$i.current,y!==null&&y.tag===13&&(y.flags|=16384))),uE(l,o)):hp(l)}function hp(o){var l=o;do{if((l.flags&32768)!==0){uE(l,Fs);return}o=l.return;var h=cU(l.alternate,l,jo);if(h!==null){wt=h;return}if(l=l.sibling,l!==null){wt=l;return}wt=l=o}while(l!==null);En===0&&(En=5)}function uE(o,l){do{var h=fU(o.alternate,o);if(h!==null){h.flags&=32767,wt=h;return}if(h=o.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!l&&(o=o.sibling,o!==null)){wt=o;return}wt=o=h}while(o!==null);En=6,wt=null}function cE(o,l,h,y,C,P,K,ie,pe){o.cancelPendingCommit=null;do mp();while(hr!==0);if((Ft&6)!==0)throw Error(r(327));if(l!==null){if(l===o.current)throw Error(r(177));if(P=l.lanes|l.childLanes,P|=ui,qu(o,h,P,K,ie,pe),o===nn&&(wt=nn=null,jt=0),Cc=l,Hs=o,Ec=h,r1=P,i1=C,eE=y,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,SU(Be,function(){return pE(),null})):(o.callbackNode=null,o.callbackPriority=0),y=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||y){y=W.T,W.T=null,C=B.p,B.p=2,K=Ft,Ft|=4;try{dU(o,l,h)}finally{Ft=K,B.p=C,W.T=y}}hr=1,fE(),dE(),hE()}}function fE(){if(hr===1){hr=0;var o=Hs,l=Cc,h=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||h){h=W.T,W.T=null;var y=B.p;B.p=2;var C=Ft;Ft|=4;try{Y4(l,o);var P=_1,K=ql(o.containerInfo),ie=P.focusedElem,pe=P.selectionRange;if(K!==ie&&ie&&ie.ownerDocument&&ic(ie.ownerDocument.documentElement,ie)){if(pe!==null&&Gl(ie)){var Ee=pe.start,ke=pe.end;if(ke===void 0&&(ke=Ee),"selectionStart"in ie)ie.selectionStart=Ee,ie.selectionEnd=Math.min(ke,ie.value.length);else{var Ue=ie.ownerDocument||document,Oe=Ue&&Ue.defaultView||window;if(Oe.getSelection){var je=Oe.getSelection(),dt=ie.textContent.length,ct=Math.min(pe.start,dt),Gt=pe.end===void 0?ct:Math.min(pe.end,dt);!je.extend&&ct>Gt&&(K=Gt,Gt=ct,ct=K);var xe=Qf(ie,ct),ye=Qf(ie,Gt);if(xe&&ye&&(je.rangeCount!==1||je.anchorNode!==xe.node||je.anchorOffset!==xe.offset||je.focusNode!==ye.node||je.focusOffset!==ye.offset)){var Ce=Ue.createRange();Ce.setStart(xe.node,xe.offset),je.removeAllRanges(),ct>Gt?(je.addRange(Ce),je.extend(ye.node,ye.offset)):(Ce.setEnd(ye.node,ye.offset),je.addRange(Ce))}}}}for(Ue=[],je=ie;je=je.parentNode;)je.nodeType===1&&Ue.push({element:je,left:je.scrollLeft,top:je.scrollTop});for(typeof ie.focus=="function"&&ie.focus(),ie=0;ie<Ue.length;ie++){var Ie=Ue[ie];Ie.element.scrollLeft=Ie.left,Ie.element.scrollTop=Ie.top}}Ap=!!b1,_1=b1=null}finally{Ft=C,B.p=y,W.T=h}}o.current=l,hr=2}}function dE(){if(hr===2){hr=0;var o=Hs,l=Cc,h=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||h){h=W.T,W.T=null;var y=B.p;B.p=2;var C=Ft;Ft|=4;try{V4(o,l.alternate,l)}finally{Ft=C,B.p=y,W.T=h}}hr=3}}function hE(){if(hr===4||hr===3){hr=0,de();var o=Hs,l=Cc,h=Ec,y=eE;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?hr=5:(hr=0,Cc=Hs=null,mE(o,o.pendingLanes));var C=o.pendingLanes;if(C===0&&(Vs=null),on(h),l=l.stateNode,Ae&&typeof Ae.onCommitFiberRoot=="function")try{Ae.onCommitFiberRoot(Re,l,void 0,(l.current.flags&128)===128)}catch{}if(y!==null){l=W.T,C=B.p,B.p=2,W.T=null;try{for(var P=o.onRecoverableError,K=0;K<y.length;K++){var ie=y[K];P(ie.value,{componentStack:ie.stack})}}finally{W.T=l,B.p=C}}(Ec&3)!==0&&mp(),Fa(o),C=o.pendingLanes,(h&4194090)!==0&&(C&42)!==0?o===a1?wd++:(wd=0,a1=o):wd=0,Sd(0)}}function mE(o,l){(o.pooledCacheLanes&=l)===0&&(l=o.pooledCache,l!=null&&(o.pooledCache=null,nd(l)))}function mp(o){return fE(),dE(),hE(),pE()}function pE(){if(hr!==5)return!1;var o=Hs,l=r1;r1=0;var h=on(Ec),y=W.T,C=B.p;try{B.p=32>h?32:h,W.T=null,h=i1,i1=null;var P=Hs,K=Ec;if(hr=0,Cc=Hs=null,Ec=0,(Ft&6)!==0)throw Error(r(331));var ie=Ft;if(Ft|=4,Q4(P.current),K4(P,P.current,K,h),Ft=ie,Sd(0,!1),Ae&&typeof Ae.onPostCommitFiberRoot=="function")try{Ae.onPostCommitFiberRoot(Re,P)}catch{}return!0}finally{B.p=C,W.T=y,mE(o,l)}}function gE(o,l,h){l=Dr(h,l),l=I0(o.stateNode,l,2),o=Ls(o,l,2),o!==null&&(Oa(o,2),Fa(o))}function Wt(o,l,h){if(o.tag===3)gE(o,o,h);else for(;l!==null;){if(l.tag===3){gE(l,o,h);break}else if(l.tag===1){var y=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Vs===null||!Vs.has(y))){o=Dr(h,o),h=_4(2),y=Ls(l,h,2),y!==null&&(x4(h,y,l,o),Oa(y,2),Fa(y));break}}l=l.return}}function u1(o,l,h){var y=o.pingCache;if(y===null){y=o.pingCache=new pU;var C=new Set;y.set(l,C)}else C=y.get(l),C===void 0&&(C=new Set,y.set(l,C));C.has(h)||(J0=!0,C.add(h),o=_U.bind(null,o,l,h),l.then(o,o))}function _U(o,l,h){var y=o.pingCache;y!==null&&y.delete(l),o.pingedLanes|=o.suspendedLanes&h,o.warmLanes&=~h,nn===o&&(jt&h)===h&&(En===4||En===3&&(jt&62914560)===jt&&300>_e()-n1?(Ft&2)===0&&Ac(o,0):e1|=h,Sc===jt&&(Sc=0)),Fa(o)}function vE(o,l){l===0&&(l=ni()),o=Os(o,l),o!==null&&(Oa(o,l),Fa(o))}function xU(o){var l=o.memoizedState,h=0;l!==null&&(h=l.retryLane),vE(o,h)}function wU(o,l){var h=0;switch(o.tag){case 13:var y=o.stateNode,C=o.memoizedState;C!==null&&(h=C.retryLane);break;case 19:y=o.stateNode;break;case 22:y=o.stateNode._retryCache;break;default:throw Error(r(314))}y!==null&&y.delete(l),vE(o,h)}function SU(o,l){return ae(o,l)}var pp=null,Oc=null,c1=!1,gp=!1,f1=!1,su=0;function Fa(o){o!==Oc&&o.next===null&&(Oc===null?pp=Oc=o:Oc=Oc.next=o),gp=!0,c1||(c1=!0,EU())}function Sd(o,l){if(!f1&&gp){f1=!0;do for(var h=!1,y=pp;y!==null;){if(o!==0){var C=y.pendingLanes;if(C===0)var P=0;else{var K=y.suspendedLanes,ie=y.pingedLanes;P=(1<<31-Ve(42|o)+1)-1,P&=C&~(K&~ie),P=P&201326741?P&201326741|1:P?P|2:0}P!==0&&(h=!0,xE(y,P))}else P=jt,P=kt(y,y===nn?P:0,y.cancelPendingCommit!==null||y.timeoutHandle!==-1),(P&3)===0||wr(y,P)||(h=!0,xE(y,P));y=y.next}while(h);f1=!1}}function CU(){yE()}function yE(){gp=c1=!1;var o=0;su!==0&&(NU()&&(o=su),su=0);for(var l=_e(),h=null,y=pp;y!==null;){var C=y.next,P=bE(y,l);P===0?(y.next=null,h===null?pp=C:h.next=C,C===null&&(Oc=h)):(h=y,(o!==0||(P&3)!==0)&&(gp=!0)),y=C}Sd(o)}function bE(o,l){for(var h=o.suspendedLanes,y=o.pingedLanes,C=o.expirationTimes,P=o.pendingLanes&-62914561;0<P;){var K=31-Ve(P),ie=1<<K,pe=C[K];pe===-1?((ie&h)===0||(ie&y)!==0)&&(C[K]=$n(ie,l)):pe<=l&&(o.expiredLanes|=ie),P&=~ie}if(l=nn,h=jt,h=kt(o,o===l?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),y=o.callbackNode,h===0||o===l&&($t===2||$t===9)||o.cancelPendingCommit!==null)return y!==null&&y!==null&&fe(y),o.callbackNode=null,o.callbackPriority=0;if((h&3)===0||wr(o,h)){if(l=h&-h,l===o.callbackPriority)return l;switch(y!==null&&fe(y),on(h)){case 2:case 8:h=qe;break;case 32:h=Be;break;case 268435456:h=be;break;default:h=Be}return y=_E.bind(null,o),h=ae(h,y),o.callbackPriority=l,o.callbackNode=h,l}return y!==null&&y!==null&&fe(y),o.callbackPriority=2,o.callbackNode=null,2}function _E(o,l){if(hr!==0&&hr!==5)return o.callbackNode=null,o.callbackPriority=0,null;var h=o.callbackNode;if(mp()&&o.callbackNode!==h)return null;var y=jt;return y=kt(o,o===nn?y:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),y===0?null:(nE(o,y,l),bE(o,_e()),o.callbackNode!=null&&o.callbackNode===h?_E.bind(null,o):null)}function xE(o,l){if(mp())return null;nE(o,l,!0)}function EU(){DU(function(){(Ft&6)!==0?ae(Le,CU):yE()})}function d1(){return su===0&&(su=os()),su}function wE(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:ps(""+o)}function SE(o,l){var h=l.ownerDocument.createElement("input");return h.name=l.name,h.value=l.value,o.id&&h.setAttribute("form",o.id),l.parentNode.insertBefore(h,l),o=new FormData(o),h.parentNode.removeChild(h),o}function AU(o,l,h,y,C){if(l==="submit"&&h&&h.stateNode===C){var P=wE((C[Qt]||null).action),K=y.submitter;K&&(l=(l=K[Qt]||null)?wE(l.formAction):K.getAttribute("formAction"),l!==null&&(P=l,K=null));var ie=new zl("action","action",null,y,C);o.push({event:ie,listeners:[{instance:null,listener:function(){if(y.defaultPrevented){if(su!==0){var pe=K?SE(C,K):new FormData(C);R0(h,{pending:!0,data:pe,method:C.method,action:P},null,pe)}}else typeof P=="function"&&(ie.preventDefault(),pe=K?SE(C,K):new FormData(C),R0(h,{pending:!0,data:pe,method:C.method,action:P},P,pe))},currentTarget:C}]})}}for(var h1=0;h1<yo.length;h1++){var m1=yo[h1],TU=m1.toLowerCase(),OU=m1[0].toUpperCase()+m1.slice(1);li(TU,"on"+OU)}li(Lm,"onAnimationEnd"),li(si,"onAnimationIteration"),li(Yl,"onAnimationStart"),li("dblclick","onDoubleClick"),li("focusin","onFocus"),li("focusout","onBlur"),li(s0,"onTransitionRun"),li(lc,"onTransitionStart"),li(l0,"onTransitionCancel"),li(Jf,"onTransitionEnd"),ao("onMouseEnter",["mouseout","mouseover"]),ao("onMouseLeave",["mouseout","mouseover"]),ao("onPointerEnter",["pointerout","pointerover"]),ao("onPointerLeave",["pointerout","pointerover"]),io("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),io("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),io("onBeforeInput",["compositionend","keypress","textInput","paste"]),io("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),io("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),io("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cd="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),jU=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Cd));function CE(o,l){l=(l&4)!==0;for(var h=0;h<o.length;h++){var y=o[h],C=y.event;y=y.listeners;e:{var P=void 0;if(l)for(var K=y.length-1;0<=K;K--){var ie=y[K],pe=ie.instance,Ee=ie.currentTarget;if(ie=ie.listener,pe!==P&&C.isPropagationStopped())break e;P=ie,C.currentTarget=Ee;try{P(C)}catch(ke){rp(ke)}C.currentTarget=null,P=pe}else for(K=0;K<y.length;K++){if(ie=y[K],pe=ie.instance,Ee=ie.currentTarget,ie=ie.listener,pe!==P&&C.isPropagationStopped())break e;P=ie,C.currentTarget=Ee;try{P(C)}catch(ke){rp(ke)}C.currentTarget=null,P=pe}}}}function St(o,l){var h=l[Rn];h===void 0&&(h=l[Rn]=new Set);var y=o+"__bubble";h.has(y)||(EE(l,o,2,!1),h.add(y))}function p1(o,l,h){var y=0;l&&(y|=4),EE(h,o,y,l)}var vp="_reactListening"+Math.random().toString(36).slice(2);function g1(o){if(!o[vp]){o[vp]=!0,mm.forEach(function(h){h!=="selectionchange"&&(jU.has(h)||p1(h,!1,o),p1(h,!0,o))});var l=o.nodeType===9?o:o.ownerDocument;l===null||l[vp]||(l[vp]=!0,p1("selectionchange",!1,l))}}function EE(o,l,h,y){switch(KE(l)){case 2:var C=nB;break;case 8:C=rB;break;default:C=P1}h=C.bind(null,l,h,o),C=void 0,!Bl||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(C=!0),y?C!==void 0?o.addEventListener(l,h,{capture:!0,passive:C}):o.addEventListener(l,h,!0):C!==void 0?o.addEventListener(l,h,{passive:C}):o.addEventListener(l,h,!1)}function v1(o,l,h,y,C){var P=y;if((l&1)===0&&(l&2)===0&&y!==null)e:for(;;){if(y===null)return;var K=y.tag;if(K===3||K===4){var ie=y.stateNode.containerInfo;if(ie===C)break;if(K===4)for(K=y.return;K!==null;){var pe=K.tag;if((pe===3||pe===4)&&K.stateNode.containerInfo===C)return;K=K.return}for(;ie!==null;){if(K=Pa(ie),K===null)return;if(pe=K.tag,pe===5||pe===6||pe===26||pe===27){y=P=K;continue e}ie=ie.parentNode}}y=y.return}ri(function(){var Ee=P,ke=gs(h),Ue=[];e:{var Oe=Dm.get(o);if(Oe!==void 0){var je=zl,dt=o;switch(o){case"keypress":if(Cn(h)===0)break e;case"keydown":case"keyup":je=Jy;break;case"focusin":dt="focus",je=Vf;break;case"focusout":dt="blur",je=Vf;break;case"beforeblur":case"afterblur":je=Vf;break;case"click":if(h.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":je=bs;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":je=Wy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":je=t0;break;case Lm:case si:case Yl:je=Ky;break;case Jf:je=n0;break;case"scroll":case"scrollend":je=Yy;break;case"wheel":je=Em;break;case"copy":case"cut":case"paste":je=Hf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":je=Gf;break;case"toggle":case"beforetoggle":je=mo}var ct=(l&4)!==0,Gt=!ct&&(o==="scroll"||o==="scrollend"),xe=ct?Oe!==null?Oe+"Capture":null:Oe;ct=[];for(var ye=Ee,Ce;ye!==null;){var Ie=ye;if(Ce=Ie.stateNode,Ie=Ie.tag,Ie!==5&&Ie!==26&&Ie!==27||Ce===null||xe===null||(Ie=It(ye,xe),Ie!=null&&ct.push(Ed(ye,Ie,Ce))),Gt)break;ye=ye.return}0<ct.length&&(Oe=new je(Oe,dt,null,h,ke),Ue.push({event:Oe,listeners:ct}))}}if((l&7)===0){e:{if(Oe=o==="mouseover"||o==="pointerover",je=o==="mouseout"||o==="pointerout",Oe&&h!==Ul&&(dt=h.relatedTarget||h.fromElement)&&(Pa(dt)||dt[Jn]))break e;if((je||Oe)&&(Oe=ke.window===ke?ke:(Oe=ke.ownerDocument)?Oe.defaultView||Oe.parentWindow:window,je?(dt=h.relatedTarget||h.toElement,je=Ee,dt=dt?Pa(dt):null,dt!==null&&(Gt=a(dt),ct=dt.tag,dt!==Gt||ct!==5&&ct!==27&&ct!==6)&&(dt=null)):(je=null,dt=Ee),je!==dt)){if(ct=bs,Ie="onMouseLeave",xe="onMouseEnter",ye="mouse",(o==="pointerout"||o==="pointerover")&&(ct=Gf,Ie="onPointerLeave",xe="onPointerEnter",ye="pointer"),Gt=je==null?Oe:Li(je),Ce=dt==null?Oe:Li(dt),Oe=new ct(Ie,ye+"leave",je,h,ke),Oe.target=Gt,Oe.relatedTarget=Ce,Ie=null,Pa(ke)===Ee&&(ct=new ct(xe,ye+"enter",dt,h,ke),ct.target=Ce,ct.relatedTarget=Gt,Ie=ct),Gt=Ie,je&&dt)t:{for(ct=je,xe=dt,ye=0,Ce=ct;Ce;Ce=jc(Ce))ye++;for(Ce=0,Ie=xe;Ie;Ie=jc(Ie))Ce++;for(;0<ye-Ce;)ct=jc(ct),ye--;for(;0<Ce-ye;)xe=jc(xe),Ce--;for(;ye--;){if(ct===xe||xe!==null&&ct===xe.alternate)break t;ct=jc(ct),xe=jc(xe)}ct=null}else ct=null;je!==null&&AE(Ue,Oe,je,ct,!1),dt!==null&&Gt!==null&&AE(Ue,Gt,dt,ct,!0)}}e:{if(Oe=Ee?Li(Ee):window,je=Oe.nodeName&&Oe.nodeName.toLowerCase(),je==="select"||je==="input"&&Oe.type==="file")var nt=ws;else if(go(Oe))if(Kf)nt=o0;else{nt=a0;var xt=Xf}else je=Oe.nodeName,!je||je.toLowerCase()!=="input"||Oe.type!=="checkbox"&&Oe.type!=="radio"?Ee&&Il(Ee.elementType)&&(nt=ws):nt=ia;if(nt&&(nt=nt(o,Ee))){Pm(Ue,nt,h,ke);break e}xt&&xt(o,Oe,Ee),o==="focusout"&&Ee&&Oe.type==="number"&&Ee.memoizedProps.value!=null&&hs(Oe,"number",Oe.value)}switch(xt=Ee?Li(Ee):window,o){case"focusin":(go(xt)||xt.contentEditable==="true")&&(oi=xt,Es=Ee,vo=null);break;case"focusout":vo=Es=oi=null;break;case"mousedown":oc=!0;break;case"contextmenu":case"mouseup":case"dragend":oc=!1,Rm(Ue,h,ke);break;case"selectionchange":if(ac)break;case"keydown":case"keyup":Rm(Ue,h,ke)}var st;if(po)e:{switch(o){case"compositionstart":var ft="onCompositionStart";break e;case"compositionend":ft="onCompositionEnd";break e;case"compositionupdate":ft="onCompositionUpdate";break e}ft=void 0}else _s?nc(o,h)&&(ft="onCompositionEnd"):o==="keydown"&&h.keyCode===229&&(ft="onCompositionStart");ft&&(Wf&&h.locale!=="ko"&&(_s||ft!=="onCompositionStart"?ft==="onCompositionEnd"&&_s&&(st=ys()):(Ii=ke,na="value"in Ii?Ii.value:Ii.textContent,_s=!0)),xt=yp(Ee,ft),0<xt.length&&(ft=new ii(ft,o,null,h,ke),Ue.push({event:ft,listeners:xt}),st?ft.data=st:(st=Om(h),st!==null&&(ft.data=st)))),(st=Am?jm(o,h):i0(o,h))&&(ft=yp(Ee,"onBeforeInput"),0<ft.length&&(xt=new ii("onBeforeInput","beforeinput",null,h,ke),Ue.push({event:xt,listeners:ft}),xt.data=st)),AU(Ue,o,Ee,h,ke)}CE(Ue,l)})}function Ed(o,l,h){return{instance:o,listener:l,currentTarget:h}}function yp(o,l){for(var h=l+"Capture",y=[];o!==null;){var C=o,P=C.stateNode;if(C=C.tag,C!==5&&C!==26&&C!==27||P===null||(C=It(o,h),C!=null&&y.unshift(Ed(o,C,P)),C=It(o,l),C!=null&&y.push(Ed(o,C,P))),o.tag===3)return y;o=o.return}return[]}function jc(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function AE(o,l,h,y,C){for(var P=l._reactName,K=[];h!==null&&h!==y;){var ie=h,pe=ie.alternate,Ee=ie.stateNode;if(ie=ie.tag,pe!==null&&pe===y)break;ie!==5&&ie!==26&&ie!==27||Ee===null||(pe=Ee,C?(Ee=It(h,P),Ee!=null&&K.unshift(Ed(h,Ee,pe))):C||(Ee=It(h,P),Ee!=null&&K.push(Ed(h,Ee,pe)))),h=h.return}K.length!==0&&o.push({event:l,listeners:K})}var PU=/\r\n?/g,MU=/\u0000|\uFFFD/g;function TE(o){return(typeof o=="string"?o:""+o).replace(PU,`
`).replace(MU,"")}function OE(o,l){return l=TE(l),TE(o)===l}function bp(){}function qt(o,l,h,y,C,P){switch(h){case"children":typeof y=="string"?l==="body"||l==="textarea"&&y===""||Di(o,y):(typeof y=="number"||typeof y=="bigint")&&l!=="body"&&Di(o,""+y);break;case"className":Wu(o,"class",y);break;case"tabIndex":Wu(o,"tabindex",y);break;case"dir":case"role":case"viewBox":case"width":case"height":Wu(o,h,y);break;case"style":ms(o,y,P);break;case"data":if(l!=="object"){Wu(o,"data",y);break}case"src":case"href":if(y===""&&(l!=="a"||h!=="href")){o.removeAttribute(h);break}if(y==null||typeof y=="function"||typeof y=="symbol"||typeof y=="boolean"){o.removeAttribute(h);break}y=ps(""+y),o.setAttribute(h,y);break;case"action":case"formAction":if(typeof y=="function"){o.setAttribute(h,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof P=="function"&&(h==="formAction"?(l!=="input"&&qt(o,l,"name",C.name,C,null),qt(o,l,"formEncType",C.formEncType,C,null),qt(o,l,"formMethod",C.formMethod,C,null),qt(o,l,"formTarget",C.formTarget,C,null)):(qt(o,l,"encType",C.encType,C,null),qt(o,l,"method",C.method,C,null),qt(o,l,"target",C.target,C,null)));if(y==null||typeof y=="symbol"||typeof y=="boolean"){o.removeAttribute(h);break}y=ps(""+y),o.setAttribute(h,y);break;case"onClick":y!=null&&(o.onclick=bp);break;case"onScroll":y!=null&&St("scroll",o);break;case"onScrollEnd":y!=null&&St("scrollend",o);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(r(61));if(h=y.__html,h!=null){if(C.children!=null)throw Error(r(60));o.innerHTML=h}}break;case"multiple":o.multiple=y&&typeof y!="function"&&typeof y!="symbol";break;case"muted":o.muted=y&&typeof y!="function"&&typeof y!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(y==null||typeof y=="function"||typeof y=="boolean"||typeof y=="symbol"){o.removeAttribute("xlink:href");break}h=ps(""+y),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",h);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":y!=null&&typeof y!="function"&&typeof y!="symbol"?o.setAttribute(h,""+y):o.removeAttribute(h);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":y&&typeof y!="function"&&typeof y!="symbol"?o.setAttribute(h,""):o.removeAttribute(h);break;case"capture":case"download":y===!0?o.setAttribute(h,""):y!==!1&&y!=null&&typeof y!="function"&&typeof y!="symbol"?o.setAttribute(h,y):o.removeAttribute(h);break;case"cols":case"rows":case"size":case"span":y!=null&&typeof y!="function"&&typeof y!="symbol"&&!isNaN(y)&&1<=y?o.setAttribute(h,y):o.removeAttribute(h);break;case"rowSpan":case"start":y==null||typeof y=="function"||typeof y=="symbol"||isNaN(y)?o.removeAttribute(h):o.setAttribute(h,y);break;case"popover":St("beforetoggle",o),St("toggle",o),Yu(o,"popover",y);break;case"xlinkActuate":ta(o,"http://www.w3.org/1999/xlink","xlink:actuate",y);break;case"xlinkArcrole":ta(o,"http://www.w3.org/1999/xlink","xlink:arcrole",y);break;case"xlinkRole":ta(o,"http://www.w3.org/1999/xlink","xlink:role",y);break;case"xlinkShow":ta(o,"http://www.w3.org/1999/xlink","xlink:show",y);break;case"xlinkTitle":ta(o,"http://www.w3.org/1999/xlink","xlink:title",y);break;case"xlinkType":ta(o,"http://www.w3.org/1999/xlink","xlink:type",y);break;case"xmlBase":ta(o,"http://www.w3.org/XML/1998/namespace","xml:base",y);break;case"xmlLang":ta(o,"http://www.w3.org/XML/1998/namespace","xml:lang",y);break;case"xmlSpace":ta(o,"http://www.w3.org/XML/1998/namespace","xml:space",y);break;case"is":Yu(o,"is",y);break;case"innerText":case"textContent":break;default:(!(2<h.length)||h[0]!=="o"&&h[0]!=="O"||h[1]!=="n"&&h[1]!=="N")&&(h=zf.get(h)||h,Yu(o,h,y))}}function y1(o,l,h,y,C,P){switch(h){case"style":ms(o,y,P);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(r(61));if(h=y.__html,h!=null){if(C.children!=null)throw Error(r(60));o.innerHTML=h}}break;case"children":typeof y=="string"?Di(o,y):(typeof y=="number"||typeof y=="bigint")&&Di(o,""+y);break;case"onScroll":y!=null&&St("scroll",o);break;case"onScrollEnd":y!=null&&St("scrollend",o);break;case"onClick":y!=null&&(o.onclick=bp);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!pm.hasOwnProperty(h))e:{if(h[0]==="o"&&h[1]==="n"&&(C=h.endsWith("Capture"),l=h.slice(2,C?h.length-7:void 0),P=o[Qt]||null,P=P!=null?P[h]:null,typeof P=="function"&&o.removeEventListener(l,P,C),typeof y=="function")){typeof P!="function"&&P!==null&&(h in o?o[h]=null:o.hasAttribute(h)&&o.removeAttribute(h)),o.addEventListener(l,y,C);break e}h in o?o[h]=y:y===!0?o.setAttribute(h,""):Yu(o,h,y)}}}function mr(o,l,h){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":St("error",o),St("load",o);var y=!1,C=!1,P;for(P in h)if(h.hasOwnProperty(P)){var K=h[P];if(K!=null)switch(P){case"src":y=!0;break;case"srcSet":C=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:qt(o,l,P,K,h,null)}}C&&qt(o,l,"srcSet",h.srcSet,h,null),y&&qt(o,l,"src",h.src,h,null);return;case"input":St("invalid",o);var ie=P=K=C=null,pe=null,Ee=null;for(y in h)if(h.hasOwnProperty(y)){var ke=h[y];if(ke!=null)switch(y){case"name":C=ke;break;case"type":K=ke;break;case"checked":pe=ke;break;case"defaultChecked":Ee=ke;break;case"value":P=ke;break;case"defaultValue":ie=ke;break;case"children":case"dangerouslySetInnerHTML":if(ke!=null)throw Error(r(137,l));break;default:qt(o,l,y,ke,h,null)}}vm(o,P,ie,pe,Ee,K,C,!1),ds(o);return;case"select":St("invalid",o),y=K=P=null;for(C in h)if(h.hasOwnProperty(C)&&(ie=h[C],ie!=null))switch(C){case"value":P=ie;break;case"defaultValue":K=ie;break;case"multiple":y=ie;default:qt(o,l,C,ie,h,null)}l=P,h=K,o.multiple=!!y,l!=null?qr(o,!!y,l,!1):h!=null&&qr(o,!!y,h,!0);return;case"textarea":St("invalid",o),P=C=y=null;for(K in h)if(h.hasOwnProperty(K)&&(ie=h[K],ie!=null))switch(K){case"value":y=ie;break;case"defaultValue":C=ie;break;case"children":P=ie;break;case"dangerouslySetInnerHTML":if(ie!=null)throw Error(r(91));break;default:qt(o,l,K,ie,h,null)}Ma(o,y,C,P),ds(o);return;case"option":for(pe in h)if(h.hasOwnProperty(pe)&&(y=h[pe],y!=null))switch(pe){case"selected":o.selected=y&&typeof y!="function"&&typeof y!="symbol";break;default:qt(o,l,pe,y,h,null)}return;case"dialog":St("beforetoggle",o),St("toggle",o),St("cancel",o),St("close",o);break;case"iframe":case"object":St("load",o);break;case"video":case"audio":for(y=0;y<Cd.length;y++)St(Cd[y],o);break;case"image":St("error",o),St("load",o);break;case"details":St("toggle",o);break;case"embed":case"source":case"link":St("error",o),St("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Ee in h)if(h.hasOwnProperty(Ee)&&(y=h[Ee],y!=null))switch(Ee){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:qt(o,l,Ee,y,h,null)}return;default:if(Il(l)){for(ke in h)h.hasOwnProperty(ke)&&(y=h[ke],y!==void 0&&y1(o,l,ke,y,h,void 0));return}}for(ie in h)h.hasOwnProperty(ie)&&(y=h[ie],y!=null&&qt(o,l,ie,y,h,null))}function RU(o,l,h,y){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var C=null,P=null,K=null,ie=null,pe=null,Ee=null,ke=null;for(je in h){var Ue=h[je];if(h.hasOwnProperty(je)&&Ue!=null)switch(je){case"checked":break;case"value":break;case"defaultValue":pe=Ue;default:y.hasOwnProperty(je)||qt(o,l,je,null,y,Ue)}}for(var Oe in y){var je=y[Oe];if(Ue=h[Oe],y.hasOwnProperty(Oe)&&(je!=null||Ue!=null))switch(Oe){case"type":P=je;break;case"name":C=je;break;case"checked":Ee=je;break;case"defaultChecked":ke=je;break;case"value":K=je;break;case"defaultValue":ie=je;break;case"children":case"dangerouslySetInnerHTML":if(je!=null)throw Error(r(137,l));break;default:je!==Ue&&qt(o,l,Oe,je,y,Ue)}}Sr(o,K,ie,pe,Ee,ke,P,C);return;case"select":je=K=ie=Oe=null;for(P in h)if(pe=h[P],h.hasOwnProperty(P)&&pe!=null)switch(P){case"value":break;case"multiple":je=pe;default:y.hasOwnProperty(P)||qt(o,l,P,null,y,pe)}for(C in y)if(P=y[C],pe=h[C],y.hasOwnProperty(C)&&(P!=null||pe!=null))switch(C){case"value":Oe=P;break;case"defaultValue":ie=P;break;case"multiple":K=P;default:P!==pe&&qt(o,l,C,P,y,pe)}l=ie,h=K,y=je,Oe!=null?qr(o,!!h,Oe,!1):!!y!=!!h&&(l!=null?qr(o,!!h,l,!0):qr(o,!!h,h?[]:"",!1));return;case"textarea":je=Oe=null;for(ie in h)if(C=h[ie],h.hasOwnProperty(ie)&&C!=null&&!y.hasOwnProperty(ie))switch(ie){case"value":break;case"children":break;default:qt(o,l,ie,null,y,C)}for(K in y)if(C=y[K],P=h[K],y.hasOwnProperty(K)&&(C!=null||P!=null))switch(K){case"value":Oe=C;break;case"defaultValue":je=C;break;case"children":break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(r(91));break;default:C!==P&&qt(o,l,K,C,y,P)}bn(o,Oe,je);return;case"option":for(var dt in h)if(Oe=h[dt],h.hasOwnProperty(dt)&&Oe!=null&&!y.hasOwnProperty(dt))switch(dt){case"selected":o.selected=!1;break;default:qt(o,l,dt,null,y,Oe)}for(pe in y)if(Oe=y[pe],je=h[pe],y.hasOwnProperty(pe)&&Oe!==je&&(Oe!=null||je!=null))switch(pe){case"selected":o.selected=Oe&&typeof Oe!="function"&&typeof Oe!="symbol";break;default:qt(o,l,pe,Oe,y,je)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ct in h)Oe=h[ct],h.hasOwnProperty(ct)&&Oe!=null&&!y.hasOwnProperty(ct)&&qt(o,l,ct,null,y,Oe);for(Ee in y)if(Oe=y[Ee],je=h[Ee],y.hasOwnProperty(Ee)&&Oe!==je&&(Oe!=null||je!=null))switch(Ee){case"children":case"dangerouslySetInnerHTML":if(Oe!=null)throw Error(r(137,l));break;default:qt(o,l,Ee,Oe,y,je)}return;default:if(Il(l)){for(var Gt in h)Oe=h[Gt],h.hasOwnProperty(Gt)&&Oe!==void 0&&!y.hasOwnProperty(Gt)&&y1(o,l,Gt,void 0,y,Oe);for(ke in y)Oe=y[ke],je=h[ke],!y.hasOwnProperty(ke)||Oe===je||Oe===void 0&&je===void 0||y1(o,l,ke,Oe,y,je);return}}for(var xe in h)Oe=h[xe],h.hasOwnProperty(xe)&&Oe!=null&&!y.hasOwnProperty(xe)&&qt(o,l,xe,null,y,Oe);for(Ue in y)Oe=y[Ue],je=h[Ue],!y.hasOwnProperty(Ue)||Oe===je||Oe==null&&je==null||qt(o,l,Ue,Oe,y,je)}var b1=null,_1=null;function _p(o){return o.nodeType===9?o:o.ownerDocument}function jE(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function PE(o,l){if(o===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&l==="foreignObject"?0:o}function x1(o,l){return o==="textarea"||o==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var w1=null;function NU(){var o=window.event;return o&&o.type==="popstate"?o===w1?!1:(w1=o,!0):(w1=null,!1)}var ME=typeof setTimeout=="function"?setTimeout:void 0,LU=typeof clearTimeout=="function"?clearTimeout:void 0,RE=typeof Promise=="function"?Promise:void 0,DU=typeof queueMicrotask=="function"?queueMicrotask:typeof RE<"u"?function(o){return RE.resolve(null).then(o).catch(kU)}:ME;function kU(o){setTimeout(function(){throw o})}function Gs(o){return o==="head"}function NE(o,l){var h=l,y=0,C=0;do{var P=h.nextSibling;if(o.removeChild(h),P&&P.nodeType===8)if(h=P.data,h==="/$"){if(0<y&&8>y){h=y;var K=o.ownerDocument;if(h&1&&Ad(K.documentElement),h&2&&Ad(K.body),h&4)for(h=K.head,Ad(h),K=h.firstChild;K;){var ie=K.nextSibling,pe=K.nodeName;K[us]||pe==="SCRIPT"||pe==="STYLE"||pe==="LINK"&&K.rel.toLowerCase()==="stylesheet"||h.removeChild(K),K=ie}}if(C===0){o.removeChild(P),Ld(l);return}C--}else h==="$"||h==="$?"||h==="$!"?C++:y=h.charCodeAt(0)-48;else y=0;h=P}while(h);Ld(l)}function S1(o){var l=o.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var h=l;switch(l=l.nextSibling,h.nodeName){case"HTML":case"HEAD":case"BODY":S1(h),Gu(h);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(h.rel.toLowerCase()==="stylesheet")continue}o.removeChild(h)}}function IU(o,l,h,y){for(;o.nodeType===1;){var C=h;if(o.nodeName.toLowerCase()!==l.toLowerCase()){if(!y&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(y){if(!o[us])switch(l){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(P=o.getAttribute("rel"),P==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(P!==C.rel||o.getAttribute("href")!==(C.href==null||C.href===""?null:C.href)||o.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin)||o.getAttribute("title")!==(C.title==null?null:C.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(P=o.getAttribute("src"),(P!==(C.src==null?null:C.src)||o.getAttribute("type")!==(C.type==null?null:C.type)||o.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin))&&P&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(l==="input"&&o.type==="hidden"){var P=C.name==null?null:""+C.name;if(C.type==="hidden"&&o.getAttribute("name")===P)return o}else return o;if(o=la(o.nextSibling),o===null)break}return null}function UU(o,l,h){if(l==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!h||(o=la(o.nextSibling),o===null))return null;return o}function C1(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState==="complete"}function BU(o,l){var h=o.ownerDocument;if(o.data!=="$?"||h.readyState==="complete")l();else{var y=function(){l(),h.removeEventListener("DOMContentLoaded",y)};h.addEventListener("DOMContentLoaded",y),o._reactRetry=y}}function la(o){for(;o!=null;o=o.nextSibling){var l=o.nodeType;if(l===1||l===3)break;if(l===8){if(l=o.data,l==="$"||l==="$!"||l==="$?"||l==="F!"||l==="F")break;if(l==="/$")return null}}return o}var E1=null;function LE(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var h=o.data;if(h==="$"||h==="$!"||h==="$?"){if(l===0)return o;l--}else h==="/$"&&l++}o=o.previousSibling}return null}function DE(o,l,h){switch(l=_p(h),o){case"html":if(o=l.documentElement,!o)throw Error(r(452));return o;case"head":if(o=l.head,!o)throw Error(r(453));return o;case"body":if(o=l.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function Ad(o){for(var l=o.attributes;l.length;)o.removeAttributeNode(l[0]);Gu(o)}var Hi=new Map,kE=new Set;function xp(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var Po=B.d;B.d={f:zU,r:FU,D:$U,C:VU,L:HU,m:qU,X:YU,S:GU,M:WU};function zU(){var o=Po.f(),l=dp();return o||l}function FU(o){var l=no(o);l!==null&&l.tag===5&&l.type==="form"?n4(l):Po.r(o)}var Pc=typeof document>"u"?null:document;function IE(o,l,h){var y=Pc;if(y&&typeof l=="string"&&l){var C=cr(l);C='link[rel="'+o+'"][href="'+C+'"]',typeof h=="string"&&(C+='[crossorigin="'+h+'"]'),kE.has(C)||(kE.add(C),o={rel:o,crossOrigin:h,href:l},y.querySelector(C)===null&&(l=y.createElement("link"),mr(l,"link",o),In(l),y.head.appendChild(l)))}}function $U(o){Po.D(o),IE("dns-prefetch",o,null)}function VU(o,l){Po.C(o,l),IE("preconnect",o,l)}function HU(o,l,h){Po.L(o,l,h);var y=Pc;if(y&&o&&l){var C='link[rel="preload"][as="'+cr(l)+'"]';l==="image"&&h&&h.imageSrcSet?(C+='[imagesrcset="'+cr(h.imageSrcSet)+'"]',typeof h.imageSizes=="string"&&(C+='[imagesizes="'+cr(h.imageSizes)+'"]')):C+='[href="'+cr(o)+'"]';var P=C;switch(l){case"style":P=Mc(o);break;case"script":P=Rc(o)}Hi.has(P)||(o=m({rel:"preload",href:l==="image"&&h&&h.imageSrcSet?void 0:o,as:l},h),Hi.set(P,o),y.querySelector(C)!==null||l==="style"&&y.querySelector(Td(P))||l==="script"&&y.querySelector(Od(P))||(l=y.createElement("link"),mr(l,"link",o),In(l),y.head.appendChild(l)))}}function qU(o,l){Po.m(o,l);var h=Pc;if(h&&o){var y=l&&typeof l.as=="string"?l.as:"script",C='link[rel="modulepreload"][as="'+cr(y)+'"][href="'+cr(o)+'"]',P=C;switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":P=Rc(o)}if(!Hi.has(P)&&(o=m({rel:"modulepreload",href:o},l),Hi.set(P,o),h.querySelector(C)===null)){switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(h.querySelector(Od(P)))return}y=h.createElement("link"),mr(y,"link",o),In(y),h.head.appendChild(y)}}}function GU(o,l,h){Po.S(o,l,h);var y=Pc;if(y&&o){var C=ro(y).hoistableStyles,P=Mc(o);l=l||"default";var K=C.get(P);if(!K){var ie={loading:0,preload:null};if(K=y.querySelector(Td(P)))ie.loading=5;else{o=m({rel:"stylesheet",href:o,"data-precedence":l},h),(h=Hi.get(P))&&A1(o,h);var pe=K=y.createElement("link");In(pe),mr(pe,"link",o),pe._p=new Promise(function(Ee,ke){pe.onload=Ee,pe.onerror=ke}),pe.addEventListener("load",function(){ie.loading|=1}),pe.addEventListener("error",function(){ie.loading|=2}),ie.loading|=4,wp(K,l,y)}K={type:"stylesheet",instance:K,count:1,state:ie},C.set(P,K)}}}function YU(o,l){Po.X(o,l);var h=Pc;if(h&&o){var y=ro(h).hoistableScripts,C=Rc(o),P=y.get(C);P||(P=h.querySelector(Od(C)),P||(o=m({src:o,async:!0},l),(l=Hi.get(C))&&T1(o,l),P=h.createElement("script"),In(P),mr(P,"link",o),h.head.appendChild(P)),P={type:"script",instance:P,count:1,state:null},y.set(C,P))}}function WU(o,l){Po.M(o,l);var h=Pc;if(h&&o){var y=ro(h).hoistableScripts,C=Rc(o),P=y.get(C);P||(P=h.querySelector(Od(C)),P||(o=m({src:o,async:!0,type:"module"},l),(l=Hi.get(C))&&T1(o,l),P=h.createElement("script"),In(P),mr(P,"link",o),h.head.appendChild(P)),P={type:"script",instance:P,count:1,state:null},y.set(C,P))}}function UE(o,l,h,y){var C=(C=ce.current)?xp(C):null;if(!C)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof h.precedence=="string"&&typeof h.href=="string"?(l=Mc(h.href),h=ro(C).hoistableStyles,y=h.get(l),y||(y={type:"style",instance:null,count:0,state:null},h.set(l,y)),y):{type:"void",instance:null,count:0,state:null};case"link":if(h.rel==="stylesheet"&&typeof h.href=="string"&&typeof h.precedence=="string"){o=Mc(h.href);var P=ro(C).hoistableStyles,K=P.get(o);if(K||(C=C.ownerDocument||C,K={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},P.set(o,K),(P=C.querySelector(Td(o)))&&!P._p&&(K.instance=P,K.state.loading=5),Hi.has(o)||(h={rel:"preload",as:"style",href:h.href,crossOrigin:h.crossOrigin,integrity:h.integrity,media:h.media,hrefLang:h.hrefLang,referrerPolicy:h.referrerPolicy},Hi.set(o,h),P||KU(C,o,h,K.state))),l&&y===null)throw Error(r(528,""));return K}if(l&&y!==null)throw Error(r(529,""));return null;case"script":return l=h.async,h=h.src,typeof h=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Rc(h),h=ro(C).hoistableScripts,y=h.get(l),y||(y={type:"script",instance:null,count:0,state:null},h.set(l,y)),y):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function Mc(o){return'href="'+cr(o)+'"'}function Td(o){return'link[rel="stylesheet"]['+o+"]"}function BE(o){return m({},o,{"data-precedence":o.precedence,precedence:null})}function KU(o,l,h,y){o.querySelector('link[rel="preload"][as="style"]['+l+"]")?y.loading=1:(l=o.createElement("link"),y.preload=l,l.addEventListener("load",function(){return y.loading|=1}),l.addEventListener("error",function(){return y.loading|=2}),mr(l,"link",h),In(l),o.head.appendChild(l))}function Rc(o){return'[src="'+cr(o)+'"]'}function Od(o){return"script[async]"+o}function zE(o,l,h){if(l.count++,l.instance===null)switch(l.type){case"style":var y=o.querySelector('style[data-href~="'+cr(h.href)+'"]');if(y)return l.instance=y,In(y),y;var C=m({},h,{"data-href":h.href,"data-precedence":h.precedence,href:null,precedence:null});return y=(o.ownerDocument||o).createElement("style"),In(y),mr(y,"style",C),wp(y,h.precedence,o),l.instance=y;case"stylesheet":C=Mc(h.href);var P=o.querySelector(Td(C));if(P)return l.state.loading|=4,l.instance=P,In(P),P;y=BE(h),(C=Hi.get(C))&&A1(y,C),P=(o.ownerDocument||o).createElement("link"),In(P);var K=P;return K._p=new Promise(function(ie,pe){K.onload=ie,K.onerror=pe}),mr(P,"link",y),l.state.loading|=4,wp(P,h.precedence,o),l.instance=P;case"script":return P=Rc(h.src),(C=o.querySelector(Od(P)))?(l.instance=C,In(C),C):(y=h,(C=Hi.get(P))&&(y=m({},h),T1(y,C)),o=o.ownerDocument||o,C=o.createElement("script"),In(C),mr(C,"link",y),o.head.appendChild(C),l.instance=C);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(y=l.instance,l.state.loading|=4,wp(y,h.precedence,o));return l.instance}function wp(o,l,h){for(var y=h.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),C=y.length?y[y.length-1]:null,P=C,K=0;K<y.length;K++){var ie=y[K];if(ie.dataset.precedence===l)P=ie;else if(P!==C)break}P?P.parentNode.insertBefore(o,P.nextSibling):(l=h.nodeType===9?h.head:h,l.insertBefore(o,l.firstChild))}function A1(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.title==null&&(o.title=l.title)}function T1(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.integrity==null&&(o.integrity=l.integrity)}var Sp=null;function FE(o,l,h){if(Sp===null){var y=new Map,C=Sp=new Map;C.set(h,y)}else C=Sp,y=C.get(h),y||(y=new Map,C.set(h,y));if(y.has(o))return y;for(y.set(o,null),h=h.getElementsByTagName(o),C=0;C<h.length;C++){var P=h[C];if(!(P[us]||P[At]||o==="link"&&P.getAttribute("rel")==="stylesheet")&&P.namespaceURI!=="http://www.w3.org/2000/svg"){var K=P.getAttribute(l)||"";K=o+K;var ie=y.get(K);ie?ie.push(P):y.set(K,[P])}}return y}function $E(o,l,h){o=o.ownerDocument||o,o.head.insertBefore(h,l==="title"?o.querySelector("head > title"):null)}function ZU(o,l,h){if(h===1||l.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return o=l.disabled,typeof l.precedence=="string"&&o==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function VE(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}var jd=null;function XU(){}function QU(o,l,h){if(jd===null)throw Error(r(475));var y=jd;if(l.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var C=Mc(h.href),P=o.querySelector(Td(C));if(P){o=P._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(y.count++,y=Cp.bind(y),o.then(y,y)),l.state.loading|=4,l.instance=P,In(P);return}P=o.ownerDocument||o,h=BE(h),(C=Hi.get(C))&&A1(h,C),P=P.createElement("link"),In(P);var K=P;K._p=new Promise(function(ie,pe){K.onload=ie,K.onerror=pe}),mr(P,"link",h),l.instance=P}y.stylesheets===null&&(y.stylesheets=new Map),y.stylesheets.set(l,o),(o=l.state.preload)&&(l.state.loading&3)===0&&(y.count++,l=Cp.bind(y),o.addEventListener("load",l),o.addEventListener("error",l))}}function JU(){if(jd===null)throw Error(r(475));var o=jd;return o.stylesheets&&o.count===0&&O1(o,o.stylesheets),0<o.count?function(l){var h=setTimeout(function(){if(o.stylesheets&&O1(o,o.stylesheets),o.unsuspend){var y=o.unsuspend;o.unsuspend=null,y()}},6e4);return o.unsuspend=l,function(){o.unsuspend=null,clearTimeout(h)}}:null}function Cp(){if(this.count--,this.count===0){if(this.stylesheets)O1(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var Ep=null;function O1(o,l){o.stylesheets=null,o.unsuspend!==null&&(o.count++,Ep=new Map,l.forEach(eB,o),Ep=null,Cp.call(o))}function eB(o,l){if(!(l.state.loading&4)){var h=Ep.get(o);if(h)var y=h.get(null);else{h=new Map,Ep.set(o,h);for(var C=o.querySelectorAll("link[data-precedence],style[data-precedence]"),P=0;P<C.length;P++){var K=C[P];(K.nodeName==="LINK"||K.getAttribute("media")!=="not all")&&(h.set(K.dataset.precedence,K),y=K)}y&&h.set(null,y)}C=l.instance,K=C.getAttribute("data-precedence"),P=h.get(K)||y,P===y&&h.set(null,C),h.set(K,C),this.count++,y=Cp.bind(this),C.addEventListener("load",y),C.addEventListener("error",y),P?P.parentNode.insertBefore(C,P.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(C,o.firstChild)),l.state.loading|=4}}var Pd={$$typeof:O,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function tB(o,l,h,y,C,P,K,ie){this.tag=1,this.containerInfo=o,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ss(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ss(0),this.hiddenUpdates=ss(null),this.identifierPrefix=y,this.onUncaughtError=C,this.onCaughtError=P,this.onRecoverableError=K,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ie,this.incompleteTransitions=new Map}function HE(o,l,h,y,C,P,K,ie,pe,Ee,ke,Ue){return o=new tB(o,l,h,K,ie,pe,Ee,Ue),l=1,P===!0&&(l|=24),P=Ir(3,null,null,l),o.current=P,P.stateNode=o,l=u0(),l.refCount++,o.pooledCache=l,l.refCount++,P.memoizedState={element:y,isDehydrated:h,cache:l},h0(P),o}function qE(o){return o?(o=xo,o):xo}function GE(o,l,h,y,C,P){C=qE(C),y.context===null?y.context=C:y.pendingContext=C,y=Ns(l),y.payload={element:h},P=P===void 0?null:P,P!==null&&(y.callback=P),h=Ls(o,y,l),h!==null&&(mi(h,o,l),od(h,o,l))}function YE(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var h=o.retryLane;o.retryLane=h!==0&&h<l?h:l}}function j1(o,l){YE(o,l),(o=o.alternate)&&YE(o,l)}function WE(o){if(o.tag===13){var l=Os(o,67108864);l!==null&&mi(l,o,67108864),j1(o,67108864)}}var Ap=!0;function nB(o,l,h,y){var C=W.T;W.T=null;var P=B.p;try{B.p=2,P1(o,l,h,y)}finally{B.p=P,W.T=C}}function rB(o,l,h,y){var C=W.T;W.T=null;var P=B.p;try{B.p=8,P1(o,l,h,y)}finally{B.p=P,W.T=C}}function P1(o,l,h,y){if(Ap){var C=M1(y);if(C===null)v1(o,l,y,Tp,h),ZE(o,y);else if(aB(C,o,l,h,y))y.stopPropagation();else if(ZE(o,y),l&4&&-1<iB.indexOf(o)){for(;C!==null;){var P=no(C);if(P!==null)switch(P.tag){case 3:if(P=P.stateNode,P.current.memoizedState.isDehydrated){var K=Dt(P.pendingLanes);if(K!==0){var ie=P;for(ie.pendingLanes|=2,ie.entangledLanes|=2;K;){var pe=1<<31-Ve(K);ie.entanglements[1]|=pe,K&=~pe}Fa(P),(Ft&6)===0&&(cp=_e()+500,Sd(0))}}break;case 13:ie=Os(P,2),ie!==null&&mi(ie,P,2),dp(),j1(P,2)}if(P=M1(y),P===null&&v1(o,l,y,Tp,h),P===C)break;C=P}C!==null&&y.stopPropagation()}else v1(o,l,y,null,h)}}function M1(o){return o=gs(o),R1(o)}var Tp=null;function R1(o){if(Tp=null,o=Pa(o),o!==null){var l=a(o);if(l===null)o=null;else{var h=l.tag;if(h===13){if(o=s(l),o!==null)return o;o=null}else if(h===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null)}}return Tp=o,null}function KE(o){switch(o){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Te()){case Le:return 2;case qe:return 8;case Be:case He:return 32;case be:return 268435456;default:return 32}default:return 32}}var N1=!1,Ys=null,Ws=null,Ks=null,Md=new Map,Rd=new Map,Zs=[],iB="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ZE(o,l){switch(o){case"focusin":case"focusout":Ys=null;break;case"dragenter":case"dragleave":Ws=null;break;case"mouseover":case"mouseout":Ks=null;break;case"pointerover":case"pointerout":Md.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rd.delete(l.pointerId)}}function Nd(o,l,h,y,C,P){return o===null||o.nativeEvent!==P?(o={blockedOn:l,domEventName:h,eventSystemFlags:y,nativeEvent:P,targetContainers:[C]},l!==null&&(l=no(l),l!==null&&WE(l)),o):(o.eventSystemFlags|=y,l=o.targetContainers,C!==null&&l.indexOf(C)===-1&&l.push(C),o)}function aB(o,l,h,y,C){switch(l){case"focusin":return Ys=Nd(Ys,o,l,h,y,C),!0;case"dragenter":return Ws=Nd(Ws,o,l,h,y,C),!0;case"mouseover":return Ks=Nd(Ks,o,l,h,y,C),!0;case"pointerover":var P=C.pointerId;return Md.set(P,Nd(Md.get(P)||null,o,l,h,y,C)),!0;case"gotpointercapture":return P=C.pointerId,Rd.set(P,Nd(Rd.get(P)||null,o,l,h,y,C)),!0}return!1}function XE(o){var l=Pa(o.target);if(l!==null){var h=a(l);if(h!==null){if(l=h.tag,l===13){if(l=s(h),l!==null){o.blockedOn=l,Vn(o.priority,function(){if(h.tag===13){var y=hi();y=hn(y);var C=Os(h,y);C!==null&&mi(C,h,y),j1(h,y)}});return}}else if(l===3&&h.stateNode.current.memoizedState.isDehydrated){o.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}o.blockedOn=null}function Op(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var h=M1(o.nativeEvent);if(h===null){h=o.nativeEvent;var y=new h.constructor(h.type,h);Ul=y,h.target.dispatchEvent(y),Ul=null}else return l=no(h),l!==null&&WE(l),o.blockedOn=h,!1;l.shift()}return!0}function QE(o,l,h){Op(o)&&h.delete(l)}function oB(){N1=!1,Ys!==null&&Op(Ys)&&(Ys=null),Ws!==null&&Op(Ws)&&(Ws=null),Ks!==null&&Op(Ks)&&(Ks=null),Md.forEach(QE),Rd.forEach(QE)}function jp(o,l){o.blockedOn===l&&(o.blockedOn=null,N1||(N1=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,oB)))}var Pp=null;function JE(o){Pp!==o&&(Pp=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Pp===o&&(Pp=null);for(var l=0;l<o.length;l+=3){var h=o[l],y=o[l+1],C=o[l+2];if(typeof y!="function"){if(R1(y||h)===null)continue;break}var P=no(h);P!==null&&(o.splice(l,3),l-=3,R0(P,{pending:!0,data:C,method:h.method,action:y},y,C))}}))}function Ld(o){function l(pe){return jp(pe,o)}Ys!==null&&jp(Ys,o),Ws!==null&&jp(Ws,o),Ks!==null&&jp(Ks,o),Md.forEach(l),Rd.forEach(l);for(var h=0;h<Zs.length;h++){var y=Zs[h];y.blockedOn===o&&(y.blockedOn=null)}for(;0<Zs.length&&(h=Zs[0],h.blockedOn===null);)XE(h),h.blockedOn===null&&Zs.shift();if(h=(o.ownerDocument||o).$$reactFormReplay,h!=null)for(y=0;y<h.length;y+=3){var C=h[y],P=h[y+1],K=C[Qt]||null;if(typeof P=="function")K||JE(h);else if(K){var ie=null;if(P&&P.hasAttribute("formAction")){if(C=P,K=P[Qt]||null)ie=K.formAction;else if(R1(C)!==null)continue}else ie=K.action;typeof ie=="function"?h[y+1]=ie:(h.splice(y,3),y-=3),JE(h)}}}function L1(o){this._internalRoot=o}Mp.prototype.render=L1.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(r(409));var h=l.current,y=hi();GE(h,y,o,l,null,null)},Mp.prototype.unmount=L1.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;GE(o.current,2,null,o,null,null),dp(),l[Jn]=null}};function Mp(o){this._internalRoot=o}Mp.prototype.unstable_scheduleHydration=function(o){if(o){var l=Qn();o={blockedOn:null,target:o,priority:l};for(var h=0;h<Zs.length&&l!==0&&l<Zs[h].priority;h++);Zs.splice(h,0,o),h===0&&XE(o)}};var eA=t.version;if(eA!=="19.1.1")throw Error(r(527,eA,"19.1.1"));B.findDOMNode=function(o){var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=d(l),o=o!==null?f(o):null,o=o===null?null:o.stateNode,o};var sB={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:W,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Rp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Rp.isDisabled&&Rp.supportsFiber)try{Re=Rp.inject(sB),Ae=Rp}catch{}}return kd.createRoot=function(o,l){if(!i(o))throw Error(r(299));var h=!1,y="",C=g4,P=v4,K=y4,ie=null;return l!=null&&(l.unstable_strictMode===!0&&(h=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onUncaughtError!==void 0&&(C=l.onUncaughtError),l.onCaughtError!==void 0&&(P=l.onCaughtError),l.onRecoverableError!==void 0&&(K=l.onRecoverableError),l.unstable_transitionCallbacks!==void 0&&(ie=l.unstable_transitionCallbacks)),l=HE(o,1,!1,null,null,h,y,C,P,K,ie,null),o[Jn]=l.current,g1(o),new L1(l)},kd.hydrateRoot=function(o,l,h){if(!i(o))throw Error(r(299));var y=!1,C="",P=g4,K=v4,ie=y4,pe=null,Ee=null;return h!=null&&(h.unstable_strictMode===!0&&(y=!0),h.identifierPrefix!==void 0&&(C=h.identifierPrefix),h.onUncaughtError!==void 0&&(P=h.onUncaughtError),h.onCaughtError!==void 0&&(K=h.onCaughtError),h.onRecoverableError!==void 0&&(ie=h.onRecoverableError),h.unstable_transitionCallbacks!==void 0&&(pe=h.unstable_transitionCallbacks),h.formState!==void 0&&(Ee=h.formState)),l=HE(o,1,!0,l,h??null,y,C,P,K,ie,pe,Ee),l.context=qE(null),h=l.current,y=hi(),y=hn(y),C=Ns(y),C.callback=null,Ls(h,C,y),h=y,l.current.lanes=h,Oa(l,h),Fa(l),o[Jn]=l.current,g1(o),new Mp(l)},kd.version="19.1.1",kd}var cA;function vB(){if(cA)return k1.exports;cA=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),k1.exports=gB(),k1.exports}var yB=vB(),T=mf();const Xc=Pi(T),L2=uB({__proto__:null,default:Xc},[T]);var F1={exports:{}},$1={};/**
* @license React
* use-sync-external-store-with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var fA;function bB(){if(fA)return $1;fA=1;var e=mf();function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,u=e.useDebugValue;return $1.useSyncExternalStoreWithSelector=function(d,f,m,p,b){var _=i(null);if(_.current===null){var w={hasValue:!1,value:null};_.current=w}else w=_.current;_=s(function(){function E(U){if(!A){if(A=!0,j=U,U=p(U),b!==void 0&&w.hasValue){var V=w.value;if(b(V,U))return O=V}return O=U}if(V=O,n(j,U))return V;var Z=p(U);return b!==void 0&&b(V,Z)?(j=U,V):(j=U,O=Z)}var A=!1,j,O,N=m===void 0?null:m;return[function(){return E(f())},N===null?void 0:function(){return E(N())}]},[f,m,p,b]);var x=r(d,_[0],_[1]);return a(function(){w.hasValue=!0,w.value=x},[x]),u(x),x},$1}var dA;function _B(){return dA||(dA=1,F1.exports=bB()),F1.exports}_B();var xB=T.version.startsWith("19"),wB=Symbol.for(xB?"react.transitional.element":"react.element"),SB=Symbol.for("react.portal"),CB=Symbol.for("react.fragment"),EB=Symbol.for("react.strict_mode"),AB=Symbol.for("react.profiler"),TB=Symbol.for("react.consumer"),OB=Symbol.for("react.context"),rR=Symbol.for("react.forward_ref"),jB=Symbol.for("react.suspense"),PB=Symbol.for("react.suspense_list"),D2=Symbol.for("react.memo"),MB=Symbol.for("react.lazy"),RB=rR,NB=D2;function LB(e){if(typeof e=="object"&&e!==null){const{$$typeof:t}=e;switch(t){case wB:switch(e=e.type,e){case CB:case AB:case EB:case jB:case PB:return e;default:switch(e=e&&e.$$typeof,e){case OB:case rR:case MB:case D2:return e;case TB:return e;default:return t}}case SB:return t}}}function DB(e){return LB(e)===D2}function kB(e,t,n,r,{areStatesEqual:i,areOwnPropsEqual:a,areStatePropsEqual:s}){let u=!1,d,f,m,p,b;function _(j,O){return d=j,f=O,m=e(d,f),p=t(r,f),b=n(m,p,f),u=!0,b}function w(){return m=e(d,f),t.dependsOnOwnProps&&(p=t(r,f)),b=n(m,p,f),b}function x(){return e.dependsOnOwnProps&&(m=e(d,f)),t.dependsOnOwnProps&&(p=t(r,f)),b=n(m,p,f),b}function E(){const j=e(d,f),O=!s(j,m);return m=j,O&&(b=n(m,p,f)),b}function A(j,O){const N=!a(O,f),U=!i(j,d,O,f);return d=j,f=O,N&&U?w():N?x():U?E():b}return function(O,N){return u?A(O,N):_(O,N)}}function IB(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...i}){const a=t(e,i),s=n(e,i),u=r(e,i);return kB(a,s,u,e,i)}function UB(e,t){const n={};for(const r in e){const i=e[r];typeof i=="function"&&(n[r]=(...a)=>t(i(...a)))}return n}function ix(e){return function(n){const r=e(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function hA(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function iR(e,t){return function(r,{displayName:i}){const a=function(u,d){return a.dependsOnOwnProps?a.mapToProps(u,d):a.mapToProps(u,void 0)};return a.dependsOnOwnProps=!0,a.mapToProps=function(u,d){a.mapToProps=e,a.dependsOnOwnProps=hA(e);let f=a(u,d);return typeof f=="function"&&(a.mapToProps=f,a.dependsOnOwnProps=hA(f),f=a(u,d)),f},a}}function k2(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function BB(e){return e&&typeof e=="object"?ix(t=>UB(e,t)):e?typeof e=="function"?iR(e):k2(e,"mapDispatchToProps"):ix(t=>({dispatch:t}))}function zB(e){return e?typeof e=="function"?iR(e):k2(e,"mapStateToProps"):ix(()=>({}))}function FB(e,t,n){return{...n,...e,...t}}function $B(e){return function(n,{displayName:r,areMergedPropsEqual:i}){let a=!1,s;return function(d,f,m){const p=e(d,f,m);return a?i(p,s)||(s=p):(a=!0,s=p),s}}}function VB(e){return e?typeof e=="function"?$B(e):k2(e,"mergeProps"):()=>FB}function HB(e){e()}function qB(){let e=null,t=null;return{clear(){e=null,t=null},notify(){HB(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var mA={notify(){},get:()=>[]};function aR(e,t){let n,r=mA,i=0,a=!1;function s(x){m();const E=r.subscribe(x);let A=!1;return()=>{A||(A=!0,E(),p())}}function u(){r.notify()}function d(){w.onStateChange&&w.onStateChange()}function f(){return a}function m(){i++,n||(n=t?t.addNestedSub(d):e.subscribe(d),r=qB())}function p(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=mA)}function b(){a||(a=!0,m())}function _(){a&&(a=!1,p())}const w={addNestedSub:s,notifyNestedSubs:u,handleChangeWrapper:d,isSubscribed:f,trySubscribe:b,tryUnsubscribe:_,getListeners:()=>r};return w}var GB=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",YB=GB(),WB=()=>typeof navigator<"u"&&navigator.product==="ReactNative",KB=WB(),ZB=()=>YB||KB?T.useLayoutEffect:T.useEffect,wg=ZB();function pA(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function V1(e,t){if(pA(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.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!pA(e[n[i]],t[n[i]]))return!1;return!0}var XB={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},QB={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},JB={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},oR={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ez={[RB]:JB,[NB]:oR};function gA(e){return DB(e)?oR:ez[e.$$typeof]||XB}var tz=Object.defineProperty,nz=Object.getOwnPropertyNames,vA=Object.getOwnPropertySymbols,rz=Object.getOwnPropertyDescriptor,iz=Object.getPrototypeOf,yA=Object.prototype;function ax(e,t){if(typeof t!="string"){if(yA){const a=iz(t);a&&a!==yA&&ax(e,a)}let n=nz(t);vA&&(n=n.concat(vA(t)));const r=gA(e),i=gA(t);for(let a=0;a<n.length;++a){const s=n[a];if(!QB[s]&&!(i&&i[s])&&!(r&&r[s])){const u=rz(t,s);try{tz(e,s,u)}catch{}}}}return e}var az=Symbol.for("react-redux-context"),oz=typeof globalThis<"u"?globalThis:{};function sz(){if(!T.createContext)return{};const e=oz[az]??=new Map;let t=e.get(T.createContext);return t||(t=T.createContext(null),e.set(T.createContext,t)),t}var sR=sz(),lz=[null,null];function uz(e,t,n){wg(()=>e(...t),n)}function cz(e,t,n,r,i,a){e.current=r,n.current=!1,i.current&&(i.current=null,a())}function fz(e,t,n,r,i,a,s,u,d,f,m){if(!e)return()=>{};let p=!1,b=null;const _=()=>{if(p||!u.current)return;const x=t.getState();let E,A;try{E=r(x,i.current)}catch(j){A=j,b=j}A||(b=null),E===a.current?s.current||f():(a.current=E,d.current=E,s.current=!0,m())};return n.onStateChange=_,n.trySubscribe(),_(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,b)throw b}}function dz(e,t){return e===t}function hz(e,t,n,{pure:r,areStatesEqual:i=dz,areOwnPropsEqual:a=V1,areStatePropsEqual:s=V1,areMergedPropsEqual:u=V1,forwardRef:d=!1,context:f=sR}={}){const m=f,p=zB(e),b=BB(t),_=VB(n),w=!!e;return E=>{const A=E.displayName||E.name||"Component",j=`Connect(${A})`,O={shouldHandleStateChanges:w,displayName:j,wrappedComponentName:A,WrappedComponent:E,initMapStateToProps:p,initMapDispatchToProps:b,initMergeProps:_,areStatesEqual:i,areStatePropsEqual:s,areOwnPropsEqual:a,areMergedPropsEqual:u};function N(Z){const[X,oe,ee]=T.useMemo(()=>{const{reactReduxForwardedRef:H,...ae}=Z;return[Z.context,H,ae]},[Z]),J=T.useMemo(()=>{let H=m;return X?.Consumer,H},[X,m]),ne=T.useContext(J),he=!!Z.store&&!!Z.store.getState&&!!Z.store.dispatch,Q=!!ne&&!!ne.store,se=he?Z.store:ne.store,W=Q?ne.getServerState:se.getState,B=T.useMemo(()=>IB(se.dispatch,O),[se]),[I,z]=T.useMemo(()=>{if(!w)return lz;const H=aR(se,he?void 0:ne.subscription),ae=H.notifyNestedSubs.bind(H);return[H,ae]},[se,he,ne]),M=T.useMemo(()=>he?ne:{...ne,subscription:I},[he,ne,I]),D=T.useRef(void 0),Y=T.useRef(ee),q=T.useRef(void 0),re=T.useRef(!1),ue=T.useRef(!1),ce=T.useRef(void 0);wg(()=>(ue.current=!0,()=>{ue.current=!1}),[]);const ve=T.useMemo(()=>()=>q.current&&ee===Y.current?q.current:B(se.getState(),ee),[se,ee]),k=T.useMemo(()=>ae=>I?fz(w,se,I,B,Y,D,re,ue,q,z,ae):()=>{},[I]);uz(cz,[Y,D,re,ee,q,z]);let F;try{F=T.useSyncExternalStore(k,ve,W?()=>B(W(),ee):ve)}catch(H){throw ce.current&&(H.message+=`
The error may be correlated with this previous error:
${ce.current.stack}
`),H}wg(()=>{ce.current=void 0,q.current=void 0,D.current=F});const G=T.useMemo(()=>T.createElement(E,{...F,ref:oe}),[oe,E,F]);return T.useMemo(()=>w?T.createElement(J.Provider,{value:M},G):G,[J,G,M])}const V=T.memo(N);if(V.WrappedComponent=E,V.displayName=N.displayName=j,d){const X=T.forwardRef(function(ee,J){return T.createElement(V,{...ee,reactReduxForwardedRef:J})});return X.displayName=j,X.WrappedComponent=E,ax(X,E)}return ax(V,E)}}var lR=hz;function mz(e){const{children:t,context:n,serverState:r,store:i}=e,a=T.useMemo(()=>{const d=aR(i);return{store:i,subscription:d,getServerState:r?()=>r:void 0}},[i,r]),s=T.useMemo(()=>i.getState(),[i]);wg(()=>{const{subscription:d}=a;return d.onStateChange=d.notifyNestedSubs,d.trySubscribe(),s!==i.getState()&&d.notifyNestedSubs(),()=>{d.tryUnsubscribe(),d.onStateChange=void 0}},[a,s]);const u=n||sR;return T.createElement(u.Provider,{value:a},t)}var I2=mz;/**
* react-router v7.8.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
*/var bA="popstate";function pz(e={}){function t(r,i){let{pathname:a,search:s,hash:u}=r.location;return ox("",{pathname:a,search:s,hash:u},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:hh(i)}return vz(t,n,null,e)}function vn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ga(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function gz(){return Math.random().toString(36).substring(2,10)}function _A(e,t){return{usr:e.state,key:e.key,idx:t}}function ox(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?pf(t):t,state:n,key:t&&t.key||r||gz()}}function hh({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function pf(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function vz(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,s=i.history,u="POP",d=null,f=m();f==null&&(f=0,s.replaceState({...s.state,idx:f},""));function m(){return(s.state||{idx:null}).idx}function p(){u="POP";let E=m(),A=E==null?null:E-f;f=E,d&&d({action:u,location:x.location,delta:A})}function b(E,A){u="PUSH";let j=ox(x.location,E,A);f=m()+1;let O=_A(j,f),N=x.createHref(j);try{s.pushState(O,"",N)}catch(U){if(U instanceof DOMException&&U.name==="DataCloneError")throw U;i.location.assign(N)}a&&d&&d({action:u,location:x.location,delta:1})}function _(E,A){u="REPLACE";let j=ox(x.location,E,A);f=m();let O=_A(j,f),N=x.createHref(j);s.replaceState(O,"",N),a&&d&&d({action:u,location:x.location,delta:0})}function w(E){return yz(E)}let x={get action(){return u},get location(){return e(i,s)},listen(E){if(d)throw new Error("A history only accepts one active listener");return i.addEventListener(bA,p),d=E,()=>{i.removeEventListener(bA,p),d=null}},createHref(E){return t(i,E)},createURL:w,encodeLocation(E){let A=w(E);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:b,replace:_,go(E){return s.go(E)}};return x}function yz(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),vn(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:hh(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function uR(e,t,n="/"){return bz(e,t,n,!1)}function bz(e,t,n,r){let i=typeof t=="string"?pf(t):t,a=zo(i.pathname||"/",n);if(a==null)return null;let s=cR(e);_z(s);let u=null;for(let d=0;u==null&&d<s.length;++d){let f=Mz(a);u=jz(s[d],f,r)}return u}function cR(e,t=[],n=[],r="",i=!1){let a=(s,u,d=i,f)=>{let m={relativePath:f===void 0?s.path||"":f,caseSensitive:s.caseSensitive===!0,childrenIndex:u,route:s};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(r)&&d)return;vn(m.relativePath.startsWith(r),`Absolute route path "${m.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(r.length)}let p=Io([r,m.relativePath]),b=n.concat(m);s.children&&s.children.length>0&&(vn(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),cR(s.children,t,b,p,d)),!(s.path==null&&!s.index)&&t.push({path:p,score:Tz(p,s.index),routesMeta:b})};return e.forEach((s,u)=>{if(s.path===""||!s.path?.includes("?"))a(s,u);else for(let d of fR(s.path))a(s,u,!0,d)}),t}function fR(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let s=fR(r.join("/")),u=[];return u.push(...s.map(d=>d===""?a:[a,d].join("/"))),i&&u.push(...s),u.map(d=>e.startsWith("/")&&d===""?"/":d)}function _z(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Oz(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var xz=/^:[\w-]+$/,wz=3,Sz=2,Cz=1,Ez=10,Az=-2,xA=e=>e==="*";function Tz(e,t){let n=e.split("/"),r=n.length;return n.some(xA)&&(r+=Az),t&&(r+=Sz),n.filter(i=>!xA(i)).reduce((i,a)=>i+(xz.test(a)?wz:a===""?Cz:Ez),r)}function Oz(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 jz(e,t,n=!1){let{routesMeta:r}=e,i={},a="/",s=[];for(let u=0;u<r.length;++u){let d=r[u],f=u===r.length-1,m=a==="/"?t:t.slice(a.length)||"/",p=Sg({path:d.relativePath,caseSensitive:d.caseSensitive,end:f},m),b=d.route;if(!p&&f&&n&&!r[r.length-1].route.index&&(p=Sg({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},m)),!p)return null;Object.assign(i,p.params),s.push({params:i,pathname:Io([a,p.pathname]),pathnameBase:Dz(Io([a,p.pathnameBase])),route:b}),p.pathnameBase!=="/"&&(a=Io([a,p.pathnameBase]))}return s}function Sg(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Pz(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],s=a.replace(/(.)\/+$/,"$1"),u=i.slice(1);return{params:r.reduce((f,{paramName:m,isOptional:p},b)=>{if(m==="*"){let w=u[b]||"";s=a.slice(0,a.length-w.length).replace(/(.)\/+$/,"$1")}const _=u[b];return p&&!_?f[m]=void 0:f[m]=(_||"").replace(/%2F/g,"/"),f},{}),pathname:a,pathnameBase:s,pattern:e}}function Pz(e,t=!1,n=!0){ga(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,(s,u,d)=>(r.push({paramName:u,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Mz(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ga(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function zo(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 Rz(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?pf(e):e;return{pathname:n?n.startsWith("/")?n:Nz(n,t):t,search:kz(r),hash:Iz(i)}}function Nz(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 H1(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 <Link to="..."> and the router will parse it for you.`}function Lz(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function U2(e){let t=Lz(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function B2(e,t,n,r=!1){let i;typeof e=="string"?i=pf(e):(i={...e},vn(!i.pathname||!i.pathname.includes("?"),H1("?","pathname","search",i)),vn(!i.pathname||!i.pathname.includes("#"),H1("#","pathname","hash",i)),vn(!i.search||!i.search.includes("#"),H1("#","search","hash",i)));let a=e===""||i.pathname==="",s=a?"/":i.pathname,u;if(s==null)u=n;else{let p=t.length-1;if(!r&&s.startsWith("..")){let b=s.split("/");for(;b[0]==="..";)b.shift(),p-=1;i.pathname=b.join("/")}u=p>=0?t[p]:"/"}let d=Rz(i,u),f=s&&s!=="/"&&s.endsWith("/"),m=(a||s===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(f||m)&&(d.pathname+="/"),d}var Io=e=>e.join("/").replace(/\/\/+/g,"/"),Dz=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),kz=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Iz=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Uz(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var dR=["POST","PUT","PATCH","DELETE"];new Set(dR);var Bz=["GET",...dR];new Set(Bz);var gf=T.createContext(null);gf.displayName="DataRouter";var Rv=T.createContext(null);Rv.displayName="DataRouterState";T.createContext(!1);var hR=T.createContext({isTransitioning:!1});hR.displayName="ViewTransition";var zz=T.createContext(new Map);zz.displayName="Fetchers";var Fz=T.createContext(null);Fz.displayName="Await";var _a=T.createContext(null);_a.displayName="Navigation";var Nh=T.createContext(null);Nh.displayName="Location";var xa=T.createContext({outlet:null,matches:[],isDataRoute:!1});xa.displayName="Route";var z2=T.createContext(null);z2.displayName="RouteError";function $z(e,{relative:t}={}){vn(Uu(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=T.useContext(_a),{hash:i,pathname:a,search:s}=Lh(e,{relative:t}),u=a;return n!=="/"&&(u=a==="/"?n:Io([n,a])),r.createHref({pathname:u,search:s,hash:i})}function Uu(){return T.useContext(Nh)!=null}function xr(){return vn(Uu(),"useLocation() may be used only in the context of a <Router> component."),T.useContext(Nh).location}var mR="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function pR(e){T.useContext(_a).static||T.useLayoutEffect(e)}function Qa(){let{isDataRoute:e}=T.useContext(xa);return e?tF():Vz()}function Vz(){vn(Uu(),"useNavigate() may be used only in the context of a <Router> component.");let e=T.useContext(gf),{basename:t,navigator:n}=T.useContext(_a),{matches:r}=T.useContext(xa),{pathname:i}=xr(),a=JSON.stringify(U2(r)),s=T.useRef(!1);return pR(()=>{s.current=!0}),T.useCallback((d,f={})=>{if(ga(s.current,mR),!s.current)return;if(typeof d=="number"){n.go(d);return}let m=B2(d,JSON.parse(a),i,f.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Io([t,m.pathname])),(f.replace?n.replace:n.push)(m,f.state,f)},[t,n,a,i,e])}T.createContext(null);function vf(){let{matches:e}=T.useContext(xa),t=e[e.length-1];return t?t.params:{}}function Lh(e,{relative:t}={}){let{matches:n}=T.useContext(xa),{pathname:r}=xr(),i=JSON.stringify(U2(n));return T.useMemo(()=>B2(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function Hz(e,t){return gR(e,t)}function gR(e,t,n,r,i){vn(Uu(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=T.useContext(_a),{matches:s}=T.useContext(xa),u=s[s.length-1],d=u?u.params:{},f=u?u.pathname:"/",m=u?u.pathnameBase:"/",p=u&&u.route;{let j=p&&p.path||"";vR(f,!p||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${j}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
Please change the parent <Route path="${j}"> to <Route path="${j==="/"?"*":`${j}/*`}">.`)}let b=xr(),_;if(t){let j=typeof t=="string"?pf(t):t;vn(m==="/"||j.pathname?.startsWith(m),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${j.pathname}" was given in the \`location\` prop.`),_=j}else _=b;let w=_.pathname||"/",x=w;if(m!=="/"){let j=m.replace(/^\//,"").split("/");x="/"+w.replace(/^\//,"").split("/").slice(j.length).join("/")}let E=uR(e,{pathname:x});ga(p||E!=null,`No routes matched location "${_.pathname}${_.search}${_.hash}" `),ga(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${_.pathname}${_.search}${_.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let A=Kz(E&&E.map(j=>Object.assign({},j,{params:Object.assign({},d,j.params),pathname:Io([m,a.encodeLocation?a.encodeLocation(j.pathname).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?m:Io([m,a.encodeLocation?a.encodeLocation(j.pathnameBase).pathname:j.pathnameBase])})),s,n,r,i);return t&&A?T.createElement(Nh.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",..._},navigationType:"POP"}},A):A}function qz(){let e=eF(),t=Uz(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=T.createElement(T.Fragment,null,T.createElement("p",null,"💿 Hey developer 👋"),T.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",T.createElement("code",{style:a},"ErrorBoundary")," or"," ",T.createElement("code",{style:a},"errorElement")," prop on your route.")),T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},t),n?T.createElement("pre",{style:i},n):null,s)}var Gz=T.createElement(qz,null),Yz=class extends T.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.unstable_onError?this.props.unstable_onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?T.createElement(xa.Provider,{value:this.props.routeContext},T.createElement(z2.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Wz({routeContext:e,match:t,children:n}){let r=T.useContext(gf);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),T.createElement(xa.Provider,{value:e},n)}function Kz(e,t=[],n=null,r=null,i=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,s=n?.errors;if(s!=null){let f=a.findIndex(m=>m.route.id&&s?.[m.route.id]!==void 0);vn(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,f+1))}let u=!1,d=-1;if(n)for(let f=0;f<a.length;f++){let m=a[f];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(d=f),m.route.id){let{loaderData:p,errors:b}=n,_=m.route.loader&&!p.hasOwnProperty(m.route.id)&&(!b||b[m.route.id]===void 0);if(m.route.lazy||_){u=!0,d>=0?a=a.slice(0,d+1):a=[a[0]];break}}}return a.reduceRight((f,m,p)=>{let b,_=!1,w=null,x=null;n&&(b=s&&m.route.id?s[m.route.id]:void 0,w=m.route.errorElement||Gz,u&&(d<0&&p===0?(vR("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),_=!0,x=null):d===p&&(_=!0,x=m.route.hydrateFallbackElement||null)));let E=t.concat(a.slice(0,p+1)),A=()=>{let j;return b?j=w:_?j=x:m.route.Component?j=T.createElement(m.route.Component,null):m.route.element?j=m.route.element:j=f,T.createElement(Wz,{match:m,routeContext:{outlet:f,matches:E,isDataRoute:n!=null},children:j})};return n&&(m.route.ErrorBoundary||m.route.errorElement||p===0)?T.createElement(Yz,{location:n.location,revalidation:n.revalidation,component:w,error:b,children:A(),routeContext:{outlet:null,matches:E,isDataRoute:!0},unstable_onError:r}):A()},null)}function F2(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Zz(e){let t=T.useContext(gf);return vn(t,F2(e)),t}function Xz(e){let t=T.useContext(Rv);return vn(t,F2(e)),t}function Qz(e){let t=T.useContext(xa);return vn(t,F2(e)),t}function $2(e){let t=Qz(e),n=t.matches[t.matches.length-1];return vn(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Jz(){return $2("useRouteId")}function eF(){let e=T.useContext(z2),t=Xz("useRouteError"),n=$2("useRouteError");return e!==void 0?e:t.errors?.[n]}function tF(){let{router:e}=Zz("useNavigate"),t=$2("useNavigate"),n=T.useRef(!1);return pR(()=>{n.current=!0}),T.useCallback(async(i,a={})=>{ga(n.current,mR),n.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...a}))},[e,t])}var wA={};function vR(e,t,n){!t&&!wA[e]&&(wA[e]=!0,ga(!1,n))}T.memo(nF);function nF({routes:e,future:t,state:n,unstable_onError:r}){return gR(e,void 0,n,r,t)}function V2({to:e,replace:t,state:n,relative:r}){vn(Uu(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=T.useContext(_a);ga(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=T.useContext(xa),{pathname:s}=xr(),u=Qa(),d=B2(e,U2(a),s,r==="path"),f=JSON.stringify(d);return T.useEffect(()=>{u(JSON.parse(f),{replace:t,state:n,relative:r})},[u,f,r,t,n]),null}function gt(e){vn(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function rF({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:a=!1}){vn(!Uu(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),u=T.useMemo(()=>({basename:s,navigator:i,static:a,future:{}}),[s,i,a]);typeof n=="string"&&(n=pf(n));let{pathname:d="/",search:f="",hash:m="",state:p=null,key:b="default"}=n,_=T.useMemo(()=>{let w=zo(d,s);return w==null?null:{location:{pathname:w,search:f,hash:m,state:p,key:b},navigationType:r}},[s,d,f,m,p,b,r]);return ga(_!=null,`<Router basename="${s}"> is not able to match the URL "${d}${f}${m}" because it does not start with the basename, so the <Router> won't render anything.`),_==null?null:T.createElement(_a.Provider,{value:u},T.createElement(Nh.Provider,{children:t,value:_}))}function Nv({children:e,location:t}){return Hz(sx(e),t)}function sx(e,t=[]){let n=[];return T.Children.forEach(e,(r,i)=>{if(!T.isValidElement(r))return;let a=[...t,i];if(r.type===T.Fragment){n.push.apply(n,sx(r.props.children,a));return}vn(r.type===gt,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),vn(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||a.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,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=sx(r.props.children,a)),n.push(s)}),n}var cg="get",fg="application/x-www-form-urlencoded";function Lv(e){return e!=null&&typeof e.tagName=="string"}function iF(e){return Lv(e)&&e.tagName.toLowerCase()==="button"}function aF(e){return Lv(e)&&e.tagName.toLowerCase()==="form"}function oF(e){return Lv(e)&&e.tagName.toLowerCase()==="input"}function sF(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function lF(e,t){return e.button===0&&(!t||t==="_self")&&!sF(e)}var Np=null;function uF(){if(Np===null)try{new FormData(document.createElement("form"),0),Np=!1}catch{Np=!0}return Np}var cF=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function q1(e){return e!=null&&!cF.has(e)?(ga(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${fg}"`),null):e}function fF(e,t){let n,r,i,a,s;if(aF(e)){let u=e.getAttribute("action");r=u?zo(u,t):null,n=e.getAttribute("method")||cg,i=q1(e.getAttribute("enctype"))||fg,a=new FormData(e)}else if(iF(e)||oF(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||u.getAttribute("action");if(r=d?zo(d,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||cg,i=q1(e.getAttribute("formenctype"))||q1(u.getAttribute("enctype"))||fg,a=new FormData(u,e),!uF()){let{name:f,type:m,value:p}=e;if(m==="image"){let b=f?`${f}.`:"";a.append(`${b}x`,"0"),a.append(`${b}y`,"0")}else f&&a.append(f,p)}}else{if(Lv(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=cg,r=null,i=fg,s=e}return a&&i==="text/plain"&&(s=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function H2(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function dF(e,t,n){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname=`_root.${n}`:t&&zo(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${n}`,r}async function hF(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function mF(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function pF(e,t,n){let r=await Promise.all(e.map(async i=>{let a=t.routes[i.route.id];if(a){let s=await hF(a,n);return s.links?s.links():[]}return[]}));return bF(r.flat(1).filter(mF).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function SA(e,t,n,r,i,a){let s=(d,f)=>n[f]?d.route.id!==n[f].route.id:!0,u=(d,f)=>n[f].pathname!==d.pathname||n[f].route.path?.endsWith("*")&&n[f].params["*"]!==d.params["*"];return a==="assets"?t.filter((d,f)=>s(d,f)||u(d,f)):a==="data"?t.filter((d,f)=>{let m=r.routes[d.route.id];if(!m||!m.hasLoader)return!1;if(s(d,f)||u(d,f))return!0;if(d.route.shouldRevalidate){let p=d.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function gF(e,t,{includeHydrateFallback:n}={}){return vF(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let a=[i.module];return i.clientActionModule&&(a=a.concat(i.clientActionModule)),i.clientLoaderModule&&(a=a.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(a=a.concat(i.hydrateFallbackModule)),i.imports&&(a=a.concat(i.imports)),a}).flat(1))}function vF(e){return[...new Set(e)]}function yF(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function bF(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let a=JSON.stringify(yF(i));return n.has(a)||(n.add(a),r.push({key:a,link:i})),r},[])}function yR(){let e=T.useContext(gf);return H2(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function _F(){let e=T.useContext(Rv);return H2(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var q2=T.createContext(void 0);q2.displayName="FrameworkContext";function bR(){let e=T.useContext(q2);return H2(e,"You must render this element inside a <HydratedRouter> element"),e}function xF(e,t){let n=T.useContext(q2),[r,i]=T.useState(!1),[a,s]=T.useState(!1),{onFocus:u,onBlur:d,onMouseEnter:f,onMouseLeave:m,onTouchStart:p}=t,b=T.useRef(null);T.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let x=A=>{A.forEach(j=>{s(j.isIntersecting)})},E=new IntersectionObserver(x,{threshold:.5});return b.current&&E.observe(b.current),()=>{E.disconnect()}}},[e]),T.useEffect(()=>{if(r){let x=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(x)}}},[r]);let _=()=>{i(!0)},w=()=>{i(!1),s(!1)};return n?e!=="intent"?[a,b,{}]:[a,b,{onFocus:Id(u,_),onBlur:Id(d,w),onMouseEnter:Id(f,_),onMouseLeave:Id(m,w),onTouchStart:Id(p,_)}]:[!1,b,{}]}function Id(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function wF({page:e,...t}){let{router:n}=yR(),r=T.useMemo(()=>uR(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?T.createElement(CF,{page:e,matches:r,...t}):null}function SF(e){let{manifest:t,routeModules:n}=bR(),[r,i]=T.useState([]);return T.useEffect(()=>{let a=!1;return pF(e,t,n).then(s=>{a||i(s)}),()=>{a=!0}},[e,t,n]),r}function CF({page:e,matches:t,...n}){let r=xr(),{manifest:i,routeModules:a}=bR(),{basename:s}=yR(),{loaderData:u,matches:d}=_F(),f=T.useMemo(()=>SA(e,t,d,i,r,"data"),[e,t,d,i,r]),m=T.useMemo(()=>SA(e,t,d,i,r,"assets"),[e,t,d,i,r]),p=T.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let w=new Set,x=!1;if(t.forEach(A=>{let j=i.routes[A.route.id];!j||!j.hasLoader||(!f.some(O=>O.route.id===A.route.id)&&A.route.id in u&&a[A.route.id]?.shouldRevalidate||j.hasClientLoader?x=!0:w.add(A.route.id))}),w.size===0)return[];let E=dF(e,s,"data");return x&&w.size>0&&E.searchParams.set("_routes",t.filter(A=>w.has(A.route.id)).map(A=>A.route.id).join(",")),[E.pathname+E.search]},[s,u,r,i,f,t,e,a]),b=T.useMemo(()=>gF(m,i),[m,i]),_=SF(m);return T.createElement(T.Fragment,null,p.map(w=>T.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),b.map(w=>T.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),_.map(({key:w,link:x})=>T.createElement("link",{key:w,nonce:n.nonce,...x})))}function EF(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var _R=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{_R&&(window.__reactRouterVersion="7.8.2")}catch{}function xR({basename:e,children:t,window:n}){let r=T.useRef();r.current==null&&(r.current=pz({window:n,v5Compat:!0}));let i=r.current,[a,s]=T.useState({action:i.action,location:i.location}),u=T.useCallback(d=>{T.startTransition(()=>s(d))},[s]);return T.useLayoutEffect(()=>i.listen(u),[i,u]),T.createElement(rF,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:i})}var wR=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Mr=T.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:a,replace:s,state:u,target:d,to:f,preventScrollReset:m,viewTransition:p,...b},_){let{basename:w}=T.useContext(_a),x=typeof f=="string"&&wR.test(f),E,A=!1;if(typeof f=="string"&&x&&(E=f,_R))try{let oe=new URL(window.location.href),ee=f.startsWith("//")?new URL(oe.protocol+f):new URL(f),J=zo(ee.pathname,w);ee.origin===oe.origin&&J!=null?f=J+ee.search+ee.hash:A=!0}catch{ga(!1,`<Link to="${f}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let j=$z(f,{relative:i}),[O,N,U]=xF(r,b),V=OF(f,{replace:s,state:u,target:d,preventScrollReset:m,relative:i,viewTransition:p});function Z(oe){t&&t(oe),oe.defaultPrevented||V(oe)}let X=T.createElement("a",{...b,...U,href:E||j,onClick:A||a?t:Z,ref:EF(_,N),target:d,"data-discover":!x&&n==="render"?"true":void 0});return O&&!x?T.createElement(T.Fragment,null,X,T.createElement(wF,{page:j})):X});Mr.displayName="Link";var G2=T.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:a,to:s,viewTransition:u,children:d,...f},m){let p=Lh(s,{relative:f.relative}),b=xr(),_=T.useContext(Rv),{navigator:w,basename:x}=T.useContext(_a),E=_!=null&&NF(p)&&u===!0,A=w.encodeLocation?w.encodeLocation(p).pathname:p.pathname,j=b.pathname,O=_&&_.navigation&&_.navigation.location?_.navigation.location.pathname:null;n||(j=j.toLowerCase(),O=O?O.toLowerCase():null,A=A.toLowerCase()),O&&x&&(O=zo(O,x)||O);const N=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let U=j===A||!i&&j.startsWith(A)&&j.charAt(N)==="/",V=O!=null&&(O===A||!i&&O.startsWith(A)&&O.charAt(A.length)==="/"),Z={isActive:U,isPending:V,isTransitioning:E},X=U?t:void 0,oe;typeof r=="function"?oe=r(Z):oe=[r,U?"active":null,V?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let ee=typeof a=="function"?a(Z):a;return T.createElement(Mr,{...f,"aria-current":X,className:oe,ref:m,style:ee,to:s,viewTransition:u},typeof d=="function"?d(Z):d)});G2.displayName="NavLink";var AF=T.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:s=cg,action:u,onSubmit:d,relative:f,preventScrollReset:m,viewTransition:p,...b},_)=>{let w=MF(),x=RF(u,{relative:f}),E=s.toLowerCase()==="get"?"get":"post",A=typeof u=="string"&&wR.test(u),j=O=>{if(d&&d(O),O.defaultPrevented)return;O.preventDefault();let N=O.nativeEvent.submitter,U=N?.getAttribute("formmethod")||s;w(N||O.currentTarget,{fetcherKey:t,method:U,navigate:n,replace:i,state:a,relative:f,preventScrollReset:m,viewTransition:p})};return T.createElement("form",{ref:_,method:E,action:x,onSubmit:r?d:j,...b,"data-discover":!A&&e==="render"?"true":void 0})});AF.displayName="Form";function TF(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function SR(e){let t=T.useContext(gf);return vn(t,TF(e)),t}function OF(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:a,viewTransition:s}={}){let u=Qa(),d=xr(),f=Lh(e,{relative:a});return T.useCallback(m=>{if(lF(m,t)){m.preventDefault();let p=n!==void 0?n:hh(d)===hh(f);u(e,{replace:p,state:r,preventScrollReset:i,relative:a,viewTransition:s})}},[d,u,f,n,r,t,e,i,a,s])}var jF=0,PF=()=>`__${String(++jF)}__`;function MF(){let{router:e}=SR("useSubmit"),{basename:t}=T.useContext(_a),n=Jz();return T.useCallback(async(r,i={})=>{let{action:a,method:s,encType:u,formData:d,body:f}=fF(r,t);if(i.navigate===!1){let m=i.fetcherKey||PF();await e.fetch(m,n,i.action||a,{preventScrollReset:i.preventScrollReset,formData:d,body:f,formMethod:i.method||s,formEncType:i.encType||u,flushSync:i.flushSync})}else await e.navigate(i.action||a,{preventScrollReset:i.preventScrollReset,formData:d,body:f,formMethod:i.method||s,formEncType:i.encType||u,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,n])}function RF(e,{relative:t}={}){let{basename:n}=T.useContext(_a),r=T.useContext(xa);vn(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),a={...Lh(e||".",{relative:t})},s=xr();if(e==null){a.search=s.search;let u=new URLSearchParams(a.search),d=u.getAll("index");if(d.some(m=>m==="")){u.delete("index"),d.filter(p=>p).forEach(p=>u.append("index",p));let m=u.toString();a.search=m?`?${m}`:""}}return(!e||e===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:Io([n,a.pathname])),hh(a)}function NF(e,{relative:t}={}){let n=T.useContext(hR);vn(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=SR("useViewTransitionState"),i=Lh(e,{relative:t});if(!n.isTransitioning)return!1;let a=zo(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=zo(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Sg(i.pathname,s)!=null||Sg(i.pathname,a)!=null}var Dh=nR();const LF="/shlink-web-client/dependabot/docker/node-24.8-alpine",Cg={homepage:LF};var va,Wa=".",CR="function",ER="string",AR="__global__",Y2="Provider",DF=0,W2=Array.prototype.slice,kF=function(t,n){var r=t[n];if(r===void 0&&va.config.strict)throw new Error("Bottle was unable to resolve a service. `"+n+"` is undefined.");return r},Dv=function(t){var n;return this.nested[t]||(n=va.pop(),this.nested[t]=n,this.factory(t,function(){return n.container})),this.nested[t]},TR=function(t){return t.split(Wa).reduce(kF,this)},IF=function(t,n,r,i){var a={configurable:!0,enumerable:!0};return t.length?a.get=function(){var u=0,d=function(m){if(m)throw m;t[u]&&t[u++](r,d)};return d(),r}:(a.value=r,a.writable=!0),Object.defineProperty(i,n,a),i[n]},UF=function(t,n){var r,i;return typeof t===CR&&(n=t,t=AR),r=t.split(Wa),i=r.shift(),r.length?Dv.call(this,i).middleware(r.join(Wa),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},BF=function(t,n){return n(t)},CA=function(t,n){return(t[n]||[]).concat(t.__global__||[])},zF=function(t,n){var r,i,a,s,u;return this.id,a=this.container,s=this.decorators,u=this.middlewares,r=t+Y2,i=Object.create(null),i[r]={configurable:!0,enumerable:!0,get:function(){var f=new n;return delete a[r],a[r]=f,f}},i[t]={configurable:!0,enumerable:!0,get:function(){var f=a[r],m;return f&&(m=CA(s,t).reduce(BF,f.$get(a)),delete a[r],delete a[t]),m===void 0?m:IF(CA(u,t),t,m,a)}},Object.defineProperties(a,i),this},OR=function(t,n){var r,i;return r=t.split(Wa),this.providerMap[t]&&r.length===1&&!this.container[t+Y2]?console.error(t+" provider already instantiated."):(this.originalProviders[t]=n,this.providerMap[t]=!0,i=r.shift(),r.length?(Dv.call(this,i).provider(r.join(Wa),n),this):zF.call(this,i,n))},K2=function(t,n){return OR.call(this,t,function(){this.$get=n})},jR=function(t,n,r){var i=arguments.length>3?W2.call(arguments,3):[],a=this;return K2.call(this,t,function(){var u=n,d=i.map(TR,a.container);return r?new(n.bind.apply(n,[null].concat(d))):u.apply(null,d)})},FF=function(t,n){return jR.apply(this,[t,n,!0].concat(W2.call(arguments,2)))},$F=function(t,n){return jR.apply(this,[t,n,!1].concat(W2.call(arguments,2)))},PR=function(t,n){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},MR=function(t,n){var r=t[n];return r||(r={},PR.call(t,n,r)),r},VF=function(t,n){var r;return r=t.split(Wa),t=r.pop(),PR.call(r.reduce(MR,this.container),t,n),this},HF=function(t,n){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:n,writable:!1})},qF=function(t,n){var r=t.split(Wa);return t=r.pop(),HF.call(r.reduce(MR,this.container),t,n),this},RR=function(t,n){var r,i;return typeof t===CR&&(n=t,t=AR),r=t.split(Wa),i=r.shift(),r.length?Dv.call(this,i).decorator(r.join(Wa),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},GF=function(t){return this.deferred.push(t),this},YF=function(t){return(t||[]).map(TR,this.container)},WF=function(t,n){return K2.call(this,t,function(i){return{instance:n.bind(n,i)}})},KF=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},Z2=function(t){return Object.keys(t||this.container||{}).filter(KF)},Eg={},ZF=function(t){var n;return typeof t===ER?(n=Eg[t],n||(Eg[t]=n=new va,n.constant("BOTTLE_NAME",t)),n):new va},XF=function(t){typeof t===ER?delete Eg[t]:Eg={}},NR=function(t){var n=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,n].concat(t.$inject||[]))},EA=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+Y2]},QF=function(t){var n=this.originalProviders,r=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(a){if(!(r&&t.indexOf(a)===-1)){var s=a.split(Wa);s.length>1&&s.forEach(EA,Dv.call(this,s[0])),EA.call(this,a),this.provider(a,n[a])}},this)},JF=function(t){return this.deferred.forEach(function(r){r(t)}),this};va=function e(t){if(!(this instanceof e))return e.pop(t);this.id=DF++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:RR.bind(this),$register:NR.bind(this),$list:Z2.bind(this)}};va.prototype={constant:qF,decorator:RR,defer:GF,digest:YF,factory:K2,instanceFactory:WF,list:Z2,middleware:UF,provider:OR,resetProviders:QF,register:NR,resolve:JF,service:FF,serviceFactory:$F,value:VF};va.pop=ZF;va.clear=XF;va.list=Z2;va.config={strict:!1};const LR=va,e$=(e,t)=>`${e}/rest/v${t}`,t$=e=>e.dir?`${e.field}-${e.dir}`:void 0,n$=({orderBy:e={},excludeMaxVisitsReached:t,excludePastValidUntil:n,...r})=>({...r,excludeMaxVisitsReached:t===!0?"true":void 0,excludePastValidUntil:n===!0?"true":void 0,orderBy:t$(e)}),r$=(e,t)=>{const[n,r]=e.split("://");if(!r)throw new Error(`It is not possible to determine authority on "${e}" for replacement`);const[,...i]=r.split("/"),a=i.length?`/${i.join("/")}`:"";return`${n}://${t}${a}`},i$=(e={})=>{const t=Object.entries(e).flatMap(([n,r])=>r==null?[]:Array.isArray(r)?r.map(i=>[`${n}[]`,i]):[[n,r]]);return new URLSearchParams(t).toString()};let a$=class{#t;#r;#n;#o;constructor(t,n,r={}){this.#r=t,this.#n=n,this.#o=r,this.#t=3}async listShortUrls({signal:t,...n}={}){return this.#e({url:"/short-urls",query:n$(n),signal:t}).then(({shortUrls:r})=>r)}async createShortUrl({signal:t,...n}){const r=Object.entries(n).reduce((i,[a,s])=>(s&&(i[a]=s),i),{});return this.#e({url:"/short-urls",method:"POST",body:r,signal:t})}async getShortUrl({shortCode:t,domain:n},{signal:r}={}){return this.#e({url:`/short-urls/${t}`,query:{domain:n},signal:r})}async deleteShortUrl({shortCode:t,domain:n},{signal:r}={}){return this.#a({url:`/short-urls/${t}`,method:"DELETE",query:{domain:n},signal:r})}async updateShortUrl({shortCode:t,domain:n},{signal:r,...i}){return this.#e({url:`/short-urls/${t}`,method:"PATCH",query:{domain:n},body:i,signal:r})}async getShortUrlRedirectRules({shortCode:t,domain:n},{signal:r}={}){return this.#e({url:`/short-urls/${t}/redirect-rules`,method:"GET",query:{domain:n},signal:r})}async setShortUrlRedirectRules({shortCode:t,domain:n},{signal:r,...i}){return this.#e({url:`/short-urls/${t}/redirect-rules`,method:"POST",query:{domain:n},body:i,signal:r})}async getVisitsOverview({signal:t}={}){return this.#e({url:"/visits",signal:t}).then(({visits:n})=>n)}async getShortUrlVisits({shortCode:t,domain:n},{signal:r,...i}={}){return this.#i({url:`/short-urls/${t}/visits`,query:{...i,domain:n},signal:r})}async getTagVisits(t,{signal:n,...r}={}){return this.#i({url:`/tags/${t}/visits`,query:r,signal:n})}async getDomainVisits(t,{signal:n,...r}={}){return this.#i({url:`/domains/${t}/visits`,query:r,signal:n})}async getOrphanVisits({signal:t,...n}={}){return this.#i({url:"/visits/orphan",query:n,signal:t})}async getNonOrphanVisits({signal:t,...n}={}){return this.#i({url:"/visits/non-orphan",query:n,signal:t})}async#i(t){return this.#e(t).then(({visits:n})=>n)}async deleteShortUrlVisits({shortCode:t,domain:n},{signal:r}={}){const i=n?{domain:n}:void 0;return this.#e({method:"DELETE",url:`/short-urls/${t}/visits`,query:i,signal:r})}async deleteOrphanVisits({signal:t}={}){return this.#e({method:"DELETE",url:"/visits/orphan",signal:t})}async listTags({signal:t}={}){return this.#e({url:"/tags",signal:t}).then(({tags:n})=>n)}async tagsStats({signal:t}={}){return this.#e({url:"/tags/stats",signal:t}).then(({tags:n})=>n)}async deleteTags(t,{signal:n}={}){return this.#a({url:"/tags",method:"DELETE",query:{tags:t},signal:n}).then(()=>({tags:t}))}async editTag({oldName:t,newName:n},{signal:r}={}){return this.#a({url:"/tags",method:"PUT",body:{oldName:t,newName:n},signal:r}).then(()=>({oldName:t,newName:n}))}async listDomains({signal:t}={}){return this.#e({url:"/domains",signal:t}).then(({domains:n})=>n)}async editDomainRedirects(t,{signal:n}={}){return this.#e({url:"/domains/redirects",method:"PATCH",body:t,signal:n})}async health({domain:t,signal:n}={}){return this.#e({url:"/health",domain:t,signal:n})}async mercureInfo({signal:t}={}){return this.#e({url:"/mercure-info",signal:t})}async#e(t){return this.#r.jsonRequest(...this.#s(t))}async#a(t){return this.#r.emptyRequest(...this.#s(t))}#s({url:t,method:n="GET",query:r,body:i,domain:a,signal:s}){const u=i$(r??{}),d=u?`?${u}`:"",f=a?r$(this.#n.baseUrl,a):this.#n.baseUrl;return[`${e$(f,this.#t)}${t}${d}`,{method:n,body:i&&JSON.stringify(i),headers:{"X-Api-Key":this.#n.apiKey},credentials:this.#o.requestCredentials,signal:s}]}};const DR=e=>!!e?.url&&!!e?.apiKey,ah=e=>!!e?.id,X2=e=>!!e?.version,o$=e=>!!e?.serverNotFound,s$=e=>ah(e)?e.id:"",l$=({name:e,url:t,apiKey:n,forwardCredentials:r})=>({name:e,url:t,apiKey:n,forwardCredentials:r?"true":"false"}),u$=e=>typeof e.url=="string"&&typeof e.apiKey=="string"&&typeof e.name=="string",c$=e=>{const{forwardCredentials:t,...n}=e;if(!u$(n))throw new Error('Server is missing required "url", "apiKey" and/or "name" properties');return{...n,forwardCredentials:t==="true"}},AA=new Map,f$=e=>typeof e=="function",d$=e=>{const{selectedServer:t}=e();if(!DR(t))throw new Error("There's no selected server or it is not found");return t},h$=e=>t=>{const{url:n,apiKey:r,forwardCredentials:i}=f$(t)?d$(t):t,a=`${r}_${n}_${i?"forward":"no-forward"}`,s=AA.get(a);if(s)return s;const u=new a$(e,{apiKey:r,baseUrl:n},{requestCredentials:i?"include":void 0});return AA.set(a,u),u},m$=e=>{e.serviceFactory("buildShlinkApiClient",h$,"HttpClient")};function kR(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=kR(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ne(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=kR(e))&&(r&&(r+=" "),r+=t);return r}/*!
* Font Awesome Free 7.0.1 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
* Copyright 2025 Fonticons, Inc.
*/var p$={prefix:"fas",iconName:"rotate",icon:[512,512,[128260,"sync-alt"],"f2f1","M480.1 192l7.9 0c13.3 0 24-10.7 24-24l0-144c0-9.7-5.8-18.5-14.8-22.2S477.9 .2 471 7L419.3 58.8C375 22.1 318 0 256 0 127 0 20.3 95.4 2.6 219.5 .1 237 12.2 253.2 29.7 255.7s33.7-9.7 36.2-27.1C79.2 135.5 159.3 64 256 64 300.4 64 341.2 79 373.7 104.3L327 151c-6.9 6.9-8.9 17.2-5.2 26.2S334.3 192 344 192l136.1 0zm29.4 100.5c2.5-17.5-9.7-33.7-27.1-36.2s-33.7 9.7-36.2 27.1c-13.3 93-93.4 164.5-190.1 164.5-44.4 0-85.2-15-117.7-40.3L185 361c6.9-6.9 8.9-17.2 5.2-26.2S177.7 320 168 320L24 320c-13.3 0-24 10.7-24 24L0 488c0 9.7 5.8 18.5 14.8 22.2S34.1 511.8 41 505l51.8-51.8C137 489.9 194 512 256 512 385 512 491.7 416.6 509.4 292.5z"]},g$=p$,IR={prefix:"fas",iconName:"gears",icon:[640,512,["cogs"],"f085","M415.9 210.5c12.2-3.3 25 2.5 30.5 13.8L465 261.9c10.3 1.4 20.4 4.2 29.9 8.1l35-23.3c10.5-7 24.4-5.6 33.3 3.3l19.2 19.2c8.9 8.9 10.3 22.9 3.3 33.3l-23.3 34.9c1.9 4.7 3.6 9.6 5 14.7 1.4 5.1 2.3 10.1 3 15.2l37.7 18.6c11.3 5.6 17.1 18.4 13.8 30.5l-7 26.2c-3.3 12.1-14.6 20.3-27.2 19.5l-42-2.7c-6.3 8.1-13.6 15.6-21.9 22l2.7 41.9c.8 12.6-7.4 24-19.5 27.2l-26.2 7c-12.2 3.3-24.9-2.5-30.5-13.8l-18.6-37.6c-10.3-1.4-20.4-4.2-29.9-8.1l-35 23.3c-10.5 7-24.4 5.6-33.3-3.3l-19.2-19.2c-8.9-8.9-10.3-22.8-3.3-33.3l23.3-35c-1.9-4.7-3.6-9.6-5-14.7s-2.3-10.2-3-15.2l-37.7-18.6c-11.3-5.6-17-18.4-13.8-30.5l7-26.2c3.3-12.1 14.6-20.3 27.2-19.5l41.9 2.7c6.3-8.1 13.6-15.6 21.9-22l-2.7-41.8c-.8-12.6 7.4-24 19.5-27.2l26.2-7zM448.4 340a44 44 0 1 0 .1 88 44 44 0 1 0 -.1-88zM224.9-45.5l26.2 7c12.1 3.3 20.3 14.7 19.5 27.2l-2.7 41.8c8.3 6.4 15.6 13.8 21.9 22l42-2.7c12.5-.8 23.9 7.4 27.2 19.5l7 26.2c3.2 12.1-2.5 24.9-13.8 30.5l-37.7 18.6c-.7 5.1-1.7 10.2-3 15.2s-3.1 10-5 14.7l23.3 35c7 10.5 5.6 24.4-3.3 33.3L307.3 262c-8.9 8.9-22.8 10.3-33.3 3.3L239 242c-9.5 3.9-19.6 6.7-29.9 8.1l-18.6 37.6c-5.6 11.3-18.4 17-30.5 13.8l-26.2-7c-12.2-3.3-20.3-14.7-19.5-27.2l2.7-41.9c-8.3-6.4-15.6-13.8-21.9-22l-42 2.7c-12.5 .8-23.9-7.4-27.2-19.5l-7-26.2c-3.2-12.1 2.5-24.9 13.8-30.5l37.7-18.6c.7-5.1 1.7-10.1 3-15.2 1.4-5.1 3-10 5-14.7L55.1 46.5c-7-10.5-5.6-24.4 3.3-33.3L77.6-6c8.9-8.9 22.8-10.3 33.3-3.3l35 23.3c9.5-3.9 19.6-6.7 29.9-8.1l18.6-37.6c5.6-11.3 18.3-17 30.5-13.8zM192.4 84a44 44 0 1 0 0 88 44 44 0 1 0 0-88z"]},v$=IR,y$={prefix:"fas",iconName:"file-arrow-down",icon:[384,512,["file-download"],"f56d","M0 64C0 28.7 28.7 0 64 0L213.5 0c17 0 33.3 6.7 45.3 18.7L365.3 125.3c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zm208-5.5l0 93.5c0 13.3 10.7 24 24 24L325.5 176 208 58.5zM175 441c9.4 9.4 24.6 9.4 33.9 0l64-64c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-23 23 0-86.1c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 86.1-23-23c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l64 64z"]},UR=y$,b$={prefix:"fas",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 32 0c35.3 0 64 28.7 64 64l0 288c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 128C0 92.7 28.7 64 64 64l32 0 0-32c0-17.7 14.3-32 32-32zM64 240l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm128 0l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM64 368l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm112 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16z"]},_$=b$,x$={prefix:"fas",iconName:"up-right-from-square",icon:[512,512,["external-link-alt"],"f35d","M290.4 19.8C295.4 7.8 307.1 0 320 0L480 0c17.7 0 32 14.3 32 32l0 160c0 12.9-7.8 24.6-19.8 29.6s-25.7 2.2-34.9-6.9L400 157.3 246.6 310.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L354.7 112 297.4 54.6c-9.2-9.2-11.9-22.9-6.9-34.9zM0 176c0-44.2 35.8-80 80-80l80 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-80 0c-8.8 0-16 7.2-16 16l0 256c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-80c0-17.7 14.3-32 32-32s32 14.3 32 32l0 80c0 44.2-35.8 80-80 80L80 512c-44.2 0-80-35.8-80-80L0 176z"]},w$=x$,S$={prefix:"fas",iconName:"map-location-dot",icon:[640,512,["map-marked-alt"],"f5a0","M576 48c0-11.1-5.7-21.4-15.2-27.2s-21.2-6.4-31.1-1.4L413.5 77.5 234.1 17.6c-8.1-2.7-16.8-2.1-24.4 1.7l-128 64C70.8 88.8 64 99.9 64 112l0 352c0 11.1 5.7 21.4 15.2 27.2s21.2 6.4 31.1 1.4l116.1-58.1 173.3 57.8c-4.3-6.4-8.5-13.1-12.6-19.9-11-18.3-21.9-39.3-30-61.8l-101.2-33.7 0-284.5 128 42.7 0 99.3c31-35.8 77-58.4 128-58.4 22.6 0 44.2 4.4 64 12.5L576 48zM512 224c-66.3 0-120 52.8-120 117.9 0 68.9 64.1 150.4 98.6 189.3 11.6 13 31.3 13 42.9 0 34.5-38.9 98.6-120.4 98.6-189.3 0-65.1-53.7-117.9-120-117.9zM472 344a40 40 0 1 1 80 0 40 40 0 1 1 -80 0z"]},lx=S$,C$={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 376C296.3 401.1 253.9 416 208 416 93.1 416 0 322.9 0 208S93.1 0 208 0 416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},E$=C$,A$={prefix:"fas",iconName:"ban",icon:[512,512,[128683,"cancel"],"f05e","M367.2 412.5L99.5 144.8c-22.4 31.4-35.5 69.8-35.5 111.2 0 106 86 192 192 192 41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3c22.4-31.4 35.5-69.8 35.5-111.2 0-106-86-192-192-192-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0 256 256 0 1 1 -512 0z"]},T$={prefix:"fas",iconName:"palette",icon:[512,512,[127912],"f53f","M512 256c0 .9 0 1.8 0 2.7-.4 36.5-33.6 61.3-70.1 61.3L344 320c-26.5 0-48 21.5-48 48 0 3.4 .4 6.7 1 9.9 2.1 10.2 6.5 20 10.8 29.9 6.1 13.8 12.1 27.5 12.1 42 0 31.8-21.6 60.7-53.4 62-3.5 .1-7 .2-10.6 .2-141.4 0-256-114.6-256-256S114.6 0 256 0 512 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"]},O$={prefix:"fas",iconName:"eye",icon:[576,512,[128065],"f06e","M288 32c-80.8 0-145.5 36.8-192.6 80.6-46.8 43.5-78.1 95.4-93 131.1-3.3 7.9-3.3 16.7 0 24.6 14.9 35.7 46.2 87.7 93 131.1 47.1 43.7 111.8 80.6 192.6 80.6s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1 3.3-7.9 3.3-16.7 0-24.6-14.9-35.7-46.2-87.7-93-131.1-47.1-43.7-111.8-80.6-192.6-80.6zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64-11.5 0-22.3-3-31.7-8.4-1 10.9-.1 22.1 2.9 33.2 13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-12.2-45.7-55.5-74.8-101.1-70.8 5.3 9.3 8.4 20.1 8.4 31.7z"]},j$={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M136.7 5.9L128 32 32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0-8.7-26.1C306.9-7.2 294.7-16 280.9-16L167.1-16c-13.8 0-26 8.8-30.4 21.9zM416 144L32 144 53.1 467.1C54.7 492.4 75.7 512 101 512L347 512c25.3 0 46.3-19.6 47.9-44.9L416 144z"]},P$={prefix:"fas",iconName:"chevron-up",icon:[448,512,[],"f077","M201.4 105.4c12.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 0L224 173.3 54.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"]},Q2={prefix:"fas",iconName:"circle-notch",icon:[512,512,[],"f1ce","M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8-79.3 23.6-137.1 97.1-137.1 184.1 0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256 512 397.4 397.4 512 256 512S0 397.4 0 256c0-116 77.1-213.9 182.9-245.4 16.9-5 34.8 4.6 39.8 21.5z"]},M$={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M64 144a56 56 0 1 1 0-112 56 56 0 1 1 0 112zm0 224c30.9 0 56 25.1 56 56s-25.1 56-56 56-56-25.1-56-56 25.1-56 56-56zm56-112c0 30.9-25.1 56-56 56s-56-25.1-56-56 25.1-56 56-56 56 25.1 56 56z"]},R$=M$,N$={prefix:"fas",iconName:"file-arrow-up",icon:[384,512,["file-upload"],"f574","M0 64C0 28.7 28.7 0 64 0L213.5 0c17 0 33.3 6.7 45.3 18.7L365.3 125.3c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zm208-5.5l0 93.5c0 13.3 10.7 24 24 24L325.5 176 208 58.5zM209 263c-9.4-9.4-24.6-9.4-33.9 0l-64 64c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l23-23 0 86.1c0 13.3 10.7 24 24 24s24-10.7 24-24l0-86.1 23 23c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-64-64z"]},L$=N$,D$={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 0L368 46.1 465.9 144 490.3 119.6c21.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.5L432 177.9 334.1 80 172.4 241.7zM96 64C43 64 0 107 0 160L0 416c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 64z"]},J2=D$,Ag={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M311.1 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.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},BR={prefix:"fas",iconName:"arrows-split-up-and-left",icon:[512,512,[],"e4bc","M342.6-22.6c-12.5-12.5-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l41.4-41.4 0 195.9c-18.8-10.9-40.7-17.1-64-17.1l-114.7 0 41.4-41.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 320 224 320c35.3 0 64 28.7 64 64 0 70.7 57.3 128 128 128l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0c-35.3 0-64-28.7-64-64l0-306.7 41.4 41.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-96-96z"]},k$={prefix:"fas",iconName:"arrow-up-wide-short",icon:[576,512,["sort-amount-up"],"f161","M150.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L96 141.3 96 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-306.7 41.4 41.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-96-96zM320 480l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32z"]},I$=k$,U$={prefix:"fas",iconName:"sun",icon:[576,512,[9728],"f185","M178.2-10.1c7.4-3.1 15.8-2.2 22.5 2.2l87.8 58.2 87.8-58.2c6.7-4.4 15.1-5.2 22.5-2.2S411.4-.5 413 7.3l20.9 103.2 103.2 20.9c7.8 1.6 14.4 7 17.4 14.3s2.2 15.8-2.2 22.5l-58.2 87.8 58.2 87.8c4.4 6.7 5.2 15.1 2.2 22.5s-9.6 12.8-17.4 14.3L433.8 401.4 413 504.7c-1.6 7.8-7 14.4-14.3 17.4s-15.8 2.2-22.5-2.2l-87.8-58.2-87.8 58.2c-6.7 4.4-15.1 5.2-22.5 2.2s-12.8-9.6-14.3-17.4L143 401.4 39.7 380.5c-7.8-1.6-14.4-7-17.4-14.3s-2.2-15.8 2.2-22.5L82.7 256 24.5 168.2c-4.4-6.7-5.2-15.1-2.2-22.5s9.6-12.8 17.4-14.3L143 110.6 163.9 7.3c1.6-7.8 7-14.4 14.3-17.4zM207.6 256a80.4 80.4 0 1 1 160.8 0 80.4 80.4 0 1 1 -160.8 0zm208.8 0a128.4 128.4 0 1 0 -256.8 0 128.4 128.4 0 1 0 256.8 0z"]},B$={prefix:"fas",iconName:"pencil",icon:[512,512,[9999,61504,"pencil-alt"],"f303","M36.4 353.2c4.1-14.6 11.8-27.9 22.6-38.7l181.2-181.2 33.9-33.9c16.6 16.6 51.3 51.3 104 104l33.9 33.9-33.9 33.9-181.2 181.2c-10.7 10.7-24.1 18.5-38.7 22.6L30.4 510.6c-8.3 2.3-17.3 0-23.4-6.2S-1.4 489.3 .9 481L36.4 353.2zm55.6-3.7c-4.4 4.7-7.6 10.4-9.3 16.6l-24.1 86.9 86.9-24.1c6.4-1.8 12.2-5.1 17-9.7L91.9 349.5zm354-146.1c-16.6-16.6-51.3-51.3-104-104L308 65.5C334.5 39 349.4 24.1 352.9 20.6 366.4 7 384.8-.6 404-.6S441.6 7 455.1 20.6l35.7 35.7C504.4 69.9 512 88.3 512 107.4s-7.6 37.6-21.2 51.1c-3.5 3.5-18.4 18.4-44.9 44.9z"]},zR=B$,z$={prefix:"fas",iconName:"link",icon:[576,512,[128279,"chain"],"f0c1","M419.5 96c-16.6 0-32.7 4.5-46.8 12.7-15.8-16-34.2-29.4-54.5-39.5 28.2-24 64.1-37.2 101.3-37.2 86.4 0 156.5 70 156.5 156.5 0 41.5-16.5 81.3-45.8 110.6l-71.1 71.1c-29.3 29.3-69.1 45.8-110.6 45.8-86.4 0-156.5-70-156.5-156.5 0-1.5 0-3 .1-4.5 .5-17.7 15.2-31.6 32.9-31.1s31.6 15.2 31.1 32.9c0 .9 0 1.8 0 2.6 0 51.1 41.4 92.5 92.5 92.5 24.5 0 48-9.7 65.4-27.1l71.1-71.1c17.3-17.3 27.1-40.9 27.1-65.4 0-51.1-41.4-92.5-92.5-92.5zM275.2 173.3c-1.9-.8-3.8-1.9-5.5-3.1-12.6-6.5-27-10.2-42.1-10.2-24.5 0-48 9.7-65.4 27.1L91.1 258.2c-17.3 17.3-27.1 40.9-27.1 65.4 0 51.1 41.4 92.5 92.5 92.5 16.5 0 32.6-4.4 46.7-12.6 15.8 16 34.2 29.4 54.6 39.5-28.2 23.9-64 37.2-101.3 37.2-86.4 0-156.5-70-156.5-156.5 0-41.5 16.5-81.3 45.8-110.6l71.1-71.1c29.3-29.3 69.1-45.8 110.6-45.8 86.6 0 156.5 70.6 156.5 156.9 0 1.3 0 2.6 0 3.9-.4 17.7-15.1 31.6-32.8 31.2s-31.6-15.1-31.2-32.8c0-.8 0-1.5 0-2.3 0-33.7-18-63.3-44.8-79.6z"]},kv={prefix:"fas",iconName:"chart-line",icon:[512,512,["line-chart"],"f201","M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 400c0 44.2 35.8 80 80 80l400 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 416c-8.8 0-16-7.2-16-16L64 64zm406.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L320 210.7 262.6 153.4c-12.5-12.5-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l73.4-73.4 57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z"]},F$={prefix:"fas",iconName:"up-right-and-down-left-from-center",icon:[512,512,["expand-alt"],"f424","M344 0L488 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87-39-39c-6.9-6.9-8.9-17.2-5.2-26.2S334.3 0 344 0zM168 512L24 512c-13.3 0-24-10.7-24-24L0 344c0-9.7 5.8-18.5 14.8-22.2S34.1 320.2 41 327l39 39 87-87c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2S177.7 512 168 512z"]},$$={prefix:"fas",iconName:"arrow-up",icon:[384,512,[8593],"f062","M214.6 17.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 117.3 160 488c0 17.7 14.3 32 32 32s32-14.3 32-32l0-370.7 105.4 105.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"]},V$={prefix:"fas",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M136.7 5.9C141.1-7.2 153.3-16 167.1-16l113.9 0c13.8 0 26 8.8 30.4 21.9L320 32 416 32c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l96 0 8.7-26.1zM32 144l384 0 0 304c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-304zm88 64c-13.3 0-24 10.7-24 24l0 192c0 13.3 10.7 24 24 24s24-10.7 24-24l0-192c0-13.3-10.7-24-24-24zm104 0c-13.3 0-24 10.7-24 24l0 192c0 13.3 10.7 24 24 24s24-10.7 24-24l0-192c0-13.3-10.7-24-24-24zm104 0c-13.3 0-24 10.7-24 24l0 192c0 13.3 10.7 24 24 24s24-10.7 24-24l0-192c0-13.3-10.7-24-24-24z"]},Au={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z"]},H$={prefix:"fas",iconName:"house",icon:[512,512,[127968,63498,63500,"home","home-alt","home-lg-alt"],"f015","M277.8 8.6c-12.3-11.4-31.3-11.4-43.5 0l-224 208c-9.6 9-12.8 22.9-8 35.1S18.8 272 32 272l16 0 0 176c0 35.3 28.7 64 64 64l288 0c35.3 0 64-28.7 64-64l0-176 16 0c13.2 0 25-8.1 29.8-20.3s1.6-26.2-8-35.1l-224-208zM240 320l32 0c26.5 0 48 21.5 48 48l0 96-128 0 0-96c0-26.5 21.5-48 48-48z"]},q$=H$,TA={prefix:"fas",iconName:"server",icon:[448,512,[],"f233","M64 32C28.7 32 0 60.7 0 96l0 64c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 32zm216 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 0zM64 288c-35.3 0-64 28.7-64 64l0 64c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 288zm216 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"]},OA={prefix:"fas",iconName:"calendar-xmark",icon:[448,512,["calendar-times"],"f273","M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 32 0c35.3 0 64 28.7 64 64l0 288c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 128C0 92.7 28.7 64 64 64l32 0 0-32c0-17.7 14.3-32 32-32zM291.9 220.1c-9.4-9.4-24.6-9.4-33.9 0l-33.9 33.9-33.9-33.9c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l33.9 33.9-33.9 33.9c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l33.9-33.9 33.9 33.9c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-33.9-33.9 33.9-33.9c9.4-9.4 9.4-24.6 0-33.9z"]},Iv={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},ew=Iv,G$=Iv,FR={prefix:"fas",iconName:"tags",icon:[576,512,[],"f02c","M401.2 39.1L549.4 189.4c27.7 28.1 27.7 73.1 0 101.2L393 448.9c-9.3 9.4-24.5 9.5-33.9 .2s-9.5-24.5-.2-33.9L515.3 256.8c9.2-9.3 9.2-24.4 0-33.7L367 72.9c-9.3-9.4-9.2-24.6 .2-33.9s24.6-9.2 33.9 .2zM32.1 229.5L32.1 96c0-35.3 28.7-64 64-64l133.5 0c17 0 33.3 6.7 45.3 18.7l144 144c25 25 25 65.5 0 90.5L285.4 418.7c-25 25-65.5 25-90.5 0l-144-144c-12-12-18.7-28.3-18.7-45.3zm144-85.5a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},Y$={prefix:"fas",iconName:"moon",icon:[512,512,[127769,9214],"f186","M256 0C114.6 0 0 114.6 0 256S114.6 512 256 512c68.8 0 131.3-27.2 177.3-71.4 7.3-7 9.4-17.9 5.3-27.1s-13.7-14.9-23.8-14.1c-4.9 .4-9.8 .6-14.8 .6-101.6 0-184-82.4-184-184 0-72.1 41.5-134.6 102.1-164.8 9.1-4.5 14.3-14.3 13.1-24.4S322.6 8.5 312.7 6.3C294.4 2.2 275.4 0 256 0z"]},tw={prefix:"fas",iconName:"list",icon:[512,512,["list-squares"],"f03a","M40 48C26.7 48 16 58.7 16 72l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24L40 48zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 64zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zM16 232l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-48 0c-13.3 0-24 10.7-24 24zM40 368c-13.3 0-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-48 0z"]},W$={prefix:"fas",iconName:"chevron-down",icon:[448,512,[],"f078","M201.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 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},K$={prefix:"fas",iconName:"plug",icon:[448,512,[128268],"f1e6","M128-32c17.7 0 32 14.3 32 32l0 96 128 0 0-96c0-17.7 14.3-32 32-32s32 14.3 32 32l0 96 64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l0 64c0 95.1-69.2 174.1-160 189.3l0 66.7c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-66.7C101.2 398.1 32 319.1 32 224l0-64c-17.7 0-32-14.3-32-32S14.3 96 32 96l64 0 0-96c0-17.7 14.3-32 32-32z"]},nw={prefix:"fas",iconName:"chart-pie",icon:[576,512,["pie-chart"],"f200","M512.4 240l-176 0c-17.7 0-32-14.3-32-32l0-176c0-17.7 14.4-32.2 31.9-29.9 107 14.2 191.8 99 206 206 2.3 17.5-12.2 31.9-29.9 31.9zM222.6 37.2c18.1-3.8 33.8 11 33.8 29.5l0 197.3c0 5.6 2 11 5.5 15.3L394 438.7c11.7 14.1 9.2 35.4-6.9 44.1-34.1 18.6-73.2 29.2-114.7 29.2-132.5 0-240-107.5-240-240 0-115.5 81.5-211.9 190.2-234.8zM477.8 288l64 0c18.5 0 33.3 15.7 29.5 33.8-10.2 48.4-35 91.4-69.6 124.2-12.3 11.7-31.6 9.2-42.4-3.9L374.9 340.4c-17.3-20.9-2.4-52.4 24.6-52.4l78.2 0z"]},Z$={prefix:"fas",iconName:"file-csv",icon:[576,512,[],"f6dd","M96 0C60.7 0 32 28.7 32 64l0 384c0 35.3 28.7 64 64 64l80 0 0-112c0-35.3 28.7-64 64-64l176 0 0-165.5c0-17-6.7-33.3-18.7-45.3L290.7 18.7C278.7 6.7 262.5 0 245.5 0L96 0zM357.5 176L264 176c-13.3 0-24-10.7-24-24L240 58.5 357.5 176zM264 380c-24.3 0-44 19.7-44 44l0 80c0 24.3 19.7 44 44 44l16 0c24.3 0 44-19.7 44-44l0-8c0-11-9-20-20-20s-20 9-20 20l0 8c0 2.2-1.8 4-4 4l-16 0c-2.2 0-4-1.8-4-4l0-80c0-2.2 1.8-4 4-4l16 0c2.2 0 4 1.8 4 4l0 8c0 11 9 20 20 20s20-9 20-20l0-8c0-24.3-19.7-44-44-44l-16 0zm136 0c-28.7 0-52 23.3-52 52s23.3 52 52 52c6.6 0 12 5.4 12 12s-5.4 12-12 12l-32 0c-11 0-20 9-20 20s9 20 20 20l32 0c28.7 0 52-23.3 52-52s-23.3-52-52-52c-6.6 0-12-5.4-12-12s5.4-12 12-12l24 0c11 0 20-9 20-20s-9-20-20-20l-24 0zm96 0c-11 0-20 9-20 20l0 31.6c0 35.5 10.5 70.3 30.2 99.8l5.1 7.7c3.7 5.6 10 8.9 16.6 8.9s12.9-3.3 16.6-8.9l5.1-7.7c19.7-29.6 30.2-64.3 30.2-99.8l0-31.6c0-11-9-20-20-20s-20 9-20 20l0 31.6c0 19.6-4.1 38.9-12 56.7-7.9-17.8-12-37.1-12-56.7l0-31.6c0-11-9-20-20-20z"]},jA={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},X$={prefix:"fas",iconName:"grip-vertical",icon:[320,512,["grid-vertical"],"f58e","M128 40c0-22.1-17.9-40-40-40L40 0C17.9 0 0 17.9 0 40L0 88c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48zm0 192c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48zM0 424l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40zM320 40c0-22.1-17.9-40-40-40L232 0c-22.1 0-40 17.9-40 40l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48zM192 232l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40zM320 424c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48z"]},Q$={prefix:"fas",iconName:"triangle-exclamation",icon:[512,512,[9888,"exclamation-triangle","warning"],"f071","M256 0c14.7 0 28.2 8.1 35.2 21l216 400c6.7 12.4 6.4 27.4-.8 39.5S486.1 480 472 480L40 480c-14.1 0-27.2-7.4-34.4-19.5s-7.5-27.1-.8-39.5l216-400c7-12.9 20.5-21 35.2-21zm0 352a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.5 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},J$=Q$,eV={prefix:"fas",iconName:"caret-up",icon:[384,512,[],"f0d8","M32 352c-12.9 0-24.6-7.8-29.6-19.8S.2 306.5 9.4 297.4l160-160c12.5-12.5 32.8-12.5 45.3 0l160 160c9.2 9.2 11.9 22.9 6.9 34.9S364.9 352 352 352L32 352z"]},tV={prefix:"fas",iconName:"globe",icon:[512,512,[127760],"f0ac","M351.9 280l-190.9 0c2.9 64.5 17.2 123.9 37.5 167.4 11.4 24.5 23.7 41.8 35.1 52.4 11.2 10.5 18.9 12.2 22.9 12.2s11.7-1.7 22.9-12.2c11.4-10.6 23.7-28 35.1-52.4 20.3-43.5 34.6-102.9 37.5-167.4zM160.9 232l190.9 0C349 167.5 334.7 108.1 314.4 64.6 303 40.2 290.7 22.8 279.3 12.2 268.1 1.7 260.4 0 256.4 0s-11.7 1.7-22.9 12.2c-11.4 10.6-23.7 28-35.1 52.4-20.3 43.5-34.6 102.9-37.5 167.4zm-48 0C116.4 146.4 138.5 66.9 170.8 14.7 78.7 47.3 10.9 131.2 1.5 232l111.4 0zM1.5 280c9.4 100.8 77.2 184.7 169.3 217.3-32.3-52.2-54.4-131.7-57.9-217.3L1.5 280zm398.4 0c-3.5 85.6-25.6 165.1-57.9 217.3 92.1-32.7 159.9-116.5 169.3-217.3l-111.4 0zm111.4-48C501.9 131.2 434.1 47.3 342 14.7 374.3 66.9 396.4 146.4 399.9 232l111.4 0z"]},nV={prefix:"fas",iconName:"arrow-left",icon:[512,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.3 288 480 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-370.7 0 105.4-105.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},rV={prefix:"fas",iconName:"down-left-and-up-right-to-center",icon:[512,512,["compress-alt"],"f422","M439.5 7c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2S450.2 240 440.5 240l-144 0c-13.3 0-24-10.7-24-24l0-144c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87zM72.5 272l144 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87-39-39c-6.9-6.9-8.9-17.2-5.2-26.2S62.8 272 72.5 272z"]},$R={prefix:"fas",iconName:"robot",icon:[640,512,[129302],"f544","M352 0c0-17.7-14.3-32-32-32S288-17.7 288 0l0 64-96 0c-53 0-96 43-96 96l0 224c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-224c0-53-43-96-96-96l-96 0 0-64zM160 368c0-13.3 10.7-24 24-24l32 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0c-13.3 0-24-10.7-24-24zm120 0c0-13.3 10.7-24 24-24l32 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0c-13.3 0-24-10.7-24-24zm120 0c0-13.3 10.7-24 24-24l32 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0c-13.3 0-24-10.7-24-24zM224 176a48 48 0 1 1 0 96 48 48 0 1 1 0-96zm144 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM64 224c0-17.7-14.3-32-32-32S0 206.3 0 224l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96zm544-32c-17.7 0-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32z"]},kh={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 160-160 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l160 0 0 160c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160 160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0 0-160z"]},iV={prefix:"fas",iconName:"link-slash",icon:[576,512,["chain-broken","chain-slash","unlink"],"f127","M41-24.9c-9.4-9.4-24.6-9.4-33.9 0S-2.3-.3 7 9.1l528 528c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-122-122c4.2-3.4 8.3-7.1 12.1-10.9l71.1-71.1c29.3-29.3 45.8-69.1 45.8-110.6 0-86.4-70-156.5-156.5-156.5-37.3 0-73.1 13.3-101.3 37.2 20.3 10.1 38.7 23.5 54.5 39.5 14.1-8.3 30.2-12.7 46.8-12.7 51.1 0 92.5 41.4 92.5 92.5 0 24.5-9.7 48-27.1 65.4l-71.1 71.1c-3.9 3.9-8.1 7.4-12.6 10.5l-47.5-47.5c16.5-.9 29.7-14.4 30.2-31.1 0-1.3 0-2.6 0-3.9 0-86.3-69.9-156.9-156.5-156.9-19.2 0-37.9 3.5-55.5 10.2L41-24.9zM225.9 160c.6 0 1.1 0 1.7 0 15.1 0 29.5 3.7 42.1 10.2 1.8 1.2 3.6 2.3 5.5 3.1 26.8 16.3 44.8 45.9 44.8 79.6 0 .4 0 .8 0 1.2L225.9 160zM346.2 416L192 261.8c1.2 84.6 69.6 152.9 154.1 154.1zM139.7 209.5l-45.3-45.3-48.6 48.6c-29.3 29.3-45.8 69.1-45.8 110.6 0 86.4 70 156.5 156.5 156.5 37.2 0 73.1-13.3 101.3-37.2-20.3-10.1-38.8-23.5-54.6-39.5-14 8.2-30.1 12.6-46.7 12.6-51.1 0-92.5-41.4-92.5-92.5 0-24.5 9.7-48 27.1-65.4l48.6-48.6z"]},aV={prefix:"fas",iconName:"arrow-down-wide-short",icon:[576,512,["sort-amount-asc","sort-amount-down"],"f160","M246.6 374.6l-96 96c-12.5 12.5-32.8 12.5-45.3 0l-96-96c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L96 370.7 96 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 306.7 41.4-41.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3zM320 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32l160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-160 0zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L320 96z"]},oV=aV,VR={prefix:"fas",iconName:"caret-down",icon:[384,512,[],"f0d7","M352 160c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-160 160c-12.5 12.5-32.8 12.5-45.3 0l-160-160c-9.2-9.2-11.9-22.9-6.9-34.9S19.1 160 32 160l320 0z"]},sV={prefix:"fas",iconName:"eye-slash",icon:[576,512,[],"f070","M41-24.9c-9.4-9.4-24.6-9.4-33.9 0S-2.3-.3 7 9.1l528 528c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-96.4-96.4c2.7-2.4 5.4-4.8 8-7.2 46.8-43.5 78.1-95.4 93-131.1 3.3-7.9 3.3-16.7 0-24.6-14.9-35.7-46.2-87.7-93-131.1-47.1-43.7-111.8-80.6-192.6-80.6-56.8 0-105.6 18.2-146 44.2L41-24.9zM204.5 138.7c23.5-16.8 52.4-26.7 83.5-26.7 79.5 0 144 64.5 144 144 0 31.1-9.9 59.9-26.7 83.5l-34.7-34.7c12.7-21.4 17-47.7 10.1-73.7-13.7-51.2-66.4-81.6-117.6-67.9-8.6 2.3-16.7 5.7-24 10l-34.7-34.7zM325.3 395.1c-11.9 3.2-24.4 4.9-37.3 4.9-79.5 0-144-64.5-144-144 0-12.9 1.7-25.4 4.9-37.3L69.4 139.2c-32.6 36.8-55 75.8-66.9 104.5-3.3 7.9-3.3 16.7 0 24.6 14.9 35.7 46.2 87.7 93 131.1 47.1 43.7 111.8 80.6 192.6 80.6 37.3 0 71.2-7.9 101.5-20.6l-64.2-64.2z"]},lV={prefix:"fas",iconName:"arrow-rotate-left",icon:[512,512,[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],"f0e2","M256 64c-56.8 0-107.9 24.7-143.1 64l47.1 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 192c-17.7 0-32-14.3-32-32L0 32C0 14.3 14.3 0 32 0S64 14.3 64 32l0 54.7C110.9 33.6 179.5 0 256 0 397.4 0 512 114.6 512 256S397.4 512 256 512c-87 0-163.9-43.4-210.1-109.7-10.1-14.5-6.6-34.4 7.9-44.6s34.4-6.6 44.6 7.9c34.8 49.8 92.4 82.3 157.6 82.3 106 0 192-86 192-192S362 64 256 64z"]},uV=lV,cV={prefix:"fas",iconName:"tag",icon:[512,512,[127991],"f02b","M32.5 96l0 149.5c0 17 6.7 33.3 18.7 45.3l192 192c25 25 65.5 25 90.5 0L483.2 333.3c25-25 25-65.5 0-90.5l-192-192C279.2 38.7 263 32 246 32L96.5 32c-35.3 0-64 28.7-64 64zm112 16a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},fV={prefix:"fas",iconName:"desktop",icon:[512,512,[128421,61704,"desktop-alt"],"f390","M64 32C28.7 32 0 60.7 0 96L0 352c0 35.3 28.7 64 64 64l144 0-16 48-72 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l272 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-72 0-16-48 144 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 32zM96 96l320 0c17.7 0 32 14.3 32 32l0 160c0 17.7-14.3 32-32 32L96 320c-17.7 0-32-14.3-32-32l0-160c0-17.7 14.3-32 32-32z"]},dV={prefix:"fas",iconName:"arrow-down",icon:[384,512,[8595],"f063","M169.4 502.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 402.7 224 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 370.7-105.4-105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},hV={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]},mV={prefix:"fas",iconName:"circle-dot",icon:[512,512,[128280,"dot-circle"],"f192","M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm0-352a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"]},pV=mV,gV={prefix:"fas",iconName:"qrcode",icon:[448,512,[],"f029","M64 160l64 0 0-64-64 0 0 64zM0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48L0 80zM64 416l64 0 0-64-64 0 0 64zM0 336c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96zM320 96l0 64 64 0 0-64-64 0zM304 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96c0-26.5 21.5-48 48-48zM288 352a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm0 64c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm96 32c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32zm32-96a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm-32 32a32 32 0 1 1 -64 0 32 32 0 1 1 64 0z"]},vV={prefix:"fas",iconName:"circle-minus",icon:[512,512,["minus-circle"],"f056","M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM168 232l176 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-176 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]},HR=vV,yV={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM224 160a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm-8 64l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]},Uv=yV;/*!
* Font Awesome Free 7.0.1 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
* Copyright 2025 Fonticons, Inc.
*/function ux(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bV(e){if(Array.isArray(e))return e}function _V(e){if(Array.isArray(e))return ux(e)}function xV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wV(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qR(r.key),r)}}function SV(e,t,n){return t&&wV(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function dg(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=rw(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(d){throw d},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 a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var d=n.next();return s=d.done,d},e:function(d){u=!0,a=d},f:function(){try{s||n.return==null||n.return()}finally{if(u)throw a}}}}function Tt(e,t,n){return(t=qR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function EV(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,s,u=[],d=!0,f=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;d=!1}else for(;!(d=(r=a.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,i=m}finally{try{if(!d&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function AV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TV(){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 PA(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 We(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PA(Object(n),!0).forEach(function(r){Tt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bv(e,t){return bV(e)||EV(e,t)||rw(e,t)||AV()}function ya(e){return _V(e)||CV(e)||rw(e)||TV()}function OV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qR(e){var t=OV(e,"string");return typeof t=="symbol"?t:t+""}function Tg(e){"@babel/helpers - typeof";return Tg=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},Tg(e)}function rw(e,t){if(e){if(typeof e=="string")return ux(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ux(e,t):void 0}}var MA=function(){},iw={},GR={},YR=null,WR={mark:MA,measure:MA};try{typeof window<"u"&&(iw=window),typeof document<"u"&&(GR=document),typeof MutationObserver<"u"&&(YR=MutationObserver),typeof performance<"u"&&(WR=performance)}catch{}var jV=iw.navigator||{},RA=jV.userAgent,NA=RA===void 0?"":RA,dl=iw,ln=GR,LA=YR,Lp=WR;dl.document;var Zo=!!ln.documentElement&&!!ln.head&&typeof ln.addEventListener=="function"&&typeof ln.createElement=="function",KR=~NA.indexOf("MSIE")||~NA.indexOf("Trident/"),G1,PV=/fa(k|kd|s|r|l|t|d|dr|dl|dt|b|slr|slpr|wsb|tl|ns|nds|es|jr|jfr|jdr|cr|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,MV=/Font ?Awesome ?([567 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit|Notdog Duo|Notdog|Chisel|Etch|Thumbprint|Jelly Fill|Jelly Duo|Jelly|Slab Press|Slab|Whiteboard)?.*/i,ZR={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fab:"brands","fa-brands":"brands"},duotone:{fa:"solid",fad:"solid","fa-solid":"solid","fa-duotone":"solid",fadr:"regular","fa-regular":"regular",fadl:"light","fa-light":"light",fadt:"thin","fa-thin":"thin"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid",fasdr:"regular","fa-regular":"regular",fasdl:"light","fa-light":"light",fasdt:"thin","fa-thin":"thin"},slab:{"fa-regular":"regular",faslr:"regular"},"slab-press":{"fa-regular":"regular",faslpr:"regular"},thumbprint:{"fa-light":"light",fatl:"light"},whiteboard:{"fa-semibold":"semibold",fawsb:"semibold"},notdog:{"fa-solid":"solid",fans:"solid"},"notdog-duo":{"fa-solid":"solid",fands:"solid"},etch:{"fa-solid":"solid",faes:"solid"},jelly:{"fa-regular":"regular",fajr:"regular"},"jelly-fill":{"fa-regular":"regular",fajfr:"regular"},"jelly-duo":{"fa-regular":"regular",fajdr:"regular"},chisel:{"fa-regular":"regular",facr:"regular"}},RV={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},XR=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press"],yr="classic",Ih="duotone",QR="sharp",JR="sharp-duotone",e6="chisel",t6="etch",n6="jelly",r6="jelly-duo",i6="jelly-fill",a6="notdog",o6="notdog-duo",s6="slab",l6="slab-press",u6="thumbprint",c6="whiteboard",NV="Classic",LV="Duotone",DV="Sharp",kV="Sharp Duotone",IV="Chisel",UV="Etch",BV="Jelly",zV="Jelly Duo",FV="Jelly Fill",$V="Notdog",VV="Notdog Duo",HV="Slab",qV="Slab Press",GV="Thumbprint",YV="Whiteboard",f6=[yr,Ih,QR,JR,e6,t6,n6,r6,i6,a6,o6,s6,l6,u6,c6];G1={},Tt(Tt(Tt(Tt(Tt(Tt(Tt(Tt(Tt(Tt(G1,yr,NV),Ih,LV),QR,DV),JR,kV),e6,IV),t6,UV),n6,BV),r6,zV),i6,FV),a6,$V),Tt(Tt(Tt(Tt(Tt(G1,o6,VV),s6,HV),l6,qV),u6,GV),c6,YV);var WV={classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"},slab:{400:"faslr"},"slab-press":{400:"faslpr"},whiteboard:{600:"fawsb"},thumbprint:{300:"fatl"},notdog:{900:"fans"},"notdog-duo":{900:"fands"},etch:{900:"faes"},chisel:{400:"facr"},jelly:{400:"fajr"},"jelly-fill":{400:"fajfr"},"jelly-duo":{400:"fajdr"}},KV={"Font Awesome 7 Free":{900:"fas",400:"far"},"Font Awesome 7 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 7 Brands":{400:"fab",normal:"fab"},"Font Awesome 7 Duotone":{900:"fad",400:"fadr",normal:"fadr",300:"fadl",100:"fadt"},"Font Awesome 7 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 7 Sharp Duotone":{900:"fasds",400:"fasdr",normal:"fasdr",300:"fasdl",100:"fasdt"},"Font Awesome 7 Jelly":{400:"fajr",normal:"fajr"},"Font Awesome 7 Jelly Fill":{400:"fajfr",normal:"fajfr"},"Font Awesome 7 Jelly Duo":{400:"fajdr",normal:"fajdr"},"Font Awesome 7 Slab":{400:"faslr",normal:"faslr"},"Font Awesome 7 Slab Press":{400:"faslpr",normal:"faslpr"},"Font Awesome 7 Thumbprint":{300:"fatl",normal:"fatl"},"Font Awesome 7 Notdog":{900:"fans",normal:"fans"},"Font Awesome 7 Notdog Duo":{900:"fands",normal:"fands"},"Font Awesome 7 Etch":{900:"faes",normal:"faes"},"Font Awesome 7 Chisel":{400:"facr",normal:"facr"},"Font Awesome 7 Whiteboard":{600:"fawsb",normal:"fawsb"}},ZV=new Map([["classic",{defaultShortPrefixId:"fas",defaultStyleId:"solid",styleIds:["solid","regular","light","thin","brands"],futureStyleIds:[],defaultFontWeight:900}],["duotone",{defaultShortPrefixId:"fad",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp",{defaultShortPrefixId:"fass",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp-duotone",{defaultShortPrefixId:"fasds",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["chisel",{defaultShortPrefixId:"facr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["etch",{defaultShortPrefixId:"faes",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["jelly",{defaultShortPrefixId:"fajr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-duo",{defaultShortPrefixId:"fajdr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-fill",{defaultShortPrefixId:"fajfr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["notdog",{defaultShortPrefixId:"fans",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["notdog-duo",{defaultShortPrefixId:"fands",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["slab",{defaultShortPrefixId:"faslr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["slab-press",{defaultShortPrefixId:"faslpr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["thumbprint",{defaultShortPrefixId:"fatl",defaultStyleId:"light",styleIds:["light"],futureStyleIds:[],defaultFontWeight:300}],["whiteboard",{defaultShortPrefixId:"fawsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}]]),XV={chisel:{regular:"facr"},classic:{brands:"fab",light:"fal",regular:"far",solid:"fas",thin:"fat"},duotone:{light:"fadl",regular:"fadr",solid:"fad",thin:"fadt"},etch:{solid:"faes"},jelly:{regular:"fajr"},"jelly-duo":{regular:"fajdr"},"jelly-fill":{regular:"fajfr"},notdog:{solid:"fans"},"notdog-duo":{solid:"fands"},sharp:{light:"fasl",regular:"fasr",solid:"fass",thin:"fast"},"sharp-duotone":{light:"fasdl",regular:"fasdr",solid:"fasds",thin:"fasdt"},slab:{regular:"faslr"},"slab-press":{regular:"faslpr"},thumbprint:{light:"fatl"},whiteboard:{semibold:"fawsb"}},d6=["fak","fa-kit","fakd","fa-kit-duotone"],DA={kit:{fak:"kit","fa-kit":"kit"},"kit-duotone":{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"}},QV=["kit"],JV="kit",eH="kit-duotone",tH="Kit",nH="Kit Duotone";Tt(Tt({},JV,tH),eH,nH);var rH={kit:{"fa-kit":"fak"}},iH={"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},aH={kit:{fak:"fa-kit"}},kA={kit:{kit:"fak"},"kit-duotone":{"kit-duotone":"fakd"}},Y1,Dp={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},oH=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press"],sH="classic",lH="duotone",uH="sharp",cH="sharp-duotone",fH="chisel",dH="etch",hH="jelly",mH="jelly-duo",pH="jelly-fill",gH="notdog",vH="notdog-duo",yH="slab",bH="slab-press",_H="thumbprint",xH="whiteboard",wH="Classic",SH="Duotone",CH="Sharp",EH="Sharp Duotone",AH="Chisel",TH="Etch",OH="Jelly",jH="Jelly Duo",PH="Jelly Fill",MH="Notdog",RH="Notdog Duo",NH="Slab",LH="Slab Press",DH="Thumbprint",kH="Whiteboard";Y1={},Tt(Tt(Tt(Tt(Tt(Tt(Tt(Tt(Tt(Tt(Y1,sH,wH),lH,SH),uH,CH),cH,EH),fH,AH),dH,TH),hH,OH),mH,jH),pH,PH),gH,MH),Tt(Tt(Tt(Tt(Tt(Y1,vH,RH),yH,NH),bH,LH),_H,DH),xH,kH);var IH="kit",UH="kit-duotone",BH="Kit",zH="Kit Duotone";Tt(Tt({},IH,BH),UH,zH);var FH={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"},slab:{"fa-regular":"faslr"},"slab-press":{"fa-regular":"faslpr"},whiteboard:{"fa-semibold":"fawsb"},thumbprint:{"fa-light":"fatl"},notdog:{"fa-solid":"fans"},"notdog-duo":{"fa-solid":"fands"},etch:{"fa-solid":"faes"},jelly:{"fa-regular":"fajr"},"jelly-fill":{"fa-regular":"fajfr"},"jelly-duo":{"fa-regular":"fajdr"},chisel:{"fa-regular":"facr"}},$H={classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"],slab:["faslr"],"slab-press":["faslpr"],whiteboard:["fawsb"],thumbprint:["fatl"],notdog:["fans"],"notdog-duo":["fands"],etch:["faes"],jelly:["fajr"],"jelly-fill":["fajfr"],"jelly-duo":["fajdr"],chisel:["facr"]},cx={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"},slab:{faslr:"fa-regular"},"slab-press":{faslpr:"fa-regular"},whiteboard:{fawsb:"fa-semibold"},thumbprint:{fatl:"fa-light"},notdog:{fans:"fa-solid"},"notdog-duo":{fands:"fa-solid"},etch:{faes:"fa-solid"},jelly:{fajr:"fa-regular"},"jelly-fill":{fajfr:"fa-regular"},"jelly-duo":{fajdr:"fa-regular"},chisel:{facr:"fa-regular"}},VH=["fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands","fa-semibold"],h6=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt","faslr","faslpr","fawsb","fatl","fans","fands","faes","fajr","fajfr","fajdr","facr"].concat(oH,VH),HH=["solid","regular","light","thin","duotone","brands","semibold"],m6=[1,2,3,4,5,6,7,8,9,10],qH=m6.concat([11,12,13,14,15,16,17,18,19,20]),GH=["aw","fw","pull-left","pull-right"],YH=[].concat(ya(Object.keys($H)),HH,GH,["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","inverse","layers","layers-bottom-left","layers-bottom-right","layers-counter","layers-text","layers-top-left","layers-top-right","li","pull-end","pull-start","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul","width-auto","width-fixed",Dp.GROUP,Dp.SWAP_OPACITY,Dp.PRIMARY,Dp.SECONDARY]).concat(m6.map(function(e){return"".concat(e,"x")})).concat(qH.map(function(e){return"w-".concat(e)})),WH={"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}},Fo="___FONT_AWESOME___",fx=16,p6="fa",g6="svg-inline--fa",Tu="data-fa-i2svg",dx="data-fa-pseudo-element",KH="data-fa-pseudo-element-pending",aw="data-prefix",ow="data-icon",IA="fontawesome-i2svg",ZH="async",XH=["HTML","HEAD","STYLE","SCRIPT"],v6=["::before","::after",":before",":after"],y6=function(){try{return!0}catch{return!1}}();function Uh(e){return new Proxy(e,{get:function(n,r){return r in n?n[r]:n[yr]}})}var b6=We({},ZR);b6[yr]=We(We(We(We({},{"fa-duotone":"duotone"}),ZR[yr]),DA.kit),DA["kit-duotone"]);var QH=Uh(b6),hx=We({},XV);hx[yr]=We(We(We(We({},{duotone:"fad"}),hx[yr]),kA.kit),kA["kit-duotone"]);var UA=Uh(hx),mx=We({},cx);mx[yr]=We(We({},mx[yr]),aH.kit);var sw=Uh(mx),px=We({},FH);px[yr]=We(We({},px[yr]),rH.kit);Uh(px);var JH=PV,_6="fa-layers-text",eq=MV,tq=We({},WV);Uh(tq);var nq=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],W1=RV,rq=[].concat(ya(QV),ya(YH)),oh=dl.FontAwesomeConfig||{};function iq(e){var t=ln.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function aq(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}if(ln&&typeof ln.querySelector=="function"){var oq=[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-search-pseudo-elements","searchPseudoElements"],["data-search-pseudo-elements-warnings","searchPseudoElementsWarnings"],["data-search-pseudo-elements-full-scan","searchPseudoElementsFullScan"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]];oq.forEach(function(e){var t=Bv(e,2),n=t[0],r=t[1],i=aq(iq(n));i!=null&&(oh[r]=i)})}var x6={styleDefault:"solid",familyDefault:yr,cssPrefix:p6,replacementClass:g6,autoReplaceSvg:!0,autoAddCss:!0,searchPseudoElements:!1,searchPseudoElementsWarnings:!0,searchPseudoElementsFullScan:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};oh.familyPrefix&&(oh.cssPrefix=oh.familyPrefix);var Qc=We(We({},x6),oh);Qc.autoReplaceSvg||(Qc.observeMutations=!1);var lt={};Object.keys(x6).forEach(function(e){Object.defineProperty(lt,e,{enumerable:!0,set:function(n){Qc[e]=n,sh.forEach(function(r){return r(lt)})},get:function(){return Qc[e]}})});Object.defineProperty(lt,"familyPrefix",{enumerable:!0,set:function(t){Qc.cssPrefix=t,sh.forEach(function(n){return n(lt)})},get:function(){return Qc.cssPrefix}});dl.FontAwesomeConfig=lt;var sh=[];function sq(e){return sh.push(e),function(){sh.splice(sh.indexOf(e),1)}}var Nc=fx,Va={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function lq(e){if(!(!e||!Zo)){var t=ln.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=ln.head.childNodes,r=null,i=n.length-1;i>-1;i--){var a=n[i],s=(a.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(s)>-1&&(r=a)}return ln.head.insertBefore(t,r),e}}var uq="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function BA(){for(var e=12,t="";e-- >0;)t+=uq[Math.random()*62|0];return t}function yf(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function lw(e){return e.classList?yf(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function w6(e){return"".concat(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function cq(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(w6(e[n]),'" ')},"").trim()}function zv(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function uw(e){return e.size!==Va.size||e.x!==Va.x||e.y!==Va.y||e.rotate!==Va.rotate||e.flipX||e.flipY}function fq(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,i={transform:"translate(".concat(n/2," 256)")},a="translate(".concat(t.x*32,", ").concat(t.y*32,") "),s="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),u="rotate(".concat(t.rotate," 0 0)"),d={transform:"".concat(a," ").concat(s," ").concat(u)},f={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:d,path:f}}function dq(e){var t=e.transform,n=e.width,r=n===void 0?fx:n,i=e.height,a=i===void 0?fx:i,s="";return KR?s+="translate(".concat(t.x/Nc-r/2,"em, ").concat(t.y/Nc-a/2,"em) "):s+="translate(calc(-50% + ".concat(t.x/Nc,"em), calc(-50% + ").concat(t.y/Nc,"em)) "),s+="scale(".concat(t.size/Nc*(t.flipX?-1:1),", ").concat(t.size/Nc*(t.flipY?-1:1),") "),s+="rotate(".concat(t.rotate,"deg) "),s}var hq=`:root, :host {
--fa-font-solid: normal 900 1em/1 "Font Awesome 7 Free";
--fa-font-regular: normal 400 1em/1 "Font Awesome 7 Free";
--fa-font-light: normal 300 1em/1 "Font Awesome 7 Pro";
--fa-font-thin: normal 100 1em/1 "Font Awesome 7 Pro";
--fa-font-duotone: normal 900 1em/1 "Font Awesome 7 Duotone";
--fa-font-duotone-regular: normal 400 1em/1 "Font Awesome 7 Duotone";
--fa-font-duotone-light: normal 300 1em/1 "Font Awesome 7 Duotone";
--fa-font-duotone-thin: normal 100 1em/1 "Font Awesome 7 Duotone";
--fa-font-brands: normal 400 1em/1 "Font Awesome 7 Brands";
--fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 7 Sharp";
--fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 7 Sharp";
--fa-font-sharp-light: normal 300 1em/1 "Font Awesome 7 Sharp";
--fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 7 Sharp";
--fa-font-sharp-duotone-solid: normal 900 1em/1 "Font Awesome 7 Sharp Duotone";
--fa-font-sharp-duotone-regular: normal 400 1em/1 "Font Awesome 7 Sharp Duotone";
--fa-font-sharp-duotone-light: normal 300 1em/1 "Font Awesome 7 Sharp Duotone";
--fa-font-sharp-duotone-thin: normal 100 1em/1 "Font Awesome 7 Sharp Duotone";
--fa-font-slab-regular: normal 400 1em/1 "Font Awesome 7 Slab";
--fa-font-slab-press-regular: normal 400 1em/1 "Font Awesome 7 Slab Press";
--fa-font-whiteboard-semibold: normal 600 1em/1 "Font Awesome 7 Whiteboard";
--fa-font-thumbprint-light: normal 300 1em/1 "Font Awesome 7 Thumbprint";
--fa-font-notdog-solid: normal 900 1em/1 "Font Awesome 7 Notdog";
--fa-font-notdog-duo-solid: normal 900 1em/1 "Font Awesome 7 Notdog Duo";
--fa-font-etch-solid: normal 900 1em/1 "Font Awesome 7 Etch";
--fa-font-jelly-regular: normal 400 1em/1 "Font Awesome 7 Jelly";
--fa-font-jelly-fill-regular: normal 400 1em/1 "Font Awesome 7 Jelly Fill";
--fa-font-jelly-duo-regular: normal 400 1em/1 "Font Awesome 7 Jelly Duo";
--fa-font-chisel-regular: normal 400 1em/1 "Font Awesome 7 Chisel";
}
.svg-inline--fa {
box-sizing: content-box;
display: var(--fa-display, inline-block);
height: 1em;
overflow: visible;
vertical-align: -0.125em;
width: var(--fa-width, 1.25em);
}
.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.0714285714em;
}
.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,
.svg-inline--fa .fa-pull-start {
float: inline-start;
margin-inline-end: var(--fa-pull-margin, 0.3em);
}
.svg-inline--fa.fa-pull-right,
.svg-inline--fa .fa-pull-end {
float: inline-end;
margin-inline-start: var(--fa-pull-margin, 0.3em);
}
.svg-inline--fa.fa-li {
width: var(--fa-li-width, 2em);
inset-inline-start: calc(-1 * var(--fa-li-width, 2em));
inset-block-start: 0.25em; /* syncing vertical alignment with Web Font rendering */
}
.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: var(--fa-width, 1.25em);
}
.fa-layers .svg-inline--fa {
inset: 0;
margin: auto;
position: absolute;
transform-origin: center center;
}
.fa-layers-text {
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
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);
transform: scale(var(--fa-counter-scale, 0.25));
transform-origin: top right;
}
.fa-layers-bottom-right {
bottom: var(--fa-bottom, 0);
right: var(--fa-right, 0);
top: auto;
transform: scale(var(--fa-layers-scale, 0.25));
transform-origin: bottom right;
}
.fa-layers-bottom-left {
bottom: var(--fa-bottom, 0);
left: var(--fa-left, 0);
right: auto;
top: auto;
transform: scale(var(--fa-layers-scale, 0.25));
transform-origin: bottom left;
}
.fa-layers-top-right {
top: var(--fa-top, 0);
right: var(--fa-right, 0);
transform: scale(var(--fa-layers-scale, 0.25));
transform-origin: top right;
}
.fa-layers-top-left {
left: var(--fa-left, 0);
right: auto;
top: var(--fa-top, 0);
transform: scale(var(--fa-layers-scale, 0.25));
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: calc(10 / 16 * 1em); /* converts a 10px size into an em-based value that's relative to the scale's 16px base */
line-height: calc(1 / 10 * 1em); /* sets the line-height of the icon back to that of it's parent */
vertical-align: calc((6 / 10 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
}
.fa-xs {
font-size: calc(12 / 16 * 1em); /* converts a 12px size into an em-based value that's relative to the scale's 16px base */
line-height: calc(1 / 12 * 1em); /* sets the line-height of the icon back to that of it's parent */
vertical-align: calc((6 / 12 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
}
.fa-sm {
font-size: calc(14 / 16 * 1em); /* converts a 14px size into an em-based value that's relative to the scale's 16px base */
line-height: calc(1 / 14 * 1em); /* sets the line-height of the icon back to that of it's parent */
vertical-align: calc((6 / 14 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
}
.fa-lg {
font-size: calc(20 / 16 * 1em); /* converts a 20px size into an em-based value that's relative to the scale's 16px base */
line-height: calc(1 / 20 * 1em); /* sets the line-height of the icon back to that of it's parent */
vertical-align: calc((6 / 20 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
}
.fa-xl {
font-size: calc(24 / 16 * 1em); /* converts a 24px size into an em-based value that's relative to the scale's 16px base */
line-height: calc(1 / 24 * 1em); /* sets the line-height of the icon back to that of it's parent */
vertical-align: calc((6 / 24 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
}
.fa-2xl {
font-size: calc(32 / 16 * 1em); /* converts a 32px size into an em-based value that's relative to the scale's 16px base */
line-height: calc(1 / 32 * 1em); /* sets the line-height of the icon back to that of it's parent */
vertical-align: calc((6 / 32 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text's descender */
}
.fa-width-auto {
--fa-width: auto;
}
.fa-fw,
.fa-width-fixed {
--fa-width: 1.25em;
}
.fa-ul {
list-style-type: none;
margin-inline-start: var(--fa-li-margin, 2.5em);
padding-inline-start: 0;
}
.fa-ul > li {
position: relative;
}
.fa-li {
inset-inline-start: calc(-1 * var(--fa-li-width, 2em));
position: absolute;
text-align: center;
width: var(--fa-li-width, 2em);
line-height: inherit;
}
/* Heads Up: Bordered Icons will not be supported in the future!
- This feature will be deprecated in the next major release of Font Awesome (v8)!
- You may continue to use it in this version *v7), but it will not be supported in Font Awesome v8.
*/
/* Notes:
* --@{v.$css-prefix}-border-width = 1/16 by default (to render as ~1px based on a 16px default font-size)
* --@{v.$css-prefix}-border-padding =
** 3/16 for vertical padding (to give ~2px of vertical whitespace around an icon considering it's vertical alignment)
** 4/16 for horizontal padding (to give ~4px of horizontal whitespace around an icon)
*/
.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.0625em);
box-sizing: var(--fa-border-box-sizing, content-box);
padding: var(--fa-border-padding, 0.1875em 0.25em);
}
.fa-pull-left,
.fa-pull-start {
float: inline-start;
margin-inline-end: var(--fa-pull-margin, 0.3em);
}
.fa-pull-right,
.fa-pull-end {
float: inline-end;
margin-inline-start: var(--fa-pull-margin, 0.3em);
}
.fa-beat {
animation-name: fa-beat;
animation-delay: var(--fa-animation-delay, 0s);
animation-direction: var(--fa-animation-direction, normal);
animation-duration: var(--fa-animation-duration, 1s);
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
animation-timing-function: var(--fa-animation-timing, ease-in-out);
}
.fa-bounce {
animation-name: fa-bounce;
animation-delay: var(--fa-animation-delay, 0s);
animation-direction: var(--fa-animation-direction, normal);
animation-duration: var(--fa-animation-duration, 1s);
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));
}
.fa-fade {
animation-name: fa-fade;
animation-delay: var(--fa-animation-delay, 0s);
animation-direction: var(--fa-animation-direction, normal);
animation-duration: var(--fa-animation-duration, 1s);
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
}
.fa-beat-fade {
animation-name: fa-beat-fade;
animation-delay: var(--fa-animation-delay, 0s);
animation-direction: var(--fa-animation-direction, normal);
animation-duration: var(--fa-animation-duration, 1s);
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
}
.fa-flip {
animation-name: fa-flip;
animation-delay: var(--fa-animation-delay, 0s);
animation-direction: var(--fa-animation-direction, normal);
animation-duration: var(--fa-animation-duration, 1s);
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
animation-timing-function: var(--fa-animation-timing, ease-in-out);
}
.fa-shake {
animation-name: fa-shake;
animation-delay: var(--fa-animation-delay, 0s);
animation-direction: var(--fa-animation-direction, normal);
animation-duration: var(--fa-animation-duration, 1s);
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
animation-timing-function: var(--fa-animation-timing, linear);
}
.fa-spin {
animation-name: fa-spin;
animation-delay: var(--fa-animation-delay, 0s);
animation-direction: var(--fa-animation-direction, normal);
animation-duration: var(--fa-animation-duration, 2s);
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
animation-timing-function: var(--fa-animation-timing, linear);
}
.fa-spin-reverse {
--fa-animation-direction: reverse;
}
.fa-pulse,
.fa-spin-pulse {
animation-name: fa-spin;
animation-direction: var(--fa-animation-direction, normal);
animation-duration: var(--fa-animation-duration, 1s);
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
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 {
animation: none !important;
transition: none !important;
}
}
@keyframes fa-beat {
0%, 90% {
transform: scale(1);
}
45% {
transform: scale(var(--fa-beat-scale, 1.25));
}
}
@keyframes fa-bounce {
0% {
transform: scale(1, 1) translateY(0);
}
10% {
transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
}
30% {
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% {
transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
}
57% {
transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
}
64% {
transform: scale(1, 1) translateY(0);
}
100% {
transform: scale(1, 1) translateY(0);
}
}
@keyframes fa-fade {
50% {
opacity: var(--fa-fade-opacity, 0.4);
}
}
@keyframes fa-beat-fade {
0%, 100% {
opacity: var(--fa-beat-fade-opacity, 0.4);
transform: scale(1);
}
50% {
opacity: 1;
transform: scale(var(--fa-beat-fade-scale, 1.125));
}
}
@keyframes fa-flip {
50% {
transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
}
}
@keyframes fa-shake {
0% {
transform: rotate(-15deg);
}
4% {
transform: rotate(15deg);
}
8%, 24% {
transform: rotate(-18deg);
}
12%, 28% {
transform: rotate(18deg);
}
16% {
transform: rotate(-22deg);
}
20% {
transform: rotate(22deg);
}
32% {
transform: rotate(-12deg);
}
36% {
transform: rotate(12deg);
}
40%, 100% {
transform: rotate(0deg);
}
}
@keyframes fa-spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.fa-rotate-90 {
transform: rotate(90deg);
}
.fa-rotate-180 {
transform: rotate(180deg);
}
.fa-rotate-270 {
transform: rotate(270deg);
}
.fa-flip-horizontal {
transform: scale(-1, 1);
}
.fa-flip-vertical {
transform: scale(1, -1);
}
.fa-flip-both,
.fa-flip-horizontal.fa-flip-vertical {
transform: scale(-1, -1);
}
.fa-rotate-by {
transform: rotate(var(--fa-rotate-angle, 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;
}
.svg-inline--fa.fa-inverse {
fill: var(--fa-inverse, #fff);
}
.fa-stack {
display: inline-block;
height: 2em;
line-height: 2em;
position: relative;
vertical-align: middle;
width: 2.5em;
}
.fa-inverse {
color: var(--fa-inverse, #fff);
}
.svg-inline--fa.fa-stack-1x {
--fa-width: 1.25em;
height: 1em;
width: var(--fa-width);
}
.svg-inline--fa.fa-stack-2x {
--fa-width: 2.5em;
height: 2em;
width: var(--fa-width);
}
.fa-stack-1x,
.fa-stack-2x {
inset: 0;
margin: auto;
position: absolute;
z-index: var(--fa-stack-z-index, auto);
}`;function S6(){var e=p6,t=g6,n=lt.cssPrefix,r=lt.replacementClass,i=hq;if(n!==e||r!==t){var a=new RegExp("\\.".concat(e,"\\-"),"g"),s=new RegExp("\\--".concat(e,"\\-"),"g"),u=new RegExp("\\.".concat(t),"g");i=i.replace(a,".".concat(n,"-")).replace(s,"--".concat(n,"-")).replace(u,".".concat(r))}return i}var zA=!1;function K1(){lt.autoAddCss&&!zA&&(lq(S6()),zA=!0)}var mq={mixout:function(){return{dom:{css:S6,insertCss:K1}}},hooks:function(){return{beforeDOMElementCreation:function(){K1()},beforeI2svg:function(){K1()}}}},$o=dl||{};$o[Fo]||($o[Fo]={});$o[Fo].styles||($o[Fo].styles={});$o[Fo].hooks||($o[Fo].hooks={});$o[Fo].shims||($o[Fo].shims=[]);var pa=$o[Fo],C6=[],E6=function(){ln.removeEventListener("DOMContentLoaded",E6),Og=1,C6.map(function(t){return t()})},Og=!1;Zo&&(Og=(ln.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(ln.readyState),Og||ln.addEventListener("DOMContentLoaded",E6));function pq(e){Zo&&(Og?setTimeout(e,0):C6.push(e))}function Bh(e){var t=e.tag,n=e.attributes,r=n===void 0?{}:n,i=e.children,a=i===void 0?[]:i;return typeof e=="string"?w6(e):"<".concat(t," ").concat(cq(r),">").concat(a.map(Bh).join(""),"</").concat(t,">")}function FA(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var Z1=function(t,n,r,i){var a=Object.keys(t),s=a.length,u=n,d,f,m;for(r===void 0?(d=1,m=t[a[0]]):(d=0,m=r);d<s;d++)f=a[d],m=u(m,t[f],f,t);return m};function A6(e){return ya(e).length!==1?null:e.codePointAt(0).toString(16)}function $A(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 gx(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,a=$A(t);typeof pa.hooks.addPack=="function"&&!i?pa.hooks.addPack(e,$A(t)):pa.styles[e]=We(We({},pa.styles[e]||{}),a),e==="fas"&&gx("fa",t)}var mh=pa.styles,gq=pa.shims,T6=Object.keys(sw),vq=T6.reduce(function(e,t){return e[t]=Object.keys(sw[t]),e},{}),cw=null,O6={},j6={},P6={},M6={},R6={};function yq(e){return~rq.indexOf(e)}function bq(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!yq(i)?i:null}var N6=function(){var t=function(a){return Z1(mh,function(s,u,d){return s[d]=Z1(u,a,{}),s},{})};O6=t(function(i,a,s){if(a[3]&&(i[a[3]]=s),a[2]){var u=a[2].filter(function(d){return typeof d=="number"});u.forEach(function(d){i[d.toString(16)]=s})}return i}),j6=t(function(i,a,s){if(i[s]=s,a[2]){var u=a[2].filter(function(d){return typeof d=="string"});u.forEach(function(d){i[d]=s})}return i}),R6=t(function(i,a,s){var u=a[2];return i[s]=s,u.forEach(function(d){i[d]=s}),i});var n="far"in mh||lt.autoFetchSvg,r=Z1(gq,function(i,a){var s=a[0],u=a[1],d=a[2];return u==="far"&&!n&&(u="fas"),typeof s=="string"&&(i.names[s]={prefix:u,iconName:d}),typeof s=="number"&&(i.unicodes[s.toString(16)]={prefix:u,iconName:d}),i},{names:{},unicodes:{}});P6=r.names,M6=r.unicodes,cw=Fv(lt.styleDefault,{family:lt.familyDefault})};sq(function(e){cw=Fv(e.styleDefault,{family:lt.familyDefault})});N6();function fw(e,t){return(O6[e]||{})[t]}function _q(e,t){return(j6[e]||{})[t]}function mu(e,t){return(R6[e]||{})[t]}function L6(e){return P6[e]||{prefix:null,iconName:null}}function xq(e){var t=M6[e],n=fw("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function hl(){return cw}var D6=function(){return{prefix:null,iconName:null,rest:[]}};function wq(e){var t=yr,n=T6.reduce(function(r,i){return r[i]="".concat(lt.cssPrefix,"-").concat(i),r},{});return f6.forEach(function(r){(e.includes(n[r])||e.some(function(i){return vq[r].includes(i)}))&&(t=r)}),t}function Fv(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?yr:n,i=QH[r][e];if(r===Ih&&!e)return"fad";var a=UA[r][e]||UA[r][i],s=e in pa.styles?e:null,u=a||s||null;return u}function Sq(e){var t=[],n=null;return e.forEach(function(r){var i=bq(lt.cssPrefix,r);i?n=i:r&&t.push(r)}),{iconName:n,rest:t}}function VA(e){return e.sort().filter(function(t,n,r){return r.indexOf(t)===n})}var HA=h6.concat(d6);function $v(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.skipLookups,r=n===void 0?!1:n,i=null,a=VA(e.filter(function(_){return HA.includes(_)})),s=VA(e.filter(function(_){return!HA.includes(_)})),u=a.filter(function(_){return i=_,!XR.includes(_)}),d=Bv(u,1),f=d[0],m=f===void 0?null:f,p=wq(a),b=We(We({},Sq(s)),{},{prefix:Fv(m,{family:p})});return We(We(We({},b),Tq({values:e,family:p,styles:mh,config:lt,canonical:b,givenPrefix:i})),Cq(r,i,b))}function Cq(e,t,n){var r=n.prefix,i=n.iconName;if(e||!r||!i)return{prefix:r,iconName:i};var a=t==="fa"?L6(i):{},s=mu(r,i);return i=a.iconName||s||i,r=a.prefix||r,r==="far"&&!mh.far&&mh.fas&&!lt.autoFetchSvg&&(r="fas"),{prefix:r,iconName:i}}var Eq=f6.filter(function(e){return e!==yr||e!==Ih}),Aq=Object.keys(cx).filter(function(e){return e!==yr}).map(function(e){return Object.keys(cx[e])}).flat();function Tq(e){var t=e.values,n=e.family,r=e.canonical,i=e.givenPrefix,a=i===void 0?"":i,s=e.styles,u=s===void 0?{}:s,d=e.config,f=d===void 0?{}:d,m=n===Ih,p=t.includes("fa-duotone")||t.includes("fad"),b=f.familyDefault==="duotone",_=r.prefix==="fad"||r.prefix==="fa-duotone";if(!m&&(p||b||_)&&(r.prefix="fad"),(t.includes("fa-brands")||t.includes("fab"))&&(r.prefix="fab"),!r.prefix&&Eq.includes(n)){var w=Object.keys(u).find(function(E){return Aq.includes(E)});if(w||f.autoFetchSvg){var x=ZV.get(n).defaultShortPrefixId;r.prefix=x,r.iconName=mu(r.prefix,r.iconName)||r.iconName}}return(r.prefix==="fa"||a==="fa")&&(r.prefix=hl()||"fas"),r}var Oq=function(){function e(){xV(this,e),this.definitions={}}return SV(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var s=i.reduce(this._pullDefinitions,{});Object.keys(s).forEach(function(u){n.definitions[u]=We(We({},n.definitions[u]||{}),s[u]),gx(u,s[u]);var d=sw[yr][u];d&&gx(d,s[u]),N6()})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(n,r){var i=r.prefix&&r.iconName&&r.icon?{0:r}:r;return Object.keys(i).map(function(a){var s=i[a],u=s.prefix,d=s.iconName,f=s.icon,m=f[2];n[u]||(n[u]={}),m.length>0&&m.forEach(function(p){typeof p=="string"&&(n[u][p]=f)}),n[u][d]=f}),n}}])}(),qA=[],zc={},Hc={},jq=Object.keys(Hc);function Pq(e,t){var n=t.mixoutsTo;return qA=e,zc={},Object.keys(Hc).forEach(function(r){jq.indexOf(r)===-1&&delete Hc[r]}),qA.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(s){typeof i[s]=="function"&&(n[s]=i[s]),Tg(i[s])==="object"&&Object.keys(i[s]).forEach(function(u){n[s]||(n[s]={}),n[s][u]=i[s][u]})}),r.hooks){var a=r.hooks();Object.keys(a).forEach(function(s){zc[s]||(zc[s]=[]),zc[s].push(a[s])})}r.provides&&r.provides(Hc)}),n}function vx(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var a=zc[e]||[];return a.forEach(function(s){t=s.apply(null,[t].concat(r))}),t}function Ou(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=zc[e]||[];i.forEach(function(a){a.apply(null,n)})}function ml(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return Hc[e]?Hc[e].apply(null,t):void 0}function yx(e){e.prefix==="fa"&&(e.prefix="fas");var t=e.iconName,n=e.prefix||hl();if(t)return t=mu(n,t)||t,FA(k6.definitions,n,t)||FA(pa.styles,n,t)}var k6=new Oq,Mq=function(){lt.autoReplaceSvg=!1,lt.observeMutations=!1,Ou("noAuto")},Rq={i2svg:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Zo?(Ou("beforeI2svg",t),ml("pseudoElements2svg",t),ml("i2svg",t)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot;lt.autoReplaceSvg===!1&&(lt.autoReplaceSvg=!0),lt.observeMutations=!0,pq(function(){Lq({autoReplaceSvgRoot:n}),Ou("watch",t)})}},Nq={icon:function(t){if(t===null)return null;if(Tg(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:mu(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=Fv(t[0]);return{prefix:r,iconName:mu(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(lt.cssPrefix,"-"))>-1||t.match(JH))){var i=$v(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||hl(),iconName:mu(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var a=hl();return{prefix:a,iconName:mu(a,t)||t}}}},Mi={noAuto:Mq,config:lt,dom:Rq,parse:Nq,library:k6,findIconDefinition:yx,toHtml:Bh},Lq=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?ln:n;(Object.keys(pa.styles).length>0||lt.autoFetchSvg)&&Zo&&lt.autoReplaceSvg&&Mi.dom.i2svg({node:r})};function Vv(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return Bh(r)})}}),Object.defineProperty(e,"node",{get:function(){if(Zo){var r=ln.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function Dq(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,a=e.styles,s=e.transform;if(uw(s)&&n.found&&!r.found){var u=n.width,d=n.height,f={x:u/d/2,y:.5};i.style=zv(We(We({},a),{},{"transform-origin":"".concat(f.x+s.x/16,"em ").concat(f.y+s.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function kq(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,a=e.symbol,s=a===!0?"".concat(t,"-").concat(lt.cssPrefix,"-").concat(n):a;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:We(We({},i),{},{id:s}),children:r}]}]}function Iq(e){var t=["aria-label","aria-labelledby","title","role"];return t.some(function(n){return n in e})}function dw(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,a=e.iconName,s=e.transform,u=e.symbol,d=e.maskId,f=e.extra,m=e.watchable,p=m===void 0?!1:m,b=r.found?r:n,_=b.width,w=b.height,x=[lt.replacementClass,a?"".concat(lt.cssPrefix,"-").concat(a):""].filter(function(U){return f.classes.indexOf(U)===-1}).filter(function(U){return U!==""||!!U}).concat(f.classes).join(" "),E={children:[],attributes:We(We({},f.attributes),{},{"data-prefix":i,"data-icon":a,class:x,role:f.attributes.role||"img",viewBox:"0 0 ".concat(_," ").concat(w)})};!Iq(f.attributes)&&!f.attributes["aria-hidden"]&&(E.attributes["aria-hidden"]="true"),p&&(E.attributes[Tu]="");var A=We(We({},E),{},{prefix:i,iconName:a,main:n,mask:r,maskId:d,transform:s,symbol:u,styles:We({},f.styles)}),j=r.found&&n.found?ml("generateAbstractMask",A)||{children:[],attributes:{}}:ml("generateAbstractIcon",A)||{children:[],attributes:{}},O=j.children,N=j.attributes;return A.children=O,A.attributes=N,u?kq(A):Dq(A)}function GA(e){var t=e.content,n=e.width,r=e.height,i=e.transform,a=e.extra,s=e.watchable,u=s===void 0?!1:s,d=We(We({},a.attributes),{},{class:a.classes.join(" ")});u&&(d[Tu]="");var f=We({},a.styles);uw(i)&&(f.transform=dq({transform:i,width:n,height:r}),f["-webkit-transform"]=f.transform);var m=zv(f);m.length>0&&(d.style=m);var p=[];return p.push({tag:"span",attributes:d,children:[t]}),p}function Uq(e){var t=e.content,n=e.extra,r=We(We({},n.attributes),{},{class:n.classes.join(" ")}),i=zv(n.styles);i.length>0&&(r.style=i);var a=[];return a.push({tag:"span",attributes:r,children:[t]}),a}var X1=pa.styles;function bx(e){var t=e[0],n=e[1],r=e.slice(4),i=Bv(r,1),a=i[0],s=null;return Array.isArray(a)?s={tag:"g",attributes:{class:"".concat(lt.cssPrefix,"-").concat(W1.GROUP)},children:[{tag:"path",attributes:{class:"".concat(lt.cssPrefix,"-").concat(W1.SECONDARY),fill:"currentColor",d:a[0]}},{tag:"path",attributes:{class:"".concat(lt.cssPrefix,"-").concat(W1.PRIMARY),fill:"currentColor",d:a[1]}}]}:s={tag:"path",attributes:{fill:"currentColor",d:a}},{found:!0,width:t,height:n,icon:s}}var Bq={found:!1,width:512,height:512};function zq(e,t){!y6&&!lt.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function _x(e,t){var n=t;return t==="fa"&&lt.styleDefault!==null&&(t=hl()),new Promise(function(r,i){if(n==="fa"){var a=L6(e)||{};e=a.iconName||e,t=a.prefix||t}if(e&&t&&X1[t]&&X1[t][e]){var s=X1[t][e];return r(bx(s))}zq(e,t),r(We(We({},Bq),{},{icon:lt.showMissingIcons&&e?ml("missingIconAbstract")||{}:{}}))})}var YA=function(){},xx=lt.measurePerformance&&Lp&&Lp.mark&&Lp.measure?Lp:{mark:YA,measure:YA},Xd='FA "7.0.1"',Fq=function(t){return xx.mark("".concat(Xd," ").concat(t," begins")),function(){return I6(t)}},I6=function(t){xx.mark("".concat(Xd," ").concat(t," ends")),xx.measure("".concat(Xd," ").concat(t),"".concat(Xd," ").concat(t," begins"),"".concat(Xd," ").concat(t," ends"))},hw={begin:Fq,end:I6},hg=function(){};function WA(e){var t=e.getAttribute?e.getAttribute(Tu):null;return typeof t=="string"}function $q(e){var t=e.getAttribute?e.getAttribute(aw):null,n=e.getAttribute?e.getAttribute(ow):null;return t&&n}function Vq(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(lt.replacementClass)}function Hq(){if(lt.autoReplaceSvg===!0)return mg.replace;var e=mg[lt.autoReplaceSvg];return e||mg.replace}function qq(e){return ln.createElementNS("http://www.w3.org/2000/svg",e)}function Gq(e){return ln.createElement(e)}function U6(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?qq:Gq:n;if(typeof e=="string")return ln.createTextNode(e);var i=r(e.tag);Object.keys(e.attributes||[]).forEach(function(s){i.setAttribute(s,e.attributes[s])});var a=e.children||[];return a.forEach(function(s){i.appendChild(U6(s,{ceFn:r}))}),i}function Yq(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var mg={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(U6(i),n)}),n.getAttribute(Tu)===null&&lt.keepOriginalSource){var r=ln.createComment(Yq(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~lw(n).indexOf(lt.replacementClass))return mg.replace(t);var i=new RegExp("".concat(lt.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var a=r[0].attributes.class.split(" ").reduce(function(u,d){return d===lt.replacementClass||d.match(i)?u.toSvg.push(d):u.toNode.push(d),u},{toNode:[],toSvg:[]});r[0].attributes.class=a.toSvg.join(" "),a.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",a.toNode.join(" "))}var s=r.map(function(u){return Bh(u)}).join(`
`);n.setAttribute(Tu,""),n.innerHTML=s}};function KA(e){e()}function B6(e,t){var n=typeof t=="function"?t:hg;if(e.length===0)n();else{var r=KA;lt.mutateApproach===ZH&&(r=dl.requestAnimationFrame||KA),r(function(){var i=Hq(),a=hw.begin("mutate");e.map(i),a(),n()})}}var mw=!1;function z6(){mw=!0}function wx(){mw=!1}var jg=null;function ZA(e){if(LA&&lt.observeMutations){var t=e.treeCallback,n=t===void 0?hg:t,r=e.nodeCallback,i=r===void 0?hg:r,a=e.pseudoElementsCallback,s=a===void 0?hg:a,u=e.observeMutationsRoot,d=u===void 0?ln:u;jg=new LA(function(f){if(!mw){var m=hl();yf(f).forEach(function(p){if(p.type==="childList"&&p.addedNodes.length>0&&!WA(p.addedNodes[0])&&(lt.searchPseudoElements&&s(p.target),n(p.target)),p.type==="attributes"&&p.target.parentNode&&lt.searchPseudoElements&&s([p.target],!0),p.type==="attributes"&&WA(p.target)&&~nq.indexOf(p.attributeName))if(p.attributeName==="class"&&$q(p.target)){var b=$v(lw(p.target)),_=b.prefix,w=b.iconName;p.target.setAttribute(aw,_||m),w&&p.target.setAttribute(ow,w)}else Vq(p.target)&&i(p.target)})}}),Zo&&jg.observe(d,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function Wq(){jg&&jg.disconnect()}function Kq(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,i){var a=i.split(":"),s=a[0],u=a.slice(1);return s&&u.length>0&&(r[s]=u.join(":").trim()),r},{})),n}function Zq(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=$v(lw(e));return i.prefix||(i.prefix=hl()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=_q(i.prefix,e.innerText)||fw(i.prefix,A6(e.innerText))),!i.iconName&&lt.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function Xq(e){var t=yf(e.attributes).reduce(function(n,r){return n.name!=="class"&&n.name!=="style"&&(n[r.name]=r.value),n},{});return t}function Qq(){return{iconName:null,prefix:null,transform:Va,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function XA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=Zq(e),r=n.iconName,i=n.prefix,a=n.rest,s=Xq(e),u=vx("parseNodeAttributes",{},e),d=t.styleParser?Kq(e):[];return We({iconName:r,prefix:i,transform:Va,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:a,styles:d,attributes:s}},u)}var Jq=pa.styles;function F6(e){var t=lt.autoReplaceSvg==="nest"?XA(e,{styleParser:!1}):XA(e);return~t.extra.classes.indexOf(_6)?ml("generateLayersText",e,t):ml("generateSvgReplacementMutation",e,t)}function eG(){return[].concat(ya(d6),ya(h6))}function QA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!Zo)return Promise.resolve();var n=ln.documentElement.classList,r=function(p){return n.add("".concat(IA,"-").concat(p))},i=function(p){return n.remove("".concat(IA,"-").concat(p))},a=lt.autoFetchSvg?eG():XR.concat(Object.keys(Jq));a.includes("fa")||a.push("fa");var s=[".".concat(_6,":not([").concat(Tu,"])")].concat(a.map(function(m){return".".concat(m,":not([").concat(Tu,"])")})).join(", ");if(s.length===0)return Promise.resolve();var u=[];try{u=yf(e.querySelectorAll(s))}catch{}if(u.length>0)r("pending"),i("complete");else return Promise.resolve();var d=hw.begin("onTree"),f=u.reduce(function(m,p){try{var b=F6(p);b&&m.push(b)}catch(_){y6||_.name==="MissingIcon"&&console.error(_)}return m},[]);return new Promise(function(m,p){Promise.all(f).then(function(b){B6(b,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),d(),m()})}).catch(function(b){d(),p(b)})})}function tG(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;F6(e).then(function(n){n&&B6([n],t)})}function nG(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:yx(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:yx(i||{})),e(r,We(We({},n),{},{mask:i}))}}var rG=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?Va:r,a=n.symbol,s=a===void 0?!1:a,u=n.mask,d=u===void 0?null:u,f=n.maskId,m=f===void 0?null:f,p=n.classes,b=p===void 0?[]:p,_=n.attributes,w=_===void 0?{}:_,x=n.styles,E=x===void 0?{}:x;if(t){var A=t.prefix,j=t.iconName,O=t.icon;return Vv(We({type:"icon"},t),function(){return Ou("beforeDOMElementCreation",{iconDefinition:t,params:n}),dw({icons:{main:bx(O),mask:d?bx(d.icon):{found:!1,width:null,height:null,icon:{}}},prefix:A,iconName:j,transform:We(We({},Va),i),symbol:s,maskId:m,extra:{attributes:w,styles:E,classes:b}})})}},iG={mixout:function(){return{icon:nG(rG)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=QA,n.nodeCallback=tG,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?ln:r,a=n.callback,s=a===void 0?function(){}:a;return QA(i,s)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,a=r.prefix,s=r.transform,u=r.symbol,d=r.mask,f=r.maskId,m=r.extra;return new Promise(function(p,b){Promise.all([_x(i,a),d.iconName?_x(d.iconName,d.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(_){var w=Bv(_,2),x=w[0],E=w[1];p([n,dw({icons:{main:x,mask:E},prefix:a,iconName:i,transform:s,symbol:u,maskId:f,extra:m,watchable:!0})])}).catch(b)})},t.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,a=n.main,s=n.transform,u=n.styles,d=zv(u);d.length>0&&(i.style=d);var f;return uw(s)&&(f=ml("generateAbstractTransformGrouping",{main:a,transform:s,containerWidth:a.width,iconWidth:a.width})),r.push(f||a.icon),{children:r,attributes:i}}}},aG={mixout:function(){return{layer:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.classes,a=i===void 0?[]:i;return Vv({type:"layer"},function(){Ou("beforeDOMElementCreation",{assembler:n,params:r});var s=[];return n(function(u){Array.isArray(u)?u.map(function(d){s=s.concat(d.abstract)}):s=s.concat(u.abstract)}),[{tag:"span",attributes:{class:["".concat(lt.cssPrefix,"-layers")].concat(ya(a)).join(" ")},children:s}]})}}}},oG={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};r.title;var i=r.classes,a=i===void 0?[]:i,s=r.attributes,u=s===void 0?{}:s,d=r.styles,f=d===void 0?{}:d;return Vv({type:"counter",content:n},function(){return Ou("beforeDOMElementCreation",{content:n,params:r}),Uq({content:n.toString(),extra:{attributes:u,styles:f,classes:["".concat(lt.cssPrefix,"-layers-counter")].concat(ya(a))}})})}}}},sG={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,a=i===void 0?Va:i,s=r.classes,u=s===void 0?[]:s,d=r.attributes,f=d===void 0?{}:d,m=r.styles,p=m===void 0?{}:m;return Vv({type:"text",content:n},function(){return Ou("beforeDOMElementCreation",{content:n,params:r}),GA({content:n,transform:We(We({},Va),a),extra:{attributes:f,styles:p,classes:["".concat(lt.cssPrefix,"-layers-text")].concat(ya(u))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.transform,a=r.extra,s=null,u=null;if(KR){var d=parseInt(getComputedStyle(n).fontSize,10),f=n.getBoundingClientRect();s=f.width/d,u=f.height/d}return Promise.resolve([n,GA({content:n.innerHTML,width:s,height:u,transform:i,extra:a,watchable:!0})])}}},$6=new RegExp('"',"ug"),JA=[1105920,1112319],eT=We(We(We(We({},{FontAwesome:{normal:"fas",400:"fas"}}),KV),WH),iH),Sx=Object.keys(eT).reduce(function(e,t){return e[t.toLowerCase()]=eT[t],e},{}),lG=Object.keys(Sx).reduce(function(e,t){var n=Sx[t];return e[t]=n[900]||ya(Object.entries(n))[0][1],e},{});function uG(e){var t=e.replace($6,"");return A6(ya(t)[0]||"")}function cG(e){var t=e.getPropertyValue("font-feature-settings").includes("ss01"),n=e.getPropertyValue("content"),r=n.replace($6,""),i=r.codePointAt(0),a=i>=JA[0]&&i<=JA[1],s=r.length===2?r[0]===r[1]:!1;return a||s||t}function fG(e,t){var n=e.replace(/^['"]|['"]$/g,"").toLowerCase(),r=parseInt(t),i=isNaN(r)?"normal":r;return(Sx[n]||{})[i]||lG[n]}function tT(e,t){var n="".concat(KH).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var a=yf(e.children),s=a.filter(function(V){return V.getAttribute(dx)===t})[0],u=dl.getComputedStyle(e,t),d=u.getPropertyValue("font-family"),f=d.match(eq),m=u.getPropertyValue("font-weight"),p=u.getPropertyValue("content");if(s&&!f)return e.removeChild(s),r();if(f&&p!=="none"&&p!==""){var b=u.getPropertyValue("content"),_=fG(d,m),w=uG(b),x=f[0].startsWith("FontAwesome"),E=cG(u),A=fw(_,w),j=A;if(x){var O=xq(w);O.iconName&&O.prefix&&(A=O.iconName,_=O.prefix)}if(A&&!E&&(!s||s.getAttribute(aw)!==_||s.getAttribute(ow)!==j)){e.setAttribute(n,j),s&&e.removeChild(s);var N=Qq(),U=N.extra;U.attributes[dx]=t,_x(A,_).then(function(V){var Z=dw(We(We({},N),{},{icons:{main:V,mask:D6()},prefix:_,iconName:j,extra:U,watchable:!0})),X=ln.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(X,e.firstChild):e.appendChild(X),X.outerHTML=Z.map(function(oe){return Bh(oe)}).join(`
`),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function dG(e){return Promise.all([tT(e,"::before"),tT(e,"::after")])}function hG(e){return e.parentNode!==document.head&&!~XH.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(dx)&&(!e.parentNode||e.parentNode.tagName!=="svg")}var mG=function(t){return!!t&&v6.some(function(n){return t.includes(n)})},pG=function(t){if(!t)return[];var n=new Set,r=t.split(/,(?![^()]*\))/).map(function(d){return d.trim()});r=r.flatMap(function(d){return d.includes("(")?d:d.split(",").map(function(f){return f.trim()})});var i=dg(r),a;try{for(i.s();!(a=i.n()).done;){var s=a.value;if(mG(s)){var u=v6.reduce(function(d,f){return d.replace(f,"")},s);u!==""&&u!=="*"&&n.add(u)}}}catch(d){i.e(d)}finally{i.f()}return n};function nT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Zo){var n;if(t)n=e;else if(lt.searchPseudoElementsFullScan)n=e.querySelectorAll("*");else{var r=new Set,i=dg(document.styleSheets),a;try{for(i.s();!(a=i.n()).done;){var s=a.value;try{var u=dg(s.cssRules),d;try{for(u.s();!(d=u.n()).done;){var f=d.value,m=pG(f.selectorText),p=dg(m),b;try{for(p.s();!(b=p.n()).done;){var _=b.value;r.add(_)}}catch(x){p.e(x)}finally{p.f()}}}catch(x){u.e(x)}finally{u.f()}}catch(x){lt.searchPseudoElementsWarnings&&console.warn("Font Awesome: cannot parse stylesheet: ".concat(s.href," (").concat(x.message,`)
If it declares any Font Awesome CSS pseudo-elements, they will not be rendered as SVG icons. Add crossorigin="anonymous" to the <link>, enable searchPseudoElementsFullScan for slower but more thorough DOM parsing, or suppress this warning by setting searchPseudoElementsWarnings to false.`))}}}catch(x){i.e(x)}finally{i.f()}if(!r.size)return;var w=Array.from(r).join(", ");try{n=e.querySelectorAll(w)}catch{}}return new Promise(function(x,E){var A=yf(n).filter(hG).map(dG),j=hw.begin("searchPseudoElements");z6(),Promise.all(A).then(function(){j(),wx(),x()}).catch(function(){j(),wx(),E()})})}}var gG={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=nT,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?ln:r;lt.searchPseudoElements&&nT(i)}}},rT=!1,vG={mixout:function(){return{dom:{unwatch:function(){z6(),rT=!0}}}},hooks:function(){return{bootstrap:function(){ZA(vx("mutationObserverCallbacks",{}))},noAuto:function(){Wq()},watch:function(n){var r=n.observeMutationsRoot;rT?wx():ZA(vx("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},iT=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 a=i.toLowerCase().split("-"),s=a[0],u=a.slice(1).join("-");if(s&&u==="h")return r.flipX=!0,r;if(s&&u==="v")return r.flipY=!0,r;if(u=parseFloat(u),isNaN(u))return r;switch(s){case"grow":r.size=r.size+u;break;case"shrink":r.size=r.size-u;break;case"left":r.x=r.x-u;break;case"right":r.x=r.x+u;break;case"up":r.y=r.y-u;break;case"down":r.y=r.y+u;break;case"rotate":r.rotate=r.rotate+u;break}return r},n)},yG={mixout:function(){return{parse:{transform:function(n){return iT(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=iT(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,a=n.containerWidth,s=n.iconWidth,u={transform:"translate(".concat(a/2," 256)")},d="translate(".concat(i.x*32,", ").concat(i.y*32,") "),f="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),m="rotate(".concat(i.rotate," 0 0)"),p={transform:"".concat(d," ").concat(f," ").concat(m)},b={transform:"translate(".concat(s/2*-1," -256)")},_={outer:u,inner:p,path:b};return{tag:"g",attributes:We({},_.outer),children:[{tag:"g",attributes:We({},_.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:We(We({},r.icon.attributes),_.path)}]}]}}}},Q1={x:0,y:0,width:"100%",height:"100%"};function aT(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 bG(e){return e.tag==="g"?e.children:[e]}var _G={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),a=i?$v(i.split(" ").map(function(s){return s.trim()})):D6();return a.prefix||(a.prefix=hl()),n.mask=a,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,i=n.attributes,a=n.main,s=n.mask,u=n.maskId,d=n.transform,f=a.width,m=a.icon,p=s.width,b=s.icon,_=fq({transform:d,containerWidth:p,iconWidth:f}),w={tag:"rect",attributes:We(We({},Q1),{},{fill:"white"})},x=m.children?{children:m.children.map(aT)}:{},E={tag:"g",attributes:We({},_.inner),children:[aT(We({tag:m.tag,attributes:We(We({},m.attributes),_.path)},x))]},A={tag:"g",attributes:We({},_.outer),children:[E]},j="mask-".concat(u||BA()),O="clip-".concat(u||BA()),N={tag:"mask",attributes:We(We({},Q1),{},{id:j,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[w,A]},U={tag:"defs",children:[{tag:"clipPath",attributes:{id:O},children:bG(b)},N]};return r.push(U,{tag:"rect",attributes:We({fill:"currentColor","clip-path":"url(#".concat(O,")"),mask:"url(#".concat(j,")")},Q1)}),{children:r,attributes:i}}}},xG={provides:function(t){var n=!1;dl.matchMedia&&(n=dl.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],i={fill:"currentColor"},a={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:We(We({},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 s=We(We({},a),{},{attributeName:"opacity"}),u={tag:"circle",attributes:We(We({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||u.children.push({tag:"animate",attributes:We(We({},a),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:We(We({},s),{},{values:"1;0;1;1;0;1;"})}),r.push(u),r.push({tag:"path",attributes:We(We({},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:We(We({},s),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:We(We({},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:We(We({},s),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},wG={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-symbol"),a=i===null?!1:i===""?!0:i;return n.symbol=a,n}}}},SG=[mq,iG,aG,oG,sG,gG,vG,yG,_G,xG,wG];Pq(SG,{mixoutsTo:Mi});Mi.noAuto;var CG=Mi.config;Mi.library;Mi.dom;var V6=Mi.parse;Mi.findIconDefinition;Mi.toHtml;var EG=Mi.icon;Mi.layer;Mi.text;Mi.counter;function AG(e){return e=e-0,e===e}function H6(e){return AG(e)?e:(e=e.replaceAll(/[_-]+(.)?/g,(t,n)=>n?n.toUpperCase():""),e.charAt(0).toLowerCase()+e.slice(1))}function TG(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Lc=new Map,OG=1e3;function jG(e){if(Lc.has(e))return Lc.get(e);const t={};let n=0;const r=e.length;for(;n<r;){const i=e.indexOf(";",n),a=i===-1?r:i,s=e.slice(n,a).trim();if(s){const u=s.indexOf(":");if(u>0){const d=s.slice(0,u).trim(),f=s.slice(u+1).trim();if(d&&f){const m=H6(d);t[m.startsWith("webkit")?TG(m):m]=f}}}n=a+1}if(Lc.size===OG){const i=Lc.keys().next().value;i&&Lc.delete(i)}return Lc.set(e,t),t}function q6(e,t,n={}){if(typeof t=="string")return t;const r=(t.children||[]).map(f=>q6(e,f)),i=t.attributes||{},a={};for(const[f,m]of Object.entries(i))switch(!0){case f==="class":{a.className=m,delete i.class;break}case f==="style":{a.style=jG(String(m));break}case f.startsWith("aria-"):case f.startsWith("data-"):{a[f.toLowerCase()]=m;break}default:a[H6(f)]=m}const{style:s,"aria-label":u,...d}=n;return s&&(a.style=a.style?{...a.style,...s}:s),u&&(a["aria-label"]=u,a["aria-hidden"]="false"),e(t.tag,{...d,...a},...r)}var oT=(e,t)=>{const n=T.useId();return e||(t?n:void 0)},PG=class{constructor(e="react-fontawesome"){this.enabled=!1;let t=!1;try{t=typeof process<"u"&&!1}catch{}this.scope=e,this.enabled=t}log(...e){this.enabled&&console.log(`[${this.scope}]`,...e)}warn(...e){this.enabled&&console.warn(`[${this.scope}]`,...e)}error(...e){this.enabled&&console.error(`[${this.scope}]`,...e)}},MG="searchPseudoElementsFullScan"in CG?"7.0.0":"6.0.0",RG=Number.parseInt(MG)>=7,Mo={beat:"fa-beat",fade:"fa-fade",beatFade:"fa-beat-fade",bounce:"fa-bounce",shake:"fa-shake",spin:"fa-spin",spinPulse:"fa-spin-pulse",spinReverse:"fa-spin-reverse",pulse:"fa-pulse"},NG={left:"fa-pull-left",right:"fa-pull-right"},LG={90:"fa-rotate-90",180:"fa-rotate-180",270:"fa-rotate-270"},DG={"2xs":"fa-2xs",xs:"fa-xs",sm:"fa-sm",lg:"fa-lg",xl:"fa-xl","2xl":"fa-2xl","1x":"fa-1x","2x":"fa-2x","3x":"fa-3x","4x":"fa-4x","5x":"fa-5x","6x":"fa-6x","7x":"fa-7x","8x":"fa-8x","9x":"fa-9x","10x":"fa-10x"},Ro={border:"fa-border",fixedWidth:"fa-fw",flip:"fa-flip",flipHorizontal:"fa-flip-horizontal",flipVertical:"fa-flip-vertical",inverse:"fa-inverse",rotateBy:"fa-rotate-by",swapOpacity:"fa-swap-opacity",widthAuto:"fa-width-auto"};function kG(e){const{beat:t,fade:n,beatFade:r,bounce:i,shake:a,spin:s,spinPulse:u,spinReverse:d,pulse:f,fixedWidth:m,inverse:p,border:b,flip:_,size:w,rotation:x,pull:E,swapOpacity:A,rotateBy:j,widthAuto:O,className:N}=e,U=[];return N&&U.push(...N.split(" ")),t&&U.push(Mo.beat),n&&U.push(Mo.fade),r&&U.push(Mo.beatFade),i&&U.push(Mo.bounce),a&&U.push(Mo.shake),s&&U.push(Mo.spin),d&&U.push(Mo.spinReverse),u&&U.push(Mo.spinPulse),f&&U.push(Mo.pulse),m&&U.push(Ro.fixedWidth),p&&U.push(Ro.inverse),b&&U.push(Ro.border),_===!0&&U.push(Ro.flip),(_==="horizontal"||_==="both")&&U.push(Ro.flipHorizontal),(_==="vertical"||_==="both")&&U.push(Ro.flipVertical),w!=null&&U.push(DG[w]),x!=null&&x!==0&&U.push(LG[x]),E!=null&&U.push(NG[E]),A&&U.push(Ro.swapOpacity),RG&&(j&&U.push(Ro.rotateBy),O&&U.push(Ro.widthAuto)),U}var IG=e=>typeof e=="object"&&"icon"in e&&!!e.icon;function sT(e){if(e)return IG(e)?e:V6.icon(e)}function UG(e){return Object.keys(e)}var lT=new PG("FontAwesomeIcon"),G6={border:!1,className:"",mask:void 0,maskId:void 0,fixedWidth:!1,inverse:!1,flip:!1,icon:void 0,listItem:!1,pull:void 0,pulse:!1,rotation:void 0,rotateBy:!1,size:void 0,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:void 0,transform:void 0,swapOpacity:!1,widthAuto:!1},BG=new Set(Object.keys(G6)),Ye=Xc.forwardRef((e,t)=>{const n={...G6,...e},{icon:r,mask:i,symbol:a,title:s,titleId:u,maskId:d,transform:f}=n,m=oT(d,!!i),p=oT(u,!!s),b=sT(r);if(!b)return lT.error("Icon lookup is undefined",r),null;const _=kG(n),w=typeof f=="string"?V6.transform(f):f,x=sT(i),E=EG(b,{..._.length>0&&{classes:_},...w&&{transform:w},...x&&{mask:x},symbol:a,title:s,titleId:p,maskId:m});if(!E)return lT.error("Could not find icon",b),null;const{abstract:A}=E,j={ref:t};for(const O of UG(n))BG.has(O)||(j[O]=n[O]);return zG(A[0],j)});Ye.displayName="FontAwesomeIcon";var zG=q6.bind(null,Xc.createElement);function Hv(){return typeof window<"u"}function bf(e){return Y6(e)?(e.nodeName||"").toLowerCase():"#document"}function xi(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Xo(e){var t;return(t=(Y6(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Y6(e){return Hv()?e instanceof Node||e instanceof xi(e).Node:!1}function vr(e){return Hv()?e instanceof Element||e instanceof xi(e).Element:!1}function Ci(e){return Hv()?e instanceof HTMLElement||e instanceof xi(e).HTMLElement:!1}function Cx(e){return!Hv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof xi(e).ShadowRoot}const FG=new Set(["inline","contents"]);function zh(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ba(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!FG.has(i)}const $G=new Set(["table","td","th"]);function VG(e){return $G.has(bf(e))}const HG=[":popover-open",":modal"];function qv(e){return HG.some(t=>{try{return e.matches(t)}catch{return!1}})}const qG=["transform","translate","scale","rotate","perspective"],GG=["transform","translate","scale","rotate","perspective","filter"],YG=["paint","layout","strict","content"];function pw(e){const t=gw(),n=vr(e)?ba(e):e;return qG.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||GG.some(r=>(n.willChange||"").includes(r))||YG.some(r=>(n.contain||"").includes(r))}function WG(e){let t=pl(e);for(;Ci(t)&&!Jc(t);){if(pw(t))return t;if(qv(t))return null;t=pl(t)}return null}function gw(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const KG=new Set(["html","body","#document"]);function Jc(e){return KG.has(bf(e))}function ba(e){return xi(e).getComputedStyle(e)}function Gv(e){return vr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pl(e){if(bf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Cx(e)&&e.host||Xo(e);return Cx(t)?t.host:t}function W6(e){const t=pl(e);return Jc(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ci(t)&&zh(t)?t:W6(t)}function K6(e,t,n){var r;t===void 0&&(t=[]);const i=W6(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),s=xi(i);return a?(Ex(s),t.concat(s,s.visualViewport||[],zh(i)?i:[],[])):t.concat(i,K6(i,[]))}function Ex(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const ZG=["top","right","bottom","left"],uT=["start","end"],cT=ZG.reduce((e,t)=>e.concat(t,t+"-"+uT[0],t+"-"+uT[1]),[]),ph=Math.min,qc=Math.max,Pg=Math.round,qa=e=>({x:e,y:e}),XG={left:"right",right:"left",bottom:"top",top:"bottom"},QG={start:"end",end:"start"};function JG(e,t,n){return qc(e,ph(t,n))}function Fh(e,t){return typeof e=="function"?e(t):e}function gl(e){return e.split("-")[0]}function Ga(e){return e.split("-")[1]}function eY(e){return e==="x"?"y":"x"}function vw(e){return e==="y"?"height":"width"}const tY=new Set(["top","bottom"]);function pu(e){return tY.has(gl(e))?"y":"x"}function yw(e){return eY(pu(e))}function Z6(e,t,n){n===void 0&&(n=!1);const r=Ga(e),i=yw(e),a=vw(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Rg(s)),[s,Rg(s)]}function nY(e){const t=Rg(e);return[Mg(e),t,Mg(t)]}function Mg(e){return e.replace(/start|end/g,t=>QG[t])}const fT=["left","right"],dT=["right","left"],rY=["top","bottom"],iY=["bottom","top"];function aY(e,t,n){switch(e){case"top":case"bottom":return n?t?dT:fT:t?fT:dT;case"left":case"right":return t?rY:iY;default:return[]}}function oY(e,t,n,r){const i=Ga(e);let a=aY(gl(e),n==="start",r);return i&&(a=a.map(s=>s+"-"+i),t&&(a=a.concat(a.map(Mg)))),a}function Rg(e){return e.replace(/left|right|bottom|top/g,t=>XG[t])}function sY(e){return{top:0,right:0,bottom:0,left:0,...e}}function X6(e){return typeof e!="number"?sY(e):{top:e,right:e,bottom:e,left:e}}function Ng(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}const lY="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function uY(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Cx(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function kp(e){return e?.ownerDocument||document}function cY(e){return Ci(e)&&e.matches(lY)}function gh(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var fY=typeof document<"u",dY=function(){},vl=fY?T.useLayoutEffect:dY;const hY={...L2};function ol(e){const t=T.useRef(e);return vl(()=>{t.current=e}),t}const mY=hY.useInsertionEffect,pY=mY||(e=>e());function Qd(e){const t=T.useRef(()=>{});return pY(()=>{t.current=e}),T.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}function hT(e,t,n){let{reference:r,floating:i}=e;const a=pu(t),s=yw(t),u=vw(s),d=gl(t),f=a==="y",m=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,b=r[u]/2-i[u]/2;let _;switch(d){case"top":_={x:m,y:r.y-i.height};break;case"bottom":_={x:m,y:r.y+r.height};break;case"right":_={x:r.x+r.width,y:p};break;case"left":_={x:r.x-i.width,y:p};break;default:_={x:r.x,y:r.y}}switch(Ga(t)){case"start":_[s]-=b*(n&&f?-1:1);break;case"end":_[s]+=b*(n&&f?-1:1);break}return _}const gY=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:s}=n,u=a.filter(Boolean),d=await(s.isRTL==null?void 0:s.isRTL(t));let f=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:m,y:p}=hT(f,r,d),b=r,_={},w=0;for(let x=0;x<u.length;x++){const{name:E,fn:A}=u[x],{x:j,y:O,data:N,reset:U}=await A({x:m,y:p,initialPlacement:r,placement:b,strategy:i,middlewareData:_,rects:f,platform:s,elements:{reference:e,floating:t}});m=j??m,p=O??p,_={..._,[E]:{..._[E],...N}},U&&w<=50&&(w++,typeof U=="object"&&(U.placement&&(b=U.placement),U.rects&&(f=U.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):U.rects),{x:m,y:p}=hT(f,b,d)),x=-1)}return{x:m,y:p,placement:b,strategy:i,middlewareData:_}};async function Q6(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:s,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:b=!1,padding:_=0}=Fh(t,e),w=X6(_),E=u[b?p==="floating"?"reference":"floating":p],A=Ng(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(E)))==null||n?E:E.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating)),boundary:f,rootBoundary:m,strategy:d})),j=p==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,O=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating)),N=await(a.isElement==null?void 0:a.isElement(O))?await(a.getScale==null?void 0:a.getScale(O))||{x:1,y:1}:{x:1,y:1},U=Ng(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:j,offsetParent:O,strategy:d}):j);return{top:(A.top-U.top+w.top)/N.y,bottom:(U.bottom-A.bottom+w.bottom)/N.y,left:(A.left-U.left+w.left)/N.x,right:(U.right-A.right+w.right)/N.x}}const vY=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:s,elements:u,middlewareData:d}=t,{element:f,padding:m=0}=Fh(e,t)||{};if(f==null)return{};const p=X6(m),b={x:n,y:r},_=yw(i),w=vw(_),x=await s.getDimensions(f),E=_==="y",A=E?"top":"left",j=E?"bottom":"right",O=E?"clientHeight":"clientWidth",N=a.reference[w]+a.reference[_]-b[_]-a.floating[w],U=b[_]-a.reference[_],V=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f));let Z=V?V[O]:0;(!Z||!await(s.isElement==null?void 0:s.isElement(V)))&&(Z=u.floating[O]||a.floating[w]);const X=N/2-U/2,oe=Z/2-x[w]/2-1,ee=ph(p[A],oe),J=ph(p[j],oe),ne=ee,he=Z-x[w]-J,Q=Z/2-x[w]/2+X,se=JG(ne,Q,he),W=!d.arrow&&Ga(i)!=null&&Q!==se&&a.reference[w]/2-(Q<ne?ee:J)-x[w]/2<0,B=W?Q<ne?Q-ne:Q-he:0;return{[_]:b[_]+B,data:{[_]:se,centerOffset:Q-se-B,...W&&{alignmentOffset:B}},reset:W}}});function yY(e,t,n){return(e?[...n.filter(i=>Ga(i)===e),...n.filter(i=>Ga(i)!==e)]:n.filter(i=>gl(i)===i)).filter(i=>e?Ga(i)===e||(t?Mg(i)!==i:!1):!0)}const bY=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,i;const{rects:a,middlewareData:s,placement:u,platform:d,elements:f}=t,{crossAxis:m=!1,alignment:p,allowedPlacements:b=cT,autoAlignment:_=!0,...w}=Fh(e,t),x=p!==void 0||b===cT?yY(p||null,_,b):b,E=await Q6(t,w),A=((n=s.autoPlacement)==null?void 0:n.index)||0,j=x[A];if(j==null)return{};const O=Z6(j,a,await(d.isRTL==null?void 0:d.isRTL(f.floating)));if(u!==j)return{reset:{placement:x[0]}};const N=[E[gl(j)],E[O[0]],E[O[1]]],U=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:j,overflows:N}],V=x[A+1];if(V)return{data:{index:A+1,overflows:U},reset:{placement:V}};const Z=U.map(ee=>{const J=Ga(ee.placement);return[ee.placement,J&&m?ee.overflows.slice(0,2).reduce((ne,he)=>ne+he,0):ee.overflows[0],ee.overflows]}).sort((ee,J)=>ee[1]-J[1]),oe=((i=Z.filter(ee=>ee[2].slice(0,Ga(ee[0])?2:3).every(J=>J<=0))[0])==null?void 0:i[0])||Z[0][0];return oe!==u?{data:{index:A+1,overflows:U},reset:{placement:oe}}:{}}}},_Y=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:s,initialPlacement:u,platform:d,elements:f}=t,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:b,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:x=!0,...E}=Fh(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const A=gl(i),j=pu(u),O=gl(u)===u,N=await(d.isRTL==null?void 0:d.isRTL(f.floating)),U=b||(O||!x?[Rg(u)]:nY(u)),V=w!=="none";!b&&V&&U.push(...oY(u,x,w,N));const Z=[u,...U],X=await Q6(t,E),oe=[];let ee=((r=a.flip)==null?void 0:r.overflows)||[];if(m&&oe.push(X[A]),p){const Q=Z6(i,s,N);oe.push(X[Q[0]],X[Q[1]])}if(ee=[...ee,{placement:i,overflows:oe}],!oe.every(Q=>Q<=0)){var J,ne;const Q=(((J=a.flip)==null?void 0:J.index)||0)+1,se=Z[Q];if(se&&(!(p==="alignment"?j!==pu(se):!1)||ee.every(I=>pu(I.placement)===j?I.overflows[0]>0:!0)))return{data:{index:Q,overflows:ee},reset:{placement:se}};let W=(ne=ee.filter(B=>B.overflows[0]<=0).sort((B,I)=>B.overflows[1]-I.overflows[1])[0])==null?void 0:ne.placement;if(!W)switch(_){case"bestFit":{var he;const B=(he=ee.filter(I=>{if(V){const z=pu(I.placement);return z===j||z==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(z=>z>0).reduce((z,M)=>z+M,0)]).sort((I,z)=>I[1]-z[1])[0])==null?void 0:he[0];B&&(W=B);break}case"initialPlacement":W=u;break}if(i!==W)return{reset:{placement:W}}}return{}}}},xY=new Set(["left","top"]);async function wY(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=gl(n),u=Ga(n),d=pu(n)==="y",f=xY.has(s)?-1:1,m=a&&d?-1:1,p=Fh(t,e);let{mainAxis:b,crossAxis:_,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof w=="number"&&(_=u==="end"?w*-1:w),d?{x:_*m,y:b*f}:{x:b*f,y:_*m}}const SY=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:s,middlewareData:u}=t,d=await wY(t,e);return s===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+d.x,y:a+d.y,data:{...d,placement:s}}}}};function J6(e){const t=ba(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ci(e),a=i?e.offsetWidth:n,s=i?e.offsetHeight:r,u=Pg(n)!==a||Pg(r)!==s;return u&&(n=a,r=s),{width:n,height:r,$:u}}function eN(e){return vr(e)?e:e.contextElement}function Gc(e){const t=eN(e);if(!Ci(t))return qa(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=J6(t);let s=(a?Pg(n.width):n.width)/r,u=(a?Pg(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!u||!Number.isFinite(u))&&(u=1),{x:s,y:u}}const CY=qa(0);function tN(e){const t=xi(e);return!gw()||!t.visualViewport?CY:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function EY(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==xi(e)?!1:t}function vh(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=eN(e);let s=qa(1);t&&(r?vr(r)&&(s=Gc(r)):s=Gc(e));const u=EY(a,n,r)?tN(a):qa(0);let d=(i.left+u.x)/s.x,f=(i.top+u.y)/s.y,m=i.width/s.x,p=i.height/s.y;if(a){const b=xi(a),_=r&&vr(r)?xi(r):r;let w=b,x=Ex(w);for(;x&&r&&_!==w;){const E=Gc(x),A=x.getBoundingClientRect(),j=ba(x),O=A.left+(x.clientLeft+parseFloat(j.paddingLeft))*E.x,N=A.top+(x.clientTop+parseFloat(j.paddingTop))*E.y;d*=E.x,f*=E.y,m*=E.x,p*=E.y,d+=O,f+=N,w=xi(x),x=Ex(w)}}return Ng({width:m,height:p,x:d,y:f})}function Yv(e,t){const n=Gv(e).scrollLeft;return t?t.left+n:vh(Xo(e)).left+n}function nN(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Yv(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function AY(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",s=Xo(r),u=t?qv(t.floating):!1;if(r===s||u&&a)return n;let d={scrollLeft:0,scrollTop:0},f=qa(1);const m=qa(0),p=Ci(r);if((p||!p&&!a)&&((bf(r)!=="body"||zh(s))&&(d=Gv(r)),Ci(r))){const _=vh(r);f=Gc(r),m.x=_.x+r.clientLeft,m.y=_.y+r.clientTop}const b=s&&!p&&!a?nN(s,d):qa(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+m.x+b.x,y:n.y*f.y-d.scrollTop*f.y+m.y+b.y}}function TY(e){return Array.from(e.getClientRects())}function OY(e){const t=Xo(e),n=Gv(e),r=e.ownerDocument.body,i=qc(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=qc(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Yv(e);const u=-n.scrollTop;return ba(r).direction==="rtl"&&(s+=qc(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:s,y:u}}const mT=25;function jY(e,t){const n=xi(e),r=Xo(e),i=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,u=0,d=0;if(i){a=i.width,s=i.height;const m=gw();(!m||m&&t==="fixed")&&(u=i.offsetLeft,d=i.offsetTop)}const f=Yv(r);if(f<=0){const m=r.ownerDocument,p=m.body,b=getComputedStyle(p),_=m.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,w=Math.abs(r.clientWidth-p.clientWidth-_);w<=mT&&(a-=w)}else f<=mT&&(a+=f);return{width:a,height:s,x:u,y:d}}const PY=new Set(["absolute","fixed"]);function MY(e,t){const n=vh(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Ci(e)?Gc(e):qa(1),s=e.clientWidth*a.x,u=e.clientHeight*a.y,d=i*a.x,f=r*a.y;return{width:s,height:u,x:d,y:f}}function pT(e,t,n){let r;if(t==="viewport")r=jY(e,n);else if(t==="document")r=OY(Xo(e));else if(vr(t))r=MY(t,n);else{const i=tN(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Ng(r)}function rN(e,t){const n=pl(e);return n===t||!vr(n)||Jc(n)?!1:ba(n).position==="fixed"||rN(n,t)}function RY(e,t){const n=t.get(e);if(n)return n;let r=K6(e,[]).filter(u=>vr(u)&&bf(u)!=="body"),i=null;const a=ba(e).position==="fixed";let s=a?pl(e):e;for(;vr(s)&&!Jc(s);){const u=ba(s),d=pw(s);!d&&u.position==="fixed"&&(i=null),(a?!d&&!i:!d&&u.position==="static"&&!!i&&PY.has(i.position)||zh(s)&&!d&&rN(e,s))?r=r.filter(m=>m!==s):i=u,s=pl(s)}return t.set(e,r),r}function NY(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?qv(t)?[]:RY(t,this._c):[].concat(n),r],u=s[0],d=s.reduce((f,m)=>{const p=pT(t,m,i);return f.top=qc(p.top,f.top),f.right=ph(p.right,f.right),f.bottom=ph(p.bottom,f.bottom),f.left=qc(p.left,f.left),f},pT(t,u,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function LY(e){const{width:t,height:n}=J6(e);return{width:t,height:n}}function DY(e,t,n){const r=Ci(t),i=Xo(t),a=n==="fixed",s=vh(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const d=qa(0);function f(){d.x=Yv(i)}if(r||!r&&!a)if((bf(t)!=="body"||zh(i))&&(u=Gv(t)),r){const _=vh(t,!0,a,t);d.x=_.x+t.clientLeft,d.y=_.y+t.clientTop}else i&&f();a&&!r&&i&&f();const m=i&&!r&&!a?nN(i,u):qa(0),p=s.left+u.scrollLeft-d.x-m.x,b=s.top+u.scrollTop-d.y-m.y;return{x:p,y:b,width:s.width,height:s.height}}function J1(e){return ba(e).position==="static"}function gT(e,t){if(!Ci(e)||ba(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Xo(e)===n&&(n=n.ownerDocument.body),n}function iN(e,t){const n=xi(e);if(qv(e))return n;if(!Ci(e)){let i=pl(e);for(;i&&!Jc(i);){if(vr(i)&&!J1(i))return i;i=pl(i)}return n}let r=gT(e,t);for(;r&&VG(r)&&J1(r);)r=gT(r,t);return r&&Jc(r)&&J1(r)&&!pw(r)?n:r||WG(e)||n}const kY=async function(e){const t=this.getOffsetParent||iN,n=this.getDimensions,r=await n(e.floating);return{reference:DY(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function IY(e){return ba(e).direction==="rtl"}const UY={convertOffsetParentRelativeRectToViewportRelativeRect:AY,getDocumentElement:Xo,getClippingRect:NY,getOffsetParent:iN,getElementRects:kY,getClientRects:TY,getDimensions:LY,getScale:Gc,isElement:vr,isRTL:IY},BY=SY,zY=bY,FY=_Y,vT=vY,$Y=(e,t,n)=>{const r=new Map,i={platform:UY,...n},a={...i.platform,_c:r};return gY(e,t,{...i,platform:a})};var VY=typeof document<"u",HY=function(){},pg=VY?T.useLayoutEffect:HY;function Lg(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Lg(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!Lg(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function aN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yT(e,t){const n=aN(e);return Math.round(t*n)/n}function eb(e){const t=T.useRef(e);return pg(()=>{t.current=e}),t}function qY(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:s}={},transform:u=!0,whileElementsMounted:d,open:f}=e,[m,p]=T.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,_]=T.useState(r);Lg(b,r)||_(r);const[w,x]=T.useState(null),[E,A]=T.useState(null),j=T.useCallback(I=>{I!==V.current&&(V.current=I,x(I))},[]),O=T.useCallback(I=>{I!==Z.current&&(Z.current=I,A(I))},[]),N=a||w,U=s||E,V=T.useRef(null),Z=T.useRef(null),X=T.useRef(m),oe=d!=null,ee=eb(d),J=eb(i),ne=eb(f),he=T.useCallback(()=>{if(!V.current||!Z.current)return;const I={placement:t,strategy:n,middleware:b};J.current&&(I.platform=J.current),$Y(V.current,Z.current,I).then(z=>{const M={...z,isPositioned:ne.current!==!1};Q.current&&!Lg(X.current,M)&&(X.current=M,Dh.flushSync(()=>{p(M)}))})},[b,t,n,J,ne]);pg(()=>{f===!1&&X.current.isPositioned&&(X.current.isPositioned=!1,p(I=>({...I,isPositioned:!1})))},[f]);const Q=T.useRef(!1);pg(()=>(Q.current=!0,()=>{Q.current=!1}),[]),pg(()=>{if(N&&(V.current=N),U&&(Z.current=U),N&&U){if(ee.current)return ee.current(N,U,he);he()}},[N,U,he,ee,oe]);const se=T.useMemo(()=>({reference:V,floating:Z,setReference:j,setFloating:O}),[j,O]),W=T.useMemo(()=>({reference:N,floating:U}),[N,U]),B=T.useMemo(()=>{const I={position:n,left:0,top:0};if(!W.floating)return I;const z=yT(W.floating,m.x),M=yT(W.floating,m.y);return u?{...I,transform:"translate("+z+"px, "+M+"px)",...aN(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:M}},[n,u,W.floating,m.x,m.y]);return T.useMemo(()=>({...m,update:he,refs:se,elements:W,floatingStyles:B}),[m,he,se,W,B])}const GY=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?vT({element:r.current,padding:i}).fn(n):{}:r?vT({element:r,padding:i}).fn(n):{}}}},YY=(e,t)=>({...BY(e),options:[e,t]}),WY=(e,t)=>({...FY(e),options:[e,t]}),KY=(e,t)=>({...zY(e),options:[e,t]}),ZY=(e,t)=>({...GY(e),options:[e,t]}),XY="data-floating-ui-focusable",bT="active",_T="selected",QY={...L2};let xT=!1,JY=0;const wT=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+JY++;function eW(){const[e,t]=T.useState(()=>xT?wT():void 0);return vl(()=>{e==null&&t(wT())},[]),T.useEffect(()=>{xT=!0},[]),e}const tW=QY.useId,nW=tW||eW;function rW(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const iW=T.createContext(null),aW=T.createContext(null),oN=()=>{var e;return((e=T.useContext(iW))==null?void 0:e.id)||null},sN=()=>T.useContext(aW);function oW(e){return"data-floating-ui-"+e}function ua(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const ST=oW("safe-polygon");function tb(e,t,n){if(n&&!gh(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function nb(e){return typeof e=="function"?e():e}function sW(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,events:a,elements:s}=e,{enabled:u=!0,delay:d=0,handleClose:f=null,mouseOnly:m=!1,restMs:p=0,move:b=!0}=t,_=sN(),w=oN(),x=ol(f),E=ol(d),A=ol(n),j=ol(p),O=T.useRef(),N=T.useRef(-1),U=T.useRef(),V=T.useRef(-1),Z=T.useRef(!0),X=T.useRef(!1),oe=T.useRef(()=>{}),ee=T.useRef(!1),J=Qd(()=>{var B;const I=(B=i.current.openEvent)==null?void 0:B.type;return I?.includes("mouse")&&I!=="mousedown"});T.useEffect(()=>{if(!u)return;function B(I){let{open:z}=I;z||(ua(N),ua(V),Z.current=!0,ee.current=!1)}return a.on("openchange",B),()=>{a.off("openchange",B)}},[u,a]),T.useEffect(()=>{if(!u||!x.current||!n)return;function B(z){J()&&r(!1,z,"hover")}const I=kp(s.floating).documentElement;return I.addEventListener("mouseleave",B),()=>{I.removeEventListener("mouseleave",B)}},[s.floating,n,r,u,x,J]);const ne=T.useCallback(function(B,I,z){I===void 0&&(I=!0),z===void 0&&(z="hover");const M=tb(E.current,"close",O.current);M&&!U.current?(ua(N),N.current=window.setTimeout(()=>r(!1,B,z),M)):I&&(ua(N),r(!1,B,z))},[E,r]),he=Qd(()=>{oe.current(),U.current=void 0}),Q=Qd(()=>{if(X.current){const B=kp(s.floating).body;B.style.pointerEvents="",B.removeAttribute(ST),X.current=!1}}),se=Qd(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);T.useEffect(()=>{if(!u)return;function B(Y){if(ua(N),Z.current=!1,m&&!gh(O.current)||nb(j.current)>0&&!tb(E.current,"open"))return;const q=tb(E.current,"open",O.current);q?N.current=window.setTimeout(()=>{A.current||r(!0,Y,"hover")},q):n||r(!0,Y,"hover")}function I(Y){if(se()){Q();return}oe.current();const q=kp(s.floating);if(ua(V),ee.current=!1,x.current&&i.current.floatingContext){n||ua(N),U.current=x.current({...i.current.floatingContext,tree:_,x:Y.clientX,y:Y.clientY,onClose(){Q(),he(),se()||ne(Y,!0,"safe-polygon")}});const ue=U.current;q.addEventListener("mousemove",ue),oe.current=()=>{q.removeEventListener("mousemove",ue)};return}(O.current==="touch"?!uY(s.floating,Y.relatedTarget):!0)&&ne(Y)}function z(Y){se()||i.current.floatingContext&&(x.current==null||x.current({...i.current.floatingContext,tree:_,x:Y.clientX,y:Y.clientY,onClose(){Q(),he(),se()||ne(Y)}})(Y))}function M(){ua(N)}function D(Y){se()||ne(Y,!1)}if(vr(s.domReference)){const Y=s.domReference,q=s.floating;return n&&Y.addEventListener("mouseleave",z),b&&Y.addEventListener("mousemove",B,{once:!0}),Y.addEventListener("mouseenter",B),Y.addEventListener("mouseleave",I),q&&(q.addEventListener("mouseleave",z),q.addEventListener("mouseenter",M),q.addEventListener("mouseleave",D)),()=>{n&&Y.removeEventListener("mouseleave",z),b&&Y.removeEventListener("mousemove",B),Y.removeEventListener("mouseenter",B),Y.removeEventListener("mouseleave",I),q&&(q.removeEventListener("mouseleave",z),q.removeEventListener("mouseenter",M),q.removeEventListener("mouseleave",D))}}},[s,u,e,m,b,ne,he,Q,r,n,A,_,E,x,i,se,j]),vl(()=>{var B;if(u&&n&&(B=x.current)!=null&&(B=B.__options)!=null&&B.blockPointerEvents&&J()){X.current=!0;const z=s.floating;if(vr(s.domReference)&&z){var I;const M=kp(s.floating).body;M.setAttribute(ST,"");const D=s.domReference,Y=_==null||(I=_.nodesRef.current.find(q=>q.id===w))==null||(I=I.context)==null?void 0:I.elements.floating;return Y&&(Y.style.pointerEvents=""),M.style.pointerEvents="none",D.style.pointerEvents="auto",z.style.pointerEvents="auto",()=>{M.style.pointerEvents="",D.style.pointerEvents="",z.style.pointerEvents=""}}}},[u,n,w,s,_,x,J]),vl(()=>{n||(O.current=void 0,ee.current=!1,he(),Q())},[n,he,Q]),T.useEffect(()=>()=>{he(),ua(N),ua(V),Q()},[u,s.domReference,he,Q]);const W=T.useMemo(()=>{function B(I){O.current=I.pointerType}return{onPointerDown:B,onPointerEnter:B,onMouseMove(I){const{nativeEvent:z}=I;function M(){!Z.current&&!A.current&&r(!0,z,"hover")}m&&!gh(O.current)||n||nb(j.current)===0||ee.current&&I.movementX**2+I.movementY**2<2||(ua(V),O.current==="touch"?M():(ee.current=!0,V.current=window.setTimeout(M,nb(j.current))))}}},[m,r,n,A,j]);return T.useMemo(()=>u?{reference:W}:{},[u,W])}function CT(e){return Ci(e.target)&&e.target.tagName==="BUTTON"}function lW(e){return Ci(e.target)&&e.target.tagName==="A"}function ET(e){return cY(e)}function uW(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:a}}=e,{enabled:s=!0,event:u="click",toggle:d=!0,ignoreMouse:f=!1,keyboardHandlers:m=!0,stickIfOpen:p=!0}=t,b=T.useRef(),_=T.useRef(!1),w=T.useMemo(()=>({onPointerDown(x){b.current=x.pointerType},onMouseDown(x){const E=b.current;x.button===0&&u!=="click"&&(gh(E,!0)&&f||(n&&d&&(!(i.current.openEvent&&p)||i.current.openEvent.type==="mousedown")?r(!1,x.nativeEvent,"click"):(x.preventDefault(),r(!0,x.nativeEvent,"click"))))},onClick(x){const E=b.current;if(u==="mousedown"&&b.current){b.current=void 0;return}gh(E,!0)&&f||(n&&d&&(!(i.current.openEvent&&p)||i.current.openEvent.type==="click")?r(!1,x.nativeEvent,"click"):r(!0,x.nativeEvent,"click"))},onKeyDown(x){b.current=void 0,!(x.defaultPrevented||!m||CT(x))&&(x.key===" "&&!ET(a)&&(x.preventDefault(),_.current=!0),!lW(x)&&x.key==="Enter"&&r(!(n&&d),x.nativeEvent,"click"))},onKeyUp(x){x.defaultPrevented||!m||CT(x)||ET(a)||x.key===" "&&_.current&&(_.current=!1,r(!(n&&d),x.nativeEvent,"click"))}}),[i,a,u,f,m,r,n,p,d]);return T.useMemo(()=>s?{reference:w}:{},[s,w])}function cW(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=nW(),a=T.useRef({}),[s]=T.useState(()=>rW()),u=oN()!=null,[d,f]=T.useState(r.reference),m=Qd((_,w,x)=>{a.current.openEvent=_?w:void 0,s.emit("openchange",{open:_,event:w,reason:x,nested:u}),n?.(_,w,x)}),p=T.useMemo(()=>({setPositionReference:f}),[]),b=T.useMemo(()=>({reference:d||r.reference||null,floating:r.floating||null,domReference:r.reference}),[d,r.reference,r.floating]);return T.useMemo(()=>({dataRef:a,open:t,onOpenChange:m,elements:b,events:s,floatingId:i,refs:p}),[t,m,b,s,i,p])}function lN(e){e===void 0&&(e={});const{nodeId:t}=e,n=cW({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[a,s]=T.useState(null),[u,d]=T.useState(null),m=i?.domReference||a,p=T.useRef(null),b=sN();vl(()=>{m&&(p.current=m)},[m]);const _=qY({...e,elements:{...i,...u&&{reference:u}}}),w=T.useCallback(O=>{const N=vr(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),getClientRects:()=>O.getClientRects(),contextElement:O}:O;d(N),_.refs.setReference(N)},[_.refs]),x=T.useCallback(O=>{(vr(O)||O===null)&&(p.current=O,s(O)),(vr(_.refs.reference.current)||_.refs.reference.current===null||O!==null&&!vr(O))&&_.refs.setReference(O)},[_.refs]),E=T.useMemo(()=>({..._.refs,setReference:x,setPositionReference:w,domReference:p}),[_.refs,x,w]),A=T.useMemo(()=>({..._.elements,domReference:m}),[_.elements,m]),j=T.useMemo(()=>({..._,...r,refs:E,elements:A,nodeId:t}),[_,E,A,t,r]);return vl(()=>{r.dataRef.current.floatingContext=j;const O=b?.nodesRef.current.find(N=>N.id===t);O&&(O.context=j)}),T.useMemo(()=>({..._,context:j,refs:E,elements:A}),[_,E,A,j])}function rb(e,t,n){const r=new Map,i=n==="item";let a=e;if(i&&e){const{[bT]:s,[_T]:u,...d}=e;a=d}return{...n==="floating"&&{tabIndex:-1,[XY]:""},...a,...t.map(s=>{const u=s?s[n]:null;return typeof u=="function"?e?u(e):null:u}).concat(e).reduce((s,u)=>(u&&Object.entries(u).forEach(d=>{let[f,m]=d;if(!(i&&[bT,_T].includes(f)))if(f.indexOf("on")===0){if(r.has(f)||r.set(f,[]),typeof m=="function"){var p;(p=r.get(f))==null||p.push(m),s[f]=function(){for(var b,_=arguments.length,w=new Array(_),x=0;x<_;x++)w[x]=arguments[x];return(b=r.get(f))==null?void 0:b.map(E=>E(...w)).find(E=>E!==void 0)}}}else s[f]=m}),s),{})}}function uN(e){e===void 0&&(e=[]);const t=e.map(u=>u?.reference),n=e.map(u=>u?.floating),r=e.map(u=>u?.item),i=T.useCallback(u=>rb(u,e,"reference"),t),a=T.useCallback(u=>rb(u,e,"floating"),n),s=T.useCallback(u=>rb(u,e,"item"),r);return T.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:s}),[i,a,s])}const AT=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Dc(e,t){return typeof e=="function"?e(t):e}function fW(e,t){const[n,r]=T.useState(e);return e&&!n&&r(!0),T.useEffect(()=>{if(!e&&n){const i=setTimeout(()=>r(!1),t);return()=>clearTimeout(i)}},[e,n,t]),n}function dW(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:i=250}=t,s=(typeof i=="number"?i:i.close)||0,[u,d]=T.useState("unmounted"),f=fW(n,s);return!f&&u==="close"&&d("unmounted"),vl(()=>{if(r){if(n){d("initial");const m=requestAnimationFrame(()=>{Dh.flushSync(()=>{d("open")})});return()=>{cancelAnimationFrame(m)}}d("close")}},[n,r]),{isMounted:f,status:u}}function hW(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:i,common:a,duration:s=250}=t,u=e.placement,d=u.split("-")[0],f=T.useMemo(()=>({side:d,placement:u}),[d,u]),m=typeof s=="number",p=(m?s:s.open)||0,b=(m?s:s.close)||0,[_,w]=T.useState(()=>({...Dc(a,f),...Dc(n,f)})),{isMounted:x,status:E}=dW(e,{duration:s}),A=ol(n),j=ol(r),O=ol(i),N=ol(a);return vl(()=>{const U=Dc(A.current,f),V=Dc(O.current,f),Z=Dc(N.current,f),X=Dc(j.current,f)||Object.keys(U).reduce((oe,ee)=>(oe[ee]="",oe),{});if(E==="initial"&&w(oe=>({transitionProperty:oe.transitionProperty,...Z,...U})),E==="open"&&w({transitionProperty:Object.keys(X).map(AT).join(","),transitionDuration:p+"ms",...Z,...X}),E==="close"){const oe=V||U;w({transitionProperty:Object.keys(oe).map(AT).join(","),transitionDuration:b+"ms",...Z,...oe})}},[b,O,A,j,N,p,E,f]),{isMounted:x,styles:_}}/*!
* Font Awesome Free 7.0.1 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
* Copyright 2025 Fonticons, Inc.
*/var cN={prefix:"far",iconName:"clone",icon:[512,512,[],"f24d","M288 464L64 464c-8.8 0-16-7.2-16-16l0-224c0-8.8 7.2-16 16-16l48 0 0-48-48 0c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l224 0c35.3 0 64-28.7 64-64l0-48-48 0 0 48c0 8.8-7.2 16-16 16zM224 304c-8.8 0-16-7.2-16-16l0-224c0-8.8 7.2-16 16-16l224 0c8.8 0 16 7.2 16 16l0 224c0 8.8-7.2 16-16 16l-224 0zm-64-16c0 35.3 28.7 64 64 64l224 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L224 0c-35.3 0-64 28.7-64 64l0 224z"]},mW={prefix:"far",iconName:"image",icon:[448,512,[],"f03e","M64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l320 0c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 80zM0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm128 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm136 72c8.5 0 16.4 4.5 20.7 11.8l80 136c4.4 7.4 4.4 16.6 .1 24.1S352.6 384 344 384l-240 0c-8.9 0-17.2-5-21.3-12.9s-3.5-17.5 1.6-24.8l56-80c4.5-6.4 11.8-10.2 19.7-10.2s15.2 3.8 19.7 10.2l17.2 24.6 46.5-79c4.3-7.3 12.2-11.8 20.7-11.8z"]},pW={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 -416 0 208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0 256 256 0 1 1 -512 0z"]},gW={prefix:"far",iconName:"circle-right",icon:[512,512,[61838,"arrow-alt-circle-right"],"f35a","M464 256a208 208 0 1 1 -416 0 208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0 256 256 0 1 0 -512 0zm387.3 11.3c6.2-6.2 6.2-16.4 0-22.6l-104-104c-4.6-4.6-11.5-5.9-17.4-3.5S256 145.5 256 152l0 72-104 0c-13.3 0-24 10.7-24 24l0 16c0 13.3 10.7 24 24 24l104 0 0 72c0 6.5 3.9 12.3 9.9 14.8s12.9 1.1 17.4-3.5l104-104z"]},vW=gW;const yW=({children:e,summary:t,summaryClasses:n,...r})=>{const i=T.useRef(null),[a,s]=T.useState(!1);return T.useEffect(()=>{const u=i.current,d=()=>s(!!u?.open);return u?.addEventListener("toggle",d),()=>u?.removeEventListener("toggle",d)},[]),v.jsxs("details",{ref:i,...r,children:[v.jsx("summary",{className:Ne("focus-ring px-1 -mx-1 rounded-sm",n),children:t}),a&&v.jsx("div",{className:"mt-3 flex flex-col gap-y-3",children:e})]})},bW=T.forwardRef(({className:e,...t},n)=>v.jsx("div",{className:Ne("px-4 py-3 rounded-t-md","bg-lm-primary dark:bg-dm-primary border-b border-lm-border dark:border-dm-border",e),...t,ref:n})),_W=T.forwardRef(({className:e,...t},n)=>v.jsx("div",{className:Ne("p-4 bg-lm-primary dark:bg-dm-primary first:rounded-t-md","first:rounded-t-md last:rounded-b-md",e),...t,ref:n})),xW=T.forwardRef(({className:e,...t},n)=>v.jsx("div",{className:Ne("px-4 py-3 rounded-b-md","bg-lm-primary dark:bg-dm-primary border-t border-lm-border dark:border-dm-border",e),...t,ref:n})),wW=T.forwardRef(({className:e,...t},n)=>v.jsx("div",{className:Ne("group/card rounded-md shadow-md","border border-lm-border dark:border-dm-border bg-lm-primary dark:bg-dm-primary",e),...t,ref:n})),un=Object.assign(wW,{Body:_W,Header:bW,Footer:xW}),Pt=T.forwardRef(({bodyClassName:e,children:t,...n},r)=>{const{title:i,titleSize:a="md",...s}="title"in n?n:{...n,title:void 0,titleSize:void 0};return v.jsxs(un,{...s,ref:r,children:[i&&v.jsxs(un.Header,{children:[a==="lg"&&v.jsx("h4",{children:i}),a==="md"&&v.jsx("h5",{children:i}),a==="sm"&&v.jsx("h6",{children:i})]}),v.jsx(un.Body,{className:e,children:t})]})});function SW({id:e,items:t,onSelectItem:n,onActiveItemChange:r,renderItem:i,className:a,noItemsMessage:s="No items",anchor:u,"aria-label":d="Items",...f}){const[m,p]=T.useState(0),b=T.useCallback(_=>{if(p(_),r){const[w,x]=[...t.entries()][_];r(w,x)}},[t,r]);return T.useEffect(()=>{const _=u?.current;if(!_)return;const w=x=>{["Enter","ArrowUp","ArrowDown"].includes(x.key)&&x.preventDefault(),x.key==="ArrowDown"?b(Math.min(m+1,t.size-1)):x.key==="ArrowUp"?b(Math.max(m-1,0)):x.key==="Enter"&&n([...t.values()][m])};return _.addEventListener("keydown",w),()=>_.removeEventListener("keydown",w)},[m,u,b,t,n]),v.jsxs(un,{id:e,className:Ne("py-1 flex flex-col",a),role:"listbox","aria-orientation":"vertical","aria-label":d,...f,children:[t.size===0&&v.jsx("i",{role:"option","aria-disabled":!0,"aria-selected":!1,"data-testid":"no-items",className:"px-2 py-1",children:s}),[...t.entries()].map(([_,w],x)=>v.jsx("button",{id:`${e}_${_}`,type:"button",role:"option","aria-selected":x===m,className:Ne("px-2 py-1 text-left truncate",{"bg-lm-secondary dark:bg-dm-secondary":x===m}),tabIndex:-1,onClick:()=>n(w),onMouseOver:()=>b(x),children:i(w)},_))]})}const $h=T.createContext(void 0),_f=T.createContext({responsive:!0,size:"md"}),CW=({children:e,className:t})=>{const{responsive:n}=T.useContext(_f);return v.jsx($h.Provider,{value:{section:"head"},children:v.jsx("thead",{className:Ne({"hidden lg:table-header-group":n},t),children:e})})},EW=({children:e,className:t})=>{const{responsive:n}=T.useContext(_f);return v.jsx($h.Provider,{value:{section:"body"},children:v.jsx("tbody",{className:Ne({"lg:table-row-group flex flex-col gap-y-3":n},t),children:e})})},AW=({children:e,className:t})=>{const{responsive:n}=T.useContext(_f);return v.jsx($h.Provider,{value:{section:"footer"},children:v.jsx("tfoot",{className:Ne({"lg:table-row-group flex flex-col gap-y-3 mt-4":n},t),children:e})})},TW=({children:e,className:t,...n})=>{const r=T.useContext($h)?.section==="body",{responsive:i}=T.useContext(_f);return v.jsx("tr",{className:Ne("group",{"lg:table-row flex flex-col":i,"lg:border-0 border-y-2 border-lm-border dark:border-dm-border":i,"hover:bg-lm-primary dark:hover:bg-dm-primary":r,"group-[&]/card:hover:bg-lm-secondary dark:group-[&]/card:hover:bg-dm-secondary":r},t),...n,children:e})},OW=({children:e,className:t,columnName:n,type:r,...i})=>{const a=T.useContext($h),s=r??(a?.section!=="body"?"th":"td"),{responsive:u,size:d}=T.useContext(_f);return v.jsx(s,{"data-column":u?n:void 0,className:Ne("border-lm-border dark:border-dm-border",{"p-1":d==="sm","p-2":d==="md","p-3":d==="lg","border-b-1":!u,"block lg:table-cell not-last:border-b-1 lg:border-b-1":u,"text-left":s==="th","before:lg:hidden before:content-[attr(data-column)] before:font-bold before:mr-1":u&&s==="td"},t),...i,children:e})},jW=({header:e,footer:t,children:n,responsive:r=!0,size:i="md",...a})=>v.jsx(_f.Provider,{value:{responsive:r,size:i},children:v.jsxs("table",{className:"w-full",...a,children:[v.jsx(CW,{children:e}),v.jsx(EW,{children:n}),t&&v.jsx(AW,{children:t})]})}),Ke=Object.assign(jW,{Row:TW,Cell:OW}),Mt=T.forwardRef(({className:e,disabled:t,variant:n="primary",size:r="md",inline:i=!1,solid:a=!1,type:s="button",...u},d)=>{const f="to"in u&&typeof u.to=="string",m=f?Mr:"button",p=f?void 0:s;return v.jsx(m,{ref:d,className:Ne({"inline-flex":i,flex:!i},"gap-2 items-center justify-center","border rounded-md no-underline","transition-colors",{"focus-ring":n==="primary","focus-ring-secondary":n==="secondary","focus-ring-danger":n==="danger"},{"px-1.5 py-1 text-sm":r==="sm","px-3 py-1.5":r==="md","px-4 py-2 text-lg":r==="lg"},{"border-lm-brand dark:border-dm-brand":n==="primary","text-lm-brand dark:text-dm-brand":n==="primary"&&!a,"border-zinc-500":n==="secondary","text-zinc-500":n==="secondary"&&!a,"border-danger":n==="danger","text-danger":n==="danger"&&!a},a&&{"text-white":!0,"bg-lm-brand dark:bg-dm-brand":n==="primary","highlight:bg-lm-brand-dark dark:highlight:bg-dm-brand-dark":n==="primary","highlight:border-lm-brand-dark dark:highlight:border-dm-brand-dark":n==="primary","bg-zinc-500":n==="secondary","highlight:bg-zinc-600 highlight:border-zinc-600":n==="secondary","bg-danger":n==="danger","highlight:bg-danger-dark highlight:border-danger-dark":n==="danger"},!t&&{"highlight:text-white":!a,"highlight:bg-lm-brand dark:highlight:bg-dm-brand":n==="primary","highlight:bg-zinc-500":n==="secondary","highlight:bg-danger":n==="danger"},{"cursor-pointer":!t,"pointer-events-none opacity-65":t},e),disabled:f?void 0:t,"aria-disabled":f?t:void 0,type:p,...u})}),fN=T.forwardRef(({className:e,onChange:t,...n},r)=>{const i=T.useCallback(a=>t?.(a.target.checked,a),[t]);return v.jsx("input",{ref:r,type:"checkbox",className:Ne("appearance-none focus-ring cursor-[inherit]","border-1 border-lm-input-border dark:border-dm-input-border","bg-lm-primary dark:bg-dm-primary checked:bg-lm-brand dark:checked:bg-dm-brand bg-no-repeat","group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input",e),onChange:i,...n})}),bw=T.forwardRef(({className:e,...t},n)=>v.jsx(fN,{ref:n,className:Ne("rounded-sm w-4 h-4 checked:bg-(image:--tick) bg-center",e),...t})),ju=T.forwardRef(({onClick:e,className:t,label:n="Close",size:r="lg",solid:i},a)=>v.jsx("button",{ref:a,type:"button",onClick:e,className:Ne("rounded-md focus-ring cursor-pointer",{"opacity-50 highlight:opacity-80 transition-opacity":!i},t),"aria-label":n,children:v.jsx(Ye,{icon:ew,size:r==="lg"?"xl":r==="md"?"lg":void 0})})),Qr=T.forwardRef(({borderless:e=!1,size:t="md",feedback:n,variant:r="default",className:i,disabled:a,...s},u)=>v.jsx("input",{ref:u,className:Ne("outline-none",r==="default"&&["w-full",{"focus-ring":!n,"focus-ring-danger":n==="error","px-2 py-1 text-sm":t==="sm","px-3 py-1.5":t==="md","px-4 py-2 text-xl":t==="lg","rounded-md border":!e,"border-lm-input-border dark:border-dm-input-border":!e&&!n,"border-danger":!e&&n==="error","bg-lm-disabled-input dark:bg-dm-disabled-input":a,"bg-lm-primary dark:bg-dm-primary":!a,"group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":!a}],i),disabled:a,...s})),wa=({required:e,children:t,className:n,...r})=>v.jsxs("label",{className:Ne("cursor-pointer",n),...r,children:[t,e&&v.jsx("span",{className:"text-danger ml-1","data-testid":"required-indicator",children:"*"})]}),_w=({children:e,helpText:t,error:n,"data-testid":r})=>v.jsxs("div",{className:"flex flex-col gap-1","data-testid":r,children:[e,t&&v.jsx("small",{"data-testid":r?`${r}-help-text`:"help-text",className:"text-gray-500 dark:text-gray-400",children:t}),n&&v.jsx("span",{"data-testid":r?`${r}-error`:"error",className:"text-danger",children:n})]}),ti=T.forwardRef(({label:e,inputClassName:t,required:n,hiddenRequired:r,error:i,helpText:a,"data-testid":s,...u},d)=>{const f=T.useId();return v.jsxs(_w,{error:i,helpText:a,"data-testid":s,children:[v.jsx(wa,{htmlFor:f,required:n,children:e}),v.jsx(Qr,{ref:d,id:f,className:t,required:n||r,feedback:i?"error":void 0,...u})]})}),PW=T.forwardRef(({containerClassName:e,className:t,size:n,...r},i)=>{const{flag:a,toggle:s,setToFalse:u}=Sn(),d=T.useRef(null),f=T.useCallback(({relatedTarget:m})=>{d.current?.contains(m)||u()},[d,u]);return v.jsxs("div",{className:Ne("group relative",e),ref:d,onBlurCapture:f,children:[v.jsx(Qr,{ref:i,type:a?"text":"password",className:Ne({"pr-10":n!=="sm","pr-8":n==="sm"},t),size:n,"data-testid":"input",...r}),v.jsx("button",{type:"button",onClick:s,title:a?"Hide password":"Show password","aria-label":a?"Hide password":"Show password",className:Ne("absolute top-[50%] translate-y-[-50%] px-1 cursor-pointer","text-placeholder hover:text-lm-text hover:dark:text-dm-text transition-colors",{"right-1.5":n!=="sm","scale-85 right-1":n==="sm"}),tabIndex:-1,children:v.jsx(Ye,{icon:a?sV:O$})})]})}),MW=T.forwardRef(({label:e,inputClassName:t,required:n,hiddenRequired:r,error:i,helpText:a,"data-testid":s,...u},d)=>{const f=T.useId();return v.jsxs(_w,{error:i,helpText:a,"data-testid":s,children:[v.jsx(wa,{htmlFor:f,required:n,children:e}),v.jsx(PW,{ref:d,id:f,className:t,required:n||r,feedback:i?"error":void 0,...u})]})}),RW=T.forwardRef(({className:e,size:t="md",feedback:n,disabled:r,...i},a)=>v.jsx("select",{ref:a,className:Ne("w-full rounded-md border appearance-none pr-9","bg-(image:--chevron-down) bg-no-repeat bg-position-[right_0.75rem_center] bg-size-[16px_12px]",{"focus-ring":!n,"focus-ring-danger":n==="error","border-lm-input-border dark:border-dm-input-border":!n,"border-danger":n==="error","pl-2 py-1 text-sm":t==="sm","pl-3 py-1.5":t==="md","pl-4 py-2 text-xl":t==="lg","bg-lm-disabled-input dark:bg-dm-disabled-input":r,"bg-lm-primary dark:bg-dm-primary group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":!r},e),disabled:r,...i})),xw=T.forwardRef(({selectClassName:e,label:t,error:n,helpText:r,required:i,hiddenRequired:a,"data-testid":s,...u},d)=>{const f=T.useId();return v.jsxs(_w,{error:n,helpText:r,"data-testid":s,children:[v.jsx(wa,{htmlFor:f,required:i,children:t}),v.jsx(RW,{ref:d,id:f,className:e,required:i||a,feedback:n?"error":void 0,...u})]})}),xf=T.forwardRef(({onChange:e,containerClassName:t,inputClassName:n,size:r="lg",loading:i=!1,variant:a="default",immediate:s=!1,...u},d)=>{const{setTimeout:f,clearCurrentTimeout:m}=mN(500),p=T.useCallback(b=>{!b||s?(m(),e(b)):f(()=>e(b))},[m,s,e,f]);return v.jsxs("div",{className:Ne("group relative focus-within:z-10",t),children:[a==="default"&&v.jsx(Ye,{icon:i?Q2:E$,spin:i,className:Ne("absolute top-[50%] translate-y-[-50%] transition-colors","text-placeholder group-focus-within:text-lm-text dark:group-focus-within:text-dm-text",{"left-3":r!=="sm","scale-85 left-2":r==="sm"})}),v.jsx(Qr,{ref:d,variant:a,type:"search",className:Ne(a==="default"&&{"pl-9":r!=="sm","pl-7":r==="sm"},n),placeholder:"Search...",onChange:b=>p(b.target.value),size:r,...u})]})});function NW({searchResults:e,onSearch:t,onSelectSearchResult:n,renderSearchResult:r,size:i="md",listboxSpan:a="full",onFocus:s,containerClassName:u,listboxClassName:d,...f},m){const p=T.useId(),[b,_]=T.useState(),w=T.useRef(null);T.useImperativeHandle(m,()=>w.current);const x=T.useMemo(()=>e?b??[...e.keys()][0]:void 0,[b,e]),E=T.useCallback(A=>{n(A),t(""),w.current.value=""},[t,n,w]);return v.jsxs("div",{className:Ne("relative",u),onBlur:A=>{A.currentTarget.contains(A.relatedTarget)||t("")},children:[v.jsx(xf,{onChange:t,size:i,ref:w,role:"combobox","aria-autocomplete":"list","aria-expanded":!!e,"aria-controls":p,"aria-activedescendant":x?`${p}_${x}`:void 0,autoComplete:"off",autoCorrect:"off",onFocus:A=>{s?.(A),t(A.target.value)},...f}),e&&v.jsx(SW,{id:p,items:e,anchor:w,onSelectItem:E,onActiveItemChange:_,renderItem:r,className:Ne("absolute top-full mt-1 z-10",{"min-w-60":a==="auto","w-full":a==="full"},d),"aria-label":"Matching items",noItemsMessage:"No results found matching search"})]})}const LW=T.forwardRef(NW),DW=({name:e,color:t})=>v.jsxs("div",{className:"inline-flex items-center gap-2",children:[v.jsx("div",{"aria-hidden":!0,className:"w-4 h-4 rounded-full",style:{backgroundColor:t}}),e]}),kW=({tag:e,color:t,size:n,onRemove:r})=>v.jsxs("li",{className:Ne("inline-flex items-center gap-1 font-bold [&]:rounded-md",{"px-1 text-sm":n==="sm","py-0.25 px-1.5":n==="md","py-0.5 px-1.5":n==="lg"}),style:{backgroundColor:t,color:ww(t)?"#000":"#fff"},onClick:i=>i.stopPropagation(),children:[e,v.jsx(ju,{label:`Remove ${e}`,solid:!0,size:"sm",onClick:()=>r(e)})]}),IW=/\s+/g,TT="#99a1af",OT=e=>e.trim().toLowerCase().replace(IW,"-"),UW=({tags:e,selectedTags:t=[],onTagsChange:n,getColorForTag:r,searchMode:i="startsWith",immutable:a=!1,size:s="md",disabled:u,containerClassName:d,...f})=>{const[m,p]=T.useState(),b=T.useCallback(E=>{const A=E.toLowerCase().trim();if(!A){p(void 0);return}const j=e.filter(O=>{if(t.includes(O))return!1;const N=O.toLowerCase();return i==="startsWith"?N.startsWith(A):N.includes(A)}).slice(0,5);a||j.push(`Add "${A.split(",").map(OT).join(",")}" tag`),p(new Map(j.map(O=>[O,O])))},[a,i,t,e]),_=T.useCallback(E=>{const A=(E.match(/Add\s+"([^"]+)"\s+tag/)?.[1]??E).split(",").map(OT);n?.([...new Set([...t,...A])])},[n,t]),w=T.useCallback(E=>n?.(t.filter(A=>A!==E)),[n,t]),x=T.useRef(null);return v.jsxs("div",{className:Ne("rounded-md flex flex-wrap gap-1","border border-lm-input-border dark:border-dm-input-border","cursor-text focus-within:focus-within-ring",{"p-0.5":s==="sm","p-1.25":s==="md","p-2":s==="lg","bg-lm-disabled-input dark:bg-dm-disabled-input":u,"bg-lm-primary dark:bg-dm-primary":!u,"group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":!u},d),onClick:E=>{E.target!==x.current&&x.current?.focus()},children:[v.jsx("ul",{className:"m-0 p-0 flex flex-wrap gap-1",children:t.map((E,A)=>{const j=r?.(E)??TT;return v.jsx(kW,{tag:E,color:j,onRemove:w,size:s},`${E}${A}`)})}),v.jsx(LW,{variant:"unstyled",listboxSpan:"auto",containerClassName:"flex items-center",listboxClassName:"whitespace-nowrap",inputClassName:Ne("no-clear-button",{"px-1 text-sm":s==="sm","px-2 h-[26px]":s==="md","px-3 text-xl":s==="lg"}),searchResults:m,onSearch:b,onSelectSearchResult:_,renderSearchResult:E=>E.match(/Add\s+"([^"]+)"\s+tag/)?E:v.jsx(DW,{name:E,color:r?.(E)??TT}),onKeyDown:E=>{E.key==="Backspace"&&!m&&w(t[t.length-1])},size:s,disabled:u,ref:x,immediate:!0,...f})]})},BW=T.forwardRef(({className:e,...t},n)=>v.jsx(fN,{ref:n,className:Ne("rounded-full w-8 h-4","bg-(image:--circle-grey-dark) dark:bg-(image:--circle-grey-light) checked:bg-(image:--circle-white)","focus-visible:not-checked:bg-(image:--circle-blue-light)","checked:bg-right transition-[background-position]",e),...t}));function zW(e,{elementsSelector:t,focusFirstItem:n=!1,vertical:r=!0,horizontal:i=!0}){const a=T.useMemo(()=>{const d=[];return r&&d.push("ArrowDown"),i&&d.push("ArrowRight"),d},[i,r]),s=T.useMemo(()=>{const d=[];return r&&d.push("ArrowUp"),i&&d.push("ArrowLeft"),d},[i,r]),u=T.useMemo(()=>[...a,...s],[a,s]);T.useEffect(()=>{const d=e.current;if(!d)return()=>{};const f=new AbortController,m=()=>[...d.querySelectorAll(t)],p=m(),b=Math.max(p.findIndex(_=>_.dataset.selected==="true"),0);return p.forEach((_,w)=>{_.tabIndex=w===b?0:-1,n&&w===b&&_.focus()}),d.addEventListener("keydown",_=>{if(!u.includes(_.key))return;_.preventDefault();const w=m(),x=w.findIndex(A=>A.tabIndex===0),E=a.includes(_.key)?w[x+1]??w[0]:w[x-1]??w[w.length-1];w.forEach(A=>{A.tabIndex=-1}),E.tabIndex=0,E.focus()},{signal:f.signal}),()=>f.abort()},[u,e,t,n,a])}const FW=()=>{const e=Qa();return T.useCallback(()=>e(-1),[e])},$W=128;function ww(e){const[t,n,r]=(e.match(/../g)??[]).map(i=>parseInt(i,16)||0);return Math.round(Math.sqrt(.299*t**2+.587*n**2+.114*r**2))>=$W}const dN=({text:e,className:t,size:n="lg",initialCopied:r=!1,navigator_:i=globalThis.navigator,...a})=>{const[s,u]=Wv({initialValue:r}),d=T.useCallback(()=>i.clipboard.writeText(e).then(u),[i.clipboard,e,u]);return v.jsx("button",{type:"button",className:Ne("focus-ring rounded-sm cursor-pointer",{"text-md":n==="sm","text-lg":n==="md","text-xl":n==="lg"},t),"aria-label":`Copy ${e} to clipboard`,title:"Copy to clipboard",onClick:d,...a,children:v.jsx(Ye,{icon:s?Au:cN})})},hN=e=>{const t=new URLSearchParams(e),n={};return t.forEach((r,i)=>{if(i.endsWith("[]")){const a=i.slice(0,-2);n[a]??=[],n[a].push(r)}else n[i]=r}),n},Sw=e=>{const t=new URLSearchParams;for(const[n,r]of Object.entries(e))r!==void 0&&(Array.isArray(r)?r.forEach(i=>t.append(`${n}[]`,`${i}`)):t.append(n,`${r}`));return t.toString()},wf=()=>{const{search:e}=xr();return T.useMemo(()=>hN(e),[e])};function mN(e,t=globalThis.setTimeout,n=globalThis.clearTimeout){const r=T.useRef(null),i=T.useCallback(()=>{r.current&&n(r.current)},[n]),a=T.useCallback((s,u)=>{i(),r.current=t(()=>{s(),r.current=null},u??e)},[i,e,t]);return T.useEffect(()=>i,[i]),T.useMemo(()=>({setTimeout:a,clearCurrentTimeout:i}),[i,a])}const VW=2e3,Wv=({initialValue:e=!1,delay:t=VW}={},n=globalThis.setTimeout,r=globalThis.clearTimeout)=>{const{setTimeout:i}=mN(t,n,r),[a,s]=T.useState(e),u=T.useRef(e),d=T.useCallback(()=>{s(!u.current),i(()=>s(u.current))},[i]);return[a,d]};function Sn(e=!1){const[t,n]=T.useState(e),r=T.useCallback(()=>n(s=>!s),[]),i=T.useCallback(()=>n(!0),[]),a=T.useCallback(()=>n(!1),[]);return{flag:t,toggle:r,setToTrue:i,setToFalse:a}}const pN=T.createContext({}),HW=({className:e,selected:t,disabled:n,onClick:r,...i})=>{const a="to"in i&&typeof i.to=="string",s=a?Mr:"button",{onItemClick:u}=T.useContext(pN);return v.jsx(s,{role:"menuitem","data-selected":t,className:Ne("flex items-center gap-2","w-full px-3 py-1.5 focus-ring","no-underline text-inherit",{"cursor-pointer":!n,"pointer-events-none opacity-50":n,"bg-lm-secondary dark:bg-dm-secondary":t&&!n,"highlight:bg-lm-secondary dark:highlight:bg-dm-secondary highlight:z-1 relative":!t&&!n},e),tabIndex:-1,disabled:a?void 0:n,"aria-disabled":a?n:void 0,type:a?void 0:"button",onClick:d=>{r?.(d),u?.()},...i})},qW=()=>v.jsx("div",{role:"separator","aria-hidden":!0,className:"border-b border-lm-border dark:border-dm-border my-2"}),GW=({children:e})=>v.jsx("div",{role:"heading","aria-level":6,"aria-hidden":!0,className:Ne("flex items-center w-full px-3 py-1.5","text-gray-500 text-sm font-semibold"),onClick:t=>t.stopPropagation(),children:e}),YW=({className:e,...t})=>v.jsx("div",{className:Ne("px-3 py-1.5",e),...t}),WW=({children:e,className:t,focusableElementsSelector:n='[role="menuitem"]:not([disabled]):not([aria-disabled])',focusFirstItem:r=!1,onItemClick:i,...a})=>{const s=T.useRef(null);return zW(s,{elementsSelector:n,focusFirstItem:r}),v.jsx(un,{ref:s,role:"menu",className:Ne("py-2 whitespace-nowrap",t),...a,children:v.jsx(pN.Provider,{value:{onItemClick:i},children:e})})},Jd=Object.assign(WW,{Item:HW,Separator:qW,Title:GW,Misc:YW}),KW=({children:e,menuAlignment:t="left",buttonVariant:n="button",buttonContent:r,buttonClassName:i,buttonSize:a="md",buttonDisabled:s=!1,containerClassName:u,menuClassName:d,caretless:f,buttonLabel:m,menuOffset:p=3})=>{const[b,_]=T.useState(!1),w=T.useCallback(()=>_(!1),[]),x=T.useRef(null),{refs:E,floatingStyles:A,context:j}=lN({open:b,onOpenChange:_,placement:t==="right"?"bottom-end":"bottom-start",middleware:[WY(),YY(p)],elements:{reference:x.current}}),O=uW(j),{getReferenceProps:N,getFloatingProps:U}=uN([O]),V=T.useId(),Z=T.useRef(null);return T.useEffect(()=>{const X=Z.current;if(!X||!b)return()=>{};const oe=new AbortController;return document.body.addEventListener("click",ee=>{ee.composedPath().includes(X)||w()},{signal:oe.signal}),()=>oe.abort()},[w,b]),v.jsxs("div",{ref:Z,className:Ne("relative inline-block",u),onKeyDown:X=>{X.key==="Escape"&&w()},onBlur:X=>{X.relatedTarget&&!Z.current.contains(X.relatedTarget)&&w()},children:[v.jsxs("button",{ref:x,...N(),type:"button","aria-haspopup":!0,"aria-expanded":b,"aria-controls":V,"aria-label":m,disabled:s,className:Ne("flex items-center rounded-md focus-ring",{"justify-between":!f,"cursor-pointer":!s,"pointer-events-none opacity-50":s,"border border-lm-border dark:border-dm-border":n==="button","bg-lm-primary dark:bg-dm-primary":n==="button","group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":n==="button","text-lm-brand dark:text-dm-brand":n==="link","highlight:text-lm-brand-dark dark:highlight:text-dm-brand-dark highlight:underline":n==="link","px-1.5 py-1 text-sm":n!=="text"&&a==="sm","px-3 py-1.5":n!=="text"&&a==="md","px-4 py-2 text-lg":n!=="text"&&a==="lg","gap-x-1.5":a==="sm","gap-x-2":a!=="sm"},i),onKeyDown:X=>{X.key==="ArrowDown"&&(X.preventDefault(),_(!0))},children:[r,!f&&v.jsx(Ye,{icon:VR,size:"xs",widthAuto:!0})]}),b&&v.jsx("div",{ref:E.setFloating,style:A,className:"min-w-full z-500",...U(),children:v.jsx(Jd,{className:d,id:V,focusableElementsSelector:'[role="menuitem"]:not([disabled]):not([aria-disabled]),input:not([disabled]),select:not([disabled])',focusFirstItem:!0,onItemClick:w,children:e})})]})},Qe=Object.assign(KW,{Item:Jd.Item,Separator:Jd.Separator,Title:Jd.Title,Misc:Jd.Misc}),Kv=T.forwardRef(({className:e,disabled:t,size:n="md",type:r="button",...i},a)=>v.jsx("button",{className:Ne("inline-flex rounded-md focus-ring","text-lm-brand dark:text-dm-brand","highlight:text-lm-brand-dark dark:highlight:text-dm-brand-dark highlight:underline",{"px-1.5 py-1 text-sm":n==="sm","px-3 py-1.5":n==="md","px-4 py-2 text-lg":n==="lg","cursor-pointer":!t,"pointer-events-none opacity-65":t},e),disabled:t,type:r,...i,ref:a})),ZW=({className:e,active:t,...n})=>v.jsx("li",{role:"menuitem",className:"w-full flex","data-active":t,children:v.jsx(Mr,{className:Ne("px-2 py-3","max-md:w-full max-md:px-3 max-md:py-2","text-white no-underline highlight:opacity-100 transition-opacity",{"opacity-60":!t,"opacity-100":t},e),...n})}),XW=({containerClassName:e,buttonClassName:t,menuClassName:n,active:r,...i})=>v.jsx("li",{role:"menuitem","aria-haspopup":!0,className:"w-full flex","data-active":r,children:v.jsx(Qe,{containerClassName:Ne("max-md:w-full",e),buttonVariant:"text",buttonClassName:Ne("px-2 py-3","max-md:w-full max-md:px-3 max-md:py-2","text-white highlight:opacity-100 transition-opacity",{"opacity-60":!r,"opacity-100":r},t),menuAlignment:"right",menuOffset:-3,menuClassName:Ne("mx-2",n),...i})}),QW=({className:e,brand:t,children:n})=>{const{flag:r,toggle:i,setToFalse:a}=Sn(),s=T.useId(),u=T.useId(),{pathname:d}=xr();return T.useEffect(()=>a(),[d,a]),v.jsxs("nav",{className:Ne("w-full relative","bg-lm-main dark:bg-dm-main","flex max-md:flex-col items-center justify-between",e),children:[v.jsxs("div",{className:"w-full relative",children:[v.jsx("h4",{className:Ne("text-white px-4 py-3","max-md:w-full max-md:flex max-md:flex-col items-center"),children:t}),v.jsx(Mt,{id:u,variant:"secondary",className:Ne("absolute right-0 top-[50%] translate-y-[-50%]","md:hidden mx-2 [&]:px-2","opacity-60 highlight:opacity-100 transition-opacity","[&]:text-white [&]:border-white [&]:highlight:bg-transparent"),onClick:i,"aria-label":`${r?"Hide":"Show"} menu`,"aria-controls":s,children:v.jsx(Ye,{icon:r?P$:W$})})]}),v.jsx("ul",{id:s,"aria-labelledby":u,role:"menu",className:Ne("m-0 p-0","max-md:w-full md:mr-2 max-md:absolute max-md:top-full z-2000","flex max-md:flex-col items-center","bg-lm-main dark:bg-dm-main",{"max-md:hidden":!r}),children:n})]})},Ax=Object.assign(QW,{MenuItem:ZW,Dropdown:XW}),gN=T.createContext(null),JW=({className:e,to:t,...n})=>{const r=T.useContext(gN);return v.jsx(G2,{role:"menuitem",to:t,className:({isActive:i})=>Ne("px-4 pt-2 pb-[calc(0.5rem-3px)] border-b-3","highlight:text-lm-brand dark:highlight:text-dm-brand","font-bold text-center no-underline transition-colors","rounded-none outline-none focus-visible:inset-ring-2","focus-visible:inset-ring-lm-brand/50 dark:focus-visible:inset-ring-dm-brand/50",{"text-lm-brand dark:text-dm-brand":i,"border-b-lm-brand dark:border-b-dm-brand active":i,"border-b-transparent text-gray-500":!i,"flex-grow":r?.fill},e),...n})},eK=({children:e,className:t,fill:n})=>v.jsx(gN.Provider,{value:{fill:n},children:v.jsx(un,{role:"menubar",className:Ne("flex overflow-hidden",t),children:e})}),rl=Object.assign(eK,{Pill:JW}),tK=new Intl.NumberFormat("en-US"),On=e=>tK.format(Number(e)),jT=10,nK=e=>Math.ceil(e/jT)*jT,kc=2,Dg="...",rK=(e,t)=>Array.from({length:t-e},(n,r)=>e+r),iK=(e,t)=>{const n=rK(Math.max(kc,e-kc),Math.min(t-1,e+kc)+1);return e-kc>kc&&n.unshift(Dg),e+kc<t-1&&n.push(Dg),n.unshift(1),n.push(t),n},lh=e=>e===Dg,aK=e=>lh(e)?e:On(e),oK=(e,t)=>lh(e)?`${e}_${t}`:`${e}`,vN=["border border-r-0 last:border-r border-lm-border dark:border-dm-border","rounded-none first:rounded-l last:rounded-r"],yN=(e=!1)=>Ne(vN,"px-3 py-2 cursor-pointer no-underline","focus-ring focus-visible:z-1",!e&&["text-lm-brand dark:text-dm-brand","bg-lm-primary dark:bg-dm-primary","highlight:bg-lm-secondary dark:highlight:bg-dm-secondary"],e&&"bg-lm-main dark:bg-dm-main text-white"),Tx=({children:e})=>v.jsx("span",{"aria-hidden":!0,className:Ne(vN,"px-3 py-2 text-gray-400"),children:e}),bN=()=>v.jsx(Tx,{children:Dg});function sK({children:e,active:t,isEllipsis:n,href:r,...i}){const a=T.useMemo(()=>yN(t),[t]);return n?v.jsx(bN,{}):v.jsx(Mr,{className:a,to:r,...i,"data-active":t,children:e})}function lK({children:e,active:t,isEllipsis:n,...r}){const i=T.useMemo(()=>yN(t),[t]);return n?v.jsx(bN,{}):v.jsx("button",{type:"button",className:i,...r,"data-active":t,children:e})}const Zv=({currentPage:e,pagesCount:t,...n})=>{const r="urlForPage"in n,i=r?sK:lK,a=T.useCallback(s=>r?{href:lh(s)?void 0:n.urlForPage(s)}:{onClick:()=>!lh(s)&&n.onPageChange(s)},[r,n]);return t<2?null:v.jsxs("div",{className:"select-none flex","data-testid":"paginator",children:[e===1?v.jsx(Tx,{children:v.jsx(Ye,{size:"xs",icon:jA})}):v.jsx(i,{...a(Math.max(1,e-1)),"aria-label":"Previous",children:v.jsx(Ye,{size:"xs",icon:jA})}),iK(e,t).map((s,u)=>v.jsx(i,{active:s===e,isEllipsis:lh(s),...a(s),children:aK(s)},oK(s,u))),e===t?v.jsx(Tx,{children:v.jsx(Ye,{size:"xs",icon:Ag})}):v.jsx(i,{...a(Math.min(t,e+1)),"aria-label":"Next",children:v.jsx(Ye,{size:"xs",icon:Ag})})]})},uK=({buttonLabel:e="Options",buttonSize:t="md",...n})=>v.jsx(Qe,{buttonContent:v.jsx(Ye,{icon:R$,widthAuto:!0,className:Ne({"px-1":t==="sm"})}),caretless:!0,buttonLabel:e,buttonSize:t,...n}),an=Object.assign(uK,{Item:Qe.Item,Separator:Qe.Separator,Title:Qe.Title,Misc:Qe.Misc}),cK=({open:e,children:t,className:n,onClose:r,...i})=>{const a=T.useRef(null);return T.useEffect(()=>{const s=document.body,u=s.style.overflow,d=s.style.paddingRight;if(e){const f=window.outerWidth-s.clientWidth,m=s.scrollHeight>s.clientHeight;s.style.overflow="hidden",m&&(s.style.paddingRight=`${f}px`),a.current?.showModal()}else a.current?.close();return()=>{s.style.overflow=u,s.style.paddingRight=d}},[e]),Dh.createPortal(v.jsx("dialog",{ref:a,className:Ne("bg-transparent backdrop:bg-black/50",n),onCancel:s=>{s.preventDefault(),r()},...i,children:e&&t}),document.body)},Ja=({open:e,onClose:t,variant:n="default",title:r,children:i,className:a,...s})=>{const{size:u="md",confirmText:d="Confirm",cancelText:f="Cancel",confirmDisabled:m,onConfirm:p,onClosed:b,..._}="onConfirm"in s?s:{...s},[w,x]=T.useState(e),E=T.useRef(null),A=T.useRef("cancel"),j=T.useCallback(O=>{O.preventDefault(),O.stopPropagation(),A.current="confirm",p?.()},[p]);return T.useEffect(()=>{if(e){A.current="cancel",x(!0);return}const O=E.current;if(O){delete E.current.dataset.open;let N=!1;const U=V=>{N||V.target!==O||(N=!0,x(!1),b?.(A.current))};return O.addEventListener("transitionend",U),()=>{O.removeEventListener("transitionend",U)}}},[b,e]),T.useEffect(()=>{const O=E.current;w&&O&&(O.dataset.open="")},[w]),v.jsx(cK,{open:w,onClose:t,className:Ne({"flex w-screen h-screen max-w-screen max-h-screen":w,"overflow-hidden":n==="cover"},a),..._,children:v.jsx("form",{"data-testid":"transition-container",ref:E,className:Ne("w-full m-auto p-4 sm:p-6","-translate-y-4 data-open:translate-y-0 opacity-0 data-open:opacity-100","transition-[opacity_,_translate] duration-300",n!=="cover"&&{"sm:w-sm":u==="sm","md:w-lg":u==="md","md:w-4xl":u==="lg","md:w-6xl":u==="xl"},{"h-full":n==="cover"}),onSubmit:j,children:v.jsx(un,{className:Ne("w-full",{"h-full relative overflow-auto":n==="cover"}),children:n==="cover"?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:Ne("px-4 py-3 absolute top-0 left-0 right-0 z-3000","flex items-center justify-between","text-white bg-linear-to-b from-black/70 to-black/10","[text-shadow:_0_2px_4px_rgb(0_0_0/_0.8)]"),children:[v.jsx("h5",{children:r}),v.jsx(ju,{onClick:t,label:"Close dialog"})]}),i]}):v.jsxs(v.Fragment,{children:[v.jsxs(un.Header,{className:Ne("sticky top-0","flex items-center justify-between gap-x-2"),children:[v.jsx("h5",{className:Ne({"text-danger":n==="danger"}),children:r}),v.jsx(ju,{onClick:t,label:"Close dialog"})]}),v.jsx(un.Body,{children:i}),p&&v.jsxs(un.Footer,{"data-testid":"footer",className:Ne("flex justify-end items-center gap-x-2","[&]:px-3 sticky bottom-0"),children:[v.jsx(Kv,{onClick:t,children:f}),v.jsx(Mt,{solid:!0,variant:n==="danger"?"danger":"primary",disabled:m,type:"submit",children:d})]})]})})})})},Vo=({className:e,children:t,loading:n=!1,variant:r="default"})=>v.jsx(Pt,{className:Ne({"[&]:border-danger":r==="error"},e),children:v.jsxs("h3",{className:Ne("text-center",{"text-gray-500 dark:text-gray-400":r==="default","text-danger":r==="error"}),children:[n&&v.jsxs(v.Fragment,{children:[v.jsx(Ye,{icon:Q2,spin:!0}),v.jsx("span",{className:"ml-2",children:t??"Loading..."})]}),!n&&t]})}),zr=({variant:e,className:t,size:n="md",children:r})=>v.jsx("div",{className:Ne("rounded-md text-center",{"p-2":n==="sm","p-4":n==="md","p-6":n==="lg","[&]:text-white":e!=="warning","bg-lm-brand dark:bg-dm-brand":e==="success","bg-danger":e==="error","bg-warning text-black":e==="warning"},t),children:r}),eo=({placement:e="auto"}={})=>{const t=T.useRef(null),n=(()=>{const x=[];return e==="auto"&&x.push(KY()),x.push(ZY({element:t})),x})(),[r,i]=T.useState(!1),{refs:a,floatingStyles:s,context:u,middlewareData:d}=lN({placement:e==="auto"?void 0:e,open:r,onOpenChange:i,middleware:n}),f=sW(u,{delay:{open:300},move:!0}),{getFloatingProps:m,getReferenceProps:p}=uN([f]),{isMounted:b,styles:_}=hW(u,{duration:200}),w=T.useMemo(()=>{const x=u.placement.split("-")[0];return{top:"bottom",right:"left",bottom:"top",left:"right"}[x]??""},[u.placement]);return{anchor:{...p(),ref:a.setReference},tooltip:{...m(),refSetter:a.setFloating,isMounted:b,styles:{...s,..._},arrowPos:d.arrow,arrowRef:t,arrowSide:w}}},to=({children:e,isMounted:t,styles:n,refSetter:r,arrowRef:i,arrowPos:a,arrowSide:s,...u})=>t&&v.jsx("div",{role:"tooltip","aria-live":"polite",className:Ne("z-500 max-w-64",{"pt-2.5":s==="top","pb-2.5":s==="bottom","pr-2.5":s==="right","pl-2.5":s==="left"}),ref:r,style:n,...u,children:v.jsxs("div",{className:"relative px-1.5 py-1 rounded bg-black/90 text-white text-center",children:[v.jsx("span",{className:"sr-only",children:"Tooltip: "}),e,v.jsx("div",{ref:i,className:Ne("absolute","border-l-6 border-r-6 border-b-6 border-l-transparent border-r-transparent border-b-black/90",{"rotate-180":s==="bottom","rotate-90 mr-[-3px]":s==="right","rotate-270 ml-[-3px]":s==="left"}),style:{left:a?.x,top:a?.y,[s]:`${-(i.current?.offsetWidth??0)/2}px`},"data-testid":"arrow"})]})});function _N(e){if(e.currentField!==e.newField)return"ASC";const t={ASC:"DESC",DESC:void 0};return e.currentOrderDir?t[e.currentOrderDir]:"ASC"}function Cw(e){const t=_N(e);return{field:t?e.newField:void 0,dir:t}}const xN=(e,{field:t,dir:n})=>!t||!n?e:e.sort((r,i)=>{const a=n==="ASC"?1:-1,s=n==="ASC"?-1:1;return r[t]>i[t]?a:s}),fK=e=>e.dir?`${e.field}-${e.dir}`:void 0,dK=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};function Vh({items:e,order:t,onChange:n,prefixed:r=!0,buttonVariant:i="button",...a}){const s=T.useCallback(d=>{const f=Cw({currentOrderDir:t.dir,currentField:t.field,newField:d});n(f)},[n,t.dir,t.field]),u=i==="button";return v.jsxs(Qe,{buttonContent:v.jsxs(v.Fragment,{children:[!u&&"Order by",u&&!t.field&&v.jsx("i",{children:"Order by..."}),u&&t.field&&v.jsxs(v.Fragment,{children:[r&&"Order by: ",e[t.field]," - ",t.dir??"DESC"]})]}),buttonVariant:i,...a,children:[Object.entries(e).map(([d,f])=>v.jsxs(Qe.Item,{selected:t.field===d,onClick:()=>s(d),className:"flex items-center justify-between gap-2",children:[f,t.field===d&&v.jsx(Ye,{icon:t.dir==="ASC"?I$:oV})]},d)),v.jsx(Qe.Separator,{}),v.jsx(Qe.Item,{disabled:!t.field,onClick:()=>n({}),children:v.jsx("i",{children:"Clear selection"})})]})}const hK="#4696e5",mK="rgba(70, 150, 229, 0.4)",pK="#2078CF",gK="rgba(32, 120, 207, 0.4)",yh=()=>Qo()?hK:pK,vK=()=>Qo()?mK:gK,Ox="#f77f28",yK="rgba(247, 127, 40, 0.4)",bK="white",_K="#161b22",xK=e=>document.querySelector("html")?.setAttribute("data-theme",e),Qo=()=>document.querySelector("html")?.getAttribute("data-theme")==="dark",Ew=(e=window.matchMedia.bind(window))=>e("(prefers-color-scheme: dark)").matches?"dark":"light",wK=({isOpen:e,onClose:t,forceUpdate:n})=>{const{flag:r,setToTrue:i}=Sn(),a=T.useCallback(()=>{i(),n()},[n,i]);return e?v.jsxs(un,{role:"alert",className:Ne("w-[700px] max-w-[calc(100%-30px)]","fixed top-[35px] left-[50%] translate-x-[-50%] z-[1040]"),children:[v.jsxs(un.Header,{className:"flex items-center justify-between",children:[v.jsx("h5",{children:"This app has just been updated!"}),v.jsx(ju,{onClick:t})]}),v.jsxs(un.Body,{className:"flex gap-4 items-center justify-between max-md:flex-col",children:["Restart it to enjoy the new features.",v.jsxs(Mt,{disabled:r,variant:"secondary",solid:!0,onClick:a,children:[!r&&v.jsxs(v.Fragment,{children:["Restart now ",v.jsx(Ye,{icon:g$})]}),r&&v.jsx(v.Fragment,{children:"Restarting..."})]})]})]}):null},wN=({children:e,title:t})=>v.jsx("div",{className:"pt-4",children:v.jsxs(Pt,{className:"p-4 w-full lg:w-[65%] m-auto",children:[v.jsx("h2",{children:t}),e]})}),SN=({to:e="/",children:t="Home"})=>v.jsxs(wN,{title:"Oops! We could not find requested route.",children:[v.jsx("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),v.jsx("br",{}),v.jsx(Mt,{inline:!0,to:e,size:"lg",children:t})]});function Sa(e){return T.useMemo(()=>e,[e])}function Ca(e,t){return(n,r=globalThis.console)=>(t.forEach(i=>{const a=n[i];e[i]=a}),e)}const SK=async()=>{(await navigator.serviceWorker?.getRegistrations()??[]).forEach(({waiting:t})=>{t?.addEventListener("statechange",n=>{n.target?.state==="activated"&&window.location.reload()}),t?.postMessage({type:"SKIP_WAITING"})})},CN=({fetchServers:e,servers:t,settings:n,appUpdated:r,resetAppUpdate:i})=>{const{MainHeader:a,Home:s,ShlinkWebComponentContainer:u,CreateServer:d,EditServer:f,Settings:m,ManageServers:p,ShlinkVersionsContainer:b}=Sa(CN),_=xr(),w=T.useRef(t),x=_.pathname==="/";return T.useEffect(()=>{Object.keys(w.current).length===0&&e()},[e]),T.useEffect(()=>{xK(n.ui?.theme??Ew())},[n.ui?.theme]),v.jsxs("div",{className:"h-full",children:[v.jsxs(v.Fragment,{children:[v.jsx(a,{}),v.jsxs("div",{className:"h-full pt-(--header-height)",children:[v.jsx("div",{"data-testid":"shlink-wrapper",className:Ne("min-h-full pb-[calc(var(--footer-height)+var(--footer-margin))] -mb-[calc(var(--footer-height)+var(--footer-margin))]",{"flex items-center pt-4":x}),children:v.jsxs(Nv,{children:[v.jsx(gt,{index:!0,element:v.jsx(s,{})}),v.jsx(gt,{path:"/settings",children:["","*"].map(E=>v.jsx(gt,{path:E,element:v.jsx(m,{})},E))}),v.jsx(gt,{path:"/manage-servers",element:v.jsx(p,{})}),v.jsx(gt,{path:"/server/create",element:v.jsx(d,{})}),v.jsx(gt,{path:"/server/:serverId/edit",element:v.jsx(f,{})}),v.jsx(gt,{path:"/server/:serverId",children:["","*"].map(E=>v.jsx(gt,{path:E,element:v.jsx(u,{})},E))}),v.jsx(gt,{path:"*",element:v.jsx(SN,{})})]})}),v.jsx("div",{className:"h-(--footer-height) mt-(--footer-margin) md:px-4",children:v.jsx(b,{})})]})]}),v.jsx(wK,{isOpen:r,onClose:i,forceUpdate:SK})]})},CK=Ca(CN,["MainHeader","Home","ShlinkWebComponentContainer","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"]);function pr(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var EK=typeof Symbol=="function"&&Symbol.observable||"@@observable",PT=EK,ib=()=>Math.random().toString(36).substring(7).split("").join("."),AK={INIT:`@@redux/INIT${ib()}`,REPLACE:`@@redux/REPLACE${ib()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ib()}`},kg=AK;function Aw(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function EN(e,t,n){if(typeof e!="function")throw new Error(pr(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(pr(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(pr(1));return n(EN)(e,t)}let r=e,i=t,a=new Map,s=a,u=0,d=!1;function f(){s===a&&(s=new Map,a.forEach((E,A)=>{s.set(A,E)}))}function m(){if(d)throw new Error(pr(3));return i}function p(E){if(typeof E!="function")throw new Error(pr(4));if(d)throw new Error(pr(5));let A=!0;f();const j=u++;return s.set(j,E),function(){if(A){if(d)throw new Error(pr(6));A=!1,f(),s.delete(j),a=null}}}function b(E){if(!Aw(E))throw new Error(pr(7));if(typeof E.type>"u")throw new Error(pr(8));if(typeof E.type!="string")throw new Error(pr(17));if(d)throw new Error(pr(9));try{d=!0,i=r(i,E)}finally{d=!1}return(a=s).forEach(j=>{j()}),E}function _(E){if(typeof E!="function")throw new Error(pr(10));r=E,b({type:kg.REPLACE})}function w(){const E=p;return{subscribe(A){if(typeof A!="object"||A===null)throw new Error(pr(11));function j(){const N=A;N.next&&N.next(m())}return j(),{unsubscribe:E(j)}},[PT](){return this}}}return b({type:kg.INIT}),{dispatch:b,subscribe:p,getState:m,replaceReducer:_,[PT]:w}}function TK(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:kg.INIT})>"u")throw new Error(pr(12));if(typeof n(void 0,{type:kg.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(pr(13))})}function Xv(e){const t=Object.keys(e),n={};for(let a=0;a<t.length;a++){const s=t[a];typeof e[s]=="function"&&(n[s]=e[s])}const r=Object.keys(n);let i;try{TK(n)}catch(a){i=a}return function(s={},u){if(i)throw i;let d=!1;const f={};for(let m=0;m<r.length;m++){const p=r[m],b=n[p],_=s[p],w=b(_,u);if(typeof w>"u")throw u&&u.type,new Error(pr(14));f[p]=w,d=d||w!==_}return d=d||r.length!==Object.keys(s).length,d?f:s}}function Ig(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function OK(...e){return t=>(n,r)=>{const i=t(n,r);let a=()=>{throw new Error(pr(15))};const s={getState:i.getState,dispatch:(d,...f)=>a(d,...f)},u=e.map(d=>d(s));return a=Ig(...u)(i.dispatch),{...i,dispatch:a}}}function AN(e){return Aw(e)&&"type"in e&&typeof e.type=="string"}var TN=Symbol.for("immer-nothing"),MT=Symbol.for("immer-draftable"),Ei=Symbol.for("immer-state");function ha(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ef=Object.getPrototypeOf;function Pu(e){return!!e&&!!e[Ei]}function Ho(e){return e?ON(e)||Array.isArray(e)||!!e[MT]||!!e.constructor?.[MT]||Jv(e)||ey(e):!1}var jK=Object.prototype.constructor.toString();function ON(e){if(!e||typeof e!="object")return!1;const t=ef(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===jK}function Ug(e,t){Qv(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Qv(e){const t=e[Ei];return t?t.type_:Array.isArray(e)?1:Jv(e)?2:ey(e)?3:0}function jx(e,t){return Qv(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function jN(e,t,n){const r=Qv(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function PK(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Jv(e){return e instanceof Map}function ey(e){return e instanceof Set}function uu(e){return e.copy_||e.base_}function Px(e,t){if(Jv(e))return new Map(e);if(ey(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=ON(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Ei];let i=Reflect.ownKeys(r);for(let a=0;a<i.length;a++){const s=i[a],u=r[s];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(r[s]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[s]})}return Object.create(ef(e),r)}else{const r=ef(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function Tw(e,t=!1){return ty(e)||Pu(e)||!Ho(e)||(Qv(e)>1&&(e.set=e.add=e.clear=e.delete=MK),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Tw(r,!0))),e}function MK(){ha(2)}function ty(e){return Object.isFrozen(e)}var RK={};function Mu(e){const t=RK[e];return t||ha(0,e),t}var bh;function PN(){return bh}function NK(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function RT(e,t){t&&(Mu("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Mx(e){Rx(e),e.drafts_.forEach(LK),e.drafts_=null}function Rx(e){e===bh&&(bh=e.parent_)}function NT(e){return bh=NK(bh,e)}function LK(e){const t=e[Ei];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function LT(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ei].modified_&&(Mx(t),ha(4)),Ho(e)&&(e=Bg(t,e),t.parent_||zg(t,e)),t.patches_&&Mu("Patches").generateReplacementPatches_(n[Ei].base_,e,t.patches_,t.inversePatches_)):e=Bg(t,n,[]),Mx(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==TN?e:void 0}function Bg(e,t,n){if(ty(t))return t;const r=t[Ei];if(!r)return Ug(t,(i,a)=>DT(e,r,t,i,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return zg(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let a=i,s=!1;r.type_===3&&(a=new Set(i),i.clear(),s=!0),Ug(a,(u,d)=>DT(e,r,i,u,d,n,s)),zg(e,i,!1),n&&e.patches_&&Mu("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function DT(e,t,n,r,i,a,s){if(Pu(i)){const u=a&&t&&t.type_!==3&&!jx(t.assigned_,r)?a.concat(r):void 0,d=Bg(e,i,u);if(jN(n,r,d),Pu(d))e.canAutoFreeze_=!1;else return}else s&&n.add(i);if(Ho(i)&&!ty(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Bg(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&zg(e,i)}}function zg(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Tw(t,n)}function DK(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:PN(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,a=Ow;n&&(i=[r],a=_h);const{revoke:s,proxy:u}=Proxy.revocable(i,a);return r.draft_=u,r.revoke_=s,u}var Ow={get(e,t){if(t===Ei)return e;const n=uu(e);if(!jx(n,t))return kK(e,n,t);const r=n[t];return e.finalized_||!Ho(r)?r:r===ab(e.base_,t)?(ob(e),e.copy_[t]=Lx(r,e)):r},has(e,t){return t in uu(e)},ownKeys(e){return Reflect.ownKeys(uu(e))},set(e,t,n){const r=MN(uu(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=ab(uu(e),t),a=i?.[Ei];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(PK(n,i)&&(n!==void 0||jx(e.base_,t)))return!0;ob(e),Nx(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return ab(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,ob(e),Nx(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=uu(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){ha(11)},getPrototypeOf(e){return ef(e.base_)},setPrototypeOf(){ha(12)}},_h={};Ug(Ow,(e,t)=>{_h[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});_h.deleteProperty=function(e,t){return _h.set.call(this,e,t,void 0)};_h.set=function(e,t,n){return Ow.set.call(this,e[0],t,n,e[0])};function ab(e,t){const n=e[Ei];return(n?uu(n):e)[t]}function kK(e,t,n){const r=MN(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function MN(e,t){if(!(t in e))return;let n=ef(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ef(n)}}function Nx(e){e.modified_||(e.modified_=!0,e.parent_&&Nx(e.parent_))}function ob(e){e.copy_||(e.copy_=Px(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var IK=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const s=this;return function(d=a,...f){return s.produce(d,m=>n.call(this,m,...f))}}typeof n!="function"&&ha(6),r!==void 0&&typeof r!="function"&&ha(7);let i;if(Ho(t)){const a=NT(this),s=Lx(t,void 0);let u=!0;try{i=n(s),u=!1}finally{u?Mx(a):Rx(a)}return RT(a,r),LT(i,a)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===TN&&(i=void 0),this.autoFreeze_&&Tw(i,!0),r){const a=[],s=[];Mu("Patches").generateReplacementPatches_(t,i,a,s),r(a,s)}return i}else ha(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...u)=>this.produceWithPatches(s,d=>t(d,...u));let r,i;return[this.produce(t,n,(s,u)=>{r=s,i=u}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Ho(e)||ha(8),Pu(e)&&(e=Uo(e));const t=NT(this),n=Lx(e,void 0);return n[Ei].isManual_=!0,Rx(t),n}finishDraft(e,t){const n=e&&e[Ei];(!n||!n.isManual_)&&ha(9);const{scope_:r}=n;return RT(r,t),LT(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Mu("Patches").applyPatches_;return Pu(e)?r(e,t):this.produce(e,i=>r(i,t))}};function Lx(e,t){const n=Jv(e)?Mu("MapSet").proxyMap_(e,t):ey(e)?Mu("MapSet").proxySet_(e,t):DK(e,t);return(t?t.scope_:PN()).drafts_.push(n),n}function Uo(e){return Pu(e)||ha(10,e),RN(e)}function RN(e){if(!Ho(e)||ty(e))return e;const t=e[Ei];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Px(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Px(e,!0);return Ug(n,(r,i)=>{jN(n,r,RN(i))}),t&&(t.finalized_=!1),n}var Ai=new IK,NN=Ai.produce;Ai.produceWithPatches.bind(Ai);Ai.setAutoFreeze.bind(Ai);Ai.setUseStrictShallowCopy.bind(Ai);Ai.applyPatches.bind(Ai);Ai.createDraft.bind(Ai);Ai.finishDraft.bind(Ai);function UK(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function BK(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function zK(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var kT=e=>Array.isArray(e)?e:[e];function FK(e){const t=Array.isArray(e[0])?e[0]:e;return zK(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function $K(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var VK=class{constructor(e){this.value=e}deref(){return this.value}},HK=typeof WeakRef<"u"?WeakRef:VK,qK=0,IT=1;function Ip(){return{s:qK,v:void 0,o:null,p:null}}function LN(e,t={}){let n=Ip();const{resultEqualityCheck:r}=t;let i,a=0;function s(){let u=n;const{length:d}=arguments;for(let p=0,b=d;p<b;p++){const _=arguments[p];if(typeof _=="function"||typeof _=="object"&&_!==null){let w=u.o;w===null&&(u.o=w=new WeakMap);const x=w.get(_);x===void 0?(u=Ip(),w.set(_,u)):u=x}else{let w=u.p;w===null&&(u.p=w=new Map);const x=w.get(_);x===void 0?(u=Ip(),w.set(_,u)):u=x}}const f=u;let m;if(u.s===IT)m=u.v;else if(m=e.apply(null,arguments),a++,r){const p=i?.deref?.()??i;p!=null&&r(p,m)&&(m=p,a!==0&&a--),i=typeof m=="object"&&m!==null||typeof m=="function"?new HK(m):m}return f.s=IT,f.v=m,m}return s.clearCache=()=>{n=Ip(),s.resetResultsCount()},s.resultsCount=()=>a,s.resetResultsCount=()=>{a=0},s}function GK(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let a=0,s=0,u,d={},f=i.pop();typeof f=="object"&&(d=f,f=i.pop()),UK(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const m={...n,...d},{memoize:p,memoizeOptions:b=[],argsMemoize:_=LN,argsMemoizeOptions:w=[]}=m,x=kT(b),E=kT(w),A=FK(i),j=p(function(){return a++,f.apply(null,arguments)},...x),O=_(function(){s++;const U=$K(A,arguments);return u=j.apply(null,U),u},...E);return Object.assign(O,{resultFunc:f,memoizedResultFunc:j,dependencies:A,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>u,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:p,argsMemoize:_})};return Object.assign(r,{withTypes:()=>r}),r}var Pe=GK(LN),YK=Object.assign((e,t=Pe)=>{BK(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(a=>e[a]);return t(r,(...a)=>a.reduce((s,u,d)=>(s[n[d]]=u,s),{}))},{withTypes:()=>YK});function DN(e){return({dispatch:n,getState:r})=>i=>a=>typeof a=="function"?a(n,r,e):i(a)}var WK=DN(),KK=DN,ZK=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ig:Ig.apply(null,arguments)},XK=e=>e&&typeof e.match=="function";function fn(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(wi(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>AN(r)&&r.type===e,n}var kN=class eh extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,eh.prototype)}static get[Symbol.species](){return eh}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new eh(...t[0].concat(this)):new eh(...t.concat(this))}};function UT(e){return Ho(e)?NN(e,()=>{}):e}function Up(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function QK(e){return typeof e=="boolean"}var JK=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let s=new kN;return n&&(QK(n)?s.push(WK):s.push(KK(n.extraArgument))),s},eZ="RTK_autoBatch",BT=e=>t=>{setTimeout(t,e)},tZ=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,a=!1,s=!1;const u=new Set,d=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:BT(10):e.type==="callback"?e.queueNotification:BT(e.timeout),f=()=>{s=!1,a&&(a=!1,u.forEach(m=>m()))};return Object.assign({},r,{subscribe(m){const p=()=>i&&m(),b=r.subscribe(p);return u.add(m),()=>{b(),u.delete(m)}},dispatch(m){try{return i=!m?.meta?.[eZ],a=!i,a&&(s||(s=!0,d(f))),r.dispatch(m)}finally{i=!0}}})},nZ=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new kN(e);return r&&i.push(tZ(typeof r=="object"?r:void 0)),i};function jw(e){const t=JK(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:s=void 0,enhancers:u=void 0}=e||{};let d;if(typeof n=="function")d=n;else if(Aw(n))d=Xv(n);else throw new Error(wi(1));let f;typeof r=="function"?f=r(t):f=t();let m=Ig;i&&(m=ZK({trace:!1,...typeof i=="object"&&i}));const p=OK(...f),b=nZ(p);let _=typeof u=="function"?u(b):b();const w=m(..._);return EN(d,s,w)}function IN(e){const t={},n=[];let r;const i={addCase(a,s){const u=typeof a=="string"?a:a.type;if(!u)throw new Error(wi(28));if(u in t)throw new Error(wi(29));return t[u]=s,i},addAsyncThunk(a,s){return s.pending&&(t[a.pending.type]=s.pending),s.rejected&&(t[a.rejected.type]=s.rejected),s.fulfilled&&(t[a.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:a.settled,reducer:s.settled}),i},addMatcher(a,s){return n.push({matcher:a,reducer:s}),i},addDefaultCase(a){return r=a,i}};return e(i),[t,n,r]}function rZ(e){return typeof e=="function"}function iZ(e,t){let[n,r,i]=IN(t),a;if(rZ(e))a=()=>UT(e());else{const u=UT(e);a=()=>u}function s(u=a(),d){let f=[n[d.type],...r.filter(({matcher:m})=>m(d)).map(({reducer:m})=>m)];return f.filter(m=>!!m).length===0&&(f=[i]),f.reduce((m,p)=>{if(p)if(Pu(m)){const _=p(m,d);return _===void 0?m:_}else{if(Ho(m))return NN(m,b=>p(b,d));{const b=p(m,d);if(b===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return b}}return m},u)}return s.getInitialState=a,s}var aZ=(e,t)=>XK(e)?e.match(t):e(t);function oZ(...e){return t=>e.some(n=>aZ(n,t))}var sZ="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",UN=(e=21)=>{let t="",n=e;for(;n--;)t+=sZ[Math.random()*64|0];return t},lZ=["name","message","stack","code"],sb=class{constructor(e,t){this.payload=e,this.meta=t}_type},zT=class{constructor(e,t){this.payload=e,this.meta=t}_type},uZ=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of lZ)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},FT="External signal was aborted",BN=(()=>{function e(t,n,r){const i=fn(t+"/fulfilled",(d,f,m,p)=>({payload:d,meta:{...p||{},arg:m,requestId:f,requestStatus:"fulfilled"}})),a=fn(t+"/pending",(d,f,m)=>({payload:void 0,meta:{...m||{},arg:f,requestId:d,requestStatus:"pending"}})),s=fn(t+"/rejected",(d,f,m,p,b)=>({payload:p,error:(r&&r.serializeError||uZ)(d||"Rejected"),meta:{...b||{},arg:m,requestId:f,rejectedWithValue:!!p,requestStatus:"rejected",aborted:d?.name==="AbortError",condition:d?.name==="ConditionError"}}));function u(d,{signal:f}={}){return(m,p,b)=>{const _=r?.idGenerator?r.idGenerator(d):UN(),w=new AbortController;let x,E;function A(O){E=O,w.abort()}f&&(f.aborted?A(FT):f.addEventListener("abort",()=>A(FT),{once:!0}));const j=async function(){let O;try{let U=r?.condition?.(d,{getState:p,extra:b});if(fZ(U)&&(U=await U),U===!1||w.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const V=new Promise((Z,X)=>{x=()=>{X({name:"AbortError",message:E||"Aborted"})},w.signal.addEventListener("abort",x)});m(a(_,d,r?.getPendingMeta?.({requestId:_,arg:d},{getState:p,extra:b}))),O=await Promise.race([V,Promise.resolve(n(d,{dispatch:m,getState:p,extra:b,requestId:_,signal:w.signal,abort:A,rejectWithValue:(Z,X)=>new sb(Z,X),fulfillWithValue:(Z,X)=>new zT(Z,X)})).then(Z=>{if(Z instanceof sb)throw Z;return Z instanceof zT?i(Z.payload,_,d,Z.meta):i(Z,_,d)})])}catch(U){O=U instanceof sb?s(null,_,d,U.payload,U.meta):s(U,_,d)}finally{x&&w.signal.removeEventListener("abort",x)}return r&&!r.dispatchConditionRejection&&s.match(O)&&O.meta.condition||m(O),O}();return Object.assign(j,{abort:A,requestId:_,arg:d,unwrap(){return j.then(cZ)}})}}return Object.assign(u,{pending:a,rejected:s,fulfilled:i,settled:oZ(s,i),typePrefix:t})}return e.withTypes=()=>e,e})();function cZ(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function fZ(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var dZ=Symbol.for("rtk-slice-createasyncthunk");function hZ(e,t){return`${e}/${t}`}function mZ({creators:e}={}){const t=e?.asyncThunk?.[dZ];return function(r){const{name:i,reducerPath:a=i}=r;if(!i)throw new Error(wi(11));const s=(typeof r.reducers=="function"?r.reducers(gZ()):r.reducers)||{},u=Object.keys(s),d={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(O,N){const U=typeof O=="string"?O:O.type;if(!U)throw new Error(wi(12));if(U in d.sliceCaseReducersByType)throw new Error(wi(13));return d.sliceCaseReducersByType[U]=N,f},addMatcher(O,N){return d.sliceMatchers.push({matcher:O,reducer:N}),f},exposeAction(O,N){return d.actionCreators[O]=N,f},exposeCaseReducer(O,N){return d.sliceCaseReducersByName[O]=N,f}};u.forEach(O=>{const N=s[O],U={reducerName:O,type:hZ(i,O),createNotation:typeof r.reducers=="function"};yZ(N)?_Z(U,N,f,t):vZ(U,N,f)});function m(){const[O={},N=[],U=void 0]=typeof r.extraReducers=="function"?IN(r.extraReducers):[r.extraReducers],V={...O,...d.sliceCaseReducersByType};return iZ(r.initialState,Z=>{for(let X in V)Z.addCase(X,V[X]);for(let X of d.sliceMatchers)Z.addMatcher(X.matcher,X.reducer);for(let X of N)Z.addMatcher(X.matcher,X.reducer);U&&Z.addDefaultCase(U)})}const p=O=>O,b=new Map,_=new WeakMap;let w;function x(O,N){return w||(w=m()),w(O,N)}function E(){return w||(w=m()),w.getInitialState()}function A(O,N=!1){function U(Z){let X=Z[O];return typeof X>"u"&&N&&(X=Up(_,U,E)),X}function V(Z=p){const X=Up(b,N,()=>new WeakMap);return Up(X,Z,()=>{const oe={};for(const[ee,J]of Object.entries(r.selectors??{}))oe[ee]=pZ(J,Z,()=>Up(_,Z,E),N);return oe})}return{reducerPath:O,getSelectors:V,get selectors(){return V(U)},selectSlice:U}}const j={name:i,reducer:x,actions:d.actionCreators,caseReducers:d.sliceCaseReducersByName,getInitialState:E,...A(a),injectInto(O,{reducerPath:N,...U}={}){const V=N??a;return O.inject({reducerPath:V,reducer:x},U),{...j,...A(V,!0)}}};return j}}function pZ(e,t,n,r){function i(a,...s){let u=t(a);return typeof u>"u"&&r&&(u=n()),e(u,...s)}return i.unwrapped=e,i}var Rt=mZ();function gZ(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function vZ({type:e,reducerName:t,createNotation:n},r,i){let a,s;if("reducer"in r){if(n&&!bZ(r))throw new Error(wi(17));a=r.reducer,s=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,s?fn(e,s):fn(e))}function yZ(e){return e._reducerDefinitionType==="asyncThunk"}function bZ(e){return e._reducerDefinitionType==="reducerWithPrepare"}function _Z({type:e,reducerName:t},n,r,i){if(!i)throw new Error(wi(18));const{payloadCreator:a,fulfilled:s,pending:u,rejected:d,settled:f,options:m}=n,p=i(e,a,m);r.exposeAction(t,p),s&&r.addCase(p.fulfilled,s),u&&r.addCase(p.pending,u),d&&r.addCase(p.rejected,d),f&&r.addMatcher(p.settled,f),r.exposeCaseReducer(t,{fulfilled:s||Bp,pending:u||Bp,rejected:d||Bp,settled:f||Bp})}function Bp(){}var xZ="task",zN="listener",FN="completed",Pw="cancelled",wZ=`task-${Pw}`,SZ=`task-${FN}`,Dx=`${zN}-${Pw}`,CZ=`${zN}-${FN}`,ny=class{constructor(e){this.code=e,this.message=`${xZ} ${Pw} (reason: ${e})`}name="TaskAbortError";message},Mw=(e,t)=>{if(typeof e!="function")throw new TypeError(wi(32))},Fg=()=>{},$N=(e,t=Fg)=>(e.catch(t),e),VN=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),xu=(e,t)=>{const n=e.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},wu=e=>{if(e.aborted){const{reason:t}=e;throw new ny(t)}};function HN(e,t){let n=Fg;return new Promise((r,i)=>{const a=()=>i(new ny(e.reason));if(e.aborted){a();return}n=VN(e,a),t.finally(()=>n()).then(r,i)}).finally(()=>{n=Fg})}var EZ=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof ny?"cancelled":"rejected",error:n}}finally{t?.()}},$g=e=>t=>$N(HN(e,t).then(n=>(wu(e),n))),qN=e=>{const t=$g(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:Yc}=Object,$T={},ry="listenerMiddleware",AZ=(e,t)=>{const n=r=>VN(e,()=>xu(r,e.reason));return(r,i)=>{Mw(r);const a=new AbortController;n(a);const s=EZ(async()=>{wu(e),wu(a.signal);const u=await r({pause:$g(a.signal),delay:qN(a.signal),signal:a.signal});return wu(a.signal),u},()=>xu(a,SZ));return i?.autoJoin&&t.push(s.catch(Fg)),{result:$g(e)(s),cancel(){xu(a,wZ)}}}},TZ=(e,t)=>{const n=async(r,i)=>{wu(t);let a=()=>{};const u=[new Promise((d,f)=>{let m=e({predicate:r,effect:(p,b)=>{b.unsubscribe(),d([p,b.getState(),b.getOriginalState()])}});a=()=>{m(),f()}})];i!=null&&u.push(new Promise(d=>setTimeout(d,i,null)));try{const d=await HN(t,Promise.race(u));return wu(t),d}finally{a()}};return(r,i)=>$N(n(r,i))},GN=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=fn(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(wi(21));return Mw(a),{predicate:i,type:t,effect:a}},YN=Yc(e=>{const{type:t,predicate:n,effect:r}=GN(e);return{id:UN(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(wi(22))}}},{withTypes:()=>YN}),VT=(e,t)=>{const{type:n,effect:r,predicate:i}=GN(t);return Array.from(e.values()).find(a=>(typeof n=="string"?a.type===n:a.predicate===i)&&a.effect===r)},kx=e=>{e.pending.forEach(t=>{xu(t,Dx)})},OZ=e=>()=>{e.forEach(kx),e.clear()},HT=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},WN=Yc(fn(`${ry}/add`),{withTypes:()=>WN}),jZ=fn(`${ry}/removeAll`),KN=Yc(fn(`${ry}/remove`),{withTypes:()=>KN}),PZ=(...e)=>{console.error(`${ry}/error`,...e)},Hh=(e={})=>{const t=new Map,{extra:n,onError:r=PZ}=e;Mw(r);const i=m=>(m.unsubscribe=()=>t.delete(m.id),t.set(m.id,m),p=>{m.unsubscribe(),p?.cancelActive&&kx(m)}),a=m=>{const p=VT(t,m)??YN(m);return i(p)};Yc(a,{withTypes:()=>a});const s=m=>{const p=VT(t,m);return p&&(p.unsubscribe(),m.cancelActive&&kx(p)),!!p};Yc(s,{withTypes:()=>s});const u=async(m,p,b,_)=>{const w=new AbortController,x=TZ(a,w.signal),E=[];try{m.pending.add(w),await Promise.resolve(m.effect(p,Yc({},b,{getOriginalState:_,condition:(A,j)=>x(A,j).then(Boolean),take:x,delay:qN(w.signal),pause:$g(w.signal),extra:n,signal:w.signal,fork:AZ(w.signal,E),unsubscribe:m.unsubscribe,subscribe:()=>{t.set(m.id,m)},cancelActiveListeners:()=>{m.pending.forEach((A,j,O)=>{A!==w&&(xu(A,Dx),O.delete(A))})},cancel:()=>{xu(w,Dx),m.pending.delete(w)},throwIfCancelled:()=>{wu(w.signal)}})))}catch(A){A instanceof ny||HT(r,A,{raisedBy:"effect"})}finally{await Promise.all(E),xu(w,CZ),m.pending.delete(w)}},d=OZ(t);return{middleware:m=>p=>b=>{if(!AN(b))return p(b);if(WN.match(b))return a(b.payload);if(jZ.match(b)){d();return}if(KN.match(b))return s(b.payload);let _=m.getState();const w=()=>{if(_===$T)throw new Error(wi(23));return _};let x;try{if(x=p(b),t.size>0){const E=m.getState(),A=Array.from(t.values());for(const j of A){let O=!1;try{O=j.predicate(b,E,_)}catch(N){O=!1,HT(r,N,{raisedBy:"predicate"})}O&&u(j,b,m,w)}}}finally{_=$T}return x},startListening:a,stopListening:s,clearListeners:d}};function wi(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const{actions:MZ,reducer:RZ}=Rt({name:"shlink/appUpdates",initialState:!1,reducers:{appUpdateAvailable:()=>!0,resetAppUpdate:()=>!1}}),{appUpdateAvailable:NZ,resetAppUpdate:LZ}=MZ,DZ=RZ,kZ=(e,t)=>{e.factory("App",CK),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",()=>NZ),e.serviceFactory("resetAppUpdate",()=>LZ)},qT={"Content-Type":"application/json"},GT=e=>e?.body?e?{...e,headers:{...e.headers??{},...qT}}:{headers:qT}:e;let IZ=class{#t;constructor(t=globalThis.fetch.bind(globalThis)){this.#t=t}async jsonRequest(t,n){const r=await this.#t(t,GT(n)),i=await r.json();if(!r.ok)throw i;return i}async emptyRequest(t,n){const r=await this.#t(t,GT(n));if(!r.ok)throw await r.json()}};function Vg(e){return t=>{const{resetSelectedServer:n}=t;return T.useEffect(()=>{n()},[n]),v.jsx(e,{...t})}}let UZ=class extends T.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){const{console:n=globalThis.console}=this.props;n.error(t)}render(){const{hasError:t}=this.state,{location:n=globalThis.location}=this.props;if(t)return v.jsxs(wN,{title:"Oops! This is awkward :S",children:[v.jsx("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),v.jsx("br",{}),v.jsx(Mt,{size:"lg",onClick:()=>n.reload(),children:"Take me back"})]});const{children:r}=this.props;return r}};const Si=({href:e,children:t,rel:n,...r})=>v.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e}),BZ=({id:e,name:t})=>v.jsxs(Mr,{to:`/server/${e}`,className:Ne("servers-list__server-item","flex items-center justify-between gap-x-2 px-4 py-3","rounded-none hover:bg-lm-secondary hover:dark:bg-dm-secondary","border-b last:border-0 border-lm-border dark:border-dm-border"),children:[v.jsx("span",{className:"truncate",children:t}),v.jsx(Ye,{icon:Ag})]}),ZN=({servers:e,borderless:t})=>v.jsx(v.Fragment,{children:e.length>0&&v.jsx("div",{"data-testid":"list",className:Ne("w-full border-lm-border dark:border-dm-border","md:max-h-56 md:overflow-y-auto -mb-1 scroll-thin",{"border-y":!t}),children:e.map(({id:n,name:r})=>v.jsx(BZ,{id:n,name:r},n))})}),XN=({color:e=yh(),className:t})=>v.jsx("svg",{className:t,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:v.jsxs("g",{fill:e,children:[v.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"}),v.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"}),v.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"}),v.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"})]})}),zZ=({servers:e})=>{const t=Qa(),n=Object.values(e),r=n.length>0;return T.useEffect(()=>{const i=n.find(({autoConnect:a})=>a);i&&t(`/server/${i.id}`)},[n,t]),v.jsx("div",{className:"px-3 w-full",children:v.jsx(un,{className:"mx-auto max-w-[720px] overflow-hidden",children:v.jsxs("div",{className:"flex flex-col md:flex-row",children:[v.jsx("div",{className:"p-6 hidden md:flex items-center w-[40%]",children:v.jsx("div",{className:"w-full",children:v.jsx(XN,{})})}),v.jsxs("div",{className:"md:border-l border-lm-border dark:border-dm-border flex-grow",children:[v.jsx("h1",{className:Ne("p-4 text-center border-lm-border dark:border-dm-border",{"border-b":!r}),children:"Welcome!"}),r?v.jsx(ZN,{servers:n}):v.jsxs("div",{className:"p-6 text-center flex flex-col gap-12 text-xl",children:[v.jsx("p",{children:"This application will help you manage your Shlink servers."}),v.jsx("p",{children:v.jsxs(Mt,{to:"/server/create",size:"lg",inline:!0,children:[v.jsx(Ye,{icon:kh,widthAuto:!0})," Add a server"]})}),v.jsx("p",{children:v.jsx(Si,{href:"https://shlink.io/documentation",children:v.jsxs("small",{children:[v.jsx("span",{className:"mr-2",children:"Learn more about Shlink"}),v.jsx(Ye,{icon:w$})]})})})]})]})]})})})},QN=()=>{const{ServersDropdown:e}=Sa(QN),{pathname:t}=xr(),n="/settings";return v.jsxs(Ax,{className:"[&]:fixed top-0 z-900",brand:v.jsxs(Mr,{to:"/",className:"[&]:text-white no-underline flex items-center gap-2",children:[v.jsx(XN,{className:"w-7",color:"white"})," ",v.jsx("small",{className:"font-normal",children:"Shlink"})]}),children:[v.jsxs(Ax.MenuItem,{to:n,active:t.startsWith(n),className:"flex items-center gap-1.5",children:[v.jsx(Ye,{icon:v$})," Settings"]}),v.jsx(e,{})]})},FZ=Ca(QN,["ServersDropdown"]),$Z=({children:e})=>{const t=xr();return T.useEffect(()=>{scrollTo(0,0)},[t]),v.jsx(v.Fragment,{children:e})},JN=(e,t)=>e.reduce((n,r)=>{const i=t(r);return n[i]=(n[i]||0)+1,n},{}),eL=(e,t)=>e.reduce((n,r)=>{const i=t(r);return(n[i]=n[i]||[]).push(r),n},{}),lb=e=>Object.prototype.toString.call(e)==="[object Object]",tL=(e,t)=>{const n={};return(...r)=>{const i=e(...r);if(n[i])return n[i];const a=t(...r);return n[i]=a,a}},Sf=(e,t)=>{const n={...e};return!lb(e)||!lb(t)||Object.keys(t).forEach(r=>{lb(t[r])?n[r]=r in e&&e[r]!==void 0?Sf(e[r],t[r]):{...t[r]}:n[r]=t[r]}),n},nL=(e,t)=>Array.from({length:t-e},(n,r)=>e+r),VZ=(e,t)=>[...e].sort((n,r)=>{const i=t(n),a=t(r);return i===a?0:i<a?-1:1}),Wc=(e,t)=>{const n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n},YT=(e,t)=>Object.fromEntries(e.map((n,r)=>[n,t[r]])),HZ=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,WT=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(HZ);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},KT=e=>e==="*"||e==="x"||e==="X",ZT=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},qZ=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],GZ=(e,t)=>{if(KT(e)||KT(t))return 0;const[n,r]=qZ(ZT(e),ZT(t));return n>r?1:n<r?-1:0},XT=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){const r=GZ(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0},YZ=(e,t)=>{const n=WT(e),r=WT(t),i=n.pop(),a=r.pop(),s=XT(n,r);return s!==0?s:i&&a?XT(i.split("."),a.split(".")):i||a?i?-1:1:0},Ix=(e,t,n)=>{WZ(n);const r=YZ(e,t);return rL[n].includes(r)},rL={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},QT=Object.keys(rL),WZ=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(QT.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${QT.join("|")}`)},iL=tL(e=>e,e=>{try{return Ix(e,e,"=")}catch{return!1}}),aL=e=>iL(e)?`v${e}`:e,oL=(e,t="latest")=>iL(e)?e:t,KZ="%_VERSION_%",ZZ=e=>aL(oL(e)),JT=({project:e,version:t})=>v.jsx(Si,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-gray-500",children:v.jsx("b",{children:t})}),XZ=({selectedServer:e,clientVersion:t=KZ})=>{const n=ZZ(t);return v.jsxs("small",{className:"text-gray-500",children:[X2(e)&&v.jsxs(v.Fragment,{children:["Server: ",v.jsx(JT,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",v.jsx(JT,{project:"shlink-web-client",version:n})]})},QZ=({selectedServer:e})=>v.jsx("div",{className:Ne("text-center",{"md:ml-(--aside-menu-width)":X2(e)}),children:v.jsx(XZ,{selectedServer:e})}),Rw={INVALID_ARGUMENT:"https://shlink.io/api/error/invalid-data",INVALID_SHORT_URL_DELETION:"https://shlink.io/api/error/invalid-short-url-deletion",DOMAIN_NOT_FOUND:"https://shlink.io/api/error/domain-not-found",FORBIDDEN_OPERATION:"https://shlink.io/api/error/forbidden-tag-operation",INVALID_SLUG:"https://shlink.io/api/error/non-unique-slug",INVALID_SHORTCODE:"https://shlink.io/api/error/short-url-not-found",TAG_CONFLICT:"https://shlink.io/api/error/tag-conflict",TAG_NOT_FOUND:"https://shlink.io/api/error/tag-not-found",MERCURE_NOT_CONFIGURED:"https://shlink.io/api/error/mercure-not-configured",INVALID_AUTHORIZATION:"https://shlink.io/api/error/missing-authentication",INVALID_API_KEY:"https://shlink.io/api/error/invalid-api-key",NOT_FOUND:"https://shlink.io/api/error/not-found",INVALID_URL:"https://shlink.io/api/error/invalid-url"};Object.freeze(Rw);const Nw=(e,t,n=1)=>nL(n,e+1).map(t),JZ=e=>Array.isArray(e)&&e.length===0||typeof e=="string"&&e===""||typeof e=="object"&&Object.keys(e).length===0,hu=e=>e!=null&&!JZ(e),ub=e=>e||null,Ux=e=>e?"true":"false",cb=e=>e===void 0?void 0:Ux(e),eX=e=>{if(e.length<2)return e[0]??"";const[t,...n]=e.reverse();return`${n.reverse().join(", ")} and ${t}`},eO="[&]:p-0 [&]:md:w-1/4 [&]:rounded-none",tX=({onChange:e,className:t})=>{const n=Dn("qrCodes",Cf),{color:r,bgColor:i}=n;return v.jsxs(Pt,{title:"Colors",className:t,bodyClassName:"flex flex-col gap-4",children:[v.jsx(ti,{label:"Default color:",helpText:v.jsxs(v.Fragment,{children:["QR codes will initially use ",v.jsx("b",{"data-testid":"color",children:r})," color."]}),type:"color",value:r,onChange:a=>e({...n,color:a.target.value}),inputClassName:eO}),v.jsx(ti,{label:"Default background color:",helpText:v.jsxs(v.Fragment,{children:["QR codes will initially use ",v.jsx("b",{"data-testid":"bg-color",children:i})," background color."]}),type:"color",value:i,onChange:a=>e({...n,bgColor:a.target.value}),inputClassName:eO})]})},sL=({errorCorrection:e,onChange:t})=>v.jsxs(Qe,{buttonContent:e?`Error correction (${e})`:v.jsx("i",{children:"Default error correction"}),buttonClassName:"w-full",children:[v.jsxs(Qe.Item,{selected:e==="L",onClick:()=>t("L"),children:[v.jsx("b",{children:"L"}),"ow"]}),v.jsxs(Qe.Item,{selected:e==="M",onClick:()=>t("M"),children:[v.jsx("b",{children:"M"}),"edium"]}),v.jsxs(Qe.Item,{selected:e==="Q",onClick:()=>t("Q"),children:[v.jsx("b",{children:"Q"}),"uartile"]}),v.jsxs(Qe.Item,{selected:e==="H",onClick:()=>t("H"),children:[v.jsx("b",{children:"H"}),"igh"]})]}),nX=["png","svg","webp","jpeg"],lL=({format:e,onChange:t})=>v.jsx(Qe,{buttonContent:`Format (${e})`,buttonClassName:"w-full",children:nX.map(n=>v.jsx(Qe.Item,{selected:e===n,onClick:()=>t(n),children:n},n))}),Ru=({className:e,size:t,...n})=>v.jsx("span",{className:Ne("text-gray-500 dark:text-gray-400",{"text-sm":t==="sm","text-lg":t==="lg"},e),...n}),rX=({onChange:e})=>{const t=Dn("qrCodes",Cf),{format:n,errorCorrection:r}=t;return v.jsxs(Pt,{title:"Format",className:"card",bodyClassName:"flex flex-col gap-4",children:[v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsx(lL,{format:n,onChange:i=>e({...t,format:i})}),v.jsxs(Ru,{size:"sm",children:["When downloading a QR code, it will use ",v.jsx("b",{"data-testid":"format",children:n})," format by default."]})]}),v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsx(sL,{errorCorrection:r,onChange:i=>e({...t,errorCorrection:i})}),v.jsxs(Ru,{size:"sm",children:["QR codes will initially have a ",v.jsx("b",{"data-testid":"error-correction",children:r})," error correction."]})]})]})},iX=({onChange:e,className:t})=>{const n=Dn("qrCodes",Cf),{size:r,margin:i}=n;return v.jsxs(Pt,{title:"Size",className:t,bodyClassName:"flex flex-col gap-4",children:[v.jsx(ti,{label:"Default dimensions:",helpText:v.jsxs(v.Fragment,{children:["QR codes will be initially generated with ",v.jsxs("b",{"data-testid":"size",children:[r,"x",r,"px"]}),"."]}),type:"range",value:r,step:10,min:50,max:1e3,onChange:a=>e({...n,size:Number(a.target.value)}),inputClassName:"[&]:p-0"}),v.jsx(ti,{label:"Default margin:",helpText:v.jsxs(v.Fragment,{children:["QR codes will be initially generated with a ",v.jsxs("b",{"data-testid":"margin",children:[i,"px"]})," margin."]}),type:"range",value:i,step:1,min:0,max:100,onChange:a=>e({...n,margin:Number(a.target.value)}),inputClassName:"[&]:p-0"})]})},qo=({children:e,helpText:t,"data-testid":n,...r})=>v.jsxs("div",{"data-testid":n,children:[v.jsxs(wa,{className:"flex items-center gap-x-2",children:[v.jsx(BW,{...r}),e]}),t&&v.jsx(Ru,{size:"sm","data-testid":n?`${n}-help-text`:"help-text",className:"pl-10",children:t})]}),aX=({toggleRealTimeUpdates:e,onIntervalChange:t})=>{const{enabled:n,interval:r}=Dn("realTimeUpdates",{enabled:!0});return v.jsxs(Pt,{title:"Real-time updates",className:"h-full",bodyClassName:"flex flex-col gap-y-4",children:[v.jsx(qo,{checked:n,onChange:e,helpText:v.jsxs(v.Fragment,{children:["Real-time updates are currently being ",v.jsx("b",{children:n?"processed":"ignored"}),"."]}),children:"Enable or disable real-time updates."}),v.jsxs("div",{children:[v.jsx(ti,{label:v.jsx("span",{className:Ne({"dark:text-gray-400":!n}),children:"Real-time updates frequency (in minutes):"}),type:"number",min:0,placeholder:"Immediate",disabled:!n,value:`${r??""}`,onChange:({target:i})=>t(Number(i.value))}),n&&v.jsx(Ru,{size:"sm",children:r?v.jsxs("span",{children:["Updates will be reflected in the UI every ",v.jsx("b",{children:r})," minute",r>1&&"s","."]}):"Updates will be reflected in the UI as soon as they happen."})]})]})},fb=e=>e==="includes"?"Suggest tags including input":"Suggest tags starting with input",oX=e=>e==="includes"?v.jsxs(v.Fragment,{children:["The list of suggested tags will contain those ",v.jsx("b",{children:"including"})," provided input."]}):v.jsxs(v.Fragment,{children:["The list of suggested tags will contain those ",v.jsx("b",{children:"starting with"})," provided input."]}),sX=({onChange:e})=>{const t=Dn("shortUrlCreation",{validateUrls:!1}),n=r=>()=>e({...t??{validateUrls:!1},tagFilteringMode:r});return v.jsxs(Pt,{title:"Short URLs form",className:"card",bodyClassName:"flex flex-col gap-4",children:[v.jsxs(qo,{"data-testid":"validate-url",checked:t.validateUrls??!1,onChange:r=>e({...t,validateUrls:r}),helpText:v.jsxs(v.Fragment,{children:["The initial state of the ",v.jsx("b",{children:"Validate URL"})," checkbox will be ",v.jsx("b",{children:t.validateUrls?"checked":"unchecked"}),"."]}),children:["Request validation on long URLs when creating new short URLs."," ",v.jsxs("b",{children:["This option is ignored by Shlink ",">=","4.0.0"]})]}),v.jsx(qo,{"data-testid":"forward-query",checked:t.forwardQuery??!0,onChange:r=>e({...t,forwardQuery:r}),helpText:v.jsxs(v.Fragment,{children:["The initial state of the ",v.jsx("b",{children:"Forward query params on redirect"})," checkbox will be ",v.jsx("b",{children:t.forwardQuery??!0?"checked":"unchecked"}),"."]}),children:"Make all new short URLs forward their query params to the long URL."}),v.jsxs("div",{className:"flex flex-col",children:[v.jsx(wa,{className:"mb-1.5",children:"Tag suggestions search mode:"}),v.jsxs(Qe,{buttonContent:fb(t.tagFilteringMode),buttonClassName:"w-full",children:[v.jsx(Qe.Item,{selected:!t.tagFilteringMode||t.tagFilteringMode==="startsWith",onClick:n("startsWith"),children:fb("startsWith")}),v.jsx(Qe.Item,{selected:t.tagFilteringMode==="includes",onClick:n("includes"),children:fb("includes")})]}),v.jsx(Ru,{size:"sm",className:"mt-0.5",children:oX(t.tagFilteringMode)})]})]})},lX={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},uX=({onChange:e,defaultOrdering:t})=>{const n=Dn("shortUrlsList"),r=n?.confirmDeletions??!0;return v.jsxs(Pt,{title:"Short URLs list",className:"card",bodyClassName:"flex flex-col gap-4",children:[v.jsx(qo,{checked:r,onChange:i=>e({...n,confirmDeletions:i}),helpText:v.jsxs(v.Fragment,{children:["When deleting a short URL, confirmation ",v.jsx("b",{children:r?"will":"won't"})," be required."]}),children:"Request confirmation before deleting a short URL."}),v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsx(wa,{children:"Default ordering for short URLs list:"}),v.jsx(Vh,{buttonClassName:"w-full",items:lX,order:n?.defaultOrdering??t,onChange:i=>e({defaultOrdering:!i.dir&&!i.field?void 0:i})})]})]})},cX={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},fX=({onChange:e})=>{const t=Dn("tags",{});return v.jsx(Pt,{title:"Tags",className:"card",children:v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsx(wa,{children:"Default ordering for tags list:"}),v.jsx(Vh,{buttonClassName:"w-full",items:cX,order:t.defaultOrdering??{},onChange:n=>e({...t,defaultOrdering:!n.field&&!n.dir?void 0:n})})]})})},dX=({onChange:e,_matchMedia:t})=>{const n=Dn("ui"),r=T.useMemo(()=>n?.theme??Ew(t),[n?.theme,t]);return v.jsxs(Pt,{title:"User interface",bodyClassName:"flex justify-between items-center",children:[v.jsx(qo,{checked:r==="dark",onChange:i=>e({...n,theme:i?"dark":"light"}),children:"Use dark theme."}),v.jsx(Ye,{icon:r==="dark"?Y$:U$})]})},tO={potentialBot:"Potential bot",date:"Date",country:"Country",region:"Region",city:"City",browser:"Browser",os:"OS",userAgent:"User agent",referer:"Referrer",visitedUrl:"Visited URL"},gg={browser:["userAgent"],os:["userAgent"],userAgent:["browser","os"]};Object.freeze(gg);const hX=({onChange:e})=>{const t=Dn("visitsList"),n=T.useMemo(()=>Sf(iy,t?.columns??{}),[t?.columns]),r=T.useCallback((i,a)=>{const s={...n,[i]:a};a&&gg[i]?.forEach(u=>{s[u]=!1}),e({columns:s})},[n,e]);return v.jsxs(Pt,{title:"Visits list",children:[v.jsx("p",{className:"mb-2",children:"Columns to show in visits table:"}),v.jsx("ul",{className:"flex flex-col gap-y-1",children:Object.entries(tO).map(([i,a])=>v.jsx("li",{children:v.jsx(qo,{checked:n[i],onChange:s=>r(i,s),children:v.jsxs("span",{className:"inline-flex gap-2",children:[a,gg[i]&&v.jsxs(Ru,{children:["(excludes ",eX(gg[i].map(s=>tO[s])),")"]})]})})},i))})]})},uL={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days"},mX=(e,t)=>!e||e==="all"?t:uL[e],pX=({onChange:e,active:t,allText:n})=>v.jsxs(Qe,{buttonContent:mX(t,n),buttonClassName:"w-full",children:[v.jsx(Qe.Item,{selected:t==="all",onClick:()=>e("all"),children:n}),v.jsx(Qe.Separator,{}),Object.entries(uL).map(([r,i])=>v.jsx(Qe.Item,{selected:t===r,onClick:()=>e(r),children:i},r))]}),nO=e=>e?.defaultInterval??"last30Days",gX=({onChange:e})=>{const t=Dn("visits"),n=T.useCallback(({defaultInterval:r,...i})=>e({defaultInterval:r??nO(t),...i}),[e,t]);return v.jsxs(Pt,{title:"Visits",className:"card",bodyClassName:"flex flex-col gap-4",children:[v.jsx(qo,{"data-testid":"exclude-bots",checked:!!t?.excludeBots,onChange:r=>n({excludeBots:r}),helpText:v.jsxs(v.Fragment,{children:["The visits coming from potential bots will be ",v.jsx("b",{children:t?.excludeBots?"excluded":"included"}),"."]}),children:"Exclude bots wherever possible (this options effect might depend on Shlink servers version)."}),v.jsx(qo,{"data-testid":"compare-visits",checked:!!t?.loadPrevInterval,onChange:r=>n({loadPrevInterval:r}),helpText:v.jsxs(v.Fragment,{children:["When loading visits, previous period ",v.jsx("b",{children:t?.loadPrevInterval?"will":"won't"})," be loaded by default."]}),children:"Compare visits with previous period."}),v.jsxs("div",{className:"flex flex-col",children:[v.jsx(wa,{className:"mb-1.5",children:"Default interval to load on visits sections:"}),v.jsx(pX,{allText:"All visits",active:nO(t),onChange:r=>n({defaultInterval:r})})]})]})},Ud=({children:e,className:t})=>v.jsx("div",{className:Ne("flex flex-col gap-4",t),children:e}),vX=({settings:e,onUpdateSettings:t,defaultShortUrlsListOrdering:n})=>{const r=T.useCallback(d=>t?.(Sf(e,d)),[e,t]),i=T.useCallback(d=>r({realTimeUpdates:{enabled:d}}),[r]),a=T.useCallback(d=>r({realTimeUpdates:{interval:d}}),[r]),s=T.useCallback((d,f)=>r({[d]:f}),[r]),u=T.useCallback(d=>s("qrCodes",d),[s]);return v.jsxs(dL,{value:e,children:[v.jsxs(rl,{className:"mb-4 sticky top-(--header-height) z-2",children:[v.jsx(rl.Pill,{to:"../general",children:"General"}),v.jsx(rl.Pill,{to:"../short-urls",children:"Short URLs"}),v.jsx(rl.Pill,{to:"../visits",children:"Visits"}),v.jsx(rl.Pill,{to:"../tags",children:"Tags"}),v.jsx(rl.Pill,{to:"../qr-codes",children:"QR codes"})]}),v.jsxs(Nv,{children:[v.jsx(gt,{path:"general",element:v.jsxs(Ud,{children:[v.jsx(dX,{onChange:d=>s("ui",d)}),v.jsx(aX,{toggleRealTimeUpdates:i,onIntervalChange:a})]})}),v.jsx(gt,{path:"short-urls",element:v.jsxs(Ud,{children:[v.jsx(sX,{onChange:d=>s("shortUrlCreation",d)}),v.jsx(uX,{defaultOrdering:n,onChange:d=>s("shortUrlsList",d)})]})}),v.jsx(gt,{path:"visits",element:v.jsxs(Ud,{children:[v.jsx(gX,{onChange:d=>s("visits",d)}),v.jsx(hX,{onChange:d=>s("visitsList",d)})]})}),v.jsx(gt,{path:"tags",element:v.jsx(Ud,{children:v.jsx(fX,{onChange:d=>s("tags",d)})})}),v.jsx(gt,{path:"qr-codes",element:v.jsxs(Ud,{children:[v.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[v.jsx(iX,{onChange:u,className:"w-full"}),v.jsx(tX,{onChange:u,className:"w-full"})]}),v.jsx(rX,{onChange:u})]})}),v.jsx(gt,{path:"*",element:v.jsx(V2,{replace:!0,to:"../general"})})]})]})},Cf={size:300,margin:0,color:"#000000",bgColor:"#ffffff",errorCorrection:"L",format:"png"};Object.freeze(Cf);const iy={potentialBot:!0,date:!0,country:!0,region:!1,city:!0,browser:!0,os:!0,userAgent:!1,referer:!0,visitedUrl:!0};Object.freeze(iy);const cL={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},visits:{defaultInterval:"last30Days"},visitsList:{columns:iy},shortUrlsList:{defaultOrdering:{field:"dateCreated",dir:"DESC"}},qrCodes:Cf},fL=T.createContext(cL),{Provider:dL}=fL,Lw=()=>T.useContext(fL)??cL;function Dn(e,t){return Lw()[e]??t}var th={exports:{}};/** @license
* eventsource.js
* Available under MIT License (MIT)
* https://github.com/Yaffle/EventSource/
*/var yX=th.exports,rO;function bX(){return rO||(rO=1,function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,a=n.XMLHttpRequest,s=n.XDomainRequest,u=n.ActiveXObject,d=n.EventSource,f=n.document,m=n.Promise,p=n.fetch,b=n.Response,_=n.TextDecoder,w=n.TextEncoder,x=n.AbortController;if(typeof window<"u"&&typeof f<"u"&&!("readyState"in f)&&f.body==null&&(f.readyState="loading",window.addEventListener("load",function(de){f.readyState="complete"},!1)),a==null&&u!=null&&(a=function(){return new u("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(de){function _e(){}return _e.prototype=de,new _e}),Date.now||(Date.now=function(){return new Date().getTime()}),x==null){var E=p;p=function(de,_e){var Te=_e.signal;return E(de,{headers:_e.headers,credentials:_e.credentials,cache:_e.cache}).then(function(Le){var qe=Le.body.getReader();return Te._reader=qe,Te._aborted&&Te._reader.cancel(),{status:Le.status,statusText:Le.statusText,headers:Le.headers,body:{getReader:function(){return qe}}}})},x=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function A(){this.bitsNeeded=0,this.codePoint=0}A.prototype.decode=function(de){function _e(De,Re,Ae){if(Ae===1)return De>=128>>Re&&De<<Re<=2047;if(Ae===2)return De>=2048>>Re&&De<<Re<=55295||De>=57344>>Re&&De<<Re<=65535;if(Ae===3)return De>=65536>>Re&&De<<Re<=1114111;throw new Error}function Te(De,Re){if(De===6*1)return Re>>6>15?3:Re>31?2:1;if(De===6*2)return Re>15?3:2;if(De===6*3)return 3;throw new Error}for(var Le=65533,qe="",Be=this.bitsNeeded,He=this.codePoint,be=0;be<de.length;be+=1){var we=de[be];Be!==0&&(we<128||we>191||!_e(He<<6|we&63,Be-6,Te(Be,He)))&&(Be=0,He=Le,qe+=String.fromCharCode(He)),Be===0?(we>=0&&we<=127?(Be=0,He=we):we>=192&&we<=223?(Be=6*1,He=we&31):we>=224&&we<=239?(Be=6*2,He=we&15):we>=240&&we<=247?(Be=6*3,He=we&7):(Be=0,He=Le),Be!==0&&!_e(He,Be,Te(Be,He))&&(Be=0,He=Le)):(Be-=6,He=He<<6|we&63),Be===0&&(He<=65535?qe+=String.fromCharCode(He):(qe+=String.fromCharCode(55296+(He-65535-1>>10)),qe+=String.fromCharCode(56320+(He-65535-1&1023))))}return this.bitsNeeded=Be,this.codePoint=He,qe};var j=function(){try{return new _().decode(new w().encode("test"),{stream:!0})==="test"}catch(de){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+de)}return!1};(_==null||w==null||!j())&&(_=A);var O=function(){};function N(de){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=O,this.onload=O,this.onerror=O,this.onreadystatechange=O,this._contentType="",this._xhr=de,this._sendTimeout=0,this._abort=O}N.prototype.open=function(de,_e){this._abort(!0);var Te=this,Le=this._xhr,qe=1,Be=0;this._abort=function(Ae){Te._sendTimeout!==0&&(i(Te._sendTimeout),Te._sendTimeout=0),(qe===1||qe===2||qe===3)&&(qe=4,Le.onload=O,Le.onerror=O,Le.onabort=O,Le.onprogress=O,Le.onreadystatechange=O,Le.abort(),Be!==0&&(i(Be),Be=0),Ae||(Te.readyState=4,Te.onabort(null),Te.onreadystatechange())),qe=0};var He=function(){if(qe===1){var Ae=0,Fe="",Ve=void 0;if("contentType"in Le)Ae=200,Fe="OK",Ve=Le.contentType;else try{Ae=Le.status,Fe=Le.statusText,Ve=Le.getResponseHeader("Content-Type")}catch{Ae=0,Fe="",Ve=void 0}Ae!==0&&(qe=2,Te.readyState=2,Te.status=Ae,Te.statusText=Fe,Te._contentType=Ve,Te.onreadystatechange())}},be=function(){if(He(),qe===2||qe===3){qe=3;var Ae="";try{Ae=Le.responseText}catch{}Te.readyState=3,Te.responseText=Ae,Te.onprogress()}},we=function(Ae,Fe){if((Fe==null||Fe.preventDefault==null)&&(Fe={preventDefault:O}),be(),qe===1||qe===2||qe===3){if(qe=4,Be!==0&&(i(Be),Be=0),Te.readyState=4,Ae==="load")Te.onload(Fe);else if(Ae==="error")Te.onerror(Fe);else if(Ae==="abort")Te.onabort(Fe);else throw new TypeError;Te.onreadystatechange()}},De=function(Ae){Le!=null&&(Le.readyState===4?(!("onload"in Le)||!("onerror"in Le)||!("onabort"in Le))&&we(Le.responseText===""?"error":"load",Ae):Le.readyState===3?"onprogress"in Le||be():Le.readyState===2&&He())},Re=function(){Be=r(function(){Re()},500),Le.readyState===3&&be()};"onload"in Le&&(Le.onload=function(Ae){we("load",Ae)}),"onerror"in Le&&(Le.onerror=function(Ae){we("error",Ae)}),"onabort"in Le&&(Le.onabort=function(Ae){we("abort",Ae)}),"onprogress"in Le&&(Le.onprogress=be),"onreadystatechange"in Le&&(Le.onreadystatechange=function(Ae){De(Ae)}),("contentType"in Le||!("ontimeout"in a.prototype))&&(_e+=(_e.indexOf("?")===-1?"?":"&")+"padding=true"),Le.open(de,_e,!0),"readyState"in Le&&(Be=r(function(){Re()},0))},N.prototype.abort=function(){this._abort(!1)},N.prototype.getResponseHeader=function(de){return this._contentType},N.prototype.setRequestHeader=function(de,_e){var Te=this._xhr;"setRequestHeader"in Te&&Te.setRequestHeader(de,_e)},N.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},N.prototype.send=function(){if((!("ontimeout"in a.prototype)||!("sendAsBinary"in a.prototype)&&!("mozAnon"in a.prototype))&&f!=null&&f.readyState!=null&&f.readyState!=="complete"){var de=this;de._sendTimeout=r(function(){de._sendTimeout=0,de.send()},4);return}var _e=this._xhr;"withCredentials"in _e&&(_e.withCredentials=this.withCredentials);try{_e.send(void 0)}catch(Te){throw Te}};function U(de){return de.replace(/[A-Z]/g,function(_e){return String.fromCharCode(_e.charCodeAt(0)+32)})}function V(de){for(var _e=Object.create(null),Te=de.split(`\r
`),Le=0;Le<Te.length;Le+=1){var qe=Te[Le],Be=qe.split(": "),He=Be.shift(),be=Be.join(": ");_e[U(He)]=be}this._map=_e}V.prototype.get=function(de){return this._map[U(de)]},a!=null&&a.HEADERS_RECEIVED==null&&(a.HEADERS_RECEIVED=2);function Z(){}Z.prototype.open=function(de,_e,Te,Le,qe,Be,He){de.open("GET",qe);var be=0;de.onprogress=function(){var De=de.responseText,Re=De.slice(be);be+=Re.length,Te(Re)},de.onerror=function(De){De.preventDefault(),Le(new Error("NetworkError"))},de.onload=function(){Le(null)},de.onabort=function(){Le(null)},de.onreadystatechange=function(){if(de.readyState===a.HEADERS_RECEIVED){var De=de.status,Re=de.statusText,Ae=de.getResponseHeader("Content-Type"),Fe=de.getAllResponseHeaders();_e(De,Re,Ae,new V(Fe))}},de.withCredentials=Be;for(var we in He)Object.prototype.hasOwnProperty.call(He,we)&&de.setRequestHeader(we,He[we]);return de.send(),de};function X(de){this._headers=de}X.prototype.get=function(de){return this._headers.get(de)};function oe(){}oe.prototype.open=function(de,_e,Te,Le,qe,Be,He){var be=null,we=new x,De=we.signal,Re=new _;return p(qe,{headers:He,credentials:Be?"include":"same-origin",signal:De,cache:"no-store"}).then(function(Ae){return be=Ae.body.getReader(),_e(Ae.status,Ae.statusText,Ae.headers.get("Content-Type"),new X(Ae.headers)),new m(function(Fe,Ve){var Ze=function(){be.read().then(function(ut){if(ut.done)Fe(void 0);else{var at=Re.decode(ut.value,{stream:!0});Te(at),Ze()}}).catch(function(ut){Ve(ut)})};Ze()})}).catch(function(Ae){if(Ae.name!=="AbortError")return Ae}).then(function(Ae){Le(Ae)}),{abort:function(){be?.cancel(),we.abort()}}};function ee(){this._listeners=Object.create(null)}function J(de){r(function(){throw de},0)}ee.prototype.dispatchEvent=function(de){de.target=this;var _e=this._listeners[de.type];if(_e!=null)for(var Te=_e.length,Le=0;Le<Te;Le+=1){var qe=_e[Le];try{typeof qe.handleEvent=="function"?qe.handleEvent(de):qe.call(this,de)}catch(Be){J(Be)}}},ee.prototype.addEventListener=function(de,_e){de=String(de);var Te=this._listeners,Le=Te[de];Le==null&&(Le=[],Te[de]=Le);for(var qe=!1,Be=0;Be<Le.length;Be+=1)Le[Be]===_e&&(qe=!0);qe||Le.push(_e)},ee.prototype.removeEventListener=function(de,_e){de=String(de);var Te=this._listeners,Le=Te[de];if(Le!=null){for(var qe=[],Be=0;Be<Le.length;Be+=1)Le[Be]!==_e&&qe.push(Le[Be]);qe.length===0?delete Te[de]:Te[de]=qe}};function ne(de){this.type=de,this.target=void 0}function he(de,_e){ne.call(this,de),this.data=_e.data,this.lastEventId=_e.lastEventId}he.prototype=Object.create(ne.prototype);function Q(de,_e){ne.call(this,de),this.status=_e.status,this.statusText=_e.statusText,this.headers=_e.headers}Q.prototype=Object.create(ne.prototype);function se(de,_e){ne.call(this,de),this.error=_e.error}se.prototype=Object.create(ne.prototype);var W=-1,B=0,I=1,z=2,M=-1,D=0,Y=1,q=2,re=3,ue=/^text\/event\-stream(;.*)?$/i,ce=1e3,ve=18e6,k=function(de,_e){var Te=de==null?_e:parseInt(de,10);return Te!==Te&&(Te=_e),F(Te)},F=function(de){return Math.min(Math.max(de,ce),ve)},G=function(de,_e,Te){try{typeof _e=="function"&&_e.call(de,Te)}catch(Le){J(Le)}};function le(de,_e){ee.call(this),_e=_e||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,fe(this,de,_e)}function H(){return a!=null&&"withCredentials"in a.prototype||s==null?new a:new s}var ae=p!=null&&b!=null&&"body"in b.prototype;function fe(de,_e,Te){_e=String(_e);var Le=!!Te.withCredentials,qe=Te.lastEventIdQueryParameterName||"lastEventId",Be=F(1e3),He=k(Te.heartbeatTimeout,45e3),be="",we=Be,De=!1,Re=0,Ae=Te.headers||{},Fe=Te.Transport,Ve=ae&&Fe==null?void 0:new N(Fe!=null?new Fe:H()),Ze=Fe!=null&&typeof Fe!="string"?new Fe:Ve==null?new oe:new Z,ut=void 0,at=0,pt=W,Lt="",Dt="",kt="",wr="",$n=D,os=0,ni=0,ss=function(hn,on,Qn,Vn){if(pt===B)if(hn===200&&Qn!=null&&ue.test(Qn)){pt=I,De=Date.now(),we=Be,de.readyState=I;var Xt=new Q("open",{status:hn,statusText:on,headers:Vn});de.dispatchEvent(Xt),G(de,de.onopen,Xt)}else{var At="";hn!==200?(on&&(on=on.replace(/\s+/g," ")),At="EventSource's response has a status "+hn+" "+on+" that is not 200. Aborting the connection."):At="EventSource's response has a Content-Type specifying an unsupported type: "+(Qn==null?"-":Qn.replace(/\s+/g," "))+". Aborting the connection.",ls();var Xt=new Q("error",{status:hn,statusText:on,headers:Vn});de.dispatchEvent(Xt),G(de,de.onerror,Xt),console.error(At)}},Oa=function(hn){if(pt===I){for(var on=-1,Qn=0;Qn<hn.length;Qn+=1){var Vn=hn.charCodeAt(Qn);(Vn===10||Vn===13)&&(on=Qn)}var Xt=(on!==-1?wr:"")+hn.slice(0,on+1);wr=(on===-1?wr:"")+hn.slice(on+1),hn!==""&&(De=Date.now(),Re+=hn.length);for(var At=0;At<Xt.length;At+=1){var Vn=Xt.charCodeAt(At);if($n===M&&Vn===10)$n=D;else if($n===M&&($n=D),Vn===13||Vn===10){if($n!==D){$n===Y&&(ni=At+1);var Qt=Xt.slice(os,ni-1),Jn=Xt.slice(ni+(ni<At&&Xt.charCodeAt(ni)===32?1:0),At);Qt==="data"?(Lt+=`
`,Lt+=Jn):Qt==="id"?Dt=Jn:Qt==="event"?kt=Jn:Qt==="retry"?(Be=k(Jn,Be),we=Be):Qt==="heartbeatTimeout"&&(He=k(Jn,He),at!==0&&(i(at),at=r(function(){ja()},He)))}if($n===D){if(Lt!==""){be=Dt,kt===""&&(kt="message");var Rn=new he(kt,{data:Lt.slice(1),lastEventId:Dt});if(de.dispatchEvent(Rn),kt==="open"?G(de,de.onopen,Rn):kt==="message"?G(de,de.onmessage,Rn):kt==="error"&&G(de,de.onerror,Rn),pt===z)return}Lt="",kt=""}$n=Vn===13?M:D}else $n===D&&(os=At,$n=Y),$n===Y?Vn===58&&(ni=At+1,$n=q):$n===q&&($n=re)}}},qu=function(hn){if(pt===I||pt===B){pt=W,at!==0&&(i(at),at=0),at=r(function(){ja()},we),we=F(Math.min(Be*16,we*2)),de.readyState=B;var on=new se("error",{error:hn});de.dispatchEvent(on),G(de,de.onerror,on),hn!=null&&console.error(hn)}},ls=function(){pt=z,ut!=null&&(ut.abort(),ut=void 0),at!==0&&(i(at),at=0),de.readyState=z},ja=function(){if(at=0,pt!==W){if(!De&&ut!=null)qu(new Error("No activity within "+He+" milliseconds. "+(pt===B?"No response received.":Re+" chars received.")+" Reconnecting.")),ut!=null&&(ut.abort(),ut=void 0);else{var hn=Math.max((De||Date.now())+He-Date.now(),1);De=!1,at=r(function(){ja()},hn)}return}De=!1,Re=0,at=r(function(){ja()},He),pt=B,Lt="",kt="",Dt=be,wr="",os=0,ni=0,$n=D;var on=_e;if(_e.slice(0,5)!=="data:"&&_e.slice(0,5)!=="blob:"&&be!==""){var Qn=_e.indexOf("?");on=Qn===-1?_e:_e.slice(0,Qn+1)+_e.slice(Qn+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Jn,Rn){return Rn===qe?"":Jn}),on+=(_e.indexOf("?")===-1?"?":"&")+qe+"="+encodeURIComponent(be)}var Vn=de.withCredentials,Xt={};Xt.Accept="text/event-stream";var At=de.headers;if(At!=null)for(var Qt in At)Object.prototype.hasOwnProperty.call(At,Qt)&&(Xt[Qt]=At[Qt]);try{ut=Ze.open(Ve,ss,Oa,qu,on,Vn,Xt)}catch(Jn){throw ls(),Jn}};de.url=_e,de.readyState=B,de.withCredentials=Le,de.headers=Ae,de._close=ls,ja()}le.prototype=Object.create(ee.prototype),le.prototype.CONNECTING=B,le.prototype.OPEN=I,le.prototype.CLOSED=z,le.prototype.close=function(){this._close()},le.CONNECTING=B,le.OPEN=I,le.CLOSED=z,le.prototype.withCredentials=void 0;var ge=d;a!=null&&(d==null||!("withCredentials"in d.prototype))&&(ge=le),function(de){{var _e=de(t);_e!==void 0&&(e.exports=_e)}}(function(de){de.EventSourcePolyfill=le,de.NativeEventSource=d,de.EventSource=ge})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:yX:globalThis)}(th,th.exports)),th.exports}var _X=bX();const Dw=6048e5,xX=864e5,hL=6e4,kw=36e5,zp=43200,iO=1440,aO=Symbol.for("constructDateFrom");function br(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&aO in e?e[aO](t):e instanceof Date?new e.constructor(t):new Date(t)}function Et(e,t){return br(t||e,e)}function Iw(e,t,n){const r=Et(e,n?.in);return isNaN(t)?br(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function wX(e,t,n){const r=Et(e,n?.in);if(isNaN(t))return br(e,NaN);if(!t)return r;const i=r.getDate(),a=br(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const s=a.getDate();return i>=s?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function SX(e,t,n){const{years:r=0,months:i=0,weeks:a=0,days:s=0,hours:u=0,minutes:d=0,seconds:f=0}=t,m=Et(e,n?.in),p=i||r?wX(m,i+r*12):m,b=s||a?Iw(p,s+a*7):p,_=d+u*60,x=(f+_*60)*1e3;return br(e,+b+x)}let CX={};function qh(){return CX}function Nu(e,t){const n=qh(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Et(e,t?.in),a=i.getDay(),s=(a<r?7:0)+a-r;return i.setDate(i.getDate()-s),i.setHours(0,0,0,0),i}function xh(e,t){return Nu(e,{...t,weekStartsOn:1})}function mL(e,t){const n=Et(e,t?.in),r=n.getFullYear(),i=br(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const a=xh(i),s=br(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const u=xh(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function tf(e){const t=Et(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Bu(e,...t){const n=br.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function Lu(e,t){const n=Et(e,t?.in);return n.setHours(0,0,0,0),n}function ay(e,t,n){const[r,i]=Bu(n?.in,e,t),a=Lu(r),s=Lu(i),u=+a-tf(a),d=+s-tf(s);return Math.round((u-d)/xX)}function EX(e,t){const n=mL(e,t),r=br(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),xh(r)}function pL(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=br.bind(null,i));const a=Et(i,r);(!n||n<a||isNaN(+a))&&(n=a)}),br(r,n||NaN)}function AX(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=br.bind(null,i));const a=Et(i,r);(!n||n>a||isNaN(+a))&&(n=a)}),br(r,n||NaN)}function vg(e,t){const n=+Et(e)-+Et(t);return n<0?-1:n>0?1:n}function TX(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function OX(e){return!(!TX(e)&&typeof e!="number"||isNaN(+Et(e)))}function Hg(e,t,n){const[r,i]=Bu(n?.in,e,t),a=r.getFullYear()-i.getFullYear(),s=r.getMonth()-i.getMonth();return a*12+s}function jX(e,t,n){const[r,i]=Bu(n?.in,e,t),a=Nu(r,n),s=Nu(i,n),u=+a-tf(a),d=+s-tf(s);return Math.round((u-d)/Dw)}function gL(e,t,n){const[r,i]=Bu(n?.in,e,t),a=oO(r,i),s=Math.abs(ay(r,i));r.setDate(r.getDate()-a*s);const u=+(oO(r,i)===-a),d=a*(s-u);return d===0?0:d}function oO(e,t){const 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 vL(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function PX(e,t,n){const[r,i]=Bu(n?.in,e,t),a=(+r-+i)/kw;return vL(n?.roundingMethod)(a)}function MX(e,t){return+Et(e)-+Et(t)}function nf(e,t){const n=Et(e,t?.in);return n.setHours(23,59,59,999),n}function RX(e,t){const n=Et(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function NX(e,t){const n=Et(e,t?.in);return+nf(n,t)==+RX(n,t)}function LX(e,t,n){const[r,i,a]=Bu(n?.in,e,e,t),s=vg(i,a),u=Math.abs(Hg(i,a));if(u<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-s*u);let d=vg(i,a)===-s;NX(r)&&u===1&&vg(r,a)===1&&(d=!1);const f=s*(u-+d);return f===0?0:f}function DX(e,t,n){const r=MX(e,t)/1e3;return vL(n?.roundingMethod)(r)}function kX(e,t){const n=Et(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function IX(e,t){const n=t?.weekStartsOn,r=Et(e,t?.in),i=r.getDay(),a=(i<n?-7:0)+6-(i-n);return r.setDate(r.getDate()+a),r.setHours(23,59,59,999),r}function UX(e,t){return IX(e,{...t,weekStartsOn:1})}const BX={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"}},zX=(e,t,n)=>{let r;const i=BX[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function db(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const FX={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},$X={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},VX={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},HX={date:db({formats:FX,defaultWidth:"full"}),time:db({formats:$X,defaultWidth:"full"}),dateTime:db({formats:VX,defaultWidth:"full"})},qX={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},GX=(e,t,n,r)=>qX[e];function Bd(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,u=n?.width?String(n.width):s;i=e.formattingValues[u]||e.formattingValues[s]}else{const s=e.defaultWidth,u=n?.width?String(n.width):e.defaultWidth;i=e.values[u]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const YX={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},WX={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},KX={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"]},ZX={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"]},XX={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"}},QX={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"}},JX=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},eQ={ordinalNumber:JX,era:Bd({values:YX,defaultWidth:"wide"}),quarter:Bd({values:WX,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Bd({values:KX,defaultWidth:"wide"}),day:Bd({values:ZX,defaultWidth:"wide"}),dayPeriod:Bd({values:XX,defaultWidth:"wide",formattingValues:QX,defaultFormattingWidth:"wide"})};function zd(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const s=a[0],u=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(u)?nQ(u,p=>p.test(s)):tQ(u,p=>p.test(s));let f;f=e.valueCallback?e.valueCallback(d):d,f=n.valueCallback?n.valueCallback(f):f;const m=t.slice(s.length);return{value:f,rest:m}}}function tQ(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function nQ(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function rQ(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const u=t.slice(i.length);return{value:s,rest:u}}}const iQ=/^(\d+)(th|st|nd|rd)?/i,aQ=/\d+/i,oQ={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},sQ={any:[/^b/i,/^(a|c)/i]},lQ={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},uQ={any:[/1/i,/2/i,/3/i,/4/i]},cQ={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},fQ={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]},dQ={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},hQ={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]},mQ={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},pQ={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}},gQ={ordinalNumber:rQ({matchPattern:iQ,parsePattern:aQ,valueCallback:e=>parseInt(e,10)}),era:zd({matchPatterns:oQ,defaultMatchWidth:"wide",parsePatterns:sQ,defaultParseWidth:"any"}),quarter:zd({matchPatterns:lQ,defaultMatchWidth:"wide",parsePatterns:uQ,defaultParseWidth:"any",valueCallback:e=>e+1}),month:zd({matchPatterns:cQ,defaultMatchWidth:"wide",parsePatterns:fQ,defaultParseWidth:"any"}),day:zd({matchPatterns:dQ,defaultMatchWidth:"wide",parsePatterns:hQ,defaultParseWidth:"any"}),dayPeriod:zd({matchPatterns:mQ,defaultMatchWidth:"any",parsePatterns:pQ,defaultParseWidth:"any"})},yL={code:"en-US",formatDistance:zX,formatLong:HX,formatRelative:GX,localize:eQ,match:gQ,options:{weekStartsOn:0,firstWeekContainsDate:1}};function vQ(e,t){const n=Et(e,t?.in);return ay(n,kX(n))+1}function yQ(e,t){const n=Et(e,t?.in),r=+xh(n)-+EX(n);return Math.round(r/Dw)+1}function bL(e,t){const n=Et(e,t?.in),r=n.getFullYear(),i=qh(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,s=br(t?.in||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const u=Nu(s,t),d=br(t?.in||e,0);d.setFullYear(r,0,a),d.setHours(0,0,0,0);const f=Nu(d,t);return+n>=+u?r+1:+n>=+f?r:r-1}function bQ(e,t){const n=qh(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=bL(e,t),a=br(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),Nu(a,t)}function _Q(e,t){const n=Et(e,t?.in),r=+Nu(n,t)-+bQ(n,t);return Math.round(r/Dw)+1}function Ct(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Qs={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ct(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ct(n+1,2)},d(e,t){return Ct(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Ct(e.getHours()%12||12,t.length)},H(e,t){return Ct(e.getHours(),t.length)},m(e,t){return Ct(e.getMinutes(),t.length)},s(e,t){return Ct(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Ct(i,t.length)}},Ic={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},sO={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Qs.y(e,t)},Y:function(e,t,n,r){const i=bL(e,r),a=i>0?i:1-i;if(t==="YY"){const s=a%100;return Ct(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):Ct(a,t.length)},R:function(e,t){const n=mL(e);return Ct(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ct(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ct(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ct(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Qs.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ct(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=_Q(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Ct(i,t.length)},I:function(e,t,n){const r=yQ(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ct(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Qs.d(e,t)},D:function(e,t,n){const r=vQ(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ct(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Ct(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Ct(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Ct(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Ic.noon:r===0?i=Ic.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Ic.evening:r>=12?i=Ic.afternoon:r>=4?i=Ic.morning:i=Ic.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Qs.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Qs.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ct(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ct(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Qs.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Qs.s(e,t)},S:function(e,t){return Qs.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return uO(r);case"XXXX":case"XX":return cu(r);case"XXXXX":case"XXX":default:return cu(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return uO(r);case"xxxx":case"xx":return cu(r);case"xxxxx":case"xxx":default:return cu(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+lO(r,":");case"OOOO":default:return"GMT"+cu(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+lO(r,":");case"zzzz":default:return"GMT"+cu(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ct(r,t.length)},T:function(e,t,n){return Ct(+e,t.length)}};function lO(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+Ct(a,2)}function uO(e,t){return e%60===0?(e>0?"-":"+")+Ct(Math.abs(e)/60,2):cu(e,t)}function cu(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Ct(Math.trunc(r/60),2),a=Ct(r%60,2);return n+i+t+a}const cO=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},_L=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},xQ=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return cO(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",cO(r,t)).replace("{{time}}",_L(i,t))},wQ={p:_L,P:xQ},SQ=/^D+$/,CQ=/^Y+$/,EQ=["D","DD","YY","YYYY"];function AQ(e){return SQ.test(e)}function TQ(e){return CQ.test(e)}function OQ(e,t,n){const r=jQ(e,t,n);if(console.warn(r),EQ.includes(e))throw new RangeError(r)}function jQ(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const PQ=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,MQ=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,RQ=/^'([^]*?)'?$/,NQ=/''/g,LQ=/[a-zA-Z]/;function qg(e,t,n){const r=qh(),i=r.locale??yL,a=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,u=Et(e,n?.in);if(!OX(u))throw new RangeError("Invalid time value");let d=t.match(MQ).map(m=>{const p=m[0];if(p==="p"||p==="P"){const b=wQ[p];return b(m,i.formatLong)}return m}).join("").match(PQ).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const p=m[0];if(p==="'")return{isToken:!1,value:DQ(m)};if(sO[p])return{isToken:!0,value:m};if(p.match(LQ))throw new RangeError("Format string contains an unescaped latin alphabet character `"+p+"`");return{isToken:!1,value:m}});i.localize.preprocessor&&(d=i.localize.preprocessor(u,d));const f={firstWeekContainsDate:a,weekStartsOn:s,locale:i};return d.map(m=>{if(!m.isToken)return m.value;const p=m.value;(TQ(p)||AQ(p))&&OQ(p,t,String(e));const b=sO[p[0]];return b(u,p,i.localize,f)}).join("")}function DQ(e){const t=e.match(RQ);return t?t[1].replace(NQ,"'"):e}function kQ(e,t,n){const r=qh(),i=n?.locale??r.locale??yL,a=2520,s=vg(e,t);if(isNaN(s))throw new RangeError("Invalid time value");const u=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:s}),[d,f]=Bu(n?.in,...s>0?[t,e]:[e,t]),m=DX(f,d),p=(tf(f)-tf(d))/1e3,b=Math.round((m-p)/60);let _;if(b<2)return b===0?i.formatDistance("lessThanXMinutes",1,u):i.formatDistance("xMinutes",b,u);if(b<45)return i.formatDistance("xMinutes",b,u);if(b<90)return i.formatDistance("aboutXHours",1,u);if(b<iO){const w=Math.round(b/60);return i.formatDistance("aboutXHours",w,u)}else{if(b<a)return i.formatDistance("xDays",1,u);if(b<zp){const w=Math.round(b/iO);return i.formatDistance("xDays",w,u)}else if(b<zp*2)return _=Math.round(b/zp),i.formatDistance("aboutXMonths",_,u)}if(_=LX(f,d),_<12){const w=Math.round(b/zp);return i.formatDistance("xMonths",w,u)}else{const w=_%12,x=Math.trunc(_/12);return w<3?i.formatDistance("aboutXYears",x,u):w<9?i.formatDistance("overXYears",x,u):i.formatDistance("almostXYears",x+1,u)}}function IQ(e,t){const n=Et(e,t?.in);if(isNaN(+n))throw new RangeError("Invalid time value");let r="",i="";const a="-",s=":";{const u=Ct(n.getDate(),2),d=Ct(n.getMonth()+1,2);r=`${Ct(n.getFullYear(),4)}${a}${d}${a}${u}`}{const u=n.getTimezoneOffset();if(u!==0){const _=Math.abs(u),w=Ct(Math.trunc(_/60),2),x=Ct(_%60,2);i=`${u<0?"+":"-"}${w}:${x}`}else i="Z";const d=Ct(n.getHours(),2),f=Ct(n.getMinutes(),2),m=Ct(n.getSeconds(),2),p=r===""?"":"T",b=[d,f,m].join(s);r=`${r}${p}${b}${i}`}return r}function UQ(e){return Math.trunc(+Et(e)/1e3)}function BQ(e,t){return+Et(e)>+Et(t)}function Gg(e,t){return+Et(e)<+Et(t)}function Bx(e,t){return+Et(e)==+Et(t)}function zQ(e,t,n){const r=+Et(e,n?.in),[i,a]=[+Et(t.start,n?.in),+Et(t.end,n?.in)].sort((s,u)=>s-u);return r>=i&&r<=a}function Yg(e,t,n){return Iw(e,-t,n)}function yl(e,t){const n=()=>br(t?.in,NaN),i=HQ(e);let a;if(i.date){const f=qQ(i.date,2);a=GQ(f.restDateString,f.year)}if(!a||isNaN(+a))return n();const s=+a;let u=0,d;if(i.time&&(u=YQ(i.time),isNaN(u)))return n();if(i.timezone){if(d=WQ(i.timezone),isNaN(d))return n()}else{const f=new Date(s+u),m=Et(0,t?.in);return m.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),m.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),m}return Et(s+u+d,t?.in)}const Fp={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},FQ=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,$Q=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,VQ=/^([+-])(\d{2})(?::?(\d{2}))?$/;function HQ(e){const t={},n=e.split(Fp.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Fp.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Fp.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const i=Fp.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function qQ(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((r[1]||r[2]).length)}}function GQ(e,t){if(t===null)return new Date(NaN);const n=e.match(FQ);if(!n)return new Date(NaN);const r=!!n[4],i=Fd(n[1]),a=Fd(n[2])-1,s=Fd(n[3]),u=Fd(n[4]),d=Fd(n[5])-1;if(r)return JQ(t,u,d)?KQ(t,u,d):new Date(NaN);{const f=new Date(0);return!XQ(t,a,s)||!QQ(t,i)?new Date(NaN):(f.setUTCFullYear(t,a,Math.max(i,s)),f)}}function Fd(e){return e?parseInt(e):1}function YQ(e){const t=e.match($Q);if(!t)return NaN;const n=hb(t[1]),r=hb(t[2]),i=hb(t[3]);return eJ(n,r,i)?n*kw+r*hL+i*1e3:NaN}function hb(e){return e&&parseFloat(e.replace(",","."))||0}function WQ(e){if(e==="Z")return 0;const t=e.match(VQ);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return tJ(r,i)?n*(r*kw+i*hL):NaN}function KQ(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const i=r.getUTCDay()||7,a=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}const ZQ=[31,null,31,30,31,30,31,31,30,31,30,31];function xL(e){return e%400===0||e%4===0&&e%100!==0}function XQ(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(ZQ[t]||(xL(e)?29:28))}function QQ(e,t){return t>=1&&t<=(xL(e)?366:365)}function JQ(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function eJ(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function tJ(e,t){return t>=0&&t<=59}var yg={exports:{}},nJ=yg.exports,fO;function rJ(){return fO||(fO=1,function(e,t){(function(n,r){e.exports=r()})(nJ,()=>(()=>{var n={873:(s,u)=>{var d,f,m=function(){var p=function(Q,se){var W=Q,B=A[se],I=null,z=0,M=null,D=[],Y={},q=function(H,ae){I=function(fe){for(var ge=new Array(fe),de=0;de<fe;de+=1){ge[de]=new Array(fe);for(var _e=0;_e<fe;_e+=1)ge[de][_e]=null}return ge}(z=4*W+17),re(0,0),re(z-7,0),re(0,z-7),ce(),ue(),k(H,ae),W>=7&&ve(H),M==null&&(M=G(W,B,D)),F(M,ae)},re=function(H,ae){for(var fe=-1;fe<=7;fe+=1)if(!(H+fe<=-1||z<=H+fe))for(var ge=-1;ge<=7;ge+=1)ae+ge<=-1||z<=ae+ge||(I[H+fe][ae+ge]=0<=fe&&fe<=6&&(ge==0||ge==6)||0<=ge&&ge<=6&&(fe==0||fe==6)||2<=fe&&fe<=4&&2<=ge&&ge<=4)},ue=function(){for(var H=8;H<z-8;H+=1)I[H][6]==null&&(I[H][6]=H%2==0);for(var ae=8;ae<z-8;ae+=1)I[6][ae]==null&&(I[6][ae]=ae%2==0)},ce=function(){for(var H=j.getPatternPosition(W),ae=0;ae<H.length;ae+=1)for(var fe=0;fe<H.length;fe+=1){var ge=H[ae],de=H[fe];if(I[ge][de]==null)for(var _e=-2;_e<=2;_e+=1)for(var Te=-2;Te<=2;Te+=1)I[ge+_e][de+Te]=_e==-2||_e==2||Te==-2||Te==2||_e==0&&Te==0}},ve=function(H){for(var ae=j.getBCHTypeNumber(W),fe=0;fe<18;fe+=1){var ge=!H&&(ae>>fe&1)==1;I[Math.floor(fe/3)][fe%3+z-8-3]=ge}for(fe=0;fe<18;fe+=1)ge=!H&&(ae>>fe&1)==1,I[fe%3+z-8-3][Math.floor(fe/3)]=ge},k=function(H,ae){for(var fe=B<<3|ae,ge=j.getBCHTypeInfo(fe),de=0;de<15;de+=1){var _e=!H&&(ge>>de&1)==1;de<6?I[de][8]=_e:de<8?I[de+1][8]=_e:I[z-15+de][8]=_e}for(de=0;de<15;de+=1)_e=!H&&(ge>>de&1)==1,de<8?I[8][z-de-1]=_e:de<9?I[8][15-de-1+1]=_e:I[8][15-de-1]=_e;I[z-8][8]=!H},F=function(H,ae){for(var fe=-1,ge=z-1,de=7,_e=0,Te=j.getMaskFunction(ae),Le=z-1;Le>0;Le-=2)for(Le==6&&(Le-=1);;){for(var qe=0;qe<2;qe+=1)if(I[ge][Le-qe]==null){var Be=!1;_e<H.length&&(Be=(H[_e]>>>de&1)==1),Te(ge,Le-qe)&&(Be=!Be),I[ge][Le-qe]=Be,(de-=1)==-1&&(_e+=1,de=7)}if((ge+=fe)<0||z<=ge){ge-=fe,fe=-fe;break}}},G=function(H,ae,fe){for(var ge=U.getRSBlocks(H,ae),de=V(),_e=0;_e<fe.length;_e+=1){var Te=fe[_e];de.put(Te.getMode(),4),de.put(Te.getLength(),j.getLengthInBits(Te.getMode(),H)),Te.write(de)}var Le=0;for(_e=0;_e<ge.length;_e+=1)Le+=ge[_e].dataCount;if(de.getLengthInBits()>8*Le)throw"code length overflow. ("+de.getLengthInBits()+">"+8*Le+")";for(de.getLengthInBits()+4<=8*Le&&de.put(0,4);de.getLengthInBits()%8!=0;)de.putBit(!1);for(;!(de.getLengthInBits()>=8*Le||(de.put(236,8),de.getLengthInBits()>=8*Le));)de.put(17,8);return function(qe,Be){for(var He=0,be=0,we=0,De=new Array(Be.length),Re=new Array(Be.length),Ae=0;Ae<Be.length;Ae+=1){var Fe=Be[Ae].dataCount,Ve=Be[Ae].totalCount-Fe;be=Math.max(be,Fe),we=Math.max(we,Ve),De[Ae]=new Array(Fe);for(var Ze=0;Ze<De[Ae].length;Ze+=1)De[Ae][Ze]=255&qe.getBuffer()[Ze+He];He+=Fe;var ut=j.getErrorCorrectPolynomial(Ve),at=N(De[Ae],ut.getLength()-1).mod(ut);for(Re[Ae]=new Array(ut.getLength()-1),Ze=0;Ze<Re[Ae].length;Ze+=1){var pt=Ze+at.getLength()-Re[Ae].length;Re[Ae][Ze]=pt>=0?at.getAt(pt):0}}var Lt=0;for(Ze=0;Ze<Be.length;Ze+=1)Lt+=Be[Ze].totalCount;var Dt=new Array(Lt),kt=0;for(Ze=0;Ze<be;Ze+=1)for(Ae=0;Ae<Be.length;Ae+=1)Ze<De[Ae].length&&(Dt[kt]=De[Ae][Ze],kt+=1);for(Ze=0;Ze<we;Ze+=1)for(Ae=0;Ae<Be.length;Ae+=1)Ze<Re[Ae].length&&(Dt[kt]=Re[Ae][Ze],kt+=1);return Dt}(de,ge)};Y.addData=function(H,ae){var fe=null;switch(ae=ae||"Byte"){case"Numeric":fe=Z(H);break;case"Alphanumeric":fe=X(H);break;case"Byte":fe=oe(H);break;case"Kanji":fe=ee(H);break;default:throw"mode:"+ae}D.push(fe),M=null},Y.isDark=function(H,ae){if(H<0||z<=H||ae<0||z<=ae)throw H+","+ae;return I[H][ae]},Y.getModuleCount=function(){return z},Y.make=function(){if(W<1){for(var H=1;H<40;H++){for(var ae=U.getRSBlocks(H,B),fe=V(),ge=0;ge<D.length;ge++){var de=D[ge];fe.put(de.getMode(),4),fe.put(de.getLength(),j.getLengthInBits(de.getMode(),H)),de.write(fe)}var _e=0;for(ge=0;ge<ae.length;ge++)_e+=ae[ge].dataCount;if(fe.getLengthInBits()<=8*_e)break}W=H}q(!1,function(){for(var Te=0,Le=0,qe=0;qe<8;qe+=1){q(!0,qe);var Be=j.getLostPoint(Y);(qe==0||Te>Be)&&(Te=Be,Le=qe)}return Le}())},Y.createTableTag=function(H,ae){H=H||2;var fe="";fe+='<table style="',fe+=" border-width: 0px; border-style: none;",fe+=" border-collapse: collapse;",fe+=" padding: 0px; margin: "+(ae=ae===void 0?4*H:ae)+"px;",fe+='">',fe+="<tbody>";for(var ge=0;ge<Y.getModuleCount();ge+=1){fe+="<tr>";for(var de=0;de<Y.getModuleCount();de+=1)fe+='<td style="',fe+=" border-width: 0px; border-style: none;",fe+=" border-collapse: collapse;",fe+=" padding: 0px; margin: 0px;",fe+=" width: "+H+"px;",fe+=" height: "+H+"px;",fe+=" background-color: ",fe+=Y.isDark(ge,de)?"#000000":"#ffffff",fe+=";",fe+='"/>';fe+="</tr>"}return(fe+="</tbody>")+"</table>"},Y.createSvgTag=function(H,ae,fe,ge){var de={};typeof arguments[0]=="object"&&(H=(de=arguments[0]).cellSize,ae=de.margin,fe=de.alt,ge=de.title),H=H||2,ae=ae===void 0?4*H:ae,(fe=typeof fe=="string"?{text:fe}:fe||{}).text=fe.text||null,fe.id=fe.text?fe.id||"qrcode-description":null,(ge=typeof ge=="string"?{text:ge}:ge||{}).text=ge.text||null,ge.id=ge.text?ge.id||"qrcode-title":null;var _e,Te,Le,qe,Be=Y.getModuleCount()*H+2*ae,He="";for(qe="l"+H+",0 0,"+H+" -"+H+",0 0,-"+H+"z ",He+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',He+=de.scalable?"":' width="'+Be+'px" height="'+Be+'px"',He+=' viewBox="0 0 '+Be+" "+Be+'" ',He+=' preserveAspectRatio="xMinYMin meet"',He+=ge.text||fe.text?' role="img" aria-labelledby="'+le([ge.id,fe.id].join(" ").trim())+'"':"",He+=">",He+=ge.text?'<title id="'+le(ge.id)+'">'+le(ge.text)+"</title>":"",He+=fe.text?'<description id="'+le(fe.id)+'">'+le(fe.text)+"</description>":"",He+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',He+='<path d="',Te=0;Te<Y.getModuleCount();Te+=1)for(Le=Te*H+ae,_e=0;_e<Y.getModuleCount();_e+=1)Y.isDark(Te,_e)&&(He+="M"+(_e*H+ae)+","+Le+qe);return(He+='" stroke="transparent" fill="black"/>')+"</svg>"},Y.createDataURL=function(H,ae){H=H||2,ae=ae===void 0?4*H:ae;var fe=Y.getModuleCount()*H+2*ae,ge=ae,de=fe-ae;return he(fe,fe,function(_e,Te){if(ge<=_e&&_e<de&&ge<=Te&&Te<de){var Le=Math.floor((_e-ge)/H),qe=Math.floor((Te-ge)/H);return Y.isDark(qe,Le)?0:1}return 1})},Y.createImgTag=function(H,ae,fe){H=H||2,ae=ae===void 0?4*H:ae;var ge=Y.getModuleCount()*H+2*ae,de="";return de+="<img",de+=' src="',de+=Y.createDataURL(H,ae),de+='"',de+=' width="',de+=ge,de+='"',de+=' height="',de+=ge,de+='"',fe&&(de+=' alt="',de+=le(fe),de+='"'),de+"/>"};var le=function(H){for(var ae="",fe=0;fe<H.length;fe+=1){var ge=H.charAt(fe);switch(ge){case"<":ae+="&lt;";break;case">":ae+="&gt;";break;case"&":ae+="&amp;";break;case'"':ae+="&quot;";break;default:ae+=ge}}return ae};return Y.createASCII=function(H,ae){if((H=H||1)<2)return function(De){De=De===void 0?2:De;var Re,Ae,Fe,Ve,Ze,ut=1*Y.getModuleCount()+2*De,at=De,pt=ut-De,Lt={"██":"█","█ ":"▀"," █":"▄"," ":" "},Dt={"██":"▀","█ ":"▀"," █":" "," ":" "},kt="";for(Re=0;Re<ut;Re+=2){for(Fe=Math.floor((Re-at)/1),Ve=Math.floor((Re+1-at)/1),Ae=0;Ae<ut;Ae+=1)Ze="█",at<=Ae&&Ae<pt&&at<=Re&&Re<pt&&Y.isDark(Fe,Math.floor((Ae-at)/1))&&(Ze=" "),at<=Ae&&Ae<pt&&at<=Re+1&&Re+1<pt&&Y.isDark(Ve,Math.floor((Ae-at)/1))?Ze+=" ":Ze+="█",kt+=De<1&&Re+1>=pt?Dt[Ze]:Lt[Ze];kt+=`
`}return ut%2&&De>0?kt.substring(0,kt.length-ut-1)+Array(ut+1).join("▀"):kt.substring(0,kt.length-1)}(ae);H-=1,ae=ae===void 0?2*H:ae;var fe,ge,de,_e,Te=Y.getModuleCount()*H+2*ae,Le=ae,qe=Te-ae,Be=Array(H+1).join("██"),He=Array(H+1).join(" "),be="",we="";for(fe=0;fe<Te;fe+=1){for(de=Math.floor((fe-Le)/H),we="",ge=0;ge<Te;ge+=1)_e=1,Le<=ge&&ge<qe&&Le<=fe&&fe<qe&&Y.isDark(de,Math.floor((ge-Le)/H))&&(_e=0),we+=_e?Be:He;for(de=0;de<H;de+=1)be+=we+`
`}return be.substring(0,be.length-1)},Y.renderTo2dContext=function(H,ae){ae=ae||2;for(var fe=Y.getModuleCount(),ge=0;ge<fe;ge++)for(var de=0;de<fe;de++)H.fillStyle=Y.isDark(ge,de)?"black":"white",H.fillRect(ge*ae,de*ae,ae,ae)},Y};p.stringToBytes=(p.stringToBytesFuncs={default:function(Q){for(var se=[],W=0;W<Q.length;W+=1){var B=Q.charCodeAt(W);se.push(255&B)}return se}}).default,p.createStringToBytes=function(Q,se){var W=function(){for(var I=ne(Q),z=function(){var ue=I.read();if(ue==-1)throw"eof";return ue},M=0,D={};;){var Y=I.read();if(Y==-1)break;var q=z(),re=z()<<8|z();D[String.fromCharCode(Y<<8|q)]=re,M+=1}if(M!=se)throw M+" != "+se;return D}(),B=63;return function(I){for(var z=[],M=0;M<I.length;M+=1){var D=I.charCodeAt(M);if(D<128)z.push(D);else{var Y=W[I.charAt(M)];typeof Y=="number"?(255&Y)==Y?z.push(Y):(z.push(Y>>>8),z.push(255&Y)):z.push(B)}}return z}};var b,_,w,x,E,A={L:1,M:0,Q:3,H:2},j=(b=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],_=1335,w=7973,E=function(Q){for(var se=0;Q!=0;)se+=1,Q>>>=1;return se},(x={}).getBCHTypeInfo=function(Q){for(var se=Q<<10;E(se)-E(_)>=0;)se^=_<<E(se)-E(_);return 21522^(Q<<10|se)},x.getBCHTypeNumber=function(Q){for(var se=Q<<12;E(se)-E(w)>=0;)se^=w<<E(se)-E(w);return Q<<12|se},x.getPatternPosition=function(Q){return b[Q-1]},x.getMaskFunction=function(Q){switch(Q){case 0:return function(se,W){return(se+W)%2==0};case 1:return function(se,W){return se%2==0};case 2:return function(se,W){return W%3==0};case 3:return function(se,W){return(se+W)%3==0};case 4:return function(se,W){return(Math.floor(se/2)+Math.floor(W/3))%2==0};case 5:return function(se,W){return se*W%2+se*W%3==0};case 6:return function(se,W){return(se*W%2+se*W%3)%2==0};case 7:return function(se,W){return(se*W%3+(se+W)%2)%2==0};default:throw"bad maskPattern:"+Q}},x.getErrorCorrectPolynomial=function(Q){for(var se=N([1],0),W=0;W<Q;W+=1)se=se.multiply(N([1,O.gexp(W)],0));return se},x.getLengthInBits=function(Q,se){if(1<=se&&se<10)switch(Q){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+Q}else if(se<27)switch(Q){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+Q}else{if(!(se<41))throw"type:"+se;switch(Q){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+Q}}},x.getLostPoint=function(Q){for(var se=Q.getModuleCount(),W=0,B=0;B<se;B+=1)for(var I=0;I<se;I+=1){for(var z=0,M=Q.isDark(B,I),D=-1;D<=1;D+=1)if(!(B+D<0||se<=B+D))for(var Y=-1;Y<=1;Y+=1)I+Y<0||se<=I+Y||D==0&&Y==0||M==Q.isDark(B+D,I+Y)&&(z+=1);z>5&&(W+=3+z-5)}for(B=0;B<se-1;B+=1)for(I=0;I<se-1;I+=1){var q=0;Q.isDark(B,I)&&(q+=1),Q.isDark(B+1,I)&&(q+=1),Q.isDark(B,I+1)&&(q+=1),Q.isDark(B+1,I+1)&&(q+=1),q!=0&&q!=4||(W+=3)}for(B=0;B<se;B+=1)for(I=0;I<se-6;I+=1)Q.isDark(B,I)&&!Q.isDark(B,I+1)&&Q.isDark(B,I+2)&&Q.isDark(B,I+3)&&Q.isDark(B,I+4)&&!Q.isDark(B,I+5)&&Q.isDark(B,I+6)&&(W+=40);for(I=0;I<se;I+=1)for(B=0;B<se-6;B+=1)Q.isDark(B,I)&&!Q.isDark(B+1,I)&&Q.isDark(B+2,I)&&Q.isDark(B+3,I)&&Q.isDark(B+4,I)&&!Q.isDark(B+5,I)&&Q.isDark(B+6,I)&&(W+=40);var re=0;for(I=0;I<se;I+=1)for(B=0;B<se;B+=1)Q.isDark(B,I)&&(re+=1);return W+Math.abs(100*re/se/se-50)/5*10},x),O=function(){for(var Q=new Array(256),se=new Array(256),W=0;W<8;W+=1)Q[W]=1<<W;for(W=8;W<256;W+=1)Q[W]=Q[W-4]^Q[W-5]^Q[W-6]^Q[W-8];for(W=0;W<255;W+=1)se[Q[W]]=W;return{glog:function(B){if(B<1)throw"glog("+B+")";return se[B]},gexp:function(B){for(;B<0;)B+=255;for(;B>=256;)B-=255;return Q[B]}}}();function N(Q,se){if(Q.length===void 0)throw Q.length+"/"+se;var W=function(){for(var I=0;I<Q.length&&Q[I]==0;)I+=1;for(var z=new Array(Q.length-I+se),M=0;M<Q.length-I;M+=1)z[M]=Q[M+I];return z}(),B={getAt:function(I){return W[I]},getLength:function(){return W.length},multiply:function(I){for(var z=new Array(B.getLength()+I.getLength()-1),M=0;M<B.getLength();M+=1)for(var D=0;D<I.getLength();D+=1)z[M+D]^=O.gexp(O.glog(B.getAt(M))+O.glog(I.getAt(D)));return N(z,0)},mod:function(I){if(B.getLength()-I.getLength()<0)return B;for(var z=O.glog(B.getAt(0))-O.glog(I.getAt(0)),M=new Array(B.getLength()),D=0;D<B.getLength();D+=1)M[D]=B.getAt(D);for(D=0;D<I.getLength();D+=1)M[D]^=O.gexp(O.glog(I.getAt(D))+z);return N(M,0).mod(I)}};return B}var U=function(){var Q=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],se=function(B,I){var z={};return z.totalCount=B,z.dataCount=I,z},W={getRSBlocks:function(B,I){var z=function(ve,k){switch(k){case A.L:return Q[4*(ve-1)+0];case A.M:return Q[4*(ve-1)+1];case A.Q:return Q[4*(ve-1)+2];case A.H:return Q[4*(ve-1)+3];default:return}}(B,I);if(z===void 0)throw"bad rs block @ typeNumber:"+B+"/errorCorrectionLevel:"+I;for(var M=z.length/3,D=[],Y=0;Y<M;Y+=1)for(var q=z[3*Y+0],re=z[3*Y+1],ue=z[3*Y+2],ce=0;ce<q;ce+=1)D.push(se(re,ue));return D}};return W}(),V=function(){var Q=[],se=0,W={getBuffer:function(){return Q},getAt:function(B){var I=Math.floor(B/8);return(Q[I]>>>7-B%8&1)==1},put:function(B,I){for(var z=0;z<I;z+=1)W.putBit((B>>>I-z-1&1)==1)},getLengthInBits:function(){return se},putBit:function(B){var I=Math.floor(se/8);Q.length<=I&&Q.push(0),B&&(Q[I]|=128>>>se%8),se+=1}};return W},Z=function(Q){var se=Q,W={getMode:function(){return 1},getLength:function(z){return se.length},write:function(z){for(var M=se,D=0;D+2<M.length;)z.put(B(M.substring(D,D+3)),10),D+=3;D<M.length&&(M.length-D==1?z.put(B(M.substring(D,D+1)),4):M.length-D==2&&z.put(B(M.substring(D,D+2)),7))}},B=function(z){for(var M=0,D=0;D<z.length;D+=1)M=10*M+I(z.charAt(D));return M},I=function(z){if("0"<=z&&z<="9")return z.charCodeAt(0)-48;throw"illegal char :"+z};return W},X=function(Q){var se=Q,W={getMode:function(){return 2},getLength:function(I){return se.length},write:function(I){for(var z=se,M=0;M+1<z.length;)I.put(45*B(z.charAt(M))+B(z.charAt(M+1)),11),M+=2;M<z.length&&I.put(B(z.charAt(M)),6)}},B=function(I){if("0"<=I&&I<="9")return I.charCodeAt(0)-48;if("A"<=I&&I<="Z")return I.charCodeAt(0)-65+10;switch(I){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+I}};return W},oe=function(Q){var se=p.stringToBytes(Q);return{getMode:function(){return 4},getLength:function(W){return se.length},write:function(W){for(var B=0;B<se.length;B+=1)W.put(se[B],8)}}},ee=function(Q){var se=p.stringToBytesFuncs.SJIS;if(!se)throw"sjis not supported.";(function(){var I=se("友");if(I.length!=2||(I[0]<<8|I[1])!=38726)throw"sjis not supported."})();var W=se(Q),B={getMode:function(){return 8},getLength:function(I){return~~(W.length/2)},write:function(I){for(var z=W,M=0;M+1<z.length;){var D=(255&z[M])<<8|255&z[M+1];if(33088<=D&&D<=40956)D-=33088;else{if(!(57408<=D&&D<=60351))throw"illegal char at "+(M+1)+"/"+D;D-=49472}D=192*(D>>>8&255)+(255&D),I.put(D,13),M+=2}if(M<z.length)throw"illegal char at "+(M+1)}};return B},J=function(){var Q=[],se={writeByte:function(W){Q.push(255&W)},writeShort:function(W){se.writeByte(W),se.writeByte(W>>>8)},writeBytes:function(W,B,I){B=B||0,I=I||W.length;for(var z=0;z<I;z+=1)se.writeByte(W[z+B])},writeString:function(W){for(var B=0;B<W.length;B+=1)se.writeByte(W.charCodeAt(B))},toByteArray:function(){return Q},toString:function(){var W="";W+="[";for(var B=0;B<Q.length;B+=1)B>0&&(W+=","),W+=Q[B];return W+"]"}};return se},ne=function(Q){var se=Q,W=0,B=0,I=0,z={read:function(){for(;I<8;){if(W>=se.length){if(I==0)return-1;throw"unexpected end of file./"+I}var D=se.charAt(W);if(W+=1,D=="=")return I=0,-1;D.match(/^\s$/)||(B=B<<6|M(D.charCodeAt(0)),I+=6)}var Y=B>>>I-8&255;return I-=8,Y}},M=function(D){if(65<=D&&D<=90)return D-65;if(97<=D&&D<=122)return D-97+26;if(48<=D&&D<=57)return D-48+52;if(D==43)return 62;if(D==47)return 63;throw"c:"+D};return z},he=function(Q,se,W){for(var B=function(re,ue){var ce=re,ve=ue,k=new Array(re*ue),F={setPixel:function(H,ae,fe){k[ae*ce+H]=fe},write:function(H){H.writeString("GIF87a"),H.writeShort(ce),H.writeShort(ve),H.writeByte(128),H.writeByte(0),H.writeByte(0),H.writeByte(0),H.writeByte(0),H.writeByte(0),H.writeByte(255),H.writeByte(255),H.writeByte(255),H.writeString(","),H.writeShort(0),H.writeShort(0),H.writeShort(ce),H.writeShort(ve),H.writeByte(0);var ae=G(2);H.writeByte(2);for(var fe=0;ae.length-fe>255;)H.writeByte(255),H.writeBytes(ae,fe,255),fe+=255;H.writeByte(ae.length-fe),H.writeBytes(ae,fe,ae.length-fe),H.writeByte(0),H.writeString(";")}},G=function(H){for(var ae=1<<H,fe=1+(1<<H),ge=H+1,de=le(),_e=0;_e<ae;_e+=1)de.add(String.fromCharCode(_e));de.add(String.fromCharCode(ae)),de.add(String.fromCharCode(fe));var Te,Le,qe,Be=J(),He=(Te=Be,Le=0,qe=0,{write:function(Re,Ae){if(Re>>>Ae)throw"length over";for(;Le+Ae>=8;)Te.writeByte(255&(Re<<Le|qe)),Ae-=8-Le,Re>>>=8-Le,qe=0,Le=0;qe|=Re<<Le,Le+=Ae},flush:function(){Le>0&&Te.writeByte(qe)}});He.write(ae,ge);var be=0,we=String.fromCharCode(k[be]);for(be+=1;be<k.length;){var De=String.fromCharCode(k[be]);be+=1,de.contains(we+De)?we+=De:(He.write(de.indexOf(we),ge),de.size()<4095&&(de.size()==1<<ge&&(ge+=1),de.add(we+De)),we=De)}return He.write(de.indexOf(we),ge),He.write(fe,ge),He.flush(),Be.toByteArray()},le=function(){var H={},ae=0,fe={add:function(ge){if(fe.contains(ge))throw"dup key:"+ge;H[ge]=ae,ae+=1},size:function(){return ae},indexOf:function(ge){return H[ge]},contains:function(ge){return H[ge]!==void 0}};return fe};return F}(Q,se),I=0;I<se;I+=1)for(var z=0;z<Q;z+=1)B.setPixel(z,I,W(z,I));var M=J();B.write(M);for(var D=function(){var re=0,ue=0,ce=0,ve="",k={},F=function(le){ve+=String.fromCharCode(G(63&le))},G=function(le){if(!(le<0)){if(le<26)return 65+le;if(le<52)return le-26+97;if(le<62)return le-52+48;if(le==62)return 43;if(le==63)return 47}throw"n:"+le};return k.writeByte=function(le){for(re=re<<8|255&le,ue+=8,ce+=1;ue>=6;)F(re>>>ue-6),ue-=6},k.flush=function(){if(ue>0&&(F(re<<6-ue),re=0,ue=0),ce%3!=0)for(var le=3-ce%3,H=0;H<le;H+=1)ve+="="},k.toString=function(){return ve},k}(),Y=M.toByteArray(),q=0;q<Y.length;q+=1)D.writeByte(Y[q]);return D.flush(),"data:image/gif;base64,"+D};return p}();m.stringToBytesFuncs["UTF-8"]=function(p){return function(b){for(var _=[],w=0;w<b.length;w++){var x=b.charCodeAt(w);x<128?_.push(x):x<2048?_.push(192|x>>6,128|63&x):x<55296||x>=57344?_.push(224|x>>12,128|x>>6&63,128|63&x):(w++,x=65536+((1023&x)<<10|1023&b.charCodeAt(w)),_.push(240|x>>18,128|x>>12&63,128|x>>6&63,128|63&x))}return _}(p)},(f=typeof(d=function(){return m})=="function"?d.apply(u,[]):d)===void 0||(s.exports=f)}},r={};function i(s){var u=r[s];if(u!==void 0)return u.exports;var d=r[s]={exports:{}};return n[s](d,d.exports,i),d.exports}i.n=s=>{var u=s&&s.__esModule?()=>s.default:()=>s;return i.d(u,{a:u}),u},i.d=(s,u)=>{for(var d in u)i.o(u,d)&&!i.o(s,d)&&Object.defineProperty(s,d,{enumerable:!0,get:u[d]})},i.o=(s,u)=>Object.prototype.hasOwnProperty.call(s,u);var a={};return(()=>{i.d(a,{default:()=>se});const s=W=>!!W&&typeof W=="object"&&!Array.isArray(W);function u(W,...B){if(!B.length)return W;const I=B.shift();return I!==void 0&&s(W)&&s(I)?(W=Object.assign({},W),Object.keys(I).forEach(z=>{const M=W[z],D=I[z];Array.isArray(M)&&Array.isArray(D)?W[z]=D:s(M)&&s(D)?W[z]=u(Object.assign({},M),D):W[z]=D}),u(W,...B)):W}function d(W,B){const I=document.createElement("a");I.download=B,I.href=W,document.body.appendChild(I),I.click(),document.body.removeChild(I)}const f={L:.07,M:.15,Q:.25,H:.3};class m{constructor({svg:B,type:I,window:z}){this._svg=B,this._type=I,this._window=z}draw(B,I,z,M){let D;switch(this._type){case"dots":D=this._drawDot;break;case"classy":D=this._drawClassy;break;case"classy-rounded":D=this._drawClassyRounded;break;case"rounded":D=this._drawRounded;break;case"extra-rounded":D=this._drawExtraRounded;break;default:D=this._drawSquare}D.call(this,{x:B,y:I,size:z,getNeighbor:M})}_rotateFigure({x:B,y:I,size:z,rotation:M=0,draw:D}){var Y;const q=B+z/2,re=I+z/2;D(),(Y=this._element)===null||Y===void 0||Y.setAttribute("transform",`rotate(${180*M/Math.PI},${q},${re})`)}_basicDot(B){const{size:I,x:z,y:M}=B;this._rotateFigure(Object.assign(Object.assign({},B),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(z+I/2)),this._element.setAttribute("cy",String(M+I/2)),this._element.setAttribute("r",String(I/2))}}))}_basicSquare(B){const{size:I,x:z,y:M}=B;this._rotateFigure(Object.assign(Object.assign({},B),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(z)),this._element.setAttribute("y",String(M)),this._element.setAttribute("width",String(I)),this._element.setAttribute("height",String(I))}}))}_basicSideRounded(B){const{size:I,x:z,y:M}=B;this._rotateFigure(Object.assign(Object.assign({},B),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${z} ${M}v ${I}h `+I/2+`a ${I/2} ${I/2}, 0, 0, 0, 0 ${-I}`)}}))}_basicCornerRounded(B){const{size:I,x:z,y:M}=B;this._rotateFigure(Object.assign(Object.assign({},B),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${z} ${M}v ${I}h ${I}v `+-I/2+`a ${I/2} ${I/2}, 0, 0, 0, ${-I/2} ${-I/2}`)}}))}_basicCornerExtraRounded(B){const{size:I,x:z,y:M}=B;this._rotateFigure(Object.assign(Object.assign({},B),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${z} ${M}v ${I}h ${I}a ${I} ${I}, 0, 0, 0, ${-I} ${-I}`)}}))}_basicCornersRounded(B){const{size:I,x:z,y:M}=B;this._rotateFigure(Object.assign(Object.assign({},B),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${z} ${M}v `+I/2+`a ${I/2} ${I/2}, 0, 0, 0, ${I/2} ${I/2}h `+I/2+"v "+-I/2+`a ${I/2} ${I/2}, 0, 0, 0, ${-I/2} ${-I/2}`)}}))}_drawDot({x:B,y:I,size:z}){this._basicDot({x:B,y:I,size:z,rotation:0})}_drawSquare({x:B,y:I,size:z}){this._basicSquare({x:B,y:I,size:z,rotation:0})}_drawRounded({x:B,y:I,size:z,getNeighbor:M}){const D=M?+M(-1,0):0,Y=M?+M(1,0):0,q=M?+M(0,-1):0,re=M?+M(0,1):0,ue=D+Y+q+re;if(ue!==0)if(ue>2||D&&Y||q&&re)this._basicSquare({x:B,y:I,size:z,rotation:0});else{if(ue===2){let ce=0;return D&&q?ce=Math.PI/2:q&&Y?ce=Math.PI:Y&&re&&(ce=-Math.PI/2),void this._basicCornerRounded({x:B,y:I,size:z,rotation:ce})}if(ue===1){let ce=0;return q?ce=Math.PI/2:Y?ce=Math.PI:re&&(ce=-Math.PI/2),void this._basicSideRounded({x:B,y:I,size:z,rotation:ce})}}else this._basicDot({x:B,y:I,size:z,rotation:0})}_drawExtraRounded({x:B,y:I,size:z,getNeighbor:M}){const D=M?+M(-1,0):0,Y=M?+M(1,0):0,q=M?+M(0,-1):0,re=M?+M(0,1):0,ue=D+Y+q+re;if(ue!==0)if(ue>2||D&&Y||q&&re)this._basicSquare({x:B,y:I,size:z,rotation:0});else{if(ue===2){let ce=0;return D&&q?ce=Math.PI/2:q&&Y?ce=Math.PI:Y&&re&&(ce=-Math.PI/2),void this._basicCornerExtraRounded({x:B,y:I,size:z,rotation:ce})}if(ue===1){let ce=0;return q?ce=Math.PI/2:Y?ce=Math.PI:re&&(ce=-Math.PI/2),void this._basicSideRounded({x:B,y:I,size:z,rotation:ce})}}else this._basicDot({x:B,y:I,size:z,rotation:0})}_drawClassy({x:B,y:I,size:z,getNeighbor:M}){const D=M?+M(-1,0):0,Y=M?+M(1,0):0,q=M?+M(0,-1):0,re=M?+M(0,1):0;D+Y+q+re!==0?D||q?Y||re?this._basicSquare({x:B,y:I,size:z,rotation:0}):this._basicCornerRounded({x:B,y:I,size:z,rotation:Math.PI/2}):this._basicCornerRounded({x:B,y:I,size:z,rotation:-Math.PI/2}):this._basicCornersRounded({x:B,y:I,size:z,rotation:Math.PI/2})}_drawClassyRounded({x:B,y:I,size:z,getNeighbor:M}){const D=M?+M(-1,0):0,Y=M?+M(1,0):0,q=M?+M(0,-1):0,re=M?+M(0,1):0;D+Y+q+re!==0?D||q?Y||re?this._basicSquare({x:B,y:I,size:z,rotation:0}):this._basicCornerExtraRounded({x:B,y:I,size:z,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:B,y:I,size:z,rotation:-Math.PI/2}):this._basicCornersRounded({x:B,y:I,size:z,rotation:Math.PI/2})}}const p={dot:"dot",square:"square",extraRounded:"extra-rounded"},b=Object.values(p);class _{constructor({svg:B,type:I,window:z}){this._svg=B,this._type=I,this._window=z}draw(B,I,z,M){let D;switch(this._type){case p.square:D=this._drawSquare;break;case p.extraRounded:D=this._drawExtraRounded;break;default:D=this._drawDot}D.call(this,{x:B,y:I,size:z,rotation:M})}_rotateFigure({x:B,y:I,size:z,rotation:M=0,draw:D}){var Y;const q=B+z/2,re=I+z/2;D(),(Y=this._element)===null||Y===void 0||Y.setAttribute("transform",`rotate(${180*M/Math.PI},${q},${re})`)}_basicDot(B){const{size:I,x:z,y:M}=B,D=I/7;this._rotateFigure(Object.assign(Object.assign({},B),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${z+I/2} ${M}a ${I/2} ${I/2} 0 1 0 0.1 0zm 0 ${D}a ${I/2-D} ${I/2-D} 0 1 1 -0.1 0Z`)}}))}_basicSquare(B){const{size:I,x:z,y:M}=B,D=I/7;this._rotateFigure(Object.assign(Object.assign({},B),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${z} ${M}v ${I}h ${I}v `+-I+`zM ${z+D} ${M+D}h `+(I-2*D)+"v "+(I-2*D)+"h "+(2*D-I)+"z")}}))}_basicExtraRounded(B){const{size:I,x:z,y:M}=B,D=I/7;this._rotateFigure(Object.assign(Object.assign({},B),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${z} ${M+2.5*D}v `+2*D+`a ${2.5*D} ${2.5*D}, 0, 0, 0, ${2.5*D} ${2.5*D}h `+2*D+`a ${2.5*D} ${2.5*D}, 0, 0, 0, ${2.5*D} ${2.5*-D}v `+-2*D+`a ${2.5*D} ${2.5*D}, 0, 0, 0, ${2.5*-D} ${2.5*-D}h `+-2*D+`a ${2.5*D} ${2.5*D}, 0, 0, 0, ${2.5*-D} ${2.5*D}M ${z+2.5*D} ${M+D}h `+2*D+`a ${1.5*D} ${1.5*D}, 0, 0, 1, ${1.5*D} ${1.5*D}v `+2*D+`a ${1.5*D} ${1.5*D}, 0, 0, 1, ${1.5*-D} ${1.5*D}h `+-2*D+`a ${1.5*D} ${1.5*D}, 0, 0, 1, ${1.5*-D} ${1.5*-D}v `+-2*D+`a ${1.5*D} ${1.5*D}, 0, 0, 1, ${1.5*D} ${1.5*-D}`)}}))}_drawDot({x:B,y:I,size:z,rotation:M}){this._basicDot({x:B,y:I,size:z,rotation:M})}_drawSquare({x:B,y:I,size:z,rotation:M}){this._basicSquare({x:B,y:I,size:z,rotation:M})}_drawExtraRounded({x:B,y:I,size:z,rotation:M}){this._basicExtraRounded({x:B,y:I,size:z,rotation:M})}}const w={dot:"dot",square:"square"},x=Object.values(w);class E{constructor({svg:B,type:I,window:z}){this._svg=B,this._type=I,this._window=z}draw(B,I,z,M){let D;D=this._type===w.square?this._drawSquare:this._drawDot,D.call(this,{x:B,y:I,size:z,rotation:M})}_rotateFigure({x:B,y:I,size:z,rotation:M=0,draw:D}){var Y;const q=B+z/2,re=I+z/2;D(),(Y=this._element)===null||Y===void 0||Y.setAttribute("transform",`rotate(${180*M/Math.PI},${q},${re})`)}_basicDot(B){const{size:I,x:z,y:M}=B;this._rotateFigure(Object.assign(Object.assign({},B),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(z+I/2)),this._element.setAttribute("cy",String(M+I/2)),this._element.setAttribute("r",String(I/2))}}))}_basicSquare(B){const{size:I,x:z,y:M}=B;this._rotateFigure(Object.assign(Object.assign({},B),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(z)),this._element.setAttribute("y",String(M)),this._element.setAttribute("width",String(I)),this._element.setAttribute("height",String(I))}}))}_drawDot({x:B,y:I,size:z,rotation:M}){this._basicDot({x:B,y:I,size:z,rotation:M})}_drawSquare({x:B,y:I,size:z,rotation:M}){this._basicSquare({x:B,y:I,size:z,rotation:M})}}const A="circle",j=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],O=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];class N{constructor(B,I){this._roundSize=z=>this._options.dotsOptions.roundSize?Math.floor(z):z,this._window=I,this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(B.width)),this._element.setAttribute("height",String(B.height)),this._element.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),B.dotsOptions.roundSize||this._element.setAttribute("shape-rendering","crispEdges"),this._element.setAttribute("viewBox",`0 0 ${B.width} ${B.height}`),this._defs=this._window.document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._imageUri=B.image,this._instanceId=N.instanceCount++,this._options=B}get width(){return this._options.width}get height(){return this._options.height}getElement(){return this._element}async drawQR(B){const I=B.getModuleCount(),z=Math.min(this._options.width,this._options.height)-2*this._options.margin,M=this._options.shape===A?z/Math.sqrt(2):z,D=this._roundSize(M/I);let Y={hideXDots:0,hideYDots:0,width:0,height:0};if(this._qr=B,this._options.image){if(await this.loadImage(),!this._image)return;const{imageOptions:q,qrOptions:re}=this._options,ue=q.imageSize*f[re.errorCorrectionLevel],ce=Math.floor(ue*I*I);Y=function({originalHeight:ve,originalWidth:k,maxHiddenDots:F,maxHiddenAxisDots:G,dotSize:le}){const H={x:0,y:0},ae={x:0,y:0};if(ve<=0||k<=0||F<=0||le<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};const fe=ve/k;return H.x=Math.floor(Math.sqrt(F/fe)),H.x<=0&&(H.x=1),G&&G<H.x&&(H.x=G),H.x%2==0&&H.x--,ae.x=H.x*le,H.y=1+2*Math.ceil((H.x*fe-1)/2),ae.y=Math.round(ae.x*fe),(H.y*H.x>F||G&&G<H.y)&&(G&&G<H.y?(H.y=G,H.y%2==0&&H.x--):H.y-=2,ae.y=H.y*le,H.x=1+2*Math.ceil((H.y/fe-1)/2),ae.x=Math.round(ae.y/fe)),{height:ae.y,width:ae.x,hideYDots:H.y,hideXDots:H.x}}({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:ce,maxHiddenAxisDots:I-14,dotSize:D})}this.drawBackground(),this.drawDots((q,re)=>{var ue,ce,ve,k,F,G;return!(this._options.imageOptions.hideBackgroundDots&&q>=(I-Y.hideYDots)/2&&q<(I+Y.hideYDots)/2&&re>=(I-Y.hideXDots)/2&&re<(I+Y.hideXDots)/2||!((ue=j[q])===null||ue===void 0)&&ue[re]||!((ce=j[q-I+7])===null||ce===void 0)&&ce[re]||!((ve=j[q])===null||ve===void 0)&&ve[re-I+7]||!((k=O[q])===null||k===void 0)&&k[re]||!((F=O[q-I+7])===null||F===void 0)&&F[re]||!((G=O[q])===null||G===void 0)&&G[re-I+7])}),this.drawCorners(),this._options.image&&await this.drawImage({width:Y.width,height:Y.height,count:I,dotSize:D})}drawBackground(){var B,I,z;const M=this._element,D=this._options;if(M){const Y=(B=D.backgroundOptions)===null||B===void 0?void 0:B.gradient,q=(I=D.backgroundOptions)===null||I===void 0?void 0:I.color;let re=D.height,ue=D.width;if(Y||q){const ce=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id",`clip-path-background-color-${this._instanceId}`),this._defs.appendChild(this._backgroundClipPath),!((z=D.backgroundOptions)===null||z===void 0)&&z.round&&(re=ue=Math.min(D.width,D.height),ce.setAttribute("rx",String(re/2*D.backgroundOptions.round))),ce.setAttribute("x",String(this._roundSize((D.width-ue)/2))),ce.setAttribute("y",String(this._roundSize((D.height-re)/2))),ce.setAttribute("width",String(ue)),ce.setAttribute("height",String(re)),this._backgroundClipPath.appendChild(ce),this._createColor({options:Y,color:q,additionalRotation:0,x:0,y:0,height:D.height,width:D.width,name:`background-color-${this._instanceId}`})}}}drawDots(B){var I,z;if(!this._qr)throw"QR code is not defined";const M=this._options,D=this._qr.getModuleCount();if(D>M.width||D>M.height)throw"The canvas is too small.";const Y=Math.min(M.width,M.height)-2*M.margin,q=M.shape===A?Y/Math.sqrt(2):Y,re=this._roundSize(q/D),ue=this._roundSize((M.width-D*re)/2),ce=this._roundSize((M.height-D*re)/2),ve=new m({svg:this._element,type:M.dotsOptions.type,window:this._window});this._dotsClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id",`clip-path-dot-color-${this._instanceId}`),this._defs.appendChild(this._dotsClipPath),this._createColor({options:(I=M.dotsOptions)===null||I===void 0?void 0:I.gradient,color:M.dotsOptions.color,additionalRotation:0,x:0,y:0,height:M.height,width:M.width,name:`dot-color-${this._instanceId}`});for(let k=0;k<D;k++)for(let F=0;F<D;F++)B&&!B(k,F)||!((z=this._qr)===null||z===void 0)&&z.isDark(k,F)&&(ve.draw(ue+F*re,ce+k*re,re,(G,le)=>!(F+G<0||k+le<0||F+G>=D||k+le>=D)&&!(B&&!B(k+le,F+G))&&!!this._qr&&this._qr.isDark(k+le,F+G)),ve._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(ve._element));if(M.shape===A){const k=this._roundSize((Y/re-D)/2),F=D+2*k,G=ue-k*re,le=ce-k*re,H=[],ae=this._roundSize(F/2);for(let fe=0;fe<F;fe++){H[fe]=[];for(let ge=0;ge<F;ge++)fe>=k-1&&fe<=F-k&&ge>=k-1&&ge<=F-k||Math.sqrt((fe-ae)*(fe-ae)+(ge-ae)*(ge-ae))>ae?H[fe][ge]=0:H[fe][ge]=this._qr.isDark(ge-2*k<0?ge:ge>=D?ge-2*k:ge-k,fe-2*k<0?fe:fe>=D?fe-2*k:fe-k)?1:0}for(let fe=0;fe<F;fe++)for(let ge=0;ge<F;ge++)H[fe][ge]&&(ve.draw(G+ge*re,le+fe*re,re,(de,_e)=>{var Te;return!!(!((Te=H[fe+_e])===null||Te===void 0)&&Te[ge+de])}),ve._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(ve._element))}}drawCorners(){if(!this._qr)throw"QR code is not defined";const B=this._element,I=this._options;if(!B)throw"Element code is not defined";const z=this._qr.getModuleCount(),M=Math.min(I.width,I.height)-2*I.margin,D=I.shape===A?M/Math.sqrt(2):M,Y=this._roundSize(D/z),q=7*Y,re=3*Y,ue=this._roundSize((I.width-z*Y)/2),ce=this._roundSize((I.height-z*Y)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach(([ve,k,F])=>{var G,le,H,ae,fe,ge,de,_e,Te,Le,qe,Be,He,be;const we=ue+ve*Y*(z-7),De=ce+k*Y*(z-7);let Re=this._dotsClipPath,Ae=this._dotsClipPath;if((!((G=I.cornersSquareOptions)===null||G===void 0)&&G.gradient||!((le=I.cornersSquareOptions)===null||le===void 0)&&le.color)&&(Re=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),Re.setAttribute("id",`clip-path-corners-square-color-${ve}-${k}-${this._instanceId}`),this._defs.appendChild(Re),this._cornersSquareClipPath=this._cornersDotClipPath=Ae=Re,this._createColor({options:(H=I.cornersSquareOptions)===null||H===void 0?void 0:H.gradient,color:(ae=I.cornersSquareOptions)===null||ae===void 0?void 0:ae.color,additionalRotation:F,x:we,y:De,height:q,width:q,name:`corners-square-color-${ve}-${k}-${this._instanceId}`})),((fe=I.cornersSquareOptions)===null||fe===void 0?void 0:fe.type)&&b.includes(I.cornersSquareOptions.type)){const Fe=new _({svg:this._element,type:I.cornersSquareOptions.type,window:this._window});Fe.draw(we,De,q,F),Fe._element&&Re&&Re.appendChild(Fe._element)}else{const Fe=new m({svg:this._element,type:((ge=I.cornersSquareOptions)===null||ge===void 0?void 0:ge.type)||I.dotsOptions.type,window:this._window});for(let Ve=0;Ve<j.length;Ve++)for(let Ze=0;Ze<j[Ve].length;Ze++)!((de=j[Ve])===null||de===void 0)&&de[Ze]&&(Fe.draw(we+Ze*Y,De+Ve*Y,Y,(ut,at)=>{var pt;return!!(!((pt=j[Ve+at])===null||pt===void 0)&&pt[Ze+ut])}),Fe._element&&Re&&Re.appendChild(Fe._element))}if((!((_e=I.cornersDotOptions)===null||_e===void 0)&&_e.gradient||!((Te=I.cornersDotOptions)===null||Te===void 0)&&Te.color)&&(Ae=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),Ae.setAttribute("id",`clip-path-corners-dot-color-${ve}-${k}-${this._instanceId}`),this._defs.appendChild(Ae),this._cornersDotClipPath=Ae,this._createColor({options:(Le=I.cornersDotOptions)===null||Le===void 0?void 0:Le.gradient,color:(qe=I.cornersDotOptions)===null||qe===void 0?void 0:qe.color,additionalRotation:F,x:we+2*Y,y:De+2*Y,height:re,width:re,name:`corners-dot-color-${ve}-${k}-${this._instanceId}`})),((Be=I.cornersDotOptions)===null||Be===void 0?void 0:Be.type)&&x.includes(I.cornersDotOptions.type)){const Fe=new E({svg:this._element,type:I.cornersDotOptions.type,window:this._window});Fe.draw(we+2*Y,De+2*Y,re,F),Fe._element&&Ae&&Ae.appendChild(Fe._element)}else{const Fe=new m({svg:this._element,type:((He=I.cornersDotOptions)===null||He===void 0?void 0:He.type)||I.dotsOptions.type,window:this._window});for(let Ve=0;Ve<O.length;Ve++)for(let Ze=0;Ze<O[Ve].length;Ze++)!((be=O[Ve])===null||be===void 0)&&be[Ze]&&(Fe.draw(we+Ze*Y,De+Ve*Y,Y,(ut,at)=>{var pt;return!!(!((pt=O[Ve+at])===null||pt===void 0)&&pt[Ze+ut])}),Fe._element&&Ae&&Ae.appendChild(Fe._element))}})}loadImage(){return new Promise((B,I)=>{var z;const M=this._options;if(!M.image)return I("Image is not defined");if(!((z=M.nodeCanvas)===null||z===void 0)&&z.loadImage)M.nodeCanvas.loadImage(M.image).then(D=>{var Y,q;if(this._image=D,this._options.imageOptions.saveAsBlob){const re=(Y=M.nodeCanvas)===null||Y===void 0?void 0:Y.createCanvas(this._image.width,this._image.height);(q=re?.getContext("2d"))===null||q===void 0||q.drawImage(D,0,0),this._imageUri=re?.toDataURL()}B()}).catch(I);else{const D=new this._window.Image;typeof M.imageOptions.crossOrigin=="string"&&(D.crossOrigin=M.imageOptions.crossOrigin),this._image=D,D.onload=async()=>{this._options.imageOptions.saveAsBlob&&(this._imageUri=await async function(Y,q){return new Promise(re=>{const ue=new q.XMLHttpRequest;ue.onload=function(){const ce=new q.FileReader;ce.onloadend=function(){re(ce.result)},ce.readAsDataURL(ue.response)},ue.open("GET",Y),ue.responseType="blob",ue.send()})}(M.image||"",this._window)),B()},D.src=M.image}})}async drawImage({width:B,height:I,count:z,dotSize:M}){const D=this._options,Y=this._roundSize((D.width-z*M)/2),q=this._roundSize((D.height-z*M)/2),re=Y+this._roundSize(D.imageOptions.margin+(z*M-B)/2),ue=q+this._roundSize(D.imageOptions.margin+(z*M-I)/2),ce=B-2*D.imageOptions.margin,ve=I-2*D.imageOptions.margin,k=this._window.document.createElementNS("http://www.w3.org/2000/svg","image");k.setAttribute("href",this._imageUri||""),k.setAttribute("xlink:href",this._imageUri||""),k.setAttribute("x",String(re)),k.setAttribute("y",String(ue)),k.setAttribute("width",`${ce}px`),k.setAttribute("height",`${ve}px`),this._element.appendChild(k)}_createColor({options:B,color:I,additionalRotation:z,x:M,y:D,height:Y,width:q,name:re}){const ue=q>Y?q:Y,ce=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");if(ce.setAttribute("x",String(M)),ce.setAttribute("y",String(D)),ce.setAttribute("height",String(Y)),ce.setAttribute("width",String(q)),ce.setAttribute("clip-path",`url('#clip-path-${re}')`),B){let ve;if(B.type==="radial")ve=this._window.document.createElementNS("http://www.w3.org/2000/svg","radialGradient"),ve.setAttribute("id",re),ve.setAttribute("gradientUnits","userSpaceOnUse"),ve.setAttribute("fx",String(M+q/2)),ve.setAttribute("fy",String(D+Y/2)),ve.setAttribute("cx",String(M+q/2)),ve.setAttribute("cy",String(D+Y/2)),ve.setAttribute("r",String(ue/2));else{const k=((B.rotation||0)+z)%(2*Math.PI),F=(k+2*Math.PI)%(2*Math.PI);let G=M+q/2,le=D+Y/2,H=M+q/2,ae=D+Y/2;F>=0&&F<=.25*Math.PI||F>1.75*Math.PI&&F<=2*Math.PI?(G-=q/2,le-=Y/2*Math.tan(k),H+=q/2,ae+=Y/2*Math.tan(k)):F>.25*Math.PI&&F<=.75*Math.PI?(le-=Y/2,G-=q/2/Math.tan(k),ae+=Y/2,H+=q/2/Math.tan(k)):F>.75*Math.PI&&F<=1.25*Math.PI?(G+=q/2,le+=Y/2*Math.tan(k),H-=q/2,ae-=Y/2*Math.tan(k)):F>1.25*Math.PI&&F<=1.75*Math.PI&&(le+=Y/2,G+=q/2/Math.tan(k),ae-=Y/2,H-=q/2/Math.tan(k)),ve=this._window.document.createElementNS("http://www.w3.org/2000/svg","linearGradient"),ve.setAttribute("id",re),ve.setAttribute("gradientUnits","userSpaceOnUse"),ve.setAttribute("x1",String(Math.round(G))),ve.setAttribute("y1",String(Math.round(le))),ve.setAttribute("x2",String(Math.round(H))),ve.setAttribute("y2",String(Math.round(ae)))}B.colorStops.forEach(({offset:k,color:F})=>{const G=this._window.document.createElementNS("http://www.w3.org/2000/svg","stop");G.setAttribute("offset",100*k+"%"),G.setAttribute("stop-color",F),ve.appendChild(G)}),ce.setAttribute("fill",`url('#${re}')`),this._defs.appendChild(ve)}else I&&ce.setAttribute("fill",I);this._element.appendChild(ce)}}N.instanceCount=0;const U=N,V="canvas",Z={};for(let W=0;W<=40;W++)Z[W]=W;const X={type:V,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:Z[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{saveAsBlob:!0,hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000",roundSize:!0},backgroundOptions:{round:0,color:"#fff"}};function oe(W){const B=Object.assign({},W);if(!B.colorStops||!B.colorStops.length)throw"Field 'colorStops' is required in gradient";return B.rotation?B.rotation=Number(B.rotation):B.rotation=0,B.colorStops=B.colorStops.map(I=>Object.assign(Object.assign({},I),{offset:Number(I.offset)})),B}function ee(W){const B=Object.assign({},W);return B.width=Number(B.width),B.height=Number(B.height),B.margin=Number(B.margin),B.imageOptions=Object.assign(Object.assign({},B.imageOptions),{hideBackgroundDots:!!B.imageOptions.hideBackgroundDots,imageSize:Number(B.imageOptions.imageSize),margin:Number(B.imageOptions.margin)}),B.margin>Math.min(B.width,B.height)&&(B.margin=Math.min(B.width,B.height)),B.dotsOptions=Object.assign({},B.dotsOptions),B.dotsOptions.gradient&&(B.dotsOptions.gradient=oe(B.dotsOptions.gradient)),B.cornersSquareOptions&&(B.cornersSquareOptions=Object.assign({},B.cornersSquareOptions),B.cornersSquareOptions.gradient&&(B.cornersSquareOptions.gradient=oe(B.cornersSquareOptions.gradient))),B.cornersDotOptions&&(B.cornersDotOptions=Object.assign({},B.cornersDotOptions),B.cornersDotOptions.gradient&&(B.cornersDotOptions.gradient=oe(B.cornersDotOptions.gradient))),B.backgroundOptions&&(B.backgroundOptions=Object.assign({},B.backgroundOptions),B.backgroundOptions.gradient&&(B.backgroundOptions.gradient=oe(B.backgroundOptions.gradient))),B}var J=i(873),ne=i.n(J);function he(W){if(!W)throw new Error("Extension must be defined");W[0]==="."&&(W=W.substring(1));const B={bmp:"image/bmp",gif:"image/gif",ico:"image/vnd.microsoft.icon",jpeg:"image/jpeg",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",tif:"image/tiff",tiff:"image/tiff",webp:"image/webp",pdf:"application/pdf"}[W.toLowerCase()];if(!B)throw new Error(`Extension "${W}" is not supported`);return B}class Q{constructor(B){B?.jsdom?this._window=new B.jsdom("",{resources:"usable"}).window:this._window=window,this._options=B?ee(u(X,B)):X,this.update()}static _clearContainer(B){B&&(B.innerHTML="")}_setupSvg(){if(!this._qr)return;const B=new U(this._options,this._window);this._svg=B.getElement(),this._svgDrawingPromise=B.drawQR(this._qr).then(()=>{var I;this._svg&&((I=this._extension)===null||I===void 0||I.call(this,B.getElement(),this._options))})}_setupCanvas(){var B,I;this._qr&&(!((B=this._options.nodeCanvas)===null||B===void 0)&&B.createCanvas?(this._nodeCanvas=this._options.nodeCanvas.createCanvas(this._options.width,this._options.height),this._nodeCanvas.width=this._options.width,this._nodeCanvas.height=this._options.height):(this._domCanvas=document.createElement("canvas"),this._domCanvas.width=this._options.width,this._domCanvas.height=this._options.height),this._setupSvg(),this._canvasDrawingPromise=(I=this._svgDrawingPromise)===null||I===void 0?void 0:I.then(()=>{var z;if(!this._svg)return;const M=this._svg,D=new this._window.XMLSerializer().serializeToString(M),Y=btoa(D),q=`data:${he("svg")};base64,${Y}`;if(!((z=this._options.nodeCanvas)===null||z===void 0)&&z.loadImage)return this._options.nodeCanvas.loadImage(q).then(re=>{var ue,ce;re.width=this._options.width,re.height=this._options.height,(ce=(ue=this._nodeCanvas)===null||ue===void 0?void 0:ue.getContext("2d"))===null||ce===void 0||ce.drawImage(re,0,0)});{const re=new this._window.Image;return new Promise(ue=>{re.onload=()=>{var ce,ve;(ve=(ce=this._domCanvas)===null||ce===void 0?void 0:ce.getContext("2d"))===null||ve===void 0||ve.drawImage(re,0,0),ue()},re.src=q})}}))}async _getElement(B="png"){if(!this._qr)throw"QR code is empty";return B.toLowerCase()==="svg"?(this._svg&&this._svgDrawingPromise||this._setupSvg(),await this._svgDrawingPromise,this._svg):((this._domCanvas||this._nodeCanvas)&&this._canvasDrawingPromise||this._setupCanvas(),await this._canvasDrawingPromise,this._domCanvas||this._nodeCanvas)}update(B){Q._clearContainer(this._container),this._options=B?ee(u(this._options,B)):this._options,this._options.data&&(this._qr=ne()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(I){switch(!0){case/^[0-9]*$/.test(I):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(I):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._options.type===V?this._setupCanvas():this._setupSvg(),this.append(this._container))}append(B){if(B){if(typeof B.appendChild!="function")throw"Container should be a single DOM node";this._options.type===V?this._domCanvas&&B.appendChild(this._domCanvas):this._svg&&B.appendChild(this._svg),this._container=B}}applyExtension(B){if(!B)throw"Extension function should be defined.";this._extension=B,this.update()}deleteExtension(){this._extension=void 0,this.update()}async getRawData(B="png"){if(!this._qr)throw"QR code is empty";const I=await this._getElement(B),z=he(B);if(!I)return null;if(B.toLowerCase()==="svg"){const M=`<?xml version="1.0" standalone="no"?>\r
${new this._window.XMLSerializer().serializeToString(I)}`;return typeof Blob>"u"||this._options.jsdom?Buffer.from(M):new Blob([M],{type:z})}return new Promise(M=>{const D=I;if("toBuffer"in D)if(z==="image/png")M(D.toBuffer(z));else if(z==="image/jpeg")M(D.toBuffer(z));else{if(z!=="application/pdf")throw Error("Unsupported extension");M(D.toBuffer(z))}else"toBlob"in D&&D.toBlob(M,z,1)})}async download(B){if(!this._qr)throw"QR code is empty";if(typeof Blob>"u")throw"Cannot download in Node.js, call getRawData instead.";let I="png",z="qr";typeof B=="string"?(I=B,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):typeof B=="object"&&B!==null&&(B.name&&(z=B.name),B.extension&&(I=B.extension));const M=await this._getElement(I);if(M)if(I.toLowerCase()==="svg"){let D=new XMLSerializer().serializeToString(M);D=`<?xml version="1.0" standalone="no"?>\r
`+D,d(`data:${he(I)};charset=utf-8,${encodeURIComponent(D)}`,`${z}.svg`)}else d(M.toDataURL(he(I)),`${z}.${I}`)}}const se=Q})(),a.default})())}(yg)),yg.exports}var iJ=rJ();const aJ=Pi(iJ);/*!
* Font Awesome Free 7.0.1 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
* Copyright 2025 Fonticons, Inc.
*/var oJ={prefix:"fab",iconName:"apple",icon:[384,512,[],"f179","M319.1 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.7-55.8 .9-115.1 44.5-115.1 133.2 0 26.2 4.8 53.3 14.4 81.2 12.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.9zM262.5 104.5c27.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"]},sJ={prefix:"fab",iconName:"android",icon:[576,512,[],"f17b","M420.5 253.9a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm-265.1 0a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm273.7-96.5l47.9-83c.8-1.1 1.3-2.4 1.5-3.8s.2-2.7-.1-4.1-.9-2.6-1.7-3.7-1.8-2-3-2.7-2.5-1.1-3.9-1.3-2.7 0-4 .4-2.5 1.1-3.6 1.9-1.9 2-2.5 3.2l-48.5 84.1c-38.8-17.4-80.8-26.4-123.3-26.4s-84.5 9-123.3 26.4L116.2 64.4c-.6-1.2-1.5-2.3-2.5-3.2s-2.3-1.5-3.6-1.9-2.7-.5-4-.4-2.7 .6-3.9 1.3-2.2 1.6-3 2.7-1.4 2.4-1.7 3.7-.3 2.7-.1 4.1 .8 2.6 1.5 3.8l47.9 83C64.5 202.2 8.2 285.5 0 384l576 0c-8.2-98.5-64.5-181.8-146.9-226.6z"]};const lJ="Left",uJ="Right",cJ="Up",fJ="Down",Fc={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},zx={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},dO="mousemove",hO="mouseup",dJ="touchend",hJ="touchmove",mJ="touchstart";function pJ(e,t,n,r){return e>t?n>0?uJ:lJ:r>0?fJ:cJ}function mO(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 gJ(e,t){const n=m=>{const p="touches"in m;p&&m.touches.length>1||e((b,_)=>{_.trackMouse&&!p&&(document.addEventListener(dO,r),document.addEventListener(hO,s));const{clientX:w,clientY:x}=p?m.touches[0]:m,E=mO([w,x],_.rotationAngle);return _.onTouchStartOrOnMouseDown&&_.onTouchStartOrOnMouseDown({event:m}),Object.assign(Object.assign(Object.assign({},b),zx),{initial:E.slice(),xy:E,start:m.timeStamp||0})})},r=m=>{e((p,b)=>{const _="touches"in m;if(_&&m.touches.length>1)return p;if(m.timeStamp-p.start>b.swipeDuration)return p.swiping?Object.assign(Object.assign({},p),{swiping:!1}):p;const{clientX:w,clientY:x}=_?m.touches[0]:m,[E,A]=mO([w,x],b.rotationAngle),j=E-p.xy[0],O=A-p.xy[1],N=Math.abs(j),U=Math.abs(O),V=(m.timeStamp||0)-p.start,Z=Math.sqrt(N*N+U*U)/(V||1),X=[j/(V||1),O/(V||1)],oe=pJ(N,U,j,O),ee=typeof b.delta=="number"?b.delta:b.delta[oe.toLowerCase()]||Fc.delta;if(N<ee&&U<ee&&!p.swiping)return p;const J={absX:N,absY:U,deltaX:j,deltaY:O,dir:oe,event:m,first:p.first,initial:p.initial,velocity:Z,vxvy:X};J.first&&b.onSwipeStart&&b.onSwipeStart(J),b.onSwiping&&b.onSwiping(J);let ne=!1;return(b.onSwiping||b.onSwiped||b[`onSwiped${oe}`])&&(ne=!0),ne&&b.preventScrollOnSwipe&&b.trackTouch&&m.cancelable&&m.preventDefault(),Object.assign(Object.assign({},p),{first:!1,eventData:J,swiping:!0})})},i=m=>{e((p,b)=>{let _;if(p.swiping&&p.eventData){if(m.timeStamp-p.start<b.swipeDuration){_=Object.assign(Object.assign({},p.eventData),{event:m}),b.onSwiped&&b.onSwiped(_);const w=b[`onSwiped${_.dir}`];w&&w(_)}}else b.onTap&&b.onTap({event:m});return b.onTouchEndOrOnMouseUp&&b.onTouchEndOrOnMouseUp({event:m}),Object.assign(Object.assign(Object.assign({},p),zx),{eventData:_})})},a=()=>{document.removeEventListener(dO,r),document.removeEventListener(hO,s)},s=m=>{a(),i(m)},u=(m,p)=>{let b=()=>{};if(m&&m.addEventListener){const _=Object.assign(Object.assign({},Fc.touchEventOptions),p.touchEventOptions),w=[[mJ,n,_],[hJ,r,Object.assign(Object.assign({},_),p.preventScrollOnSwipe?{passive:!1}:{})],[dJ,i,_]];w.forEach(([x,E,A])=>m.addEventListener(x,E,A)),b=()=>w.forEach(([x,E])=>m.removeEventListener(x,E))}return b},f={ref:m=>{m!==null&&e((p,b)=>{if(p.el===m)return p;const _={};return p.el&&p.el!==m&&p.cleanUpTouch&&(p.cleanUpTouch(),_.cleanUpTouch=void 0),b.trackTouch&&m&&(_.cleanUpTouch=u(m,b)),Object.assign(Object.assign(Object.assign({},p),{el:m}),_)})}};return t.trackMouse&&(f.onMouseDown=n),[f,u]}function vJ(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 yJ(e){const{trackMouse:t}=e,n=T.useRef(Object.assign({},zx)),r=T.useRef(Object.assign({},Fc)),i=T.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},Fc),e);let a;for(a in Fc)r.current[a]===void 0&&(r.current[a]=Fc[a]);const[s,u]=T.useMemo(()=>gJ(d=>n.current=d(n.current,r.current),{trackMouse:t}),[t]);return n.current=vJ(n.current,r.current,i.current,u),s}function mb(e){return e==null?"":`${e}`}function bJ(e={}){const{separator:t,decimals:n}=e;return t?n?r=>r.toFixed(n).replace(".",t):r=>`${r}`.replace(".",t):n?r=>r.toFixed(n):r=>`${r}`}function Uw(e={}){const t=typeof e.quote=="string"?e.quote:'"',n=typeof e.escapedQuote=="string"?e.escapedQuote:`${t}${t}`;if(!t||t===n)return i=>i;const r=new RegExp(t,"g");return i=>(i.includes(t)&&(i=i.replace(r,n)),`${t}${i}${t}`)}function _J(e={stringFormatter:Uw()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function xJ(e={stringFormatter:Uw()}){return t=>{if(t===null)return"";let n=JSON.stringify(t);return n===void 0?"":(n[0]==='"'&&(n=n.replace(/^"(.+)"$/,"$1")),e.stringFormatter(n))}}const wJ=RegExp(`[^.[\\]]+|\\[(?:([^"'][^[]*)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))`,"g");function SJ(e){var t,n,r;const i=[];let a;for(;a=wJ.exec(e);)i.push((r=(t=a[3])!==null&&t!==void 0?t:(n=a[1])===null||n===void 0?void 0:n.trim())!==null&&r!==void 0?r:a[0]);return i}function pO(e,t,n){if(t in e){const a=e[t];return a===void 0?n:a}const r=Array.isArray(t)?t:SJ(t);let i=e;for(const a of r)if(i=i?.[a],i===void 0)return n;return i}function wL(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function Fx(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}var gO;(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"})(gO||(gO={}));class CJ{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||Uw(),i=xJ({stringFormatter:r}),a={header:r,undefined:mb,boolean:mb,number:bJ(),bigint:mb,string:r,symbol:_J({stringFormatter:r}),function:i,object:i};return n.formatters=Object.assign(Object.assign({},a),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:i=>pO(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string"){const a=r.value;return{label:r.label||r.value,value:s=>pO(s,a,i)}}if(typeof r.value=="function"){const a=r.label||r.value.name||"",s={label:a,default:i},u=r.value;return{label:a,value(d){const f=u(d,s);return f===void 0?i:f}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return Fx(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(wL,[]),[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 Fx(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 SL extends CJ{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((s,u)=>(Object.keys(u).forEach(d=>{s.includes(d)||s.push(d)}),s),[]),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(wL,[])}processData(t){return Fx(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var ar;(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"})(ar||(ar={}));ar.QUOTATION_MARK+"",ar.QUOTATION_MARK,ar.REVERSE_SOLIDUS+"",ar.REVERSE_SOLIDUS,ar.SOLIDUS+"",ar.SOLIDUS,ar.LATIN_SMALL_LETTER_B+"",ar.BACKSPACE,ar.LATIN_SMALL_LETTER_F+"",ar.FORM_FEED,ar.LATIN_SMALL_LETTER_N+"",ar.NEWLINE,ar.LATIN_SMALL_LETTER_R+"",ar.CARRIAGE_RETURN,ar.LATIN_SMALL_LETTER_T+"",ar.TAB;var vO;(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"})(vO||(vO={}));var yO;(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",e[e.BOM_OR_START=29]="BOM_OR_START",e[e.BOM=30]="BOM"})(yO||(yO={}));var bO;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(bO||(bO={}));var _O;(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"})(_O||(_O={}));var pb={},gb={},xO;function EJ(){return xO||(xO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t}(gb)),gb}var vb={},wO;function CL(){return wO||(wO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=t}(vb)),vb}var yb={},SO;function EL(){return SO||(SO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="string"||typeof n=="symbol"?n:Object.is(n?.valueOf?.(),-0)?"-0":String(n)}e.toKey=t}(yb)),yb}var bb={},CO;function Bw(){return CO||(CO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){const r=[],i=n.length;if(i===0)return r;let a=0,s="",u="",d=!1;for(n.charCodeAt(0)===46&&(r.push(""),a++);a<i;){const f=n[a];u?f==="\\"&&a+1<i?(a++,s+=n[a]):f===u?u="":s+=f:d?f==='"'||f==="'"?u=f:f==="]"?(d=!1,r.push(s),s=""):s+=f:f==="["?(d=!0,s&&(r.push(s),s="")):f==="."?s&&(r.push(s),s=""):s+=f,a++}return s&&r.push(s),r}e.toPath=t}(bb)),bb}var EO;function zw(){return EO||(EO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=EJ(),n=CL(),r=EL(),i=Bw();function a(u,d,f){if(u==null)return f;switch(typeof d){case"string":{if(t.isUnsafeProperty(d))return f;const m=u[d];return m===void 0?n.isDeepKey(d)?a(u,i.toPath(d),f):f:m}case"number":case"symbol":{typeof d=="number"&&(d=r.toKey(d));const m=u[d];return m===void 0?f:m}default:{if(Array.isArray(d))return s(u,d,f);if(Object.is(d?.valueOf(),-0)?d="-0":d=String(d),t.isUnsafeProperty(d))return f;const m=u[d];return m===void 0?f:m}}}function s(u,d,f){if(d.length===0)return f;let m=u;for(let p=0;p<d.length;p++){if(m==null||t.isUnsafeProperty(d[p]))return f;m=m[d[p]]}return m===void 0?f:m}e.get=a}(pb)),pb}var _b,AO;function AJ(){return AO||(AO=1,_b=zw().get),_b}var TJ=AJ();const bl=Pi(TJ);var xb={exports:{}},zt={};/** @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 TO;function OJ(){if(TO)return zt;TO=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,_=e?Symbol.for("react.memo"):60115,w=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,E=e?Symbol.for("react.fundamental"):60117,A=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function O(U){if(typeof U=="object"&&U!==null){var V=U.$$typeof;switch(V){case t:switch(U=U.type,U){case d:case f:case r:case a:case i:case p:return U;default:switch(U=U&&U.$$typeof,U){case u:case m:case w:case _:case s:return U;default:return V}}case n:return V}}}function N(U){return O(U)===f}return zt.AsyncMode=d,zt.ConcurrentMode=f,zt.ContextConsumer=u,zt.ContextProvider=s,zt.Element=t,zt.ForwardRef=m,zt.Fragment=r,zt.Lazy=w,zt.Memo=_,zt.Portal=n,zt.Profiler=a,zt.StrictMode=i,zt.Suspense=p,zt.isAsyncMode=function(U){return N(U)||O(U)===d},zt.isConcurrentMode=N,zt.isContextConsumer=function(U){return O(U)===u},zt.isContextProvider=function(U){return O(U)===s},zt.isElement=function(U){return typeof U=="object"&&U!==null&&U.$$typeof===t},zt.isForwardRef=function(U){return O(U)===m},zt.isFragment=function(U){return O(U)===r},zt.isLazy=function(U){return O(U)===w},zt.isMemo=function(U){return O(U)===_},zt.isPortal=function(U){return O(U)===n},zt.isProfiler=function(U){return O(U)===a},zt.isStrictMode=function(U){return O(U)===i},zt.isSuspense=function(U){return O(U)===p},zt.isValidElementType=function(U){return typeof U=="string"||typeof U=="function"||U===r||U===f||U===a||U===i||U===p||U===b||typeof U=="object"&&U!==null&&(U.$$typeof===w||U.$$typeof===_||U.$$typeof===s||U.$$typeof===u||U.$$typeof===m||U.$$typeof===E||U.$$typeof===A||U.$$typeof===j||U.$$typeof===x)},zt.typeOf=O,zt}var OO;function jJ(){return OO||(OO=1,xb.exports=OJ()),xb.exports}var PJ=jJ(),sr=e=>e===0?0:e>0?1:-1,Ti=e=>typeof e=="number"&&e!=+e,gu=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Je=e=>(typeof e=="number"||e instanceof Number)&&!Ti(e),Jr=e=>Je(e)||typeof e=="string",MJ=0,wh=e=>{var t=++MJ;return"".concat(e||"").concat(t)},Fr=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Je(t)&&typeof t!="string")return r;var a;if(gu(t)){if(n==null)return r;var s=t.indexOf("%");a=n*parseFloat(t.slice(0,s))/100}else a=+t;return Ti(a)&&(a=r),i&&n!=null&&a>n&&(a=n),a},AL=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[e[r]])n[e[r]]=!0;else return!0;return!1},jO=(e,t)=>Je(e)&&Je(t)?n=>e+n*(t-e):()=>t;function fa(e,t,n){return Je(e)&&Je(t)?e+n*(t-e):t}function TL(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):bl(r,t))===n)}var dn=e=>e===null||typeof e>"u",Gh=e=>dn(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),RJ=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function Fw(e){if(typeof e!="string")return!1;var t=RJ;return t.includes(e)}var NJ=["viewBox","children"],PO=["points","pathLength"],wb={svg:NJ,polygon:PO,polyline:PO},$w=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(T.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(i=>{Fw(i)&&(r[i]=a=>n[i](n,a))}),r},LJ=(e,t,n)=>r=>(e(t,n,r),null),oy=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];Fw(i)&&typeof a=="function"&&(r||(r={}),r[i]=LJ(a,t,n))}),r},DJ=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"];function OL(e){if(typeof e!="string")return!1;var t=DJ;return t.includes(e)}function Jo(e){var t=Object.entries(e).filter(n=>{var[r]=n;return OL(r)});return Object.fromEntries(t)}var MO=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",RO=null,Sb=null,jL=e=>{if(e===RO&&Array.isArray(Sb))return Sb;var t=[];return T.Children.forEach(e,n=>{dn(n)||(PJ.isFragment(n)?t=t.concat(jL(n.props.children)):t.push(n))}),Sb=t,RO=e,t};function Yh(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(i=>MO(i)):r=[MO(t)],jL(e).forEach(i=>{var a=bl(i,"type.displayName")||bl(i,"type.name");r.indexOf(a)!==-1&&n.push(i)}),n}var PL=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,kJ=(e,t,n,r)=>{var i;if(typeof t=="symbol"||typeof t=="number")return!0;var a=(i=r&&wb?.[r])!==null&&i!==void 0?i:[],s=t.startsWith("data-"),u=typeof e!="function"&&(!!r&&a.includes(t)||OL(t)),d=!!n&&Fw(t);return s||u||d},cn=(e,t,n)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(T.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var i={};return Object.keys(r).forEach(a=>{var s;kJ((s=r)===null||s===void 0?void 0:s[a],a,t,n)&&(i[a]=r[a])}),i},IJ=["children","width","height","viewBox","className","style","title","desc"];function $x(){return $x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$x.apply(null,arguments)}function UJ(e,t){if(e==null)return{};var n,r,i=BJ(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function BJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ML=T.forwardRef((e,t)=>{var{children:n,width:r,height:i,viewBox:a,className:s,style:u,title:d,desc:f}=e,m=UJ(e,IJ),p=a||{width:r,height:i,x:0,y:0},b=Ne("recharts-surface",s);return T.createElement("svg",$x({},cn(m,!0,"svg"),{className:b,width:r,height:i,style:u,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height),ref:t}),T.createElement("title",null,d),T.createElement("desc",null,f),n)}),zJ=["children","className"];function Vx(){return Vx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vx.apply(null,arguments)}function FJ(e,t){if(e==null)return{};var n,r,i=$J(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function $J(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var _r=T.forwardRef((e,t)=>{var{children:n,className:r}=e,i=FJ(e,zJ),a=Ne("recharts-layer",r);return T.createElement("g",Vx({className:a},cn(i,!0),{ref:t}),n)}),VJ=T.createContext(null);function rn(e){return function(){return e}}const RL=Math.cos,Wg=Math.sin,Ea=Math.sqrt,Kg=Math.PI,sy=2*Kg,Hx=Math.PI,qx=2*Hx,fu=1e-6,HJ=qx-fu;function NL(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function qJ(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return NL;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class GJ{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?NL:qJ(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,s){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,u=this._y1,d=r-t,f=i-n,m=s-t,p=u-n,b=m*m+p*p;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(b>fu)if(!(Math.abs(p*d-f*m)>fu)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let _=r-s,w=i-u,x=d*d+f*f,E=_*_+w*w,A=Math.sqrt(x),j=Math.sqrt(b),O=a*Math.tan((Hx-Math.acos((x+b-E)/(2*A*j)))/2),N=O/j,U=O/A;Math.abs(N-1)>fu&&this._append`L${t+N*m},${n+N*p}`,this._append`A${a},${a},0,0,${+(p*_>m*w)},${this._x1=t+U*d},${this._y1=n+U*f}`}}arc(t,n,r,i,a,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let u=r*Math.cos(i),d=r*Math.sin(i),f=t+u,m=n+d,p=1^s,b=s?i-a:a-i;this._x1===null?this._append`M${f},${m}`:(Math.abs(this._x1-f)>fu||Math.abs(this._y1-m)>fu)&&this._append`L${f},${m}`,r&&(b<0&&(b=b%qx+qx),b>HJ?this._append`A${r},${r},0,1,${p},${t-u},${n-d}A${r},${r},0,1,${p},${this._x1=f},${this._y1=m}`:b>fu&&this._append`A${r},${r},0,${+(b>=Hx)},${p},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function Vw(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new GJ(t)}function Hw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function LL(e){this._context=e}LL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ly(e){return new LL(e)}function DL(e){return e[0]}function kL(e){return e[1]}function IL(e,t){var n=rn(!0),r=null,i=ly,a=null,s=Vw(u);e=typeof e=="function"?e:e===void 0?DL:rn(e),t=typeof t=="function"?t:t===void 0?kL:rn(t);function u(d){var f,m=(d=Hw(d)).length,p,b=!1,_;for(r==null&&(a=i(_=s())),f=0;f<=m;++f)!(f<m&&n(p=d[f],f,d))===b&&((b=!b)?a.lineStart():a.lineEnd()),b&&a.point(+e(p,f,d),+t(p,f,d));if(_)return a=null,_+""||null}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:rn(+d),u):e},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:rn(+d),u):t},u.defined=function(d){return arguments.length?(n=typeof d=="function"?d:rn(!!d),u):n},u.curve=function(d){return arguments.length?(i=d,r!=null&&(a=i(r)),u):i},u.context=function(d){return arguments.length?(d==null?r=a=null:a=i(r=d),u):r},u}function $p(e,t,n){var r=null,i=rn(!0),a=null,s=ly,u=null,d=Vw(f);e=typeof e=="function"?e:e===void 0?DL:rn(+e),t=typeof t=="function"?t:rn(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?kL:rn(+n);function f(p){var b,_,w,x=(p=Hw(p)).length,E,A=!1,j,O=new Array(x),N=new Array(x);for(a==null&&(u=s(j=d())),b=0;b<=x;++b){if(!(b<x&&i(E=p[b],b,p))===A)if(A=!A)_=b,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),w=b-1;w>=_;--w)u.point(O[w],N[w]);u.lineEnd(),u.areaEnd()}A&&(O[b]=+e(E,b,p),N[b]=+t(E,b,p),u.point(r?+r(E,b,p):O[b],n?+n(E,b,p):N[b]))}if(j)return u=null,j+""||null}function m(){return IL().defined(i).curve(s).context(a)}return f.x=function(p){return arguments.length?(e=typeof p=="function"?p:rn(+p),r=null,f):e},f.x0=function(p){return arguments.length?(e=typeof p=="function"?p:rn(+p),f):e},f.x1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:rn(+p),f):r},f.y=function(p){return arguments.length?(t=typeof p=="function"?p:rn(+p),n=null,f):t},f.y0=function(p){return arguments.length?(t=typeof p=="function"?p:rn(+p),f):t},f.y1=function(p){return arguments.length?(n=p==null?null:typeof p=="function"?p:rn(+p),f):n},f.lineX0=f.lineY0=function(){return m().x(e).y(t)},f.lineY1=function(){return m().x(e).y(n)},f.lineX1=function(){return m().x(r).y(t)},f.defined=function(p){return arguments.length?(i=typeof p=="function"?p:rn(!!p),f):i},f.curve=function(p){return arguments.length?(s=p,a!=null&&(u=s(a)),f):s},f.context=function(p){return arguments.length?(p==null?a=u=null:u=s(a=p),f):a},f}class UL{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function YJ(e){return new UL(e,!0)}function WJ(e){return new UL(e,!1)}const qw={draw(e,t){const n=Ea(t/Kg);e.moveTo(n,0),e.arc(0,0,n,0,sy)}},KJ={draw(e,t){const n=Ea(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},BL=Ea(1/3),ZJ=BL*2,XJ={draw(e,t){const n=Ea(t/ZJ),r=n*BL;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},QJ={draw(e,t){const n=Ea(t),r=-n/2;e.rect(r,r,n,n)}},JJ=.8908130915292852,zL=Wg(Kg/10)/Wg(7*Kg/10),eee=Wg(sy/10)*zL,tee=-RL(sy/10)*zL,nee={draw(e,t){const n=Ea(t*JJ),r=eee*n,i=tee*n;e.moveTo(0,-n),e.lineTo(r,i);for(let a=1;a<5;++a){const s=sy*a/5,u=RL(s),d=Wg(s);e.lineTo(d*n,-u*n),e.lineTo(u*r-d*i,d*r+u*i)}e.closePath()}},Cb=Ea(3),ree={draw(e,t){const n=-Ea(t/(Cb*3));e.moveTo(0,n*2),e.lineTo(-Cb*n,-n),e.lineTo(Cb*n,-n),e.closePath()}},qi=-.5,Gi=Ea(3)/2,Gx=1/Ea(12),iee=(Gx/2+1)*3,aee={draw(e,t){const n=Ea(t/iee),r=n/2,i=n*Gx,a=r,s=n*Gx+n,u=-a,d=s;e.moveTo(r,i),e.lineTo(a,s),e.lineTo(u,d),e.lineTo(qi*r-Gi*i,Gi*r+qi*i),e.lineTo(qi*a-Gi*s,Gi*a+qi*s),e.lineTo(qi*u-Gi*d,Gi*u+qi*d),e.lineTo(qi*r+Gi*i,qi*i-Gi*r),e.lineTo(qi*a+Gi*s,qi*s-Gi*a),e.lineTo(qi*u+Gi*d,qi*d-Gi*u),e.closePath()}};function oee(e,t){let n=null,r=Vw(i);e=typeof e=="function"?e:rn(e||qw),t=typeof t=="function"?t:rn(t===void 0?64:+t);function i(){let a;if(n||(n=a=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:rn(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:rn(+a),i):t},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function Zg(){}function Xg(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function FL(e){this._context=e}FL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Xg(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Xg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function see(e){return new FL(e)}function $L(e){this._context=e}$L.prototype={areaStart:Zg,areaEnd:Zg,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Xg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lee(e){return new $L(e)}function VL(e){this._context=e}VL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Xg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function uee(e){return new VL(e)}function HL(e){this._context=e}HL.prototype={areaStart:Zg,areaEnd:Zg,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function cee(e){return new HL(e)}function NO(e){return e<0?-1:1}function LO(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),s=(n-e._y1)/(i||r<0&&-0),u=(a*i+s*r)/(r+i);return(NO(a)+NO(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(u))||0}function DO(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Eb(e,t,n){var r=e._x0,i=e._y0,a=e._x1,s=e._y1,u=(a-r)/3;e._context.bezierCurveTo(r+u,i+u*t,a-u,s-u*n,a,s)}function Qg(e){this._context=e}Qg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Eb(this,this._t0,DO(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Eb(this,DO(this,n=LO(this,e,t)),n);break;default:Eb(this,this._t0,n=LO(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function qL(e){this._context=new GL(e)}(qL.prototype=Object.create(Qg.prototype)).point=function(e,t){Qg.prototype.point.call(this,t,e)};function GL(e){this._context=e}GL.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function fee(e){return new Qg(e)}function dee(e){return new qL(e)}function YL(e){this._context=e}YL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=kO(e),i=kO(t),a=0,s=1;s<n;++a,++s)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[s],t[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function kO(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),s=new Array(n);for(i[0]=0,a[0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,s[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,s[t]-=r*s[t-1];for(i[n-1]=s[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(s[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function hee(e){return new YL(e)}function uy(e,t){this._context=e,this._t=t}uy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function mee(e){return new uy(e,.5)}function pee(e){return new uy(e,0)}function gee(e){return new uy(e,1)}function rf(e,t){if((s=e.length)>1)for(var n=1,r,i,a=e[t[0]],s,u=a.length;n<s;++n)for(i=a,a=e[t[n]],r=0;r<u;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Yx(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function vee(e,t){return e[t]}function yee(e){const t=[];return t.key=e,t}function bee(){var e=rn([]),t=Yx,n=rf,r=vee;function i(a){var s=Array.from(e.apply(this,arguments),yee),u,d=s.length,f=-1,m;for(const p of a)for(u=0,++f;u<d;++u)(s[u][f]=[0,+r(p,s[u].key,f,a)]).data=p;for(u=0,m=Hw(t(s));u<d;++u)s[m[u]].index=u;return n(s,m),s}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:rn(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:rn(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?Yx:typeof a=="function"?a:rn(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??rf,i):n},i}function _ee(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,s;i<a;++i){for(s=n=0;n<r;++n)s+=e[n][i][1]||0;if(s)for(n=0;n<r;++n)e[n][i][1]/=s}rf(e,t)}}function xee(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var s=0,u=0;s<i;++s)u+=e[s][n][1]||0;r[n][1]+=r[n][0]=-u/2}rf(e,t)}}function wee(e,t){if(!(!((s=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,s;r<a;++r){for(var u=0,d=0,f=0;u<s;++u){for(var m=e[t[u]],p=m[r][1]||0,b=m[r-1][1]||0,_=(p-b)/2,w=0;w<u;++w){var x=e[t[w]],E=x[r][1]||0,A=x[r-1][1]||0;_+=E-A}d+=p,f+=_*p}i[r-1][1]+=i[r-1][0]=n,d&&(n-=f/d)}i[r-1][1]+=i[r-1][0]=n,rf(e,t)}}var See=["type","size","sizeType"];function Wx(){return Wx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wx.apply(null,arguments)}function IO(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 UO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?IO(Object(n),!0).forEach(function(r){Cee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cee(e,t,n){return(t=Eee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eee(e){var t=Aee(e,"string");return typeof t=="symbol"?t:t+""}function Aee(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tee(e,t){if(e==null)return{};var n,r,i=Oee(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Oee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var WL={symbolCircle:qw,symbolCross:KJ,symbolDiamond:XJ,symbolSquare:QJ,symbolStar:nee,symbolTriangle:ree,symbolWye:aee},jee=Math.PI/180,Pee=e=>{var t="symbol".concat(Gh(e));return WL[t]||qw},Mee=(e,t,n)=>{if(t==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var r=18*jee;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},Ree=(e,t)=>{WL["symbol".concat(Gh(e))]=t},KL=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,i=Tee(e,See),a=UO(UO({},i),{},{type:t,size:n,sizeType:r}),s=()=>{var p=Pee(t),b=oee().type(p).size(Mee(n,r,t));return b()},{className:u,cx:d,cy:f}=a,m=cn(a,!0);return d===+d&&f===+f&&n===+n?T.createElement("path",Wx({},m,{className:Ne("recharts-symbols",u),transform:"translate(".concat(d,", ").concat(f,")"),d:s()})):null};KL.registerSymbol=Ree;var Ab={},Tb={},BO;function Nee(){return BO||(BO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const i=new Map;for(let a=0;a<n.length;a++){const s=n[a],u=r(s);i.has(u)||i.set(u,s)}return Array.from(i.values())}e.uniqBy=t}(Tb)),Tb}var Ob={},zO;function ZL(){return zO||(zO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t}(Ob)),Ob}var jb={},Pb={},Mb={},FO;function Lee(){return FO||(FO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=t}(Mb)),Mb}var $O;function Gw(){return $O||($O=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Lee();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n}(Pb)),Pb}var Rb={},VO;function Dee(){return VO||(VO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t}(Rb)),Rb}var HO;function kee(){return HO||(HO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Gw(),n=Dee();function r(i){return n.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=r}(jb)),jb}var Nb={},Lb={},qO;function Iee(){return qO||(qO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zw();function n(r){return function(i){return t.get(i,r)}}e.property=n}(Lb)),Lb}var Db={},kb={},Ib={},Ub={},GO;function XL(){return GO||(GO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=t}(Ub)),Ub}var Bb={},YO;function QL(){return YO||(YO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=t}(Bb)),Bb}var zb={},WO;function Yw(){return WO||(WO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return n===r||Number.isNaN(n)&&Number.isNaN(r)}e.eq=t}(zb)),zb}var KO;function Uee(){return KO||(KO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ww(),n=XL(),r=QL(),i=Yw();function a(p,b,_){return typeof _!="function"?t.isMatch(p,b):s(p,b,function w(x,E,A,j,O,N){const U=_(x,E,A,j,O,N);return U!==void 0?!!U:s(x,E,w,N)},new Map)}function s(p,b,_,w){if(b===p)return!0;switch(typeof b){case"object":return u(p,b,_,w);case"function":return Object.keys(b).length>0?s(p,{...b},_,w):i.eq(p,b);default:return n.isObject(p)?typeof b=="string"?b==="":!0:i.eq(p,b)}}function u(p,b,_,w){if(b==null)return!0;if(Array.isArray(b))return f(p,b,_,w);if(b instanceof Map)return d(p,b,_,w);if(b instanceof Set)return m(p,b,_,w);const x=Object.keys(b);if(p==null)return x.length===0;if(x.length===0)return!0;if(w&&w.has(b))return w.get(b)===p;w&&w.set(b,p);try{for(let E=0;E<x.length;E++){const A=x[E];if(!r.isPrimitive(p)&&!(A in p)||b[A]===void 0&&p[A]!==void 0||b[A]===null&&p[A]!==null||!_(p[A],b[A],A,p,b,w))return!1}return!0}finally{w&&w.delete(b)}}function d(p,b,_,w){if(b.size===0)return!0;if(!(p instanceof Map))return!1;for(const[x,E]of b.entries()){const A=p.get(x);if(_(A,E,x,p,b,w)===!1)return!1}return!0}function f(p,b,_,w){if(b.length===0)return!0;if(!Array.isArray(p))return!1;const x=new Set;for(let E=0;E<b.length;E++){const A=b[E];let j=!1;for(let O=0;O<p.length;O++){if(x.has(O))continue;const N=p[O];let U=!1;if(_(N,A,E,p,b,w)&&(U=!0),U){x.add(O),j=!0;break}}if(!j)return!1}return!0}function m(p,b,_,w){return b.size===0?!0:p instanceof Set?f([...p],[...b],_,w):!1}e.isMatchWith=a,e.isSetMatch=m}(Ib)),Ib}var ZO;function Ww(){return ZO||(ZO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Uee();function n(r,i){return t.isMatchWith(r,i,()=>{})}e.isMatch=n}(kb)),kb}var Fb={},$b={},Vb={},XO;function JL(){return XO||(XO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Object.getOwnPropertySymbols(n).filter(r=>Object.prototype.propertyIsEnumerable.call(n,r))}e.getSymbols=t}(Vb)),Vb}var Hb={},QO;function Kw(){return QO||(QO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=t}(Hb)),Hb}var qb={},JO;function Zw(){return JO||(JO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",r="[object Number]",i="[object Boolean]",a="[object Arguments]",s="[object Symbol]",u="[object Date]",d="[object Map]",f="[object Set]",m="[object Array]",p="[object Function]",b="[object ArrayBuffer]",_="[object Object]",w="[object Error]",x="[object DataView]",E="[object Uint8Array]",A="[object Uint8ClampedArray]",j="[object Uint16Array]",O="[object Uint32Array]",N="[object BigUint64Array]",U="[object Int8Array]",V="[object Int16Array]",Z="[object Int32Array]",X="[object BigInt64Array]",oe="[object Float32Array]",ee="[object Float64Array]";e.argumentsTag=a,e.arrayBufferTag=b,e.arrayTag=m,e.bigInt64ArrayTag=X,e.bigUint64ArrayTag=N,e.booleanTag=i,e.dataViewTag=x,e.dateTag=u,e.errorTag=w,e.float32ArrayTag=oe,e.float64ArrayTag=ee,e.functionTag=p,e.int16ArrayTag=V,e.int32ArrayTag=Z,e.int8ArrayTag=U,e.mapTag=d,e.numberTag=r,e.objectTag=_,e.regexpTag=t,e.setTag=f,e.stringTag=n,e.symbolTag=s,e.uint16ArrayTag=j,e.uint32ArrayTag=O,e.uint8ArrayTag=E,e.uint8ClampedArrayTag=A}(qb)),qb}var Gb={},ej;function Bee(){return ej||(ej=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t}(Gb)),Gb}var tj;function eD(){return tj||(tj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=JL(),n=Kw(),r=Zw(),i=QL(),a=Bee();function s(m,p){return u(m,void 0,m,new Map,p)}function u(m,p,b,_=new Map,w=void 0){const x=w?.(m,p,b,_);if(x!=null)return x;if(i.isPrimitive(m))return m;if(_.has(m))return _.get(m);if(Array.isArray(m)){const E=new Array(m.length);_.set(m,E);for(let A=0;A<m.length;A++)E[A]=u(m[A],A,b,_,w);return Object.hasOwn(m,"index")&&(E.index=m.index),Object.hasOwn(m,"input")&&(E.input=m.input),E}if(m instanceof Date)return new Date(m.getTime());if(m instanceof RegExp){const E=new RegExp(m.source,m.flags);return E.lastIndex=m.lastIndex,E}if(m instanceof Map){const E=new Map;_.set(m,E);for(const[A,j]of m)E.set(A,u(j,A,b,_,w));return E}if(m instanceof Set){const E=new Set;_.set(m,E);for(const A of m)E.add(u(A,void 0,b,_,w));return E}if(typeof Buffer<"u"&&Buffer.isBuffer(m))return m.subarray();if(a.isTypedArray(m)){const E=new(Object.getPrototypeOf(m)).constructor(m.length);_.set(m,E);for(let A=0;A<m.length;A++)E[A]=u(m[A],A,b,_,w);return E}if(m instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&m instanceof SharedArrayBuffer)return m.slice(0);if(m instanceof DataView){const E=new DataView(m.buffer.slice(0),m.byteOffset,m.byteLength);return _.set(m,E),d(E,m,b,_,w),E}if(typeof File<"u"&&m instanceof File){const E=new File([m],m.name,{type:m.type});return _.set(m,E),d(E,m,b,_,w),E}if(m instanceof Blob){const E=new Blob([m],{type:m.type});return _.set(m,E),d(E,m,b,_,w),E}if(m instanceof Error){const E=new m.constructor;return _.set(m,E),E.message=m.message,E.name=m.name,E.stack=m.stack,E.cause=m.cause,d(E,m,b,_,w),E}if(typeof m=="object"&&f(m)){const E=Object.create(Object.getPrototypeOf(m));return _.set(m,E),d(E,m,b,_,w),E}return m}function d(m,p,b=m,_,w){const x=[...Object.keys(p),...t.getSymbols(p)];for(let E=0;E<x.length;E++){const A=x[E],j=Object.getOwnPropertyDescriptor(m,A);(j==null||j.writable)&&(m[A]=u(p[A],A,b,_,w))}}function f(m){switch(n.getTag(m)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=s,e.cloneDeepWithImpl=u,e.copyProperties=d}($b)),$b}var nj;function zee(){return nj||(nj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=eD();function n(r){return t.cloneDeepWithImpl(r,void 0,r,new Map,void 0)}e.cloneDeep=n}(Fb)),Fb}var rj;function Fee(){return rj||(rj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ww(),n=zee();function r(i){return i=n.cloneDeep(i),a=>t.isMatch(a,i)}e.matches=r}(Db)),Db}var Yb={},Wb={},Kb={},ij;function $ee(){return ij||(ij=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=eD(),n=Zw();function r(i,a){return t.cloneDeepWith(i,(s,u,d,f)=>{const m=a?.(s,u,d,f);if(m!=null)return m;if(typeof i=="object")switch(Object.prototype.toString.call(i)){case n.numberTag:case n.stringTag:case n.booleanTag:{const p=new i.constructor(i?.valueOf());return t.copyProperties(p,i),p}case n.argumentsTag:{const p={};return t.copyProperties(p,i),p.length=i.length,p[Symbol.iterator]=i[Symbol.iterator],p}default:return}})}e.cloneDeepWith=r}(Kb)),Kb}var aj;function Vee(){return aj||(aj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$ee();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n}(Wb)),Wb}var Zb={},Xb={},oj;function tD(){return oj||(oj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function n(r,i=Number.MAX_SAFE_INTEGER){switch(typeof r){case"number":return Number.isInteger(r)&&r>=0&&r<i;case"symbol":return!1;case"string":return t.test(r)}}e.isIndex=n}(Xb)),Xb}var Qb={},sj;function Hee(){return sj||(sj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Kw();function n(r){return r!==null&&typeof r=="object"&&t.getTag(r)==="[object Arguments]"}e.isArguments=n}(Qb)),Qb}var lj;function qee(){return lj||(lj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=CL(),n=tD(),r=Hee(),i=Bw();function a(s,u){let d;if(Array.isArray(u)?d=u:typeof u=="string"&&t.isDeepKey(u)&&s?.[u]==null?d=i.toPath(u):d=[u],d.length===0)return!1;let f=s;for(let m=0;m<d.length;m++){const p=d[m];if((f==null||!Object.hasOwn(f,p))&&!((Array.isArray(f)||r.isArguments(f))&&n.isIndex(p)&&p<f.length))return!1;f=f[p]}return!0}e.has=a}(Zb)),Zb}var uj;function Gee(){return uj||(uj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ww(),n=EL(),r=Vee(),i=zw(),a=qee();function s(u,d){switch(typeof u){case"object":{Object.is(u?.valueOf(),-0)&&(u="-0");break}case"number":{u=n.toKey(u);break}}return d=r.cloneDeep(d),function(f){const m=i.get(f,u);return m===void 0?a.has(f,u):d===void 0?m===void 0:t.isMatch(m,d)}}e.matchesProperty=s}(Yb)),Yb}var cj;function Yee(){return cj||(cj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ZL(),n=Iee(),r=Fee(),i=Gee();function a(s){if(s==null)return t.identity;switch(typeof s){case"function":return s;case"object":return Array.isArray(s)&&s.length===2?i.matchesProperty(s[0],s[1]):r.matches(s);case"string":case"symbol":case"number":return n.property(s)}}e.iteratee=a}(Nb)),Nb}var fj;function Wee(){return fj||(fj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Nee(),n=ZL(),r=kee(),i=Yee();function a(s,u=n.identity){return r.isArrayLikeObject(s)?t.uniqBy(Array.from(s),i.iteratee(u)):[]}e.uniqBy=a}(Ab)),Ab}var Jb,dj;function Kee(){return dj||(dj=1,Jb=Wee().uniqBy),Jb}var Zee=Kee();const hj=Pi(Zee);function Xee(e,t,n){return t===!0?hj(e,n):typeof t=="function"?hj(e,t):e}var e_={exports:{}},t_={},n_={exports:{}},r_={};/**
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var mj;function Qee(){if(mj)return r_;mj=1;var e=mf();function t(p,b){return p===b&&(p!==0||1/p===1/b)||p!==p&&b!==b}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function u(p,b){var _=b(),w=r({inst:{value:_,getSnapshot:b}}),x=w[0].inst,E=w[1];return a(function(){x.value=_,x.getSnapshot=b,d(x)&&E({inst:x})},[p,_,b]),i(function(){return d(x)&&E({inst:x}),p(function(){d(x)&&E({inst:x})})},[p]),s(_),_}function d(p){var b=p.getSnapshot;p=p.value;try{var _=b();return!n(p,_)}catch{return!0}}function f(p,b){return b()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return r_.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,r_}var pj;function Jee(){return pj||(pj=1,n_.exports=Qee()),n_.exports}/**
* @license React
* use-sync-external-store-shim/with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var gj;function ete(){if(gj)return t_;gj=1;var e=mf(),t=Jee();function n(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,s=e.useEffect,u=e.useMemo,d=e.useDebugValue;return t_.useSyncExternalStoreWithSelector=function(f,m,p,b,_){var w=a(null);if(w.current===null){var x={hasValue:!1,value:null};w.current=x}else x=w.current;w=u(function(){function A(V){if(!j){if(j=!0,O=V,V=b(V),_!==void 0&&x.hasValue){var Z=x.value;if(_(Z,V))return N=Z}return N=V}if(Z=N,r(O,V))return Z;var X=b(V);return _!==void 0&&_(Z,X)?(O=V,Z):(O=V,N=X)}var j=!1,O,N,U=p===void 0?null:p;return[function(){return A(m())},U===null?void 0:function(){return A(U())}]},[m,p,b,_]);var E=i(f,w[0],w[1]);return s(function(){x.hasValue=!0,x.value=E},[E]),d(E),E},t_}var vj;function tte(){return vj||(vj=1,e_.exports=ete()),e_.exports}var nte=tte(),Xw=T.createContext(null),rte=e=>e,jn=()=>{var e=T.useContext(Xw);return e?e.store.dispatch:rte},bg=()=>{},ite=()=>bg,ate=(e,t)=>e===t;function it(e){var t=T.useContext(Xw);return nte.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:ite,t?t.store.getState:bg,t?t.store.getState:bg,t?e:bg,ate)}var i_={},a_={},o_={},yj;function ote(){return yj||(yj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"?1:r===null?2:r===void 0?3:r!==r?4:0}const n=(r,i,a)=>{if(r!==i){const s=t(r),u=t(i);if(s===u&&s===0){if(r<i)return a==="desc"?1:-1;if(r>i)return a==="desc"?-1:1}return a==="desc"?u-s:s-u}return 0};e.compareValues=n}(o_)),o_}var s_={},l_={},bj;function nD(){return bj||(bj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=t}(l_)),l_}var _j;function ste(){return _j||(_j=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nD(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(a,s){return Array.isArray(a)?!1:typeof a=="number"||typeof a=="boolean"||a==null||t.isSymbol(a)?!0:typeof a=="string"&&(r.test(a)||!n.test(a))||s!=null&&Object.hasOwn(s,a)}e.isKey=i}(s_)),s_}var xj;function lte(){return xj||(xj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ote(),n=ste(),r=Bw();function i(a,s,u,d){if(a==null)return[];u=d?void 0:u,Array.isArray(a)||(a=Object.values(a)),Array.isArray(s)||(s=s==null?[null]:[s]),s.length===0&&(s=[null]),Array.isArray(u)||(u=u==null?[]:[u]),u=u.map(_=>String(_));const f=(_,w)=>{let x=_;for(let E=0;E<w.length&&x!=null;++E)x=x[w[E]];return x},m=(_,w)=>w==null||_==null?w:typeof _=="object"&&"key"in _?Object.hasOwn(w,_.key)?w[_.key]:f(w,_.path):typeof _=="function"?_(w):Array.isArray(_)?f(w,_):typeof w=="object"?w[_]:w,p=s.map(_=>(Array.isArray(_)&&_.length===1&&(_=_[0]),_==null||typeof _=="function"||Array.isArray(_)||n.isKey(_)?_:{key:_,path:r.toPath(_)}));return a.map(_=>({original:_,criteria:p.map(w=>m(w,_))})).slice().sort((_,w)=>{for(let x=0;x<p.length;x++){const E=t.compareValues(_.criteria[x],w.criteria[x],u[x]);if(E!==0)return E}return 0}).map(_=>_.original)}e.orderBy=i}(a_)),a_}var u_={},wj;function ute(){return wj||(wj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r=1){const i=[],a=Math.floor(r),s=(u,d)=>{for(let f=0;f<u.length;f++){const m=u[f];Array.isArray(m)&&d<a?s(m,d+1):i.push(m)}};return s(n,0),i}e.flatten=t}(u_)),u_}var c_={},Sj;function rD(){return Sj||(Sj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tD(),n=Gw(),r=XL(),i=Yw();function a(s,u,d){return r.isObject(d)&&(typeof u=="number"&&n.isArrayLike(d)&&t.isIndex(u)&&u<d.length||typeof u=="string"&&u in d)?i.eq(d[u],s):!1}e.isIterateeCall=a}(c_)),c_}var Cj;function cte(){return Cj||(Cj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lte(),n=ute(),r=rD();function i(a,...s){const u=s.length;return u>1&&r.isIterateeCall(a,s[0],s[1])?s=[]:u>2&&r.isIterateeCall(s[0],s[1],s[2])&&(s=[s[0]]),t.orderBy(a,n.flatten(s),["asc"])}e.sortBy=i}(i_)),i_}var f_,Ej;function fte(){return Ej||(Ej=1,f_=cte().sortBy),f_}var dte=fte();const cy=Pi(dte);var iD=e=>e.legend.settings,hte=e=>e.legend.size,mte=e=>e.legend.payload;Pe([mte,iD],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?cy(r,n):r});var Vp=1;function pte(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=T.useState({height:0,left:0,top:0,width:0}),r=T.useCallback(i=>{if(i!=null){var a=i.getBoundingClientRect(),s={height:a.height,left:a.left,top:a.top,width:a.width};(Math.abs(s.height-t.height)>Vp||Math.abs(s.left-t.left)>Vp||Math.abs(s.top-t.top)>Vp||Math.abs(s.width-t.width)>Vp)&&n({height:s.height,left:s.left,top:s.top,width:s.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}var gte={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},aD=Rt({name:"chartLayout",initialState:gte,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){e.margin.top=t.payload.top,e.margin.right=t.payload.right,e.margin.bottom=t.payload.bottom,e.margin.left=t.payload.left},setScale(e,t){e.scale=t.payload}}}),{setMargin:vte,setLayout:yte,setChartSize:bte,setScale:_te}=aD.actions,xte=aD.reducer;function Aj(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 Tj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Aj(Object(n),!0).forEach(function(r){wte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Aj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wte(e,t,n){return(t=Ste(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ste(e){var t=Cte(e,"string");return typeof t=="symbol"?t:t+""}function Cte(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jg=Math.PI/180,Ete=e=>e*180/Math.PI,zn=(e,t,n,r)=>({x:e+Math.cos(-Jg*r)*n,y:t+Math.sin(-Jg*r)*n}),oD=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},Ate=(e,t)=>{var{x:n,y:r}=e,{x:i,y:a}=t;return Math.sqrt((n-i)**2+(r-a)**2)},Tte=(e,t)=>{var{x:n,y:r}=e,{cx:i,cy:a}=t,s=Ate({x:n,y:r},{x:i,y:a});if(s<=0)return{radius:s,angle:0};var u=(n-i)/s,d=Math.acos(u);return r>a&&(d=2*Math.PI-d),{radius:s,angle:Ete(d),angleInRadian:d}},Ote=e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),i=Math.floor(n/360),a=Math.min(r,i);return{startAngle:t-a*360,endAngle:n-a*360}},jte=(e,t)=>{var{startAngle:n,endAngle:r}=t,i=Math.floor(n/360),a=Math.floor(r/360),s=Math.min(i,a);return e+s*360},Pte=(e,t)=>{var{x:n,y:r}=e,{radius:i,angle:a}=Tte({x:n,y:r},t),{innerRadius:s,outerRadius:u}=t;if(i<s||i>u||i===0)return null;var{startAngle:d,endAngle:f}=Ote(t),m=a,p;if(d<=f){for(;m>f;)m-=360;for(;m<d;)m+=360;p=m>=d&&m<=f}else{for(;m>d;)m-=360;for(;m<f;)m+=360;p=m>=f&&m<=d}return p?Tj(Tj({},t),{},{radius:i,angle:jte(m,t)}):null};function sD(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function Oj(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 Wi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Oj(Object(n),!0).forEach(function(r){Mte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mte(e,t,n){return(t=Rte(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rte(e){var t=Nte(e,"string");return typeof t=="symbol"?t:t+""}function Nte(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kt(e,t,n){return dn(e)||dn(t)?n:Jr(t)?bl(e,t,n):typeof t=="function"?t(e):n}var Lte=(e,t,n,r,i)=>{var a,s=-1,u=(a=t?.length)!==null&&a!==void 0?a:0;if(u<=1||e==null)return 0;if(r==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var d=0;d<u;d++){var f=d>0?n[d-1].coordinate:n[u-1].coordinate,m=n[d].coordinate,p=d>=u-1?n[0].coordinate:n[d+1].coordinate,b=void 0;if(sr(m-f)!==sr(p-m)){var _=[];if(sr(p-m)===sr(i[1]-i[0])){b=p;var w=m+i[1]-i[0];_[0]=Math.min(w,(w+f)/2),_[1]=Math.max(w,(w+f)/2)}else{b=f;var x=p+i[1]-i[0];_[0]=Math.min(m,(x+m)/2),_[1]=Math.max(m,(x+m)/2)}var E=[Math.min(m,(b+m)/2),Math.max(m,(b+m)/2)];if(e>E[0]&&e<=E[1]||e>=_[0]&&e<=_[1]){({index:s}=n[d]);break}}else{var A=Math.min(f,p),j=Math.max(f,p);if(e>(A+m)/2&&e<=(j+m)/2){({index:s}=n[d]);break}}}else if(t){for(var O=0;O<u;O++)if(O===0&&e<=(t[O].coordinate+t[O+1].coordinate)/2||O>0&&O<u-1&&e>(t[O].coordinate+t[O-1].coordinate)/2&&e<=(t[O].coordinate+t[O+1].coordinate)/2||O===u-1&&e>(t[O].coordinate+t[O-1].coordinate)/2){({index:s}=t[O]);break}}return s},Dte=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:a,verticalAlign:s,layout:u}=t;if((u==="vertical"||u==="horizontal"&&s==="middle")&&a!=="center"&&Je(e[a]))return Wi(Wi({},e),{},{[a]:e[a]+(r||0)});if((u==="horizontal"||u==="vertical"&&a==="center")&&s!=="middle"&&Je(e[s]))return Wi(Wi({},e),{},{[s]:e[s]+(i||0)})}return e},Tl=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",lD=(e,t,n,r)=>{if(r)return e.map(u=>u.coordinate);var i,a,s=e.map(u=>(u.coordinate===t&&(i=!0),u.coordinate===n&&(a=!0),u.coordinate));return i||s.push(t),a||s.push(n),s},uD=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:i,range:a,scale:s,realScaleType:u,isCategorical:d,categoricalDomain:f,tickCount:m,ticks:p,niceTicks:b,axisType:_}=e;if(!s)return null;var w=u==="scaleBand"&&s.bandwidth?s.bandwidth()/2:2,x=i==="category"&&s.bandwidth?s.bandwidth()/w:0;if(x=_==="angleAxis"&&a&&a.length>=2?sr(a[0]-a[1])*2*x:x,p||b){var E=(p||b||[]).map((A,j)=>{var O=r?r.indexOf(A):A;return{coordinate:s(O)+x,value:A,offset:x,index:j}});return E.filter(A=>!Ti(A.coordinate))}return d&&f?f.map((A,j)=>({coordinate:s(A)+x,value:A,index:j,offset:x})):s.ticks&&m!=null?s.ticks(m).map((A,j)=>({coordinate:s(A)+x,value:A,offset:x,index:j})):s.domain().map((A,j)=>({coordinate:s(A)+x,value:r?r[A]:A,index:j,offset:x}))},jj=1e-4,kte=e=>{var t=e.domain();if(!(!t||t.length<=2)){var n=t.length,r=e.range(),i=Math.min(r[0],r[1])-jj,a=Math.max(r[0],r[1])+jj,s=e(t[0]),u=e(t[n-1]);(s<i||s>a||u<i||u>a)&&e.domain([t[0],t[n-1]])}},Ite=(e,t)=>{if(!t||t.length!==2||!Je(t[0])||!Je(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!Je(e[0])||e[0]<n)&&(i[0]=n),(!Je(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},Ute=e=>{var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,a=0,s=0;s<t;++s){var u=Ti(e[s][n][1])?e[s][n][0]:e[s][n][1];u>=0?(e[s][n][0]=i,e[s][n][1]=i+u,i=e[s][n][1]):(e[s][n][0]=a,e[s][n][1]=a+u,a=e[s][n][1])}},Bte=e=>{var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,a=0;a<t;++a){var s=Ti(e[a][n][1])?e[a][n][0]:e[a][n][1];s>=0?(e[a][n][0]=i,e[a][n][1]=i+s,i=e[a][n][1]):(e[a][n][0]=0,e[a][n][1]=0)}},zte={sign:Ute,expand:_ee,none:rf,silhouette:xee,wiggle:wee,positive:Bte},Fte=(e,t,n)=>{var r=zte[n],i=bee().keys(t).value((a,s)=>+Kt(a,s,0)).order(Yx).offset(r);return i(e)};function $te(e){return e==null?void 0:String(e)}function Pj(e){var{axis:t,ticks:n,bandSize:r,entry:i,index:a,dataKey:s}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!dn(i[t.dataKey])){var u=TL(n,"value",i[t.dataKey]);if(u)return u.coordinate+r/2}return n[a]?n[a].coordinate+r/2:null}var d=Kt(i,dn(s)?t.dataKey:s);return dn(d)?null:t.scale(d)}var Mj=e=>{var{axis:t,ticks:n,offset:r,bandSize:i,entry:a,index:s}=e;if(t.type==="category")return n[s]?n[s].coordinate+r:null;var u=Kt(a,t.dataKey,t.scale.domain()[s]);return dn(u)?null:t.scale(u)-i/2+r},Vte=e=>{var{numericAxis:t}=e,n=t.scale.domain();if(t.type==="number"){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},Hte=e=>{var t=e.flat(2).filter(Je);return[Math.min(...t),Math.max(...t)]},qte=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],Gte=(e,t,n)=>{if(e!=null)return qte(Object.keys(e).reduce((r,i)=>{var a=e[i],{stackedData:s}=a,u=s.reduce((d,f)=>{var m=sD(f,t,n),p=Hte(m);return[Math.min(d[0],p[0]),Math.max(d[1],p[1])]},[1/0,-1/0]);return[Math.min(u[0],r[0]),Math.max(u[1],r[1])]},[1/0,-1/0]))},Rj=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Nj=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Sh=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=cy(t,m=>m.coordinate),a=1/0,s=1,u=i.length;s<u;s++){var d=i[s],f=i[s-1];a=Math.min((d.coordinate||0)-(f.coordinate||0),a)}return a===1/0?0:a}return n?void 0:0};function Lj(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:a}=e;return Wi(Wi({},t),{},{dataKey:n,payload:r,value:i,name:a})}function Ef(e,t){if(e)return String(e);if(typeof t=="string")return t}function Yte(e,t,n,r,i){if(n==="horizontal"||n==="vertical"){var a=e>=i.left&&e<=i.left+i.width&&t>=i.top&&t<=i.top+i.height;return a?{x:e,y:t}:null}return r?Pte({x:e,y:t},r):null}var Wte=(e,t,n,r)=>{var i=t.find(f=>f&&f.index===n);if(i){if(e==="horizontal")return{x:i.coordinate,y:r.y};if(e==="vertical")return{x:r.x,y:i.coordinate};if(e==="centric"){var a=i.coordinate,{radius:s}=r;return Wi(Wi(Wi({},r),zn(r.cx,r.cy,s,a)),{},{angle:a,radius:s})}var u=i.coordinate,{angle:d}=r;return Wi(Wi(Wi({},r),zn(r.cx,r.cy,u,d)),{},{angle:d,radius:u})}return{x:0,y:0}},Kte=(e,t)=>t==="horizontal"?e.x:t==="vertical"?e.y:t==="centric"?e.angle:e.radius,es=e=>e.layout.width,ts=e=>e.layout.height,Zte=e=>e.layout.scale,cD=e=>e.layout.margin,Qw=Pe(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Jw=Pe(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),fD="data-recharts-item-index",dD="data-recharts-item-data-key",fy=60;function Dj(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 Js(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Dj(Object(n),!0).forEach(function(r){Xte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xte(e,t,n){return(t=Qte(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qte(e){var t=Jte(e,"string");return typeof t=="symbol"?t:t+""}function Jte(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ene=e=>e.brush.height,Wn=Pe([es,ts,cD,ene,Qw,Jw,iD,hte],(e,t,n,r,i,a,s,u)=>{var d=a.reduce((w,x)=>{var{orientation:E}=x;if(!x.mirror&&!x.hide){var A=typeof x.width=="number"?x.width:fy;return Js(Js({},w),{},{[E]:w[E]+A})}return w},{left:n.left||0,right:n.right||0}),f=i.reduce((w,x)=>{var{orientation:E}=x;return!x.mirror&&!x.hide?Js(Js({},w),{},{[E]:bl(w,"".concat(E))+x.height}):w},{top:n.top||0,bottom:n.bottom||0}),m=Js(Js({},f),d),p=m.bottom;m.bottom+=r,m=Dte(m,s,u);var b=e-m.left-m.right,_=t-m.top-m.bottom;return Js(Js({brushBottom:p},m),{},{width:Math.max(b,0),height:Math.max(_,0)})}),tne=Pe(Wn,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),hD=Pe(es,ts,(e,t)=>({x:0,y:0,width:e,height:t})),nne=T.createContext(null),Hr=()=>T.useContext(nne)!=null,dy=e=>e.brush,hy=Pe([dy,Wn,cD],(e,t,n)=>({height:e.height,x:Je(e.x)?e.x:t.left,y:Je(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:Je(e.width)?e.width:t.width})),eS=()=>{var e,t=Hr(),n=it(tne),r=it(hy),i=(e=it(dy))===null||e===void 0?void 0:e.padding;return!t||!r||!i?n:{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}},rne={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},mD=()=>{var e;return(e=it(Wn))!==null&&e!==void 0?e:rne},pD=()=>it(es),gD=()=>it(ts),Nt=e=>e.layout.layoutType,my=()=>it(Nt),ine={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},vD=Rt({name:"legend",initialState:ine,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload(e,t){e.payload.push(t.payload)},removeLegendPayload(e,t){var n=Uo(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)}}}),{setLegendSize:__e,setLegendSettings:x_e,addLegendPayload:yD,removeLegendPayload:bD}=vD.actions,ane=vD.reducer;function Kx(){return Kx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kx.apply(null,arguments)}function kj(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 d_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kj(Object(n),!0).forEach(function(r){one(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function one(e,t,n){return(t=sne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sne(e){var t=lne(e,"string");return typeof t=="symbol"?t:t+""}function lne(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function une(e){return Array.isArray(e)&&Jr(e[0])&&Jr(e[1])?e.join(" ~ "):e}var cne=e=>{var{separator:t=" : ",contentStyle:n={},itemStyle:r={},labelStyle:i={},payload:a,formatter:s,itemSorter:u,wrapperClassName:d,labelClassName:f,label:m,labelFormatter:p,accessibilityLayer:b=!1}=e,_=()=>{if(a&&a.length){var U={padding:0,margin:0},V=(u?cy(a,u):a).map((Z,X)=>{if(Z.type==="none")return null;var oe=Z.formatter||s||une,{value:ee,name:J}=Z,ne=ee,he=J;if(oe){var Q=oe(ee,J,Z,X,a);if(Array.isArray(Q))[ne,he]=Q;else if(Q!=null)ne=Q;else return null}var se=d_({display:"block",paddingTop:4,paddingBottom:4,color:Z.color||"#000"},r);return T.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(X),style:se},Jr(he)?T.createElement("span",{className:"recharts-tooltip-item-name"},he):null,Jr(he)?T.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,T.createElement("span",{className:"recharts-tooltip-item-value"},ne),T.createElement("span",{className:"recharts-tooltip-item-unit"},Z.unit||""))});return T.createElement("ul",{className:"recharts-tooltip-item-list",style:U},V)}return null},w=d_({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},n),x=d_({margin:0},i),E=!dn(m),A=E?m:"",j=Ne("recharts-default-tooltip",d),O=Ne("recharts-tooltip-label",f);E&&p&&a!==void 0&&a!==null&&(A=p(m,a));var N=b?{role:"status","aria-live":"assertive"}:{};return T.createElement("div",Kx({className:j,style:w},N),T.createElement("p",{className:O,style:x},T.isValidElement(A)?A:"".concat(A)),_())},$d="recharts-tooltip-wrapper",fne={visibility:"hidden"};function dne(e){var{coordinate:t,translateX:n,translateY:r}=e;return Ne($d,{["".concat($d,"-right")]:Je(n)&&t&&Je(t.x)&&n>=t.x,["".concat($d,"-left")]:Je(n)&&t&&Je(t.x)&&n<t.x,["".concat($d,"-bottom")]:Je(r)&&t&&Je(t.y)&&r>=t.y,["".concat($d,"-top")]:Je(r)&&t&&Je(t.y)&&r<t.y})}function Ij(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offsetTopLeft:i,position:a,reverseDirection:s,tooltipDimension:u,viewBox:d,viewBoxDimension:f}=e;if(a&&Je(a[r]))return a[r];var m=n[r]-u-(i>0?i:0),p=n[r]+i;if(t[r])return s[r]?m:p;var b=d[r];if(b==null)return 0;if(s[r]){var _=m,w=b;return _<w?Math.max(p,b):Math.max(m,b)}if(f==null)return 0;var x=p+u,E=b+f;return x>E?Math.max(m,b):Math.max(p,b)}function hne(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function mne(e){var{allowEscapeViewBox:t,coordinate:n,offsetTopLeft:r,position:i,reverseDirection:a,tooltipBox:s,useTranslate3d:u,viewBox:d}=e,f,m,p;return s.height>0&&s.width>0&&n?(m=Ij({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:s.width,viewBox:d,viewBoxDimension:d.width}),p=Ij({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:s.height,viewBox:d,viewBoxDimension:d.height}),f=hne({translateX:m,translateY:p,useTranslate3d:u})):f=fne,{cssProperties:f,cssClasses:dne({translateX:m,translateY:p,coordinate:n})}}function Uj(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 Hp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Uj(Object(n),!0).forEach(function(r){Zx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zx(e,t,n){return(t=pne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pne(e){var t=gne(e,"string");return typeof t=="symbol"?t:t+""}function gne(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class vne extends T.PureComponent{constructor(){super(...arguments),Zx(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Zx(this,"handleKeyDown",t=>{if(t.key==="Escape"){var n,r,i,a;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(n=(r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==null&&n!==void 0?n:0,y:(i=(a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,n;this.state.dismissed&&(((t=this.props.coordinate)===null||t===void 0?void 0:t.x)!==this.state.dismissedAtCoordinate.x||((n=this.props.coordinate)===null||n===void 0?void 0:n.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:t,allowEscapeViewBox:n,animationDuration:r,animationEasing:i,children:a,coordinate:s,hasPayload:u,isAnimationActive:d,offset:f,position:m,reverseDirection:p,useTranslate3d:b,viewBox:_,wrapperStyle:w,lastBoundingBox:x,innerRef:E,hasPortalFromProps:A}=this.props,{cssClasses:j,cssProperties:O}=mne({allowEscapeViewBox:n,coordinate:s,offsetTopLeft:f,position:m,reverseDirection:p,tooltipBox:{height:x.height,width:x.width},useTranslate3d:b,viewBox:_}),N=A?{}:Hp(Hp({transition:d&&t?"transform ".concat(r,"ms ").concat(i):void 0},O),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&u?"visible":"hidden",position:"absolute",top:0,left:0}),U=Hp(Hp({},N),{},{visibility:!this.state.dismissed&&t&&u?"visible":"hidden"},w);return T.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:j,style:U,ref:E},a)}}var yne=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),zu={isSsr:yne()},_D=()=>it(e=>e.rootProps.accessibilityLayer);function Oi(e){return Number.isFinite(e)}function af(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Xx(){return Xx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xx.apply(null,arguments)}function Bj(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 zj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Bj(Object(n),!0).forEach(function(r){bne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bne(e,t,n){return(t=_ne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _ne(e){var t=xne(e,"string");return typeof t=="symbol"?t:t+""}function xne(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Fj={curveBasisClosed:lee,curveBasisOpen:uee,curveBasis:see,curveBumpX:YJ,curveBumpY:WJ,curveLinearClosed:cee,curveLinear:ly,curveMonotoneX:fee,curveMonotoneY:dee,curveNatural:hee,curveStep:mee,curveStepAfter:gee,curveStepBefore:pee},qp=e=>Oi(e.x)&&Oi(e.y),Vd=e=>e.x,Hd=e=>e.y,wne=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(Gh(e));return(n==="curveMonotone"||n==="curveBump")&&t?Fj["".concat(n).concat(t==="vertical"?"Y":"X")]:Fj[n]||ly},Sne=e=>{var{type:t="linear",points:n=[],baseLine:r,layout:i,connectNulls:a=!1}=e,s=wne(t,i),u=a?n.filter(qp):n,d;if(Array.isArray(r)){var f=a?r.filter(p=>qp(p)):r,m=u.map((p,b)=>zj(zj({},p),{},{base:f[b]}));return i==="vertical"?d=$p().y(Hd).x1(Vd).x0(p=>p.base.x):d=$p().x(Vd).y1(Hd).y0(p=>p.base.y),d.defined(qp).curve(s),d(m)}return i==="vertical"&&Je(r)?d=$p().y(Hd).x1(Vd).x0(r):Je(r)?d=$p().x(Vd).y1(Hd).y0(r):d=IL().x(Vd).y(Hd),d.defined(qp).curve(s),d(u)},tS=e=>{var{className:t,points:n,path:r,pathRef:i}=e;if((!n||!n.length)&&!r)return null;var a=n&&n.length?Sne(e):r;return T.createElement("path",Xx({},Jo(e),$w(e),{className:Ne("recharts-curve",t),d:a===null?void 0:a,ref:i}))},Cne=["x","y","top","left","width","height","className"];function Qx(){return Qx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qx.apply(null,arguments)}function $j(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 Ene(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$j(Object(n),!0).forEach(function(r){Ane(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$j(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ane(e,t,n){return(t=Tne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tne(e){var t=One(e,"string");return typeof t=="symbol"?t:t+""}function One(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jne(e,t){if(e==null)return{};var n,r,i=Pne(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Pne(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Mne=(e,t,n,r,i,a)=>"M".concat(e,",").concat(i,"v").concat(r,"M").concat(a,",").concat(t,"h").concat(n),Rne=e=>{var{x:t=0,y:n=0,top:r=0,left:i=0,width:a=0,height:s=0,className:u}=e,d=jne(e,Cne),f=Ene({x:t,y:n,top:r,left:i,width:a,height:s},d);return!Je(t)||!Je(n)||!Je(a)||!Je(s)||!Je(r)||!Je(i)?null:T.createElement("path",Qx({},cn(f,!0),{className:Ne("recharts-cross",u),d:Mne(t,n,a,s,r,i)}))};function Nne(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function Vj(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 Lne(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vj(Object(n),!0).forEach(function(r){Dne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dne(e,t,n){return(t=kne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kne(e){var t=Ine(e,"string");return typeof t=="symbol"?t:t+""}function Ine(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ri(e,t){var n=Lne({},e),r=t,i=Object.keys(t),a=i.reduce((s,u)=>(s[u]===void 0&&r[u]!==void 0&&(s[u]=r[u]),s),n);return a}var h_={},m_={},p_={},Hj;function Une(){return Hj||(Hj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(!n||typeof n!="object")return!1;const r=Object.getPrototypeOf(n);return r===null||r===Object.prototype||Object.getPrototypeOf(r)===null?Object.prototype.toString.call(n)==="[object Object]":!1}e.isPlainObject=t}(p_)),p_}var qj;function Bne(){return qj||(qj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Une(),n=JL(),r=Kw(),i=Zw(),a=Yw();function s(f,m,p){return u(f,m,void 0,void 0,void 0,void 0,p)}function u(f,m,p,b,_,w,x){const E=x(f,m,p,b,_,w);if(E!==void 0)return E;if(typeof f==typeof m)switch(typeof f){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return f===m;case"number":return f===m||Object.is(f,m);case"function":return f===m;case"object":return d(f,m,w,x)}return d(f,m,w,x)}function d(f,m,p,b){if(Object.is(f,m))return!0;let _=r.getTag(f),w=r.getTag(m);if(_===i.argumentsTag&&(_=i.objectTag),w===i.argumentsTag&&(w=i.objectTag),_!==w)return!1;switch(_){case i.stringTag:return f.toString()===m.toString();case i.numberTag:{const A=f.valueOf(),j=m.valueOf();return a.eq(A,j)}case i.booleanTag:case i.dateTag:case i.symbolTag:return Object.is(f.valueOf(),m.valueOf());case i.regexpTag:return f.source===m.source&&f.flags===m.flags;case i.functionTag:return f===m}p=p??new Map;const x=p.get(f),E=p.get(m);if(x!=null&&E!=null)return x===m;p.set(f,m),p.set(m,f);try{switch(_){case i.mapTag:{if(f.size!==m.size)return!1;for(const[A,j]of f.entries())if(!m.has(A)||!u(j,m.get(A),A,f,m,p,b))return!1;return!0}case i.setTag:{if(f.size!==m.size)return!1;const A=Array.from(f.values()),j=Array.from(m.values());for(let O=0;O<A.length;O++){const N=A[O],U=j.findIndex(V=>u(N,V,void 0,f,m,p,b));if(U===-1)return!1;j.splice(U,1)}return!0}case i.arrayTag:case i.uint8ArrayTag:case i.uint8ClampedArrayTag:case i.uint16ArrayTag:case i.uint32ArrayTag:case i.bigUint64ArrayTag:case i.int8ArrayTag:case i.int16ArrayTag:case i.int32ArrayTag:case i.bigInt64ArrayTag:case i.float32ArrayTag:case i.float64ArrayTag:{if(typeof Buffer<"u"&&Buffer.isBuffer(f)!==Buffer.isBuffer(m)||f.length!==m.length)return!1;for(let A=0;A<f.length;A++)if(!u(f[A],m[A],A,f,m,p,b))return!1;return!0}case i.arrayBufferTag:return f.byteLength!==m.byteLength?!1:d(new Uint8Array(f),new Uint8Array(m),p,b);case i.dataViewTag:return f.byteLength!==m.byteLength||f.byteOffset!==m.byteOffset?!1:d(new Uint8Array(f),new Uint8Array(m),p,b);case i.errorTag:return f.name===m.name&&f.message===m.message;case i.objectTag:{if(!(d(f.constructor,m.constructor,p,b)||t.isPlainObject(f)&&t.isPlainObject(m)))return!1;const j=[...Object.keys(f),...n.getSymbols(f)],O=[...Object.keys(m),...n.getSymbols(m)];if(j.length!==O.length)return!1;for(let N=0;N<j.length;N++){const U=j[N],V=f[U];if(!Object.hasOwn(m,U))return!1;const Z=m[U];if(!u(V,Z,U,f,m,p,b))return!1}return!0}default:return!1}}finally{p.delete(f),p.delete(m)}}e.isEqualWith=s}(m_)),m_}var g_={},Gj;function zne(){return Gj||(Gj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(){}e.noop=t}(g_)),g_}var Yj;function Fne(){return Yj||(Yj=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Bne(),n=zne();function r(i,a){return t.isEqualWith(i,a,n.noop)}e.isEqual=r}(h_)),h_}var v_,Wj;function $ne(){return Wj||(Wj=1,v_=Fne().isEqual),v_}var Vne=$ne();const Hne=Pi(Vne);var ev=1e-4,xD=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],wD=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),Kj=(e,t)=>n=>{var r=xD(e,t);return wD(r,n)},qne=(e,t)=>n=>{var r=xD(e,t),i=[...r.map((a,s)=>a*s).slice(1),0];return wD(i,n)},Zj=function(){for(var t,n,r,i,a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];if(s.length===1)switch(s[0]){case"linear":[t,r,n,i]=[0,0,1,1];break;case"ease":[t,r,n,i]=[.25,.1,.25,1];break;case"ease-in":[t,r,n,i]=[.42,0,1,1];break;case"ease-out":[t,r,n,i]=[.42,0,.58,1];break;case"ease-in-out":[t,r,n,i]=[0,0,.58,1];break;default:{var d=s[0].split("(");d[0]==="cubic-bezier"&&d[1].split(")")[0].split(",").length===4&&([t,r,n,i]=d[1].split(")")[0].split(",").map(w=>parseFloat(w)))}}else s.length===4&&([t,r,n,i]=s);var f=Kj(t,n),m=Kj(r,i),p=qne(t,n),b=w=>w>1?1:w<0?0:w,_=w=>{for(var x=w>1?1:w,E=x,A=0;A<8;++A){var j=f(E)-x,O=p(E);if(Math.abs(j-x)<ev||O<ev)return m(E);E=b(E-j/O)}return m(E)};return _.isStepper=!1,_},Gne=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:i=17}=t,a=(s,u,d)=>{var f=-(s-u)*n,m=d*r,p=d+(f-m)*i/1e3,b=d*i/1e3+s;return Math.abs(b-u)<ev&&Math.abs(p)<ev?[u,0]:[b,p]};return a.isStepper=!0,a.dt=i,a},SD=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Zj(e);case"spring":return Gne();default:if(e.split("(")[0]==="cubic-bezier")return Zj(e)}return typeof e=="function"?e:null};function Xj(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 Qj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xj(Object(n),!0).forEach(function(r){Yne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yne(e,t,n){return(t=Wne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wne(e){var t=Kne(e,"string");return typeof t=="symbol"?t:t+""}function Kne(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Zne=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),Xne=(e,t,n)=>e.map(r=>"".concat(Zne(r)," ").concat(t,"ms ").concat(n)).join(","),Qne=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(i=>r.includes(i))),Ch=(e,t)=>Object.keys(t).reduce((n,r)=>Qj(Qj({},n),{},{[r]:e(r,t[r])}),{});function Jj(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 gr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jj(Object(n),!0).forEach(function(r){Jne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jne(e,t,n){return(t=ere(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ere(e){var t=tre(e,"string");return typeof t=="symbol"?t:t+""}function tre(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tv=(e,t,n)=>e+(t-e)*n,Jx=e=>{var{from:t,to:n}=e;return t!==n},CD=(e,t,n)=>{var r=Ch((i,a)=>{if(Jx(a)){var[s,u]=e(a.from,a.to,a.velocity);return gr(gr({},a),{},{from:s,velocity:u})}return a},t);return n<1?Ch((i,a)=>Jx(a)?gr(gr({},a),{},{velocity:tv(a.velocity,r[i].velocity,n),from:tv(a.from,r[i].from,n)}):a,t):CD(e,r,n-1)};function nre(e,t,n,r,i,a){var s,u=r.reduce((b,_)=>gr(gr({},b),{},{[_]:{from:e[_],velocity:0,to:t[_]}}),{}),d=()=>Ch((b,_)=>_.from,u),f=()=>!Object.values(u).filter(Jx).length,m=null,p=b=>{s||(s=b);var _=b-s,w=_/n.dt;u=CD(n,u,w),i(gr(gr(gr({},e),t),d())),s=b,f()||(m=a.setTimeout(p))};return()=>(m=a.setTimeout(p),()=>{m()})}function rre(e,t,n,r,i,a,s){var u=null,d=i.reduce((p,b)=>gr(gr({},p),{},{[b]:[e[b],t[b]]}),{}),f,m=p=>{f||(f=p);var b=(p-f)/r,_=Ch((x,E)=>tv(...E,n(b)),d);if(a(gr(gr(gr({},e),t),_)),b<1)u=s.setTimeout(m);else{var w=Ch((x,E)=>tv(...E,n(1)),d);a(gr(gr(gr({},e),t),w))}};return()=>(u=s.setTimeout(m),()=>{u()})}const ED=(e,t,n,r,i,a)=>{var s=Qne(e,t);return n.isStepper===!0?nre(e,t,n,s,i,a):rre(e,t,n,r,s,i,a)};function ire(e){var t,n=()=>null,r=!1,i=null,a=s=>{if(!r){if(Array.isArray(s)){if(!s.length)return;var u=s,[d,...f]=u;if(typeof d=="number"){i=e.setTimeout(a.bind(null,f),d);return}a(d),i=e.setTimeout(a.bind(null,f));return}typeof s=="string"&&(t=s,n(t)),typeof s=="object"&&(t=s,n(t)),typeof s=="function"&&s()}};return{stop:()=>{r=!0},start:s=>{r=!1,i&&(i(),i=null),a(s)},subscribe:s=>(n=s,()=>{n=()=>null}),getTimeoutController:()=>e}}class are{setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),i=null,a=s=>{s-r>=n?t(s):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(a))};return i=requestAnimationFrame(a),()=>{cancelAnimationFrame(i)}}}function ore(){return ire(new are)}var sre=T.createContext(ore);function AD(e,t){var n=T.useContext(sre);return T.useMemo(()=>t??n(e),[e,t,n])}var lre=["children","begin","duration","attributeName","easing","isActive","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart","animationManager"];function e2(){return e2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e2.apply(null,arguments)}function ure(e,t){if(e==null)return{};var n,r,i=cre(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function cre(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function eP(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 el(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eP(Object(n),!0).forEach(function(r){vu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vu(e,t,n){return(t=fre(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fre(e){var t=dre(e,"string");return typeof t=="symbol"?t:t+""}function dre(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class nS extends T.PureComponent{constructor(t,n){super(t,n),vu(this,"mounted",!1),vu(this,"manager",void 0),vu(this,"stopJSAnimation",null),vu(this,"unSubscribe",null);var{isActive:r,attributeName:i,from:a,to:s,children:u,duration:d,animationManager:f}=this.props;if(this.manager=f,this.handleStyleChange=this.handleStyleChange.bind(this),this.changeStyle=this.changeStyle.bind(this),!r||d<=0){this.state={style:{}},typeof u=="function"&&(this.state={style:s});return}if(a){if(typeof u=="function"){this.state={style:a};return}this.state={style:i?{[i]:a}:a}}else this.state={style:{}}}componentDidMount(){var{isActive:t,canBegin:n}=this.props;this.mounted=!0,!(!t||!n)&&this.runAnimation(this.props)}componentDidUpdate(t){var{isActive:n,canBegin:r,attributeName:i,shouldReAnimate:a,to:s,from:u}=this.props,{style:d}=this.state;if(r){if(!n){var f={style:i?{[i]:s}:s};this.state&&d&&(i&&d[i]!==s||!i&&d!==s)&&this.setState(f);return}if(!(Hne(t.to,s)&&t.canBegin&&t.isActive)){var m=!t.canBegin||!t.isActive;this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var p=m||a?u:t.to;if(this.state&&d){var b={style:i?{[i]:p}:p};(i&&d[i]!==p||!i&&d!==p)&&this.setState(b)}this.runAnimation(el(el({},this.props),{},{from:p,begin:0}))}}}componentWillUnmount(){this.mounted=!1;var{onAnimationEnd:t}=this.props;this.unSubscribe&&this.unSubscribe(),this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation(),t&&t()}handleStyleChange(t){this.changeStyle(t)}changeStyle(t){this.mounted&&this.setState({style:t})}runJSAnimation(t){var{from:n,to:r,duration:i,easing:a,begin:s,onAnimationEnd:u,onAnimationStart:d}=t,f=ED(n,r,SD(a),i,this.changeStyle,this.manager.getTimeoutController()),m=()=>{this.stopJSAnimation=f()};this.manager.start([d,s,m,i,u])}runAnimation(t){var{begin:n,duration:r,attributeName:i,to:a,easing:s,onAnimationStart:u,onAnimationEnd:d,children:f}=t;if(this.unSubscribe=this.manager.subscribe(this.handleStyleChange),typeof s=="function"||typeof f=="function"||s==="spring"){this.runJSAnimation(t);return}var m=i?{[i]:a}:a,p=Xne(Object.keys(m),r,s);this.manager.start([u,n,el(el({},m),{},{transition:p}),r,d])}render(){var t=this.props,{children:n,begin:r,duration:i,attributeName:a,easing:s,isActive:u,from:d,to:f,canBegin:m,onAnimationEnd:p,shouldReAnimate:b,onAnimationReStart:_,animationManager:w}=t,x=ure(t,lre),E=T.Children.count(n),A=this.state.style;if(typeof n=="function")return n(A);if(!u||E===0||i<=0)return n;var j=O=>{var{style:N={},className:U}=O.props,V=T.cloneElement(O,el(el({},x),{},{style:el(el({},N),A),className:U}));return V};return E===1?j(T.Children.only(n)):T.createElement("div",null,T.Children.map(n,O=>j(O)))}}vu(nS,"displayName","Animate");vu(nS,"defaultProps",{begin:0,duration:1e3,attributeName:"",easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}});function nv(e){var t,n=AD((t=e.attributeName)!==null&&t!==void 0?t:Object.keys(e.to).join(","),e.animationManager);return T.createElement(nS,e2({},e,{animationManager:n}))}function rv(){return rv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rv.apply(null,arguments)}var tP=(e,t,n,r,i)=>{var a=Math.min(Math.abs(n)/2,Math.abs(r)/2),s=r>=0?1:-1,u=n>=0?1:-1,d=r>=0&&n>=0||r<0&&n<0?1:0,f;if(a>0&&i instanceof Array){for(var m=[0,0,0,0],p=0,b=4;p<b;p++)m[p]=i[p]>a?a:i[p];f="M".concat(e,",").concat(t+s*m[0]),m[0]>0&&(f+="A ".concat(m[0],",").concat(m[0],",0,0,").concat(d,",").concat(e+u*m[0],",").concat(t)),f+="L ".concat(e+n-u*m[1],",").concat(t),m[1]>0&&(f+="A ".concat(m[1],",").concat(m[1],",0,0,").concat(d,`,
`).concat(e+n,",").concat(t+s*m[1])),f+="L ".concat(e+n,",").concat(t+r-s*m[2]),m[2]>0&&(f+="A ".concat(m[2],",").concat(m[2],",0,0,").concat(d,`,
`).concat(e+n-u*m[2],",").concat(t+r)),f+="L ".concat(e+u*m[3],",").concat(t+r),m[3]>0&&(f+="A ".concat(m[3],",").concat(m[3],",0,0,").concat(d,`,
`).concat(e,",").concat(t+r-s*m[3])),f+="Z"}else if(a>0&&i===+i&&i>0){var _=Math.min(a,i);f="M ".concat(e,",").concat(t+s*_,`
A `).concat(_,",").concat(_,",0,0,").concat(d,",").concat(e+u*_,",").concat(t,`
L `).concat(e+n-u*_,",").concat(t,`
A `).concat(_,",").concat(_,",0,0,").concat(d,",").concat(e+n,",").concat(t+s*_,`
L `).concat(e+n,",").concat(t+r-s*_,`
A `).concat(_,",").concat(_,",0,0,").concat(d,",").concat(e+n-u*_,",").concat(t+r,`
L `).concat(e+u*_,",").concat(t+r,`
A `).concat(_,",").concat(_,",0,0,").concat(d,",").concat(e,",").concat(t+r-s*_," Z")}else f="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return f},hre={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},rS=e=>{var t=Ri(e,hre),n=T.useRef(null),[r,i]=T.useState(-1);T.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var A=n.current.getTotalLength();A&&i(A)}catch{}},[]);var{x:a,y:s,width:u,height:d,radius:f,className:m}=t,{animationEasing:p,animationDuration:b,animationBegin:_,isAnimationActive:w,isUpdateAnimationActive:x}=t;if(a!==+a||s!==+s||u!==+u||d!==+d||u===0||d===0)return null;var E=Ne("recharts-rectangle",m);return x?T.createElement(nv,{canBegin:r>0,from:{width:u,height:d,x:a,y:s},to:{width:u,height:d,x:a,y:s},duration:b,animationEasing:p,isActive:x},A=>{var{width:j,height:O,x:N,y:U}=A;return T.createElement(nv,{canBegin:r>0,from:"0px ".concat(r===-1?1:r,"px"),to:"".concat(r,"px 0px"),attributeName:"strokeDasharray",begin:_,duration:b,isActive:w,easing:p},T.createElement("path",rv({},cn(t,!0),{className:E,d:tP(N,U,j,O,f),ref:n})))}):T.createElement("path",rv({},cn(t,!0),{className:E,d:tP(a,s,u,d,f)}))};function TD(e){var{cx:t,cy:n,radius:r,startAngle:i,endAngle:a}=e,s=zn(t,n,r,i),u=zn(t,n,r,a);return{points:[s,u],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function t2(){return t2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t2.apply(null,arguments)}var mre=(e,t)=>{var n=sr(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},Gp=e=>{var{cx:t,cy:n,radius:r,angle:i,sign:a,isExternal:s,cornerRadius:u,cornerIsExternal:d}=e,f=u*(s?1:-1)+r,m=Math.asin(u/f)/Jg,p=d?i:i+a*m,b=zn(t,n,f,p),_=zn(t,n,r,p),w=d?i-a*m:i,x=zn(t,n,f*Math.cos(m*Jg),w);return{center:b,circleTangency:_,lineTangency:x,theta:m}},OD=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:a,endAngle:s}=e,u=mre(a,s),d=a+u,f=zn(t,n,i,a),m=zn(t,n,i,d),p="M ".concat(f.x,",").concat(f.y,`
A `).concat(i,",").concat(i,`,0,
`).concat(+(Math.abs(u)>180),",").concat(+(a>d),`,
`).concat(m.x,",").concat(m.y,`
`);if(r>0){var b=zn(t,n,r,a),_=zn(t,n,r,d);p+="L ".concat(_.x,",").concat(_.y,`
A `).concat(r,",").concat(r,`,0,
`).concat(+(Math.abs(u)>180),",").concat(+(a<=d),`,
`).concat(b.x,",").concat(b.y," Z")}else p+="L ".concat(t,",").concat(n," Z");return p},pre=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,cornerRadius:a,forceCornerRadius:s,cornerIsExternal:u,startAngle:d,endAngle:f}=e,m=sr(f-d),{circleTangency:p,lineTangency:b,theta:_}=Gp({cx:t,cy:n,radius:i,angle:d,sign:m,cornerRadius:a,cornerIsExternal:u}),{circleTangency:w,lineTangency:x,theta:E}=Gp({cx:t,cy:n,radius:i,angle:f,sign:-m,cornerRadius:a,cornerIsExternal:u}),A=u?Math.abs(d-f):Math.abs(d-f)-_-E;if(A<0)return s?"M ".concat(b.x,",").concat(b.y,`
a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0
a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0
`):OD({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:d,endAngle:f});var j="M ".concat(b.x,",").concat(b.y,`
A`).concat(a,",").concat(a,",0,0,").concat(+(m<0),",").concat(p.x,",").concat(p.y,`
A`).concat(i,",").concat(i,",0,").concat(+(A>180),",").concat(+(m<0),",").concat(w.x,",").concat(w.y,`
A`).concat(a,",").concat(a,",0,0,").concat(+(m<0),",").concat(x.x,",").concat(x.y,`
`);if(r>0){var{circleTangency:O,lineTangency:N,theta:U}=Gp({cx:t,cy:n,radius:r,angle:d,sign:m,isExternal:!0,cornerRadius:a,cornerIsExternal:u}),{circleTangency:V,lineTangency:Z,theta:X}=Gp({cx:t,cy:n,radius:r,angle:f,sign:-m,isExternal:!0,cornerRadius:a,cornerIsExternal:u}),oe=u?Math.abs(d-f):Math.abs(d-f)-U-X;if(oe<0&&a===0)return"".concat(j,"L").concat(t,",").concat(n,"Z");j+="L".concat(Z.x,",").concat(Z.y,`
A`).concat(a,",").concat(a,",0,0,").concat(+(m<0),",").concat(V.x,",").concat(V.y,`
A`).concat(r,",").concat(r,",0,").concat(+(oe>180),",").concat(+(m>0),",").concat(O.x,",").concat(O.y,`
A`).concat(a,",").concat(a,",0,0,").concat(+(m<0),",").concat(N.x,",").concat(N.y,"Z")}else j+="L".concat(t,",").concat(n,"Z");return j},gre={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},jD=e=>{var t=Ri(e,gre),{cx:n,cy:r,innerRadius:i,outerRadius:a,cornerRadius:s,forceCornerRadius:u,cornerIsExternal:d,startAngle:f,endAngle:m,className:p}=t;if(a<i||f===m)return null;var b=Ne("recharts-sector",p),_=a-i,w=Fr(s,_,0,!0),x;return w>0&&Math.abs(f-m)<360?x=pre({cx:n,cy:r,innerRadius:i,outerRadius:a,cornerRadius:Math.min(w,_/2),forceCornerRadius:u,cornerIsExternal:d,startAngle:f,endAngle:m}):x=OD({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:f,endAngle:m}),T.createElement("path",t2({},cn(t,!0),{className:b,d:x}))};function vre(e,t,n){var r,i,a,s;if(e==="horizontal")r=t.x,a=r,i=n.top,s=n.top+n.height;else if(e==="vertical")i=t.y,s=i,r=n.left,a=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var{cx:u,cy:d,innerRadius:f,outerRadius:m,angle:p}=t,b=zn(u,d,f,p),_=zn(u,d,m,p);r=b.x,i=b.y,a=_.x,s=_.y}else return TD(t);return[{x:r,y:i},{x:a,y:s}]}var y_={},b_={},__={},nP;function yre(){return nP||(nP=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nD();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n}(__)),__}var rP;function bre(){return rP||(rP=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yre();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n}(b_)),b_}var iP;function _re(){return iP||(iP=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rD(),n=bre();function r(i,a,s){s&&typeof s!="number"&&t.isIterateeCall(i,a,s)&&(a=s=void 0),i=n.toFinite(i),a===void 0?(a=i,i=0):a=n.toFinite(a),s=s===void 0?i<a?1:-1:n.toFinite(s);const u=Math.max(Math.ceil((a-i)/(s||1)),0),d=new Array(u);for(let f=0;f<u;f++)d[f]=i,i+=s;return d}e.range=r}(y_)),y_}var x_,aP;function xre(){return aP||(aP=1,x_=_re().range),x_}var wre=xre();const PD=Pi(wre);function ll(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Sre(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function iS(e){let t,n,r;e.length!==2?(t=ll,n=(u,d)=>ll(e(u),d),r=(u,d)=>e(u)-d):(t=e===ll||e===Sre?e:Cre,n=e,r=e);function i(u,d,f=0,m=u.length){if(f<m){if(t(d,d)!==0)return m;do{const p=f+m>>>1;n(u[p],d)<0?f=p+1:m=p}while(f<m)}return f}function a(u,d,f=0,m=u.length){if(f<m){if(t(d,d)!==0)return m;do{const p=f+m>>>1;n(u[p],d)<=0?f=p+1:m=p}while(f<m)}return f}function s(u,d,f=0,m=u.length){const p=i(u,d,f,m-1);return p>f&&r(u[p-1],d)>-r(u[p],d)?p-1:p}return{left:i,center:s,right:a}}function Cre(){return 0}function MD(e){return e===null?NaN:+e}function*Ere(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const Are=iS(ll),Wh=Are.right;iS(MD).center;class oP extends Map{constructor(t,n=jre){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(sP(this,t))}has(t){return super.has(sP(this,t))}set(t,n){return super.set(Tre(this,t),n)}delete(t){return super.delete(Ore(this,t))}}function sP({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Tre({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Ore({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function jre(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Pre(e=ll){if(e===ll)return RD;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function RD(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Mre=Math.sqrt(50),Rre=Math.sqrt(10),Nre=Math.sqrt(2);function iv(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),s=a>=Mre?10:a>=Rre?5:a>=Nre?2:1;let u,d,f;return i<0?(f=Math.pow(10,-i)/s,u=Math.round(e*f),d=Math.round(t*f),u/f<e&&++u,d/f>t&&--d,f=-f):(f=Math.pow(10,i)*s,u=Math.round(e/f),d=Math.round(t/f),u*f<e&&++u,d*f>t&&--d),d<u&&.5<=n&&n<2?iv(e,t,n*2):[u,d,f]}function n2(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,s]=r?iv(t,e,n):iv(e,t,n);if(!(a>=i))return[];const u=a-i+1,d=new Array(u);if(r)if(s<0)for(let f=0;f<u;++f)d[f]=(a-f)/-s;else for(let f=0;f<u;++f)d[f]=(a-f)*s;else if(s<0)for(let f=0;f<u;++f)d[f]=(i+f)/-s;else for(let f=0;f<u;++f)d[f]=(i+f)*s;return d}function r2(e,t,n){return t=+t,e=+e,n=+n,iv(e,t,n)[2]}function i2(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?r2(t,e,n):r2(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function lP(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function uP(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function ND(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?RD:Pre(i);r>n;){if(r-n>600){const d=r-n+1,f=t-n+1,m=Math.log(d),p=.5*Math.exp(2*m/3),b=.5*Math.sqrt(m*p*(d-p)/d)*(f-d/2<0?-1:1),_=Math.max(n,Math.floor(t-f*p/d+b)),w=Math.min(r,Math.floor(t+(d-f)*p/d+b));ND(e,t,_,w,i)}const a=e[t];let s=n,u=r;for(qd(e,n,t),i(e[r],a)>0&&qd(e,n,r);s<u;){for(qd(e,s,u),++s,--u;i(e[s],a)<0;)++s;for(;i(e[u],a)>0;)--u}i(e[n],a)===0?qd(e,n,u):(++u,qd(e,u,r)),u<=t&&(n=u+1),t<=u&&(r=u-1)}return e}function qd(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Lre(e,t,n){if(e=Float64Array.from(Ere(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return uP(e);if(t>=1)return lP(e);var r,i=(r-1)*t,a=Math.floor(i),s=lP(ND(e,a).subarray(0,a+1)),u=uP(e.subarray(a+1));return s+(u-s)*(i-a)}}function Dre(e,t,n=MD){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),s=+n(e[a],a,e),u=+n(e[a+1],a+1,e);return s+(u-s)*(i-a)}}function kre(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function ea(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function ns(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const a2=Symbol("implicit");function aS(){var e=new oP,t=[],n=[],r=a2;function i(a){let s=e.get(a);if(s===void 0){if(r!==a2)return r;e.set(a,s=t.push(a)-1)}return n[s%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new oP;for(const s of a)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return aS(t,n).unknown(r)},ea.apply(i,arguments),i}function oS(){var e=aS().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,s,u=!1,d=0,f=0,m=.5;delete e.unknown;function p(){var b=t().length,_=i<r,w=_?i:r,x=_?r:i;a=(x-w)/Math.max(1,b-d+f*2),u&&(a=Math.floor(a)),w+=(x-w-a*(b-d))*m,s=a*(1-d),u&&(w=Math.round(w),s=Math.round(s));var E=kre(b).map(function(A){return w+a*A});return n(_?E.reverse():E)}return e.domain=function(b){return arguments.length?(t(b),p()):t()},e.range=function(b){return arguments.length?([r,i]=b,r=+r,i=+i,p()):[r,i]},e.rangeRound=function(b){return[r,i]=b,r=+r,i=+i,u=!0,p()},e.bandwidth=function(){return s},e.step=function(){return a},e.round=function(b){return arguments.length?(u=!!b,p()):u},e.padding=function(b){return arguments.length?(d=Math.min(1,f=+b),p()):d},e.paddingInner=function(b){return arguments.length?(d=Math.min(1,b),p()):d},e.paddingOuter=function(b){return arguments.length?(f=+b,p()):f},e.align=function(b){return arguments.length?(m=Math.max(0,Math.min(1,b)),p()):m},e.copy=function(){return oS(t(),[r,i]).round(u).paddingInner(d).paddingOuter(f).align(m)},ea.apply(p(),arguments)}function LD(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return LD(t())},e}function Ire(){return LD(oS.apply(null,arguments).paddingInner(1))}function sS(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function DD(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Kh(){}var Eh=.7,av=1/Eh,Kc="\\s*([+-]?\\d+)\\s*",Ah="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ya="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ure=/^#([0-9a-f]{3,8})$/,Bre=new RegExp(`^rgb\\(${Kc},${Kc},${Kc}\\)$`),zre=new RegExp(`^rgb\\(${Ya},${Ya},${Ya}\\)$`),Fre=new RegExp(`^rgba\\(${Kc},${Kc},${Kc},${Ah}\\)$`),$re=new RegExp(`^rgba\\(${Ya},${Ya},${Ya},${Ah}\\)$`),Vre=new RegExp(`^hsl\\(${Ah},${Ya},${Ya}\\)$`),Hre=new RegExp(`^hsla\\(${Ah},${Ya},${Ya},${Ah}\\)$`),cP={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};sS(Kh,Th,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:fP,formatHex:fP,formatHex8:qre,formatHsl:Gre,formatRgb:dP,toString:dP});function fP(){return this.rgb().formatHex()}function qre(){return this.rgb().formatHex8()}function Gre(){return kD(this).formatHsl()}function dP(){return this.rgb().formatRgb()}function Th(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ure.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?hP(t):n===3?new ei(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Yp(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Yp(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Bre.exec(e))?new ei(t[1],t[2],t[3],1):(t=zre.exec(e))?new ei(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Fre.exec(e))?Yp(t[1],t[2],t[3],t[4]):(t=$re.exec(e))?Yp(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Vre.exec(e))?gP(t[1],t[2]/100,t[3]/100,1):(t=Hre.exec(e))?gP(t[1],t[2]/100,t[3]/100,t[4]):cP.hasOwnProperty(e)?hP(cP[e]):e==="transparent"?new ei(NaN,NaN,NaN,0):null}function hP(e){return new ei(e>>16&255,e>>8&255,e&255,1)}function Yp(e,t,n,r){return r<=0&&(e=t=n=NaN),new ei(e,t,n,r)}function Yre(e){return e instanceof Kh||(e=Th(e)),e?(e=e.rgb(),new ei(e.r,e.g,e.b,e.opacity)):new ei}function o2(e,t,n,r){return arguments.length===1?Yre(e):new ei(e,t,n,r??1)}function ei(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}sS(ei,o2,DD(Kh,{brighter(e){return e=e==null?av:Math.pow(av,e),new ei(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Eh:Math.pow(Eh,e),new ei(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ei(Su(this.r),Su(this.g),Su(this.b),ov(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:mP,formatHex:mP,formatHex8:Wre,formatRgb:pP,toString:pP}));function mP(){return`#${yu(this.r)}${yu(this.g)}${yu(this.b)}`}function Wre(){return`#${yu(this.r)}${yu(this.g)}${yu(this.b)}${yu((isNaN(this.opacity)?1:this.opacity)*255)}`}function pP(){const e=ov(this.opacity);return`${e===1?"rgb(":"rgba("}${Su(this.r)}, ${Su(this.g)}, ${Su(this.b)}${e===1?")":`, ${e})`}`}function ov(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Su(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function yu(e){return e=Su(e),(e<16?"0":"")+e.toString(16)}function gP(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ma(e,t,n,r)}function kD(e){if(e instanceof ma)return new ma(e.h,e.s,e.l,e.opacity);if(e instanceof Kh||(e=Th(e)),!e)return new ma;if(e instanceof ma)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),s=NaN,u=a-i,d=(a+i)/2;return u?(t===a?s=(n-r)/u+(n<r)*6:n===a?s=(r-t)/u+2:s=(t-n)/u+4,u/=d<.5?a+i:2-a-i,s*=60):u=d>0&&d<1?0:s,new ma(s,u,d,e.opacity)}function Kre(e,t,n,r){return arguments.length===1?kD(e):new ma(e,t,n,r??1)}function ma(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}sS(ma,Kre,DD(Kh,{brighter(e){return e=e==null?av:Math.pow(av,e),new ma(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Eh:Math.pow(Eh,e),new ma(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new ei(w_(e>=240?e-240:e+120,i,r),w_(e,i,r),w_(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ma(vP(this.h),Wp(this.s),Wp(this.l),ov(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ov(this.opacity);return`${e===1?"hsl(":"hsla("}${vP(this.h)}, ${Wp(this.s)*100}%, ${Wp(this.l)*100}%${e===1?")":`, ${e})`}`}}));function vP(e){return e=(e||0)%360,e<0?e+360:e}function Wp(e){return Math.max(0,Math.min(1,e||0))}function w_(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const lS=e=>()=>e;function Zre(e,t){return function(n){return e+n*t}}function Xre(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Qre(e){return(e=+e)==1?ID:function(t,n){return n-t?Xre(t,n,e):lS(isNaN(t)?n:t)}}function ID(e,t){var n=t-e;return n?Zre(e,n):lS(isNaN(e)?t:e)}const yP=function e(t){var n=Qre(t);function r(i,a){var s=n((i=o2(i)).r,(a=o2(a)).r),u=n(i.g,a.g),d=n(i.b,a.b),f=ID(i.opacity,a.opacity);return function(m){return i.r=s(m),i.g=u(m),i.b=d(m),i.opacity=f(m),i+""}}return r.gamma=e,r}(1);function Jre(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function eie(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function tie(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),s;for(s=0;s<r;++s)i[s]=Af(e[s],t[s]);for(;s<n;++s)a[s]=t[s];return function(u){for(s=0;s<r;++s)a[s]=i[s](u);return a}}function nie(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function sv(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function rie(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Af(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var s2=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,S_=new RegExp(s2.source,"g");function iie(e){return function(){return e}}function aie(e){return function(t){return e(t)+""}}function oie(e,t){var n=s2.lastIndex=S_.lastIndex=0,r,i,a,s=-1,u=[],d=[];for(e=e+"",t=t+"";(r=s2.exec(e))&&(i=S_.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),u[s]?u[s]+=a:u[++s]=a),(r=r[0])===(i=i[0])?u[s]?u[s]+=i:u[++s]=i:(u[++s]=null,d.push({i:s,x:sv(r,i)})),n=S_.lastIndex;return n<t.length&&(a=t.slice(n),u[s]?u[s]+=a:u[++s]=a),u.length<2?d[0]?aie(d[0].x):iie(t):(t=d.length,function(f){for(var m=0,p;m<t;++m)u[(p=d[m]).i]=p.x(f);return u.join("")})}function Af(e,t){var n=typeof t,r;return t==null||n==="boolean"?lS(t):(n==="number"?sv:n==="string"?(r=Th(t))?(t=r,yP):oie:t instanceof Th?yP:t instanceof Date?nie:eie(t)?Jre:Array.isArray(t)?tie:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?rie:sv)(e,t)}function uS(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function sie(e,t){t===void 0&&(t=e,e=Af);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(s){var u=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return a[u](s-u)}}function lie(e){return function(){return e}}function lv(e){return+e}var bP=[0,1];function Br(e){return e}function l2(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:lie(isNaN(t)?NaN:.5)}function uie(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function cie(e,t,n){var r=e[0],i=e[1],a=t[0],s=t[1];return i<r?(r=l2(i,r),a=n(s,a)):(r=l2(r,i),a=n(a,s)),function(u){return a(r(u))}}function fie(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)i[s]=l2(e[s],e[s+1]),a[s]=n(t[s],t[s+1]);return function(u){var d=Wh(e,u,1,r)-1;return a[d](i[d](u))}}function Zh(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function py(){var e=bP,t=bP,n=Af,r,i,a,s=Br,u,d,f;function m(){var b=Math.min(e.length,t.length);return s!==Br&&(s=uie(e[0],e[b-1])),u=b>2?fie:cie,d=f=null,p}function p(b){return b==null||isNaN(b=+b)?a:(d||(d=u(e.map(r),t,n)))(r(s(b)))}return p.invert=function(b){return s(i((f||(f=u(t,e.map(r),sv)))(b)))},p.domain=function(b){return arguments.length?(e=Array.from(b,lv),m()):e.slice()},p.range=function(b){return arguments.length?(t=Array.from(b),m()):t.slice()},p.rangeRound=function(b){return t=Array.from(b),n=uS,m()},p.clamp=function(b){return arguments.length?(s=b?!0:Br,m()):s!==Br},p.interpolate=function(b){return arguments.length?(n=b,m()):n},p.unknown=function(b){return arguments.length?(a=b,p):a},function(b,_){return r=b,i=_,m()}}function cS(){return py()(Br,Br)}function die(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function uv(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function of(e){return e=uv(Math.abs(e)),e?e[1]:NaN}function hie(e,t){return function(n,r){for(var i=n.length,a=[],s=0,u=e[0],d=0;i>0&&u>0&&(d+u+1>r&&(u=Math.max(1,r-d)),a.push(n.substring(i-=u,i+u)),!((d+=u+1)>r));)u=e[s=(s+1)%e.length];return a.reverse().join(t)}}function mie(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var pie=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Oh(e){if(!(t=pie.exec(e)))throw new Error("invalid format: "+e);var t;return new fS({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Oh.prototype=fS.prototype;function fS(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}fS.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function gie(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var UD;function vie(e,t){var n=uv(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(UD=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return a===s?r:a>s?r+new Array(a-s+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+uv(e,Math.max(0,t+a-1))[0]}function _P(e,t){var n=uv(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const xP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:die,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>_P(e*100,t),r:_P,s:vie,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function wP(e){return e}var SP=Array.prototype.map,CP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function yie(e){var t=e.grouping===void 0||e.thousands===void 0?wP:hie(SP.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?wP:mie(SP.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"":e.minus+"",d=e.nan===void 0?"NaN":e.nan+"";function f(p){p=Oh(p);var b=p.fill,_=p.align,w=p.sign,x=p.symbol,E=p.zero,A=p.width,j=p.comma,O=p.precision,N=p.trim,U=p.type;U==="n"?(j=!0,U="g"):xP[U]||(O===void 0&&(O=12),N=!0,U="g"),(E||b==="0"&&_==="=")&&(E=!0,b="0",_="=");var V=x==="$"?n:x==="#"&&/[boxX]/.test(U)?"0"+U.toLowerCase():"",Z=x==="$"?r:/[%p]/.test(U)?s:"",X=xP[U],oe=/[defgprs%]/.test(U);O=O===void 0?6:/[gprs]/.test(U)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function ee(J){var ne=V,he=Z,Q,se,W;if(U==="c")he=X(J)+he,J="";else{J=+J;var B=J<0||1/J<0;if(J=isNaN(J)?d:X(Math.abs(J),O),N&&(J=gie(J)),B&&+J==0&&w!=="+"&&(B=!1),ne=(B?w==="("?w:u:w==="-"||w==="("?"":w)+ne,he=(U==="s"?CP[8+UD/3]:"")+he+(B&&w==="("?")":""),oe){for(Q=-1,se=J.length;++Q<se;)if(W=J.charCodeAt(Q),48>W||W>57){he=(W===46?i+J.slice(Q+1):J.slice(Q))+he,J=J.slice(0,Q);break}}}j&&!E&&(J=t(J,1/0));var I=ne.length+J.length+he.length,z=I<A?new Array(A-I+1).join(b):"";switch(j&&E&&(J=t(z+J,z.length?A-he.length:1/0),z=""),_){case"<":J=ne+J+he+z;break;case"=":J=ne+z+J+he;break;case"^":J=z.slice(0,I=z.length>>1)+ne+J+he+z.slice(I);break;default:J=z+ne+J+he;break}return a(J)}return ee.toString=function(){return p+""},ee}function m(p,b){var _=f((p=Oh(p),p.type="f",p)),w=Math.max(-8,Math.min(8,Math.floor(of(b)/3)))*3,x=Math.pow(10,-w),E=CP[8+w/3];return function(A){return _(x*A)+E}}return{format:f,formatPrefix:m}}var Kp,dS,BD;bie({thousands:",",grouping:[3],currency:["$",""]});function bie(e){return Kp=yie(e),dS=Kp.format,BD=Kp.formatPrefix,Kp}function _ie(e){return Math.max(0,-of(Math.abs(e)))}function xie(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(of(t)/3)))*3-of(Math.abs(e)))}function wie(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,of(t)-of(e))+1}function zD(e,t,n,r){var i=i2(e,t,n),a;switch(r=Oh(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=xie(i,s))&&(r.precision=a),BD(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=wie(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=_ie(i))&&(r.precision=a-(r.type==="%")*2);break}}return dS(r)}function Ol(e){var t=e.domain;return e.ticks=function(n){var r=t();return n2(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return zD(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,s=r[i],u=r[a],d,f,m=10;for(u<s&&(f=s,s=u,u=f,f=i,i=a,a=f);m-- >0;){if(f=r2(s,u,n),f===d)return r[i]=s,r[a]=u,t(r);if(f>0)s=Math.floor(s/f)*f,u=Math.ceil(u/f)*f;else if(f<0)s=Math.ceil(s*f)/f,u=Math.floor(u*f)/f;else break;d=f}return e},e}function FD(){var e=cS();return e.copy=function(){return Zh(e,FD())},ea.apply(e,arguments),Ol(e)}function $D(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,lv),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return $D(e).unknown(t)},e=arguments.length?Array.from(e,lv):[0,1],Ol(n)}function VD(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],s;return a<i&&(s=n,n=r,r=s,s=i,i=a,a=s),e[n]=t.floor(i),e[r]=t.ceil(a),e}function EP(e){return Math.log(e)}function AP(e){return Math.exp(e)}function Sie(e){return-Math.log(-e)}function Cie(e){return-Math.exp(-e)}function Eie(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Aie(e){return e===10?Eie:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Tie(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function TP(e){return(t,n)=>-e(-t,n)}function hS(e){const t=e(EP,AP),n=t.domain;let r=10,i,a;function s(){return i=Tie(r),a=Aie(r),n()[0]<0?(i=TP(i),a=TP(a),e(Sie,Cie)):e(EP,AP),t}return t.base=function(u){return arguments.length?(r=+u,s()):r},t.domain=function(u){return arguments.length?(n(u),s()):n()},t.ticks=u=>{const d=n();let f=d[0],m=d[d.length-1];const p=m<f;p&&([f,m]=[m,f]);let b=i(f),_=i(m),w,x;const E=u==null?10:+u;let A=[];if(!(r%1)&&_-b<E){if(b=Math.floor(b),_=Math.ceil(_),f>0){for(;b<=_;++b)for(w=1;w<r;++w)if(x=b<0?w/a(-b):w*a(b),!(x<f)){if(x>m)break;A.push(x)}}else for(;b<=_;++b)for(w=r-1;w>=1;--w)if(x=b>0?w/a(-b):w*a(b),!(x<f)){if(x>m)break;A.push(x)}A.length*2<E&&(A=n2(f,m,E))}else A=n2(b,_,Math.min(_-b,E)).map(a);return p?A.reverse():A},t.tickFormat=(u,d)=>{if(u==null&&(u=10),d==null&&(d=r===10?"s":","),typeof d!="function"&&(!(r%1)&&(d=Oh(d)).precision==null&&(d.trim=!0),d=dS(d)),u===1/0)return d;const f=Math.max(1,r*u/t.ticks().length);return m=>{let p=m/a(Math.round(i(m)));return p*r<r-.5&&(p*=r),p<=f?d(m):""}},t.nice=()=>n(VD(n(),{floor:u=>a(Math.floor(i(u))),ceil:u=>a(Math.ceil(i(u)))})),t}function HD(){const e=hS(py()).domain([1,10]);return e.copy=()=>Zh(e,HD()).base(e.base()),ea.apply(e,arguments),e}function OP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function jP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function mS(e){var t=1,n=e(OP(t),jP(t));return n.constant=function(r){return arguments.length?e(OP(t=+r),jP(t)):t},Ol(n)}function qD(){var e=mS(py());return e.copy=function(){return Zh(e,qD()).constant(e.constant())},ea.apply(e,arguments)}function PP(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Oie(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function jie(e){return e<0?-e*e:e*e}function pS(e){var t=e(Br,Br),n=1;function r(){return n===1?e(Br,Br):n===.5?e(Oie,jie):e(PP(n),PP(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Ol(t)}function gS(){var e=pS(py());return e.copy=function(){return Zh(e,gS()).exponent(e.exponent())},ea.apply(e,arguments),e}function Pie(){return gS.apply(null,arguments).exponent(.5)}function MP(e){return Math.sign(e)*e*e}function Mie(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function GD(){var e=cS(),t=[0,1],n=!1,r;function i(a){var s=Mie(e(a));return isNaN(s)?r:n?Math.round(s):s}return i.invert=function(a){return e.invert(MP(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,lv)).map(MP)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return GD(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},ea.apply(i,arguments),Ol(i)}function YD(){var e=[],t=[],n=[],r;function i(){var s=0,u=Math.max(1,t.length);for(n=new Array(u-1);++s<u;)n[s-1]=Dre(e,s/u);return a}function a(s){return s==null||isNaN(s=+s)?r:t[Wh(n,s)]}return a.invertExtent=function(s){var u=t.indexOf(s);return u<0?[NaN,NaN]:[u>0?n[u-1]:e[0],u<n.length?n[u]:e[e.length-1]]},a.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let u of s)u!=null&&!isNaN(u=+u)&&e.push(u);return e.sort(ll),i()},a.range=function(s){return arguments.length?(t=Array.from(s),i()):t.slice()},a.unknown=function(s){return arguments.length?(r=s,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return YD().domain(e).range(t).unknown(r)},ea.apply(a,arguments)}function WD(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function s(d){return d!=null&&d<=d?i[Wh(r,d,0,n)]:a}function u(){var d=-1;for(r=new Array(n);++d<n;)r[d]=((d+1)*t-(d-n)*e)/(n+1);return s}return s.domain=function(d){return arguments.length?([e,t]=d,e=+e,t=+t,u()):[e,t]},s.range=function(d){return arguments.length?(n=(i=Array.from(d)).length-1,u()):i.slice()},s.invertExtent=function(d){var f=i.indexOf(d);return f<0?[NaN,NaN]:f<1?[e,r[0]]:f>=n?[r[n-1],t]:[r[f-1],r[f]]},s.unknown=function(d){return arguments.length&&(a=d),s},s.thresholds=function(){return r.slice()},s.copy=function(){return WD().domain([e,t]).range(i).unknown(a)},ea.apply(Ol(s),arguments)}function KD(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[Wh(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var s=t.indexOf(a);return[e[s-1],e[s]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return KD().domain(e).range(t).unknown(n)},ea.apply(i,arguments)}const C_=new Date,E_=new Date;function Kn(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const s=i(a),u=i.ceil(a);return a-s<u-a?s:u},i.offset=(a,s)=>(t(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,u)=>{const d=[];if(a=i.ceil(a),u=u==null?1:Math.floor(u),!(a<s)||!(u>0))return d;let f;do d.push(f=new Date(+a)),t(a,u),e(a);while(f<a&&a<s);return d},i.filter=a=>Kn(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,u)=>{if(s>=s)if(u<0)for(;++u<=0;)for(;t(s,-1),!a(s););else for(;--u>=0;)for(;t(s,1),!a(s););}),n&&(i.count=(a,s)=>(C_.setTime(+a),E_.setTime(+s),e(C_),e(E_),Math.floor(n(C_,E_))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?s=>r(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const cv=Kn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);cv.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Kn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):cv);cv.range;const Do=1e3,Zi=Do*60,ko=Zi*60,Go=ko*24,vS=Go*7,RP=Go*30,A_=Go*365,bu=Kn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Do)},(e,t)=>(t-e)/Do,e=>e.getUTCSeconds());bu.range;const yS=Kn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Do)},(e,t)=>{e.setTime(+e+t*Zi)},(e,t)=>(t-e)/Zi,e=>e.getMinutes());yS.range;const bS=Kn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Zi)},(e,t)=>(t-e)/Zi,e=>e.getUTCMinutes());bS.range;const _S=Kn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Do-e.getMinutes()*Zi)},(e,t)=>{e.setTime(+e+t*ko)},(e,t)=>(t-e)/ko,e=>e.getHours());_S.range;const xS=Kn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ko)},(e,t)=>(t-e)/ko,e=>e.getUTCHours());xS.range;const Xh=Kn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Zi)/Go,e=>e.getDate()-1);Xh.range;const gy=Kn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Go,e=>e.getUTCDate()-1);gy.range;const ZD=Kn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Go,e=>Math.floor(e/Go));ZD.range;function Fu(e){return Kn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Zi)/vS)}const vy=Fu(0),fv=Fu(1),Rie=Fu(2),Nie=Fu(3),sf=Fu(4),Lie=Fu(5),Die=Fu(6);vy.range;fv.range;Rie.range;Nie.range;sf.range;Lie.range;Die.range;function $u(e){return Kn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/vS)}const yy=$u(0),dv=$u(1),kie=$u(2),Iie=$u(3),lf=$u(4),Uie=$u(5),Bie=$u(6);yy.range;dv.range;kie.range;Iie.range;lf.range;Uie.range;Bie.range;const wS=Kn(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());wS.range;const SS=Kn(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());SS.range;const Yo=Kn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Yo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Kn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Yo.range;const Wo=Kn(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Wo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Kn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Wo.range;function XD(e,t,n,r,i,a){const s=[[bu,1,Do],[bu,5,5*Do],[bu,15,15*Do],[bu,30,30*Do],[a,1,Zi],[a,5,5*Zi],[a,15,15*Zi],[a,30,30*Zi],[i,1,ko],[i,3,3*ko],[i,6,6*ko],[i,12,12*ko],[r,1,Go],[r,2,2*Go],[n,1,vS],[t,1,RP],[t,3,3*RP],[e,1,A_]];function u(f,m,p){const b=m<f;b&&([f,m]=[m,f]);const _=p&&typeof p.range=="function"?p:d(f,m,p),w=_?_.range(f,+m+1):[];return b?w.reverse():w}function d(f,m,p){const b=Math.abs(m-f)/p,_=iS(([,,E])=>E).right(s,b);if(_===s.length)return e.every(i2(f/A_,m/A_,p));if(_===0)return cv.every(Math.max(i2(f,m,p),1));const[w,x]=s[b/s[_-1][2]<s[_][2]/b?_-1:_];return w.every(x)}return[u,d]}const[zie,Fie]=XD(Wo,SS,yy,ZD,xS,bS),[$ie,Vie]=XD(Yo,wS,vy,Xh,_S,yS);function T_(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function O_(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Gd(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Hie(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,s=e.shortDays,u=e.months,d=e.shortMonths,f=Yd(i),m=Wd(i),p=Yd(a),b=Wd(a),_=Yd(s),w=Wd(s),x=Yd(u),E=Wd(u),A=Yd(d),j=Wd(d),O={a:B,A:I,b:z,B:M,c:null,d:UP,e:UP,f:hae,g:Sae,G:Eae,H:cae,I:fae,j:dae,L:QD,m:mae,M:pae,p:D,q:Y,Q:FP,s:$P,S:gae,u:vae,U:yae,V:bae,w:_ae,W:xae,x:null,X:null,y:wae,Y:Cae,Z:Aae,"%":zP},N={a:q,A:re,b:ue,B:ce,c:null,d:BP,e:BP,f:Pae,g:zae,G:$ae,H:Tae,I:Oae,j:jae,L:ek,m:Mae,M:Rae,p:ve,q:k,Q:FP,s:$P,S:Nae,u:Lae,U:Dae,V:kae,w:Iae,W:Uae,x:null,X:null,y:Bae,Y:Fae,Z:Vae,"%":zP},U={a:ee,A:J,b:ne,B:he,c:Q,d:kP,e:kP,f:oae,g:DP,G:LP,H:IP,I:IP,j:nae,L:aae,m:tae,M:rae,p:oe,q:eae,Q:lae,s:uae,S:iae,u:Kie,U:Zie,V:Xie,w:Wie,W:Qie,x:se,X:W,y:DP,Y:LP,Z:Jie,"%":sae};O.x=V(n,O),O.X=V(r,O),O.c=V(t,O),N.x=V(n,N),N.X=V(r,N),N.c=V(t,N);function V(F,G){return function(le){var H=[],ae=-1,fe=0,ge=F.length,de,_e,Te;for(le instanceof Date||(le=new Date(+le));++ae<ge;)F.charCodeAt(ae)===37&&(H.push(F.slice(fe,ae)),(_e=NP[de=F.charAt(++ae)])!=null?de=F.charAt(++ae):_e=de==="e"?" ":"0",(Te=G[de])&&(de=Te(le,_e)),H.push(de),fe=ae+1);return H.push(F.slice(fe,ae)),H.join("")}}function Z(F,G){return function(le){var H=Gd(1900,void 0,1),ae=X(H,F,le+="",0),fe,ge;if(ae!=le.length)return null;if("Q"in H)return new Date(H.Q);if("s"in H)return new Date(H.s*1e3+("L"in H?H.L:0));if(G&&!("Z"in H)&&(H.Z=0),"p"in H&&(H.H=H.H%12+H.p*12),H.m===void 0&&(H.m="q"in H?H.q:0),"V"in H){if(H.V<1||H.V>53)return null;"w"in H||(H.w=1),"Z"in H?(fe=O_(Gd(H.y,0,1)),ge=fe.getUTCDay(),fe=ge>4||ge===0?dv.ceil(fe):dv(fe),fe=gy.offset(fe,(H.V-1)*7),H.y=fe.getUTCFullYear(),H.m=fe.getUTCMonth(),H.d=fe.getUTCDate()+(H.w+6)%7):(fe=T_(Gd(H.y,0,1)),ge=fe.getDay(),fe=ge>4||ge===0?fv.ceil(fe):fv(fe),fe=Xh.offset(fe,(H.V-1)*7),H.y=fe.getFullYear(),H.m=fe.getMonth(),H.d=fe.getDate()+(H.w+6)%7)}else("W"in H||"U"in H)&&("w"in H||(H.w="u"in H?H.u%7:"W"in H?1:0),ge="Z"in H?O_(Gd(H.y,0,1)).getUTCDay():T_(Gd(H.y,0,1)).getDay(),H.m=0,H.d="W"in H?(H.w+6)%7+H.W*7-(ge+5)%7:H.w+H.U*7-(ge+6)%7);return"Z"in H?(H.H+=H.Z/100|0,H.M+=H.Z%100,O_(H)):T_(H)}}function X(F,G,le,H){for(var ae=0,fe=G.length,ge=le.length,de,_e;ae<fe;){if(H>=ge)return-1;if(de=G.charCodeAt(ae++),de===37){if(de=G.charAt(ae++),_e=U[de in NP?G.charAt(ae++):de],!_e||(H=_e(F,le,H))<0)return-1}else if(de!=le.charCodeAt(H++))return-1}return H}function oe(F,G,le){var H=f.exec(G.slice(le));return H?(F.p=m.get(H[0].toLowerCase()),le+H[0].length):-1}function ee(F,G,le){var H=_.exec(G.slice(le));return H?(F.w=w.get(H[0].toLowerCase()),le+H[0].length):-1}function J(F,G,le){var H=p.exec(G.slice(le));return H?(F.w=b.get(H[0].toLowerCase()),le+H[0].length):-1}function ne(F,G,le){var H=A.exec(G.slice(le));return H?(F.m=j.get(H[0].toLowerCase()),le+H[0].length):-1}function he(F,G,le){var H=x.exec(G.slice(le));return H?(F.m=E.get(H[0].toLowerCase()),le+H[0].length):-1}function Q(F,G,le){return X(F,t,G,le)}function se(F,G,le){return X(F,n,G,le)}function W(F,G,le){return X(F,r,G,le)}function B(F){return s[F.getDay()]}function I(F){return a[F.getDay()]}function z(F){return d[F.getMonth()]}function M(F){return u[F.getMonth()]}function D(F){return i[+(F.getHours()>=12)]}function Y(F){return 1+~~(F.getMonth()/3)}function q(F){return s[F.getUTCDay()]}function re(F){return a[F.getUTCDay()]}function ue(F){return d[F.getUTCMonth()]}function ce(F){return u[F.getUTCMonth()]}function ve(F){return i[+(F.getUTCHours()>=12)]}function k(F){return 1+~~(F.getUTCMonth()/3)}return{format:function(F){var G=V(F+="",O);return G.toString=function(){return F},G},parse:function(F){var G=Z(F+="",!1);return G.toString=function(){return F},G},utcFormat:function(F){var G=V(F+="",N);return G.toString=function(){return F},G},utcParse:function(F){var G=Z(F+="",!0);return G.toString=function(){return F},G}}}var NP={"-":"",_:" ",0:"0"},lr=/^\s*\d+/,qie=/^%/,Gie=/[\\^$*+?|[\]().{}]/g;function Bt(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function Yie(e){return e.replace(Gie,"\\$&")}function Yd(e){return new RegExp("^(?:"+e.map(Yie).join("|")+")","i")}function Wd(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function Wie(e,t,n){var r=lr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Kie(e,t,n){var r=lr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Zie(e,t,n){var r=lr.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Xie(e,t,n){var r=lr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Qie(e,t,n){var r=lr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function LP(e,t,n){var r=lr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function DP(e,t,n){var r=lr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Jie(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function eae(e,t,n){var r=lr.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function tae(e,t,n){var r=lr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function kP(e,t,n){var r=lr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function nae(e,t,n){var r=lr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function IP(e,t,n){var r=lr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function rae(e,t,n){var r=lr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function iae(e,t,n){var r=lr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function aae(e,t,n){var r=lr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function oae(e,t,n){var r=lr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function sae(e,t,n){var r=qie.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function lae(e,t,n){var r=lr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function uae(e,t,n){var r=lr.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function UP(e,t){return Bt(e.getDate(),t,2)}function cae(e,t){return Bt(e.getHours(),t,2)}function fae(e,t){return Bt(e.getHours()%12||12,t,2)}function dae(e,t){return Bt(1+Xh.count(Yo(e),e),t,3)}function QD(e,t){return Bt(e.getMilliseconds(),t,3)}function hae(e,t){return QD(e,t)+"000"}function mae(e,t){return Bt(e.getMonth()+1,t,2)}function pae(e,t){return Bt(e.getMinutes(),t,2)}function gae(e,t){return Bt(e.getSeconds(),t,2)}function vae(e){var t=e.getDay();return t===0?7:t}function yae(e,t){return Bt(vy.count(Yo(e)-1,e),t,2)}function JD(e){var t=e.getDay();return t>=4||t===0?sf(e):sf.ceil(e)}function bae(e,t){return e=JD(e),Bt(sf.count(Yo(e),e)+(Yo(e).getDay()===4),t,2)}function _ae(e){return e.getDay()}function xae(e,t){return Bt(fv.count(Yo(e)-1,e),t,2)}function wae(e,t){return Bt(e.getFullYear()%100,t,2)}function Sae(e,t){return e=JD(e),Bt(e.getFullYear()%100,t,2)}function Cae(e,t){return Bt(e.getFullYear()%1e4,t,4)}function Eae(e,t){var n=e.getDay();return e=n>=4||n===0?sf(e):sf.ceil(e),Bt(e.getFullYear()%1e4,t,4)}function Aae(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Bt(t/60|0,"0",2)+Bt(t%60,"0",2)}function BP(e,t){return Bt(e.getUTCDate(),t,2)}function Tae(e,t){return Bt(e.getUTCHours(),t,2)}function Oae(e,t){return Bt(e.getUTCHours()%12||12,t,2)}function jae(e,t){return Bt(1+gy.count(Wo(e),e),t,3)}function ek(e,t){return Bt(e.getUTCMilliseconds(),t,3)}function Pae(e,t){return ek(e,t)+"000"}function Mae(e,t){return Bt(e.getUTCMonth()+1,t,2)}function Rae(e,t){return Bt(e.getUTCMinutes(),t,2)}function Nae(e,t){return Bt(e.getUTCSeconds(),t,2)}function Lae(e){var t=e.getUTCDay();return t===0?7:t}function Dae(e,t){return Bt(yy.count(Wo(e)-1,e),t,2)}function tk(e){var t=e.getUTCDay();return t>=4||t===0?lf(e):lf.ceil(e)}function kae(e,t){return e=tk(e),Bt(lf.count(Wo(e),e)+(Wo(e).getUTCDay()===4),t,2)}function Iae(e){return e.getUTCDay()}function Uae(e,t){return Bt(dv.count(Wo(e)-1,e),t,2)}function Bae(e,t){return Bt(e.getUTCFullYear()%100,t,2)}function zae(e,t){return e=tk(e),Bt(e.getUTCFullYear()%100,t,2)}function Fae(e,t){return Bt(e.getUTCFullYear()%1e4,t,4)}function $ae(e,t){var n=e.getUTCDay();return e=n>=4||n===0?lf(e):lf.ceil(e),Bt(e.getUTCFullYear()%1e4,t,4)}function Vae(){return"+0000"}function zP(){return"%"}function FP(e){return+e}function $P(e){return Math.floor(+e/1e3)}var Uc,nk,rk;Hae({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Hae(e){return Uc=Hie(e),nk=Uc.format,Uc.parse,rk=Uc.utcFormat,Uc.utcParse,Uc}function qae(e){return new Date(e)}function Gae(e){return e instanceof Date?+e:+new Date(+e)}function CS(e,t,n,r,i,a,s,u,d,f){var m=cS(),p=m.invert,b=m.domain,_=f(".%L"),w=f(":%S"),x=f("%I:%M"),E=f("%I %p"),A=f("%a %d"),j=f("%b %d"),O=f("%B"),N=f("%Y");function U(V){return(d(V)<V?_:u(V)<V?w:s(V)<V?x:a(V)<V?E:r(V)<V?i(V)<V?A:j:n(V)<V?O:N)(V)}return m.invert=function(V){return new Date(p(V))},m.domain=function(V){return arguments.length?b(Array.from(V,Gae)):b().map(qae)},m.ticks=function(V){var Z=b();return e(Z[0],Z[Z.length-1],V??10)},m.tickFormat=function(V,Z){return Z==null?U:f(Z)},m.nice=function(V){var Z=b();return(!V||typeof V.range!="function")&&(V=t(Z[0],Z[Z.length-1],V??10)),V?b(VD(Z,V)):m},m.copy=function(){return Zh(m,CS(e,t,n,r,i,a,s,u,d,f))},m}function Yae(){return ea.apply(CS($ie,Vie,Yo,wS,vy,Xh,_S,yS,bu,nk).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Wae(){return ea.apply(CS(zie,Fie,Wo,SS,yy,gy,xS,bS,bu,rk).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function by(){var e=0,t=1,n,r,i,a,s=Br,u=!1,d;function f(p){return p==null||isNaN(p=+p)?d:s(i===0?.5:(p=(a(p)-n)*i,u?Math.max(0,Math.min(1,p)):p))}f.domain=function(p){return arguments.length?([e,t]=p,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),f):[e,t]},f.clamp=function(p){return arguments.length?(u=!!p,f):u},f.interpolator=function(p){return arguments.length?(s=p,f):s};function m(p){return function(b){var _,w;return arguments.length?([_,w]=b,s=p(_,w),f):[s(0),s(1)]}}return f.range=m(Af),f.rangeRound=m(uS),f.unknown=function(p){return arguments.length?(d=p,f):d},function(p){return a=p,n=p(e),r=p(t),i=n===r?0:1/(r-n),f}}function jl(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function ik(){var e=Ol(by()(Br));return e.copy=function(){return jl(e,ik())},ns.apply(e,arguments)}function ak(){var e=hS(by()).domain([1,10]);return e.copy=function(){return jl(e,ak()).base(e.base())},ns.apply(e,arguments)}function ok(){var e=mS(by());return e.copy=function(){return jl(e,ok()).constant(e.constant())},ns.apply(e,arguments)}function ES(){var e=pS(by());return e.copy=function(){return jl(e,ES()).exponent(e.exponent())},ns.apply(e,arguments)}function Kae(){return ES.apply(null,arguments).exponent(.5)}function sk(){var e=[],t=Br;function n(r){if(r!=null&&!isNaN(r=+r))return t((Wh(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(ll),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>Lre(e,a/r))},n.copy=function(){return sk(t).domain(e)},ns.apply(n,arguments)}function _y(){var e=0,t=.5,n=1,r=1,i,a,s,u,d,f=Br,m,p=!1,b;function _(x){return isNaN(x=+x)?b:(x=.5+((x=+m(x))-a)*(r*x<r*a?u:d),f(p?Math.max(0,Math.min(1,x)):x))}_.domain=function(x){return arguments.length?([e,t,n]=x,i=m(e=+e),a=m(t=+t),s=m(n=+n),u=i===a?0:.5/(a-i),d=a===s?0:.5/(s-a),r=a<i?-1:1,_):[e,t,n]},_.clamp=function(x){return arguments.length?(p=!!x,_):p},_.interpolator=function(x){return arguments.length?(f=x,_):f};function w(x){return function(E){var A,j,O;return arguments.length?([A,j,O]=E,f=sie(x,[A,j,O]),_):[f(0),f(.5),f(1)]}}return _.range=w(Af),_.rangeRound=w(uS),_.unknown=function(x){return arguments.length?(b=x,_):b},function(x){return m=x,i=x(e),a=x(t),s=x(n),u=i===a?0:.5/(a-i),d=a===s?0:.5/(s-a),r=a<i?-1:1,_}}function lk(){var e=Ol(_y()(Br));return e.copy=function(){return jl(e,lk())},ns.apply(e,arguments)}function uk(){var e=hS(_y()).domain([.1,1,10]);return e.copy=function(){return jl(e,uk()).base(e.base())},ns.apply(e,arguments)}function ck(){var e=mS(_y());return e.copy=function(){return jl(e,ck()).constant(e.constant())},ns.apply(e,arguments)}function AS(){var e=pS(_y());return e.copy=function(){return jl(e,AS()).exponent(e.exponent())},ns.apply(e,arguments)}function Zae(){return AS.apply(null,arguments).exponent(.5)}const nh=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:oS,scaleDiverging:lk,scaleDivergingLog:uk,scaleDivergingPow:AS,scaleDivergingSqrt:Zae,scaleDivergingSymlog:ck,scaleIdentity:$D,scaleImplicit:a2,scaleLinear:FD,scaleLog:HD,scaleOrdinal:aS,scalePoint:Ire,scalePow:gS,scaleQuantile:YD,scaleQuantize:WD,scaleRadial:GD,scaleSequential:ik,scaleSequentialLog:ak,scaleSequentialPow:ES,scaleSequentialQuantile:sk,scaleSequentialSqrt:Kae,scaleSequentialSymlog:ok,scaleSqrt:Pie,scaleSymlog:qD,scaleThreshold:KD,scaleTime:Yae,scaleUtc:Wae,tickFormat:zD},Symbol.toStringTag,{value:"Module"}));var Pl=e=>e.chartData,TS=Pe([Pl],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),xy=(e,t,n,r)=>r?TS(e):Pl(e);function uf(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(Oi(t)&&Oi(n))return!0}return!1}function VP(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function Xae(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,i,a;if(Oi(n))i=n;else if(typeof n=="function")return;if(Oi(r))a=r;else if(typeof r=="function")return;var s=[i,a];if(uf(s))return s}}function Qae(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(uf(r))return VP(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,a]=e,s,u;if(i==="auto")t!=null&&(s=Math.min(...t));else if(Je(i))s=i;else if(typeof i=="function")try{t!=null&&(s=i(t?.[0]))}catch{}else if(typeof i=="string"&&Rj.test(i)){var d=Rj.exec(i);if(d==null||t==null)s=void 0;else{var f=+d[1];s=t[0]-f}}else s=t?.[0];if(a==="auto")t!=null&&(u=Math.max(...t));else if(Je(a))u=a;else if(typeof a=="function")try{t!=null&&(u=a(t?.[1]))}catch{}else if(typeof a=="string"&&Nj.test(a)){var m=Nj.exec(a);if(m==null||t==null)u=void 0;else{var p=+m[1];u=t[1]+p}}else u=t?.[1];var b=[s,u];if(uf(b))return t==null?b:VP(b,t,n)}}}var Tf=1e9,Jae={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},jS,gn=!0,Qi="[DecimalError] ",Cu=Qi+"Invalid argument: ",OS=Qi+"Exponent out of range: ",Of=Math.floor,du=Math.pow,eoe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,bi,or=1e7,sn=7,fk=9007199254740991,hv=Of(fk/sn),et={};et.absoluteValue=et.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};et.comparedTo=et.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1};et.decimalPlaces=et.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*sn;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};et.dividedBy=et.div=function(e){return Bo(this,new this.constructor(e))};et.dividedToIntegerBy=et.idiv=function(e){var t=this,n=t.constructor;return Zt(Bo(t,new n(e),0,1),n.precision)};et.equals=et.eq=function(e){return!this.cmp(e)};et.exponent=function(){return Fn(this)};et.greaterThan=et.gt=function(e){return this.cmp(e)>0};et.greaterThanOrEqualTo=et.gte=function(e){return this.cmp(e)>=0};et.isInteger=et.isint=function(){return this.e>this.d.length-2};et.isNegative=et.isneg=function(){return this.s<0};et.isPositive=et.ispos=function(){return this.s>0};et.isZero=function(){return this.s===0};et.lessThan=et.lt=function(e){return this.cmp(e)<0};et.lessThanOrEqualTo=et.lte=function(e){return this.cmp(e)<1};et.logarithm=et.log=function(e){var t,n=this,r=n.constructor,i=r.precision,a=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(bi))throw Error(Qi+"NaN");if(n.s<1)throw Error(Qi+(n.s?"NaN":"-Infinity"));return n.eq(bi)?new r(0):(gn=!1,t=Bo(jh(n,a),jh(e,a),a),gn=!0,Zt(t,i))};et.minus=et.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?mk(t,e):dk(t,(e.s=-e.s,e))};et.modulo=et.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Qi+"NaN");return n.s?(gn=!1,t=Bo(n,e,0,1).times(e),gn=!0,n.minus(t)):Zt(new r(n),i)};et.naturalExponential=et.exp=function(){return hk(this)};et.naturalLogarithm=et.ln=function(){return jh(this)};et.negated=et.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};et.plus=et.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?dk(t,e):mk(t,(e.s=-e.s,e))};et.precision=et.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Cu+e);if(t=Fn(i)+1,r=i.d.length-1,n=r*sn+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};et.squareRoot=et.sqrt=function(){var e,t,n,r,i,a,s,u=this,d=u.constructor;if(u.s<1){if(!u.s)return new d(0);throw Error(Qi+"NaN")}for(e=Fn(u),gn=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=Ha(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Of((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new d(t)):r=new d(i.toString()),n=d.precision,i=s=n+3;;)if(a=r,r=a.plus(Bo(u,a,s+2)).times(.5),Ha(a.d).slice(0,s)===(t=Ha(r.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(Zt(a,n+1,0),a.times(a).eq(u)){r=a;break}}else if(t!="9999")break;s+=4}return gn=!0,Zt(r,n)};et.times=et.mul=function(e){var t,n,r,i,a,s,u,d,f,m=this,p=m.constructor,b=m.d,_=(e=new p(e)).d;if(!m.s||!e.s)return new p(0);for(e.s*=m.s,n=m.e+e.e,d=b.length,f=_.length,d<f&&(a=b,b=_,_=a,s=d,d=f,f=s),a=[],s=d+f,r=s;r--;)a.push(0);for(r=f;--r>=0;){for(t=0,i=d+r;i>r;)u=a[i]+_[r]*b[i-r-1]+t,a[i--]=u%or|0,t=u/or|0;a[i]=(a[i]+t)%or|0}for(;!a[--s];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,gn?Zt(e,p.precision):e};et.toDecimalPlaces=et.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Ka(e,0,Tf),t===void 0?t=r.rounding:Ka(t,0,8),Zt(n,e+Fn(n)+1,t))};et.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Du(r,!0):(Ka(e,0,Tf),t===void 0?t=i.rounding:Ka(t,0,8),r=Zt(new i(r),e+1,t),n=Du(r,!0,e+1)),n};et.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?Du(i):(Ka(e,0,Tf),t===void 0?t=a.rounding:Ka(t,0,8),r=Zt(new a(i),e+Fn(i)+1,t),n=Du(r.abs(),!1,e+Fn(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};et.toInteger=et.toint=function(){var e=this,t=e.constructor;return Zt(new t(e),Fn(e)+1,t.rounding)};et.toNumber=function(){return+this};et.toPower=et.pow=function(e){var t,n,r,i,a,s,u=this,d=u.constructor,f=12,m=+(e=new d(e));if(!e.s)return new d(bi);if(u=new d(u),!u.s){if(e.s<1)throw Error(Qi+"Infinity");return u}if(u.eq(bi))return u;if(r=d.precision,e.eq(bi))return Zt(u,r);if(t=e.e,n=e.d.length-1,s=t>=n,a=u.s,s){if((n=m<0?-m:m)<=fk){for(i=new d(bi),t=Math.ceil(r/sn+4),gn=!1;n%2&&(i=i.times(u),qP(i.d,t)),n=Of(n/2),n!==0;)u=u.times(u),qP(u.d,t);return gn=!0,e.s<0?new d(bi).div(i):Zt(i,r)}}else if(a<0)throw Error(Qi+"NaN");return a=a<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,gn=!1,i=e.times(jh(u,r+f)),gn=!0,i=hk(i),i.s=a,i};et.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?(n=Fn(i),r=Du(i,n<=a.toExpNeg||n>=a.toExpPos)):(Ka(e,1,Tf),t===void 0?t=a.rounding:Ka(t,0,8),i=Zt(new a(i),e,t),n=Fn(i),r=Du(i,e<=n||n<=a.toExpNeg,e)),r};et.toSignificantDigits=et.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Ka(e,1,Tf),t===void 0?t=r.rounding:Ka(t,0,8)),Zt(new r(n),e,t)};et.toString=et.valueOf=et.val=et.toJSON=et[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Fn(e),n=e.constructor;return Du(e,t<=n.toExpNeg||t>=n.toExpPos)};function dk(e,t){var n,r,i,a,s,u,d,f,m=e.constructor,p=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),gn?Zt(t,p):t;if(d=e.d,f=t.d,s=e.e,i=t.e,d=d.slice(),a=s-i,a){for(a<0?(r=d,a=-a,u=f.length):(r=f,i=s,u=d.length),s=Math.ceil(p/sn),u=s>u?s+1:u+1,a>u&&(a=u,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(u=d.length,a=f.length,u-a<0&&(a=u,r=f,f=d,d=r),n=0;a;)n=(d[--a]=d[a]+f[a]+n)/or|0,d[a]%=or;for(n&&(d.unshift(n),++i),u=d.length;d[--u]==0;)d.pop();return t.d=d,t.e=i,gn?Zt(t,p):t}function Ka(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Cu+e)}function Ha(e){var t,n,r,i=e.length-1,a="",s=e[0];if(i>0){for(a+=s,t=1;t<i;t++)r=e[t]+"",n=sn-r.length,n&&(a+=il(n)),a+=r;s=e[t],r=s+"",n=sn-r.length,n&&(a+=il(n))}else if(s===0)return"0";for(;s%10===0;)s/=10;return a+s}var Bo=function(){function e(r,i){var a,s=0,u=r.length;for(r=r.slice();u--;)a=r[u]*i+s,r[u]=a%or|0,s=a/or|0;return s&&r.unshift(s),r}function t(r,i,a,s){var u,d;if(a!=s)d=a>s?1:-1;else for(u=d=0;u<a;u++)if(r[u]!=i[u]){d=r[u]>i[u]?1:-1;break}return d}function n(r,i,a){for(var s=0;a--;)r[a]-=s,s=r[a]<i[a]?1:0,r[a]=s*or+r[a]-i[a];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,a,s){var u,d,f,m,p,b,_,w,x,E,A,j,O,N,U,V,Z,X,oe=r.constructor,ee=r.s==i.s?1:-1,J=r.d,ne=i.d;if(!r.s)return new oe(r);if(!i.s)throw Error(Qi+"Division by zero");for(d=r.e-i.e,Z=ne.length,U=J.length,_=new oe(ee),w=_.d=[],f=0;ne[f]==(J[f]||0);)++f;if(ne[f]>(J[f]||0)&&--d,a==null?j=a=oe.precision:s?j=a+(Fn(r)-Fn(i))+1:j=a,j<0)return new oe(0);if(j=j/sn+2|0,f=0,Z==1)for(m=0,ne=ne[0],j++;(f<U||m)&&j--;f++)O=m*or+(J[f]||0),w[f]=O/ne|0,m=O%ne|0;else{for(m=or/(ne[0]+1)|0,m>1&&(ne=e(ne,m),J=e(J,m),Z=ne.length,U=J.length),N=Z,x=J.slice(0,Z),E=x.length;E<Z;)x[E++]=0;X=ne.slice(),X.unshift(0),V=ne[0],ne[1]>=or/2&&++V;do m=0,u=t(ne,x,Z,E),u<0?(A=x[0],Z!=E&&(A=A*or+(x[1]||0)),m=A/V|0,m>1?(m>=or&&(m=or-1),p=e(ne,m),b=p.length,E=x.length,u=t(p,x,b,E),u==1&&(m--,n(p,Z<b?X:ne,b))):(m==0&&(u=m=1),p=ne.slice()),b=p.length,b<E&&p.unshift(0),n(x,p,E),u==-1&&(E=x.length,u=t(ne,x,Z,E),u<1&&(m++,n(x,Z<E?X:ne,E))),E=x.length):u===0&&(m++,x=[0]),w[f++]=m,u&&x[0]?x[E++]=J[N]||0:(x=[J[N]],E=1);while((N++<U||x[0]!==void 0)&&j--)}return w[0]||w.shift(),_.e=d,Zt(_,s?a+Fn(_)+1:a)}}();function hk(e,t){var n,r,i,a,s,u,d=0,f=0,m=e.constructor,p=m.precision;if(Fn(e)>16)throw Error(OS+Fn(e));if(!e.s)return new m(bi);for(gn=!1,u=p,s=new m(.03125);e.abs().gte(.1);)e=e.times(s),f+=5;for(r=Math.log(du(2,f))/Math.LN10*2+5|0,u+=r,n=i=a=new m(bi),m.precision=u;;){if(i=Zt(i.times(e),u),n=n.times(++d),s=a.plus(Bo(i,n,u)),Ha(s.d).slice(0,u)===Ha(a.d).slice(0,u)){for(;f--;)a=Zt(a.times(a),u);return m.precision=p,t==null?(gn=!0,Zt(a,p)):a}a=s}}function Fn(e){for(var t=e.e*sn,n=e.d[0];n>=10;n/=10)t++;return t}function j_(e,t,n){if(t>e.LN10.sd())throw gn=!0,n&&(e.precision=n),Error(Qi+"LN10 precision limit exceeded");return Zt(new e(e.LN10),t)}function il(e){for(var t="";e--;)t+="0";return t}function jh(e,t){var n,r,i,a,s,u,d,f,m,p=1,b=10,_=e,w=_.d,x=_.constructor,E=x.precision;if(_.s<1)throw Error(Qi+(_.s?"NaN":"-Infinity"));if(_.eq(bi))return new x(0);if(t==null?(gn=!1,f=E):f=t,_.eq(10))return t==null&&(gn=!0),j_(x,f);if(f+=b,x.precision=f,n=Ha(w),r=n.charAt(0),a=Fn(_),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)_=_.times(e),n=Ha(_.d),r=n.charAt(0),p++;a=Fn(_),r>1?(_=new x("0."+n),a++):_=new x(r+"."+n.slice(1))}else return d=j_(x,f+2,E).times(a+""),_=jh(new x(r+"."+n.slice(1)),f-b).plus(d),x.precision=E,t==null?(gn=!0,Zt(_,E)):_;for(u=s=_=Bo(_.minus(bi),_.plus(bi),f),m=Zt(_.times(_),f),i=3;;){if(s=Zt(s.times(m),f),d=u.plus(Bo(s,new x(i),f)),Ha(d.d).slice(0,f)===Ha(u.d).slice(0,f))return u=u.times(2),a!==0&&(u=u.plus(j_(x,f+2,E).times(a+""))),u=Bo(u,new x(p),f),x.precision=E,t==null?(gn=!0,Zt(u,E)):u;u=d,i+=2}}function HP(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=Of(n/sn),e.d=[],r=(n+1)%sn,n<0&&(r+=sn),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=sn;r<i;)e.d.push(+t.slice(r,r+=sn));t=t.slice(r),r=sn-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),gn&&(e.e>hv||e.e<-hv))throw Error(OS+n)}else e.s=0,e.e=0,e.d=[0];return e}function Zt(e,t,n){var r,i,a,s,u,d,f,m,p=e.d;for(s=1,a=p[0];a>=10;a/=10)s++;if(r=t-s,r<0)r+=sn,i=t,f=p[m=0];else{if(m=Math.ceil((r+1)/sn),a=p.length,m>=a)return e;for(f=a=p[m],s=1;a>=10;a/=10)s++;r%=sn,i=r-sn+s}if(n!==void 0&&(a=du(10,s-i-1),u=f/a%10|0,d=t<0||p[m+1]!==void 0||f%a,d=n<4?(u||d)&&(n==0||n==(e.s<0?3:2)):u>5||u==5&&(n==4||d||n==6&&(r>0?i>0?f/du(10,s-i):0:p[m-1])%10&1||n==(e.s<0?8:7))),t<1||!p[0])return d?(a=Fn(e),p.length=1,t=t-a-1,p[0]=du(10,(sn-t%sn)%sn),e.e=Of(-t/sn)||0):(p.length=1,p[0]=e.e=e.s=0),e;if(r==0?(p.length=m,a=1,m--):(p.length=m+1,a=du(10,sn-r),p[m]=i>0?(f/du(10,s-i)%du(10,i)|0)*a:0),d)for(;;)if(m==0){(p[0]+=a)==or&&(p[0]=1,++e.e);break}else{if(p[m]+=a,p[m]!=or)break;p[m--]=0,a=1}for(r=p.length;p[--r]===0;)p.pop();if(gn&&(e.e>hv||e.e<-hv))throw Error(OS+Fn(e));return e}function mk(e,t){var n,r,i,a,s,u,d,f,m,p,b=e.constructor,_=b.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new b(e),gn?Zt(t,_):t;if(d=e.d,p=t.d,r=t.e,f=e.e,d=d.slice(),s=f-r,s){for(m=s<0,m?(n=d,s=-s,u=p.length):(n=p,r=f,u=d.length),i=Math.max(Math.ceil(_/sn),u)+2,s>i&&(s=i,n.length=1),n.reverse(),i=s;i--;)n.push(0);n.reverse()}else{for(i=d.length,u=p.length,m=i<u,m&&(u=i),i=0;i<u;i++)if(d[i]!=p[i]){m=d[i]<p[i];break}s=0}for(m&&(n=d,d=p,p=n,t.s=-t.s),u=d.length,i=p.length-u;i>0;--i)d[u++]=0;for(i=p.length;i>s;){if(d[--i]<p[i]){for(a=i;a&&d[--a]===0;)d[a]=or-1;--d[a],d[i]+=or}d[i]-=p[i]}for(;d[--u]===0;)d.pop();for(;d[0]===0;d.shift())--r;return d[0]?(t.d=d,t.e=r,gn?Zt(t,_):t):new b(0)}function Du(e,t,n){var r,i=Fn(e),a=Ha(e.d),s=a.length;return t?(n&&(r=n-s)>0?a=a.charAt(0)+"."+a.slice(1)+il(r):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+il(-i-1)+a,n&&(r=n-s)>0&&(a+=il(r))):i>=s?(a+=il(i+1-s),n&&(r=n-i-1)>0&&(a=a+"."+il(r))):((r=i+1)<s&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-s)>0&&(i+1===s&&(a+="."),a+=il(r))),e.s<0?"-"+a:a}function qP(e,t){if(e.length>t)return e.length=t,!0}function pk(e){var t,n,r;function i(a){var s=this;if(!(s instanceof i))return new i(a);if(s.constructor=i,a instanceof i){s.s=a.s,s.e=a.e,s.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Cu+a);if(a>0)s.s=1;else if(a<0)a=-a,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(a===~~a&&a<1e7){s.e=0,s.d=[a];return}return HP(s,a.toString())}else if(typeof a!="string")throw Error(Cu+a);if(a.charCodeAt(0)===45?(a=a.slice(1),s.s=-1):s.s=1,eoe.test(a))HP(s,a);else throw Error(Cu+a)}if(i.prototype=et,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=pk,i.config=i.set=toe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function toe(e){if(!e||typeof e!="object")throw Error(Qi+"Object expected");var t,n,r,i=["precision",1,Tf,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(Of(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Cu+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Cu+n+": "+r);return this}var jS=pk(Jae);bi=new jS(1);const Vt=jS;var noe=e=>e,gk={},vk=e=>e===gk,GP=e=>function t(){return arguments.length===0||arguments.length===1&&vk(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},yk=(e,t)=>e===1?t:GP(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=r.filter(s=>s!==gk).length;return a>=e?t(...r):yk(e-a,GP(function(){for(var s=arguments.length,u=new Array(s),d=0;d<s;d++)u[d]=arguments[d];var f=r.map(m=>vk(m)?u.shift():m);return t(...f,...u)}))}),wy=e=>yk(e.length,e),u2=(e,t)=>{for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},roe=wy((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(n=>t[n]).map(e)),ioe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return noe;var i=n.reverse(),a=i[0],s=i.slice(1);return function(){return s.reduce((u,d)=>d(u),a(...arguments))}},c2=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),bk=e=>{var t=null,n=null;return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return t&&i.every((s,u)=>{var d;return s===((d=t)===null||d===void 0?void 0:d[u])})||(t=i,n=e(...i)),n}};function _k(e){var t;return e===0?t=1:t=Math.floor(new Vt(e).abs().log(10).toNumber())+1,t}function xk(e,t,n){for(var r=new Vt(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}wy((e,t,n)=>{var r=+e,i=+t;return r+n*(i-r)});wy((e,t,n)=>{var r=t-+e;return r=r||1/0,(n-e)/r});wy((e,t,n)=>{var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});var wk=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},Sk=(e,t,n)=>{if(e.lte(0))return new Vt(0);var r=_k(e.toNumber()),i=new Vt(10).pow(r),a=e.div(i),s=r!==1?.05:.1,u=new Vt(Math.ceil(a.div(s).toNumber())).add(n).mul(s),d=u.mul(i);return t?new Vt(d.toNumber()):new Vt(Math.ceil(d.toNumber()))},aoe=(e,t,n)=>{var r=new Vt(1),i=new Vt(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new Vt(10).pow(_k(e)-1),i=new Vt(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new Vt(Math.floor(e)))}else e===0?i=new Vt(Math.floor((t-1)/2)):n||(i=new Vt(Math.floor(e)));var s=Math.floor((t-1)/2),u=ioe(roe(d=>i.add(new Vt(d-s).mul(r)).toNumber()),u2);return u(0,t)},Ck=function(t,n,r,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-t)/(r-1)))return{step:new Vt(0),tickMin:new Vt(0),tickMax:new Vt(0)};var s=Sk(new Vt(n).sub(t).div(r-1),i,a),u;t<=0&&n>=0?u=new Vt(0):(u=new Vt(t).add(n).div(2),u=u.sub(new Vt(u).mod(s)));var d=Math.ceil(u.sub(t).div(s).toNumber()),f=Math.ceil(new Vt(n).sub(u).div(s).toNumber()),m=d+f+1;return m>r?Ck(t,n,r,i,a+1):(m<r&&(f=n>0?f+(r-m):f,d=n>0?d:d+(r-m)),{step:s,tickMin:u.sub(new Vt(d).mul(s)),tickMax:u.add(new Vt(f).mul(s))})};function ooe(e){var[t,n]=e,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(r,2),[s,u]=wk([t,n]);if(s===-1/0||u===1/0){var d=u===1/0?[s,...u2(0,r-1).map(()=>1/0)]:[...u2(0,r-1).map(()=>-1/0),u];return t>n?c2(d):d}if(s===u)return aoe(s,r,i);var{step:f,tickMin:m,tickMax:p}=Ck(s,u,a,i,0),b=xk(m,p.add(new Vt(.1).mul(f)),f);return t>n?c2(b):b}function soe(e,t){var[n,r]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[a,s]=wk([n,r]);if(a===-1/0||s===1/0)return[n,r];if(a===s)return[a];var u=Math.max(t,2),d=Sk(new Vt(s).sub(a).div(u-1),i,0),f=[...xk(new Vt(a),new Vt(s),d),s];return i===!1&&(f=f.map(m=>Math.round(m))),n>r?c2(f):f}var loe=bk(ooe),uoe=bk(soe),Ek=e=>e.rootProps.maxBarSize,coe=e=>e.rootProps.barGap,Ak=e=>e.rootProps.barCategoryGap,foe=e=>e.rootProps.barSize,Qh=e=>e.rootProps.stackOffset,PS=e=>e.options.chartName,MS=e=>e.rootProps.syncId,Tk=e=>e.rootProps.syncMethod,RS=e=>e.options.eventEmitter,No={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},yi={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},Sy=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},doe={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:No.angleAxisId,includeHidden:!1,name:void 0,reversed:No.reversed,scale:No.scale,tick:No.tick,tickCount:void 0,ticks:void 0,type:No.type,unit:void 0},hoe={allowDataOverflow:yi.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:yi.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:yi.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:yi.scale,tick:yi.tick,tickCount:yi.tickCount,ticks:void 0,type:yi.type,unit:void 0},moe={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:No.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:No.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:No.scale,tick:No.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},poe={allowDataOverflow:yi.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:yi.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:yi.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:yi.scale,tick:yi.tick,tickCount:yi.tickCount,ticks:void 0,type:"category",unit:void 0},NS=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?moe:doe,LS=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?poe:hoe,Cy=e=>e.polarOptions,DS=Pe([es,ts,Wn],oD),Ok=Pe([Cy,DS],(e,t)=>{if(e!=null)return Fr(e.innerRadius,t,0)}),jk=Pe([Cy,DS],(e,t)=>{if(e!=null)return Fr(e.outerRadius,t,t*.8)}),goe=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},Pk=Pe([Cy],goe);Pe([NS,Pk],Sy);var Mk=Pe([DS,Ok,jk],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});Pe([LS,Mk],Sy);var Rk=Pe([Nt,Cy,Ok,jk,es,ts],(e,t,n,r,i,a)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:s,cy:u,startAngle:d,endAngle:f}=t;return{cx:Fr(s,i,i/2),cy:Fr(u,a,a/2),innerRadius:n,outerRadius:r,startAngle:d,endAngle:f,clockWise:!1}}}),yn=(e,t)=>t,Jh=(e,t,n)=>n;function kS(e){return e?.id}var Zn=e=>{var t=Nt(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},jf=e=>e.tooltip.settings.axisId,Xn=e=>{var t=Zn(e),n=jf(e);return em(e,t,n)};function Nk(e,t,n){var{chartData:r=[]}=t,i=n?.dataKey,a=new Map;return e.forEach(s=>{var u,d=(u=s.data)!==null&&u!==void 0?u:r;if(!(d==null||d.length===0)){var f=kS(s);d.forEach((m,p)=>{var b=i==null?p:String(Kt(m,i,null)),_=Kt(m,s.dataKey,0),w;a.has(b)?w=a.get(b):w={},Object.assign(w,{[f]:_}),a.set(b,w)})}}),Array.from(a.values())}function Ey(e){return e.stackId!=null&&e.dataKey!=null}function YP(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 mv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YP(Object(n),!0).forEach(function(r){voe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function voe(e,t,n){return(t=yoe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yoe(e){var t=boe(e,"string");return typeof t=="symbol"?t:t+""}function boe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var f2=[0,"auto"],gi={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},rs=(e,t)=>{var n=e.cartesianAxis.xAxis[t];return n??gi},vi={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:f2,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:fy},Ml=(e,t)=>{var n=e.cartesianAxis.yAxis[t];return n??vi},_oe={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},IS=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??_oe},kn=(e,t,n)=>{switch(t){case"xAxis":return rs(e,n);case"yAxis":return Ml(e,n);case"zAxis":return IS(e,n);case"angleAxis":return NS(e,n);case"radiusAxis":return LS(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},xoe=(e,t,n)=>{switch(t){case"xAxis":return rs(e,n);case"yAxis":return Ml(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},em=(e,t,n)=>{switch(t){case"xAxis":return rs(e,n);case"yAxis":return Ml(e,n);case"angleAxis":return NS(e,n);case"radiusAxis":return LS(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Lk=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function US(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var Ay=e=>e.graphicalItems.cartesianItems,woe=Pe([yn,Jh],US),BS=(e,t,n)=>e.filter(n).filter(r=>t?.includeHidden===!0?!0:!r.hide),tm=Pe([Ay,kn,woe],BS),Dk=Pe([tm],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Ey)),kk=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),Ik=Pe([tm],kk),zS=e=>e.map(t=>t.data).filter(Boolean).flat(1),Soe=Pe([tm],zS),FS=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},$S=Pe([Soe,xy],FS),VS=(e,t,n)=>t?.dataKey!=null?e.map(r=>({value:Kt(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(i=>({value:Kt(i,r)}))):e.map(r=>({value:r})),Ty=Pe([$S,kn,tm],VS);function Uk(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function Vu(e){return e.filter(t=>Jr(t)||t instanceof Date).map(Number).filter(t=>Ti(t)===!1)}function Coe(e,t,n){return!n||typeof t!="number"||Ti(t)?[]:n.length?Vu(n.flatMap(r=>{var i=Kt(e,r.dataKey),a,s;if(Array.isArray(i)?[a,s]=i:a=s=i,!(!Oi(a)||!Oi(s)))return[t-a,t+s]})):[]}var Eoe=Pe([Dk,xy,Xn],Nk),Bk=(e,t,n)=>{var r={},i=t.reduce((a,s)=>(s.stackId==null||(a[s.stackId]==null&&(a[s.stackId]=[]),a[s.stackId].push(s)),a),r);return Object.fromEntries(Object.entries(i).map(a=>{var[s,u]=a,d=u.map(kS);return[s,{stackedData:Fte(e,d,n),graphicalItems:u}]}))},d2=Pe([Eoe,Dk,Qh],Bk),zk=(e,t,n)=>{var{dataStartIndex:r,dataEndIndex:i}=t;if(n!=="zAxis"){var a=Gte(e,r,i);if(!(a!=null&&a[0]===0&&a[1]===0))return a}},Aoe=Pe([d2,Pl,yn],zk),Fk=(e,t,n,r,i)=>n.length>0?e.flatMap(a=>n.flatMap(s=>{var u,d,f=(u=r[s.id])===null||u===void 0?void 0:u.filter(p=>Uk(i,p)),m=Kt(a,(d=t.dataKey)!==null&&d!==void 0?d:s.dataKey);return{value:m,errorDomain:Coe(a,m,f)}})).filter(Boolean):t?.dataKey!=null?e.map(a=>({value:Kt(a,t.dataKey),errorDomain:[]})):e.map(a=>({value:a,errorDomain:[]})),Oy=e=>e.errorBars,$k=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>Uk(n,r));Pe([Ik,Oy,yn],$k);var Toe=Pe([$S,kn,Ik,Oy,yn],Fk);function Ooe(e){var{value:t}=e;if(Jr(t)||t instanceof Date)return t}var WP=e=>{var t=e.flatMap(r=>[r.value,r.errorDomain]).flat(1),n=Vu(t);if(n.length!==0)return[Math.min(...n),Math.max(...n)]},joe=(e,t,n)=>{var r=e.map(Ooe).filter(i=>i!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&AL(r))?PD(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},HS=e=>{var t;if(e==null||!("domain"in e))return f2;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var n=Vu(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:f2},pv=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.filter(Boolean);if(i.length!==0){var a=i.flat(),s=Math.min(...a),u=Math.max(...a);return[s,u]}},Vk=e=>e.referenceElements.dots,Pf=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),Poe=Pe([Vk,yn,Jh],Pf),Hk=e=>e.referenceElements.areas,Moe=Pe([Hk,yn,Jh],Pf),qk=e=>e.referenceElements.lines,Roe=Pe([qk,yn,Jh],Pf),Gk=(e,t)=>{var n=Vu(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},Noe=Pe(Poe,yn,Gk),Yk=(e,t)=>{var n=Vu(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},Loe=Pe([Moe,yn],Yk),Wk=(e,t)=>{var n=Vu(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},Doe=Pe(Roe,yn,Wk),koe=Pe(Noe,Doe,Loe,(e,t,n)=>pv(e,n,t)),Kk=Pe([kn],HS),qS=(e,t,n,r,i,a,s)=>{var u=Xae(t,e.allowDataOverflow);if(u!=null)return u;var d=a==="vertical"&&s==="xAxis"||a==="horizontal"&&s==="yAxis",f=d?pv(n,i,WP(r)):pv(i,WP(r));return Qae(t,f,e.allowDataOverflow)},Ioe=Pe([kn,Kk,Aoe,Toe,koe,Nt,yn],qS),Uoe=[0,1],GS=(e,t,n,r,i,a,s)=>{if(!((e==null||n==null||n.length===0)&&s===void 0)){var{dataKey:u,type:d}=e,f=Tl(t,a);return f&&u==null?PD(0,n.length):d==="category"?joe(r,e,f):i==="expand"?Uoe:s}},YS=Pe([kn,Nt,$S,Ty,Qh,yn,Ioe],GS),Zk=(e,t,n,r,i)=>{if(e!=null){var{scale:a,type:s}=e;if(a==="auto")return t==="radial"&&i==="radiusAxis"?"band":t==="radial"&&i==="angleAxis"?"linear":s==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?"point":s==="category"?"band":"linear";if(typeof a=="string"){var u="scale".concat(Gh(a));return u in nh?u:"point"}}},Mf=Pe([kn,Nt,Lk,PS,yn],Zk);function Boe(e){if(e!=null){if(e in nh)return nh[e]();var t="scale".concat(Gh(e));if(t in nh)return nh[t]()}}function WS(e,t,n,r){if(!(n==null||r==null)){if(typeof e.scale=="function")return e.scale.copy().domain(n).range(r);var i=Boe(t);if(i!=null){var a=i.domain(n).range(r);return kte(a),a}}}var KS=(e,t,n)=>{var r=HS(t);if(!(n!=="auto"&&n!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(r)&&(r[0]==="auto"||r[1]==="auto")&&uf(e))return loe(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&uf(e))return uoe(e,t.tickCount,t.allowDecimals)}},ZS=Pe([YS,em,Mf],KS),XS=(e,t,n,r)=>{if(r!=="angleAxis"&&e?.type==="number"&&uf(t)&&Array.isArray(n)&&n.length>0){var i=t[0],a=n[0],s=t[1],u=n[n.length-1];return[Math.min(i,a),Math.max(s,u)]}return t},zoe=Pe([kn,YS,ZS,yn],XS),Foe=Pe(Ty,kn,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(Vu(e.map(u=>u.value))).sort((u,d)=>u-d);if(r.length<2)return 1/0;var i=r[r.length-1]-r[0];if(i===0)return 1/0;for(var a=0;a<r.length-1;a++){var s=r[a+1]-r[a];n=Math.min(n,s)}return n/i}}),Xk=Pe(Foe,Nt,Ak,Wn,(e,t,n,r)=>r,(e,t,n,r,i)=>{if(!Oi(e))return 0;var a=t==="vertical"?r.height:r.width;if(i==="gap")return e*a/2;if(i==="no-gap"){var s=Fr(n,e*a),u=e*a/2;return u-s-(u-s)/a*s}return 0}),$oe=(e,t)=>{var n=rs(e,t);return n==null||typeof n.padding!="string"?0:Xk(e,"xAxis",t,n.padding)},Voe=(e,t)=>{var n=Ml(e,t);return n==null||typeof n.padding!="string"?0:Xk(e,"yAxis",t,n.padding)},Hoe=Pe(rs,$oe,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((n=i.left)!==null&&n!==void 0?n:0)+t,right:((r=i.right)!==null&&r!==void 0?r:0)+t}}),qoe=Pe(Ml,Voe,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((n=i.top)!==null&&n!==void 0?n:0)+t,bottom:((r=i.bottom)!==null&&r!==void 0?r:0)+t}}),Goe=Pe([Wn,Hoe,hy,dy,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:a}=r;return i?[a.left,n.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),Yoe=Pe([Wn,Nt,qoe,hy,dy,(e,t,n)=>n],(e,t,n,r,i,a)=>{var{padding:s}=i;return a?[r.height-s.bottom,s.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),nm=(e,t,n,r)=>{var i;switch(t){case"xAxis":return Goe(e,n,r);case"yAxis":return Yoe(e,n,r);case"zAxis":return(i=IS(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return Pk(e);case"radiusAxis":return Mk(e,n);default:return}},Qk=Pe([kn,nm],Sy),_l=Pe([kn,Mf,zoe,Qk],WS);Pe([tm,Oy,yn],$k);function Jk(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var jy=(e,t)=>t,Py=(e,t,n)=>n,Woe=Pe(Qw,jy,Py,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(Jk)),Koe=Pe(Jw,jy,Py,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(Jk)),e8=(e,t)=>({width:e.width,height:t.height}),Zoe=(e,t)=>{var n=typeof t.width=="number"?t.width:fy;return{width:n,height:e.height}},t8=Pe(Wn,rs,e8),Xoe=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},Qoe=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},Joe=Pe(ts,Wn,Woe,jy,Py,(e,t,n,r,i)=>{var a={},s;return n.forEach(u=>{var d=e8(t,u);s==null&&(s=Xoe(t,r,e));var f=r==="top"&&!i||r==="bottom"&&i;a[u.id]=s-Number(f)*d.height,s+=(f?-1:1)*d.height}),a}),ese=Pe(es,Wn,Koe,jy,Py,(e,t,n,r,i)=>{var a={},s;return n.forEach(u=>{var d=Zoe(t,u);s==null&&(s=Qoe(t,r,e));var f=r==="left"&&!i||r==="right"&&i;a[u.id]=s-Number(f)*d.width,s+=(f?-1:1)*d.width}),a}),tse=(e,t)=>{var n=Wn(e),r=rs(e,t);if(r!=null){var i=Joe(e,r.orientation,r.mirror),a=i[t];return a==null?{x:n.left,y:0}:{x:n.left,y:a}}},nse=(e,t)=>{var n=Wn(e),r=Ml(e,t);if(r!=null){var i=ese(e,r.orientation,r.mirror),a=i[t];return a==null?{x:0,y:n.top}:{x:a,y:n.top}}},n8=Pe(Wn,Ml,(e,t)=>{var n=typeof t.width=="number"?t.width:fy;return{width:n,height:e.height}}),KP=(e,t,n)=>{switch(t){case"xAxis":return t8(e,n).width;case"yAxis":return n8(e,n).height;default:return}},r8=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:i,type:a,dataKey:s}=n,u=Tl(e,r),d=t.map(f=>f.value);if(s&&u&&a==="category"&&i&&AL(d))return d}},QS=Pe([Nt,Ty,kn,yn],r8),i8=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:a}=n,s=Tl(e,r);if(s&&(i==="number"||a!=="auto"))return t.map(u=>u.value)}},JS=Pe([Nt,Ty,em,yn],i8),ZP=Pe([Nt,xoe,Mf,_l,QS,JS,nm,ZS,yn],(e,t,n,r,i,a,s,u,d)=>{if(t==null)return null;var f=Tl(e,d);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:d,categoricalDomain:a,duplicateDomain:i,isCategorical:f,niceTicks:u,range:s,realScaleType:n,scale:r}}),rse=(e,t,n,r,i,a,s,u,d)=>{if(!(t==null||r==null)){var f=Tl(e,d),{type:m,ticks:p,tickCount:b}=t,_=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,w=m==="category"&&r.bandwidth?r.bandwidth()/_:0;w=d==="angleAxis"&&a!=null&&a.length>=2?sr(a[0]-a[1])*2*w:w;var x=p||i;if(x){var E=x.map((A,j)=>{var O=s?s.indexOf(A):A;return{index:j,coordinate:r(O)+w,value:A,offset:w}});return E.filter(A=>!Ti(A.coordinate))}return f&&u?u.map((A,j)=>({coordinate:r(A)+w,value:A,index:j,offset:w})):r.ticks?r.ticks(b).map(A=>({coordinate:r(A)+w,value:A,offset:w})):r.domain().map((A,j)=>({coordinate:r(A)+w,value:s?s[A]:A,index:j,offset:w}))}},a8=Pe([Nt,em,Mf,_l,ZS,nm,QS,JS,yn],rse),ise=(e,t,n,r,i,a,s)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var u=Tl(e,s),{tickCount:d}=t,f=0;return f=s==="angleAxis"&&r?.length>=2?sr(r[0]-r[1])*2*f:f,u&&a?a.map((m,p)=>({coordinate:n(m)+f,value:m,index:p,offset:f})):n.ticks?n.ticks(d).map(m=>({coordinate:n(m)+f,value:m,offset:f})):n.domain().map((m,p)=>({coordinate:n(m)+f,value:i?i[m]:m,index:p,offset:f}))}},xl=Pe([Nt,em,_l,nm,QS,JS,yn],ise),wl=Pe(kn,_l,(e,t)=>{if(!(e==null||t==null))return mv(mv({},e),{},{scale:t})}),ase=Pe([kn,Mf,YS,Qk],WS);Pe((e,t,n)=>IS(e,n),ase,(e,t)=>{if(!(e==null||t==null))return mv(mv({},e),{},{scale:t})});var ose=Pe([Nt,Qw,Jw],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),o8=e=>e.options.defaultTooltipEventType,s8=e=>e.options.validateTooltipEventTypes;function l8(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function eC(e,t){var n=o8(e),r=s8(e);return l8(t,n,r)}function sse(e){return it(t=>eC(t,e))}var u8=(e,t)=>{var n,r=Number(t);if(!(Ti(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},lse=e=>e.tooltip.settings,al={active:!1,index:null,dataKey:void 0,coordinate:void 0},use={itemInteraction:{click:al,hover:al},axisInteraction:{click:al,hover:al},keyboardInteraction:al,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},c8=Rt({name:"tooltip",initialState:use,reducers:{addTooltipEntrySettings(e,t){e.tooltipItemPayloads.push(t.payload)},removeTooltipEntrySettings(e,t){var n=Uo(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate,e.keyboardInteraction.dataKey=t.payload.activeDataKey}}}),{addTooltipEntrySettings:cse,removeTooltipEntrySettings:fse,setTooltipSettingsState:dse,setActiveMouseOverItemIndex:f8,mouseLeaveItem:hse,mouseLeaveChart:d8,setActiveClickItemIndex:mse,setMouseOverAxisIndex:h8,setMouseClickAxisIndex:pse,setSyncInteraction:h2,setKeyboardInteraction:m2}=c8.actions,gse=c8.reducer;function XP(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 Zp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XP(Object(n),!0).forEach(function(r){vse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vse(e,t,n){return(t=yse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yse(e){var t=bse(e,"string");return typeof t=="symbol"?t:t+""}function bse(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _se(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function xse(e){return e.index!=null}var m8=(e,t,n,r)=>{if(t==null)return al;var i=_se(e,t,n);if(i==null)return al;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var a=e.settings.active===!0;if(xse(i)){if(a)return Zp(Zp({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r};return Zp(Zp({},al),{},{coordinate:i.coordinate})},tC=(e,t)=>{var n=e?.index;if(n==null)return null;var r=Number(n);if(!Oi(r))return n;var i=0,a=1/0;return t.length>0&&(a=t.length-1),String(Math.max(i,Math.min(r,a)))},p8=(e,t,n,r,i,a,s,u)=>{if(!(a==null||u==null)){var d=s[0],f=d==null?void 0:u(d.positions,a);if(f!=null)return f;var m=i?.[Number(a)];if(m)switch(n){case"horizontal":return{x:m.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:m.coordinate}}}},g8=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;return n==="hover"?i=e.itemInteraction.hover.dataKey:i=e.itemInteraction.click.dataKey,i==null&&r!=null?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(a=>{var s;return((s=a.settings)===null||s===void 0?void 0:s.dataKey)===i})},rm=e=>e.options.tooltipPayloadSearcher,Rf=e=>e.tooltip;function QP(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 JP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QP(Object(n),!0).forEach(function(r){wse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wse(e,t,n){return(t=Sse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sse(e){var t=Cse(e,"string");return typeof t=="symbol"?t:t+""}function Cse(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ese(e,t){return e??t}var v8=(e,t,n,r,i,a,s)=>{if(!(t==null||a==null)){var{chartData:u,computedData:d,dataStartIndex:f,dataEndIndex:m}=n,p=[];return e.reduce((b,_)=>{var w,{dataDefinedOnItem:x,settings:E}=_,A=Ese(x,u),j=Array.isArray(A)?sD(A,f,m):A,O=(w=E?.dataKey)!==null&&w!==void 0?w:r?.dataKey,N=E?.nameKey,U;if(r!=null&&r.dataKey&&Array.isArray(j)&&!Array.isArray(j[0])&&s==="axis"?U=TL(j,r.dataKey,i):U=a(j,t,d,N),Array.isArray(U))U.forEach(Z=>{var X=JP(JP({},E),{},{name:Z.name,unit:Z.unit,color:void 0,fill:void 0});b.push(Lj({tooltipEntrySettings:X,dataKey:Z.dataKey,payload:Z.payload,value:Kt(Z.payload,Z.dataKey),name:Z.name}))});else{var V;b.push(Lj({tooltipEntrySettings:E,dataKey:O,payload:U,value:Kt(U,O),name:(V=Kt(U,N))!==null&&V!==void 0?V:E?.name}))}return b},p)}},nC=Pe([Xn,Nt,Lk,PS,Zn],Zk),Ase=Pe([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),Tse=Pe([Zn,jf],US),im=Pe([Ase,Xn,Tse],BS),Ose=Pe([im],e=>e.filter(Ey)),jse=Pe([im],zS),Nf=Pe([jse,Pl],FS),Pse=Pe([Ose,Pl,Xn],Nk),rC=Pe([Nf,Xn,im],VS),Mse=Pe([Xn],HS),Rse=Pe([im],e=>e.filter(Ey)),Nse=Pe([Pse,Rse,Qh],Bk),Lse=Pe([Nse,Pl,Zn],zk),Dse=Pe([im],kk),kse=Pe([Nf,Xn,Dse,Oy,Zn],Fk),Ise=Pe([Vk,Zn,jf],Pf),Use=Pe([Ise,Zn],Gk),Bse=Pe([Hk,Zn,jf],Pf),zse=Pe([Bse,Zn],Yk),Fse=Pe([qk,Zn,jf],Pf),$se=Pe([Fse,Zn],Wk),Vse=Pe([Use,$se,zse],pv),Hse=Pe([Xn,Mse,Lse,kse,Vse,Nt,Zn],qS),y8=Pe([Xn,Nt,Nf,rC,Qh,Zn,Hse],GS),qse=Pe([y8,Xn,nC],KS),Gse=Pe([Xn,y8,qse,Zn],XS),b8=e=>{var t=Zn(e),n=jf(e),r=!1;return nm(e,t,n,r)},_8=Pe([Xn,b8],Sy),x8=Pe([Xn,nC,Gse,_8],WS),Yse=Pe([Nt,rC,Xn,Zn],r8),Wse=Pe([Nt,rC,Xn,Zn],i8),Kse=(e,t,n,r,i,a,s,u)=>{if(t){var{type:d}=t,f=Tl(e,u);if(r){var m=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,p=d==="category"&&r.bandwidth?r.bandwidth()/m:0;return p=u==="angleAxis"&&i!=null&&i?.length>=2?sr(i[0]-i[1])*2*p:p,f&&s?s.map((b,_)=>({coordinate:r(b)+p,value:b,index:_,offset:p})):r.domain().map((b,_)=>({coordinate:r(b)+p,value:a?a[b]:b,index:_,offset:p}))}}},is=Pe([Nt,Xn,nC,x8,b8,Yse,Wse,Zn],Kse),iC=Pe([o8,s8,lse],(e,t,n)=>l8(n.shared,e,t)),w8=e=>e.tooltip.settings.trigger,aC=e=>e.tooltip.settings.defaultIndex,My=Pe([Rf,iC,w8,aC],m8),Sl=Pe([My,Nf],tC),S8=Pe([is,Sl],u8),C8=Pe([My],e=>{if(e)return e.dataKey}),E8=Pe([Rf,iC,w8,aC],g8),Zse=Pe([es,ts,Nt,Wn,is,aC,E8,rm],p8),Xse=Pe([My,Zse],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),Qse=Pe([My],e=>e.active),Jse=Pe([E8,Sl,Pl,Xn,S8,rm,iC],v8),ele=Pe([Jse],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});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 tM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eM(Object(n),!0).forEach(function(r){tle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tle(e,t,n){return(t=nle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nle(e){var t=rle(e,"string");return typeof t=="symbol"?t:t+""}function rle(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ile=()=>it(Xn),ale=()=>{var e=ile(),t=it(is),n=it(x8);return Sh(tM(tM({},e),{},{scale:n}),t)},ole=()=>it(PS),oC=(e,t)=>t,A8=(e,t,n)=>n,sC=(e,t,n,r)=>r,sle=Pe(is,e=>cy(e,t=>t.coordinate)),lC=Pe([Rf,oC,A8,sC],m8),T8=Pe([lC,Nf],tC),lle=(e,t,n)=>{if(t!=null){var r=Rf(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},O8=Pe([Rf,oC,A8,sC],g8),gv=Pe([es,ts,Nt,Wn,is,sC,O8,rm],p8),ule=Pe([lC,gv],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),j8=Pe(is,T8,u8),cle=Pe([O8,T8,Pl,Xn,j8,rm,oC],v8),fle=Pe([lC],e=>({isActive:e.active,activeIndex:e.index})),dle=(e,t,n,r,i,a,s,u)=>{if(!(!e||!t||!r||!i||!a)){var d=Yte(e.chartX,e.chartY,t,n,u);if(d){var f=Kte(d,t),m=Lte(f,s,a,r,i),p=Wte(t,a,m,d);return{activeIndex:String(m),activeCoordinate:p}}}};function p2(){return p2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p2.apply(null,arguments)}function nM(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 Xp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nM(Object(n),!0).forEach(function(r){hle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hle(e,t,n){return(t=mle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mle(e){var t=ple(e,"string");return typeof t=="symbol"?t:t+""}function ple(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gle(e){var{coordinate:t,payload:n,index:r,offset:i,tooltipAxisBandSize:a,layout:s,cursor:u,tooltipEventType:d,chartName:f}=e,m=t,p=n,b=r;if(!u||!m||f!=="ScatterChart"&&d!=="axis")return null;var _,w;if(f==="ScatterChart")_=m,w=Rne;else if(f==="BarChart")_=Nne(s,m,i,a),w=rS;else if(s==="radial"){var{cx:x,cy:E,radius:A,startAngle:j,endAngle:O}=TD(m);_={cx:x,cy:E,startAngle:j,endAngle:O,innerRadius:A,outerRadius:A},w=jD}else _={points:vre(s,m,i)},w=tS;var N=typeof u=="object"&&"className"in u?u.className:void 0,U=Xp(Xp(Xp(Xp({stroke:"#ccc",pointerEvents:"none"},i),_),cn(u,!1)),{},{payload:p,payloadIndex:b,className:Ne("recharts-tooltip-cursor",N)});return T.isValidElement(u)?T.cloneElement(u,U):T.createElement(w,U)}function vle(e){var t=ale(),n=mD(),r=my(),i=ole();return T.createElement(gle,p2({},e,{coordinate:e.coordinate,index:e.index,payload:e.payload,offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var P8=T.createContext(null),yle=()=>T.useContext(P8),P_={exports:{}},rM;function ble(){return rM||(rM=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(d,f,m){this.fn=d,this.context=f,this.once=m||!1}function a(d,f,m,p,b){if(typeof m!="function")throw new TypeError("The listener must be a function");var _=new i(m,p||d,b),w=n?n+f:f;return d._events[w]?d._events[w].fn?d._events[w]=[d._events[w],_]:d._events[w].push(_):(d._events[w]=_,d._eventsCount++),d}function s(d,f){--d._eventsCount===0?d._events=new r:delete d._events[f]}function u(){this._events=new r,this._eventsCount=0}u.prototype.eventNames=function(){var f=[],m,p;if(this._eventsCount===0)return f;for(p in m=this._events)t.call(m,p)&&f.push(n?p.slice(1):p);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(m)):f},u.prototype.listeners=function(f){var m=n?n+f:f,p=this._events[m];if(!p)return[];if(p.fn)return[p.fn];for(var b=0,_=p.length,w=new Array(_);b<_;b++)w[b]=p[b].fn;return w},u.prototype.listenerCount=function(f){var m=n?n+f:f,p=this._events[m];return p?p.fn?1:p.length:0},u.prototype.emit=function(f,m,p,b,_,w){var x=n?n+f:f;if(!this._events[x])return!1;var E=this._events[x],A=arguments.length,j,O;if(E.fn){switch(E.once&&this.removeListener(f,E.fn,void 0,!0),A){case 1:return E.fn.call(E.context),!0;case 2:return E.fn.call(E.context,m),!0;case 3:return E.fn.call(E.context,m,p),!0;case 4:return E.fn.call(E.context,m,p,b),!0;case 5:return E.fn.call(E.context,m,p,b,_),!0;case 6:return E.fn.call(E.context,m,p,b,_,w),!0}for(O=1,j=new Array(A-1);O<A;O++)j[O-1]=arguments[O];E.fn.apply(E.context,j)}else{var N=E.length,U;for(O=0;O<N;O++)switch(E[O].once&&this.removeListener(f,E[O].fn,void 0,!0),A){case 1:E[O].fn.call(E[O].context);break;case 2:E[O].fn.call(E[O].context,m);break;case 3:E[O].fn.call(E[O].context,m,p);break;case 4:E[O].fn.call(E[O].context,m,p,b);break;default:if(!j)for(U=1,j=new Array(A-1);U<A;U++)j[U-1]=arguments[U];E[O].fn.apply(E[O].context,j)}}return!0},u.prototype.on=function(f,m,p){return a(this,f,m,p,!1)},u.prototype.once=function(f,m,p){return a(this,f,m,p,!0)},u.prototype.removeListener=function(f,m,p,b){var _=n?n+f:f;if(!this._events[_])return this;if(!m)return s(this,_),this;var w=this._events[_];if(w.fn)w.fn===m&&(!b||w.once)&&(!p||w.context===p)&&s(this,_);else{for(var x=0,E=[],A=w.length;x<A;x++)(w[x].fn!==m||b&&!w[x].once||p&&w[x].context!==p)&&E.push(w[x]);E.length?this._events[_]=E.length===1?E[0]:E:s(this,_)}return this},u.prototype.removeAllListeners=function(f){var m;return f?(m=n?n+f:f,this._events[m]&&s(this,m)):(this._events=new r,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=n,u.EventEmitter=u,e.exports=u}(P_)),P_.exports}var _le=ble();const xle=Pi(_le);var Ph=new xle,g2="recharts.syncEvent.tooltip",iM="recharts.syncEvent.brush";function uC(e,t){if(t){var n=Number.parseInt(t,10);if(!Ti(n))return e?.[n]}}var wle={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},M8=Rt({name:"options",initialState:wle,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),Sle=M8.reducer,{createEventEmitter:Cle}=M8.actions;function Ele(e){return e.tooltip.syncInteraction}var Ale={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},R8=Rt({name:"chartData",initialState:Ale,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:aM,setDataStartEndIndexes:Tle,setComputedData:w_e}=R8.actions,Ole=R8.reducer,N8=()=>{};function jle(){var e=it(MS),t=it(RS),n=jn(),r=it(Tk),i=it(is),a=my(),s=eS(),u=it(d=>d.rootProps.className);T.useEffect(()=>{if(e==null)return N8;var d=(f,m,p)=>{if(t!==p&&e===f){if(r==="index"){n(m);return}if(i!=null){var b;if(typeof r=="function"){var _={activeTooltipIndex:m.payload.index==null?void 0:Number(m.payload.index),isTooltipActive:m.payload.active,activeIndex:m.payload.index==null?void 0:Number(m.payload.index),activeLabel:m.payload.label,activeDataKey:m.payload.dataKey,activeCoordinate:m.payload.coordinate},w=r(i,_);b=i[w]}else r==="value"&&(b=i.find(V=>String(V.value)===m.payload.label));var{coordinate:x}=m.payload;if(b==null||m.payload.active===!1||x==null||s==null){n(h2({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0}));return}var{x:E,y:A}=x,j=Math.min(E,s.x+s.width),O=Math.min(A,s.y+s.height),N={x:a==="horizontal"?b.coordinate:j,y:a==="horizontal"?O:b.coordinate},U=h2({active:m.payload.active,coordinate:N,dataKey:m.payload.dataKey,index:String(b.index),label:m.payload.label});n(U)}}};return Ph.on(g2,d),()=>{Ph.off(g2,d)}},[u,n,t,e,r,i,a,s])}function Ple(){var e=it(MS),t=it(RS),n=jn();T.useEffect(()=>{if(e==null)return N8;var r=(i,a,s)=>{t!==s&&e===i&&n(Tle(a))};return Ph.on(iM,r),()=>{Ph.off(iM,r)}},[n,t,e])}function Mle(){var e=jn();T.useEffect(()=>{e(Cle())},[e]),jle(),Ple()}function Rle(e,t,n,r,i,a){var s=it(b=>lle(b,e,t)),u=it(RS),d=it(MS),f=it(Tk),m=it(Ele),p=m?.active;T.useEffect(()=>{if(!p&&d!=null&&u!=null){var b=h2({active:a,coordinate:n,dataKey:s,index:i,label:typeof r=="number"?String(r):r});Ph.emit(g2,d,b,u)}},[p,n,s,i,r,u,d,f,a])}function oM(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 sM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oM(Object(n),!0).forEach(function(r){Nle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nle(e,t,n){return(t=Lle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lle(e){var t=Dle(e,"string");return typeof t=="symbol"?t:t+""}function Dle(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kle(e){return e.dataKey}function Ile(e,t){return T.isValidElement(e)?T.cloneElement(e,t):typeof e=="function"?T.createElement(e,t):T.createElement(cne,t)}var lM=[],Ule={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!zu.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function cC(e){var t=Ri(e,Ule),{active:n,allowEscapeViewBox:r,animationDuration:i,animationEasing:a,content:s,filterNull:u,isAnimationActive:d,offset:f,payloadUniqBy:m,position:p,reverseDirection:b,useTranslate3d:_,wrapperStyle:w,cursor:x,shared:E,trigger:A,defaultIndex:j,portal:O,axisId:N}=t,U=jn(),V=typeof j=="number"?String(j):j;T.useEffect(()=>{U(dse({shared:E,trigger:A,axisId:N,active:n,defaultIndex:V}))},[U,E,A,N,n,V]);var Z=eS(),X=_D(),oe=sse(E),{activeIndex:ee,isActive:J}=it(ue=>fle(ue,oe,A,V)),ne=it(ue=>cle(ue,oe,A,V)),he=it(ue=>j8(ue,oe,A,V)),Q=it(ue=>ule(ue,oe,A,V)),se=ne,W=yle(),B=n??J,[I,z]=pte([se,B]),M=oe==="axis"?he:void 0;Rle(oe,A,Q,M,ee,B);var D=O??W;if(D==null)return null;var Y=se??lM;B||(Y=lM),u&&Y.length&&(Y=Xee(se.filter(ue=>ue.value!=null&&(ue.hide!==!0||t.includeHidden)),m,kle));var q=Y.length>0,re=T.createElement(vne,{allowEscapeViewBox:r,animationDuration:i,animationEasing:a,isAnimationActive:d,active:B,coordinate:Q,hasPayload:q,offset:f,position:p,reverseDirection:b,useTranslate3d:_,viewBox:Z,wrapperStyle:w,lastBoundingBox:I,innerRef:z,hasPortalFromProps:!!O},Ile(s,sM(sM({},t),{},{payload:Y,label:M,active:B,coordinate:Q,accessibilityLayer:X})));return T.createElement(T.Fragment,null,Dh.createPortal(re,D),B&&T.createElement(vle,{cursor:x,tooltipEventType:oe,coordinate:Q,payload:se,index:ee}))}var M_={},R_={},N_={},uM;function Ble(){return uM||(uM=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:i,edges:a}={}){let s,u=null;const d=a!=null&&a.includes("leading"),f=a==null||a.includes("trailing"),m=()=>{u!==null&&(n.apply(s,u),s=void 0,u=null)},p=()=>{f&&m(),x()};let b=null;const _=()=>{b!=null&&clearTimeout(b),b=setTimeout(()=>{b=null,p()},r)},w=()=>{b!==null&&(clearTimeout(b),b=null)},x=()=>{w(),s=void 0,u=null},E=()=>{m()},A=function(...j){if(i?.aborted)return;s=this,u=j;const O=b==null;_(),d&&O&&m()};return A.schedule=_,A.cancel=x,A.flush=E,i?.addEventListener("abort",x,{once:!0}),A}e.debounce=t}(N_)),N_}var cM;function zle(){return cM||(cM=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ble();function n(r,i=0,a={}){typeof a!="object"&&(a={});const{leading:s=!1,trailing:u=!0,maxWait:d}=a,f=Array(2);s&&(f[0]="leading"),u&&(f[1]="trailing");let m,p=null;const b=t.debounce(function(...x){m=r.apply(this,x),p=null},i,{edges:f}),_=function(...x){return d!=null&&(p===null&&(p=Date.now()),Date.now()-p>=d)?(m=r.apply(this,x),p=Date.now(),b.cancel(),b.schedule(),m):(b.apply(this,x),m)},w=()=>(b.flush(),m);return _.cancel=b.cancel,_.flush=w,_}e.debounce=n}(R_)),R_}var fM;function Fle(){return fM||(fM=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zle();function n(r,i=0,a={}){const{leading:s=!0,trailing:u=!0}=a;return t.debounce(r,i,{leading:s,maxWait:i,trailing:u})}e.throttle=n}(M_)),M_}var L_,dM;function $le(){return dM||(dM=1,L_=Fle().throttle),L_}var Vle=$le();const Hle=Pi(Vle);var uh=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a]};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 D_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hM(Object(n),!0).forEach(function(r){qle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qle(e,t,n){return(t=Gle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gle(e){var t=Yle(e,"string");return typeof t=="symbol"?t:t+""}function Yle(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Wle=T.forwardRef((e,t)=>{var{aspect:n,initialDimension:r={width:-1,height:-1},width:i="100%",height:a="100%",minWidth:s=0,minHeight:u,maxHeight:d,children:f,debounce:m=0,id:p,className:b,onResize:_,style:w={}}=e,x=T.useRef(null),E=T.useRef();E.current=_,T.useImperativeHandle(t,()=>x.current);var[A,j]=T.useState({containerWidth:r.width,containerHeight:r.height}),O=T.useCallback((U,V)=>{j(Z=>{var X=Math.round(U),oe=Math.round(V);return Z.containerWidth===X&&Z.containerHeight===oe?Z:{containerWidth:X,containerHeight:oe}})},[]);T.useEffect(()=>{var U=oe=>{var ee,{width:J,height:ne}=oe[0].contentRect;O(J,ne),(ee=E.current)===null||ee===void 0||ee.call(E,J,ne)};m>0&&(U=Hle(U,m,{trailing:!0,leading:!1}));var V=new ResizeObserver(U),{width:Z,height:X}=x.current.getBoundingClientRect();return O(Z,X),V.observe(x.current),()=>{V.disconnect()}},[O,m]);var N=T.useMemo(()=>{var{containerWidth:U,containerHeight:V}=A;if(U<0||V<0)return null;uh(gu(i)||gu(a),`The width(%s) and height(%s) are both fixed numbers,
maybe you don't need to use a ResponsiveContainer.`,i,a),uh(!n||n>0,"The aspect(%s) must be greater than zero.",n);var Z=gu(i)?U:i,X=gu(a)?V:a;return n&&n>0&&(Z?X=Z/n:X&&(Z=X*n),d&&X>d&&(X=d)),uh(Z>0||X>0,`The width(%s) and height(%s) of chart should be greater than 0,
please check the style of container, or the props width(%s) and height(%s),
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
height and width.`,Z,X,i,a,s,u,n),T.Children.map(f,oe=>T.cloneElement(oe,{width:Z,height:X,style:D_({width:Z,height:X},oe.props.style)}))},[n,f,a,d,u,s,A,i]);return T.createElement("div",{id:p?"".concat(p):void 0,className:Ne("recharts-responsive-container",b),style:D_(D_({},w),{},{width:i,height:a,minWidth:s,minHeight:u,maxHeight:d}),ref:x},T.createElement("div",{style:{width:0,height:0,overflow:"visible"}},N))}),ul=e=>null;ul.displayName="Cell";function Kle(e,t,n){return(t=Zle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zle(e){var t=Xle(e,"string");return typeof t=="symbol"?t:t+""}function Xle(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Qle{constructor(t){Kle(this,"cache",new Map),this.maxSize=t}get(t){var n=this.cache.get(t);return n!==void 0&&(this.cache.delete(t),this.cache.set(t,n)),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var r=this.cache.keys().next().value;this.cache.delete(r)}this.cache.set(t,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function mM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Jle(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mM(Object(n),!0).forEach(function(r){eue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eue(e,t,n){return(t=tue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tue(e){var t=nue(e,"string");return typeof t=="symbol"?t:t+""}function nue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rue={cacheSize:2e3,enableCache:!0},L8=Jle({},rue),pM=new Qle(L8.cacheSize),iue={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},gM="recharts_measurement_span";function aue(e,t){var n=t.fontSize||"",r=t.fontFamily||"",i=t.fontWeight||"",a=t.fontStyle||"",s=t.letterSpacing||"",u=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(i,"|").concat(a,"|").concat(s,"|").concat(u)}var vM=(e,t)=>{try{var n=document.getElementById(gM);n||(n=document.createElement("span"),n.setAttribute("id",gM),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,iue,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},ch=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||zu.isSsr)return{width:0,height:0};if(!L8.enableCache)return vM(t,n);var r=aue(t,n),i=pM.get(r);if(i)return i;var a=vM(t,n);return pM.set(r,a),a},yM=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,bM=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,oue=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,sue=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,D8={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},lue=Object.keys(D8),$c="NaN";function uue(e,t){return e*D8[t]}class Zr{static parse(t){var n,[,r,i]=(n=sue.exec(t))!==null&&n!==void 0?n:[];return new Zr(parseFloat(r),i??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,Ti(t)&&(this.unit=""),n!==""&&!oue.test(n)&&(this.num=NaN,this.unit=""),lue.includes(n)&&(this.num=uue(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new Zr(NaN,""):new Zr(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Zr(NaN,""):new Zr(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Zr(NaN,""):new Zr(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Zr(NaN,""):new Zr(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Ti(this.num)}}function k8(e){if(e.includes($c))return $c;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,i,a]=(n=yM.exec(t))!==null&&n!==void 0?n:[],s=Zr.parse(r??""),u=Zr.parse(a??""),d=i==="*"?s.multiply(u):s.divide(u);if(d.isNaN())return $c;t=t.replace(yM,d.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,[,m,p,b]=(f=bM.exec(t))!==null&&f!==void 0?f:[],_=Zr.parse(m??""),w=Zr.parse(b??""),x=p==="+"?_.add(w):_.subtract(w);if(x.isNaN())return $c;t=t.replace(bM,x.toString())}return t}var _M=/\(([^()]*)\)/;function cue(e){for(var t=e,n;(n=_M.exec(t))!=null;){var[,r]=n;t=t.replace(_M,k8(r))}return t}function fue(e){var t=e.replace(/\s+/g,"");return t=cue(t),t=k8(t),t}function due(e){try{return fue(e)}catch{return $c}}function k_(e){var t=due(e.slice(5,-1));return t===$c?"":t}var hue=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],mue=["dx","dy","angle","className","breakAll"];function v2(){return v2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v2.apply(null,arguments)}function xM(e,t){if(e==null)return{};var n,r,i=pue(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function pue(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var I8=/[ \f\n\r\t\v\u2028\u2029]+/,U8=e=>{var{children:t,breakAll:n,style:r}=e;try{var i=[];dn(t)||(n?i=t.toString().split(""):i=t.toString().split(I8));var a=i.map(u=>({word:u,width:ch(u,r).width})),s=n?0:ch(" ",r).width;return{wordsWithComputedWidth:a,spaceWidth:s}}catch{return null}},gue=(e,t,n,r,i)=>{var{maxLines:a,children:s,style:u,breakAll:d}=e,f=Je(a),m=s,p=function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return J.reduce((ne,he)=>{var{word:Q,width:se}=he,W=ne[ne.length-1];if(W&&(r==null||i||W.width+se+n<Number(r)))W.words.push(Q),W.width+=se+n;else{var B={words:[Q],width:se};ne.push(B)}return ne},[])},b=p(t),_=ee=>ee.reduce((J,ne)=>J.width>ne.width?J:ne);if(!f||i)return b;var w=b.length>a||_(b).width>Number(r);if(!w)return b;for(var x="…",E=ee=>{var J=m.slice(0,ee),ne=U8({breakAll:d,style:u,children:J+x}).wordsWithComputedWidth,he=p(ne),Q=he.length>a||_(he).width>Number(r);return[Q,he]},A=0,j=m.length-1,O=0,N;A<=j&&O<=m.length-1;){var U=Math.floor((A+j)/2),V=U-1,[Z,X]=E(V),[oe]=E(U);if(!Z&&!oe&&(A=U+1),Z&&oe&&(j=U-1),!Z&&oe){N=X;break}O++}return N||b},wM=e=>{var t=dn(e)?[]:e.toString().split(I8);return[{words:t}]},vue=e=>{var{width:t,scaleToFit:n,children:r,style:i,breakAll:a,maxLines:s}=e;if((t||n)&&!zu.isSsr){var u,d,f=U8({breakAll:a,children:r,style:i});if(f){var{wordsWithComputedWidth:m,spaceWidth:p}=f;u=m,d=p}else return wM(r);return gue({breakAll:a,children:r,maxLines:s,style:i},u,d,t,n)}return wM(r)},SM="#808080",Ry=T.forwardRef((e,t)=>{var{x:n=0,y:r=0,lineHeight:i="1em",capHeight:a="0.71em",scaleToFit:s=!1,textAnchor:u="start",verticalAnchor:d="end",fill:f=SM}=e,m=xM(e,hue),p=T.useMemo(()=>vue({breakAll:m.breakAll,children:m.children,maxLines:m.maxLines,scaleToFit:s,style:m.style,width:m.width}),[m.breakAll,m.children,m.maxLines,s,m.style,m.width]),{dx:b,dy:_,angle:w,className:x,breakAll:E}=m,A=xM(m,mue);if(!Jr(n)||!Jr(r))return null;var j=n+(Je(b)?b:0),O=r+(Je(_)?_:0),N;switch(d){case"start":N=k_("calc(".concat(a,")"));break;case"middle":N=k_("calc(".concat((p.length-1)/2," * -").concat(i," + (").concat(a," / 2))"));break;default:N=k_("calc(".concat(p.length-1," * -").concat(i,")"));break}var U=[];if(s){var V=p[0].width,{width:Z}=m;U.push("scale(".concat(Je(Z)?Z/V:1,")"))}return w&&U.push("rotate(".concat(w,", ").concat(j,", ").concat(O,")")),U.length&&(A.transform=U.join(" ")),T.createElement("text",v2({},cn(A,!0),{ref:t,x:j,y:O,className:Ne("recharts-text",x),textAnchor:u,fill:f.includes("url")?SM:f}),p.map((X,oe)=>{var ee=X.words.join(E?"":" ");return T.createElement("tspan",{x:j,dy:oe===0?N:i,key:"".concat(ee,"-").concat(oe)},ee)}))});Ry.displayName="Text";var yue=["offset"],bue=["labelRef"];function CM(e,t){if(e==null)return{};var n,r,i=_ue(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _ue(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}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 An(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?EM(Object(n),!0).forEach(function(r){xue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xue(e,t,n){return(t=wue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wue(e){var t=Sue(e,"string");return typeof t=="symbol"?t:t+""}function Sue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lo(){return Lo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lo.apply(null,arguments)}var Cue=e=>{var{value:t,formatter:n}=e,r=dn(e.children)?t:e.children;return typeof n=="function"?n(r):r},fC=e=>e!=null&&typeof e=="function",Eue=(e,t)=>{var n=sr(t-e),r=Math.min(Math.abs(t-e),360);return n*r},Aue=(e,t,n,r)=>{var{position:i,offset:a,className:s}=e,{cx:u,cy:d,innerRadius:f,outerRadius:m,startAngle:p,endAngle:b,clockWise:_}=r,w=(f+m)/2,x=Eue(p,b),E=x>=0?1:-1,A,j;i==="insideStart"?(A=p+E*a,j=_):i==="insideEnd"?(A=b-E*a,j=!_):i==="end"&&(A=b+E*a,j=_),j=x<=0?j:!j;var O=zn(u,d,w,A),N=zn(u,d,w,A+(j?1:-1)*359),U="M".concat(O.x,",").concat(O.y,`
A`).concat(w,",").concat(w,",0,1,").concat(j?0:1,`,
`).concat(N.x,",").concat(N.y),V=dn(e.id)?wh("recharts-radial-line-"):e.id;return T.createElement("text",Lo({},n,{dominantBaseline:"central",className:Ne("recharts-radial-bar-label",s)}),T.createElement("defs",null,T.createElement("path",{id:V,d:U})),T.createElement("textPath",{xlinkHref:"#".concat(V)},t))},Tue=(e,t,n)=>{var{cx:r,cy:i,innerRadius:a,outerRadius:s,startAngle:u,endAngle:d}=e,f=(u+d)/2;if(n==="outside"){var{x:m,y:p}=zn(r,i,s+t,f);return{x:m,y:p,textAnchor:m>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"end"};var b=(a+s)/2,{x:_,y:w}=zn(r,i,b,f);return{x:_,y:w,textAnchor:"middle",verticalAnchor:"middle"}},Oue=(e,t)=>{var{parentViewBox:n,offset:r,position:i}=e,{x:a,y:s,width:u,height:d}=t,f=d>=0?1:-1,m=f*r,p=f>0?"end":"start",b=f>0?"start":"end",_=u>=0?1:-1,w=_*r,x=_>0?"end":"start",E=_>0?"start":"end";if(i==="top"){var A={x:a+u/2,y:s-f*r,textAnchor:"middle",verticalAnchor:p};return An(An({},A),n?{height:Math.max(s-n.y,0),width:u}:{})}if(i==="bottom"){var j={x:a+u/2,y:s+d+m,textAnchor:"middle",verticalAnchor:b};return An(An({},j),n?{height:Math.max(n.y+n.height-(s+d),0),width:u}:{})}if(i==="left"){var O={x:a-w,y:s+d/2,textAnchor:x,verticalAnchor:"middle"};return An(An({},O),n?{width:Math.max(O.x-n.x,0),height:d}:{})}if(i==="right"){var N={x:a+u+w,y:s+d/2,textAnchor:E,verticalAnchor:"middle"};return An(An({},N),n?{width:Math.max(n.x+n.width-N.x,0),height:d}:{})}var U=n?{width:u,height:d}:{};return i==="insideLeft"?An({x:a+w,y:s+d/2,textAnchor:E,verticalAnchor:"middle"},U):i==="insideRight"?An({x:a+u-w,y:s+d/2,textAnchor:x,verticalAnchor:"middle"},U):i==="insideTop"?An({x:a+u/2,y:s+m,textAnchor:"middle",verticalAnchor:b},U):i==="insideBottom"?An({x:a+u/2,y:s+d-m,textAnchor:"middle",verticalAnchor:p},U):i==="insideTopLeft"?An({x:a+w,y:s+m,textAnchor:E,verticalAnchor:b},U):i==="insideTopRight"?An({x:a+u-w,y:s+m,textAnchor:x,verticalAnchor:b},U):i==="insideBottomLeft"?An({x:a+w,y:s+d-m,textAnchor:E,verticalAnchor:p},U):i==="insideBottomRight"?An({x:a+u-w,y:s+d-m,textAnchor:x,verticalAnchor:p},U):i&&typeof i=="object"&&(Je(i.x)||gu(i.x))&&(Je(i.y)||gu(i.y))?An({x:a+Fr(i.x,u),y:s+Fr(i.y,d),textAnchor:"end",verticalAnchor:"end"},U):An({x:a+u/2,y:s+d/2,textAnchor:"middle",verticalAnchor:"middle"},U)},jue=e=>"cx"in e&&Je(e.cx);function Xr(e){var{offset:t=5}=e,n=CM(e,yue),r=An({offset:t},n),{viewBox:i,position:a,value:s,children:u,content:d,className:f="",textBreakAll:m,labelRef:p}=r,b=it(Rk),_=eS(),w=a==="center"?_:b??_,x=i||w;if(!x||dn(s)&&dn(u)&&!T.isValidElement(d)&&typeof d!="function")return null;var E=An(An({},r),{},{viewBox:x});if(T.isValidElement(d)){var{labelRef:A}=E,j=CM(E,bue);return T.cloneElement(d,j)}var O;if(typeof d=="function"){if(O=T.createElement(d,E),T.isValidElement(O))return O}else O=Cue(r);var N=jue(x),U=cn(r,!0);if(N&&(a==="insideStart"||a==="insideEnd"||a==="end"))return Aue(r,O,U,x);var V=N?Tue(x,r.offset,r.position):Oue(r,x);return T.createElement(Ry,Lo({ref:p,className:Ne("recharts-label",f)},U,V,{breakAll:m}),O)}Xr.displayName="Label";var B8=e=>{var{cx:t,cy:n,angle:r,startAngle:i,endAngle:a,r:s,radius:u,innerRadius:d,outerRadius:f,x:m,y:p,top:b,left:_,width:w,height:x,clockWise:E,labelViewBox:A}=e;if(A)return A;if(Je(w)&&Je(x)){if(Je(m)&&Je(p))return{x:m,y:p,width:w,height:x};if(Je(b)&&Je(_))return{x:b,y:_,width:w,height:x}}if(Je(m)&&Je(p))return{x:m,y:p,width:0,height:0};if(Je(t)&&Je(n))return{cx:t,cy:n,startAngle:i||r||0,endAngle:a||r||0,innerRadius:d||0,outerRadius:f||u||s||0,clockWise:E};if(e.viewBox)return e.viewBox},Pue=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?T.createElement(Xr,Lo({key:"label-implicit"},r)):Jr(e)?T.createElement(Xr,Lo({key:"label-implicit",value:e},r)):T.isValidElement(e)?e.type===Xr?T.cloneElement(e,An({key:"label-implicit"},r)):T.createElement(Xr,Lo({key:"label-implicit",content:e},r)):fC(e)?T.createElement(Xr,Lo({key:"label-implicit",content:e},r)):e&&typeof e=="object"?T.createElement(Xr,Lo({},e,{key:"label-implicit"},r)):null},Mue=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var{children:i,labelRef:a}=t,s=B8(t),u=Yh(i,Xr).map((f,m)=>T.cloneElement(f,{viewBox:n||s,key:"label-".concat(m)}));if(!r)return u;var d=Pue(t.label,n||s,a);return[d,...u]};Xr.parseViewBox=B8;Xr.renderCallByParent=Mue;var I_={},U_={},AM;function Rue(){return AM||(AM=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n[n.length-1]}e.last=t}(U_)),U_}var B_={},TM;function Nue(){return TM||(TM=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Array.isArray(n)?n:Array.from(n)}e.toArray=t}(B_)),B_}var OM;function Lue(){return OM||(OM=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Rue(),n=Nue(),r=Gw();function i(a){if(r.isArrayLike(a))return t.last(n.toArray(a))}e.last=i}(I_)),I_}var z_,jM;function Due(){return jM||(jM=1,z_=Lue().last),z_}var kue=Due();const Iue=Pi(kue);var Uue=["valueAccessor"],Bue=["data","dataKey","clockWise","id","textBreakAll"];function vv(){return vv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vv.apply(null,arguments)}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 MM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PM(Object(n),!0).forEach(function(r){zue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zue(e,t,n){return(t=Fue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fue(e){var t=$ue(e,"string");return typeof t=="symbol"?t:t+""}function $ue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function RM(e,t){if(e==null)return{};var n,r,i=Vue(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Vue(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Hue=e=>Array.isArray(e.value)?Iue(e.value):e.value;function cl(e){var{valueAccessor:t=Hue}=e,n=RM(e,Uue),{data:r,dataKey:i,clockWise:a,id:s,textBreakAll:u}=n,d=RM(n,Bue);return!r||!r.length?null:T.createElement(_r,{className:"recharts-label-list"},r.map((f,m)=>{var p=dn(i)?t(f,m):Kt(f&&f.payload,i),b=dn(s)?{}:{id:"".concat(s,"-").concat(m)};return T.createElement(Xr,vv({},cn(f,!0),d,b,{parentViewBox:f.parentViewBox,value:p,textBreakAll:u,viewBox:Xr.parseViewBox(dn(a)?f:MM(MM({},f),{},{clockWise:a})),key:"label-".concat(m),index:m}))}))}cl.displayName="LabelList";function que(e,t){return e?e===!0?T.createElement(cl,{key:"labelList-implicit",data:t}):T.isValidElement(e)||fC(e)?T.createElement(cl,{key:"labelList-implicit",data:t,content:e}):typeof e=="object"?T.createElement(cl,vv({data:t},e,{key:"labelList-implicit"})):null:null}function Gue(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var{children:r}=e,i=Yh(r,cl).map((s,u)=>T.cloneElement(s,{data:t,key:"labelList-".concat(u)}));if(!n)return i;var a=que(e.label,t);return[a,...i]}cl.renderCallByParent=Gue;function y2(){return y2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y2.apply(null,arguments)}var z8=e=>{var{cx:t,cy:n,r,className:i}=e,a=Ne("recharts-dot",i);return t===+t&&n===+n&&r===+r?T.createElement("circle",y2({},Jo(e),$w(e),{className:a,cx:t,cy:n,r})):null},F8=e=>e.graphicalItems.polarItems,Yue=Pe([yn,Jh],US),dC=Pe([F8,kn,Yue],BS),Wue=Pe([dC],zS),hC=Pe([Wue,TS],FS),Kue=Pe([hC,kn,dC],VS),Zue=Pe([hC,kn,dC],(e,t,n)=>n.length>0?e.flatMap(r=>n.flatMap(i=>{var a,s=Kt(r,(a=t.dataKey)!==null&&a!==void 0?a:i.dataKey);return{value:s,errorDomain:[]}})).filter(Boolean):t?.dataKey!=null?e.map(r=>({value:Kt(r,t.dataKey),errorDomain:[]})):e.map(r=>({value:r,errorDomain:[]}))),NM=()=>{},Xue=Pe([kn,Kk,NM,Zue,NM,Nt,yn],qS),$8=Pe([kn,Nt,hC,Kue,Qh,yn,Xue],GS),Que=Pe([$8,kn,Mf],KS);Pe([kn,$8,Que,yn],XS);var Jue={radiusAxis:{},angleAxis:{}},V8=Rt({name:"polarAxis",initialState:Jue,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:S_e,removeRadiusAxis:C_e,addAngleAxis:E_e,removeAngleAxis:A_e}=V8.actions,ece=V8.reducer;function LM(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 DM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LM(Object(n),!0).forEach(function(r){tce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tce(e,t,n){return(t=nce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nce(e){var t=rce(e,"string");return typeof t=="symbol"?t:t+""}function rce(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ice=(e,t)=>t,mC=Pe([F8,ice],(e,t)=>e.filter(n=>n.type==="pie").find(n=>n.id===t)),ace=[],pC=(e,t,n)=>n?.length===0?ace:n,H8=Pe([TS,mC,pC],(e,t,n)=>{var{chartData:r}=e;if(t!=null){var i;if(t?.data!=null&&t.data.length>0?i=t.data:i=r,(!i||!i.length)&&n!=null&&(i=n.map(a=>DM(DM({},t.presentationProps),a.props))),i!=null)return i}}),oce=Pe([H8,mC,pC],(e,t,n)=>{if(!(e==null||t==null))return e.map((r,i)=>{var a,s=Kt(r,t.nameKey,t.name),u;return n!=null&&(a=n[i])!==null&&a!==void 0&&(a=a.props)!==null&&a!==void 0&&a.fill?u=n[i].props.fill:typeof r=="object"&&r!=null&&"fill"in r?u=r.fill:u=t.fill,{value:Ef(s,t.dataKey),color:u,payload:r,type:t.legendType}})}),sce=Pe([H8,mC,pC,Wn],(e,t,n,r)=>{if(!(t==null||e==null))return efe({offset:r,pieSettings:t,displayedData:e,cells:n})}),F_={},kM;function lce(){return kM||(kM=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const i=n[Symbol.toStringTag];return i==null||!Object.getOwnPropertyDescriptor(n,Symbol.toStringTag)?.writable?!1:n.toString()===`[object ${i}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}e.isPlainObject=t}(F_)),F_}var $_,IM;function uce(){return IM||(IM=1,$_=lce().isPlainObject),$_}var cce=uce();const fce=Pi(cce);function yv(){return yv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yv.apply(null,arguments)}var UM=(e,t,n,r,i)=>{var a=n-r,s;return s="M ".concat(e,",").concat(t),s+="L ".concat(e+n,",").concat(t),s+="L ".concat(e+n-a/2,",").concat(t+i),s+="L ".concat(e+n-a/2-r,",").concat(t+i),s+="L ".concat(e,",").concat(t," Z"),s},dce={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},hce=e=>{var t=Ri(e,dce),n=T.useRef(),[r,i]=T.useState(-1);T.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var E=n.current.getTotalLength();E&&i(E)}catch{}},[]);var{x:a,y:s,upperWidth:u,lowerWidth:d,height:f,className:m}=t,{animationEasing:p,animationDuration:b,animationBegin:_,isUpdateAnimationActive:w}=t;if(a!==+a||s!==+s||u!==+u||d!==+d||f!==+f||u===0&&d===0||f===0)return null;var x=Ne("recharts-trapezoid",m);return w?T.createElement(nv,{canBegin:r>0,from:{upperWidth:0,lowerWidth:0,height:f,x:a,y:s},to:{upperWidth:u,lowerWidth:d,height:f,x:a,y:s},duration:b,animationEasing:p,isActive:w},E=>{var{upperWidth:A,lowerWidth:j,height:O,x:N,y:U}=E;return T.createElement(nv,{canBegin:r>0,from:"0px ".concat(r===-1?1:r,"px"),to:"".concat(r,"px 0px"),attributeName:"strokeDasharray",begin:_,duration:b,easing:p},T.createElement("path",yv({},cn(t,!0),{className:x,d:UM(N,U,A,j,O),ref:n})))}):T.createElement("g",null,T.createElement("path",yv({},cn(t,!0),{className:x,d:UM(a,s,u,d,f)})))},mce=["option","shapeType","propTransformer","activeClassName","isActive"];function pce(e,t){if(e==null)return{};var n,r,i=gce(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function gce(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function BM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BM(Object(n),!0).forEach(function(r){vce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vce(e,t,n){return(t=yce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yce(e){var t=bce(e,"string");return typeof t=="symbol"?t:t+""}function bce(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _ce(e,t){return bv(bv({},t),e)}function xce(e,t){return e==="symbols"}function zM(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return T.createElement(rS,n);case"trapezoid":return T.createElement(hce,n);case"sector":return T.createElement(jD,n);case"symbols":if(xce(t))return T.createElement(KL,n);break;default:return null}}function wce(e){return T.isValidElement(e)?e.props:e}function q8(e){var{option:t,shapeType:n,propTransformer:r=_ce,activeClassName:i="recharts-active-shape",isActive:a}=e,s=pce(e,mce),u;if(T.isValidElement(t))u=T.cloneElement(t,bv(bv({},s),wce(t)));else if(typeof t=="function")u=t(s);else if(fce(t)&&typeof t!="boolean"){var d=r(t,s);u=T.createElement(zM,{shapeType:n,elementProps:d})}else{var f=s;u=T.createElement(zM,{shapeType:n,elementProps:f})}return a?T.createElement(_r,{className:i},u):u}var gC=(e,t)=>{var n=jn();return(r,i)=>a=>{e?.(r,i,a),n(f8({activeIndex:String(i),activeDataKey:t,activeCoordinate:r.tooltipPosition}))}},vC=e=>{var t=jn();return(n,r)=>i=>{e?.(n,r,i),t(hse())}},yC=(e,t)=>{var n=jn();return(r,i)=>a=>{e?.(r,i,a),n(mse({activeIndex:String(i),activeDataKey:t,activeCoordinate:r.tooltipPosition}))}};function bC(e){var{fn:t,args:n}=e,r=jn(),i=Hr();return T.useEffect(()=>{if(!i){var a=t(n);return r(cse(a)),()=>{r(fse(a))}}},[t,n,r,i]),null}var G8=()=>{};function Y8(e){var{legendPayload:t}=e,n=jn(),r=Hr();return T.useEffect(()=>r?G8:(n(yD(t)),()=>{n(bD(t))}),[n,r,t]),null}function Sce(e){var{legendPayload:t}=e,n=jn(),r=it(Nt);return T.useEffect(()=>r!=="centric"&&r!=="radial"?G8:(n(yD(t)),()=>{n(bD(t))}),[n,r,t]),null}function _C(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=T.useRef(wh(t)),r=T.useRef(e);return r.current!==e&&(n.current=wh(t),r.current=e),n.current}var V_,Cce=()=>{var[e]=T.useState(()=>wh("uid-"));return e},Ece=(V_=L2.useId)!==null&&V_!==void 0?V_:Cce;function Ace(e,t){var n=Ece();return t||(e?"".concat(e,"-").concat(n):n)}var Tce=T.createContext(void 0),xC=e=>{var{id:t,type:n,children:r}=e,i=Ace("recharts-".concat(n),t);return T.createElement(Tce.Provider,{value:i},r(i))},Oce={cartesianItems:[],polarItems:[]},W8=Rt({name:"graphicalItems",initialState:Oce,reducers:{addCartesianGraphicalItem(e,t){e.cartesianItems.push(t.payload)},replaceCartesianGraphicalItem(e,t){var{prev:n,next:r}=t.payload,i=Uo(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=r)},removeCartesianGraphicalItem(e,t){var n=Uo(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},addPolarGraphicalItem(e,t){e.polarItems.push(t.payload)},removePolarGraphicalItem(e,t){var n=Uo(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)}}}),{addCartesianGraphicalItem:jce,replaceCartesianGraphicalItem:Pce,removeCartesianGraphicalItem:Mce,addPolarGraphicalItem:Rce,removePolarGraphicalItem:Nce}=W8.actions,Lce=W8.reducer;function K8(e){var t=jn(),n=T.useRef(null);return T.useEffect(()=>{n.current===null?t(jce(e)):n.current!==e&&t(Pce({prev:n.current,next:e})),n.current=e},[t,e]),T.useEffect(()=>()=>{n.current&&(t(Mce(n.current)),n.current=null)},[t]),null}function Dce(e){var t=jn();return T.useEffect(()=>(t(Rce(e)),()=>{t(Nce(e))}),[t,e]),null}function kce(){}var Ice={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},FM={t:0},H_={t:1};function wC(e){var t=Ri(e,Ice),{isActive:n,canBegin:r,duration:i,easing:a,begin:s,onAnimationEnd:u,onAnimationStart:d,children:f}=t,m=AD("JavascriptAnimate",t.animationManager),[p,b]=T.useState(n?FM:H_),_=T.useRef(null);return T.useEffect(()=>{n||b(H_)},[n]),T.useEffect(()=>{if(!n||!r)return kce;var w=ED(FM,H_,SD(a),i,b,m.getTimeoutController()),x=()=>{_.current=w()};return m.start([d,s,x,i,u]),()=>{m.stop(),_.current&&_.current(),u()}},[n,r,i,a,s,d,u,m]),f(p.t)}var Uce=["onMouseEnter","onClick","onMouseLeave"],Bce=["id"],zce=["id"];function SC(e,t){if(e==null)return{};var n,r,i=Fce(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Fce(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function $M(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 Tn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$M(Object(n),!0).forEach(function(r){$ce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$M(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $ce(e,t,n){return(t=Vce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vce(e){var t=Hce(e,"string");return typeof t=="symbol"?t:t+""}function Hce(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ko(){return Ko=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ko.apply(null,arguments)}function qce(e){var t=T.useMemo(()=>Yh(e.children,ul),[e.children]),n=it(r=>oce(r,e.id,t));return n==null?null:T.createElement(Sce,{legendPayload:n})}function Gce(e){var{dataKey:t,nameKey:n,sectors:r,stroke:i,strokeWidth:a,fill:s,name:u,hide:d,tooltipType:f}=e;return{dataDefinedOnItem:r?.map(m=>m.tooltipPayload),positions:r?.map(m=>m.tooltipPosition),settings:{stroke:i,strokeWidth:a,fill:s,dataKey:t,nameKey:n,name:Ef(u,t),hide:d,type:f,color:s,unit:""}}}var Yce=(e,t)=>e>t?"start":e<t?"end":"middle",Wce=(e,t,n)=>typeof t=="function"?t(e):Fr(t,n,n*.8),Kce=(e,t,n)=>{var{top:r,left:i,width:a,height:s}=t,u=oD(a,s),d=i+Fr(e.cx,a,a/2),f=r+Fr(e.cy,s,s/2),m=Fr(e.innerRadius,u,0),p=Wce(n,e.outerRadius,u),b=e.maxRadius||Math.sqrt(a*a+s*s)/2;return{cx:d,cy:f,innerRadius:m,outerRadius:p,maxRadius:b}},Zce=(e,t)=>{var n=sr(t-e),r=Math.min(Math.abs(t-e),360);return n*r},Xce=(e,t)=>{if(T.isValidElement(e))return T.cloneElement(e,t);if(typeof e=="function")return e(t);var n=Ne("recharts-pie-label-line",typeof e!="boolean"?e.className:"");return T.createElement(tS,Ko({},t,{type:"linear",className:n}))},Qce=(e,t,n)=>{if(T.isValidElement(e))return T.cloneElement(e,t);var r=n;if(typeof e=="function"&&(r=e(t),T.isValidElement(r)))return r;var i=Ne("recharts-pie-label-text",typeof e!="boolean"&&typeof e!="function"?e.className:"");return T.createElement(Ry,Ko({},t,{alignmentBaseline:"middle",className:i}),r)};function Jce(e){var{sectors:t,props:n,showLabels:r}=e,{label:i,labelLine:a,dataKey:s}=n;if(!r||!i||!t)return null;var u=Jo(n),d=cn(i,!1),f=cn(a,!1),m=typeof i=="object"&&"offsetRadius"in i&&i.offsetRadius||20,p=t.map((b,_)=>{var w=(b.startAngle+b.endAngle)/2,x=zn(b.cx,b.cy,b.outerRadius+m,w),E=Tn(Tn(Tn(Tn({},u),b),{},{stroke:"none"},d),{},{index:_,textAnchor:Yce(x.x,b.cx)},x),A=Tn(Tn(Tn(Tn({},u),b),{},{fill:"none",stroke:b.fill},f),{},{index:_,points:[zn(b.cx,b.cy,b.outerRadius,w),x],key:"line"});return T.createElement(_r,{key:"label-".concat(b.startAngle,"-").concat(b.endAngle,"-").concat(b.midAngle,"-").concat(_)},a&&Xce(a,A),Qce(i,E,Kt(b,s)))});return T.createElement(_r,{className:"recharts-pie-labels"},p)}function Z8(e){var{sectors:t,activeShape:n,inactiveShape:r,allOtherPieProps:i,showLabels:a}=e,s=it(Sl),{onMouseEnter:u,onClick:d,onMouseLeave:f}=i,m=SC(i,Uce),p=gC(u,i.dataKey),b=vC(f),_=yC(d,i.dataKey);return t==null?null:T.createElement(T.Fragment,null,t.map((w,x)=>{if(w?.startAngle===0&&w?.endAngle===0&&t.length!==1)return null;var E=n&&String(x)===s,A=s?r:null,j=E?n:A,O=Tn(Tn({},w),{},{stroke:w.stroke,tabIndex:-1,[fD]:x,[dD]:i.dataKey});return T.createElement(_r,Ko({tabIndex:-1,className:"recharts-pie-sector"},oy(m,w,x),{onMouseEnter:p(w,x),onMouseLeave:b(w,x),onClick:_(w,x),key:"sector-".concat(w?.startAngle,"-").concat(w?.endAngle,"-").concat(w.midAngle,"-").concat(x)}),T.createElement(q8,Ko({option:j,isActive:E,shapeType:"sector"},O)))}),T.createElement(Jce,{sectors:t,props:i,showLabels:a}))}function efe(e){var t,{pieSettings:n,displayedData:r,cells:i,offset:a}=e,{cornerRadius:s,startAngle:u,endAngle:d,dataKey:f,nameKey:m,tooltipType:p}=n,b=Math.abs(n.minAngle),_=Zce(u,d),w=Math.abs(_),x=r.length<=1?0:(t=n.paddingAngle)!==null&&t!==void 0?t:0,E=r.filter(V=>Kt(V,f,0)!==0).length,A=(w>=360?E:E-1)*x,j=w-E*b-A,O=r.reduce((V,Z)=>{var X=Kt(Z,f,0);return V+(Je(X)?X:0)},0),N;if(O>0){var U;N=r.map((V,Z)=>{var X=Kt(V,f,0),oe=Kt(V,m,Z),ee=Kce(n,a,V),J=(Je(X)?X:0)/O,ne,he=Tn(Tn({},V),i&&i[Z]&&i[Z].props);Z?ne=U.endAngle+sr(_)*x*(X!==0?1:0):ne=u;var Q=ne+sr(_)*((X!==0?b:0)+J*j),se=(ne+Q)/2,W=(ee.innerRadius+ee.outerRadius)/2,B=[{name:oe,value:X,payload:he,dataKey:f,type:p}],I=zn(ee.cx,ee.cy,W,se);return U=Tn(Tn(Tn(Tn({},n.presentationProps),{},{percent:J,cornerRadius:s,name:oe,tooltipPayload:B,midAngle:se,middleRadius:W,tooltipPosition:I},he),ee),{},{value:Kt(V,f),startAngle:ne,endAngle:Q,payload:he,paddingAngle:sr(_)*x}),U})}return N}function tfe(e){var{props:t,previousSectorsRef:n}=e,{sectors:r,isAnimationActive:i,animationBegin:a,animationDuration:s,animationEasing:u,activeShape:d,inactiveShape:f,onAnimationStart:m,onAnimationEnd:p}=t,b=_C(t,"recharts-pie-"),_=n.current,[w,x]=T.useState(!0),E=T.useCallback(()=>{typeof p=="function"&&p(),x(!1)},[p]),A=T.useCallback(()=>{typeof m=="function"&&m(),x(!0)},[m]);return T.createElement(wC,{begin:a,duration:s,isActive:i,easing:u,onAnimationStart:A,onAnimationEnd:E,key:b},j=>{var O=[],N=r&&r[0],U=N.startAngle;return r.forEach((V,Z)=>{var X=_&&_[Z],oe=Z>0?bl(V,"paddingAngle",0):0;if(X){var ee=jO(X.endAngle-X.startAngle,V.endAngle-V.startAngle),J=Tn(Tn({},V),{},{startAngle:U+oe,endAngle:U+ee(j)+oe});O.push(J),U=J.endAngle}else{var{endAngle:ne,startAngle:he}=V,Q=jO(0,ne-he),se=Q(j),W=Tn(Tn({},V),{},{startAngle:U+oe,endAngle:U+se+oe});O.push(W),U=W.endAngle}}),n.current=O,T.createElement(_r,null,T.createElement(Z8,{sectors:O,activeShape:d,inactiveShape:f,allOtherPieProps:t,showLabels:!w}))})}function nfe(e){var{sectors:t,isAnimationActive:n,activeShape:r,inactiveShape:i}=e,a=T.useRef(null),s=a.current;return n&&t&&t.length&&(!s||s!==t)?T.createElement(tfe,{props:e,previousSectorsRef:a}):T.createElement(Z8,{sectors:t,activeShape:r,inactiveShape:i,allOtherPieProps:e,showLabels:!0})}function rfe(e){var{hide:t,className:n,rootTabIndex:r}=e,i=Ne("recharts-pie",n);return t?null:T.createElement(_r,{tabIndex:r,className:i},T.createElement(nfe,e))}var ife={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:!zu.isSsr,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff"};function afe(e){var{id:t}=e,n=SC(e,Bce),r=T.useMemo(()=>Yh(e.children,ul),[e.children]),i=it(a=>sce(a,t,r));return T.createElement(T.Fragment,null,T.createElement(bC,{fn:Gce,args:Tn(Tn({},e),{},{sectors:i})}),T.createElement(rfe,Ko({},n,{sectors:i})))}function b2(e){var t=Ri(e,ife),{id:n}=t,r=SC(t,zce),i=Jo(r);return T.createElement(xC,{id:n,type:"pie"},a=>T.createElement(T.Fragment,null,T.createElement(Dce,{type:"pie",id:a,data:r.data,dataKey:r.dataKey,hide:r.hide,angleAxisId:0,radiusAxisId:0,name:r.name,nameKey:r.nameKey,tooltipType:r.tooltipType,legendType:r.legendType,fill:r.fill,cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,paddingAngle:r.paddingAngle,minAngle:r.minAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius,cornerRadius:r.cornerRadius,presentationProps:i}),T.createElement(qce,Ko({},r,{id:a})),T.createElement(afe,Ko({},r,{id:a})),r.children))}b2.displayName="Pie";var ofe=Pe([Wn],e=>{if(e)return{top:e.top,bottom:e.bottom,left:e.left,right:e.right}}),sfe=Pe([ofe,es,ts],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),CC=()=>it(sfe),lfe=()=>it(ele);function VM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function HM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VM(Object(n),!0).forEach(function(r){ufe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ufe(e,t,n){return(t=cfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cfe(e){var t=ffe(e,"string");return typeof t=="symbol"?t:t+""}function ffe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dfe=e=>{var{point:t,childIndex:n,mainColor:r,activeDot:i,dataKey:a}=e;if(i===!1||t.x==null||t.y==null)return null;var s=HM(HM({index:n,dataKey:a,cx:t.x,cy:t.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},cn(i,!1)),$w(i)),u;return T.isValidElement(i)?u=T.cloneElement(i,s):typeof i=="function"?u=i(s):u=T.createElement(z8,s),T.createElement(_r,{className:"recharts-active-dot"},u)};function hfe(e){var{points:t,mainColor:n,activeDot:r,itemDataKey:i}=e,a=it(Sl),s=lfe();if(t==null||s==null)return null;var u=t.find(d=>s.includes(d.payload));return dn(u)?null:dfe({point:u,childIndex:Number(a),mainColor:n,dataKey:i,activeDot:r})}var mfe="Invariant failed";function pfe(e,t){throw new Error(mfe)}var gfe=["x","y"];function _2(){return _2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_2.apply(null,arguments)}function qM(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 Kd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qM(Object(n),!0).forEach(function(r){vfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vfe(e,t,n){return(t=yfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yfe(e){var t=bfe(e,"string");return typeof t=="symbol"?t:t+""}function bfe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _fe(e,t){if(e==null)return{};var n,r,i=xfe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function xfe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function wfe(e,t){var{x:n,y:r}=e,i=_fe(e,gfe),a="".concat(n),s=parseInt(a,10),u="".concat(r),d=parseInt(u,10),f="".concat(t.height||i.height),m=parseInt(f,10),p="".concat(t.width||i.width),b=parseInt(p,10);return Kd(Kd(Kd(Kd(Kd({},t),i),s?{x:s}:{}),d?{y:d}:{}),{},{height:m,width:b,name:t.name,radius:t.radius})}function X8(e){return T.createElement(q8,_2({shapeType:"rectangle",propTransformer:wfe,activeClassName:"recharts-active-bar"},e))}var Sfe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(r,i)=>{if(Je(t))return t;var a=Je(r)||dn(r);return a?t(r,i):(a||pfe(),n)}},Cfe={},Q8=Rt({name:"errorBars",initialState:Cfe,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(i=>i.dataKey!==r.dataKey||i.direction!==r.direction))}}}),{addErrorBar:T_e,removeErrorBar:O_e}=Q8.actions,Efe=Q8.reducer,Afe=["children"];function Tfe(e,t){if(e==null)return{};var n,r,i=Ofe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ofe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var jfe={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},Pfe=T.createContext(jfe);function J8(e){var{children:t}=e,n=Tfe(e,Afe);return T.createElement(Pfe.Provider,{value:n},t)}function EC(e,t){var n,r,i=it(f=>rs(f,e)),a=it(f=>Ml(f,t)),s=(n=i?.allowDataOverflow)!==null&&n!==void 0?n:gi.allowDataOverflow,u=(r=a?.allowDataOverflow)!==null&&r!==void 0?r:vi.allowDataOverflow,d=s||u;return{needClip:d,needClipX:s,needClipY:u}}function e7(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,i=CC(),{needClipX:a,needClipY:s,needClip:u}=EC(t,n);if(!u)return null;var{x:d,y:f,width:m,height:p}=i;return T.createElement("clipPath",{id:"clipPath-".concat(r)},T.createElement("rect",{x:a?d:d-m/2,y:s?f:f-p/2,width:a?m:m*2,height:s?p:p*2}))}var Mfe=["onMouseEnter","onMouseLeave","onClick"],Rfe=["value","background","tooltipPosition"],Nfe=["id"],Lfe=["onMouseEnter","onClick","onMouseLeave"];function cf(){return cf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cf.apply(null,arguments)}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 Or(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GM(Object(n),!0).forEach(function(r){Dfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dfe(e,t,n){return(t=kfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kfe(e){var t=Ife(e,"string");return typeof t=="symbol"?t:t+""}function Ife(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _v(e,t){if(e==null)return{};var n,r,i=Ufe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ufe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Bfe=e=>{var{dataKey:t,name:n,fill:r,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:r,value:Ef(n,t),payload:e}]};function zfe(e){var{dataKey:t,stroke:n,strokeWidth:r,fill:i,name:a,hide:s,unit:u}=e;return{dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:n,strokeWidth:r,fill:i,dataKey:t,nameKey:void 0,name:Ef(a,t),hide:s,type:e.tooltipType,color:e.fill,unit:u}}}function Ffe(e){var t=it(Sl),{data:n,dataKey:r,background:i,allOtherBarProps:a}=e,{onMouseEnter:s,onMouseLeave:u,onClick:d}=a,f=_v(a,Mfe),m=gC(s,r),p=vC(u),b=yC(d,r);if(!i||n==null)return null;var _=cn(i,!1);return T.createElement(T.Fragment,null,n.map((w,x)=>{var{value:E,background:A,tooltipPosition:j}=w,O=_v(w,Rfe);if(!A)return null;var N=m(w,x),U=p(w,x),V=b(w,x),Z=Or(Or(Or(Or(Or({option:i,isActive:String(x)===t},O),{},{fill:"#eee"},A),_),oy(f,w,x)),{},{onMouseEnter:N,onMouseLeave:U,onClick:V,dataKey:r,index:x,className:"recharts-bar-background-rectangle"});return T.createElement(X8,cf({key:"background-bar-".concat(x)},Z))}))}function t7(e){var{data:t,props:n,showLabels:r}=e,i=Jo(n),{id:a}=i,s=_v(i,Nfe),{shape:u,dataKey:d,activeBar:f}=n,m=it(Sl),p=it(C8),{onMouseEnter:b,onClick:_,onMouseLeave:w}=n,x=_v(n,Lfe),E=gC(b,d),A=vC(w),j=yC(_,d);return t?T.createElement(T.Fragment,null,t.map((O,N)=>{var U=f&&String(N)===m&&(p==null||d===p),V=U?f:u,Z=Or(Or(Or({},s),O),{},{isActive:U,option:V,index:N,dataKey:d});return T.createElement(_r,cf({className:"recharts-bar-rectangle"},oy(x,O,N),{onMouseEnter:E(O,N),onMouseLeave:A(O,N),onClick:j(O,N),key:"rectangle-".concat(O?.x,"-").concat(O?.y,"-").concat(O?.value,"-").concat(N)}),T.createElement(X8,Z))}),r&&cl.renderCallByParent(n,t)):null}function $fe(e){var{props:t,previousRectanglesRef:n}=e,{data:r,layout:i,isAnimationActive:a,animationBegin:s,animationDuration:u,animationEasing:d,onAnimationEnd:f,onAnimationStart:m}=t,p=n.current,b=_C(t,"recharts-bar-"),[_,w]=T.useState(!1),x=T.useCallback(()=>{typeof f=="function"&&f(),w(!1)},[f]),E=T.useCallback(()=>{typeof m=="function"&&m(),w(!0)},[m]);return T.createElement(wC,{begin:s,duration:u,isActive:a,easing:d,onAnimationEnd:x,onAnimationStart:E,key:b},A=>{var j=A===1?r:r?.map((O,N)=>{var U=p&&p[N];if(U)return Or(Or({},O),{},{x:fa(U.x,O.x,A),y:fa(U.y,O.y,A),width:fa(U.width,O.width,A),height:fa(U.height,O.height,A)});if(i==="horizontal"){var V=fa(0,O.height,A);return Or(Or({},O),{},{y:O.y+O.height-V,height:V})}var Z=fa(0,O.width,A);return Or(Or({},O),{},{width:Z})});return A>0&&(n.current=j??null),j==null?null:T.createElement(_r,null,T.createElement(t7,{props:t,data:j,showLabels:!_}))})}function Vfe(e){var{data:t,isAnimationActive:n}=e,r=T.useRef(null);return n&&t&&t.length&&(r.current==null||r.current!==t)?T.createElement($fe,{previousRectanglesRef:r,props:e}):T.createElement(t7,{props:e,data:t,showLabels:!0})}var n7=0,Hfe=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:Kt(e,t)}};class qfe extends T.PureComponent{render(){var{hide:t,data:n,dataKey:r,className:i,xAxisId:a,yAxisId:s,needClip:u,background:d,id:f}=this.props;if(t)return null;var m=Ne("recharts-bar",i),p=f;return T.createElement(_r,{className:m,id:f},u&&T.createElement("defs",null,T.createElement(e7,{clipPathId:p,xAxisId:a,yAxisId:s})),T.createElement(_r,{className:"recharts-bar-rectangles",clipPath:u?"url(#clipPath-".concat(p,")"):void 0},T.createElement(Ffe,{data:n,dataKey:r,background:d,allOtherBarProps:this.props}),T.createElement(Vfe,this.props)),this.props.children)}}var Gfe={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!zu.isSsr,legendType:"rect",minPointSize:n7,xAxisId:0,yAxisId:0};function Yfe(e){var{xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:a,activeBar:s,animationBegin:u,animationDuration:d,animationEasing:f,isAnimationActive:m}=e,{needClip:p}=EC(t,n),b=my(),_=Hr(),w=Yh(e.children,ul),x=it(j=>_de(j,t,n,_,e.id,w));if(b!=="vertical"&&b!=="horizontal")return null;var E,A=x?.[0];return A==null||A.height==null||A.width==null?E=0:E=b==="vertical"?A.height/2:A.width/2,T.createElement(J8,{xAxisId:t,yAxisId:n,data:x,dataPointFormatter:Hfe,errorBarOffset:E},T.createElement(qfe,cf({},e,{layout:b,needClip:p,data:x,xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:a,activeBar:s,animationBegin:u,animationDuration:d,animationEasing:f,isAnimationActive:m})))}function Wfe(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r},pos:i,bandSize:a,xAxis:s,yAxis:u,xAxisTicks:d,yAxisTicks:f,stackedData:m,displayedData:p,offset:b,cells:_}=e,w=t==="horizontal"?u:s,x=m?w.scale.domain():null,E=Vte({numericAxis:w});return p.map((A,j)=>{var O,N,U,V,Z,X;m?O=Ite(m[j],x):(O=Kt(A,n),Array.isArray(O)||(O=[E,O]));var oe=Sfe(r,n7)(O[1],j);if(t==="horizontal"){var ee,[J,ne]=[u.scale(O[0]),u.scale(O[1])];N=Mj({axis:s,ticks:d,bandSize:a,offset:i.offset,entry:A,index:j}),U=(ee=ne??J)!==null&&ee!==void 0?ee:void 0,V=i.size;var he=J-ne;if(Z=Ti(he)?0:he,X={x:N,y:b.top,width:V,height:b.height},Math.abs(oe)>0&&Math.abs(Z)<Math.abs(oe)){var Q=sr(Z||oe)*(Math.abs(oe)-Math.abs(Z));U-=Q,Z+=Q}}else{var[se,W]=[s.scale(O[0]),s.scale(O[1])];if(N=se,U=Mj({axis:u,ticks:f,bandSize:a,offset:i.offset,entry:A,index:j}),V=W-se,Z=i.size,X={x:b.left,y:U,width:b.width,height:Z},Math.abs(oe)>0&&Math.abs(V)<Math.abs(oe)){var B=sr(V||oe)*(Math.abs(oe)-Math.abs(V));V+=B}}if(N==null||U==null||V==null||Z==null)return null;var I=Or(Or({},A),{},{x:N,y:U,width:V,height:Z,value:m?O:O[1],payload:A,background:X,tooltipPosition:{x:N+V/2,y:U+Z/2}},_&&_[j]&&_[j].props);return I}).filter(Boolean)}function _g(e){var t=Ri(e,Gfe),n=Hr();return T.createElement(xC,{id:t.id,type:"bar"},r=>T.createElement(T.Fragment,null,T.createElement(Y8,{legendPayload:Bfe(t)}),T.createElement(bC,{fn:zfe,args:t}),T.createElement(K8,{type:"bar",id:r,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:$te(t.stackId),hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n}),T.createElement(Yfe,cf({},t,{id:r}))))}_g.displayName="Bar";function YM(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 Qp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YM(Object(n),!0).forEach(function(r){Kfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kfe(e,t,n){return(t=Zfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zfe(e){var t=Xfe(e,"string");return typeof t=="symbol"?t:t+""}function Xfe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Qfe=(e,t)=>t,Jfe=(e,t,n)=>n,ede=(e,t,n,r)=>r,tde=(e,t,n,r,i)=>i,am=Pe([Ay,tde],(e,t)=>e.filter(n=>n.type==="bar").find(n=>n.id===t)),nde=Pe([am],e=>e?.maxBarSize),rde=(e,t,n,r,i,a)=>a,WM=(e,t,n)=>{var r=n??e;if(!dn(r))return Fr(r,t,0)},ide=Pe([Nt,Ay,Qfe,Jfe,ede],(e,t,n,r,i)=>t.filter(a=>e==="horizontal"?a.xAxisId===n:a.yAxisId===r).filter(a=>a.isPanorama===i).filter(a=>a.hide===!1).filter(a=>a.type==="bar")),ade=(e,t,n,r)=>{var i=Nt(e);return i==="horizontal"?d2(e,"yAxis",n,r):d2(e,"xAxis",t,r)},ode=(e,t,n)=>{var r=Nt(e);return r==="horizontal"?KP(e,"xAxis",t):KP(e,"yAxis",n)},sde=(e,t,n)=>{var r={},i=e.filter(Ey),a=e.filter(f=>f.stackId==null),s=i.reduce((f,m)=>(f[m.stackId]||(f[m.stackId]=[]),f[m.stackId].push(m),f),r),u=Object.entries(s).map(f=>{var[m,p]=f,b=p.map(w=>w.dataKey),_=WM(t,n,p[0].barSize);return{stackId:m,dataKeys:b,barSize:_}}),d=a.map(f=>{var m=[f.dataKey].filter(b=>b!=null),p=WM(t,n,f.barSize);return{stackId:void 0,dataKeys:m,barSize:p}});return[...u,...d]},lde=Pe([ide,foe,ode],sde),ude=(e,t,n,r,i)=>{var a,s,u=am(e,t,n,r,i);if(u!=null){var d=Nt(e),f=Ek(e),{maxBarSize:m}=u,p=dn(m)?f:m,b,_;return d==="horizontal"?(b=wl(e,"xAxis",t,r),_=xl(e,"xAxis",t,r)):(b=wl(e,"yAxis",n,r),_=xl(e,"yAxis",n,r)),(a=(s=Sh(b,_,!0))!==null&&s!==void 0?s:p)!==null&&a!==void 0?a:0}},r7=(e,t,n,r)=>{var i=Nt(e),a,s;return i==="horizontal"?(a=wl(e,"xAxis",t,r),s=xl(e,"xAxis",t,r)):(a=wl(e,"yAxis",n,r),s=xl(e,"yAxis",n,r)),Sh(a,s)};function cde(e,t,n,r,i){var a=r.length;if(!(a<1)){var s=Fr(e,n,0,!0),u,d=[];if(Oi(r[0].barSize)){var f=!1,m=n/a,p=r.reduce((A,j)=>A+(j.barSize||0),0);p+=(a-1)*s,p>=n&&(p-=(a-1)*s,s=0),p>=n&&m>0&&(f=!0,m*=.9,p=a*m);var b=(n-p)/2>>0,_={offset:b-s,size:0};u=r.reduce((A,j)=>{var O,N={stackId:j.stackId,dataKeys:j.dataKeys,position:{offset:_.offset+_.size+s,size:f?m:(O=j.barSize)!==null&&O!==void 0?O:0}},U=[...A,N];return _=U[U.length-1].position,U},d)}else{var w=Fr(t,n,0,!0);n-2*w-(a-1)*s<=0&&(s=0);var x=(n-2*w-(a-1)*s)/a;x>1&&(x>>=0);var E=Oi(i)?Math.min(x,i):x;u=r.reduce((A,j,O)=>[...A,{stackId:j.stackId,dataKeys:j.dataKeys,position:{offset:w+(x+s)*O+(x-E)/2,size:E}}],d)}return u}}var fde=(e,t,n,r,i,a,s)=>{var u=dn(s)?t:s,d=cde(n,r,i!==a?i:a,e,u);return i!==a&&d!=null&&(d=d.map(f=>Qp(Qp({},f),{},{position:Qp(Qp({},f.position),{},{offset:f.position.offset-i/2})}))),d},dde=Pe([lde,Ek,coe,Ak,ude,r7,nde],fde),hde=(e,t,n,r)=>wl(e,"xAxis",t,r),mde=(e,t,n,r)=>wl(e,"yAxis",n,r),pde=(e,t,n,r)=>xl(e,"xAxis",t,r),gde=(e,t,n,r)=>xl(e,"yAxis",n,r),vde=Pe([dde,am],(e,t)=>{if(!(e==null||t==null)){var n=e.find(r=>r.stackId===t.stackId&&t.dataKey!=null&&r.dataKeys.includes(t.dataKey));if(n!=null)return n.position}}),yde=(e,t)=>{var n=kS(t);if(!(!e||n==null||t==null)){var{stackId:r}=t;if(r!=null){var i=e[r];if(i){var{stackedData:a}=i;if(a)return a.find(s=>s.key===n)}}}},bde=Pe([ade,am],yde),_de=Pe([Wn,hde,mde,pde,gde,vde,Nt,xy,r7,bde,am,rde],(e,t,n,r,i,a,s,u,d,f,m,p)=>{var{chartData:b,dataStartIndex:_,dataEndIndex:w}=u;if(!(m==null||a==null||s!=="horizontal"&&s!=="vertical"||t==null||n==null||r==null||i==null||d==null)){var{data:x}=m,E;if(x!=null&&x.length>0?E=x:E=b?.slice(_,w+1),E!=null)return Wfe({layout:s,barSettings:m,pos:a,bandSize:d,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,stackedData:f,displayedData:E,offset:e,cells:p})}}),i7=e=>{var{chartData:t}=e,n=jn(),r=Hr();return T.useEffect(()=>r?()=>{}:(n(aM(t)),()=>{n(aM(void 0))}),[t,n,r]),null},KM={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},a7=Rt({name:"brush",initialState:KM,reducers:{setBrushSettings(e,t){return t.payload==null?KM:t.payload}}}),{setBrushSettings:j_e}=a7.actions,xde=a7.reducer;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 Jp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ZM(Object(n),!0).forEach(function(r){o7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function o7(e,t,n){return(t=wde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wde(e){var t=Sde(e,"string");return typeof t=="symbol"?t:t+""}function Sde(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Cde=(e,t)=>{var{x:n,y:r}=e,{x:i,y:a}=t;return{x:Math.min(n,i),y:Math.min(r,a),width:Math.abs(i-n),height:Math.abs(a-r)}};class Ny{static create(t){return new Ny(t)}constructor(t){this.scale=t}get domain(){return this.scale.domain}get range(){return this.scale.range}get rangeMin(){return this.range()[0]}get rangeMax(){return this.range()[1]}get bandwidth(){return this.scale.bandwidth}apply(t){var{bandAware:n,position:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t!==void 0){if(r)switch(r){case"start":return this.scale(t);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+i}case"end":{var a=this.bandwidth?this.bandwidth():0;return this.scale(t)+a}default:return this.scale(t)}if(n){var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+s}return this.scale(t)}}isInRange(t){var n=this.range(),r=n[0],i=n[n.length-1];return r<=i?t>=r&&t<=i:t>=i&&t<=r}}o7(Ny,"EPS",1e-4);var Ede=e=>{var t=Object.keys(e).reduce((n,r)=>Jp(Jp({},n),{},{[r]:Ny.create(e[r])}),{});return Jp(Jp({},t),{},{apply(n){var{bandAware:r,position:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.fromEntries(Object.entries(n).map(a=>{var[s,u]=a;return[s,t[s].apply(u,{bandAware:r,position:i})]}))},isInRange(n){return Object.keys(n).every(r=>t[r].isInRange(n[r]))}})};function Ade(e){return(e%180+180)%180}var Tde=function(t){var{width:n,height:r}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=Ade(i),s=a*Math.PI/180,u=Math.atan(r/n),d=s>u&&s<Math.PI-u?r/Math.sin(s):n/Math.cos(s);return Math.abs(d)},Ode={dots:[],areas:[],lines:[]},s7=Rt({name:"referenceElements",initialState:Ode,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=Uo(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=Uo(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=Uo(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:P_e,removeDot:M_e,addArea:jde,removeArea:Pde,addLine:R_e,removeLine:N_e}=s7.actions,Mde=s7.reducer,l7=T.createContext(void 0),Rde=e=>{var{children:t}=e,[n]=T.useState("".concat(wh("recharts"),"-clip")),r=CC();if(r==null)return null;var{x:i,y:a,width:s,height:u}=r;return T.createElement(l7.Provider,{value:n},T.createElement("defs",null,T.createElement("clipPath",{id:n},T.createElement("rect",{x:i,y:a,height:u,width:s}))),t)},Nde=()=>T.useContext(l7);function XM(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<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XM(Object(n),!0).forEach(function(r){AC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function AC(e,t,n){return(t=Lde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lde(e){var t=Dde(e,"string");return typeof t=="symbol"?t:t+""}function Dde(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function x2(){return x2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x2.apply(null,arguments)}var kde=(e,t,n,r,i,a,s)=>{var{x1:u,x2:d,y1:f,y2:m}=s;if(i==null||a==null)return null;var p=Ede({x:i,y:a}),b={x:e?p.x.apply(u,{position:"start"}):p.x.rangeMin,y:n?p.y.apply(f,{position:"start"}):p.y.rangeMin},_={x:t?p.x.apply(d,{position:"end"}):p.x.rangeMax,y:r?p.y.apply(m,{position:"end"}):p.y.rangeMax};return s.ifOverflow==="discard"&&(!p.isInRange(b)||!p.isInRange(_))?null:Cde(b,_)},Ide=(e,t)=>{var n;return T.isValidElement(e)?n=T.cloneElement(e,t):typeof e=="function"?n=e(t):n=T.createElement(rS,x2({},t,{className:"recharts-reference-area-rect"})),n};function Ude(e){var t=jn();return T.useEffect(()=>(t(jde(e)),()=>{t(Pde(e))})),null}function Bde(e){var{x1:t,x2:n,y1:r,y2:i,className:a,shape:s,xAxisId:u,yAxisId:d}=e,f=Nde(),m=Hr(),p=it(N=>_l(N,"xAxis",u,m)),b=it(N=>_l(N,"yAxis",d,m));if(p==null||!b==null)return null;var _=Jr(t),w=Jr(n),x=Jr(r),E=Jr(i);if(!_&&!w&&!x&&!E&&!s)return null;var A=kde(_,w,x,E,p,b,e);if(!A&&!s)return null;var j=e.ifOverflow==="hidden",O=j?"url(#".concat(f,")"):void 0;return T.createElement(_r,{className:Ne("recharts-reference-area",a)},Ide(s,QM(QM({clipPath:O},cn(e,!0)),A)),Xr.renderCallByParent(e,A))}function zde(e){return T.createElement(T.Fragment,null,T.createElement(Ude,{yAxisId:e.yAxisId,xAxisId:e.xAxisId,ifOverflow:e.ifOverflow,x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2}),T.createElement(Bde,e))}class TC extends T.Component{render(){return T.createElement(zde,this.props)}}AC(TC,"displayName","ReferenceArea");AC(TC,"defaultProps",{ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});function q_(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function u7(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function Fde(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return Tde(r,n)}function $de(e,t,n){var r=n==="width",{x:i,y:a,width:s,height:u}=e;return t===1?{start:r?i:a,end:r?i+s:a+u}:{start:r?i+s:a+u,end:r?i:a}}function xv(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function Vde(e,t){return u7(e,t+1)}function Hde(e,t,n,r,i){for(var a=(r||[]).slice(),{start:s,end:u}=t,d=0,f=1,m=s,p=function(){var w=r?.[d];if(w===void 0)return{v:u7(r,f)};var x=d,E,A=()=>(E===void 0&&(E=n(w,x)),E),j=w.coordinate,O=d===0||xv(e,j,A,m,u);O||(d=0,m=s,f+=1),O&&(m=j+e*(A()/2+i),d+=f)},b;f<=a.length;)if(b=p(),b)return b.v;return[]}function JM(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 Tr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JM(Object(n),!0).forEach(function(r){qde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qde(e,t,n){return(t=Gde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gde(e){var t=Yde(e,"string");return typeof t=="symbol"?t:t+""}function Yde(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wde(e,t,n,r,i){for(var a=(r||[]).slice(),s=a.length,{start:u}=t,{end:d}=t,f=function(b){var _=a[b],w,x=()=>(w===void 0&&(w=n(_,b)),w);if(b===s-1){var E=e*(_.coordinate+e*x()/2-d);a[b]=_=Tr(Tr({},_),{},{tickCoord:E>0?_.coordinate-E*e:_.coordinate})}else a[b]=_=Tr(Tr({},_),{},{tickCoord:_.coordinate});var A=xv(e,_.tickCoord,x,u,d);A&&(d=_.tickCoord-e*(x()/2+i),a[b]=Tr(Tr({},_),{},{isShow:!0}))},m=s-1;m>=0;m--)f(m);return a}function Kde(e,t,n,r,i,a){var s=(r||[]).slice(),u=s.length,{start:d,end:f}=t;if(a){var m=r[u-1],p=n(m,u-1),b=e*(m.coordinate+e*p/2-f);s[u-1]=m=Tr(Tr({},m),{},{tickCoord:b>0?m.coordinate-b*e:m.coordinate});var _=xv(e,m.tickCoord,()=>p,d,f);_&&(f=m.tickCoord-e*(p/2+i),s[u-1]=Tr(Tr({},m),{},{isShow:!0}))}for(var w=a?u-1:u,x=function(j){var O=s[j],N,U=()=>(N===void 0&&(N=n(O,j)),N);if(j===0){var V=e*(O.coordinate-e*U()/2-d);s[j]=O=Tr(Tr({},O),{},{tickCoord:V<0?O.coordinate-V*e:O.coordinate})}else s[j]=O=Tr(Tr({},O),{},{tickCoord:O.coordinate});var Z=xv(e,O.tickCoord,U,d,f);Z&&(d=O.tickCoord+e*(U()/2+i),s[j]=Tr(Tr({},O),{},{isShow:!0}))},E=0;E<w;E++)x(E);return s}function OC(e,t,n){var{tick:r,ticks:i,viewBox:a,minTickGap:s,orientation:u,interval:d,tickFormatter:f,unit:m,angle:p}=e;if(!i||!i.length||!r)return[];if(Je(d)||zu.isSsr){var b;return(b=Vde(i,Je(d)?d:0))!==null&&b!==void 0?b:[]}var _=[],w=u==="top"||u==="bottom"?"width":"height",x=m&&w==="width"?ch(m,{fontSize:t,letterSpacing:n}):{width:0,height:0},E=(O,N)=>{var U=typeof f=="function"?f(O.value,N):O.value;return w==="width"?Fde(ch(U,{fontSize:t,letterSpacing:n}),x,p):ch(U,{fontSize:t,letterSpacing:n})[w]},A=i.length>=2?sr(i[1].coordinate-i[0].coordinate):1,j=$de(a,A,w);return d==="equidistantPreserveStart"?Hde(A,j,E,i,s):(d==="preserveStart"||d==="preserveStartEnd"?_=Kde(A,j,E,i,s,d==="preserveStartEnd"):_=Wde(A,j,E,i,s),_.filter(O=>O.isShow))}var Zde=["viewBox"],Xde=["viewBox"];function Vc(){return Vc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vc.apply(null,arguments)}function e5(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 Gn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?e5(Object(n),!0).forEach(function(r){jC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function t5(e,t){if(e==null)return{};var n,r,i=Qde(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Qde(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function jC(e,t,n){return(t=Jde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jde(e){var t=ehe(e,"string");return typeof t=="symbol"?t:t+""}function ehe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Rl extends T.Component{constructor(t){super(t),this.tickRefs=T.createRef(),this.tickRefs.current=[],this.state={fontSize:"",letterSpacing:""}}shouldComponentUpdate(t,n){var{viewBox:r}=t,i=t5(t,Zde),a=this.props,{viewBox:s}=a,u=t5(a,Xde);return!q_(r,s)||!q_(i,u)||!q_(n,this.state)}getTickLineCoord(t){var{x:n,y:r,width:i,height:a,orientation:s,tickSize:u,mirror:d,tickMargin:f}=this.props,m,p,b,_,w,x,E=d?-1:1,A=t.tickSize||u,j=Je(t.tickCoord)?t.tickCoord:t.coordinate;switch(s){case"top":m=p=t.coordinate,_=r+ +!d*a,b=_-E*A,x=b-E*f,w=j;break;case"left":b=_=t.coordinate,p=n+ +!d*i,m=p-E*A,w=m-E*f,x=j;break;case"right":b=_=t.coordinate,p=n+ +d*i,m=p+E*A,w=m+E*f,x=j;break;default:m=p=t.coordinate,_=r+ +d*a,b=_+E*A,x=b+E*f,w=j;break}return{line:{x1:m,y1:b,x2:p,y2:_},tick:{x:w,y:x}}}getTickTextAnchor(){var{orientation:t,mirror:n}=this.props,r;switch(t){case"left":r=n?"start":"end";break;case"right":r=n?"end":"start";break;default:r="middle";break}return r}getTickVerticalAnchor(){var{orientation:t,mirror:n}=this.props;switch(t){case"left":case"right":return"middle";case"top":return n?"start":"end";default:return n?"end":"start"}}renderAxisLine(){var{x:t,y:n,width:r,height:i,orientation:a,mirror:s,axisLine:u}=this.props,d=Gn(Gn(Gn({},cn(this.props,!1)),cn(u,!1)),{},{fill:"none"});if(a==="top"||a==="bottom"){var f=+(a==="top"&&!s||a==="bottom"&&s);d=Gn(Gn({},d),{},{x1:t,y1:n+f*i,x2:t+r,y2:n+f*i})}else{var m=+(a==="left"&&!s||a==="right"&&s);d=Gn(Gn({},d),{},{x1:t+m*r,y1:n,x2:t+m*r,y2:n+i})}return T.createElement("line",Vc({},d,{className:Ne("recharts-cartesian-axis-line",bl(u,"className"))}))}static renderTickItem(t,n,r){var i,a=Ne(n.className,"recharts-cartesian-axis-tick-value");if(T.isValidElement(t))i=T.cloneElement(t,Gn(Gn({},n),{},{className:a}));else if(typeof t=="function")i=t(Gn(Gn({},n),{},{className:a}));else{var s="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(s=Ne(s,t.className)),i=T.createElement(Ry,Vc({},n,{className:s}),r)}return i}renderTicks(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],{tickLine:i,stroke:a,tick:s,tickFormatter:u,unit:d,padding:f}=this.props,m=OC(Gn(Gn({},this.props),{},{ticks:r}),t,n),p=this.getTickTextAnchor(),b=this.getTickVerticalAnchor(),_=Jo(this.props),w=cn(s,!1),x=Gn(Gn({},_),{},{fill:"none"},cn(i,!1)),E=m.map((A,j)=>{var{line:O,tick:N}=this.getTickLineCoord(A),U=Gn(Gn(Gn(Gn({textAnchor:p,verticalAnchor:b},_),{},{stroke:"none",fill:a},w),N),{},{index:j,payload:A,visibleTicksCount:m.length,tickFormatter:u,padding:f});return T.createElement(_r,Vc({className:"recharts-cartesian-axis-tick",key:"tick-".concat(A.value,"-").concat(A.coordinate,"-").concat(A.tickCoord)},oy(this.props,A,j)),i&&T.createElement("line",Vc({},x,O,{className:Ne("recharts-cartesian-axis-tick-line",bl(i,"className"))})),s&&Rl.renderTickItem(s,U,"".concat(typeof u=="function"?u(A.value,j):A.value).concat(d||"")))});return E.length>0?T.createElement("g",{className:"recharts-cartesian-axis-ticks"},E):null}render(){var{axisLine:t,width:n,height:r,className:i,hide:a}=this.props;if(a)return null;var{ticks:s}=this.props;return n!=null&&n<=0||r!=null&&r<=0?null:T.createElement(_r,{className:Ne("recharts-cartesian-axis",i),ref:u=>{if(u){var d=u.getElementsByClassName("recharts-cartesian-axis-tick-value");this.tickRefs.current=Array.from(d);var f=d[0];if(f){var m=window.getComputedStyle(f).fontSize,p=window.getComputedStyle(f).letterSpacing;(m!==this.state.fontSize||p!==this.state.letterSpacing)&&this.setState({fontSize:window.getComputedStyle(f).fontSize,letterSpacing:window.getComputedStyle(f).letterSpacing})}}}},t&&this.renderAxisLine(),this.renderTicks(this.state.fontSize,this.state.letterSpacing,s),Xr.renderCallByParent(this.props))}}jC(Rl,"displayName","CartesianAxis");jC(Rl,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var the=["x1","y1","x2","y2","key"],nhe=["offset"],rhe=["xAxisId","yAxisId"],ihe=["xAxisId","yAxisId"];function n5(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 jr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?n5(Object(n),!0).forEach(function(r){ahe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ahe(e,t,n){return(t=ohe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ohe(e){var t=she(e,"string");return typeof t=="symbol"?t:t+""}function she(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _u(){return _u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_u.apply(null,arguments)}function wv(e,t){if(e==null)return{};var n,r,i=lhe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function lhe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var uhe=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:n,x:r,y:i,width:a,height:s,ry:u}=e;return T.createElement("rect",{x:r,y:i,ry:u,width:a,height:s,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function c7(e,t){var n;if(T.isValidElement(e))n=T.cloneElement(e,t);else if(typeof e=="function")n=e(t);else{var{x1:r,y1:i,x2:a,y2:s,key:u}=t,d=wv(t,the),f=Jo(d),{offset:m}=f,p=wv(f,nhe);n=T.createElement("line",_u({},p,{x1:r,y1:i,x2:a,y2:s,fill:"none",key:u}))}return n}function che(e){var{x:t,width:n,horizontal:r=!0,horizontalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:a,yAxisId:s}=e,u=wv(e,rhe),d=i.map((f,m)=>{var p=jr(jr({},u),{},{x1:t,y1:f,x2:t+n,y2:f,key:"line-".concat(m),index:m});return c7(r,p)});return T.createElement("g",{className:"recharts-cartesian-grid-horizontal"},d)}function fhe(e){var{y:t,height:n,vertical:r=!0,verticalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:a,yAxisId:s}=e,u=wv(e,ihe),d=i.map((f,m)=>{var p=jr(jr({},u),{},{x1:f,y1:t,x2:f,y2:t+n,key:"line-".concat(m),index:m});return c7(r,p)});return T.createElement("g",{className:"recharts-cartesian-grid-vertical"},d)}function dhe(e){var{horizontalFill:t,fillOpacity:n,x:r,y:i,width:a,height:s,horizontalPoints:u,horizontal:d=!0}=e;if(!d||!t||!t.length)return null;var f=u.map(p=>Math.round(p+i-i)).sort((p,b)=>p-b);i!==f[0]&&f.unshift(0);var m=f.map((p,b)=>{var _=!f[b+1],w=_?i+s-p:f[b+1]-p;if(w<=0)return null;var x=b%t.length;return T.createElement("rect",{key:"react-".concat(b),y:p,x:r,height:w,width:a,stroke:"none",fill:t[x],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return T.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},m)}function hhe(e){var{vertical:t=!0,verticalFill:n,fillOpacity:r,x:i,y:a,width:s,height:u,verticalPoints:d}=e;if(!t||!n||!n.length)return null;var f=d.map(p=>Math.round(p+i-i)).sort((p,b)=>p-b);i!==f[0]&&f.unshift(0);var m=f.map((p,b)=>{var _=!f[b+1],w=_?i+s-p:f[b+1]-p;if(w<=0)return null;var x=b%n.length;return T.createElement("rect",{key:"react-".concat(b),x:p,y:a,width:w,height:u,stroke:"none",fill:n[x],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return T.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},m)}var mhe=(e,t)=>{var{xAxis:n,width:r,height:i,offset:a}=e;return lD(OC(jr(jr(jr({},Rl.defaultProps),n),{},{ticks:uD(n),viewBox:{x:0,y:0,width:r,height:i}})),a.left,a.left+a.width,t)},phe=(e,t)=>{var{yAxis:n,width:r,height:i,offset:a}=e;return lD(OC(jr(jr(jr({},Rl.defaultProps),n),{},{ticks:uD(n),viewBox:{x:0,y:0,width:r,height:i}})),a.top,a.top+a.height,t)},ghe={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0};function PC(e){var t=pD(),n=gD(),r=mD(),i=jr(jr({},Ri(e,ghe)),{},{x:Je(e.x)?e.x:r.left,y:Je(e.y)?e.y:r.top,width:Je(e.width)?e.width:r.width,height:Je(e.height)?e.height:r.height}),{xAxisId:a,yAxisId:s,x:u,y:d,width:f,height:m,syncWithTicks:p,horizontalValues:b,verticalValues:_}=i,w=Hr(),x=it(oe=>ZP(oe,"xAxis",a,w)),E=it(oe=>ZP(oe,"yAxis",s,w));if(!Je(f)||f<=0||!Je(m)||m<=0||!Je(u)||u!==+u||!Je(d)||d!==+d)return null;var A=i.verticalCoordinatesGenerator||mhe,j=i.horizontalCoordinatesGenerator||phe,{horizontalPoints:O,verticalPoints:N}=i;if((!O||!O.length)&&typeof j=="function"){var U=b&&b.length,V=j({yAxis:E?jr(jr({},E),{},{ticks:U?b:E.ticks}):void 0,width:t,height:n,offset:r},U?!0:p);uh(Array.isArray(V),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof V,"]")),Array.isArray(V)&&(O=V)}if((!N||!N.length)&&typeof A=="function"){var Z=_&&_.length,X=A({xAxis:x?jr(jr({},x),{},{ticks:Z?_:x.ticks}):void 0,width:t,height:n,offset:r},Z?!0:p);uh(Array.isArray(X),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof X,"]")),Array.isArray(X)&&(N=X)}return T.createElement("g",{className:"recharts-cartesian-grid"},T.createElement(uhe,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),T.createElement(dhe,_u({},i,{horizontalPoints:O})),T.createElement(hhe,_u({},i,{verticalPoints:N})),T.createElement(che,_u({},i,{offset:r,horizontalPoints:O,xAxis:x,yAxis:E})),T.createElement(fhe,_u({},i,{offset:r,verticalPoints:N,xAxis:x,yAxis:E})))}PC.displayName="CartesianGrid";var f7=(e,t,n,r)=>wl(e,"xAxis",t,r),d7=(e,t,n,r)=>xl(e,"xAxis",t,r),h7=(e,t,n,r)=>wl(e,"yAxis",n,r),m7=(e,t,n,r)=>xl(e,"yAxis",n,r),vhe=Pe([Nt,f7,h7,d7,m7],(e,t,n,r,i)=>Tl(e,"xAxis")?Sh(t,r,!1):Sh(n,i,!1)),yhe=(e,t,n,r,i)=>i;function bhe(e){return e.type==="line"}var _he=Pe([Ay,yhe],(e,t)=>e.filter(bhe).find(n=>n.id===t)),xhe=Pe([Nt,f7,h7,d7,m7,_he,vhe,xy],(e,t,n,r,i,a,s,u)=>{var{chartData:d,dataStartIndex:f,dataEndIndex:m}=u;if(!(a==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||s==null)){var{dataKey:p,data:b}=a,_;if(b!=null&&b.length>0?_=b:_=d?.slice(f,m+1),_!=null)return $he({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:p,bandSize:s,displayedData:_})}}),whe=["id"],She=["type","layout","connectNulls","needClip"],Che=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function r5(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 da(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?r5(Object(n),!0).forEach(function(r){Ehe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ehe(e,t,n){return(t=Ahe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ahe(e){var t=The(e,"string");return typeof t=="symbol"?t:t+""}function The(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function MC(e,t){if(e==null)return{};var n,r,i=Ohe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ohe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ku(){return ku=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ku.apply(null,arguments)}var jhe=e=>{var{dataKey:t,name:n,stroke:r,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:r,value:Ef(n,t),payload:e}]};function Phe(e){var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:a,name:s,hide:u,unit:d}=e;return{dataDefinedOnItem:n,positions:void 0,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:Ef(s,t),hide:u,type:e.tooltipType,color:e.stroke,unit:d}}}var p7=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function Mhe(e,t){for(var n=e.length%2!==0?[...e,0]:e,r=[],i=0;i<t;++i)r=[...r,...n];return r}var Rhe=(e,t,n)=>{var r=n.reduce((p,b)=>p+b);if(!r)return p7(t,e);for(var i=Math.floor(e/r),a=e%r,s=t-e,u=[],d=0,f=0;d<n.length;f+=n[d],++d)if(f+n[d]>a){u=[...n.slice(0,d),a-f];break}var m=u.length%2===0?[0,s]:[s];return[...Mhe(n,i),...u,...m].map(p=>"".concat(p,"px")).join(", ")};function Nhe(e,t){var n;if(T.isValidElement(e))n=T.cloneElement(e,t);else if(typeof e=="function")n=e(t);else{var r=Ne("recharts-line-dot",typeof e!="boolean"?e.className:"");n=T.createElement(z8,ku({},t,{className:r}))}return n}function Lhe(e,t){return e==null?!1:t?!0:e.length===1}function Dhe(e){var{clipPathId:t,points:n,props:r}=e,{dot:i,dataKey:a,needClip:s}=r;if(!Lhe(n,i))return null;var{id:u}=r,d=MC(r,whe),f=PL(i),m=Jo(d),p=cn(i,!0),b=n.map((w,x)=>{var E=da(da(da({key:"dot-".concat(x),r:3},m),p),{},{index:x,cx:w.x,cy:w.y,dataKey:a,value:w.value,payload:w.payload,points:n});return Nhe(i,E)}),_={clipPath:s?"url(#clipPath-".concat(f?"":"dots-").concat(t,")"):void 0};return T.createElement(_r,ku({className:"recharts-line-dots",key:"dots"},_),b)}function w2(e){var{clipPathId:t,pathRef:n,points:r,strokeDasharray:i,props:a,showLabels:s}=e,{type:u,layout:d,connectNulls:f,needClip:m}=a,p=MC(a,She),b=da(da({},cn(p,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:m?"url(#clipPath-".concat(t,")"):void 0,points:r,type:u,layout:d,connectNulls:f,strokeDasharray:i??a.strokeDasharray});return T.createElement(T.Fragment,null,r?.length>1&&T.createElement(tS,ku({},b,{pathRef:n})),T.createElement(Dhe,{points:r,clipPathId:t,props:a}),s&&cl.renderCallByParent(a,r))}function khe(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function Ihe(e){var{clipPathId:t,props:n,pathRef:r,previousPointsRef:i,longestAnimatedLengthRef:a}=e,{points:s,strokeDasharray:u,isAnimationActive:d,animationBegin:f,animationDuration:m,animationEasing:p,animateNewValues:b,width:_,height:w,onAnimationEnd:x,onAnimationStart:E}=n,A=i.current,j=_C(n,"recharts-line-"),[O,N]=T.useState(!1),U=T.useCallback(()=>{typeof x=="function"&&x(),N(!1)},[x]),V=T.useCallback(()=>{typeof E=="function"&&E(),N(!0)},[E]),Z=khe(r.current),X=a.current;return T.createElement(wC,{begin:f,duration:m,isActive:d,easing:p,onAnimationEnd:U,onAnimationStart:V,key:j},oe=>{var ee=fa(X,Z+X,oe),J=Math.min(ee,Z),ne;if(u){var he="".concat(u).split(/[,\s]+/gim).map(W=>parseFloat(W));ne=Rhe(J,Z,he)}else ne=p7(Z,J);if(A){var Q=A.length/s.length,se=oe===1?s:s.map((W,B)=>{var I=Math.floor(B*Q);if(A[I]){var z=A[I];return da(da({},W),{},{x:fa(z.x,W.x,oe),y:fa(z.y,W.y,oe)})}return b?da(da({},W),{},{x:fa(_*2,W.x,oe),y:fa(w/2,W.y,oe)}):da(da({},W),{},{x:W.x,y:W.y})});return i.current=se,T.createElement(w2,{props:n,points:se,clipPathId:t,pathRef:r,showLabels:!O,strokeDasharray:ne})}return oe>0&&Z>0&&(i.current=s,a.current=J),T.createElement(w2,{props:n,points:s,clipPathId:t,pathRef:r,showLabels:!O,strokeDasharray:ne})})}function Uhe(e){var{clipPathId:t,props:n}=e,{points:r,isAnimationActive:i}=n,a=T.useRef(null),s=T.useRef(0),u=T.useRef(null),d=a.current;return i&&r&&r.length&&d!==r?T.createElement(Ihe,{props:n,clipPathId:t,previousPointsRef:a,longestAnimatedLengthRef:s,pathRef:u}):T.createElement(w2,{props:n,points:r,clipPathId:t,pathRef:u,showLabels:!0})}var Bhe=(e,t)=>({x:e.x,y:e.y,value:e.value,errorVal:Kt(e.payload,t)});class zhe extends T.Component{render(){var t,{hide:n,dot:r,points:i,className:a,xAxisId:s,yAxisId:u,top:d,left:f,width:m,height:p,id:b,needClip:_}=this.props;if(n)return null;var w=Ne("recharts-line",a),x=b,{r:E=3,strokeWidth:A=2}=(t=cn(r,!1))!==null&&t!==void 0?t:{r:3,strokeWidth:2},j=PL(r),O=E*2+A;return T.createElement(T.Fragment,null,T.createElement(_r,{className:w},_&&T.createElement("defs",null,T.createElement(e7,{clipPathId:x,xAxisId:s,yAxisId:u}),!j&&T.createElement("clipPath",{id:"clipPath-dots-".concat(x)},T.createElement("rect",{x:f-O/2,y:d-O/2,width:m+O,height:p+O}))),T.createElement(Uhe,{props:this.props,clipPathId:x}),T.createElement(J8,{xAxisId:s,yAxisId:u,data:i,dataPointFormatter:Bhe,errorBarOffset:0},this.props.children)),T.createElement(hfe,{activeDot:this.props.activeDot,points:i,mainColor:this.props.stroke,itemDataKey:this.props.dataKey}))}}var g7={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:!zu.isSsr,label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0};function Fhe(e){var t=Ri(e,g7),{activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:a,animationEasing:s,connectNulls:u,dot:d,hide:f,isAnimationActive:m,label:p,legendType:b,xAxisId:_,yAxisId:w,id:x}=t,E=MC(t,Che),{needClip:A}=EC(_,w),j=CC(),O=my(),N=Hr(),U=it(ee=>xhe(ee,_,w,N,x));if(O!=="horizontal"&&O!=="vertical"||U==null||j==null)return null;var{height:V,width:Z,x:X,y:oe}=j;return T.createElement(zhe,ku({},E,{id:x,connectNulls:u,dot:d,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:a,animationEasing:s,isAnimationActive:m,hide:f,label:p,legendType:b,xAxisId:_,yAxisId:w,points:U,layout:O,height:V,width:Z,left:X,top:oe,needClip:A}))}function $he(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:a,dataKey:s,bandSize:u,displayedData:d}=e;return d.map((f,m)=>{var p=Kt(f,s);if(t==="horizontal"){var b=Pj({axis:n,ticks:i,bandSize:u,entry:f,index:m}),_=dn(p)?null:r.scale(p);return{x:b,y:_,value:p,payload:f}}var w=dn(p)?null:n.scale(p),x=Pj({axis:r,ticks:a,bandSize:u,entry:f,index:m});return w==null||x==null?null:{x:w,y:x,value:p,payload:f}}).filter(Boolean)}function v7(e){var t=Ri(e,g7),n=Hr();return T.createElement(xC,{id:t.id,type:"line"},r=>T.createElement(T.Fragment,null,T.createElement(Y8,{legendPayload:jhe(t)}),T.createElement(bC,{fn:Phe,args:t}),T.createElement(K8,{type:"line",id:r,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),T.createElement(Fhe,ku({},t,{id:r}))))}v7.displayName="Line";function i5(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 a5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?i5(Object(n),!0).forEach(function(r){Vhe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vhe(e,t,n){return(t=Hhe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hhe(e){var t=qhe(e,"string");return typeof t=="symbol"?t:t+""}function qhe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ghe={xAxis:{},yAxis:{},zAxis:{}},y7=Rt({name:"cartesianAxis",initialState:Ghe,reducers:{addXAxis(e,t){e.xAxis[t.payload.id]=t.payload},removeXAxis(e,t){delete e.xAxis[t.payload.id]},addYAxis(e,t){e.yAxis[t.payload.id]=t.payload},removeYAxis(e,t){delete e.yAxis[t.payload.id]},addZAxis(e,t){e.zAxis[t.payload.id]=t.payload},removeZAxis(e,t){delete e.zAxis[t.payload.id]},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload;e.yAxis[n]&&(e.yAxis[n]=a5(a5({},e.yAxis[n]),{},{width:r}))}}}),{addXAxis:Yhe,removeXAxis:Whe,addYAxis:Khe,removeYAxis:Zhe,addZAxis:L_e,removeZAxis:D_e,updateYAxisWidth:Xhe}=y7.actions,Qhe=y7.reducer,Jhe=["children"],eme=["dangerouslySetInnerHTML","ticks"];function b7(e,t,n){return(t=tme(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tme(e){var t=nme(e,"string");return typeof t=="symbol"?t:t+""}function nme(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function S2(){return S2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},S2.apply(null,arguments)}function _7(e,t){if(e==null)return{};var n,r,i=rme(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function rme(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ime(e){var t=jn(),n=T.useMemo(()=>{var{children:a}=e,s=_7(e,Jhe);return s},[e]),r=it(a=>rs(a,n.id)),i=n===r;return T.useEffect(()=>(t(Yhe(n)),()=>{t(Whe(n))}),[n,t]),i?e.children:null}var ame=e=>{var{xAxisId:t,className:n}=e,r=it(hD),i=Hr(),a="xAxis",s=it(_=>_l(_,a,t,i)),u=it(_=>a8(_,a,t,i)),d=it(_=>t8(_,t)),f=it(_=>tse(_,t));if(d==null||f==null)return null;var{dangerouslySetInnerHTML:m,ticks:p}=e,b=_7(e,eme);return T.createElement(Rl,S2({},b,{scale:s,x:f.x,y:f.y,width:d.width,height:d.height,className:Ne("recharts-".concat(a," ").concat(a),n),viewBox:r,ticks:u}))},ome=e=>{var t,n,r,i,a;return T.createElement(ime,{interval:(t=e.interval)!==null&&t!==void 0?t:"preserveEnd",id:e.xAxisId,scale:e.scale,type:e.type,padding:e.padding,allowDataOverflow:e.allowDataOverflow,domain:e.domain,dataKey:e.dataKey,allowDuplicatedCategory:e.allowDuplicatedCategory,allowDecimals:e.allowDecimals,tickCount:e.tickCount,includeHidden:(n=e.includeHidden)!==null&&n!==void 0?n:!1,reversed:e.reversed,ticks:e.ticks,height:e.height,orientation:e.orientation,mirror:e.mirror,hide:e.hide,unit:e.unit,name:e.name,angle:(r=e.angle)!==null&&r!==void 0?r:0,minTickGap:(i=e.minTickGap)!==null&&i!==void 0?i:5,tick:(a=e.tick)!==null&&a!==void 0?a:!0,tickFormatter:e.tickFormatter},T.createElement(ame,e))};class Ly extends T.Component{render(){return T.createElement(ome,this.props)}}b7(Ly,"displayName","XAxis");b7(Ly,"defaultProps",{allowDataOverflow:gi.allowDataOverflow,allowDecimals:gi.allowDecimals,allowDuplicatedCategory:gi.allowDuplicatedCategory,height:gi.height,hide:!1,mirror:gi.mirror,orientation:gi.orientation,padding:gi.padding,reversed:gi.reversed,scale:gi.scale,tickCount:gi.tickCount,type:gi.type,xAxisId:0});var sme=e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:i=0,tickMargin:a=0}=e,s=0;if(t){t.forEach(m=>{if(m){var p=m.getBoundingClientRect();p.width>s&&(s=p.width)}});var u=n?n.getBoundingClientRect().width:0,d=i+a,f=s+d+u+(n?r:0);return Math.round(f)}return 0},lme=["dangerouslySetInnerHTML","ticks"];function x7(e,t,n){return(t=ume(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ume(e){var t=cme(e,"string");return typeof t=="symbol"?t:t+""}function cme(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function C2(){return C2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},C2.apply(null,arguments)}function fme(e,t){if(e==null)return{};var n,r,i=dme(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function dme(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function hme(e){var t=jn();return T.useEffect(()=>(t(Khe(e)),()=>{t(Zhe(e))}),[e,t]),null}var mme=e=>{var t,{yAxisId:n,className:r,width:i,label:a}=e,s=T.useRef(null),u=T.useRef(null),d=it(hD),f=Hr(),m=jn(),p="yAxis",b=it(O=>_l(O,p,n,f)),_=it(O=>n8(O,n)),w=it(O=>nse(O,n)),x=it(O=>a8(O,p,n,f));if(T.useLayoutEffect(()=>{var O;if(!(i!=="auto"||!_||fC(a)||T.isValidElement(a))){var N=s.current,U=N==null||(O=N.tickRefs)===null||O===void 0?void 0:O.current,{tickSize:V,tickMargin:Z}=N.props,X=sme({ticks:U,label:u.current,labelGapWithTick:5,tickSize:V,tickMargin:Z});Math.round(_.width)!==Math.round(X)&&m(Xhe({id:n,width:X}))}},[s,s==null||(t=s.current)===null||t===void 0||(t=t.tickRefs)===null||t===void 0?void 0:t.current,_?.width,_,m,a,n,i]),_==null||w==null)return null;var{dangerouslySetInnerHTML:E,ticks:A}=e,j=fme(e,lme);return T.createElement(Rl,C2({},j,{ref:s,labelRef:u,scale:b,x:w.x,y:w.y,width:_.width,height:_.height,className:Ne("recharts-".concat(p," ").concat(p),r),viewBox:d,ticks:x}))},pme=e=>{var t,n,r,i,a;return T.createElement(T.Fragment,null,T.createElement(hme,{interval:(t=e.interval)!==null&&t!==void 0?t:"preserveEnd",id:e.yAxisId,scale:e.scale,type:e.type,domain:e.domain,allowDataOverflow:e.allowDataOverflow,dataKey:e.dataKey,allowDuplicatedCategory:e.allowDuplicatedCategory,allowDecimals:e.allowDecimals,tickCount:e.tickCount,padding:e.padding,includeHidden:(n=e.includeHidden)!==null&&n!==void 0?n:!1,reversed:e.reversed,ticks:e.ticks,width:e.width,orientation:e.orientation,mirror:e.mirror,hide:e.hide,unit:e.unit,name:e.name,angle:(r=e.angle)!==null&&r!==void 0?r:0,minTickGap:(i=e.minTickGap)!==null&&i!==void 0?i:5,tick:(a=e.tick)!==null&&a!==void 0?a:!0,tickFormatter:e.tickFormatter}),T.createElement(mme,e))},gme={allowDataOverflow:vi.allowDataOverflow,allowDecimals:vi.allowDecimals,allowDuplicatedCategory:vi.allowDuplicatedCategory,hide:!1,mirror:vi.mirror,orientation:vi.orientation,padding:vi.padding,reversed:vi.reversed,scale:vi.scale,tickCount:vi.tickCount,type:vi.type,width:vi.width,yAxisId:0};class Dy extends T.Component{render(){return T.createElement(pme,this.props)}}x7(Dy,"displayName","YAxis");x7(Dy,"defaultProps",gme);var vme=(e,t)=>t,RC=Pe([vme,Nt,Rk,Zn,_8,is,sle,Wn],dle),NC=e=>{var t=e.currentTarget.getBoundingClientRect(),n=t.width/e.currentTarget.offsetWidth,r=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/n),chartY:Math.round((e.clientY-t.top)/r)}},w7=fn("mouseClick"),S7=Hh();S7.startListening({actionCreator:w7,effect:(e,t)=>{var n=e.payload,r=RC(t.getState(),NC(n));r?.activeIndex!=null&&t.dispatch(pse({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var E2=fn("mouseMove"),C7=Hh();C7.startListening({actionCreator:E2,effect:(e,t)=>{var n=e.payload,r=t.getState(),i=eC(r,r.tooltip.settings.shared),a=RC(r,NC(n));i==="axis"&&(a?.activeIndex!=null?t.dispatch(h8({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate})):t.dispatch(d8()))}});function yme(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":t}var o5={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},E7=Rt({name:"rootProps",initialState:o5,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:o5.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className}}}),bme=E7.reducer,{updateOptions:_me}=E7.actions,A7=Rt({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:xme}=A7.actions,wme=A7.reducer,T7=fn("keyDown"),O7=fn("focus"),LC=Hh();LC.startListening({actionCreator:T7,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip,a=e.payload;if(!(a!=="ArrowRight"&&a!=="ArrowLeft"&&a!=="Enter")){var s=Number(tC(i,Nf(n))),u=is(n);if(a==="Enter"){var d=gv(n,"axis","hover",String(i.index));t.dispatch(m2({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:d}));return}var f=ose(n),m=f==="left-to-right"?1:-1,p=a==="ArrowRight"?1:-1,b=s+p*m;if(!(u==null||b>=u.length||b<0)){var _=gv(n,"axis","hover",String(b));t.dispatch(m2({active:!0,activeIndex:b.toString(),activeDataKey:void 0,activeCoordinate:_}))}}}}});LC.startListening({actionCreator:O7,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip;if(!i.active&&i.index==null){var a="0",s=gv(n,"axis","hover",String(a));t.dispatch(m2({activeDataKey:void 0,active:!0,activeIndex:a,activeCoordinate:s}))}}}});var Yi=fn("externalEvent"),j7=Hh();j7.startListening({actionCreator:Yi,effect:(e,t)=>{if(e.payload.handler!=null){var n=t.getState(),r={activeCoordinate:Xse(n),activeDataKey:C8(n),activeIndex:Sl(n),activeLabel:S8(n),activeTooltipIndex:Sl(n),isTooltipActive:Qse(n)};e.payload.handler(r,e.payload.reactEvent)}}});var Sme=Pe([Rf],e=>e.tooltipItemPayloads),Cme=Pe([Sme,rm,(e,t,n)=>t,(e,t,n)=>n],(e,t,n,r)=>{var i=e.find(u=>u.settings.dataKey===r);if(i!=null){var{positions:a}=i;if(a!=null){var s=t(a,n);return s}}}),P7=fn("touchMove"),M7=Hh();M7.startListening({actionCreator:P7,effect:(e,t)=>{var n=e.payload,r=t.getState(),i=eC(r,r.tooltip.settings.shared);if(i==="axis"){var a=RC(r,NC({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY,currentTarget:n.currentTarget}));a?.activeIndex!=null&&t.dispatch(h8({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}else if(i==="item"){var s,u=n.touches[0],d=document.elementFromPoint(u.clientX,u.clientY);if(!d||!d.getAttribute)return;var f=d.getAttribute(fD),m=(s=d.getAttribute(dD))!==null&&s!==void 0?s:void 0,p=Cme(t.getState(),f,m);t.dispatch(f8({activeDataKey:m,activeIndex:f,activeCoordinate:p}))}}});var Eme=Xv({brush:xde,cartesianAxis:Qhe,chartData:Ole,errorBars:Efe,graphicalItems:Lce,layout:xte,legend:ane,options:Sle,polarAxis:ece,polarOptions:wme,referenceElements:Mde,rootProps:bme,tooltip:gse}),Ame=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return jw({reducer:Eme,preloadedState:t,middleware:r=>r({serializableCheck:!1}).concat([S7.middleware,C7.middleware,LC.middleware,j7.middleware,M7.middleware]),devTools:{serialize:{replacer:yme},name:"recharts-".concat(n)}})};function R7(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,i=Hr(),a=T.useRef(null);if(i)return n;a.current==null&&(a.current=Ame(t,r));var s=Xw;return T.createElement(I2,{context:s,store:a.current},n)}function N7(e){var{layout:t,width:n,height:r,margin:i}=e,a=jn(),s=Hr();return T.useEffect(()=>{s||(a(yte(t)),a(bte({width:n,height:r})),a(vte(i)))},[a,s,t,n,r,i]),null}function L7(e){var t=jn();return T.useEffect(()=>{t(_me(e))},[t,e]),null}var Tme=["children"];function Ome(e,t){if(e==null)return{};var n,r,i=jme(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function jme(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Sv(){return Sv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sv.apply(null,arguments)}var Pme={width:"100%",height:"100%"},Mme=T.forwardRef((e,t)=>{var n=pD(),r=gD(),i=_D();if(!af(n)||!af(r))return null;var{children:a,otherAttributes:s,title:u,desc:d}=e,f,m;return typeof s.tabIndex=="number"?f=s.tabIndex:f=i?0:void 0,typeof s.role=="string"?m=s.role:m=i?"application":void 0,T.createElement(ML,Sv({},s,{title:u,desc:d,role:m,tabIndex:f,width:n,height:r,style:Pme,ref:t}),a)}),Rme=e=>{var{children:t}=e,n=it(hy);if(!n)return null;var{width:r,height:i,y:a,x:s}=n;return T.createElement(ML,{width:r,height:i,x:s,y:a},t)},s5=T.forwardRef((e,t)=>{var{children:n}=e,r=Ome(e,Tme),i=Hr();return i?T.createElement(Rme,null,n):T.createElement(Mme,Sv({ref:t},r),n)});function Nme(){var e=jn(),[t,n]=T.useState(null),r=it(Zte);return T.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),a=i.width/t.offsetWidth;Oi(a)&&a!==r&&e(_te(a))}},[t,e,r]),n}function l5(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 Lme(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?l5(Object(n),!0).forEach(function(r){Dme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dme(e,t,n){return(t=kme(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kme(e){var t=Ime(e,"string");return typeof t=="symbol"?t:t+""}function Ime(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ume=T.forwardRef((e,t)=>{var{children:n,className:r,height:i,onClick:a,onContextMenu:s,onDoubleClick:u,onMouseDown:d,onMouseEnter:f,onMouseLeave:m,onMouseMove:p,onMouseUp:b,onTouchEnd:_,onTouchMove:w,onTouchStart:x,style:E,width:A}=e,j=jn(),[O,N]=T.useState(null),[U,V]=T.useState(null);Mle();var Z=Nme(),X=T.useCallback(Y=>{Z(Y),typeof t=="function"&&t(Y),N(Y),V(Y)},[Z,t,N,V]),oe=T.useCallback(Y=>{j(w7(Y)),j(Yi({handler:a,reactEvent:Y}))},[j,a]),ee=T.useCallback(Y=>{j(E2(Y)),j(Yi({handler:f,reactEvent:Y}))},[j,f]),J=T.useCallback(Y=>{j(d8()),j(Yi({handler:m,reactEvent:Y}))},[j,m]),ne=T.useCallback(Y=>{j(E2(Y)),j(Yi({handler:p,reactEvent:Y}))},[j,p]),he=T.useCallback(()=>{j(O7())},[j]),Q=T.useCallback(Y=>{j(T7(Y.key))},[j]),se=T.useCallback(Y=>{j(Yi({handler:s,reactEvent:Y}))},[j,s]),W=T.useCallback(Y=>{j(Yi({handler:u,reactEvent:Y}))},[j,u]),B=T.useCallback(Y=>{j(Yi({handler:d,reactEvent:Y}))},[j,d]),I=T.useCallback(Y=>{j(Yi({handler:b,reactEvent:Y}))},[j,b]),z=T.useCallback(Y=>{j(Yi({handler:x,reactEvent:Y}))},[j,x]),M=T.useCallback(Y=>{j(P7(Y)),j(Yi({handler:w,reactEvent:Y}))},[j,w]),D=T.useCallback(Y=>{j(Yi({handler:_,reactEvent:Y}))},[j,_]);return T.createElement(P8.Provider,{value:O},T.createElement(VJ.Provider,{value:U},T.createElement("div",{className:Ne("recharts-wrapper",r),style:Lme({position:"relative",cursor:"default",width:A,height:i},E),onClick:oe,onContextMenu:se,onDoubleClick:W,onFocus:he,onKeyDown:Q,onMouseDown:B,onMouseEnter:ee,onMouseLeave:J,onMouseMove:ne,onMouseUp:I,onTouchEnd:D,onTouchMove:M,onTouchStart:z,ref:X},n)))}),Bme=["children","className","width","height","style","compact","title","desc"];function zme(e,t){if(e==null)return{};var n,r,i=Fme(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Fme(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var D7=T.forwardRef((e,t)=>{var{children:n,className:r,width:i,height:a,style:s,compact:u,title:d,desc:f}=e,m=zme(e,Bme),p=Jo(m);return u?T.createElement(s5,{otherAttributes:p,title:d,desc:f},n):T.createElement(Ume,{className:r,style:s,width:i,height:a,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},T.createElement(s5,{otherAttributes:p,title:d,desc:f,ref:t},T.createElement(Rde,null,n)))}),$me=["width","height"];function A2(){return A2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},A2.apply(null,arguments)}function Vme(e,t){if(e==null)return{};var n,r,i=Hme(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Hme(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var qme={top:5,right:5,bottom:5,left:5},Gme={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:qme,reverseStackOrder:!1,syncMethod:"index"},k7=T.forwardRef(function(t,n){var r,i=Ri(t.categoricalChartProps,Gme),{width:a,height:s}=i,u=Vme(i,$me);if(!af(a)||!af(s))return null;var{chartName:d,defaultTooltipEventType:f,validateTooltipEventTypes:m,tooltipPayloadSearcher:p,categoricalChartProps:b}=t,_={chartName:d,defaultTooltipEventType:f,validateTooltipEventTypes:m,tooltipPayloadSearcher:p,eventEmitter:void 0};return T.createElement(R7,{preloadedState:{options:_},reduxStoreName:(r=b.id)!==null&&r!==void 0?r:d},T.createElement(i7,{chartData:b.data}),T.createElement(N7,{width:a,height:s,layout:i.layout,margin:i.margin}),T.createElement(L7,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),T.createElement(D7,A2({},u,{width:a,height:s,ref:n})))}),Yme=["axis"],Wme=T.forwardRef((e,t)=>T.createElement(k7,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Yme,tooltipPayloadSearcher:uC,categoricalChartProps:e,ref:t}));function Kme(e){var t=jn();return T.useEffect(()=>{t(xme(e))},[t,e]),null}var Zme=["width","height","layout"];function T2(){return T2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T2.apply(null,arguments)}function Xme(e,t){if(e==null)return{};var n,r,i=Qme(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Qme(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Jme={top:5,right:5,bottom:5,left:5},epe={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:Jme,reverseStackOrder:!1,syncMethod:"index",layout:"radial"},tpe=T.forwardRef(function(t,n){var r,i=Ri(t.categoricalChartProps,epe),{width:a,height:s,layout:u}=i,d=Xme(i,Zme);if(!af(a)||!af(s))return null;var{chartName:f,defaultTooltipEventType:m,validateTooltipEventTypes:p,tooltipPayloadSearcher:b}=t,_={chartName:f,defaultTooltipEventType:m,validateTooltipEventTypes:p,tooltipPayloadSearcher:b,eventEmitter:void 0};return T.createElement(R7,{preloadedState:{options:_},reduxStoreName:(r=i.id)!==null&&r!==void 0?r:f},T.createElement(i7,{chartData:i.data}),T.createElement(N7,{width:a,height:s,layout:u,margin:i.margin}),T.createElement(L7,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),T.createElement(Kme,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),T.createElement(D7,T2({width:a,height:s},d,{ref:n})))}),npe=["item"],rpe={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},ipe=T.forwardRef((e,t)=>{var n=Ri(e,rpe);return T.createElement(tpe,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:npe,tooltipPayloadSearcher:uC,categoricalChartProps:n,ref:t})}),ape=["axis"],ope=T.forwardRef((e,t)=>T.createElement(k7,{chartName:"ComposedChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:ape,tooltipPayloadSearcher:uC,categoricalChartProps:e,ref:t}));function I7(e,t){const n=T.useRef(t);T.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 spe=1;function lpe(e){return Object.freeze({__version:spe,map:e})}function upe(e,t){return Object.freeze({...e,...t})}const DC=T.createContext(null);function U7(){const e=T.use(DC);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}function cpe(e){function t(n,r){const{instance:i,context:a}=e(n).current;T.useImperativeHandle(r,()=>i);const{children:s}=n;return s==null?null:Xc.createElement(DC,{value:a},s)}return T.forwardRef(t)}function fpe(e){function t(n,r){const[i,a]=T.useState(!1),{instance:s}=e(n,a).current;T.useImperativeHandle(r,()=>s),T.useEffect(function(){i&&s.update()},[s,i,n.children]);const u=s._contentNode;return u?Dh.createPortal(n.children,u):null}return T.forwardRef(t)}function dpe(e){function t(n,r){const{instance:i}=e(n).current;return T.useImperativeHandle(r,()=>i),null}return T.forwardRef(t)}function B7(e,t){const n=T.useRef(void 0);T.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 kC(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function hpe(e,t){return function(r,i){const a=U7(),s=e(kC(r,a),a);return I7(a.map,r.attribution),B7(s.current,r.eventHandlers),t(s.current,a,r,i),s}}var rh={exports:{}};/* @preserve
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
*/var mpe=rh.exports,u5;function ppe(){return u5||(u5=1,function(e,t){(function(n,r){r(t)})(mpe,function(n){var r="1.9.4";function i(c){var g,S,R,$;for(S=1,R=arguments.length;S<R;S++){$=arguments[S];for(g in $)c[g]=$[g]}return c}var a=Object.create||function(){function c(){}return function(g){return c.prototype=g,new c}}();function s(c,g){var S=Array.prototype.slice;if(c.bind)return c.bind.apply(c,S.call(arguments,1));var R=S.call(arguments,2);return function(){return c.apply(g,R.length?R.concat(S.call(arguments)):arguments)}}var u=0;function d(c){return"_leaflet_id"in c||(c._leaflet_id=++u),c._leaflet_id}function f(c,g,S){var R,$,te,me;return me=function(){R=!1,$&&(te.apply(S,$),$=!1)},te=function(){R?$=arguments:(c.apply(S,arguments),setTimeout(me,g),R=!0)},te}function m(c,g,S){var R=g[1],$=g[0],te=R-$;return c===R&&S?c:((c-$)%te+te)%te+$}function p(){return!1}function b(c,g){if(g===!1)return c;var S=Math.pow(10,g===void 0?6:g);return Math.round(c*S)/S}function _(c){return c.trim?c.trim():c.replace(/^\s+|\s+$/g,"")}function w(c){return _(c).split(/\s+/)}function x(c,g){Object.prototype.hasOwnProperty.call(c,"options")||(c.options=c.options?a(c.options):{});for(var S in g)c.options[S]=g[S];return c.options}function E(c,g,S){var R=[];for(var $ in c)R.push(encodeURIComponent(S?$.toUpperCase():$)+"="+encodeURIComponent(c[$]));return(!g||g.indexOf("?")===-1?"?":"&")+R.join("&")}var A=/\{ *([\w_ -]+) *\}/g;function j(c,g){return c.replace(A,function(S,R){var $=g[R];if($===void 0)throw new Error("No value provided for variable "+S);return typeof $=="function"&&($=$(g)),$})}var O=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"};function N(c,g){for(var S=0;S<c.length;S++)if(c[S]===g)return S;return-1}var U="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function V(c){return window["webkit"+c]||window["moz"+c]||window["ms"+c]}var Z=0;function X(c){var g=+new Date,S=Math.max(0,16-(g-Z));return Z=g+S,window.setTimeout(c,S)}var oe=window.requestAnimationFrame||V("RequestAnimationFrame")||X,ee=window.cancelAnimationFrame||V("CancelAnimationFrame")||V("CancelRequestAnimationFrame")||function(c){window.clearTimeout(c)};function J(c,g,S){if(S&&oe===X)c.call(g);else return oe.call(window,s(c,g))}function ne(c){c&&ee.call(window,c)}var he={__proto__:null,extend:i,create:a,bind:s,get lastId(){return u},stamp:d,throttle:f,wrapNum:m,falseFn:p,formatNum:b,trim:_,splitWords:w,setOptions:x,getParamString:E,template:j,isArray:O,indexOf:N,emptyImageUrl:U,requestFn:oe,cancelFn:ee,requestAnimFrame:J,cancelAnimFrame:ne};function Q(){}Q.extend=function(c){var g=function(){x(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},S=g.__super__=this.prototype,R=a(S);R.constructor=g,g.prototype=R;for(var $ in this)Object.prototype.hasOwnProperty.call(this,$)&&$!=="prototype"&&$!=="__super__"&&(g[$]=this[$]);return c.statics&&i(g,c.statics),c.includes&&(se(c.includes),i.apply(null,[R].concat(c.includes))),i(R,c),delete R.statics,delete R.includes,R.options&&(R.options=S.options?a(S.options):{},i(R.options,c.options)),R._initHooks=[],R.callInitHooks=function(){if(!this._initHooksCalled){S.callInitHooks&&S.callInitHooks.call(this),this._initHooksCalled=!0;for(var te=0,me=R._initHooks.length;te<me;te++)R._initHooks[te].call(this)}},g},Q.include=function(c){var g=this.prototype.options;return i(this.prototype,c),c.options&&(this.prototype.options=g,this.mergeOptions(c.options)),this},Q.mergeOptions=function(c){return i(this.prototype.options,c),this},Q.addInitHook=function(c){var g=Array.prototype.slice.call(arguments,1),S=typeof c=="function"?c:function(){this[c].apply(this,g)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(S),this};function se(c){if(!(typeof L>"u"||!L||!L.Mixin)){c=O(c)?c:[c];for(var g=0;g<c.length;g++)c[g]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var W={on:function(c,g,S){if(typeof c=="object")for(var R in c)this._on(R,c[R],g);else{c=w(c);for(var $=0,te=c.length;$<te;$++)this._on(c[$],g,S)}return this},off:function(c,g,S){if(!arguments.length)delete this._events;else if(typeof c=="object")for(var R in c)this._off(R,c[R],g);else{c=w(c);for(var $=arguments.length===1,te=0,me=c.length;te<me;te++)$?this._off(c[te]):this._off(c[te],g,S)}return this},_on:function(c,g,S,R){if(typeof g!="function"){console.warn("wrong listener type: "+typeof g);return}if(this._listens(c,g,S)===!1){S===this&&(S=void 0);var $={fn:g,ctx:S};R&&($.once=!0),this._events=this._events||{},this._events[c]=this._events[c]||[],this._events[c].push($)}},_off:function(c,g,S){var R,$,te;if(this._events&&(R=this._events[c],!!R)){if(arguments.length===1){if(this._firingCount)for($=0,te=R.length;$<te;$++)R[$].fn=p;delete this._events[c];return}if(typeof g!="function"){console.warn("wrong listener type: "+typeof g);return}var me=this._listens(c,g,S);if(me!==!1){var Se=R[me];this._firingCount&&(Se.fn=p,this._events[c]=R=R.slice()),R.splice(me,1)}}},fire:function(c,g,S){if(!this.listens(c,S))return this;var R=i({},g,{type:c,target:this,sourceTarget:g&&g.sourceTarget||this});if(this._events){var $=this._events[c];if($){this._firingCount=this._firingCount+1||1;for(var te=0,me=$.length;te<me;te++){var Se=$[te],Me=Se.fn;Se.once&&this.off(c,Me,Se.ctx),Me.call(Se.ctx||this,R)}this._firingCount--}}return S&&this._propagateEvent(R),this},listens:function(c,g,S,R){typeof c!="string"&&console.warn('"string" type argument expected');var $=g;typeof g!="function"&&(R=!!g,$=void 0,S=void 0);var te=this._events&&this._events[c];if(te&&te.length&&this._listens(c,$,S)!==!1)return!0;if(R){for(var me in this._eventParents)if(this._eventParents[me].listens(c,g,S,R))return!0}return!1},_listens:function(c,g,S){if(!this._events)return!1;var R=this._events[c]||[];if(!g)return!!R.length;S===this&&(S=void 0);for(var $=0,te=R.length;$<te;$++)if(R[$].fn===g&&R[$].ctx===S)return $;return!1},once:function(c,g,S){if(typeof c=="object")for(var R in c)this._on(R,c[R],g,!0);else{c=w(c);for(var $=0,te=c.length;$<te;$++)this._on(c[$],g,S,!0)}return this},addEventParent:function(c){return this._eventParents=this._eventParents||{},this._eventParents[d(c)]=c,this},removeEventParent:function(c){return this._eventParents&&delete this._eventParents[d(c)],this},_propagateEvent:function(c){for(var g in this._eventParents)this._eventParents[g].fire(c.type,i({layer:c.target,propagatedFrom:c.target},c),!0)}};W.addEventListener=W.on,W.removeEventListener=W.clearAllEventListeners=W.off,W.addOneTimeEventListener=W.once,W.fireEvent=W.fire,W.hasEventListeners=W.listens;var B=Q.extend(W);function I(c,g,S){this.x=S?Math.round(c):c,this.y=S?Math.round(g):g}var z=Math.trunc||function(c){return c>0?Math.floor(c):Math.ceil(c)};I.prototype={clone:function(){return new I(this.x,this.y)},add:function(c){return this.clone()._add(M(c))},_add:function(c){return this.x+=c.x,this.y+=c.y,this},subtract:function(c){return this.clone()._subtract(M(c))},_subtract:function(c){return this.x-=c.x,this.y-=c.y,this},divideBy:function(c){return this.clone()._divideBy(c)},_divideBy:function(c){return this.x/=c,this.y/=c,this},multiplyBy:function(c){return this.clone()._multiplyBy(c)},_multiplyBy:function(c){return this.x*=c,this.y*=c,this},scaleBy:function(c){return new I(this.x*c.x,this.y*c.y)},unscaleBy:function(c){return new I(this.x/c.x,this.y/c.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=z(this.x),this.y=z(this.y),this},distanceTo:function(c){c=M(c);var g=c.x-this.x,S=c.y-this.y;return Math.sqrt(g*g+S*S)},equals:function(c){return c=M(c),c.x===this.x&&c.y===this.y},contains:function(c){return c=M(c),Math.abs(c.x)<=Math.abs(this.x)&&Math.abs(c.y)<=Math.abs(this.y)},toString:function(){return"Point("+b(this.x)+", "+b(this.y)+")"}};function M(c,g,S){return c instanceof I?c:O(c)?new I(c[0],c[1]):c==null?c:typeof c=="object"&&"x"in c&&"y"in c?new I(c.x,c.y):new I(c,g,S)}function D(c,g){if(c)for(var S=g?[c,g]:c,R=0,$=S.length;R<$;R++)this.extend(S[R])}D.prototype={extend:function(c){var g,S;if(!c)return this;if(c instanceof I||typeof c[0]=="number"||"x"in c)g=S=M(c);else if(c=Y(c),g=c.min,S=c.max,!g||!S)return this;return!this.min&&!this.max?(this.min=g.clone(),this.max=S.clone()):(this.min.x=Math.min(g.x,this.min.x),this.max.x=Math.max(S.x,this.max.x),this.min.y=Math.min(g.y,this.min.y),this.max.y=Math.max(S.y,this.max.y)),this},getCenter:function(c){return M((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,c)},getBottomLeft:function(){return M(this.min.x,this.max.y)},getTopRight:function(){return M(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(c){var g,S;return typeof c[0]=="number"||c instanceof I?c=M(c):c=Y(c),c instanceof D?(g=c.min,S=c.max):g=S=c,g.x>=this.min.x&&S.x<=this.max.x&&g.y>=this.min.y&&S.y<=this.max.y},intersects:function(c){c=Y(c);var g=this.min,S=this.max,R=c.min,$=c.max,te=$.x>=g.x&&R.x<=S.x,me=$.y>=g.y&&R.y<=S.y;return te&&me},overlaps:function(c){c=Y(c);var g=this.min,S=this.max,R=c.min,$=c.max,te=$.x>g.x&&R.x<S.x,me=$.y>g.y&&R.y<S.y;return te&&me},isValid:function(){return!!(this.min&&this.max)},pad:function(c){var g=this.min,S=this.max,R=Math.abs(g.x-S.x)*c,$=Math.abs(g.y-S.y)*c;return Y(M(g.x-R,g.y-$),M(S.x+R,S.y+$))},equals:function(c){return c?(c=Y(c),this.min.equals(c.getTopLeft())&&this.max.equals(c.getBottomRight())):!1}};function Y(c,g){return!c||c instanceof D?c:new D(c,g)}function q(c,g){if(c)for(var S=g?[c,g]:c,R=0,$=S.length;R<$;R++)this.extend(S[R])}q.prototype={extend:function(c){var g=this._southWest,S=this._northEast,R,$;if(c instanceof ue)R=c,$=c;else if(c instanceof q){if(R=c._southWest,$=c._northEast,!R||!$)return this}else return c?this.extend(ce(c)||re(c)):this;return!g&&!S?(this._southWest=new ue(R.lat,R.lng),this._northEast=new ue($.lat,$.lng)):(g.lat=Math.min(R.lat,g.lat),g.lng=Math.min(R.lng,g.lng),S.lat=Math.max($.lat,S.lat),S.lng=Math.max($.lng,S.lng)),this},pad:function(c){var g=this._southWest,S=this._northEast,R=Math.abs(g.lat-S.lat)*c,$=Math.abs(g.lng-S.lng)*c;return new q(new ue(g.lat-R,g.lng-$),new ue(S.lat+R,S.lng+$))},getCenter:function(){return new ue((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new ue(this.getNorth(),this.getWest())},getSouthEast:function(){return new ue(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(c){typeof c[0]=="number"||c instanceof ue||"lat"in c?c=ce(c):c=re(c);var g=this._southWest,S=this._northEast,R,$;return c instanceof q?(R=c.getSouthWest(),$=c.getNorthEast()):R=$=c,R.lat>=g.lat&&$.lat<=S.lat&&R.lng>=g.lng&&$.lng<=S.lng},intersects:function(c){c=re(c);var g=this._southWest,S=this._northEast,R=c.getSouthWest(),$=c.getNorthEast(),te=$.lat>=g.lat&&R.lat<=S.lat,me=$.lng>=g.lng&&R.lng<=S.lng;return te&&me},overlaps:function(c){c=re(c);var g=this._southWest,S=this._northEast,R=c.getSouthWest(),$=c.getNorthEast(),te=$.lat>g.lat&&R.lat<S.lat,me=$.lng>g.lng&&R.lng<S.lng;return te&&me},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(c,g){return c?(c=re(c),this._southWest.equals(c.getSouthWest(),g)&&this._northEast.equals(c.getNorthEast(),g)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function re(c,g){return c instanceof q?c:new q(c,g)}function ue(c,g,S){if(isNaN(c)||isNaN(g))throw new Error("Invalid LatLng object: ("+c+", "+g+")");this.lat=+c,this.lng=+g,S!==void 0&&(this.alt=+S)}ue.prototype={equals:function(c,g){if(!c)return!1;c=ce(c);var S=Math.max(Math.abs(this.lat-c.lat),Math.abs(this.lng-c.lng));return S<=(g===void 0?1e-9:g)},toString:function(c){return"LatLng("+b(this.lat,c)+", "+b(this.lng,c)+")"},distanceTo:function(c){return k.distance(this,ce(c))},wrap:function(){return k.wrapLatLng(this)},toBounds:function(c){var g=180*c/40075017,S=g/Math.cos(Math.PI/180*this.lat);return re([this.lat-g,this.lng-S],[this.lat+g,this.lng+S])},clone:function(){return new ue(this.lat,this.lng,this.alt)}};function ce(c,g,S){return c instanceof ue?c:O(c)&&typeof c[0]!="object"?c.length===3?new ue(c[0],c[1],c[2]):c.length===2?new ue(c[0],c[1]):null:c==null?c:typeof c=="object"&&"lat"in c?new ue(c.lat,"lng"in c?c.lng:c.lon,c.alt):g===void 0?null:new ue(c,g,S)}var ve={latLngToPoint:function(c,g){var S=this.projection.project(c),R=this.scale(g);return this.transformation._transform(S,R)},pointToLatLng:function(c,g){var S=this.scale(g),R=this.transformation.untransform(c,S);return this.projection.unproject(R)},project:function(c){return this.projection.project(c)},unproject:function(c){return this.projection.unproject(c)},scale:function(c){return 256*Math.pow(2,c)},zoom:function(c){return Math.log(c/256)/Math.LN2},getProjectedBounds:function(c){if(this.infinite)return null;var g=this.projection.bounds,S=this.scale(c),R=this.transformation.transform(g.min,S),$=this.transformation.transform(g.max,S);return new D(R,$)},infinite:!1,wrapLatLng:function(c){var g=this.wrapLng?m(c.lng,this.wrapLng,!0):c.lng,S=this.wrapLat?m(c.lat,this.wrapLat,!0):c.lat,R=c.alt;return new ue(S,g,R)},wrapLatLngBounds:function(c){var g=c.getCenter(),S=this.wrapLatLng(g),R=g.lat-S.lat,$=g.lng-S.lng;if(R===0&&$===0)return c;var te=c.getSouthWest(),me=c.getNorthEast(),Se=new ue(te.lat-R,te.lng-$),Me=new ue(me.lat-R,me.lng-$);return new q(Se,Me)}},k=i({},ve,{wrapLng:[-180,180],R:6371e3,distance:function(c,g){var S=Math.PI/180,R=c.lat*S,$=g.lat*S,te=Math.sin((g.lat-c.lat)*S/2),me=Math.sin((g.lng-c.lng)*S/2),Se=te*te+Math.cos(R)*Math.cos($)*me*me,Me=2*Math.atan2(Math.sqrt(Se),Math.sqrt(1-Se));return this.R*Me}}),F=6378137,G={R:F,MAX_LATITUDE:85.0511287798,project:function(c){var g=Math.PI/180,S=this.MAX_LATITUDE,R=Math.max(Math.min(S,c.lat),-S),$=Math.sin(R*g);return new I(this.R*c.lng*g,this.R*Math.log((1+$)/(1-$))/2)},unproject:function(c){var g=180/Math.PI;return new ue((2*Math.atan(Math.exp(c.y/this.R))-Math.PI/2)*g,c.x*g/this.R)},bounds:function(){var c=F*Math.PI;return new D([-c,-c],[c,c])}()};function le(c,g,S,R){if(O(c)){this._a=c[0],this._b=c[1],this._c=c[2],this._d=c[3];return}this._a=c,this._b=g,this._c=S,this._d=R}le.prototype={transform:function(c,g){return this._transform(c.clone(),g)},_transform:function(c,g){return g=g||1,c.x=g*(this._a*c.x+this._b),c.y=g*(this._c*c.y+this._d),c},untransform:function(c,g){return g=g||1,new I((c.x/g-this._b)/this._a,(c.y/g-this._d)/this._c)}};function H(c,g,S,R){return new le(c,g,S,R)}var ae=i({},k,{code:"EPSG:3857",projection:G,transformation:function(){var c=.5/(Math.PI*G.R);return H(c,.5,-c,.5)}()}),fe=i({},ae,{code:"EPSG:900913"});function ge(c){return document.createElementNS("http://www.w3.org/2000/svg",c)}function de(c,g){var S="",R,$,te,me,Se,Me;for(R=0,te=c.length;R<te;R++){for(Se=c[R],$=0,me=Se.length;$<me;$++)Me=Se[$],S+=($?"L":"M")+Me.x+" "+Me.y;S+=g?ot.svg?"z":"x":""}return S||"M0 0"}var _e=document.documentElement.style,Te="ActiveXObject"in window,Le=Te&&!document.addEventListener,qe="msLaunchUri"in navigator&&!("documentMode"in document),Be=Rn("webkit"),He=Rn("android"),be=Rn("android 2")||Rn("android 3"),we=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),De=He&&Rn("Google")&&we<537&&!("AudioNode"in window),Re=!!window.opera,Ae=!qe&&Rn("chrome"),Fe=Rn("gecko")&&!Be&&!Re&&!Te,Ve=!Ae&&Rn("safari"),Ze=Rn("phantom"),ut="OTransition"in _e,at=navigator.platform.indexOf("Win")===0,pt=Te&&"transition"in _e,Lt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!be,Dt="MozPerspective"in _e,kt=!window.L_DISABLE_3D&&(pt||Lt||Dt)&&!ut&&!Ze,wr=typeof orientation<"u"||Rn("mobile"),$n=wr&&Be,os=wr&&Lt,ni=!window.PointerEvent&&window.MSPointerEvent,ss=!!(window.PointerEvent||ni),Oa="ontouchstart"in window||!!window.TouchEvent,qu=!window.L_NO_TOUCH&&(Oa||ss),ls=wr&&Re,ja=wr&&Fe,hn=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,on=function(){var c=!1;try{var g=Object.defineProperty({},"passive",{get:function(){c=!0}});window.addEventListener("testPassiveEventSupport",p,g),window.removeEventListener("testPassiveEventSupport",p,g)}catch{}return c}(),Qn=function(){return!!document.createElement("canvas").getContext}(),Vn=!!(document.createElementNS&&ge("svg").createSVGRect),Xt=!!Vn&&function(){var c=document.createElement("div");return c.innerHTML="<svg/>",(c.firstChild&&c.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),At=!Vn&&function(){try{var c=document.createElement("div");c.innerHTML='<v:shape adj="1"/>';var g=c.firstChild;return g.style.behavior="url(#default#VML)",g&&typeof g.adj=="object"}catch{return!1}}(),Qt=navigator.platform.indexOf("Mac")===0,Jn=navigator.platform.indexOf("Linux")===0;function Rn(c){return navigator.userAgent.toLowerCase().indexOf(c)>=0}var ot={ie:Te,ielt9:Le,edge:qe,webkit:Be,android:He,android23:be,androidStock:De,opera:Re,chrome:Ae,gecko:Fe,safari:Ve,phantom:Ze,opera12:ut,win:at,ie3d:pt,webkit3d:Lt,gecko3d:Dt,any3d:kt,mobile:wr,mobileWebkit:$n,mobileWebkit3d:os,msPointer:ni,pointer:ss,touch:qu,touchNative:Oa,mobileOpera:ls,mobileGecko:ja,retina:hn,passiveEvents:on,canvas:Qn,svg:Vn,vml:At,inlineSvg:Xt,mac:Qt,linux:Jn},hm=ot.msPointer?"MSPointerDown":"pointerdown",Uf=ot.msPointer?"MSPointerMove":"pointermove",us=ot.msPointer?"MSPointerUp":"pointerup",Gu=ot.msPointer?"MSPointerCancel":"pointercancel",Pa={touchstart:hm,touchmove:Uf,touchend:us,touchcancel:Gu},no={touchstart:gm,touchmove:Ll,touchend:Ll,touchcancel:Ll},Li={},ro=!1;function In(c,g,S){return g==="touchstart"&&qy(),no[g]?(S=no[g].bind(this,S),c.addEventListener(Pa[g],S,!1),S):(console.warn("wrong event specified:",g),p)}function mm(c,g,S){if(!Pa[g]){console.warn("wrong event specified:",g);return}c.removeEventListener(Pa[g],S,!1)}function pm(c){Li[c.pointerId]=c}function io(c){Li[c.pointerId]&&(Li[c.pointerId]=c)}function ao(c){delete Li[c.pointerId]}function qy(){ro||(document.addEventListener(hm,pm,!0),document.addEventListener(Uf,io,!0),document.addEventListener(us,ao,!0),document.addEventListener(Gu,ao,!0),ro=!0)}function Ll(c,g){if(g.pointerType!==(g.MSPOINTER_TYPE_MOUSE||"mouse")){g.touches=[];for(var S in Li)g.touches.push(Li[S]);g.changedTouches=[g],c(g)}}function gm(c,g){g.MSPOINTER_TYPE_TOUCH&&g.pointerType===g.MSPOINTER_TYPE_TOUCH&&Cn(g),Ll(c,g)}function Gy(c){var g={},S,R;for(R in c)S=c[R],g[R]=S&&S.bind?S.bind(c):S;return c=g,g.type="dblclick",g.detail=2,g.isTrusted=!1,g._simulated=!0,g}var Yu=200;function Wu(c,g){c.addEventListener("dblclick",g);var S=0,R;function $(te){if(te.detail!==1){R=te.detail;return}if(!(te.pointerType==="mouse"||te.sourceCapabilities&&!te.sourceCapabilities.firesTouchEvents)){var me=Ff(te);if(!(me.some(function(Me){return Me instanceof HTMLLabelElement&&Me.attributes.for})&&!me.some(function(Me){return Me instanceof HTMLInputElement||Me instanceof HTMLSelectElement}))){var Se=Date.now();Se-S<=Yu?(R++,R===2&&g(Gy(te))):R=1,S=Se}}}return c.addEventListener("click",$),{dblclick:g,simDblclick:$}}function ta(c,g){c.removeEventListener("dblclick",g.dblclick),c.removeEventListener("click",g.simDblclick)}var Dl=hs(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),cs=hs(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),oo=cs==="webkitTransition"||cs==="OTransition"?cs+"End":"transitionend";function Ku(c){return typeof c=="string"?document.getElementById(c):c}function so(c,g){var S=c.style[g]||c.currentStyle&&c.currentStyle[g];if((!S||S==="auto")&&document.defaultView){var R=document.defaultView.getComputedStyle(c,null);S=R?R[g]:null}return S==="auto"?null:S}function Ot(c,g,S){var R=document.createElement(c);return R.className=g||"",S&&S.appendChild(R),R}function Jt(c){var g=c.parentNode;g&&g.removeChild(c)}function ur(c){for(;c.firstChild;)c.removeChild(c.firstChild)}function lo(c){var g=c.parentNode;g&&g.lastChild!==c&&g.appendChild(c)}function fs(c){var g=c.parentNode;g&&g.firstChild!==c&&g.insertBefore(c,g.firstChild)}function ds(c,g){if(c.classList!==void 0)return c.classList.contains(g);var S=cr(c);return S.length>0&&new RegExp("(^|\\s)"+g+"(\\s|$)").test(S)}function vt(c,g){if(c.classList!==void 0)for(var S=w(g),R=0,$=S.length;R<$;R++)c.classList.add(S[R]);else if(!ds(c,g)){var te=cr(c);Bf(c,(te?te+" ":"")+g)}}function en(c,g){c.classList!==void 0?c.classList.remove(g):Bf(c,_((" "+cr(c)+" ").replace(" "+g+" "," ")))}function Bf(c,g){c.className.baseVal===void 0?c.className=g:c.className.baseVal=g}function cr(c){return c.correspondingElement&&(c=c.correspondingElement),c.className.baseVal===void 0?c.className:c.className.baseVal}function Sr(c,g){"opacity"in c.style?c.style.opacity=g:"filter"in c.style&&vm(c,g)}function vm(c,g){var S=!1,R="DXImageTransform.Microsoft.Alpha";try{S=c.filters.item(R)}catch{if(g===1)return}g=Math.round(g*100),S?(S.Enabled=g!==100,S.Opacity=g):c.style.filter+=" progid:"+R+"(opacity="+g+")"}function hs(c){for(var g=document.documentElement.style,S=0;S<c.length;S++)if(c[S]in g)return c[S];return!1}function qr(c,g,S){var R=g||new I(0,0);c.style[Dl]=(ot.ie3d?"translate("+R.x+"px,"+R.y+"px)":"translate3d("+R.x+"px,"+R.y+"px,0)")+(S?" scale("+S+")":"")}function bn(c,g){c._leaflet_pos=g,ot.any3d?qr(c,g):(c.style.left=g.x+"px",c.style.top=g.y+"px")}function Ma(c){return c._leaflet_pos||new I(0,0)}var Di,kl,Zu;if("onselectstart"in document)Di=function(){mt(window,"selectstart",Cn)},kl=function(){It(window,"selectstart",Cn)};else{var ms=hs(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Di=function(){if(ms){var c=document.documentElement.style;Zu=c[ms],c[ms]="none"}},kl=function(){ms&&(document.documentElement.style[ms]=Zu,Zu=void 0)}}function Il(){mt(window,"dragstart",Cn)}function zf(){It(window,"dragstart",Cn)}var Xu,ps;function Ul(c){for(;c.tabIndex===-1;)c=c.parentNode;c.style&&(gs(),Xu=c,ps=c.style.outlineStyle,c.style.outlineStyle="none",mt(window,"keydown",gs))}function gs(){Xu&&(Xu.style.outlineStyle=ps,Xu=void 0,ps=void 0,It(window,"keydown",gs))}function uo(c){do c=c.parentNode;while((!c.offsetWidth||!c.offsetHeight)&&c!==document.body);return c}function Ra(c){var g=c.getBoundingClientRect();return{x:g.width/c.offsetWidth||1,y:g.height/c.offsetHeight||1,boundingClientRect:g}}var ym={__proto__:null,TRANSFORM:Dl,TRANSITION:cs,TRANSITION_END:oo,get:Ku,getStyle:so,create:Ot,remove:Jt,empty:ur,toFront:lo,toBack:fs,hasClass:ds,addClass:vt,removeClass:en,setClass:Bf,getClass:cr,setOpacity:Sr,testProp:hs,setTransform:qr,setPosition:bn,getPosition:Ma,get disableTextSelection(){return Di},get enableTextSelection(){return kl},disableImageDrag:Il,enableImageDrag:zf,preventOutline:Ul,restoreOutline:gs,getSizedParentNode:uo,getScale:Ra};function mt(c,g,S,R){if(g&&typeof g=="object")for(var $ in g)co(c,$,g[$],S);else{g=w(g);for(var te=0,me=g.length;te<me;te++)co(c,g[te],S,R)}return this}var ri="_leaflet_events";function It(c,g,S,R){if(arguments.length===1)ki(c),delete c[ri];else if(g&&typeof g=="object")for(var $ in g)Ii(c,$,g[$],S);else if(g=w(g),arguments.length===2)ki(c,function(Se){return N(g,Se)!==-1});else for(var te=0,me=g.length;te<me;te++)Ii(c,g[te],S,R);return this}function ki(c,g){for(var S in c[ri]){var R=S.split(/\d/)[0];(!g||g(R))&&Ii(c,R,null,null,S)}}var Bl={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function co(c,g,S,R){var $=g+d(S)+(R?"_"+d(R):"");if(c[ri]&&c[ri][$])return this;var te=function(Se){return S.call(R||c,Se||window.event)},me=te;!ot.touchNative&&ot.pointer&&g.indexOf("touch")===0?te=In(c,g,te):ot.touch&&g==="dblclick"?te=Wu(c,te):"addEventListener"in c?g==="touchstart"||g==="touchmove"||g==="wheel"||g==="mousewheel"?c.addEventListener(Bl[g]||g,te,ot.passiveEvents?{passive:!1}:!1):g==="mouseenter"||g==="mouseleave"?(te=function(Se){Se=Se||window.event,ho(c,Se)&&me(Se)},c.addEventListener(Bl[g],te,!1)):c.addEventListener(g,me,!1):c.attachEvent("on"+g,te),c[ri]=c[ri]||{},c[ri][$]=te}function Ii(c,g,S,R,$){$=$||g+d(S)+(R?"_"+d(R):"");var te=c[ri]&&c[ri][$];if(!te)return this;!ot.touchNative&&ot.pointer&&g.indexOf("touch")===0?mm(c,g,te):ot.touch&&g==="dblclick"?ta(c,te):"removeEventListener"in c?c.removeEventListener(Bl[g]||g,te,!1):c.detachEvent("on"+g,te),c[ri][$]=null}function na(c){return c.stopPropagation?c.stopPropagation():c.originalEvent?c.originalEvent._stopped=!0:c.cancelBubble=!0,this}function vs(c){return co(c,"wheel",na),this}function ys(c){return mt(c,"mousedown touchstart dblclick contextmenu",na),c._leaflet_disable_click=!0,this}function Cn(c){return c.preventDefault?c.preventDefault():c.returnValue=!1,this}function Ui(c){return Cn(c),na(c),this}function Ff(c){if(c.composedPath)return c.composedPath();for(var g=[],S=c.target;S;)g.push(S),S=S.parentNode;return g}function fr(c,g){if(!g)return new I(c.clientX,c.clientY);var S=Ra(g),R=S.boundingClientRect;return new I((c.clientX-R.left)/S.x-g.clientLeft,(c.clientY-R.top)/S.y-g.clientTop)}var fo=ot.linux&&ot.chrome?window.devicePixelRatio:ot.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function zl(c){return ot.edge?c.wheelDeltaY/2:c.deltaY&&c.deltaMode===0?-c.deltaY/fo:c.deltaY&&c.deltaMode===1?-c.deltaY*20:c.deltaY&&c.deltaMode===2?-c.deltaY*60:c.deltaX||c.deltaZ?0:c.wheelDelta?(c.wheelDeltaY||c.wheelDelta)/2:c.detail&&Math.abs(c.detail)<32765?-c.detail*20:c.detail?c.detail/-32765*60:0}function ho(c,g){var S=g.relatedTarget;if(!S)return!0;try{for(;S&&S!==c;)S=S.parentNode}catch{return!1}return S!==c}var Yy={__proto__:null,on:mt,off:It,stopPropagation:na,disableScrollPropagation:vs,disableClickPropagation:ys,preventDefault:Cn,stop:Ui,getPropagationPath:Ff,getMousePosition:fr,getWheelDelta:zl,isExternalTarget:ho,addListener:mt,removeListener:It},Qu=B.extend({run:function(c,g,S,R){this.stop(),this._el=c,this._inProgress=!0,this._duration=S||.25,this._easeOutPower=1/Math.max(R||.5,.2),this._startPos=Ma(c),this._offset=g.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=J(this._animate,this),this._step()},_step:function(c){var g=+new Date-this._startTime,S=this._duration*1e3;g<S?this._runFrame(this._easeOut(g/S),c):(this._runFrame(1),this._complete())},_runFrame:function(c,g){var S=this._startPos.add(this._offset.multiplyBy(c));g&&S._round(),bn(this._el,S),this.fire("step")},_complete:function(){ne(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(c){return 1-Math.pow(1-c,this._easeOutPower)}}),_t=B.extend({options:{crs:ae,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(c,g){g=x(this,g),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(c),this._initLayout(),this._onResize=s(this._onResize,this),this._initEvents(),g.maxBounds&&this.setMaxBounds(g.maxBounds),g.zoom!==void 0&&(this._zoom=this._limitZoom(g.zoom)),g.center&&g.zoom!==void 0&&this.setView(ce(g.center),g.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=cs&&ot.any3d&&!ot.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),mt(this._proxy,oo,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(c,g,S){if(g=g===void 0?this._zoom:this._limitZoom(g),c=this._limitCenter(ce(c),g,this.options.maxBounds),S=S||{},this._stop(),this._loaded&&!S.reset&&S!==!0){S.animate!==void 0&&(S.zoom=i({animate:S.animate},S.zoom),S.pan=i({animate:S.animate,duration:S.duration},S.pan));var R=this._zoom!==g?this._tryAnimatedZoom&&this._tryAnimatedZoom(c,g,S.zoom):this._tryAnimatedPan(c,S.pan);if(R)return clearTimeout(this._sizeTimer),this}return this._resetView(c,g,S.pan&&S.pan.noMoveStart),this},setZoom:function(c,g){return this._loaded?this.setView(this.getCenter(),c,{zoom:g}):(this._zoom=c,this)},zoomIn:function(c,g){return c=c||(ot.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+c,g)},zoomOut:function(c,g){return c=c||(ot.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-c,g)},setZoomAround:function(c,g,S){var R=this.getZoomScale(g),$=this.getSize().divideBy(2),te=c instanceof I?c:this.latLngToContainerPoint(c),me=te.subtract($).multiplyBy(1-1/R),Se=this.containerPointToLatLng($.add(me));return this.setView(Se,g,{zoom:S})},_getBoundsCenterZoom:function(c,g){g=g||{},c=c.getBounds?c.getBounds():re(c);var S=M(g.paddingTopLeft||g.padding||[0,0]),R=M(g.paddingBottomRight||g.padding||[0,0]),$=this.getBoundsZoom(c,!1,S.add(R));if($=typeof g.maxZoom=="number"?Math.min(g.maxZoom,$):$,$===1/0)return{center:c.getCenter(),zoom:$};var te=R.subtract(S).divideBy(2),me=this.project(c.getSouthWest(),$),Se=this.project(c.getNorthEast(),$),Me=this.unproject(me.add(Se).divideBy(2).add(te),$);return{center:Me,zoom:$}},fitBounds:function(c,g){if(c=re(c),!c.isValid())throw new Error("Bounds are not valid.");var S=this._getBoundsCenterZoom(c,g);return this.setView(S.center,S.zoom,g)},fitWorld:function(c){return this.fitBounds([[-90,-180],[90,180]],c)},panTo:function(c,g){return this.setView(c,this._zoom,{pan:g})},panBy:function(c,g){if(c=M(c).round(),g=g||{},!c.x&&!c.y)return this.fire("moveend");if(g.animate!==!0&&!this.getSize().contains(c))return this._resetView(this.unproject(this.project(this.getCenter()).add(c)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Qu,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),g.noMoveStart||this.fire("movestart"),g.animate!==!1){vt(this._mapPane,"leaflet-pan-anim");var S=this._getMapPanePos().subtract(c).round();this._panAnim.run(this._mapPane,S,g.duration||.25,g.easeLinearity)}else this._rawPanBy(c),this.fire("move").fire("moveend");return this},flyTo:function(c,g,S){if(S=S||{},S.animate===!1||!ot.any3d)return this.setView(c,g,S);this._stop();var R=this.project(this.getCenter()),$=this.project(c),te=this.getSize(),me=this._zoom;c=ce(c),g=g===void 0?me:g;var Se=Math.max(te.x,te.y),Me=Se*this.getZoomScale(me,g),$e=$.distanceTo(R)||1,Xe=1.42,tt=Xe*Xe;function rt(mn){var Fi=mn?-1:1,aa=mn?Me:Se,Ia=Me*Me-Se*Se+Fi*tt*tt*$e*$e,oa=2*aa*tt*$e,Jl=Ia/oa,fc=Math.sqrt(Jl*Jl+1)-Jl,eu=fc<1e-9?-18:Math.log(fc);return eu}function ht(mn){return(Math.exp(mn)-Math.exp(-mn))/2}function tn(mn){return(Math.exp(mn)+Math.exp(-mn))/2}function _n(mn){return ht(mn)/tn(mn)}var tr=rt(0);function Gr(mn){return Se*(tn(tr)/tn(tr+Xe*mn))}function Im(mn){return Se*(tn(tr)*_n(tr+Xe*mn)-ht(tr))/tt}function Um(mn){return 1-Math.pow(1-mn,1.5)}var Ql=Date.now(),Ps=(rt(1)-tr)/Xe,Bm=S.duration?1e3*S.duration:1e3*Ps*.8;function Ms(){var mn=(Date.now()-Ql)/Bm,Fi=Um(mn)*Ps;mn<=1?(this._flyToFrame=J(Ms,this),this._move(this.unproject(R.add($.subtract(R).multiplyBy(Im(Fi)/$e)),me),this.getScaleZoom(Se/Gr(Fi),me),{flyTo:!0})):this._move(c,g)._moveEnd(!0)}return this._moveStart(!0,S.noMoveStart),Ms.call(this),this},flyToBounds:function(c,g){var S=this._getBoundsCenterZoom(c,g);return this.flyTo(S.center,S.zoom,g)},setMaxBounds:function(c){return c=re(c),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),c.isValid()?(this.options.maxBounds=c,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(c){var g=this.options.minZoom;return this.options.minZoom=c,this._loaded&&g!==c&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(c):this},setMaxZoom:function(c){var g=this.options.maxZoom;return this.options.maxZoom=c,this._loaded&&g!==c&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(c):this},panInsideBounds:function(c,g){this._enforcingBounds=!0;var S=this.getCenter(),R=this._limitCenter(S,this._zoom,re(c));return S.equals(R)||this.panTo(R,g),this._enforcingBounds=!1,this},panInside:function(c,g){g=g||{};var S=M(g.paddingTopLeft||g.padding||[0,0]),R=M(g.paddingBottomRight||g.padding||[0,0]),$=this.project(this.getCenter()),te=this.project(c),me=this.getPixelBounds(),Se=Y([me.min.add(S),me.max.subtract(R)]),Me=Se.getSize();if(!Se.contains(te)){this._enforcingBounds=!0;var $e=te.subtract(Se.getCenter()),Xe=Se.extend(te).getSize().subtract(Me);$.x+=$e.x<0?-Xe.x:Xe.x,$.y+=$e.y<0?-Xe.y:Xe.y,this.panTo(this.unproject($),g),this._enforcingBounds=!1}return this},invalidateSize:function(c){if(!this._loaded)return this;c=i({animate:!1,pan:!0},c===!0?{animate:!0}:c);var g=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var S=this.getSize(),R=g.divideBy(2).round(),$=S.divideBy(2).round(),te=R.subtract($);return!te.x&&!te.y?this:(c.animate&&c.pan?this.panBy(te):(c.pan&&this._rawPanBy(te),this.fire("move"),c.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:g,newSize:S}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(c){if(c=this._locateOptions=i({timeout:1e4,watch:!1},c),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var g=s(this._handleGeolocationResponse,this),S=s(this._handleGeolocationError,this);return c.watch?this._locationWatchId=navigator.geolocation.watchPosition(g,S,c):navigator.geolocation.getCurrentPosition(g,S,c),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(c){if(this._container._leaflet_id){var g=c.code,S=c.message||(g===1?"permission denied":g===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:g,message:"Geolocation error: "+S+"."})}},_handleGeolocationResponse:function(c){if(this._container._leaflet_id){var g=c.coords.latitude,S=c.coords.longitude,R=new ue(g,S),$=R.toBounds(c.coords.accuracy*2),te=this._locateOptions;if(te.setView){var me=this.getBoundsZoom($);this.setView(R,te.maxZoom?Math.min(me,te.maxZoom):me)}var Se={latlng:R,bounds:$,timestamp:c.timestamp};for(var Me in c.coords)typeof c.coords[Me]=="number"&&(Se[Me]=c.coords[Me]);this.fire("locationfound",Se)}},addHandler:function(c,g){if(!g)return this;var S=this[c]=new g(this);return this._handlers.push(S),this.options[c]&&S.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(),Jt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(ne(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var c;for(c in this._layers)this._layers[c].remove();for(c in this._panes)Jt(this._panes[c]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(c,g){var S="leaflet-pane"+(c?" leaflet-"+c.replace("Pane","")+"-pane":""),R=Ot("div",S,g||this._mapPane);return c&&(this._panes[c]=R),R},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var c=this.getPixelBounds(),g=this.unproject(c.getBottomLeft()),S=this.unproject(c.getTopRight());return new q(g,S)},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(c,g,S){c=re(c),S=M(S||[0,0]);var R=this.getZoom()||0,$=this.getMinZoom(),te=this.getMaxZoom(),me=c.getNorthWest(),Se=c.getSouthEast(),Me=this.getSize().subtract(S),$e=Y(this.project(Se,R),this.project(me,R)).getSize(),Xe=ot.any3d?this.options.zoomSnap:1,tt=Me.x/$e.x,rt=Me.y/$e.y,ht=g?Math.max(tt,rt):Math.min(tt,rt);return R=this.getScaleZoom(ht,R),Xe&&(R=Math.round(R/(Xe/100))*(Xe/100),R=g?Math.ceil(R/Xe)*Xe:Math.floor(R/Xe)*Xe),Math.max($,Math.min(te,R))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new I(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(c,g){var S=this._getTopLeftPoint(c,g);return new D(S,S.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(c){return this.options.crs.getProjectedBounds(c===void 0?this.getZoom():c)},getPane:function(c){return typeof c=="string"?this._panes[c]:c},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(c,g){var S=this.options.crs;return g=g===void 0?this._zoom:g,S.scale(c)/S.scale(g)},getScaleZoom:function(c,g){var S=this.options.crs;g=g===void 0?this._zoom:g;var R=S.zoom(c*S.scale(g));return isNaN(R)?1/0:R},project:function(c,g){return g=g===void 0?this._zoom:g,this.options.crs.latLngToPoint(ce(c),g)},unproject:function(c,g){return g=g===void 0?this._zoom:g,this.options.crs.pointToLatLng(M(c),g)},layerPointToLatLng:function(c){var g=M(c).add(this.getPixelOrigin());return this.unproject(g)},latLngToLayerPoint:function(c){var g=this.project(ce(c))._round();return g._subtract(this.getPixelOrigin())},wrapLatLng:function(c){return this.options.crs.wrapLatLng(ce(c))},wrapLatLngBounds:function(c){return this.options.crs.wrapLatLngBounds(re(c))},distance:function(c,g){return this.options.crs.distance(ce(c),ce(g))},containerPointToLayerPoint:function(c){return M(c).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(c){return M(c).add(this._getMapPanePos())},containerPointToLatLng:function(c){var g=this.containerPointToLayerPoint(M(c));return this.layerPointToLatLng(g)},latLngToContainerPoint:function(c){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ce(c)))},mouseEventToContainerPoint:function(c){return fr(c,this._container)},mouseEventToLayerPoint:function(c){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(c))},mouseEventToLatLng:function(c){return this.layerPointToLatLng(this.mouseEventToLayerPoint(c))},_initContainer:function(c){var g=this._container=Ku(c);if(g){if(g._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");mt(g,"scroll",this._onScroll,this),this._containerId=d(g)},_initLayout:function(){var c=this._container;this._fadeAnimated=this.options.fadeAnimation&&ot.any3d,vt(c,"leaflet-container"+(ot.touch?" leaflet-touch":"")+(ot.retina?" leaflet-retina":"")+(ot.ielt9?" leaflet-oldie":"")+(ot.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var g=so(c,"position");g!=="absolute"&&g!=="relative"&&g!=="fixed"&&g!=="sticky"&&(c.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var c=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),bn(this._mapPane,new I(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(vt(c.markerPane,"leaflet-zoom-hide"),vt(c.shadowPane,"leaflet-zoom-hide"))},_resetView:function(c,g,S){bn(this._mapPane,new I(0,0));var R=!this._loaded;this._loaded=!0,g=this._limitZoom(g),this.fire("viewprereset");var $=this._zoom!==g;this._moveStart($,S)._move(c,g)._moveEnd($),this.fire("viewreset"),R&&this.fire("load")},_moveStart:function(c,g){return c&&this.fire("zoomstart"),g||this.fire("movestart"),this},_move:function(c,g,S,R){g===void 0&&(g=this._zoom);var $=this._zoom!==g;return this._zoom=g,this._lastCenter=c,this._pixelOrigin=this._getNewPixelOrigin(c),R?S&&S.pinch&&this.fire("zoom",S):(($||S&&S.pinch)&&this.fire("zoom",S),this.fire("move",S)),this},_moveEnd:function(c){return c&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return ne(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(c){bn(this._mapPane,this._getMapPanePos().subtract(c))},_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(c){this._targets={},this._targets[d(this._container)]=this;var g=c?It:mt;g(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&g(window,"resize",this._onResize,this),ot.any3d&&this.options.transform3DLimit&&(c?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){ne(this._resizeRequest),this._resizeRequest=J(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var c=this._getMapPanePos();Math.max(Math.abs(c.x),Math.abs(c.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(c,g){for(var S=[],R,$=g==="mouseout"||g==="mouseover",te=c.target||c.srcElement,me=!1;te;){if(R=this._targets[d(te)],R&&(g==="click"||g==="preclick")&&this._draggableMoved(R)){me=!0;break}if(R&&R.listens(g,!0)&&($&&!ho(te,c)||(S.push(R),$))||te===this._container)break;te=te.parentNode}return!S.length&&!me&&!$&&this.listens(g,!0)&&(S=[this]),S},_isClickDisabled:function(c){for(;c&&c!==this._container;){if(c._leaflet_disable_click)return!0;c=c.parentNode}},_handleDOMEvent:function(c){var g=c.target||c.srcElement;if(!(!this._loaded||g._leaflet_disable_events||c.type==="click"&&this._isClickDisabled(g))){var S=c.type;S==="mousedown"&&Ul(g),this._fireDOMEvent(c,S)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(c,g,S){if(c.type==="click"){var R=i({},c);R.type="preclick",this._fireDOMEvent(R,R.type,S)}var $=this._findEventTargets(c,g);if(S){for(var te=[],me=0;me<S.length;me++)S[me].listens(g,!0)&&te.push(S[me]);$=te.concat($)}if($.length){g==="contextmenu"&&Cn(c);var Se=$[0],Me={originalEvent:c};if(c.type!=="keypress"&&c.type!=="keydown"&&c.type!=="keyup"){var $e=Se.getLatLng&&(!Se._radius||Se._radius<=10);Me.containerPoint=$e?this.latLngToContainerPoint(Se.getLatLng()):this.mouseEventToContainerPoint(c),Me.layerPoint=this.containerPointToLayerPoint(Me.containerPoint),Me.latlng=$e?Se.getLatLng():this.layerPointToLatLng(Me.layerPoint)}for(me=0;me<$.length;me++)if($[me].fire(g,Me,!0),Me.originalEvent._stopped||$[me].options.bubblingMouseEvents===!1&&N(this._mouseEvents,g)!==-1)return}},_draggableMoved:function(c){return c=c.dragging&&c.dragging.enabled()?c:this,c.dragging&&c.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var c=0,g=this._handlers.length;c<g;c++)this._handlers[c].disable()},whenReady:function(c,g){return this._loaded?c.call(g||this,{target:this}):this.on("load",c,g),this},_getMapPanePos:function(){return Ma(this._mapPane)||new I(0,0)},_moved:function(){var c=this._getMapPanePos();return c&&!c.equals([0,0])},_getTopLeftPoint:function(c,g){var S=c&&g!==void 0?this._getNewPixelOrigin(c,g):this.getPixelOrigin();return S.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(c,g){var S=this.getSize()._divideBy(2);return this.project(c,g)._subtract(S)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(c,g,S){var R=this._getNewPixelOrigin(S,g);return this.project(c,g)._subtract(R)},_latLngBoundsToNewLayerBounds:function(c,g,S){var R=this._getNewPixelOrigin(S,g);return Y([this.project(c.getSouthWest(),g)._subtract(R),this.project(c.getNorthWest(),g)._subtract(R),this.project(c.getSouthEast(),g)._subtract(R),this.project(c.getNorthEast(),g)._subtract(R)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(c){return this.latLngToLayerPoint(c).subtract(this._getCenterLayerPoint())},_limitCenter:function(c,g,S){if(!S)return c;var R=this.project(c,g),$=this.getSize().divideBy(2),te=new D(R.subtract($),R.add($)),me=this._getBoundsOffset(te,S,g);return Math.abs(me.x)<=1&&Math.abs(me.y)<=1?c:this.unproject(R.add(me),g)},_limitOffset:function(c,g){if(!g)return c;var S=this.getPixelBounds(),R=new D(S.min.add(c),S.max.add(c));return c.add(this._getBoundsOffset(R,g))},_getBoundsOffset:function(c,g,S){var R=Y(this.project(g.getNorthEast(),S),this.project(g.getSouthWest(),S)),$=R.min.subtract(c.min),te=R.max.subtract(c.max),me=this._rebound($.x,-te.x),Se=this._rebound($.y,-te.y);return new I(me,Se)},_rebound:function(c,g){return c+g>0?Math.round(c-g)/2:Math.max(0,Math.ceil(c))-Math.max(0,Math.floor(g))},_limitZoom:function(c){var g=this.getMinZoom(),S=this.getMaxZoom(),R=ot.any3d?this.options.zoomSnap:1;return R&&(c=Math.round(c/R)*R),Math.max(g,Math.min(S,c))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){en(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(c,g){var S=this._getCenterOffset(c)._trunc();return(g&&g.animate)!==!0&&!this.getSize().contains(S)?!1:(this.panBy(S,g),!0)},_createAnimProxy:function(){var c=this._proxy=Ot("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(c),this.on("zoomanim",function(g){var S=Dl,R=this._proxy.style[S];qr(this._proxy,this.project(g.center,g.zoom),this.getZoomScale(g.zoom,1)),R===this._proxy.style[S]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Jt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var c=this.getCenter(),g=this.getZoom();qr(this._proxy,this.project(c,g),this.getZoomScale(g,1))},_catchTransitionEnd:function(c){this._animatingZoom&&c.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(c,g,S){if(this._animatingZoom)return!0;if(S=S||{},!this._zoomAnimated||S.animate===!1||this._nothingToAnimate()||Math.abs(g-this._zoom)>this.options.zoomAnimationThreshold)return!1;var R=this.getZoomScale(g),$=this._getCenterOffset(c)._divideBy(1-1/R);return S.animate!==!0&&!this.getSize().contains($)?!1:(J(function(){this._moveStart(!0,S.noMoveStart||!1)._animateZoom(c,g,!0)},this),!0)},_animateZoom:function(c,g,S,R){this._mapPane&&(S&&(this._animatingZoom=!0,this._animateToCenter=c,this._animateToZoom=g,vt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:c,zoom:g,noUpdate:R}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(s(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&en(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 Fl(c,g){return new _t(c,g)}var Cr=Q.extend({options:{position:"topright"},initialize:function(c){x(this,c)},getPosition:function(){return this.options.position},setPosition:function(c){var g=this._map;return g&&g.removeControl(this),this.options.position=c,g&&g.addControl(this),this},getContainer:function(){return this._container},addTo:function(c){this.remove(),this._map=c;var g=this._container=this.onAdd(c),S=this.getPosition(),R=c._controlCorners[S];return vt(g,"leaflet-control"),S.indexOf("bottom")!==-1?R.insertBefore(g,R.firstChild):R.appendChild(g),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Jt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(c){this._map&&c&&c.screenX>0&&c.screenY>0&&this._map.getContainer().focus()}}),bs=function(c){return new Cr(c)};_t.include({addControl:function(c){return c.addTo(this),this},removeControl:function(c){return c.remove(),this},_initControlPos:function(){var c=this._controlCorners={},g="leaflet-",S=this._controlContainer=Ot("div",g+"control-container",this._container);function R($,te){var me=g+$+" "+g+te;c[$+te]=Ot("div",me,S)}R("top","left"),R("top","right"),R("bottom","left"),R("bottom","right")},_clearControlPos:function(){for(var c in this._controlCorners)Jt(this._controlCorners[c]);Jt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var bm=Cr.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(c,g,S,R){return S<R?-1:R<S?1:0}},initialize:function(c,g,S){x(this,S),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var R in c)this._addLayer(c[R],R);for(R in g)this._addLayer(g[R],R,!0)},onAdd:function(c){this._initLayout(),this._update(),this._map=c,c.on("zoomend",this._checkDisabledLayers,this);for(var g=0;g<this._layers.length;g++)this._layers[g].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(c){return Cr.prototype.addTo.call(this,c),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var c=0;c<this._layers.length;c++)this._layers[c].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(c,g){return this._addLayer(c,g),this._map?this._update():this},addOverlay:function(c,g){return this._addLayer(c,g,!0),this._map?this._update():this},removeLayer:function(c){c.off("add remove",this._onLayerChange,this);var g=this._getLayer(d(c));return g&&this._layers.splice(this._layers.indexOf(g),1),this._map?this._update():this},expand:function(){vt(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var c=this._map.getSize().y-(this._container.offsetTop+50);return c<this._section.clientHeight?(vt(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=c+"px"):en(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return en(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var c="leaflet-control-layers",g=this._container=Ot("div",c),S=this.options.collapsed;g.setAttribute("aria-haspopup",!0),ys(g),vs(g);var R=this._section=Ot("section",c+"-list");S&&(this._map.on("click",this.collapse,this),mt(g,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var $=this._layersLink=Ot("a",c+"-toggle",g);$.href="#",$.title="Layers",$.setAttribute("role","button"),mt($,{keydown:function(te){te.keyCode===13&&this._expandSafely()},click:function(te){Cn(te),this._expandSafely()}},this),S||this.expand(),this._baseLayersList=Ot("div",c+"-base",R),this._separator=Ot("div",c+"-separator",R),this._overlaysList=Ot("div",c+"-overlays",R),g.appendChild(R)},_getLayer:function(c){for(var g=0;g<this._layers.length;g++)if(this._layers[g]&&d(this._layers[g].layer)===c)return this._layers[g]},_addLayer:function(c,g,S){this._map&&c.on("add remove",this._onLayerChange,this),this._layers.push({layer:c,name:g,overlay:S}),this.options.sortLayers&&this._layers.sort(s(function(R,$){return this.options.sortFunction(R.layer,$.layer,R.name,$.name)},this)),this.options.autoZIndex&&c.setZIndex&&(this._lastZIndex++,c.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ur(this._baseLayersList),ur(this._overlaysList),this._layerControlInputs=[];var c,g,S,R,$=0;for(S=0;S<this._layers.length;S++)R=this._layers[S],this._addItem(R),g=g||R.overlay,c=c||!R.overlay,$+=R.overlay?0:1;return this.options.hideSingleBase&&(c=c&&$>1,this._baseLayersList.style.display=c?"":"none"),this._separator.style.display=g&&c?"":"none",this},_onLayerChange:function(c){this._handlingClick||this._update();var g=this._getLayer(d(c.target)),S=g.overlay?c.type==="add"?"overlayadd":"overlayremove":c.type==="add"?"baselayerchange":null;S&&this._map.fire(S,g)},_createRadioElement:function(c,g){var S='<input type="radio" class="leaflet-control-layers-selector" name="'+c+'"'+(g?' checked="checked"':"")+"/>",R=document.createElement("div");return R.innerHTML=S,R.firstChild},_addItem:function(c){var g=document.createElement("label"),S=this._map.hasLayer(c.layer),R;c.overlay?(R=document.createElement("input"),R.type="checkbox",R.className="leaflet-control-layers-selector",R.defaultChecked=S):R=this._createRadioElement("leaflet-base-layers_"+d(this),S),this._layerControlInputs.push(R),R.layerId=d(c.layer),mt(R,"click",this._onInputClick,this);var $=document.createElement("span");$.innerHTML=" "+c.name;var te=document.createElement("span");g.appendChild(te),te.appendChild(R),te.appendChild($);var me=c.overlay?this._overlaysList:this._baseLayersList;return me.appendChild(g),this._checkDisabledLayers(),g},_onInputClick:function(){if(!this._preventClick){var c=this._layerControlInputs,g,S,R=[],$=[];this._handlingClick=!0;for(var te=c.length-1;te>=0;te--)g=c[te],S=this._getLayer(g.layerId).layer,g.checked?R.push(S):g.checked||$.push(S);for(te=0;te<$.length;te++)this._map.hasLayer($[te])&&this._map.removeLayer($[te]);for(te=0;te<R.length;te++)this._map.hasLayer(R[te])||this._map.addLayer(R[te]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var c=this._layerControlInputs,g,S,R=this._map.getZoom(),$=c.length-1;$>=0;$--)g=c[$],S=this._getLayer(g.layerId).layer,g.disabled=S.options.minZoom!==void 0&&R<S.options.minZoom||S.options.maxZoom!==void 0&&R>S.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var c=this._section;this._preventClick=!0,mt(c,"click",Cn),this.expand();var g=this;setTimeout(function(){It(c,"click",Cn),g._preventClick=!1})}}),Wy=function(c,g,S){return new bm(c,g,S)},$f=Cr.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(c){var g="leaflet-control-zoom",S=Ot("div",g+" leaflet-bar"),R=this.options;return this._zoomInButton=this._createButton(R.zoomInText,R.zoomInTitle,g+"-in",S,this._zoomIn),this._zoomOutButton=this._createButton(R.zoomOutText,R.zoomOutTitle,g+"-out",S,this._zoomOut),this._updateDisabled(),c.on("zoomend zoomlevelschange",this._updateDisabled,this),S},onRemove:function(c){c.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(c){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(c.shiftKey?3:1))},_zoomOut:function(c){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(c.shiftKey?3:1))},_createButton:function(c,g,S,R,$){var te=Ot("a",S,R);return te.innerHTML=c,te.href="#",te.title=g,te.setAttribute("role","button"),te.setAttribute("aria-label",g),ys(te),mt(te,"click",Ui),mt(te,"click",$,this),mt(te,"click",this._refocusOnMap,this),te},_updateDisabled:function(){var c=this._map,g="leaflet-disabled";en(this._zoomInButton,g),en(this._zoomOutButton,g),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||c._zoom===c.getMinZoom())&&(vt(this._zoomOutButton,g),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||c._zoom===c.getMaxZoom())&&(vt(this._zoomInButton,g),this._zoomInButton.setAttribute("aria-disabled","true"))}});_t.mergeOptions({zoomControl:!0}),_t.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new $f,this.addControl(this.zoomControl))});var Vf=function(c){return new $f(c)},_m=Cr.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(c){var g="leaflet-control-scale",S=Ot("div",g),R=this.options;return this._addScales(R,g+"-line",S),c.on(R.updateWhenIdle?"moveend":"move",this._update,this),c.whenReady(this._update,this),S},onRemove:function(c){c.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(c,g,S){c.metric&&(this._mScale=Ot("div",g,S)),c.imperial&&(this._iScale=Ot("div",g,S))},_update:function(){var c=this._map,g=c.getSize().y/2,S=c.distance(c.containerPointToLatLng([0,g]),c.containerPointToLatLng([this.options.maxWidth,g]));this._updateScales(S)},_updateScales:function(c){this.options.metric&&c&&this._updateMetric(c),this.options.imperial&&c&&this._updateImperial(c)},_updateMetric:function(c){var g=this._getRoundNum(c),S=g<1e3?g+" m":g/1e3+" km";this._updateScale(this._mScale,S,g/c)},_updateImperial:function(c){var g=c*3.2808399,S,R,$;g>5280?(S=g/5280,R=this._getRoundNum(S),this._updateScale(this._iScale,R+" mi",R/S)):($=this._getRoundNum(g),this._updateScale(this._iScale,$+" ft",$/g))},_updateScale:function(c,g,S){c.style.width=Math.round(this.options.maxWidth*S)+"px",c.innerHTML=g},_getRoundNum:function(c){var g=Math.pow(10,(Math.floor(c)+"").length-1),S=c/g;return S=S>=10?10:S>=5?5:S>=3?3:S>=2?2:1,g*S}}),Ky=function(c){return new _m(c)},Zy='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',Hf=Cr.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(ot.inlineSvg?Zy+" ":"")+"Leaflet</a>"},initialize:function(c){x(this,c),this._attributions={}},onAdd:function(c){c.attributionControl=this,this._container=Ot("div","leaflet-control-attribution"),ys(this._container);for(var g in c._layers)c._layers[g].getAttribution&&this.addAttribution(c._layers[g].getAttribution());return this._update(),c.on("layeradd",this._addAttribution,this),this._container},onRemove:function(c){c.off("layeradd",this._addAttribution,this)},_addAttribution:function(c){c.layer.getAttribution&&(this.addAttribution(c.layer.getAttribution()),c.layer.once("remove",function(){this.removeAttribution(c.layer.getAttribution())},this))},setPrefix:function(c){return this.options.prefix=c,this._update(),this},addAttribution:function(c){return c?(this._attributions[c]||(this._attributions[c]=0),this._attributions[c]++,this._update(),this):this},removeAttribution:function(c){return c?(this._attributions[c]&&(this._attributions[c]--,this._update()),this):this},_update:function(){if(this._map){var c=[];for(var g in this._attributions)this._attributions[g]&&c.push(g);var S=[];this.options.prefix&&S.push(this.options.prefix),c.length&&S.push(c.join(", ")),this._container.innerHTML=S.join(' <span aria-hidden="true">|</span> ')}}});_t.mergeOptions({attributionControl:!0}),_t.addInitHook(function(){this.options.attributionControl&&new Hf().addTo(this)});var Xy=function(c){return new Hf(c)};Cr.Layers=bm,Cr.Zoom=$f,Cr.Scale=_m,Cr.Attribution=Hf,bs.layers=Wy,bs.zoom=Vf,bs.scale=Ky,bs.attribution=Xy;var ii=Q.extend({initialize:function(c){this._map=c},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}});ii.addTo=function(c,g){return c.addHandler(g,this),this};var Qy={Events:W},xm=ot.touch?"touchstart mousedown":"mousedown",Na=B.extend({options:{clickTolerance:3},initialize:function(c,g,S,R){x(this,R),this._element=c,this._dragStartTarget=g||c,this._preventOutline=S},enable:function(){this._enabled||(mt(this._dragStartTarget,xm,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Na._dragging===this&&this.finishDrag(!0),It(this._dragStartTarget,xm,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(c){if(this._enabled&&(this._moved=!1,!ds(this._element,"leaflet-zoom-anim"))){if(c.touches&&c.touches.length!==1){Na._dragging===this&&this.finishDrag();return}if(!(Na._dragging||c.shiftKey||c.which!==1&&c.button!==1&&!c.touches)&&(Na._dragging=this,this._preventOutline&&Ul(this._element),Il(),Di(),!this._moving)){this.fire("down");var g=c.touches?c.touches[0]:c,S=uo(this._element);this._startPoint=new I(g.clientX,g.clientY),this._startPos=Ma(this._element),this._parentScale=Ra(S);var R=c.type==="mousedown";mt(document,R?"mousemove":"touchmove",this._onMove,this),mt(document,R?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(c){if(this._enabled){if(c.touches&&c.touches.length>1){this._moved=!0;return}var g=c.touches&&c.touches.length===1?c.touches[0]:c,S=new I(g.clientX,g.clientY)._subtract(this._startPoint);!S.x&&!S.y||Math.abs(S.x)+Math.abs(S.y)<this.options.clickTolerance||(S.x/=this._parentScale.x,S.y/=this._parentScale.y,Cn(c),this._moved||(this.fire("dragstart"),this._moved=!0,vt(document.body,"leaflet-dragging"),this._lastTarget=c.target||c.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),vt(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(S),this._moving=!0,this._lastEvent=c,this._updatePosition())}},_updatePosition:function(){var c={originalEvent:this._lastEvent};this.fire("predrag",c),bn(this._element,this._newPos),this.fire("drag",c)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(c){en(document.body,"leaflet-dragging"),this._lastTarget&&(en(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),It(document,"mousemove touchmove",this._onMove,this),It(document,"mouseup touchend touchcancel",this._onUp,this),zf(),kl();var g=this._moved&&this._moving;this._moving=!1,Na._dragging=!1,g&&this.fire("dragend",{noInertia:c,distance:this._newPos.distanceTo(this._startPos)})}});function wm(c,g,S){var R,$=[1,4,2,8],te,me,Se,Me,$e,Xe,tt,rt;for(te=0,Xe=c.length;te<Xe;te++)c[te]._code=mo(c[te],g);for(Se=0;Se<4;Se++){for(tt=$[Se],R=[],te=0,Xe=c.length,me=Xe-1;te<Xe;me=te++)Me=c[te],$e=c[me],Me._code&tt?$e._code&tt||(rt=ec($e,Me,tt,g,S),rt._code=mo(rt,g),R.push(rt)):($e._code&tt&&(rt=ec($e,Me,tt,g,S),rt._code=mo(rt,g),R.push(rt)),R.push(Me));c=R}return c}function Ju(c,g){var S,R,$,te,me,Se,Me,$e,Xe;if(!c||c.length===0)throw new Error("latlngs not passed");er(c)||(console.warn("latlngs are not flat! Only the first ring will be used"),c=c[0]);var tt=ce([0,0]),rt=re(c),ht=rt.getNorthWest().distanceTo(rt.getSouthWest())*rt.getNorthEast().distanceTo(rt.getNorthWest());ht<1700&&(tt=qf(c));var tn=c.length,_n=[];for(S=0;S<tn;S++){var tr=ce(c[S]);_n.push(g.project(ce([tr.lat-tt.lat,tr.lng-tt.lng])))}for(Se=Me=$e=0,S=0,R=tn-1;S<tn;R=S++)$=_n[S],te=_n[R],me=$.y*te.x-te.y*$.x,Me+=($.x+te.x)*me,$e+=($.y+te.y)*me,Se+=me*3;Se===0?Xe=_n[0]:Xe=[Me/Se,$e/Se];var Gr=g.unproject(M(Xe));return ce([Gr.lat+tt.lat,Gr.lng+tt.lng])}function qf(c){for(var g=0,S=0,R=0,$=0;$<c.length;$++){var te=ce(c[$]);g+=te.lat,S+=te.lng,R++}return ce([g/R,S/R])}var Jy={__proto__:null,clipPolygon:wm,polygonCenter:Ju,centroid:qf};function Sm(c,g){if(!g||!c.length)return c.slice();var S=g*g;return c=n0(c,S),c=t0(c,S),c}function Gf(c,g,S){return Math.sqrt(po(c,g,S,!0))}function e0(c,g,S){return po(c,g,S)}function t0(c,g){var S=c.length,R=typeof Uint8Array<"u"?Uint8Array:Array,$=new R(S);$[0]=$[S-1]=1,Yf(c,$,g,0,S-1);var te,me=[];for(te=0;te<S;te++)$[te]&&me.push(c[te]);return me}function Yf(c,g,S,R,$){var te=0,me,Se,Me;for(Se=R+1;Se<=$-1;Se++)Me=po(c[Se],c[R],c[$],!0),Me>te&&(me=Se,te=Me);te>S&&(g[me]=1,Yf(c,g,S,R,me),Yf(c,g,S,me,$))}function n0(c,g){for(var S=[c[0]],R=1,$=0,te=c.length;R<te;R++)r0(c[R],c[$])>g&&(S.push(c[R]),$=R);return $<te-1&&S.push(c[te-1]),S}var Cm;function Em(c,g,S,R,$){var te=R?Cm:mo(c,S),me=mo(g,S),Se,Me,$e;for(Cm=me;;){if(!(te|me))return[c,g];if(te&me)return!1;Se=te||me,Me=ec(c,g,Se,S,$),$e=mo(Me,S),Se===te?(c=Me,te=$e):(g=Me,me=$e)}}function ec(c,g,S,R,$){var te=g.x-c.x,me=g.y-c.y,Se=R.min,Me=R.max,$e,Xe;return S&8?($e=c.x+te*(Me.y-c.y)/me,Xe=Me.y):S&4?($e=c.x+te*(Se.y-c.y)/me,Xe=Se.y):S&2?($e=Me.x,Xe=c.y+me*(Me.x-c.x)/te):S&1&&($e=Se.x,Xe=c.y+me*(Se.x-c.x)/te),new I($e,Xe,$)}function mo(c,g){var S=0;return c.x<g.min.x?S|=1:c.x>g.max.x&&(S|=2),c.y<g.min.y?S|=4:c.y>g.max.y&&(S|=8),S}function r0(c,g){var S=g.x-c.x,R=g.y-c.y;return S*S+R*R}function po(c,g,S,R){var $=g.x,te=g.y,me=S.x-$,Se=S.y-te,Me=me*me+Se*Se,$e;return Me>0&&($e=((c.x-$)*me+(c.y-te)*Se)/Me,$e>1?($=S.x,te=S.y):$e>0&&($+=me*$e,te+=Se*$e)),me=c.x-$,Se=c.y-te,R?me*me+Se*Se:new I($,te)}function er(c){return!O(c[0])||typeof c[0][0]!="object"&&typeof c[0][0]<"u"}function Am(c){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),er(c)}function Wf(c,g){var S,R,$,te,me,Se,Me,$e;if(!c||c.length===0)throw new Error("latlngs not passed");er(c)||(console.warn("latlngs are not flat! Only the first ring will be used"),c=c[0]);var Xe=ce([0,0]),tt=re(c),rt=tt.getNorthWest().distanceTo(tt.getSouthWest())*tt.getNorthEast().distanceTo(tt.getNorthWest());rt<1700&&(Xe=qf(c));var ht=c.length,tn=[];for(S=0;S<ht;S++){var _n=ce(c[S]);tn.push(g.project(ce([_n.lat-Xe.lat,_n.lng-Xe.lng])))}for(S=0,R=0;S<ht-1;S++)R+=tn[S].distanceTo(tn[S+1])/2;if(R===0)$e=tn[0];else for(S=0,te=0;S<ht-1;S++)if(me=tn[S],Se=tn[S+1],$=me.distanceTo(Se),te+=$,te>R){Me=(te-R)/$,$e=[Se.x-Me*(Se.x-me.x),Se.y-Me*(Se.y-me.y)];break}var tr=g.unproject(M($e));return ce([tr.lat+Xe.lat,tr.lng+Xe.lng])}var Tm={__proto__:null,simplify:Sm,pointToSegmentDistance:Gf,closestPointOnSegment:e0,clipSegment:Em,_getEdgeIntersection:ec,_getBitCode:mo,_sqClosestPointOnSegment:po,isFlat:er,_flat:Am,polylineCenter:Wf},tc={project:function(c){return new I(c.lng,c.lat)},unproject:function(c){return new ue(c.y,c.x)},bounds:new D([-180,-90],[180,90])},nc={R:6378137,R_MINOR:6356752314245179e-9,bounds:new D([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(c){var g=Math.PI/180,S=this.R,R=c.lat*g,$=this.R_MINOR/S,te=Math.sqrt(1-$*$),me=te*Math.sin(R),Se=Math.tan(Math.PI/4-R/2)/Math.pow((1-me)/(1+me),te/2);return R=-S*Math.log(Math.max(Se,1e-10)),new I(c.lng*g*S,R)},unproject:function(c){for(var g=180/Math.PI,S=this.R,R=this.R_MINOR/S,$=Math.sqrt(1-R*R),te=Math.exp(-c.y/S),me=Math.PI/2-2*Math.atan(te),Se=0,Me=.1,$e;Se<15&&Math.abs(Me)>1e-7;Se++)$e=$*Math.sin(me),$e=Math.pow((1-$e)/(1+$e),$/2),Me=Math.PI/2-2*Math.atan(te*$e)-me,me+=Me;return new ue(me*g,c.x*g/S)}},Om={__proto__:null,LonLat:tc,Mercator:nc,SphericalMercator:G},_s=i({},k,{code:"EPSG:3395",projection:nc,transformation:function(){var c=.5/(Math.PI*nc.R);return H(c,.5,-c,.5)}()}),jm=i({},k,{code:"EPSG:4326",projection:tc,transformation:H(1/180,1,-1/180,.5)}),i0=i({},ve,{projection:tc,transformation:H(1,0,-1,0),scale:function(c){return Math.pow(2,c)},zoom:function(c){return Math.log(c)/Math.LN2},distance:function(c,g){var S=g.lng-c.lng,R=g.lat-c.lat;return Math.sqrt(S*S+R*R)},infinite:!0});ve.Earth=k,ve.EPSG3395=_s,ve.EPSG3857=ae,ve.EPSG900913=fe,ve.EPSG4326=jm,ve.Simple=i0;var ai=B.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(c){return c.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(c){return c&&c.removeLayer(this),this},getPane:function(c){return this._map.getPane(c?this.options[c]||c:this.options.pane)},addInteractiveTarget:function(c){return this._map._targets[d(c)]=this,this},removeInteractiveTarget:function(c){return delete this._map._targets[d(c)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(c){var g=c.target;if(g.hasLayer(this)){if(this._map=g,this._zoomAnimated=g._zoomAnimated,this.getEvents){var S=this.getEvents();g.on(S,this),this.once("remove",function(){g.off(S,this)},this)}this.onAdd(g),this.fire("add"),g.fire("layeradd",{layer:this})}}});_t.include({addLayer:function(c){if(!c._layerAdd)throw new Error("The provided object is not a Layer.");var g=d(c);return this._layers[g]?this:(this._layers[g]=c,c._mapToAdd=this,c.beforeAdd&&c.beforeAdd(this),this.whenReady(c._layerAdd,c),this)},removeLayer:function(c){var g=d(c);return this._layers[g]?(this._loaded&&c.onRemove(this),delete this._layers[g],this._loaded&&(this.fire("layerremove",{layer:c}),c.fire("remove")),c._map=c._mapToAdd=null,this):this},hasLayer:function(c){return d(c)in this._layers},eachLayer:function(c,g){for(var S in this._layers)c.call(g,this._layers[S]);return this},_addLayers:function(c){c=c?O(c)?c:[c]:[];for(var g=0,S=c.length;g<S;g++)this.addLayer(c[g])},_addZoomLimit:function(c){(!isNaN(c.options.maxZoom)||!isNaN(c.options.minZoom))&&(this._zoomBoundLayers[d(c)]=c,this._updateZoomLevels())},_removeZoomLimit:function(c){var g=d(c);this._zoomBoundLayers[g]&&(delete this._zoomBoundLayers[g],this._updateZoomLevels())},_updateZoomLevels:function(){var c=1/0,g=-1/0,S=this._getZoomSpan();for(var R in this._zoomBoundLayers){var $=this._zoomBoundLayers[R].options;c=$.minZoom===void 0?c:Math.min(c,$.minZoom),g=$.maxZoom===void 0?g:Math.max(g,$.maxZoom)}this._layersMaxZoom=g===-1/0?void 0:g,this._layersMinZoom=c===1/0?void 0:c,S!==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()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var go=ai.extend({initialize:function(c,g){x(this,g),this._layers={};var S,R;if(c)for(S=0,R=c.length;S<R;S++)this.addLayer(c[S])},addLayer:function(c){var g=this.getLayerId(c);return this._layers[g]=c,this._map&&this._map.addLayer(c),this},removeLayer:function(c){var g=c in this._layers?c:this.getLayerId(c);return this._map&&this._layers[g]&&this._map.removeLayer(this._layers[g]),delete this._layers[g],this},hasLayer:function(c){var g=typeof c=="number"?c:this.getLayerId(c);return g in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(c){var g=Array.prototype.slice.call(arguments,1),S,R;for(S in this._layers)R=this._layers[S],R[c]&&R[c].apply(R,g);return this},onAdd:function(c){this.eachLayer(c.addLayer,c)},onRemove:function(c){this.eachLayer(c.removeLayer,c)},eachLayer:function(c,g){for(var S in this._layers)c.call(g,this._layers[S]);return this},getLayer:function(c){return this._layers[c]},getLayers:function(){var c=[];return this.eachLayer(c.push,c),c},setZIndex:function(c){return this.invoke("setZIndex",c)},getLayerId:function(c){return d(c)}}),Pm=function(c,g){return new go(c,g)},Rr=go.extend({addLayer:function(c){return this.hasLayer(c)?this:(c.addEventParent(this),go.prototype.addLayer.call(this,c),this.fire("layeradd",{layer:c}))},removeLayer:function(c){return this.hasLayer(c)?(c in this._layers&&(c=this._layers[c]),c.removeEventParent(this),go.prototype.removeLayer.call(this,c),this.fire("layerremove",{layer:c})):this},setStyle:function(c){return this.invoke("setStyle",c)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var c=new q;for(var g in this._layers){var S=this._layers[g];c.extend(S.getBounds?S.getBounds():S.getLatLng())}return c}}),$l=function(c,g){return new Rr(c,g)},xs=Q.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(c){x(this,c)},createIcon:function(c){return this._createIcon("icon",c)},createShadow:function(c){return this._createIcon("shadow",c)},_createIcon:function(c,g){var S=this._getIconUrl(c);if(!S){if(c==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var R=this._createImg(S,g&&g.tagName==="IMG"?g:null);return this._setIconStyles(R,c),(this.options.crossOrigin||this.options.crossOrigin==="")&&(R.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),R},_setIconStyles:function(c,g){var S=this.options,R=S[g+"Size"];typeof R=="number"&&(R=[R,R]);var $=M(R),te=M(g==="shadow"&&S.shadowAnchor||S.iconAnchor||$&&$.divideBy(2,!0));c.className="leaflet-marker-"+g+" "+(S.className||""),te&&(c.style.marginLeft=-te.x+"px",c.style.marginTop=-te.y+"px"),$&&(c.style.width=$.x+"px",c.style.height=$.y+"px")},_createImg:function(c,g){return g=g||document.createElement("img"),g.src=c,g},_getIconUrl:function(c){return ot.retina&&this.options[c+"RetinaUrl"]||this.options[c+"Url"]}});function rc(c){return new xs(c)}var ws=xs.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(c){return typeof ws.imagePath!="string"&&(ws.imagePath=this._detectIconPath()),(this.options.imagePath||ws.imagePath)+xs.prototype._getIconUrl.call(this,c)},_stripUrl:function(c){var g=function(S,R,$){var te=R.exec(S);return te&&te[$]};return c=g(c,/^url\((['"])?(.+)\1\)$/,2),c&&g(c,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var c=Ot("div","leaflet-default-icon-path",document.body),g=so(c,"background-image")||so(c,"backgroundImage");if(document.body.removeChild(c),g=this._stripUrl(g),g)return g;var S=document.querySelector('link[href$="leaflet.css"]');return S?S.href.substring(0,S.href.length-11-1):""}}),Kf=ii.extend({initialize:function(c){this._marker=c},addHooks:function(){var c=this._marker._icon;this._draggable||(this._draggable=new Na(c,c,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),vt(c,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&en(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(c){var g=this._marker,S=g._map,R=this._marker.options.autoPanSpeed,$=this._marker.options.autoPanPadding,te=Ma(g._icon),me=S.getPixelBounds(),Se=S.getPixelOrigin(),Me=Y(me.min._subtract(Se).add($),me.max._subtract(Se).subtract($));if(!Me.contains(te)){var $e=M((Math.max(Me.max.x,te.x)-Me.max.x)/(me.max.x-Me.max.x)-(Math.min(Me.min.x,te.x)-Me.min.x)/(me.min.x-Me.min.x),(Math.max(Me.max.y,te.y)-Me.max.y)/(me.max.y-Me.max.y)-(Math.min(Me.min.y,te.y)-Me.min.y)/(me.min.y-Me.min.y)).multiplyBy(R);S.panBy($e,{animate:!1}),this._draggable._newPos._add($e),this._draggable._startPos._add($e),bn(g._icon,this._draggable._newPos),this._onDrag(c),this._panRequest=J(this._adjustPan.bind(this,c))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(c){this._marker.options.autoPan&&(ne(this._panRequest),this._panRequest=J(this._adjustPan.bind(this,c)))},_onDrag:function(c){var g=this._marker,S=g._shadow,R=Ma(g._icon),$=g._map.layerPointToLatLng(R);S&&bn(S,R),g._latlng=$,c.latlng=$,c.oldLatLng=this._oldLatLng,g.fire("move",c).fire("drag",c)},_onDragEnd:function(c){ne(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",c)}}),Ss=ai.extend({options:{icon:new ws,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(c,g){x(this,g),this._latlng=ce(c)},onAdd:function(c){this._zoomAnimated=this._zoomAnimated&&c.options.markerZoomAnimation,this._zoomAnimated&&c.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(c){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&c.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(c){var g=this._latlng;return this._latlng=ce(c),this.update(),this.fire("move",{oldLatLng:g,latlng:this._latlng})},setZIndexOffset:function(c){return this.options.zIndexOffset=c,this.update()},getIcon:function(){return this.options.icon},setIcon:function(c){return this.options.icon=c,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var c=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(c)}return this},_initIcon:function(){var c=this.options,g="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),S=c.icon.createIcon(this._icon),R=!1;S!==this._icon&&(this._icon&&this._removeIcon(),R=!0,c.title&&(S.title=c.title),S.tagName==="IMG"&&(S.alt=c.alt||"")),vt(S,g),c.keyboard&&(S.tabIndex="0",S.setAttribute("role","button")),this._icon=S,c.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&mt(S,"focus",this._panOnFocus,this);var $=c.icon.createShadow(this._shadow),te=!1;$!==this._shadow&&(this._removeShadow(),te=!0),$&&(vt($,g),$.alt=""),this._shadow=$,c.opacity<1&&this._updateOpacity(),R&&this.getPane().appendChild(this._icon),this._initInteraction(),$&&te&&this.getPane(c.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&It(this._icon,"focus",this._panOnFocus,this),Jt(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&Jt(this._shadow),this._shadow=null},_setPos:function(c){this._icon&&bn(this._icon,c),this._shadow&&bn(this._shadow,c),this._zIndex=c.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(c){this._icon&&(this._icon.style.zIndex=this._zIndex+c)},_animateZoom:function(c){var g=this._map._latLngToNewLayerPoint(this._latlng,c.zoom,c.center).round();this._setPos(g)},_initInteraction:function(){if(this.options.interactive&&(vt(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Kf)){var c=this.options.draggable;this.dragging&&(c=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Kf(this),c&&this.dragging.enable()}},setOpacity:function(c){return this.options.opacity=c,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var c=this.options.opacity;this._icon&&Sr(this._icon,c),this._shadow&&Sr(this._shadow,c)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var c=this._map;if(c){var g=this.options.icon.options,S=g.iconSize?M(g.iconSize):M(0,0),R=g.iconAnchor?M(g.iconAnchor):M(0,0);c.panInside(this._latlng,{paddingTopLeft:R,paddingBottomRight:S.subtract(R)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Zf(c,g){return new Ss(c,g)}var ra=ai.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(c){this._renderer=c.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(c){return x(this,c),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&c&&Object.prototype.hasOwnProperty.call(c,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),Vl=ra.extend({options:{fill:!0,radius:10},initialize:function(c,g){x(this,g),this._latlng=ce(c),this._radius=this.options.radius},setLatLng:function(c){var g=this._latlng;return this._latlng=ce(c),this.redraw(),this.fire("move",{oldLatLng:g,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(c){return this.options.radius=this._radius=c,this.redraw()},getRadius:function(){return this._radius},setStyle:function(c){var g=c&&c.radius||this._radius;return ra.prototype.setStyle.call(this,c),this.setRadius(g),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var c=this._radius,g=this._radiusY||c,S=this._clickTolerance(),R=[c+S,g+S];this._pxBounds=new D(this._point.subtract(R),this._point.add(R))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(c){return c.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function Mm(c,g){return new Vl(c,g)}var Xf=Vl.extend({initialize:function(c,g,S){if(typeof g=="number"&&(g=i({},S,{radius:g})),x(this,g),this._latlng=ce(c),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(c){return this._mRadius=c,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var c=[this._radius,this._radiusY||this._radius];return new q(this._map.layerPointToLatLng(this._point.subtract(c)),this._map.layerPointToLatLng(this._point.add(c)))},setStyle:ra.prototype.setStyle,_project:function(){var c=this._latlng.lng,g=this._latlng.lat,S=this._map,R=S.options.crs;if(R.distance===k.distance){var $=Math.PI/180,te=this._mRadius/k.R/$,me=S.project([g+te,c]),Se=S.project([g-te,c]),Me=me.add(Se).divideBy(2),$e=S.unproject(Me).lat,Xe=Math.acos((Math.cos(te*$)-Math.sin(g*$)*Math.sin($e*$))/(Math.cos(g*$)*Math.cos($e*$)))/$;(isNaN(Xe)||Xe===0)&&(Xe=te/Math.cos(Math.PI/180*g)),this._point=Me.subtract(S.getPixelOrigin()),this._radius=isNaN(Xe)?0:Me.x-S.project([$e,c-Xe]).x,this._radiusY=Me.y-me.y}else{var tt=R.unproject(R.project(this._latlng).subtract([this._mRadius,0]));this._point=S.latLngToLayerPoint(this._latlng),this._radius=this._point.x-S.latLngToLayerPoint(tt).x}this._updateBounds()}});function a0(c,g,S){return new Xf(c,g,S)}var ia=ra.extend({options:{smoothFactor:1,noClip:!1},initialize:function(c,g){x(this,g),this._setLatLngs(c)},getLatLngs:function(){return this._latlngs},setLatLngs:function(c){return this._setLatLngs(c),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(c){for(var g=1/0,S=null,R=po,$,te,me=0,Se=this._parts.length;me<Se;me++)for(var Me=this._parts[me],$e=1,Xe=Me.length;$e<Xe;$e++){$=Me[$e-1],te=Me[$e];var tt=R(c,$,te,!0);tt<g&&(g=tt,S=R(c,$,te))}return S&&(S.distance=Math.sqrt(g)),S},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Wf(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(c,g){return g=g||this._defaultShape(),c=ce(c),g.push(c),this._bounds.extend(c),this.redraw()},_setLatLngs:function(c){this._bounds=new q,this._latlngs=this._convertLatLngs(c)},_defaultShape:function(){return er(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(c){for(var g=[],S=er(c),R=0,$=c.length;R<$;R++)S?(g[R]=ce(c[R]),this._bounds.extend(g[R])):g[R]=this._convertLatLngs(c[R]);return g},_project:function(){var c=new D;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,c),this._bounds.isValid()&&c.isValid()&&(this._rawPxBounds=c,this._updateBounds())},_updateBounds:function(){var c=this._clickTolerance(),g=new I(c,c);this._rawPxBounds&&(this._pxBounds=new D([this._rawPxBounds.min.subtract(g),this._rawPxBounds.max.add(g)]))},_projectLatlngs:function(c,g,S){var R=c[0]instanceof ue,$=c.length,te,me;if(R){for(me=[],te=0;te<$;te++)me[te]=this._map.latLngToLayerPoint(c[te]),S.extend(me[te]);g.push(me)}else for(te=0;te<$;te++)this._projectLatlngs(c[te],g,S)},_clipPoints:function(){var c=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(c))){if(this.options.noClip){this._parts=this._rings;return}var g=this._parts,S,R,$,te,me,Se,Me;for(S=0,$=0,te=this._rings.length;S<te;S++)for(Me=this._rings[S],R=0,me=Me.length;R<me-1;R++)Se=Em(Me[R],Me[R+1],c,R,!0),Se&&(g[$]=g[$]||[],g[$].push(Se[0]),(Se[1]!==Me[R+1]||R===me-2)&&(g[$].push(Se[1]),$++))}},_simplifyPoints:function(){for(var c=this._parts,g=this.options.smoothFactor,S=0,R=c.length;S<R;S++)c[S]=Sm(c[S],g)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(c,g){var S,R,$,te,me,Se,Me=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(c))return!1;for(S=0,te=this._parts.length;S<te;S++)for(Se=this._parts[S],R=0,me=Se.length,$=me-1;R<me;$=R++)if(!(!g&&R===0)&&Gf(c,Se[$],Se[R])<=Me)return!0;return!1}});function o0(c,g){return new ia(c,g)}ia._flat=Am;var Cs=ia.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Ju(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(c){var g=ia.prototype._convertLatLngs.call(this,c),S=g.length;return S>=2&&g[0]instanceof ue&&g[0].equals(g[S-1])&&g.pop(),g},_setLatLngs:function(c){ia.prototype._setLatLngs.call(this,c),er(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return er(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var c=this._renderer._bounds,g=this.options.weight,S=new I(g,g);if(c=new D(c.min.subtract(S),c.max.add(S)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(c))){if(this.options.noClip){this._parts=this._rings;return}for(var R=0,$=this._rings.length,te;R<$;R++)te=wm(this._rings[R],c,!0),te.length&&this._parts.push(te)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(c){var g=!1,S,R,$,te,me,Se,Me,$e;if(!this._pxBounds||!this._pxBounds.contains(c))return!1;for(te=0,Me=this._parts.length;te<Me;te++)for(S=this._parts[te],me=0,$e=S.length,Se=$e-1;me<$e;Se=me++)R=S[me],$=S[Se],R.y>c.y!=$.y>c.y&&c.x<($.x-R.x)*(c.y-R.y)/($.y-R.y)+R.x&&(g=!g);return g||ia.prototype._containsPoint.call(this,c,!0)}});function Nr(c,g){return new Cs(c,g)}var Lr=Rr.extend({initialize:function(c,g){x(this,g),this._layers={},c&&this.addData(c)},addData:function(c){var g=O(c)?c:c.features,S,R,$;if(g){for(S=0,R=g.length;S<R;S++)$=g[S],($.geometries||$.geometry||$.features||$.coordinates)&&this.addData($);return this}var te=this.options;if(te.filter&&!te.filter(c))return this;var me=Hl(c,te);return me?(me.feature=Es(c),me.defaultOptions=me.options,this.resetStyle(me),te.onEachFeature&&te.onEachFeature(c,me),this.addLayer(me)):this},resetStyle:function(c){return c===void 0?this.eachLayer(this.resetStyle,this):(c.options=i({},c.defaultOptions),this._setLayerStyle(c,this.options.style),this)},setStyle:function(c){return this.eachLayer(function(g){this._setLayerStyle(g,c)},this)},_setLayerStyle:function(c,g){c.setStyle&&(typeof g=="function"&&(g=g(c.feature)),c.setStyle(g))}});function Hl(c,g){var S=c.type==="Feature"?c.geometry:c,R=S?S.coordinates:null,$=[],te=g&&g.pointToLayer,me=g&&g.coordsToLatLng||ic,Se,Me,$e,Xe;if(!R&&!S)return null;switch(S.type){case"Point":return Se=me(R),Qf(te,c,Se,g);case"MultiPoint":for($e=0,Xe=R.length;$e<Xe;$e++)Se=me(R[$e]),$.push(Qf(te,c,Se,g));return new Rr($);case"LineString":case"MultiLineString":return Me=ql(R,S.type==="LineString"?0:1,me),new ia(Me,g);case"Polygon":case"MultiPolygon":return Me=ql(R,S.type==="Polygon"?1:2,me),new Cs(Me,g);case"GeometryCollection":for($e=0,Xe=S.geometries.length;$e<Xe;$e++){var tt=Hl({geometry:S.geometries[$e],type:"Feature",properties:c.properties},g);tt&&$.push(tt)}return new Rr($);case"FeatureCollection":for($e=0,Xe=S.features.length;$e<Xe;$e++){var rt=Hl(S.features[$e],g);rt&&$.push(rt)}return new Rr($);default:throw new Error("Invalid GeoJSON object.")}}function Qf(c,g,S,R){return c?c(g,S):new Ss(S,R&&R.markersInheritOptions&&R)}function ic(c){return new ue(c[1],c[0],c[2])}function ql(c,g,S){for(var R=[],$=0,te=c.length,me;$<te;$++)me=g?ql(c[$],g-1,S):(S||ic)(c[$]),R.push(me);return R}function Gl(c,g){return c=ce(c),c.alt!==void 0?[b(c.lng,g),b(c.lat,g),b(c.alt,g)]:[b(c.lng,g),b(c.lat,g)]}function ac(c,g,S,R){for(var $=[],te=0,me=c.length;te<me;te++)$.push(g?ac(c[te],er(c[te])?0:g-1,S,R):Gl(c[te],R));return!g&&S&&$.length>0&&$.push($[0].slice()),$}function oi(c,g){return c.feature?i({},c.feature,{geometry:g}):Es(g)}function Es(c){return c.type==="Feature"||c.type==="FeatureCollection"?c:{type:"Feature",properties:{},geometry:c}}var vo={toGeoJSON:function(c){return oi(this,{type:"Point",coordinates:Gl(this.getLatLng(),c)})}};Ss.include(vo),Xf.include(vo),Vl.include(vo),ia.include({toGeoJSON:function(c){var g=!er(this._latlngs),S=ac(this._latlngs,g?1:0,!1,c);return oi(this,{type:(g?"Multi":"")+"LineString",coordinates:S})}}),Cs.include({toGeoJSON:function(c){var g=!er(this._latlngs),S=g&&!er(this._latlngs[0]),R=ac(this._latlngs,S?2:g?1:0,!0,c);return g||(R=[R]),oi(this,{type:(S?"Multi":"")+"Polygon",coordinates:R})}}),go.include({toMultiPoint:function(c){var g=[];return this.eachLayer(function(S){g.push(S.toGeoJSON(c).geometry.coordinates)}),oi(this,{type:"MultiPoint",coordinates:g})},toGeoJSON:function(c){var g=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(g==="MultiPoint")return this.toMultiPoint(c);var S=g==="GeometryCollection",R=[];return this.eachLayer(function($){if($.toGeoJSON){var te=$.toGeoJSON(c);if(S)R.push(te.geometry);else{var me=Es(te);me.type==="FeatureCollection"?R.push.apply(R,me.features):R.push(me)}}}),S?oi(this,{geometries:R,type:"GeometryCollection"}):{type:"FeatureCollection",features:R}}});function oc(c,g){return new Lr(c,g)}var Rm=oc,Bi=ai.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(c,g,S){this._url=c,this._bounds=re(g),x(this,S)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(vt(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Jt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(c){return this.options.opacity=c,this._image&&this._updateOpacity(),this},setStyle:function(c){return c.opacity&&this.setOpacity(c.opacity),this},bringToFront:function(){return this._map&&lo(this._image),this},bringToBack:function(){return this._map&&fs(this._image),this},setUrl:function(c){return this._url=c,this._image&&(this._image.src=c),this},setBounds:function(c){return this._bounds=re(c),this._map&&this._reset(),this},getEvents:function(){var c={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(c.zoomanim=this._animateZoom),c},setZIndex:function(c){return this.options.zIndex=c,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var c=this._url.tagName==="IMG",g=this._image=c?this._url:Ot("img");if(vt(g,"leaflet-image-layer"),this._zoomAnimated&&vt(g,"leaflet-zoom-animated"),this.options.className&&vt(g,this.options.className),g.onselectstart=p,g.onmousemove=p,g.onload=s(this.fire,this,"load"),g.onerror=s(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(g.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),c){this._url=g.src;return}g.src=this._url,g.alt=this.options.alt},_animateZoom:function(c){var g=this._map.getZoomScale(c.zoom),S=this._map._latLngBoundsToNewLayerBounds(this._bounds,c.zoom,c.center).min;qr(this._image,S,g)},_reset:function(){var c=this._image,g=new D(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),S=g.getSize();bn(c,g.min),c.style.width=S.x+"px",c.style.height=S.y+"px"},_updateOpacity:function(){Sr(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 c=this.options.errorOverlayUrl;c&&this._url!==c&&(this._url=c,this._image.src=c)},getCenter:function(){return this._bounds.getCenter()}}),As=function(c,g,S){return new Bi(c,g,S)},sc=Bi.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var c=this._url.tagName==="VIDEO",g=this._image=c?this._url:Ot("video");if(vt(g,"leaflet-image-layer"),this._zoomAnimated&&vt(g,"leaflet-zoom-animated"),this.options.className&&vt(g,this.options.className),g.onselectstart=p,g.onmousemove=p,g.onloadeddata=s(this.fire,this,"load"),c){for(var S=g.getElementsByTagName("source"),R=[],$=0;$<S.length;$++)R.push(S[$].src);this._url=S.length>0?R:[g.src];return}O(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(g.style,"objectFit")&&(g.style.objectFit="fill"),g.autoplay=!!this.options.autoplay,g.loop=!!this.options.loop,g.muted=!!this.options.muted,g.playsInline=!!this.options.playsInline;for(var te=0;te<this._url.length;te++){var me=Ot("source");me.src=this._url[te],g.appendChild(me)}}});function Nm(c,g,S){return new sc(c,g,S)}var La=Bi.extend({_initImage:function(){var c=this._image=this._url;vt(c,"leaflet-image-layer"),this._zoomAnimated&&vt(c,"leaflet-zoom-animated"),this.options.className&&vt(c,this.options.className),c.onselectstart=p,c.onmousemove=p}});function Lm(c,g,S){return new La(c,g,S)}var si=ai.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(c,g){c&&(c instanceof ue||O(c))?(this._latlng=ce(c),x(this,g)):(x(this,c),this._source=g),this.options.content&&(this._content=this.options.content)},openOn:function(c){return c=arguments.length?c:this._source._map,c.hasLayer(this)||c.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(c){return this._map?this.close():(arguments.length?this._source=c:c=this._source,this._prepareOpen(),this.openOn(c._map)),this},onAdd:function(c){this._zoomAnimated=c._zoomAnimated,this._container||this._initLayout(),c._fadeAnimated&&Sr(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),c._fadeAnimated&&Sr(this._container,1),this.bringToFront(),this.options.interactive&&(vt(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(c){c._fadeAnimated?(Sr(this._container,0),this._removeTimeout=setTimeout(s(Jt,void 0,this._container),200)):Jt(this._container),this.options.interactive&&(en(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(c){return this._latlng=ce(c),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(c){return this._content=c,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var c={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(c.zoomanim=this._animateZoom),c},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&lo(this._container),this},bringToBack:function(){return this._map&&fs(this._container),this},_prepareOpen:function(c){var g=this._source;if(!g._map)return!1;if(g instanceof Rr){g=null;var S=this._source._layers;for(var R in S)if(S[R]._map){g=S[R];break}if(!g)return!1;this._source=g}if(!c)if(g.getCenter)c=g.getCenter();else if(g.getLatLng)c=g.getLatLng();else if(g.getBounds)c=g.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(c),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var c=this._contentNode,g=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof g=="string")c.innerHTML=g;else{for(;c.hasChildNodes();)c.removeChild(c.firstChild);c.appendChild(g)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var c=this._map.latLngToLayerPoint(this._latlng),g=M(this.options.offset),S=this._getAnchor();this._zoomAnimated?bn(this._container,c.add(S)):g=g.add(c).add(S);var R=this._containerBottom=-g.y,$=this._containerLeft=-Math.round(this._containerWidth/2)+g.x;this._container.style.bottom=R+"px",this._container.style.left=$+"px"}},_getAnchor:function(){return[0,0]}});_t.include({_initOverlay:function(c,g,S,R){var $=g;return $ instanceof c||($=new c(R).setContent(g)),S&&$.setLatLng(S),$}}),ai.include({_initOverlay:function(c,g,S,R){var $=S;return $ instanceof c?(x($,R),$._source=this):($=g&&!R?g:new c(R,this),$.setContent(S)),$}});var Yl=si.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(c){return c=arguments.length?c:this._source._map,!c.hasLayer(this)&&c._popup&&c._popup.options.autoClose&&c.removeLayer(c._popup),c._popup=this,si.prototype.openOn.call(this,c)},onAdd:function(c){si.prototype.onAdd.call(this,c),c.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ra||this._source.on("preclick",na))},onRemove:function(c){si.prototype.onRemove.call(this,c),c.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ra||this._source.off("preclick",na))},getEvents:function(){var c=si.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(c.preclick=this.close),this.options.keepInView&&(c.moveend=this._adjustPan),c},_initLayout:function(){var c="leaflet-popup",g=this._container=Ot("div",c+" "+(this.options.className||"")+" leaflet-zoom-animated"),S=this._wrapper=Ot("div",c+"-content-wrapper",g);if(this._contentNode=Ot("div",c+"-content",S),ys(g),vs(this._contentNode),mt(g,"contextmenu",na),this._tipContainer=Ot("div",c+"-tip-container",g),this._tip=Ot("div",c+"-tip",this._tipContainer),this.options.closeButton){var R=this._closeButton=Ot("a",c+"-close-button",g);R.setAttribute("role","button"),R.setAttribute("aria-label","Close popup"),R.href="#close",R.innerHTML='<span aria-hidden="true">&#215;</span>',mt(R,"click",function($){Cn($),this.close()},this)}},_updateLayout:function(){var c=this._contentNode,g=c.style;g.width="",g.whiteSpace="nowrap";var S=c.offsetWidth;S=Math.min(S,this.options.maxWidth),S=Math.max(S,this.options.minWidth),g.width=S+1+"px",g.whiteSpace="",g.height="";var R=c.offsetHeight,$=this.options.maxHeight,te="leaflet-popup-scrolled";$&&R>$?(g.height=$+"px",vt(c,te)):en(c,te),this._containerWidth=this._container.offsetWidth},_animateZoom:function(c){var g=this._map._latLngToNewLayerPoint(this._latlng,c.zoom,c.center),S=this._getAnchor();bn(this._container,g.add(S))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var c=this._map,g=parseInt(so(this._container,"marginBottom"),10)||0,S=this._container.offsetHeight+g,R=this._containerWidth,$=new I(this._containerLeft,-S-this._containerBottom);$._add(Ma(this._container));var te=c.layerPointToContainerPoint($),me=M(this.options.autoPanPadding),Se=M(this.options.autoPanPaddingTopLeft||me),Me=M(this.options.autoPanPaddingBottomRight||me),$e=c.getSize(),Xe=0,tt=0;te.x+R+Me.x>$e.x&&(Xe=te.x+R-$e.x+Me.x),te.x-Xe-Se.x<0&&(Xe=te.x-Se.x),te.y+S+Me.y>$e.y&&(tt=te.y+S-$e.y+Me.y),te.y-tt-Se.y<0&&(tt=te.y-Se.y),(Xe||tt)&&(this.options.keepInView&&(this._autopanning=!0),c.fire("autopanstart").panBy([Xe,tt]))}},_getAnchor:function(){return M(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),s0=function(c,g){return new Yl(c,g)};_t.mergeOptions({closePopupOnClick:!0}),_t.include({openPopup:function(c,g,S){return this._initOverlay(Yl,c,g,S).openOn(this),this},closePopup:function(c){return c=arguments.length?c:this._popup,c&&c.close(),this}}),ai.include({bindPopup:function(c,g){return this._popup=this._initOverlay(Yl,this._popup,c,g),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(c){return this._popup&&(this instanceof Rr||(this._popup._source=this),this._popup._prepareOpen(c||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(c){return this._popup&&this._popup.setContent(c),this},getPopup:function(){return this._popup},_openPopup:function(c){if(!(!this._popup||!this._map)){Ui(c);var g=c.layer||c.target;if(this._popup._source===g&&!(g instanceof ra)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(c.latlng);return}this._popup._source=g,this.openPopup(c.latlng)}},_movePopup:function(c){this._popup.setLatLng(c.latlng)},_onKeyPress:function(c){c.originalEvent.keyCode===13&&this._openPopup(c)}});var lc=si.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(c){si.prototype.onAdd.call(this,c),this.setOpacity(this.options.opacity),c.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(c){si.prototype.onRemove.call(this,c),c.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var c=si.prototype.getEvents.call(this);return this.options.permanent||(c.preclick=this.close),c},_initLayout:function(){var c="leaflet-tooltip",g=c+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Ot("div",g),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+d(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(c){var g,S,R=this._map,$=this._container,te=R.latLngToContainerPoint(R.getCenter()),me=R.layerPointToContainerPoint(c),Se=this.options.direction,Me=$.offsetWidth,$e=$.offsetHeight,Xe=M(this.options.offset),tt=this._getAnchor();Se==="top"?(g=Me/2,S=$e):Se==="bottom"?(g=Me/2,S=0):Se==="center"?(g=Me/2,S=$e/2):Se==="right"?(g=0,S=$e/2):Se==="left"?(g=Me,S=$e/2):me.x<te.x?(Se="right",g=0,S=$e/2):(Se="left",g=Me+(Xe.x+tt.x)*2,S=$e/2),c=c.subtract(M(g,S,!0)).add(Xe).add(tt),en($,"leaflet-tooltip-right"),en($,"leaflet-tooltip-left"),en($,"leaflet-tooltip-top"),en($,"leaflet-tooltip-bottom"),vt($,"leaflet-tooltip-"+Se),bn($,c)},_updatePosition:function(){var c=this._map.latLngToLayerPoint(this._latlng);this._setPosition(c)},setOpacity:function(c){this.options.opacity=c,this._container&&Sr(this._container,c)},_animateZoom:function(c){var g=this._map._latLngToNewLayerPoint(this._latlng,c.zoom,c.center);this._setPosition(g)},_getAnchor:function(){return M(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),l0=function(c,g){return new lc(c,g)};_t.include({openTooltip:function(c,g,S){return this._initOverlay(lc,c,g,S).openOn(this),this},closeTooltip:function(c){return c.close(),this}}),ai.include({bindTooltip:function(c,g){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(lc,this._tooltip,c,g),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(c){if(!(!c&&this._tooltipHandlersAdded)){var g=c?"off":"on",S={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?S.add=this._openTooltip:(S.mouseover=this._openTooltip,S.mouseout=this.closeTooltip,S.click=this._openTooltip,this._map?this._addFocusListeners():S.add=this._addFocusListeners),this._tooltip.options.sticky&&(S.mousemove=this._moveTooltip),this[g](S),this._tooltipHandlersAdded=!c}},openTooltip:function(c){return this._tooltip&&(this instanceof Rr||(this._tooltip._source=this),this._tooltip._prepareOpen(c)&&(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(c){return this._tooltip&&this._tooltip.setContent(c),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(c){var g=typeof c.getElement=="function"&&c.getElement();g&&(mt(g,"focus",function(){this._tooltip._source=c,this.openTooltip()},this),mt(g,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(c){var g=typeof c.getElement=="function"&&c.getElement();g&&g.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(c){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var g=this;this._map.once("moveend",function(){g._openOnceFlag=!1,g._openTooltip(c)});return}this._tooltip._source=c.layer||c.target,this.openTooltip(this._tooltip.options.sticky?c.latlng:void 0)}},_moveTooltip:function(c){var g=c.latlng,S,R;this._tooltip.options.sticky&&c.originalEvent&&(S=this._map.mouseEventToContainerPoint(c.originalEvent),R=this._map.containerPointToLayerPoint(S),g=this._map.layerPointToLatLng(R)),this._tooltip.setLatLng(g)}});var Jf=xs.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(c){var g=c&&c.tagName==="DIV"?c:document.createElement("div"),S=this.options;if(S.html instanceof Element?(ur(g),g.appendChild(S.html)):g.innerHTML=S.html!==!1?S.html:"",S.bgPos){var R=M(S.bgPos);g.style.backgroundPosition=-R.x+"px "+-R.y+"px"}return this._setIconStyles(g,"icon"),g},createShadow:function(){return null}});function Dm(c){return new Jf(c)}xs.Default=ws;var yo=ai.extend({options:{tileSize:256,opacity:1,updateWhenIdle:ot.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(c){x(this,c)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(c){c._addZoomLimit(this)},onRemove:function(c){this._removeAllTiles(),Jt(this._container),c._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(lo(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(fs(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(c){return this.options.opacity=c,this._updateOpacity(),this},setZIndex:function(c){return this.options.zIndex=c,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var c=this._clampZoom(this._map.getZoom());c!==this._tileZoom&&(this._tileZoom=c,this._updateLevels()),this._update()}return this},getEvents:function(){var c={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=f(this._onMoveEnd,this.options.updateInterval,this)),c.move=this._onMove),this._zoomAnimated&&(c.zoomanim=this._animateZoom),c},createTile:function(){return document.createElement("div")},getTileSize:function(){var c=this.options.tileSize;return c instanceof I?c:new I(c,c)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(c){for(var g=this.getPane().children,S=-c(-1/0,1/0),R=0,$=g.length,te;R<$;R++)te=g[R].style.zIndex,g[R]!==this._container&&te&&(S=c(S,+te));isFinite(S)&&(this.options.zIndex=S+c(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!ot.ielt9){Sr(this._container,this.options.opacity);var c=+new Date,g=!1,S=!1;for(var R in this._tiles){var $=this._tiles[R];if(!(!$.current||!$.loaded)){var te=Math.min(1,(c-$.loaded)/200);Sr($.el,te),te<1?g=!0:($.active?S=!0:this._onOpaqueTile($),$.active=!0)}}S&&!this._noPrune&&this._pruneTiles(),g&&(ne(this._fadeFrame),this._fadeFrame=J(this._updateOpacity,this))}},_onOpaqueTile:p,_initContainer:function(){this._container||(this._container=Ot("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var c=this._tileZoom,g=this.options.maxZoom;if(c!==void 0){for(var S in this._levels)S=Number(S),this._levels[S].el.children.length||S===c?(this._levels[S].el.style.zIndex=g-Math.abs(c-S),this._onUpdateLevel(S)):(Jt(this._levels[S].el),this._removeTilesAtZoom(S),this._onRemoveLevel(S),delete this._levels[S]);var R=this._levels[c],$=this._map;return R||(R=this._levels[c]={},R.el=Ot("div","leaflet-tile-container leaflet-zoom-animated",this._container),R.el.style.zIndex=g,R.origin=$.project($.unproject($.getPixelOrigin()),c).round(),R.zoom=c,this._setZoomTransform(R,$.getCenter(),$.getZoom()),p(R.el.offsetWidth),this._onCreateLevel(R)),this._level=R,R}},_onUpdateLevel:p,_onRemoveLevel:p,_onCreateLevel:p,_pruneTiles:function(){if(this._map){var c,g,S=this._map.getZoom();if(S>this.options.maxZoom||S<this.options.minZoom){this._removeAllTiles();return}for(c in this._tiles)g=this._tiles[c],g.retain=g.current;for(c in this._tiles)if(g=this._tiles[c],g.current&&!g.active){var R=g.coords;this._retainParent(R.x,R.y,R.z,R.z-5)||this._retainChildren(R.x,R.y,R.z,R.z+2)}for(c in this._tiles)this._tiles[c].retain||this._removeTile(c)}},_removeTilesAtZoom:function(c){for(var g in this._tiles)this._tiles[g].coords.z===c&&this._removeTile(g)},_removeAllTiles:function(){for(var c in this._tiles)this._removeTile(c)},_invalidateAll:function(){for(var c in this._levels)Jt(this._levels[c].el),this._onRemoveLevel(Number(c)),delete this._levels[c];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(c,g,S,R){var $=Math.floor(c/2),te=Math.floor(g/2),me=S-1,Se=new I(+$,+te);Se.z=+me;var Me=this._tileCoordsToKey(Se),$e=this._tiles[Me];return $e&&$e.active?($e.retain=!0,!0):($e&&$e.loaded&&($e.retain=!0),me>R?this._retainParent($,te,me,R):!1)},_retainChildren:function(c,g,S,R){for(var $=2*c;$<2*c+2;$++)for(var te=2*g;te<2*g+2;te++){var me=new I($,te);me.z=S+1;var Se=this._tileCoordsToKey(me),Me=this._tiles[Se];if(Me&&Me.active){Me.retain=!0;continue}else Me&&Me.loaded&&(Me.retain=!0);S+1<R&&this._retainChildren($,te,S+1,R)}},_resetView:function(c){var g=c&&(c.pinch||c.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),g,g)},_animateZoom:function(c){this._setView(c.center,c.zoom,!0,c.noUpdate)},_clampZoom:function(c){var g=this.options;return g.minNativeZoom!==void 0&&c<g.minNativeZoom?g.minNativeZoom:g.maxNativeZoom!==void 0&&g.maxNativeZoom<c?g.maxNativeZoom:c},_setView:function(c,g,S,R){var $=Math.round(g);this.options.maxZoom!==void 0&&$>this.options.maxZoom||this.options.minZoom!==void 0&&$<this.options.minZoom?$=void 0:$=this._clampZoom($);var te=this.options.updateWhenZooming&&$!==this._tileZoom;(!R||te)&&(this._tileZoom=$,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),$!==void 0&&this._update(c),S||this._pruneTiles(),this._noPrune=!!S),this._setZoomTransforms(c,g)},_setZoomTransforms:function(c,g){for(var S in this._levels)this._setZoomTransform(this._levels[S],c,g)},_setZoomTransform:function(c,g,S){var R=this._map.getZoomScale(S,c.zoom),$=c.origin.multiplyBy(R).subtract(this._map._getNewPixelOrigin(g,S)).round();ot.any3d?qr(c.el,$,R):bn(c.el,$)},_resetGrid:function(){var c=this._map,g=c.options.crs,S=this._tileSize=this.getTileSize(),R=this._tileZoom,$=this._map.getPixelWorldBounds(this._tileZoom);$&&(this._globalTileRange=this._pxBoundsToTileRange($)),this._wrapX=g.wrapLng&&!this.options.noWrap&&[Math.floor(c.project([0,g.wrapLng[0]],R).x/S.x),Math.ceil(c.project([0,g.wrapLng[1]],R).x/S.y)],this._wrapY=g.wrapLat&&!this.options.noWrap&&[Math.floor(c.project([g.wrapLat[0],0],R).y/S.x),Math.ceil(c.project([g.wrapLat[1],0],R).y/S.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(c){var g=this._map,S=g._animatingZoom?Math.max(g._animateToZoom,g.getZoom()):g.getZoom(),R=g.getZoomScale(S,this._tileZoom),$=g.project(c,this._tileZoom).floor(),te=g.getSize().divideBy(R*2);return new D($.subtract(te),$.add(te))},_update:function(c){var g=this._map;if(g){var S=this._clampZoom(g.getZoom());if(c===void 0&&(c=g.getCenter()),this._tileZoom!==void 0){var R=this._getTiledPixelBounds(c),$=this._pxBoundsToTileRange(R),te=$.getCenter(),me=[],Se=this.options.keepBuffer,Me=new D($.getBottomLeft().subtract([Se,-Se]),$.getTopRight().add([Se,-Se]));if(!(isFinite($.min.x)&&isFinite($.min.y)&&isFinite($.max.x)&&isFinite($.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var $e in this._tiles){var Xe=this._tiles[$e].coords;(Xe.z!==this._tileZoom||!Me.contains(new I(Xe.x,Xe.y)))&&(this._tiles[$e].current=!1)}if(Math.abs(S-this._tileZoom)>1){this._setView(c,S);return}for(var tt=$.min.y;tt<=$.max.y;tt++)for(var rt=$.min.x;rt<=$.max.x;rt++){var ht=new I(rt,tt);if(ht.z=this._tileZoom,!!this._isValidTile(ht)){var tn=this._tiles[this._tileCoordsToKey(ht)];tn?tn.current=!0:me.push(ht)}}if(me.sort(function(tr,Gr){return tr.distanceTo(te)-Gr.distanceTo(te)}),me.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var _n=document.createDocumentFragment();for(rt=0;rt<me.length;rt++)this._addTile(me[rt],_n);this._level.el.appendChild(_n)}}}},_isValidTile:function(c){var g=this._map.options.crs;if(!g.infinite){var S=this._globalTileRange;if(!g.wrapLng&&(c.x<S.min.x||c.x>S.max.x)||!g.wrapLat&&(c.y<S.min.y||c.y>S.max.y))return!1}if(!this.options.bounds)return!0;var R=this._tileCoordsToBounds(c);return re(this.options.bounds).overlaps(R)},_keyToBounds:function(c){return this._tileCoordsToBounds(this._keyToTileCoords(c))},_tileCoordsToNwSe:function(c){var g=this._map,S=this.getTileSize(),R=c.scaleBy(S),$=R.add(S),te=g.unproject(R,c.z),me=g.unproject($,c.z);return[te,me]},_tileCoordsToBounds:function(c){var g=this._tileCoordsToNwSe(c),S=new q(g[0],g[1]);return this.options.noWrap||(S=this._map.wrapLatLngBounds(S)),S},_tileCoordsToKey:function(c){return c.x+":"+c.y+":"+c.z},_keyToTileCoords:function(c){var g=c.split(":"),S=new I(+g[0],+g[1]);return S.z=+g[2],S},_removeTile:function(c){var g=this._tiles[c];g&&(Jt(g.el),delete this._tiles[c],this.fire("tileunload",{tile:g.el,coords:this._keyToTileCoords(c)}))},_initTile:function(c){vt(c,"leaflet-tile");var g=this.getTileSize();c.style.width=g.x+"px",c.style.height=g.y+"px",c.onselectstart=p,c.onmousemove=p,ot.ielt9&&this.options.opacity<1&&Sr(c,this.options.opacity)},_addTile:function(c,g){var S=this._getTilePos(c),R=this._tileCoordsToKey(c),$=this.createTile(this._wrapCoords(c),s(this._tileReady,this,c));this._initTile($),this.createTile.length<2&&J(s(this._tileReady,this,c,null,$)),bn($,S),this._tiles[R]={el:$,coords:c,current:!0},g.appendChild($),this.fire("tileloadstart",{tile:$,coords:c})},_tileReady:function(c,g,S){g&&this.fire("tileerror",{error:g,tile:S,coords:c});var R=this._tileCoordsToKey(c);S=this._tiles[R],S&&(S.loaded=+new Date,this._map._fadeAnimated?(Sr(S.el,0),ne(this._fadeFrame),this._fadeFrame=J(this._updateOpacity,this)):(S.active=!0,this._pruneTiles()),g||(vt(S.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:S.el,coords:c})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),ot.ielt9||!this._map._fadeAnimated?J(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(c){return c.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(c){var g=new I(this._wrapX?m(c.x,this._wrapX):c.x,this._wrapY?m(c.y,this._wrapY):c.y);return g.z=c.z,g},_pxBoundsToTileRange:function(c){var g=this.getTileSize();return new D(c.min.unscaleBy(g).floor(),c.max.unscaleBy(g).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var c in this._tiles)if(!this._tiles[c].loaded)return!1;return!0}});function li(c){return new yo(c)}var bo=yo.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(c,g){this._url=c,g=x(this,g),g.detectRetina&&ot.retina&&g.maxZoom>0?(g.tileSize=Math.floor(g.tileSize/2),g.zoomReverse?(g.zoomOffset--,g.minZoom=Math.min(g.maxZoom,g.minZoom+1)):(g.zoomOffset++,g.maxZoom=Math.max(g.minZoom,g.maxZoom-1)),g.minZoom=Math.max(0,g.minZoom)):g.zoomReverse?g.minZoom=Math.min(g.maxZoom,g.minZoom):g.maxZoom=Math.max(g.minZoom,g.maxZoom),typeof g.subdomains=="string"&&(g.subdomains=g.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(c,g){return this._url===c&&g===void 0&&(g=!0),this._url=c,g||this.redraw(),this},createTile:function(c,g){var S=document.createElement("img");return mt(S,"load",s(this._tileOnLoad,this,g,S)),mt(S,"error",s(this._tileOnError,this,g,S)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(S.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(S.referrerPolicy=this.options.referrerPolicy),S.alt="",S.src=this.getTileUrl(c),S},getTileUrl:function(c){var g={r:ot.retina?"@2x":"",s:this._getSubdomain(c),x:c.x,y:c.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var S=this._globalTileRange.max.y-c.y;this.options.tms&&(g.y=S),g["-y"]=S}return j(this._url,i(g,this.options))},_tileOnLoad:function(c,g){ot.ielt9?setTimeout(s(c,this,null,g),0):c(null,g)},_tileOnError:function(c,g,S){var R=this.options.errorTileUrl;R&&g.getAttribute("src")!==R&&(g.src=R),c(S,g)},_onTileRemove:function(c){c.tile.onload=null},_getZoomForUrl:function(){var c=this._tileZoom,g=this.options.maxZoom,S=this.options.zoomReverse,R=this.options.zoomOffset;return S&&(c=g-c),c+R},_getSubdomain:function(c){var g=Math.abs(c.x+c.y)%this.options.subdomains.length;return this.options.subdomains[g]},_abortLoading:function(){var c,g;for(c in this._tiles)if(this._tiles[c].coords.z!==this._tileZoom&&(g=this._tiles[c].el,g.onload=p,g.onerror=p,!g.complete)){g.src=U;var S=this._tiles[c].coords;Jt(g),delete this._tiles[c],this.fire("tileabort",{tile:g,coords:S})}},_removeTile:function(c){var g=this._tiles[c];if(g)return g.el.setAttribute("src",U),yo.prototype._removeTile.call(this,c)},_tileReady:function(c,g,S){if(!(!this._map||S&&S.getAttribute("src")===U))return yo.prototype._tileReady.call(this,c,g,S)}});function Dr(c,g){return new bo(c,g)}var kr=bo.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(c,g){this._url=c;var S=i({},this.defaultWmsParams);for(var R in g)R in this.options||(S[R]=g[R]);g=x(this,g);var $=g.detectRetina&&ot.retina?2:1,te=this.getTileSize();S.width=te.x*$,S.height=te.y*$,this.wmsParams=S},onAdd:function(c){this._crs=this.options.crs||c.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var g=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[g]=this._crs.code,bo.prototype.onAdd.call(this,c)},getTileUrl:function(c){var g=this._tileCoordsToNwSe(c),S=this._crs,R=Y(S.project(g[0]),S.project(g[1])),$=R.min,te=R.max,me=(this._wmsVersion>=1.3&&this._crs===jm?[$.y,$.x,te.y,te.x]:[$.x,$.y,te.x,te.y]).join(","),Se=bo.prototype.getTileUrl.call(this,c);return Se+E(this.wmsParams,Se,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+me},setParams:function(c,g){return i(this.wmsParams,c),g||this.redraw(),this}});function Ts(c,g){return new kr(c,g)}bo.WMS=kr,Dr.wms=Ts;var ui=ai.extend({options:{padding:.1},initialize:function(c){x(this,c),d(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),vt(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 c={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(c.zoomanim=this._onAnimZoom),c},_onAnimZoom:function(c){this._updateTransform(c.center,c.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(c,g){var S=this._map.getZoomScale(g,this._zoom),R=this._map.getSize().multiplyBy(.5+this.options.padding),$=this._map.project(this._center,g),te=R.multiplyBy(-S).add($).subtract(this._map._getNewPixelOrigin(c,g));ot.any3d?qr(this._container,te,S):bn(this._container,te)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var c in this._layers)this._layers[c]._reset()},_onZoomEnd:function(){for(var c in this._layers)this._layers[c]._project()},_updatePaths:function(){for(var c in this._layers)this._layers[c]._update()},_update:function(){var c=this.options.padding,g=this._map.getSize(),S=this._map.containerPointToLayerPoint(g.multiplyBy(-c)).round();this._bounds=new D(S,S.add(g.multiplyBy(1+c*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Wl=ui.extend({options:{tolerance:0},getEvents:function(){var c=ui.prototype.getEvents.call(this);return c.viewprereset=this._onViewPreReset,c},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ui.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var c=this._container=document.createElement("canvas");mt(c,"mousemove",this._onMouseMove,this),mt(c,"click dblclick mousedown mouseup contextmenu",this._onClick,this),mt(c,"mouseout",this._handleMouseOut,this),c._leaflet_disable_events=!0,this._ctx=c.getContext("2d")},_destroyContainer:function(){ne(this._redrawRequest),delete this._ctx,Jt(this._container),It(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var c;this._redrawBounds=null;for(var g in this._layers)c=this._layers[g],c._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ui.prototype._update.call(this);var c=this._bounds,g=this._container,S=c.getSize(),R=ot.retina?2:1;bn(g,c.min),g.width=R*S.x,g.height=R*S.y,g.style.width=S.x+"px",g.style.height=S.y+"px",ot.retina&&this._ctx.scale(2,2),this._ctx.translate(-c.min.x,-c.min.y),this.fire("update")}},_reset:function(){ui.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(c){this._updateDashArray(c),this._layers[d(c)]=c;var g=c._order={layer:c,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=g),this._drawLast=g,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(c){this._requestRedraw(c)},_removePath:function(c){var g=c._order,S=g.next,R=g.prev;S?S.prev=R:this._drawLast=R,R?R.next=S:this._drawFirst=S,delete c._order,delete this._layers[d(c)],this._requestRedraw(c)},_updatePath:function(c){this._extendRedrawBounds(c),c._project(),c._update(),this._requestRedraw(c)},_updateStyle:function(c){this._updateDashArray(c),this._requestRedraw(c)},_updateDashArray:function(c){if(typeof c.options.dashArray=="string"){var g=c.options.dashArray.split(/[, ]+/),S=[],R,$;for($=0;$<g.length;$++){if(R=Number(g[$]),isNaN(R))return;S.push(R)}c.options._dashArray=S}else c.options._dashArray=c.options.dashArray},_requestRedraw:function(c){this._map&&(this._extendRedrawBounds(c),this._redrawRequest=this._redrawRequest||J(this._redraw,this))},_extendRedrawBounds:function(c){if(c._pxBounds){var g=(c.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new D,this._redrawBounds.extend(c._pxBounds.min.subtract([g,g])),this._redrawBounds.extend(c._pxBounds.max.add([g,g]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var c=this._redrawBounds;if(c){var g=c.getSize();this._ctx.clearRect(c.min.x,c.min.y,g.x,g.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var c,g=this._redrawBounds;if(this._ctx.save(),g){var S=g.getSize();this._ctx.beginPath(),this._ctx.rect(g.min.x,g.min.y,S.x,S.y),this._ctx.clip()}this._drawing=!0;for(var R=this._drawFirst;R;R=R.next)c=R.layer,(!g||c._pxBounds&&c._pxBounds.intersects(g))&&c._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(c,g){if(this._drawing){var S,R,$,te,me=c._parts,Se=me.length,Me=this._ctx;if(Se){for(Me.beginPath(),S=0;S<Se;S++){for(R=0,$=me[S].length;R<$;R++)te=me[S][R],Me[R?"lineTo":"moveTo"](te.x,te.y);g&&Me.closePath()}this._fillStroke(Me,c)}}},_updateCircle:function(c){if(!(!this._drawing||c._empty())){var g=c._point,S=this._ctx,R=Math.max(Math.round(c._radius),1),$=(Math.max(Math.round(c._radiusY),1)||R)/R;$!==1&&(S.save(),S.scale(1,$)),S.beginPath(),S.arc(g.x,g.y/$,R,0,Math.PI*2,!1),$!==1&&S.restore(),this._fillStroke(S,c)}},_fillStroke:function(c,g){var S=g.options;S.fill&&(c.globalAlpha=S.fillOpacity,c.fillStyle=S.fillColor||S.color,c.fill(S.fillRule||"evenodd")),S.stroke&&S.weight!==0&&(c.setLineDash&&c.setLineDash(g.options&&g.options._dashArray||[]),c.globalAlpha=S.opacity,c.lineWidth=S.weight,c.strokeStyle=S.color,c.lineCap=S.lineCap,c.lineJoin=S.lineJoin,c.stroke())},_onClick:function(c){for(var g=this._map.mouseEventToLayerPoint(c),S,R,$=this._drawFirst;$;$=$.next)S=$.layer,S.options.interactive&&S._containsPoint(g)&&(!(c.type==="click"||c.type==="preclick")||!this._map._draggableMoved(S))&&(R=S);this._fireEvent(R?[R]:!1,c)},_onMouseMove:function(c){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var g=this._map.mouseEventToLayerPoint(c);this._handleMouseHover(c,g)}},_handleMouseOut:function(c){var g=this._hoveredLayer;g&&(en(this._container,"leaflet-interactive"),this._fireEvent([g],c,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(c,g){if(!this._mouseHoverThrottled){for(var S,R,$=this._drawFirst;$;$=$.next)S=$.layer,S.options.interactive&&S._containsPoint(g)&&(R=S);R!==this._hoveredLayer&&(this._handleMouseOut(c),R&&(vt(this._container,"leaflet-interactive"),this._fireEvent([R],c,"mouseover"),this._hoveredLayer=R)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,c),this._mouseHoverThrottled=!0,setTimeout(s(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(c,g,S){this._map._fireDOMEvent(g,S||g.type,c)},_bringToFront:function(c){var g=c._order;if(g){var S=g.next,R=g.prev;if(S)S.prev=R;else return;R?R.next=S:S&&(this._drawFirst=S),g.prev=this._drawLast,this._drawLast.next=g,g.next=null,this._drawLast=g,this._requestRedraw(c)}},_bringToBack:function(c){var g=c._order;if(g){var S=g.next,R=g.prev;if(R)R.next=S;else return;S?S.prev=R:R&&(this._drawLast=R),g.prev=null,g.next=this._drawFirst,this._drawFirst.prev=g,this._drawFirst=g,this._requestRedraw(c)}}});function Kl(c){return ot.canvas?new Wl(c):null}var _o=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(c){return document.createElement("<lvml:"+c+' class="lvml">')}}catch{}return function(c){return document.createElement("<"+c+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Os={_initContainer:function(){this._container=Ot("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ui.prototype._update.call(this),this.fire("update"))},_initPath:function(c){var g=c._container=_o("shape");vt(g,"leaflet-vml-shape "+(this.options.className||"")),g.coordsize="1 1",c._path=_o("path"),g.appendChild(c._path),this._updateStyle(c),this._layers[d(c)]=c},_addPath:function(c){var g=c._container;this._container.appendChild(g),c.options.interactive&&c.addInteractiveTarget(g)},_removePath:function(c){var g=c._container;Jt(g),c.removeInteractiveTarget(g),delete this._layers[d(c)]},_updateStyle:function(c){var g=c._stroke,S=c._fill,R=c.options,$=c._container;$.stroked=!!R.stroke,$.filled=!!R.fill,R.stroke?(g||(g=c._stroke=_o("stroke")),$.appendChild(g),g.weight=R.weight+"px",g.color=R.color,g.opacity=R.opacity,R.dashArray?g.dashStyle=O(R.dashArray)?R.dashArray.join(" "):R.dashArray.replace(/( *, *)/g," "):g.dashStyle="",g.endcap=R.lineCap.replace("butt","flat"),g.joinstyle=R.lineJoin):g&&($.removeChild(g),c._stroke=null),R.fill?(S||(S=c._fill=_o("fill")),$.appendChild(S),S.color=R.fillColor||R.color,S.opacity=R.fillOpacity):S&&($.removeChild(S),c._fill=null)},_updateCircle:function(c){var g=c._point.round(),S=Math.round(c._radius),R=Math.round(c._radiusY||S);this._setPath(c,c._empty()?"M0 0":"AL "+g.x+","+g.y+" "+S+","+R+" 0,"+65535*360)},_setPath:function(c,g){c._path.v=g},_bringToFront:function(c){lo(c._container)},_bringToBack:function(c){fs(c._container)}},Zl=ot.vml?_o:ge,Da=ui.extend({_initContainer:function(){this._container=Zl("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Zl("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Jt(this._container),It(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ui.prototype._update.call(this);var c=this._bounds,g=c.getSize(),S=this._container;(!this._svgSize||!this._svgSize.equals(g))&&(this._svgSize=g,S.setAttribute("width",g.x),S.setAttribute("height",g.y)),bn(S,c.min),S.setAttribute("viewBox",[c.min.x,c.min.y,g.x,g.y].join(" ")),this.fire("update")}},_initPath:function(c){var g=c._path=Zl("path");c.options.className&&vt(g,c.options.className),c.options.interactive&&vt(g,"leaflet-interactive"),this._updateStyle(c),this._layers[d(c)]=c},_addPath:function(c){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(c._path),c.addInteractiveTarget(c._path)},_removePath:function(c){Jt(c._path),c.removeInteractiveTarget(c._path),delete this._layers[d(c)]},_updatePath:function(c){c._project(),c._update()},_updateStyle:function(c){var g=c._path,S=c.options;g&&(S.stroke?(g.setAttribute("stroke",S.color),g.setAttribute("stroke-opacity",S.opacity),g.setAttribute("stroke-width",S.weight),g.setAttribute("stroke-linecap",S.lineCap),g.setAttribute("stroke-linejoin",S.lineJoin),S.dashArray?g.setAttribute("stroke-dasharray",S.dashArray):g.removeAttribute("stroke-dasharray"),S.dashOffset?g.setAttribute("stroke-dashoffset",S.dashOffset):g.removeAttribute("stroke-dashoffset")):g.setAttribute("stroke","none"),S.fill?(g.setAttribute("fill",S.fillColor||S.color),g.setAttribute("fill-opacity",S.fillOpacity),g.setAttribute("fill-rule",S.fillRule||"evenodd")):g.setAttribute("fill","none"))},_updatePoly:function(c,g){this._setPath(c,de(c._parts,g))},_updateCircle:function(c){var g=c._point,S=Math.max(Math.round(c._radius),1),R=Math.max(Math.round(c._radiusY),1)||S,$="a"+S+","+R+" 0 1,0 ",te=c._empty()?"M0 0":"M"+(g.x-S)+","+g.y+$+S*2+",0 "+$+-S*2+",0 ";this._setPath(c,te)},_setPath:function(c,g){c._path.setAttribute("d",g)},_bringToFront:function(c){lo(c._path)},_bringToBack:function(c){fs(c._path)}});ot.vml&&Da.include(Os);function xo(c){return ot.svg||ot.vml?new Da(c):null}_t.include({getRenderer:function(c){var g=c.options.renderer||this._getPaneRenderer(c.options.pane)||this.options.renderer||this._renderer;return g||(g=this._renderer=this._createRenderer()),this.hasLayer(g)||this.addLayer(g),g},_getPaneRenderer:function(c){if(c==="overlayPane"||c===void 0)return!1;var g=this._paneRenderers[c];return g===void 0&&(g=this._createRenderer({pane:c}),this._paneRenderers[c]=g),g},_createRenderer:function(c){return this.options.preferCanvas&&Kl(c)||xo(c)}});var km=Cs.extend({initialize:function(c,g){Cs.prototype.initialize.call(this,this._boundsToLatLngs(c),g)},setBounds:function(c){return this.setLatLngs(this._boundsToLatLngs(c))},_boundsToLatLngs:function(c){return c=re(c),[c.getSouthWest(),c.getNorthWest(),c.getNorthEast(),c.getSouthEast()]}});function Ir(c,g){return new km(c,g)}Da.create=Zl,Da.pointsToPath=de,Lr.geometryToLayer=Hl,Lr.coordsToLatLng=ic,Lr.coordsToLatLngs=ql,Lr.latLngToCoords=Gl,Lr.latLngsToCoords=ac,Lr.getFeature=oi,Lr.asFeature=Es,_t.mergeOptions({boxZoom:!0});var uc=ii.extend({initialize:function(c){this._map=c,this._container=c._container,this._pane=c._panes.overlayPane,this._resetStateTimeout=0,c.on("unload",this._destroy,this)},addHooks:function(){mt(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){It(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Jt(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(c){if(!c.shiftKey||c.which!==1&&c.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Di(),Il(),this._startPoint=this._map.mouseEventToContainerPoint(c),mt(document,{contextmenu:Ui,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(c){this._moved||(this._moved=!0,this._box=Ot("div","leaflet-zoom-box",this._container),vt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(c);var g=new D(this._point,this._startPoint),S=g.getSize();bn(this._box,g.min),this._box.style.width=S.x+"px",this._box.style.height=S.y+"px"},_finish:function(){this._moved&&(Jt(this._box),en(this._container,"leaflet-crosshair")),kl(),zf(),It(document,{contextmenu:Ui,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(c){if(!(c.which!==1&&c.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(s(this._resetState,this),0);var g=new q(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(g).fire("boxzoomend",{boxZoomBounds:g})}},_onKeyDown:function(c){c.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});_t.addInitHook("addHandler","boxZoom",uc),_t.mergeOptions({doubleClickZoom:!0});var zi=ii.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(c){var g=this._map,S=g.getZoom(),R=g.options.zoomDelta,$=c.originalEvent.shiftKey?S-R:S+R;g.options.doubleClickZoom==="center"?g.setZoom($):g.setZoomAround(c.containerPoint,$)}});_t.addInitHook("addHandler","doubleClickZoom",zi),_t.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ed=ii.extend({addHooks:function(){if(!this._draggable){var c=this._map;this._draggable=new Na(c._mapPane,c._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),c.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),c.on("zoomend",this._onZoomEnd,this),c.whenReady(this._onZoomEnd,this))}vt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){en(this._map._container,"leaflet-grab"),en(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 c=this._map;if(c._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var g=re(this._map.options.maxBounds);this._offsetLimit=Y(this._map.latLngToContainerPoint(g.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(g.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;c.fire("movestart").fire("dragstart"),c.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(c){if(this._map.options.inertia){var g=this._lastTime=+new Date,S=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(S),this._times.push(g),this._prunePositions(g)}this._map.fire("move",c).fire("drag",c)},_prunePositions:function(c){for(;this._positions.length>1&&c-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var c=this._map.getSize().divideBy(2),g=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=g.subtract(c).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(c,g){return c-(c-g)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var c=this._draggable._newPos.subtract(this._draggable._startPos),g=this._offsetLimit;c.x<g.min.x&&(c.x=this._viscousLimit(c.x,g.min.x)),c.y<g.min.y&&(c.y=this._viscousLimit(c.y,g.min.y)),c.x>g.max.x&&(c.x=this._viscousLimit(c.x,g.max.x)),c.y>g.max.y&&(c.y=this._viscousLimit(c.y,g.max.y)),this._draggable._newPos=this._draggable._startPos.add(c)}},_onPreDragWrap:function(){var c=this._worldWidth,g=Math.round(c/2),S=this._initialWorldOffset,R=this._draggable._newPos.x,$=(R-g+S)%c+g-S,te=(R+g+S)%c-g-S,me=Math.abs($+S)<Math.abs(te+S)?$:te;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=me},_onDragEnd:function(c){var g=this._map,S=g.options,R=!S.inertia||c.noInertia||this._times.length<2;if(g.fire("dragend",c),R)g.fire("moveend");else{this._prunePositions(+new Date);var $=this._lastPos.subtract(this._positions[0]),te=(this._lastTime-this._times[0])/1e3,me=S.easeLinearity,Se=$.multiplyBy(me/te),Me=Se.distanceTo([0,0]),$e=Math.min(S.inertiaMaxSpeed,Me),Xe=Se.multiplyBy($e/Me),tt=$e/(S.inertiaDeceleration*me),rt=Xe.multiplyBy(-tt/2).round();!rt.x&&!rt.y?g.fire("moveend"):(rt=g._limitOffset(rt,g.options.maxBounds),J(function(){g.panBy(rt,{duration:tt,easeLinearity:me,noMoveStart:!0,animate:!0})}))}}});_t.addInitHook("addHandler","dragging",ed),_t.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Xl=ii.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(c){this._map=c,this._setPanDelta(c.options.keyboardPanDelta),this._setZoomDelta(c.options.zoomDelta)},addHooks:function(){var c=this._map._container;c.tabIndex<=0&&(c.tabIndex="0"),mt(c,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),It(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var c=document.body,g=document.documentElement,S=c.scrollTop||g.scrollTop,R=c.scrollLeft||g.scrollLeft;this._map._container.focus(),window.scrollTo(R,S)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(c){var g=this._panKeys={},S=this.keyCodes,R,$;for(R=0,$=S.left.length;R<$;R++)g[S.left[R]]=[-1*c,0];for(R=0,$=S.right.length;R<$;R++)g[S.right[R]]=[c,0];for(R=0,$=S.down.length;R<$;R++)g[S.down[R]]=[0,c];for(R=0,$=S.up.length;R<$;R++)g[S.up[R]]=[0,-1*c]},_setZoomDelta:function(c){var g=this._zoomKeys={},S=this.keyCodes,R,$;for(R=0,$=S.zoomIn.length;R<$;R++)g[S.zoomIn[R]]=c;for(R=0,$=S.zoomOut.length;R<$;R++)g[S.zoomOut[R]]=-c},_addHooks:function(){mt(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){It(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(c){if(!(c.altKey||c.ctrlKey||c.metaKey)){var g=c.keyCode,S=this._map,R;if(g in this._panKeys){if(!S._panAnim||!S._panAnim._inProgress)if(R=this._panKeys[g],c.shiftKey&&(R=M(R).multiplyBy(3)),S.options.maxBounds&&(R=S._limitOffset(M(R),S.options.maxBounds)),S.options.worldCopyJump){var $=S.wrapLatLng(S.unproject(S.project(S.getCenter()).add(R)));S.panTo($)}else S.panBy(R)}else if(g in this._zoomKeys)S.setZoom(S.getZoom()+(c.shiftKey?3:1)*this._zoomKeys[g]);else if(g===27&&S._popup&&S._popup.options.closeOnEscapeKey)S.closePopup();else return;Ui(c)}}});_t.addInitHook("addHandler","keyboard",Xl),_t.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var ka=ii.extend({addHooks:function(){mt(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){It(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(c){var g=zl(c),S=this._map.options.wheelDebounceTime;this._delta+=g,this._lastMousePos=this._map.mouseEventToContainerPoint(c),this._startTime||(this._startTime=+new Date);var R=Math.max(S-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(s(this._performZoom,this),R),Ui(c)},_performZoom:function(){var c=this._map,g=c.getZoom(),S=this._map.options.zoomSnap||0;c._stop();var R=this._delta/(this._map.options.wheelPxPerZoomLevel*4),$=4*Math.log(2/(1+Math.exp(-Math.abs(R))))/Math.LN2,te=S?Math.ceil($/S)*S:$,me=c._limitZoom(g+(this._delta>0?te:-te))-g;this._delta=0,this._startTime=null,me&&(c.options.scrollWheelZoom==="center"?c.setZoom(g+me):c.setZoomAround(this._lastMousePos,g+me))}});_t.addInitHook("addHandler","scrollWheelZoom",ka);var td=600;_t.mergeOptions({tapHold:ot.touchNative&&ot.safari&&ot.mobile,tapTolerance:15});var cc=ii.extend({addHooks:function(){mt(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){It(this._map._container,"touchstart",this._onDown,this)},_onDown:function(c){if(clearTimeout(this._holdTimeout),c.touches.length===1){var g=c.touches[0];this._startPos=this._newPos=new I(g.clientX,g.clientY),this._holdTimeout=setTimeout(s(function(){this._cancel(),this._isTapValid()&&(mt(document,"touchend",Cn),mt(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",g))},this),td),mt(document,"touchend touchcancel contextmenu",this._cancel,this),mt(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function c(){It(document,"touchend",Cn),It(document,"touchend touchcancel",c)},_cancel:function(){clearTimeout(this._holdTimeout),It(document,"touchend touchcancel contextmenu",this._cancel,this),It(document,"touchmove",this._onMove,this)},_onMove:function(c){var g=c.touches[0];this._newPos=new I(g.clientX,g.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(c,g){var S=new MouseEvent(c,{bubbles:!0,cancelable:!0,view:window,screenX:g.screenX,screenY:g.screenY,clientX:g.clientX,clientY:g.clientY});S._simulated=!0,g.target.dispatchEvent(S)}});_t.addInitHook("addHandler","tapHold",cc),_t.mergeOptions({touchZoom:ot.touch,bounceAtZoomLimits:!0});var wo=ii.extend({addHooks:function(){vt(this._map._container,"leaflet-touch-zoom"),mt(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){en(this._map._container,"leaflet-touch-zoom"),It(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(c){var g=this._map;if(!(!c.touches||c.touches.length!==2||g._animatingZoom||this._zooming)){var S=g.mouseEventToContainerPoint(c.touches[0]),R=g.mouseEventToContainerPoint(c.touches[1]);this._centerPoint=g.getSize()._divideBy(2),this._startLatLng=g.containerPointToLatLng(this._centerPoint),g.options.touchZoom!=="center"&&(this._pinchStartLatLng=g.containerPointToLatLng(S.add(R)._divideBy(2))),this._startDist=S.distanceTo(R),this._startZoom=g.getZoom(),this._moved=!1,this._zooming=!0,g._stop(),mt(document,"touchmove",this._onTouchMove,this),mt(document,"touchend touchcancel",this._onTouchEnd,this),Cn(c)}},_onTouchMove:function(c){if(!(!c.touches||c.touches.length!==2||!this._zooming)){var g=this._map,S=g.mouseEventToContainerPoint(c.touches[0]),R=g.mouseEventToContainerPoint(c.touches[1]),$=S.distanceTo(R)/this._startDist;if(this._zoom=g.getScaleZoom($,this._startZoom),!g.options.bounceAtZoomLimits&&(this._zoom<g.getMinZoom()&&$<1||this._zoom>g.getMaxZoom()&&$>1)&&(this._zoom=g._limitZoom(this._zoom)),g.options.touchZoom==="center"){if(this._center=this._startLatLng,$===1)return}else{var te=S._add(R)._divideBy(2)._subtract(this._centerPoint);if($===1&&te.x===0&&te.y===0)return;this._center=g.unproject(g.project(this._pinchStartLatLng,this._zoom).subtract(te),this._zoom)}this._moved||(g._moveStart(!0,!1),this._moved=!0),ne(this._animRequest);var me=s(g._move,g,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=J(me,this,!0),Cn(c)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,ne(this._animRequest),It(document,"touchmove",this._onTouchMove,this),It(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))}});_t.addInitHook("addHandler","touchZoom",wo),_t.BoxZoom=uc,_t.DoubleClickZoom=zi,_t.Drag=ed,_t.Keyboard=Xl,_t.ScrollWheelZoom=ka,_t.TapHold=cc,_t.TouchZoom=wo,n.Bounds=D,n.Browser=ot,n.CRS=ve,n.Canvas=Wl,n.Circle=Xf,n.CircleMarker=Vl,n.Class=Q,n.Control=Cr,n.DivIcon=Jf,n.DivOverlay=si,n.DomEvent=Yy,n.DomUtil=ym,n.Draggable=Na,n.Evented=B,n.FeatureGroup=Rr,n.GeoJSON=Lr,n.GridLayer=yo,n.Handler=ii,n.Icon=xs,n.ImageOverlay=Bi,n.LatLng=ue,n.LatLngBounds=q,n.Layer=ai,n.LayerGroup=go,n.LineUtil=Tm,n.Map=_t,n.Marker=Ss,n.Mixin=Qy,n.Path=ra,n.Point=I,n.PolyUtil=Jy,n.Polygon=Cs,n.Polyline=ia,n.Popup=Yl,n.PosAnimation=Qu,n.Projection=Om,n.Rectangle=km,n.Renderer=ui,n.SVG=Da,n.SVGOverlay=La,n.TileLayer=bo,n.Tooltip=lc,n.Transformation=le,n.Util=he,n.VideoOverlay=sc,n.bind=s,n.bounds=Y,n.canvas=Kl,n.circle=a0,n.circleMarker=Mm,n.control=bs,n.divIcon=Dm,n.extend=i,n.featureGroup=$l,n.geoJSON=oc,n.geoJson=Rm,n.gridLayer=li,n.icon=rc,n.imageOverlay=As,n.latLng=ce,n.latLngBounds=re,n.layerGroup=Pm,n.map=Fl,n.marker=Zf,n.point=M,n.polygon=Nr,n.polyline=o0,n.popup=s0,n.rectangle=Ir,n.setOptions=x,n.stamp=d,n.svg=xo,n.svgOverlay=Lm,n.tileLayer=Dr,n.tooltip=l0,n.transformation=H,n.version=r,n.videoOverlay=Nm;var js=window.L;n.noConflict=function(){return window.L=js,this},window.L=n})}(rh,rh.exports)),rh.exports}var om=ppe();const c5=Pi(om);function IC(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function UC(e,t){return t==null?function(r,i){const a=T.useRef(void 0);return a.current||(a.current=e(r,i)),a}:function(r,i){const a=T.useRef(void 0);a.current||(a.current=e(r,i));const s=T.useRef(r),{instance:u}=a.current;return T.useEffect(function(){s.current!==r&&(t(u,r,s.current),s.current=r)},[u,r,t]),a}}function gpe(e,t){T.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){t.layerContainer?.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function z7(e){return function(n){const r=U7(),i=e(kC(n,r),r);return I7(r.map,n.attribution),B7(i.current,n.eventHandlers),gpe(i.current,r),i}}function vpe(e,t){const n=UC(e,t),r=z7(n);return cpe(r)}function ype(e,t){const n=UC(e),r=hpe(n,t);return fpe(r)}function bpe(e,t){const n=UC(e,t),r=z7(n);return dpe(r)}function _pe(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 xpe({bounds:e,boundsOptions:t,center:n,children:r,className:i,id:a,placeholder:s,style:u,whenReady:d,zoom:f,...m},p){const[b]=T.useState({className:i,id:a,style:u}),[_,w]=T.useState(null),x=T.useRef(void 0);T.useImperativeHandle(p,()=>_?.map??null,[_]);const E=T.useCallback(j=>{if(j!==null&&!x.current){const O=new om.Map(j,m);x.current=O,n!=null&&f!=null?O.setView(n,f):e!=null&&O.fitBounds(e,t),d!=null&&O.whenReady(d),w(lpe(O))}},[]);T.useEffect(()=>()=>{_?.map.remove()},[_]);const A=_?Xc.createElement(DC,{value:_},r):s??null;return Xc.createElement("div",{...b,ref:E},A)}const wpe=T.forwardRef(xpe),Spe=vpe(function({position:t,...n},r){const i=new om.Marker(t,n);return IC(i,upe(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())}),Cpe=ype(function(t,n){const r=new om.Popup(t,n.overlayContainer);return IC(r,n)},function(t,n,{position:r},i){T.useEffect(function(){const{instance:s}=t;function u(f){f.popup===s&&(s.update(),i(!0))}function d(f){f.popup===s&&i(!1)}return n.map.on({popupopen:u,popupclose:d}),n.overlayContainer==null?(r!=null&&s.setLatLng(r),s.openOn(n.map)):n.overlayContainer.bindPopup(s),function(){n.map.off({popupopen:u,popupclose:d}),n.overlayContainer?.unbindPopup(),n.map.removeLayer(s)}},[t,n,i,r])}),Epe=bpe(function({url:t,...n},r){const i=new om.TileLayer(t,kC(n,r));return IC(i,r)},function(t,n,r){_pe(t,n,r);const{url:i}=n;i!=null&&i!==r.url&&t.setUrl(i)}),Ape={"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","Pale Moon":"pale_moon",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"},F7={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",pale_moon:"Pale Moon",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"},wn={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv",bot:"bot"},Ur={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"},tl={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class ze{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=ze.getVersionPrecision(t),a=ze.getVersionPrecision(n);let s=Math.max(i,a),u=0;const d=ze.map([t,n],f=>{const m=s-ze.getVersionPrecision(f),p=f+new Array(m+1).join(".0");return ze.map(p.split("."),b=>new Array(20-b.length).join("0")+b).reverse()});for(r&&(u=s-Math.min(i,a)),s-=1;s>=u;){if(d[0][s]>d[1][s])return 1;if(d[0][s]===d[1][s]){if(s===u)return 0;s-=1}else if(d[0][s]<d[1][s])return-1}}static map(t,n){const r=[];let i;if(Array.prototype.map)return Array.prototype.map.call(t,n);for(i=0;i<t.length;i+=1)r.push(n(t[i]));return r}static find(t,n){let r,i;if(Array.prototype.find)return Array.prototype.find.call(t,n);for(r=0,i=t.length;r<i;r+=1){const a=t[r];if(n(a,r))return a}}static assign(t,...n){const r=t;let i,a;if(Object.assign)return Object.assign(t,...n);for(i=0,a=n.length;i<a;i+=1){const s=n[i];typeof s=="object"&&s!==null&&Object.keys(s).forEach(d=>{r[d]=s[d]})}return t}static getBrowserAlias(t){return Ape[t]}static getBrowserTypeByAlias(t){return F7[t]||""}}const Yt=/version\/(\d+(\.?_?\d+)+)/i,Tpe=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=ze.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||ze.getFirstMatch(Yt,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=ze.getFirstMatch(Yt,e)||ze.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=ze.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||ze.getFirstMatch(Yt,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=ze.getFirstMatch(Yt,e)||ze.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=ze.getFirstMatch(Yt,e)||ze.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe(e){const t={name:"Pale Moon"},n=ze.getFirstMatch(Yt,e)||ze.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=ze.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||ze.getFirstMatch(Yt,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=ze.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||ze.getFirstMatch(Yt,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=ze.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||ze.getFirstMatch(Yt,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=ze.getFirstMatch(Yt,e)||ze.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=ze.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||ze.getFirstMatch(Yt,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=ze.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||ze.getFirstMatch(Yt,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=ze.getFirstMatch(Yt,e)||ze.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=ze.getFirstMatch(Yt,e)||ze.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=ze.getFirstMatch(Yt,e)||ze.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=ze.getFirstMatch(Yt,e)||ze.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=ze.getFirstMatch(Yt,e)||ze.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=ze.getFirstMatch(Yt,e)||ze.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=ze.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||ze.getFirstMatch(Yt,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=ze.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||ze.getFirstMatch(Yt,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=ze.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=ze.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=ze.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=ze.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=ze.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=ze.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=ze.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=ze.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=ze.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=ze.getFirstMatch(Yt,e)||ze.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=ze.getFirstMatch(Yt,e)||ze.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=ze.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=ze.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||ze.getFirstMatch(Yt,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=ze.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||ze.getFirstMatch(Yt,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=ze.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=ze.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=ze.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=ze.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||ze.getFirstMatch(Yt,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=ze.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=ze.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=ze.getFirstMatch(Yt,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=ze.getFirstMatch(Yt,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=ze.getFirstMatch(Yt,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,i=e.search("\\(")!==-1?n:t;return{name:ze.getFirstMatch(i,e),version:ze.getSecondMatch(i,e)}}}],Ope=[{test:[/Roku\/DVP/],describe(e){const t=ze.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Ur.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=ze.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Ur.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=ze.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=ze.getWindowsVersionName(t);return{name:Ur.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:Ur.iOS},n=ze.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=ze.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=ze.getMacOSVersionName(t),r={name:Ur.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=ze.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:Ur.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=ze.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=ze.getAndroidVersionName(t),r={name:Ur.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=ze.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:Ur.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=ze.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||ze.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||ze.getFirstMatch(/\bbb(\d+)/i,e);return{name:Ur.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=ze.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Ur.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=ze.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:Ur.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:Ur.Linux}}},{test:[/CrOS/],describe(){return{name:Ur.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=ze.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:Ur.PlayStation4,version:t}}}],jpe=[{test:[/googlebot/i],describe(){return{type:wn.bot,vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=ze.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:wn.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:wn.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:wn.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:wn.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:wn.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:wn.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:wn.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=ze.getFirstMatch(/(ipod|iphone)/i,e);return{type:wn.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:wn.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe(e){const t=ze.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:wn.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe(){return{type:wn.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:wn.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:wn.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:wn.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:wn.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:wn.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:wn.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:wn.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:wn.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:wn.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:wn.tv}}}],Ppe=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:tl.Blink};const n=ze.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:tl.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:tl.Trident},n=ze.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:tl.Presto},n=ze.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:tl.Gecko},n=ze.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:tl.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:tl.WebKit},n=ze.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class f5{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=ze.find(Tpe,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))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=ze.find(Ope,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))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=ze.find(jpe,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))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=ze.find(Ppe,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))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 ze.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let a=0;if(Object.keys(t).forEach(u=>{const d=t[u];typeof d=="string"?(i[u]=d,a+=1):typeof d=="object"&&(n[u]=d,r+=1)}),r>0){const u=Object.keys(n),d=ze.find(u,m=>this.isOS(m));if(d){const m=this.satisfies(n[d]);if(m!==void 0)return m}const f=ze.find(u,m=>this.isPlatform(m));if(f){const m=this.satisfies(n[f]);if(m!==void 0)return m}}if(a>0){const u=Object.keys(i),d=ze.find(u,f=>this.isBrowser(f,!0));if(d!==void 0)return this.compareVersion(i[d])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const a=ze.getBrowserTypeByAlias(i);return n&&a&&(i=a.toLowerCase()),i===r}compareVersion(t){let n=[0],r=t,i=!1;const a=this.getBrowserVersion();if(typeof a=="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(ze.compareVersions(a,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 Mpe{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new f5(t,n)}static parse(t){return new f5(t).getResult()}static get BROWSER_MAP(){return F7}static get ENGINE_MAP(){return tl}static get OS_MAP(){return Ur}static get PLATFORMS_MAP(){return wn}}const Rpe=e=>e?.type===Rw.INVALID_ARGUMENT,Npe=e=>e?.type===Rw.INVALID_SHORT_URL_DELETION,Lpe=e=>!!e&&typeof e=="object"&&["type","detail","title","status"].every(t=>t in e),Ni=e=>Lpe(e)?e:void 0,BC=e=>"error"in e,Za=({errorData:e,fallbackMessage:t})=>v.jsxs(v.Fragment,{children:[e?.detail??t,Rpe(e)&&v.jsxs("p",{children:["Invalid elements: [",e.invalidElements.join(", "),"]"]})]}),$7=T.createContext(""),Dpe=$7.Provider,as=()=>T.useContext($7),V7=T.createContext(void 0),{Provider:zC}=V7,ky=()=>T.useContext(V7),kpe=5,FC=()=>{const[e,t]=T.useState([]),n=T.useMemo(()=>e.length>=kpe,[e.length]),r=T.useCallback(u=>!n&&t(d=>[...d,u]),[n]),i=T.useCallback(u=>!n&&e.every(d=>d.name!==u),[e,n]),a=T.useCallback(u=>t(d=>d.filter(f=>f!==u)),[]),s=T.useCallback(()=>t([]),[]);return{itemsToCompare:e,addItemToCompare:r,removeItemToCompare:a,clearItemsToCompare:s,canAddItemWithName:i}},$C=({className:e,type:t})=>{const n=as(),r=ky(),i=T.useMemo(()=>r?encodeURIComponent(r.itemsToCompare.map(d=>d.query).join(",")):"",[r]);if(!r||r.itemsToCompare.length===0)return null;const{itemsToCompare:a,clearItemsToCompare:s,removeItemToCompare:u}=r;return v.jsx("div",{className:Ne("sticky top-(--header-height) z-10",e),children:v.jsxs(Pt,{bodyClassName:"flex flex-col lg:flex-row gap-4 items-center",children:[v.jsx("ul",{className:"flex flex-wrap gap-1 grow items-center",children:a.map((d,f)=>v.jsxs("li",{className:Ne("flex items-center gap-1 text-sm font-bold text-white py-0.5 px-1.5 rounded",{"bg-gray-500":!d.style?.backgroundColor}),style:d.style,children:[d.name,v.jsx(ju,{label:`Remove ${d.name}`,className:"text-xs",onClick:()=>u(d)})]},`${d.name}_${f}`))}),v.jsxs("div",{className:"flex gap-2 max-lg:w-full",children:[v.jsxs(Mt,{className:"grow whitespace-nowrap",disabled:a.length<2,to:a.length>1?`${n}/${t}/compare-visits?${t}=${i}`:void 0,children:[v.jsx(Ye,{icon:kv}),"Compare (",a.length,"/5)",v.jsx(Ye,{icon:Ag})]}),v.jsx(Mt,{"aria-label":"Close compare",variant:"secondary",onClick:s,children:v.jsx(Ye,{icon:ew})})]})]})})},Ipe=(e,{maxVersion:t,minVersion:n})=>{const r=!n||Ix(e,n,">=");return(!t||Ix(e,t,"<="))&&r},H7={shortUrlVisitsDeletion:{minVersion:"3.6.0"},orphanVisitsDeletion:{minVersion:"3.7.0"},deviceLongUrls:{maxVersion:"3.*.*"},urlValidation:{maxVersion:"3.*.*"},shortUrlRedirectRules:{minVersion:"4.0.0"},ipRedirectCondition:{minVersion:"4.2.0"},geolocationRedirectCondition:{minVersion:"4.3.0"},filterShortUrlsByDomain:{minVersion:"4.3.0"},advancedQueryRedirectConditions:{minVersion:"4.5.0"},desktopDeviceTypes:{minVersion:"4.5.0"}};Object.freeze(H7);const $a=(e,t)=>Ipe(t==="latest"?"999.99.99":t,H7[e]),q7=e=>({deviceLongUrls:$a("deviceLongUrls",e),shortUrlVisitsDeletion:$a("shortUrlVisitsDeletion",e),orphanVisitsDeletion:$a("orphanVisitsDeletion",e),shortUrlRedirectRules:$a("shortUrlRedirectRules",e),urlValidation:$a("urlValidation",e),ipRedirectCondition:$a("ipRedirectCondition",e),geolocationRedirectCondition:$a("geolocationRedirectCondition",e),filterShortUrlsByDomain:$a("filterShortUrlsByDomain",e),advancedQueryRedirectConditions:$a("advancedQueryRedirectConditions",e),desktopDeviceTypes:$a("advancedQueryRedirectConditions",e)}),G7=T.createContext(q7("0.0.0")),Upe=G7.Provider,Bpe=e=>T.useMemo(()=>q7(e),[e]),Xi=e=>T.useContext(G7)[e],ff="DEFAULT",G_=({children:e,onChange:t,infoTitle:n,...r})=>v.jsx(ti,{...r,onChange:i=>t(i.target.value),label:v.jsxs(v.Fragment,{children:[v.jsx(Ye,{className:"mr-1.5",icon:Uv,title:n}),e]}),type:"url",placeholder:"No redirect"}),zpe=({isOpen:e,onClose:t,domain:n,editDomainRedirects:r})=>{const[i,a]=T.useState(n.redirects?.baseUrlRedirect??""),[s,u]=T.useState(n.redirects?.regular404Redirect??""),[d,f]=T.useState(n.redirects?.invalidShortUrlRedirect??""),[m,p]=T.useState(!1),b=T.useCallback(async()=>{p(!0);try{await r({domain:n.domain,redirects:{baseUrlRedirect:ub(i),regular404Redirect:ub(s),invalidShortUrlRedirect:ub(d)}}),t()}finally{p(!1)}},[r,n.domain,i,s,d,t]);return v.jsx(Ja,{title:`Edit redirects for ${n.domain}`,open:e,onClose:t,onConfirm:b,confirmText:m?"Saving...":"Save",confirmDisabled:m,children:v.jsxs("div",{className:"flex flex-col gap-y-3",children:[v.jsx(G_,{value:i,onChange:a,infoTitle:`Visitors accessing the base url, as in https://${n.domain}/, will be redirected to this URL.`,children:"Base URL"}),v.jsx(G_,{value:s,onChange:u,infoTitle:`Visitors accessing a url not matching a short URL pattern, as in https://${n.domain}/???/[...], will be redirected to this URL.`,children:"Regular 404"}),v.jsx(G_,{value:d,onChange:f,infoTitle:"Visitors accessing a url matching a short URL pattern, but not matching an existing short code, will be redirected to this URL.",children:"Invalid short URL"})]})})},Fpe=({domain:e,editDomainRedirects:t})=>{const{flag:n,setToTrue:r,setToFalse:i}=Sn(),a=as(),s=ky(),u=Xi("filterShortUrlsByDomain");return v.jsxs(v.Fragment,{children:[v.jsxs(an,{menuAlignment:"right",children:[v.jsxs(an.Item,{className:"gap-1.5",to:`${a}/domain/${e.domain}${e.isDefault?`_${ff}`:""}/visits`,children:[v.jsx(Ye,{icon:nw})," Visit stats"]}),v.jsxs(an.Item,{className:"gap-1.5",disabled:!s||!s.canAddItemWithName(e.domain),onClick:()=>s?.addItemToCompare({name:e.domain,query:e.domain}),children:[v.jsx(Ye,{icon:kv})," Compare visits"]}),u&&v.jsxs(an.Item,{className:"gap-1.5",to:`${a}/list-short-urls/1?domain=${e.isDefault?ff:e.domain}`,children:[v.jsx(Ye,{icon:tw})," Short URLs"]}),v.jsx(an.Separator,{}),v.jsxs(an.Item,{onClick:r,className:"gap-1.5",children:[v.jsx(Ye,{icon:J2})," Edit redirects"]})]}),v.jsx(zpe,{domain:e,isOpen:n,onClose:i,editDomainRedirects:t})]})},$pe=({status:e})=>{const{anchor:t,tooltip:n}=eo();return e==="validating"?v.jsx(Ye,{icon:Q2,spin:!0}):v.jsxs("span",{...t,children:[v.jsx(Ye,{icon:e==="valid"?Au:G$,className:Ne({"text-danger":e!=="valid"})}),v.jsx(to,{...n,children:e==="valid"?v.jsxs(v.Fragment,{children:["Congratulations!",v.jsx("br",{}),"This domain is properly configured."]}):v.jsxs("span",{children:["Oops! There is some missing configuration, and short URLs shared with this domain will not work.",v.jsx("br",{}),"Check the ",v.jsx(Si,{href:"https://slnk.to/multi-domain-docs",children:"documentation"})," in order to find out what is missing."]})})]})},Y_=({fallback:e})=>v.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:[!e&&v.jsx("small",{children:"No redirect"}),e&&v.jsxs(v.Fragment,{children:[e," ",v.jsx("small",{children:"(as fallback)"})]})]}),Vpe=()=>{const{anchor:e,tooltip:t}=eo();return v.jsxs(v.Fragment,{children:[v.jsx(Ye,{...e,icon:pV,className:"text-lm-brand dark:text-dm-brand","data-testid":"default-domain-icon"}),v.jsx(to,{...t,children:"Default domain foo"})]})},Hpe=({domain:e,editDomainRedirects:t,checkDomainHealth:n,defaultRedirects:r})=>{const{domain:i,isDefault:a,redirects:s,status:u}=e;return T.useEffect(()=>{n(e.domain)},[n,e.domain]),v.jsxs(Ke.Row,{className:"relative",children:[v.jsx(Ke.Cell,{columnName:"Is default domain:",children:a&&v.jsx(Vpe,{})}),v.jsx(Ke.Cell,{columnName:"Domain:",children:v.jsx("b",{children:i})}),v.jsx(Ke.Cell,{columnName:"Base path redirect:",children:s?.baseUrlRedirect??v.jsx(Y_,{fallback:r?.baseUrlRedirect})}),v.jsx(Ke.Cell,{columnName:"Regular 404 redirect:",children:s?.regular404Redirect??v.jsx(Y_,{fallback:r?.regular404Redirect})}),v.jsx(Ke.Cell,{columnName:"Invalid short URL redirect:",children:s?.invalidShortUrlRedirect??v.jsx(Y_,{fallback:r?.invalidShortUrlRedirect})}),v.jsx(Ke.Cell,{className:"lg:text-center max-lg:border-none",columnName:"Status:",children:v.jsx($pe,{status:u})}),v.jsx(Ke.Cell,{className:"text-right max-lg:absolute max-lg:top-1 max-lg:right-1 max-lg:p-0",children:v.jsx(Fpe,{domain:e,editDomainRedirects:t})})]})},d5=[{value:"Is default domain",isHidden:!0},{value:"Domain",isHidden:!1},{value:"Base path redirect",isHidden:!1},{value:"Regular 404 redirect",isHidden:!1},{value:"Invalid short URL redirect",isHidden:!1},{value:"Domain status",isHidden:!0},{value:"Options",isHidden:!0}],qpe=({domainsList:e,filterDomains:t,editDomainRedirects:n,checkDomainHealth:r})=>{const{filteredDomains:i,defaultRedirects:a,loading:s,error:u,errorData:d}=e,f=a??i.find(({isDefault:p})=>p)?.redirects,m=FC();return s?v.jsx(Vo,{loading:!0}):v.jsx(zC,{value:m,children:v.jsxs("div",{className:"flex flex-col gap-y-4",children:[v.jsx(xf,{onChange:t}),v.jsx($C,{type:"domains"}),u&&v.jsx(zr,{variant:"error",children:v.jsx(Za,{errorData:d,fallbackMessage:"Error loading domains :("})}),!u&&v.jsx(Pt,{className:"card",children:v.jsxs(Ke,{header:v.jsx(Ke.Row,{children:d5.map((p,b)=>v.jsx(Ke.Cell,{children:v.jsx("span",{className:p.isHidden?"sr-only":void 0,children:p.value})},b))}),children:[i.length<1&&v.jsx(Ke.Row,{children:v.jsx(Ke.Cell,{colSpan:d5.length,className:"text-center",children:"No results found"})}),i.map(p=>v.jsx(Hpe,{domain:p,editDomainRedirects:n,checkDomainHealth:r,defaultRedirects:f},p.domain))]})})]})})},Yn=(e,t)=>BN(e,t,{serializeError:n=>n}),Gpe="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",Ype=e=>Yn(Gpe,async({domain:t,redirects:n})=>{const r=await e().editDomainRedirects({domain:t,...n});return{domain:t,redirects:r}}),eg="shlink/domainsList",tg={domains:[],filteredDomains:[],loading:!1,error:!1},h5=({domain:e,redirects:t})=>n=>n.domain!==e?n:{...n,redirects:t},m5=(e,t)=>n=>n.domain!==e?n:{...n,status:t},Wpe=(e,t,n)=>{const r=Yn(`${eg}/listDomains`,async()=>{const{data:u,defaultRedirects:d}=await e().listDomains();return{domains:u.map(f=>({...f,status:"validating"})),defaultRedirects:d}}),i=Yn(`${eg}/checkDomainHealth`,async u=>{try{const{status:d}=await e().health({domain:u});return{domain:u,status:d==="pass"?"valid":"invalid"}}catch{return{domain:u,status:"invalid"}}}),a=fn(`${eg}/filterDomains`),{reducer:s}=Rt({name:eg,initialState:tg,reducers:{},extraReducers:u=>{u.addCase(r.pending,()=>({...tg,loading:!0})),u.addCase(r.rejected,(d,{error:f})=>({...tg,error:!0,errorData:Ni(f)})),u.addCase(r.fulfilled,(d,{payload:f})=>({...tg,...f,filteredDomains:f.domains})),u.addCase(i.fulfilled,({domains:d,filteredDomains:f,...m},{payload:p})=>({...m,domains:d.map(m5(p.domain,p.status)),filteredDomains:f.map(m5(p.domain,p.status))})),u.addCase(a,(d,{payload:f})=>({...d,filteredDomains:d.domains.filter(({domain:m})=>m.toLowerCase().match(f.toLowerCase()))})),u.addCase(t.fulfilled,(d,{payload:f})=>({...d,domains:d.domains.map(h5(f)),filteredDomains:d.filteredDomains.map(h5(f))})),u.addCase(n.fulfilled,(d,{payload:f})=>{f.domain===null||d.domains.some(m=>m.domain===f.domain)||d.domains.push({domain:f.domain,status:"validating",isDefault:!1,redirects:{baseUrlRedirect:null,regular404Redirect:null,invalidShortUrlRedirect:null}})})}});return{reducer:s,listDomains:r,checkDomainHealth:i,filterDomains:a}},Kpe=(e,t)=>{e.serviceFactory("ManageDomains",()=>qpe),e.decorator("ManageDomains",t(["domainsList"],["filterDomains","editDomainRedirects","checkDomainHealth"])),e.serviceFactory("domainsListReducerCreator",Wpe,"apiClientFactory","editDomainRedirects","createShortUrl"),e.serviceFactory("domainsListReducer",n=>n.reducer,"domainsListReducerCreator"),e.serviceFactory("listDomains",n=>n.listDomains,"domainsListReducerCreator"),e.serviceFactory("filterDomains",n=>n.filterDomains,"domainsListReducerCreator"),e.serviceFactory("editDomainRedirects",Ype,"apiClientFactory"),e.serviceFactory("checkDomainHealth",n=>n.checkDomainHealth,"domainsListReducerCreator")},p5="shlink/mercure",Zpe={loading:!0,error:!1},Xpe=e=>{const t=Yn(`${p5}/loadMercureInfo`,r=>{if(r&&r.realTimeUpdates&&!r.realTimeUpdates.enabled)throw new Error("Real time updates not enabled");return e().mercureInfo()}),{reducer:n}=Rt({name:p5,initialState:Zpe,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:a})=>({...a,loading:!1,error:!1}))}});return{loadMercureInfo:t,reducer:n}},Qpe=e=>{e.serviceFactory("mercureInfoReducerCreator",Xpe,"apiClientFactory"),e.serviceFactory("mercureInfoReducer",t=>t.reducer,"mercureInfoReducerCreator"),e.serviceFactory("loadMercureInfo",t=>t.loadMercureInfo,"mercureInfoReducerCreator")};function Pn(e){return T.useMemo(()=>e,[e])}function Mn(e,t){return(n,r=globalThis.console)=>(t.forEach(i=>{const a=n[i];e[i]=a}),e)}const Jpe=(e,t,n,r)=>{const{mercureHubUrl:i,token:a,loading:s,error:u}=e;if(s||u||!i)return;const d=({data:p})=>n(JSON.parse(p)),f=({status:p})=>p===401&&r(),m=t.map(p=>{const b=new URL(i);b.searchParams.append("topic",p);const _=new _X.EventSourcePolyfill(b,{headers:{Authorization:`Bearer ${a}`}});return _.onmessage=d,_.onerror=f,_});return()=>m.forEach(p=>p.close())};function Aa(e,t){const n=new Set;return r=>{const{createNewVisits:i,loadMercureInfo:a,mercureInfo:s}=r,u=vf();return T.useEffect(()=>{const{interval:d}=s,f=_=>d?n.add(_):i([_]),m=t(u),p=Jpe(s,m,f,a);if(!d)return p;const b=setInterval(()=>{i([...n]),n.clear()},d*1e3*60);return()=>{clearInterval(b),p?.()}},[i,a,s,u]),v.jsx(e,{...r})}}class Ji{static visits="https://shlink.io/new-visit";static orphanVisits="https://shlink.io/new-orphan-visit";static shortUrlVisits=t=>`https://shlink.io/new-visit/${t}`}const Lf=fn("shlink/visitCreation/createNewVisits",e=>({payload:{createdVisits:e}})),fh=(e,t,n)=>n==null?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===n,ege=(e,t)=>!e.domain&&t===ff?!0:e.domain===t,tge=(e,t)=>{const n=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}},Y7=e=>e.replaceAll("/","__"),VC=e=>e.replaceAll("__","/"),HC=({domain:e,shortCode:t})=>`${e??ff}__${Y7(t)}`,W7=e=>{const[t,n]=e.split(/__(.+)/);if(!n)throw new Error(`It was not possible to parse domain and short code from "${e}"`);return{domain:t===ff?null:t,shortCode:VC(n)}},qC="shlink/shortUrlDeletion",g5={shortCode:"",loading:!1,deleted:!1,error:!1},nge=e=>Yn(`${qC}/deleteShortUrl`,async({shortCode:t,domain:n})=>(await e().deleteShortUrl({shortCode:t,domain:n}),{shortCode:t,domain:n})),K7=fn(`${qC}/shortUrlDeleted`),rge=e=>{const{actions:t,reducer:n}=Rt({name:qC,initialState:g5,reducers:{resetDeleteShortUrl:()=>g5},extraReducers:i=>{i.addCase(e.pending,a=>({...a,loading:!0,error:!1,deleted:!1})),i.addCase(e.rejected,(a,{error:s})=>({...a,errorData:Ni(s),loading:!1,error:!0,deleted:!1})),i.addCase(e.fulfilled,(a,{payload:s})=>({...a,shortCode:s.shortCode,loading:!1,error:!1,deleted:!0}))}}),{resetDeleteShortUrl:r}=t;return{reducer:n,resetDeleteShortUrl:r}},Z7="shlink/shortUrlsList",X7=5,ige={loading:!0,error:!1},age=e=>Yn(`${Z7}/listShortUrls`,t=>e().listShortUrls(t??{})),oge=(e,t,n)=>Rt({name:Z7,initialState:ige,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:a})=>({loading:!1,error:!1,shortUrls:a})),r.addCase(n.fulfilled,(i,{payload:a})=>{i.shortUrls&&(i.shortUrls.data=[a,...i.shortUrls.data.slice(0,X7-1)],i.shortUrls.pagination.totalItems+=1)}),r.addCase(t.fulfilled,(i,{payload:a})=>{i.shortUrls&&(i.shortUrls.data=i.shortUrls.data.map(s=>{const{shortCode:u,domain:d}=a;return fh(s,u,d)?a:s}))}),r.addCase(K7,(i,{payload:a})=>{i.shortUrls&&(i.shortUrls.data=i.shortUrls.data.filter(s=>!fh(s,a.shortCode,a.domain)),i.shortUrls.pagination.totalItems-=1)}),r.addCase(Lf,(i,{payload:a})=>{i.shortUrls&&(i.shortUrls.data=i.shortUrls.data.map(s=>a.createdVisits.findLast(({shortUrl:u})=>u&&fh(s,u.shortCode,u.domain))?.shortUrl??s))})}}),O2=({children:e,title:t,link:n,tooltip:r})=>{const{anchor:i,tooltip:a}=eo({placement:"bottom"});return v.jsxs(v.Fragment,{children:[v.jsx(Mr,{to:n,className:"no-underline text-inherit",...i,children:v.jsxs(Pt,{className:Ne("text-center border-t-3 border-t-lm-main dark:border-t-dm-main relative"),children:[v.jsx(Ye,{icon:vW,size:"3x",className:"absolute right-[5px] bottom-[5px] opacity-10 -rotate-45"}),v.jsx("div",{role:"heading","aria-level":5,className:"text-xl uppercase text-placeholder font-bold mb-2",children:t}),v.jsx("div",{className:"text-4xl font-semibold",children:e})]})}),r&&v.jsx(to,{...a,children:r})]})},v5=({loading:e,excludeBots:t,visitsSummary:n,...r})=>v.jsx(O2,{tooltip:n.bots!==void 0?v.jsxs(v.Fragment,{children:[t?"Plus":"Including"," ",v.jsx("b",{"data-testid":"tooltip-amount",children:On(n.bots)})," potential bot visits"]}):void 0,...r,children:e?"Loading...":On(t&&n.nonBots!==void 0?n.nonBots:n.total)}),y5=({children:e,titleLinkText:t,titleLink:n,title:r})=>v.jsxs(un,{className:"card",children:[v.jsxs(un.Header,{className:"flex justify-between items-center",children:[v.jsx("span",{className:"sm:hidden",children:r}),v.jsx("h5",{className:"hidden sm:inline",children:r}),v.jsxs(Mr,{to:n,children:[t," »"]})]}),v.jsx(un.Body,{children:e})]}),Q7=Aa(({shortUrlsList:e,listShortUrls:t,tagsList:n,loadVisitsOverview:r,visitsOverview:i})=>{const{ShortUrlsTable:a,CreateShortUrl:s}=Pn(Q7),{loading:u,shortUrls:d}=e,{loading:f}=n,{loading:m,nonOrphanVisits:p,orphanVisits:b}=i,_=as(),w=Qa(),x=Dn("visits");return T.useEffect(()=>{t({itemsPerPage:X7,orderBy:{field:"dateCreated",dir:"DESC"}}),r()},[t,r]),v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-4 gap-4",children:[v.jsx(v5,{title:"Visits",link:`${_}/non-orphan-visits`,excludeBots:x?.excludeBots??!1,loading:m,visitsSummary:p}),v.jsx(v5,{title:"Orphan visits",link:`${_}/orphan-visits`,excludeBots:x?.excludeBots??!1,loading:m,visitsSummary:b}),v.jsx(O2,{title:"Short URLs",link:`${_}/list-short-urls/1`,children:u?"Loading...":On(d?.pagination.totalItems??0)}),v.jsx(O2,{title:"Tags",link:`${_}/manage-tags`,children:f?"Loading...":On(n.tags.length)})]}),v.jsx(y5,{title:"Create a short URL",titleLinkText:"Advanced options",titleLink:`${_}/create-short-url`,children:v.jsx(s,{basicMode:!0})}),v.jsx(y5,{title:"Recently created URLs",titleLinkText:"See all",titleLink:`${_}/list-short-urls/1`,children:v.jsx(a,{shortUrlsList:e,onTagClick:E=>w(`${_}/list-short-urls/1?tags=${encodeURIComponent(E)}`)})})]})},()=>[Ji.visits,Ji.orphanVisits]),sge=Mn(Q7,["ShortUrlsTable","CreateShortUrl"]);function lge(e,t){e.factory("Overview",sge),e.decorator("Overview",t(["shortUrlsList","tagsList","mercureInfo","visitsOverview"],["listShortUrls","createNewVisits","loadMercureInfo","loadVisitsOverview"]))}const J7="shlink/setShortUrlRedirectRules",b5={saving:!1,saved:!1,error:!1},uge=e=>Yn(`${J7}/setShortUrlRedirectRules`,({shortUrl:t,data:n})=>{const{shortCode:r,domain:i}=t;return e().setShortUrlRedirectRules({shortCode:r,domain:i},n)}),cge=e=>{const{reducer:t,actions:n}=Rt({name:J7,initialState:b5,reducers:{resetSetRules:()=>b5},extraReducers:i=>{i.addCase(e.pending,()=>({saving:!0,saved:!1,error:!1})),i.addCase(e.rejected,(a,{error:s})=>({saving:!1,saved:!1,error:!0,errorData:Ni(s)})),i.addCase(e.fulfilled,()=>({saving:!1,error:!1,saved:!0}))}}),{resetSetRules:r}=n;return{reducer:t,resetSetRules:r}},eI="shlink/getShortUrlRedirectRules",fge={loading:!0,error:!1},dge=e=>Yn(`${eI}/getShortUrlRedirectRules`,({shortCode:t,domain:n})=>e().getShortUrlRedirectRules({shortCode:t,domain:n})),hge=e=>Rt({name:eI,initialState:fge,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({loading:!0,error:!1})),t.addCase(e.rejected,()=>({loading:!1,error:!0})),t.addCase(e.fulfilled,(n,{payload:r})=>({loading:!1,error:!1,...r}))}});function $r(e){e.preventDefault()}function Nl(e){e.stopPropagation()}function tI(){const e=new Map;return[function(t,n){e.get(t)&&e.get(t).forEach(r=>{r(n)})},function(t,n){const r=e.get(t)??[];r.push(n),e.set(t,r)}]}var[nI,rI]=tI();function mge(e,t){return e.source===t.source&&e.flags.split("").sort().join("")===t.flags.split("").sort().join("")}function Mh(e,t,n=!0,r=["__key"]){if(e===t)return!0;if(typeof t=="object"&&typeof e=="object"&&e!==null&&t!==null){if(e instanceof Map||e instanceof Set)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return mge(e,t);if(e===null||t===null)return!1;const i=e,a=t;if(Object.keys(i).length!==Object.keys(a).length)return!1;for(const s of r)if((s in i||s in a)&&i[s]!==a[s])return!1;for(const s in i)if(!(s in a)||i[s]!==a[s]&&!n||n&&!Mh(i[s],a[s],n,r))return!1;return!0}return!1}function iI(e){return e.split(" ").filter(t=>t)}function Df(e){return{x:e.clientX,y:e.clientY}}Array();var GC=typeof window<"u",Pr=new WeakMap,Xa=new WeakMap;function aI(){if(!GC)return!1;if("userAgentData"in navigator)return navigator.userAgentData.mobile===!0;const e=navigator.userAgent,t=/android|iphone|ipod/i.test(e),n=/iPad/.test(e)||e.includes("Macintosh")&&navigator.maxTouchPoints>1;return t||n}var pge={affectedNodes:[],coordinates:{x:0,y:0},currentTargetValue:void 0,on:rI,emit:nI,originalZIndex:void 0,pointerSelection:!1,preventEnter:!1,rootUserSelect:void 0,nodePointerdown:void 0,longPress:!1,scrolling:!1,longPressTimeout:void 0,remapJustFinished:!1,selectedNodes:[],selectedParent:void 0,preventSynthDrag:!1,pointerDown:void 0,lastScrollContainerX:null,lastScrollContainerY:null,rootScrollWidth:void 0,rootScrollHeight:void 0,dragItemRect:void 0,windowScrollX:void 0,windowScrollY:void 0,lastScrollDirectionX:void 0,lastScrollDirectionY:void 0,scrollDebounceTimeout:void 0,frameIdX:void 0,frameIdY:void 0},Ge=pge,Cl=!1,_5,W_;function gge(){Ge.scrollDebounceTimeout&&clearTimeout(Ge.scrollDebounceTimeout),Ge.longPressTimeout&&clearTimeout(Ge.longPressTimeout),Ge.frameIdX!==void 0&&cancelAnimationFrame(Ge.frameIdX),Ge.frameIdY!==void 0&&cancelAnimationFrame(Ge.frameIdY),Ge={affectedNodes:[],coordinates:{x:0,y:0},on:rI,emit:nI,currentTargetValue:void 0,originalZIndex:void 0,pointerId:void 0,preventEnter:!1,remapJustFinished:!1,selectedNodes:[],nodePointerdown:void 0,rootUserSelect:void 0,preventSynthDrag:!1,scrolling:!1,selectedParent:void 0,pointerSelection:!1,synthScrollDirection:void 0,draggedNodeDisplay:void 0,synthDragScrolling:!1,longPress:!1,pointerDown:void 0,longPressTimeout:void 0,lastScrollContainerX:null,lastScrollContainerY:null,rootScrollWidth:void 0,rootScrollHeight:void 0,dragItemRect:void 0,windowScrollX:void 0,windowScrollY:void 0,lastScrollDirectionX:void 0,lastScrollDirectionY:void 0,scrollDebounceTimeout:void 0,frameIdX:void 0,frameIdY:void 0}}function oI(e){return Object.assign(Ge,e),e.initialParent.data.emit("dragStarted",Ge),Cl=!1,Ge.emit("dragStarted",Ge),Ge}function vge(){Ge.activeState&&Iu(Ge.activeState.parent,void 0,Ge),Ge.selectedState&&Eu(Ge.selectedState.nodes,Ge.selectedState.parent,Ge),Ge.selectedState=Ge.activeState=void 0}function yge(){if(Ge.pointerDown&&(Ge.pointerDown.node.el.draggable=!0),Ge.pointerDown=void 0,!ji(Ge))return;const e=Ge.currentParent.data.config;ji(Ge)&&e.handleEnd(Ge)}function bge(e){e.key==="Escape"&&(Ge.selectedState&&Eu(Ge.selectedState.nodes,Ge.selectedState.parent,Ge),Ge.activeState&&Iu(Ge.activeState.parent,void 0,Ge),Ge.selectedState=Ge.activeState=void 0)}function _ge(e){if(!Vr(Ge))return;Cl=!0;const t=Ge.initialParent.data.config.handleEnd;t(Ge)}function xge(e){if(!Vr(Ge))return;$r(e);const{x:t,y:n}=Df(e);Vr(Ge)&&By({x:t,y:n},e,Ge)}function wge(e){if(!Ge.pointerDown||!Ge.pointerDown.validated)return;const t=Ge.pointerDown.parent.data.config;if(!(e.pointerType==="mouse"&&!aI()))if(ji(Ge))ji(Ge)&&x5(e,Ge);else{if($r(e),t.longPress&&!Ge.longPress){clearTimeout(Ge.longPressTimeout),Ge.longPress=!1;return}const n=t.draggedNodes(Ge.pointerDown);t.dragstartClasses(Ge.pointerDown.node,n,t,!0);const r=Ge.pointerDown.node.el.getBoundingClientRect(),i=Xge(Ge.pointerDown.node,Ge.pointerDown.parent,e,Ge,n,r);x5(e,i,!0)}}function Sge({parent:e,getValues:t,setValues:n,config:r={}}){if(!GC)return;_5||(_5=Cv(document,{dragover:xge,pointerdown:vge,pointerup:yge,keydown:bge,drop:_ge,pointermove:wge,pointercancel:pi(r.handlePointercancel),touchmove:u=>{Vr(Ge)&&u.cancelable&&$r(u)},contextmenu:u=>{ji(Ge)&&$r(u)}})),lI(e);const[i,a]=tI(),s={getValues:t,setValues:n,config:{dragDropEffect:r.dragDropEffect??"move",dragEffectAllowed:r.dragEffectAllowed??"move",draggedNodes:kge,dragstartClasses:zge,handleNodeKeydown:$ge,handleDragstart:Uge,handleNodeDragover:Jge,handleParentDragover:eve,handleNodeDrop:Hge,handleNodeFocus:qge,handleNodeBlur:Gge,handlePointercancel:Wge,handleEnd:Kge,handleDragend:Yge,handleParentFocus:Ege,handleNodePointerup:Zge,handleNodePointerover:Vge,handleParentPointerover:tve,handleParentScroll:Ige,handleNodePointerdown:Bge,handleNodeDragenter:rve,handleNodeDragleave:ive,handleParentDrop:Tge,multiDrag:r.multiDrag??!1,nativeDrag:r.nativeDrag??!0,performSort:Cge,performTransfer:Age,root:r.root??document,setupNode:jge,setupNodeRemap:uI,reapplyDragClasses:Pge,tearDownNode:Rge,tearDownNodeRemap:Mge,remapFinished:Lge,threshold:{horizontal:0,vertical:0},...r},enabledNodes:[],abortControllers:{},privateClasses:[],on:a,emit:i};new MutationObserver(Nge).observe(e,{childList:!0}),Pr.set(e,s),r.plugins?.forEach(u=>{u(e)?.tearDown?.()}),r.plugins?.forEach(u=>{u(e)?.tearDown?.()}),r.plugins?.forEach(u=>{u(e)?.setup?.()}),Oge(e,s),Iy(e,!0)}function sI(e,t,n,r,i,a){const{x:s,y:u}=Df(n),d=e.el.getBoundingClientRect();return{affectedNodes:[],ascendingDirection:!1,clonedDraggedEls:[],coordinates:{x:s,y:u},draggedNode:{el:e.el,data:e.data},draggedNodes:r,incomingDirection:void 0,initialIndex:e.data.index,initialParent:{el:t.el,data:t.data},currentParent:{el:t.el,data:t.data},longPress:t.data.config.longPress??!1,longPressTimeout:void 0,currentTargetValue:e.data.value,scrollEls:[],startLeft:i||s-(d?.left??0),startTop:a||u-(d?.top??0),targetIndex:e.data.index,transferred:!1}}function Cge({parent:e,draggedNodes:t,targetNodes:n}){Iy(e.el);const r=t.map(d=>d.data.value),i=df(e.el,e.data),a=t[0].data.index,s=[...e.data.enabledNodes],u=[...i.filter(d=>!r.some(f=>Mh(d,f)))];u.splice(n[0].data.index,0,...r),"draggedNode"in Ge&&(Ge.currentTargetValue=n[0].data.value),j2(e.el,e.data,[...u]),e.data.config.onSort&&e.data.config.onSort({parent:{el:e.el,data:e.data},previousValues:[...i],previousNodes:[...s],nodes:[...e.data.enabledNodes],values:[...u],draggedNodes:t,previousPosition:a,position:n[0].data.index,targetNodes:n,state:Ge})}function Iu(e,t,n){if(!t){n.activeState=void 0;return}n.activeState={node:t,parent:e}}function Eu(e,t,n){const r=t.data.config.selectedClass;if(!n.selectedState)return;const i=Array.from(e);fl(e.map(a=>a.el),r);for(const a of i){a.el.setAttribute("aria-selected","false");const s=n.selectedState.nodes.findIndex(u=>u.el===a.el);s!==-1&&n.selectedState.nodes.splice(s,1)}}function ng(e,t,n,r,i=!1){r.pointerSelection=i;for(const a of t)a.el.setAttribute("aria-selected","true"),Zc([a.el],e.data.config.selectedClass,!0);r.selectedState={nodes:t,parent:e},Iu(e,n,r)}function Ege(e,t){const n=e.targetData.parent.data.enabledNodes[0];n&&(t.selectedState&&t.selectedState.parent.el!==e.targetData.parent.el?Iu(e.targetData.parent,n,t):t.selectedState||Iu(e.targetData.parent,n,t))}function Age({currentParent:e,targetParent:t,initialParent:n,draggedNodes:r,initialIndex:i,targetNodes:a,state:s}){Iy(n.el);const u=r.map(b=>b.data.value),d=[...df(e.el,e.data).filter(b=>!u.some(_=>Mh(b,_)))],f=df(t.el,t.data),m=n.el===t.el&&t.data.config.sortable===!1;let p;a.length?(m?p=i:t.data.config.sortable===!1?p=t.data.enabledNodes.length:p=a[0].data.index,f.splice(p,0,...u)):(p=m?i:t.data.enabledNodes.length,f.splice(p,0,...u)),j2(e.el,e.data,d),j2(t.el,t.data,f),t.data.config.onTransfer&&t.data.config.onTransfer({sourceParent:e,targetParent:t,initialParent:n,draggedNodes:r,targetIndex:p,state:s,targetNodes:a}),e.data.config.onTransfer&&e.data.config.onTransfer({sourceParent:e,targetParent:t,initialParent:n,draggedNodes:r,targetIndex:p,state:s,targetNodes:a||[]})}function df(e,t){return[...t.getValues(e)]}function j2(e,t,n){t.setValues(n,e)}function Tge(e,t){Nl(e.e),Cl=!0;const n=t.initialParent.data.config.handleEnd;n(t)}function lI(e){const t=Pr.get(e);t&&t.abortControllers.mainParent&&t.abortControllers.mainParent.abort()}function Vr(e){return"draggedNode"in e&&!!e.draggedNode}function ji(e){return"synthDragging"in e&&!!e.synthDragging}function Oge(e,t){t.abortControllers.mainParent=Cv(e,{dragover:rg(t.config.handleParentDragover),handleParentPointerover:t.config.handleParentPointerover,scroll:rg(t.config.handleParentScroll),drop:rg(t.config.handleParentDrop),hasNestedParent:n=>{const r=Pr.get(n.target);r&&(r.nestedParent=n.detail.parent)},focus:rg(t.config.handleParentFocus)}),t.config.externalDragHandle&&t.config.externalDragHandle.el&&t.config.externalDragHandle.callback&&(t.abortControllers.externalDragHandle=Cv(t.config.externalDragHandle.el,{pointerdown:n=>{if(!t.config.externalDragHandle||!t.config.externalDragHandle.callback)return;const r=t.config.externalDragHandle.callback();if(!zy(r)){console.warn("No draggable item found from external drag handle callback");return}const i=Xa.get(r);if(!i)return;const a=r.parentNode;if(!(a instanceof HTMLElement))return;const s=Pr.get(a);s&&(Ge.pointerDown={parent:{el:a,data:s},node:{el:r,data:i},validated:!0},r.draggable=!0)}}))}function jge(e){const t=e.parent.data.config;e.node.data.abortControllers.mainNode=Cv(e.node.el,{keydown:pi(t.handleNodeKeydown),dragstart:pi(t.handleDragstart),dragover:pi(t.handleNodeDragover),dragenter:pi(t.handleNodeDragenter),dragleave:pi(t.handleNodeDragleave),dragend:pi(t.handleDragend),drop:pi(t.handleNodeDrop),focus:pi(t.handleNodeFocus),blur:pi(t.handleNodeBlur),pointerup:pi(t.handleNodePointerup),pointercancel:pi(t.handlePointercancel),pointerdown:pi(t.handleNodePointerdown),handleNodePointerover:t.handleNodePointerover,touchmove:n=>{Vr(Ge)&&n.cancelable&&$r(n)},contextmenu:n=>{ji(Ge)&&$r(n)}}),e.node.el.draggable=!0,t.reapplyDragClasses(e.node.el,e.parent.data),e.parent.data.config.plugins?.forEach(n=>{n(e.parent.el)?.setupNode?.(e)})}function uI(e){Xa.set(e.node.el,e.node.data),e.parent.data.config.plugins?.forEach(t=>{t(e.parent.el)?.setupNodeRemap?.(e)})}function Pge(e,t){if(!Vr(Ge))return;const n=ji(Ge)?t.config.synthDropZoneClass:t.config.dropZoneClass;Ge.draggedNode.el===e&&Zc([e],n,!0)}function Mge(e){e.parent.data.config.plugins?.forEach(t=>{t(e.parent.el)?.tearDownNodeRemap?.(e)})}function Rge(e){e.parent.data.config.plugins?.forEach(t=>{t(e.parent.el)?.tearDownNode?.(e)}),e.node.el.draggable=!1,e.node.data?.abortControllers?.mainNode&&e.node.data?.abortControllers?.mainNode.abort()}function Nge(e){if(e.length===1&&e[0].addedNodes.length===1&&!(e[0].addedNodes[0]instanceof HTMLElement))return;const t=e[0].target;!(t instanceof HTMLElement)||!Pr.get(t)||Iy(t)}function Iy(e,t){const n=Pr.get(e);if(!n)return;n.privateClasses=Array.from(e.classList);const r=[],i=n.config;for(let u=0;u<e.children.length;u++){const d=e.children[u];if(!zy(d)||d.id==="dnd-dragged-node-clone")continue;const f=Xa.get(d);(t||!f)&&i.tearDownNode({parent:{el:e,data:n},node:{el:d,data:f}}),!i.disabled&&(!i.draggable||i.draggable&&i.draggable(d))&&r.push(d)}if(r.length!==n.getValues(e).length&&!i.disabled){console.warn("The number of draggable items defined in the parent element does not match the number of values. This may cause unexpected behavior.");return}const a=n.getValues(e),s=[];for(let u=0;u<r.length;u++){const d=r[u],f=Xa.get(d);if(i.draggableValue&&!i.draggableValue(a[u]))continue;const m=Object.assign(f??{privateClasses:[],abortControllers:{}},{value:a[u],index:u});if(!Vr(Ge)&&Ge.activeState&&Mh(Ge.activeState.node.data.value,m.value)&&Iu({data:n,el:e},{el:d,data:m},Ge),Vr(Ge)&&Mh(Ge.draggedNode.data.value,m.value)){Ge.draggedNode.data=m,Ge.draggedNode.el=d;const p=Ge.draggedNodes.find(b=>b.data.value===m.value);p&&(p.el=d)}s.push({el:d,data:m}),(t||!f)&&i.setupNode({parent:{el:e,data:n},node:{el:d,data:m}}),uI({parent:{el:e,data:n},node:{el:d,data:m}})}Pr.set(e,{...n,enabledNodes:s}),i.remapFinished(n),n.config.plugins?.forEach(u=>{u(e)?.remapFinished?.()})}function Lge(){Ge.remapJustFinished=!0,"draggedNode"in Ge&&(Ge.affectedNodes=[])}function Dge(e){return!!e.targetData.parent.data.config.nativeDrag}function kge(e){if(e.parent.data.config.multiDrag){if(Ge.selectedState)return[e.node,...Ge.selectedState?.nodes.filter(t=>t.el!==e.node.el)]}else return[e.node];return[]}function Ige(e){Vr(Ge)&&(Ge.emit("scrollStarted",Ge),!ji(Ge)&&(Ge.preventEnter=!0,W_&&clearTimeout(W_),W_=setTimeout(()=>{Ge.preventEnter=!1,Ge.emit("scrollEnded",Ge)},100)))}function Uge(e,t){const n=e.targetData.parent.data.config;if(!n.nativeDrag||!Dge(e)||!cI({x:e.e.clientX,y:e.e.clientY,node:e.targetData.node,config:n})){$r(e.e);return}let r=n.draggedNodes({parent:e.targetData.parent,node:e.targetData.node});r.length===0&&(r=[e.targetData.node]),n.dragstartClasses(e.targetData.node,r,n);const i=Fge(e,r);if(n.onDragstart){const a={parent:e.targetData.parent,values:df(e.targetData.parent.el,e.targetData.parent.data),draggedNode:i.draggedNode,draggedNodes:i.draggedNodes,position:i.initialIndex,state:i};n.onDragstart(a)}}function Bge(e,t){if(Nl(e.e),t.pointerDown={parent:e.targetData.parent,node:e.targetData.node,validated:!1},!cI({x:e.e.clientX,y:e.e.clientY,node:e.targetData.node,config:e.targetData.parent.data.config}))return;t.pointerDown.validated=!0,Qge(e,t,e.targetData.node);const n=e.targetData.parent.data;let r=[e.targetData.node];const i=e.e.ctrlKey||e.e.metaKey,a=e.e.shiftKey,s=e.targetData.node;if(i&&n.config.multiDrag){t.selectedState?t.selectedState.nodes.findIndex(u=>u.el===s.el)===-1?r=[...t.selectedState.nodes,s]:r=t.selectedState.nodes.filter(u=>u.el!==s.el):r=[s],ng(e.targetData.parent,r,e.targetData.node,t,!0);return}if(a&&n.config.multiDrag){const u=e.targetData.parent.data.enabledNodes;if(t.selectedState&&t.activeState)if(t.selectedState.parent.el!==e.targetData.parent.el){Eu(t.selectedState.nodes,t.selectedState.parent,t),t.selectedState=void 0;for(let d=0;d<=s.data.index;d++)r.push(u[d])}else{const[d,f]=t.activeState.node.data.index<e.targetData.node.data.index?[t.activeState.node.data.index,e.targetData.node.data.index]:[e.targetData.node.data.index,t.activeState.node.data.index];r=u.slice(d,f+1)}else for(let d=0;d<=s.data.index;d++)r.push(u[d]);ng(e.targetData.parent,r,e.targetData.node,t,!0);return}t.selectedState?.nodes?.length?t.selectedState.nodes.findIndex(u=>u.el===e.targetData.node.el)===-1&&(t.selectedState.parent.el!==e.targetData.parent.el?Eu(t.selectedState.nodes,e.targetData.parent,t):n.config.multiDrag&&aI()?r.push(...t.selectedState.nodes):Eu(t.selectedState.nodes,e.targetData.parent,t),ng(e.targetData.parent,r,e.targetData.node,t,!0)):ng(e.targetData.parent,[e.targetData.node],e.targetData.node,t,!0)}function zge(e,t,n,r=!1){Zc(t.map(i=>i.el),r?n.synthDraggingClass:n.draggingClass),setTimeout(()=>{fl(t.map(i=>i.el),r?n.synthDraggingClass:n.draggingClass),Zc(t.map(i=>i.el),r?n.synthDragPlaceholderClass:n.dragPlaceholderClass),Zc(t.map(i=>i.el),r?n.synthDropZoneClass:n.dropZoneClass),fl(t.map(i=>i.el),n.selectedClass)})}function Fge(e,t){Nl(e.e);const n=oI(sI(e.targetData.node,e.targetData.parent,e.e,t));if(e.e.dataTransfer){const r=e.targetData.parent.data.config;e.e.dataTransfer.dropEffect=r.dragDropEffect,e.e.dataTransfer.effectAllowed=r.dragEffectAllowed;let i;if(e.e.dataTransfer.setData("text/plain",""),r.dragImage)i=r.dragImage(e,t);else{if(!r.multiDrag||t.length===1)return e.targetData.node.el.style.zIndex="9999",e.targetData.node.el.style.boxSizing="border-box",e.e.dataTransfer.setDragImage(e.targetData.node.el,e.e.offsetX,e.e.offsetY),n.originalZIndex=e.targetData.node.el.style.zIndex,n;{const a=document.createElement("div");a.setAttribute("id","dnd-dragged-node-clone"),a.setAttribute("popover","manual");for(const u of t){const d=u.el.cloneNode(!0);d.id=u.el.id+"-clone",d.style.pointerEvents="none",a.appendChild(d)}const{width:s}=t[0].el.getBoundingClientRect();Object.assign(a.style,{display:"flex",flexDirection:"column",width:`${s}px`,position:"absolute",pointerEvents:"none",zIndex:"9999",left:"-9999px",boxSizing:"border-box",background:"transparent",overflow:"hidden"}),e.targetData.parent.el.appendChild(a),a.showPopover(),a.getBoundingClientRect(),i=a,e.e.dataTransfer.setDragImage(i,e.e.offsetX,e.e.offsetY)}}setTimeout(()=>{i?.remove()})}return n}function cI({x:e,y:t,node:n,config:r}){if(r.externalDragHandle)return!1;if(!r.dragHandle)return!0;const i=n.el.querySelectorAll(r.dragHandle);if(!i)return!1;const a=r.root.elementFromPoint(e,t);if(!a)return!1;for(const s of Array.from(i))if(a===s||s.contains(a))return!0;return!1}function $ge(e){}function Vge(e){e.detail.targetData.parent.el===e.detail.state.currentParent.el?dI(e.detail,e.detail.state):Uy(e.detail,e.detail.state)}function Hge(e,t){const n=e.targetData.parent.data.config;n.nativeDrag&&(Nl(e.e),Cl=!0,n.handleEnd(t))}function qge(e){e.e.target!==e.e.currentTarget&&Ge.pointerDown&&(Ge.pointerDown.node.el.draggable=!1)}function Gge(e){e.e.target!==e.e.currentTarget&&Ge.pointerDown&&(Ge.pointerDown.node.el.draggable=!0)}function Yge(e,t){const n=e.targetData.parent.data.config;if(n.nativeDrag){if($r(e.e),Nl(e.e),Cl){Cl=!1;return}n.handleEnd(t)}}function Wge(e,t){if(!ji(t))return;if($r(e.e),Cl){Cl=!1;return}const n=Pr.get(t.initialParent.el)?.config;n?.onDragend&&n.onDragend({parent:t.currentParent,values:df(t.currentParent.el,t.currentParent.data),draggedNode:t.draggedNode,draggedNodes:t.draggedNodes,state:t}),n?.handleEnd(t)}function Kge(e){e.draggedNode&&(e.draggedNode.el.draggable=!0);const t=e.draggedNodes.map(m=>m.el),n=e.initialParent.data,r=ji(e),i=Pr.get(e.initialParent.el)?.config,a=r?i?.synthDropZoneClass:i?.dropZoneClass,s=n?.config?.longPressClass,u=r?n?.config?.synthDragPlaceholderClass:n?.config?.dragPlaceholderClass,d=e.originalZIndex;ji(e)&&(e.clonedDraggedNode&&e.clonedDraggedNode.remove(),e.longPressTimeout&&clearTimeout(e.longPressTimeout)),P2(e),e.lastScrollDirectionX=void 0,e.lastScrollDirectionY=void 0,e.preventEnter=!1,e.scrollDebounceTimeout&&(clearTimeout(e.scrollDebounceTimeout),e.scrollDebounceTimeout=void 0),d!==void 0&&e.draggedNode&&(e.draggedNode.el.style.zIndex=d),requestAnimationFrame(()=>{fl(t,a),fl(t,s),fl(t,u)}),Eu(e.draggedNodes,e.currentParent,e),Iu(e.currentParent,void 0,e);const f={...e};i?.onDragend?.({parent:f.currentParent,values:df(f.currentParent.el,f.currentParent.data),draggedNode:f.draggedNode,draggedNodes:f.draggedNodes,state:f}),e.emit("dragEnded",f),gge()}function Zge(e,t){Nl(e.e),!t.pointerSelection&&t.selectedState&&Eu(t.selectedState.nodes,e.targetData.parent,t);const n=e.targetData.parent.data.config;t.pointerSelection=!1,"longPressTimeout"in t&&t.longPressTimeout&&clearTimeout(t.longPressTimeout),t.longPress=!1,fl(e.targetData.parent.data.enabledNodes.map(r=>r.el),n.longPressClass),Vr(t)&&n.handleEnd(t)}function Xge(e,t,n,r,i,a){const s=t.data.config;let u,d;const f=["display","flexDirection","alignItems","justifyContent","padding","paddingTop","margin","marginTop","marginBottom","marginLeft","marginRight","paddingBottom","paddingLeft","paddingRight","border","borderRadius","background","backgroundColor","boxShadow","font","color","lineHeight","gap","width","height","boxSizing","overflow"],m=(_,w)=>{const x=window.getComputedStyle(_);f.forEach(E=>{w.style[E]=x[E]})},p=(_,w={})=>{Object.assign(_.style,{position:"absolute",zIndex:"9999",pointerEvents:"none",willChange:"transform",boxSizing:"border-box",opacity:"0",overflow:"hidden",width:`${a.width}px`,height:`${a.height}px`,...w})};if(s.synthDragImage)d=s.synthDragImage(e,t,n,i),u=d.dragImage,u.setAttribute("popover","manual"),p(u);else if(!s.multiDrag||i.length===1)u=e.el.cloneNode(!0),m(e.el,u),u.setAttribute("popover","manual"),p(u);else{const _=document.createElement("div");_.setAttribute("popover","manual"),i.forEach(w=>{const x=w.el.cloneNode(!0);m(w.el,x),x.style.pointerEvents="none",x.style.margin="0",_.append(x)}),_.style.display="flex",_.style.flexDirection="column",_.style.padding="0",_.style.margin="0",_.style.position="absolute",_.style.zIndex="9999",_.style.pointerEvents="none",u=_}u.id="dnd-dragged-node-clone",t.el.appendChild(u),u.showPopover();const b={clonedDraggedEls:[],clonedDraggedNode:u,synthDragScrolling:!1,synthDragging:!0,rootScrollWidth:document.scrollingElement?.scrollWidth,rootScrollHeight:document.scrollingElement?.scrollHeight};return oI({...sI(e,t,n,i,d?.offsetX,d?.offsetY),...b})}function Qge(e,t,n){const r=e.targetData.parent.data.config;t.longPressTimeout=setTimeout(()=>{t&&(t.longPress=!0,r.longPressClass&&e.e.cancelable&&Zc([n.el],r.longPressClass),$r(e.e))},r.longPressDuration||1e3)}function P2(e,t=!0,n=!0){t&&(e.frameIdX!==void 0&&(cancelAnimationFrame(e.frameIdX),e.frameIdX=void 0),e.lastScrollDirectionX=void 0),n&&(e.frameIdY!==void 0&&(cancelAnimationFrame(e.frameIdY),e.frameIdY=void 0),e.lastScrollDirectionY=void 0),!e.frameIdX&&!e.frameIdY&&(e.preventEnter=!1)}function fI(e,t=!1){const{x:n,y:r}=e.coordinates,i=e.startLeft??0,a=e.startTop??0,s=window.scrollX??0,u=window.scrollY??0,d=n-i+s,f=r-a+u;e.clonedDraggedNode.style.transform=`translate3d(${d}px, ${f}px, 0px)`,t&&(e.clonedDraggedNode.style.opacity="1",fl(e.draggedNodes.map(m=>m.el),e.initialParent.data.config?.longPressClass))}function x5(e,t,n=!1){const r=Df(e);t.coordinates.x=r.x,t.coordinates.y=r.y,fI(t,n),t.scrollDebounceTimeout&&(clearTimeout(t.scrollDebounceTimeout),t.scrollDebounceTimeout=void 0),t.scrollDebounceTimeout=setTimeout(()=>{ji(t)&&By(t.coordinates,e,t)},16);const i=lve(r);if(!i){document.dispatchEvent(new CustomEvent("handleRootPointerover",{detail:{e,state:t}}));return}const a={e,targetData:i,state:t};"node"in i?i.node.el.dispatchEvent(new CustomEvent("handleNodePointerover",{detail:a})):i.parent.el.dispatchEvent(new CustomEvent("handleParentPointerover",{detail:a}))}function Jge(e,t){if(!e.targetData.parent.data.config.nativeDrag)return;const{x:n,y:r}=Df(e.e);t.coordinates.y=r,t.coordinates.x=n,$r(e.e),Nl(e.e),Vr(t)&&By({x:n,y:r},e.e,t),e.targetData.parent.el===t.currentParent?.el?dI(e,t):Uy(e,t)}function eve(e,t){if(!e.targetData.parent.data.config.nativeDrag)return;$r(e.e),Nl(e.e);const{x:n,y:r}=Df(e.e);Vr(t)&&By({x:n,y:r},e.e,t),Uy(e,t)}function tve(e){e.detail.targetData.parent.el!==e.detail.state.currentParent.el&&Uy(e.detail,e.detail.state)}function nve({currentParent:e,targetParent:t,initialParent:n,draggedNodes:r,state:i}){if(t.el===e.el)return!1;const a=t.data.config;if(r[0].el.contains(t.el)||a.dropZone===!1)return!1;const s=n.data.config;return a.accepts?a.accepts(t,n,e,i):!(!a.group||a.group!==s.group)}function rve(e,t){$r(e.e)}function ive(e,t){$r(e.e)}function ave(e,t,n,r){if(t.affectedNodes.map(m=>m.data.value).includes(e.targetData.node.data.value))return!1;if(t.remapJustFinished)return t.remapJustFinished=!1,(e.targetData.node.data.value===t.currentTargetValue||t.draggedNodes.map(m=>m.el).includes(e.targetData.node.el))&&(t.currentTargetValue=e.targetData.node.data.value),!1;if(t.preventEnter)return!1;if(t.draggedNodes.map(m=>m.el).includes(e.targetData.node.el))return t.currentTargetValue=void 0,!1;if(e.targetData.node.data.value===t.currentTargetValue||e.targetData.parent.el!==t.currentParent?.el||e.targetData.parent.data.config.sortable===!1||e.targetData.node.el.contains(t.draggedNodes[0].el))return!1;const i=e.targetData.node.el.getBoundingClientRect(),a=t.draggedNode.el.getBoundingClientRect(),s=i.y-a.y,u=i.x-a.x;let d;Math.abs(s)>Math.abs(u)?d=s>0?"above":"below":d=u>0?"left":"right";const f=t.currentParent.data.config.threshold;switch(d){case"left":if(n>i.x+i.width*f.horizontal)return t.incomingDirection="left",!0;break;case"right":if(n<i.x+i.width*(1-f.horizontal))return t.incomingDirection="right",!0;break;case"above":if(r>i.y+i.height*f.vertical)return t.incomingDirection="above",!0;break;case"below":if(r<i.y+i.height*(1-f.vertical))return t.incomingDirection="below",!0;break}return!1}function dI(e,t){const{x:n,y:r}=Df(e.e);if(!ave(e,t,n,r))return;const i=t.draggedNode.data.index>e.targetData.node.data.index?[e.targetData.node.data.index,t.draggedNode.data.index]:[t.draggedNode.data.index,e.targetData.node.data.index];t.targetIndex=e.targetData.node.data.index,t.affectedNodes=e.targetData.parent.data.enabledNodes.filter(a=>i[0]<=a.data.index&&a.data.index<=i[1]&&a.el!==t.draggedNode.el),e.targetData.parent.data.config.performSort({parent:e.targetData.parent,draggedNodes:t.draggedNodes,targetNodes:[e.targetData.node]})}function pi(e){function t(n){const r=Xa.get(n);if(!r)return;const i=Pr.get(n.parentNode);if(i)return{node:{el:n,data:r},parent:{el:n.parentNode,data:i}}}return n=>{const r=t(n.currentTarget);if(r)return e({e:n,targetData:r},Ge)}}function Uy(e,t){$r(e.e),nve({currentParent:t.currentParent,targetParent:e.targetData.parent,initialParent:t.initialParent,draggedNodes:t.draggedNodes,state:t})&&(e.targetData.parent.data.config.performTransfer({currentParent:t.currentParent,targetParent:e.targetData.parent,initialParent:t.initialParent,draggedNodes:t.draggedNodes,initialIndex:t.initialIndex,state:t,targetNodes:"node"in e.targetData?[e.targetData.node]:[]}),t.currentParent=e.targetData.parent,t.transferred=!0)}function rg(e){function t(n){const r=Pr.get(n);if(r)return{parent:{el:n,data:r}}}return n=>{const r=t(n.currentTarget);if(r)return e({e:n,targetData:r},Ge)}}function Zc(e,t,n=!1){function r(i,a){Xa.set(i,a)}for(const i of e){const a=Xa.get(i),s=ove(i,t,a,n);s&&r(i,s)}}function ove(e,t,n,r=!1){if(!t)return;const i=iI(t);if(!i.length)return;if(!n){e.classList.add(...i);return}const a=[];for(const s of i)e.classList.contains(s)?e.classList.contains(s)&&r===!1&&a.push(s):e.classList.add(s);return n.privateClasses=a,n}function fl(e,t){if(!t)return;const n=iI(t);if(n.length)for(const r of e){if(!zy(r)){r.classList.remove(...n);continue}const i=Xa.get(r)||Pr.get(r);if(i)for(const a of n)i.privateClasses.includes(a)||r.classList.remove(a)}}function w5(e,t,n,r,i){const a=i.axis==="x",s=e===document.scrollingElement,u=a?"scrollLeft":"scrollTop",d=a?"clientWidth":"clientHeight",f=a?"offsetWidth":"offsetHeight",m=a?"scrollWidth":"scrollHeight",p=a?t.clientX:t.clientY,b=a?r.left:r.top,_=a?n.overflowX:n.overflowY;if(s){const w=e[u],x=e[d],E=w>0,A=w+x<(a?i.state.rootScrollWidth||0:e[m]);return a?{left:E&&p<x*.075,right:A&&p>x*(1-.075)}:{up:E&&p<x*.075,down:A&&p>x*(1-.075)}}if((_==="auto"||_==="scroll")&&e!==document.body&&e!==document.documentElement){const w=e[m],x=e[f],E=e[u],A=E>0,j=E<w-x;return a?{left:A&&p<b+x*.075,right:j&&p>b+x*(1-.075)}:{up:A&&p<b+x*.075,down:j&&p>b+x*(1-.075)}}return a?{left:!1,right:!1}:{up:!1,down:!1}}function sve(e,t,n,r){if(!Vr(n)||!n.draggedNode)return;n.preventEnter=!0;const i=r.axis==="x",a=r.direction==="positive"?1:-1,s=20,u=i?"lastScrollDirectionX":"lastScrollDirectionY",d=i?"frameIdX":"frameIdY";n[d]!==void 0&&(cancelAnimationFrame(n[d]),n[d]=void 0),n[u]=r.direction;const f=()=>{if(!Vr(n)||!n.draggedNode){n[d]!==void 0&&(cancelAnimationFrame(n[d]),n[d]=void 0);return}const m=i?"scrollLeft":"scrollTop",p=i?"clientWidth":"clientHeight",b=i?"scrollWidth":"scrollHeight",_=e[m],w=e[p],x=e[b];if(!(a>0?_+w<x:_>0)){n[d]=void 0,n[u]=void 0;return}e[m]+=s*a,ji(n)&&fI(n),n[d]=requestAnimationFrame(f)};n[d]=requestAnimationFrame(f)}function S5(e,t,n){const r=e.getBoundingClientRect();return t>=r.left&&t<=r.right&&n>=r.top&&n<=r.bottom}function By(e,t,n){if(!Vr(n)||!n.draggedNode)return;P2(n);const{x:r,y:i}=e;let a=!1;const s=(d,f,m)=>{sve(m,t,n,{axis:d,direction:f}),a=!0},u=d=>{const f=window.getComputedStyle(d),m=d.getBoundingClientRect(),p=w5(d,t,f,m,{axis:"x",state:n}),b=w5(d,t,f,m,{axis:"y"});(p.left||p.right)&&(n.lastScrollContainerX=d,s("x",p.right?"positive":"negative",d)),(b.up||b.down)&&(n.lastScrollContainerY=d,s("y",b.down?"positive":"negative",d))};if(n.lastScrollContainerX&&S5(n.lastScrollContainerX,r,i)&&u(n.lastScrollContainerX),!a&&n.lastScrollContainerY&&S5(n.lastScrollContainerY,r,i)&&u(n.lastScrollContainerY),!a){let d=document.elementFromPoint(r,i);for(;d&&!(a&&n.lastScrollContainerX&&n.lastScrollContainerY);)d instanceof HTMLElement&&u(d),d=d.parentElement}if(!a){const d=document.scrollingElement;d instanceof HTMLElement&&u(d)}a||P2(n)}function lve(e){let t=document.elementFromPoint(e.x,e.y);if(!zy(t))return;let n,r=!0;for(;t&&r;){if(Xa.has(t)||Pr.has(t)){r=!1,n=Pr.has(t);break}t=t.parentNode}if(n){const i=Pr.get(t);return i?{parent:{el:t,data:i}}:void 0}else{const i=Xa.get(t);if(!i)return;const a=Pr.get(t.parentNode);return a?{node:{el:t,data:i},parent:{el:t.parentNode,data:a}}:void 0}}function zy(e){return e instanceof HTMLElement&&e.parentNode instanceof HTMLElement}function Cv(e,t){const n=new AbortController;for(const r in t){const i=t[r];e.addEventListener(r,i,{signal:n.signal,passive:!1,capture:r==="focus"||r==="blur"})}return n}function uve(e){if(e instanceof HTMLElement)return e;if("current"in e&&e.current instanceof HTMLElement)return e.current;console.warn("Invalid parent element",e)}function cve(e,t){const n=uve(e);n&&t(n)}var Ev=new WeakMap;function fve(e){const t=Ev.get(e);return t?t[0]:(console.warn("No values found for parent element"),[])}function dve(e,t){const n=Ev.get(t);n&&n[1](e),Ev.set(t,[e,n[1]])}function hve(e,t){return n=>{Ev.set(n,t),Sge({parent:n,getValues:fve,setValues:dve,config:e})}}function C5(e){GC&&(Array.isArray(e)||(e=[e]),e.forEach(t=>{const{parent:n,state:r,...i}=t;cve(n,hve(i,r))}))}function mve(e,t={}){const n=T.useRef(null),[r,i]=T.useState(e);function a(s={}){C5({parent:n,state:[r,i],...s})}return T.useEffect(()=>{C5({parent:n,state:[r,i],...t})},[r]),T.useEffect(()=>()=>{n.current&&lI(n.current)},[]),[n,r,i,a]}const Fy=()=>{const e=Qa(),t=as(),n=wf(),r=T.useMemo(()=>{const{orderBy:a,tags:s,excludeBots:u,excludeMaxVisitsReached:d,excludePastValidUntil:f,...m}=n,p=a?dK(a):void 0,b=s?.split(",")??[];return{...m,orderBy:p,tags:b,excludeBots:u!==void 0?u==="true":void 0,excludeMaxVisitsReached:d!==void 0?d==="true":void 0,excludePastValidUntil:f!==void 0?f==="true":void 0}},[n]),i=T.useCallback(a=>{const s={...r,...a},{orderBy:u,tags:d,excludeBots:f,excludeMaxVisitsReached:m,excludePastValidUntil:p,...b}=s,_={...b,orderBy:u&&fK(u),tags:d.length>0?d.join(","):void 0,excludeBots:cb(f),excludeMaxVisitsReached:cb(m),excludePastValidUntil:cb(p)},w=Sw(_),x=w?`?${w}`:"";e(`${t}/list-short-urls/1${x}`)},[r,e,t]);return[r,i]},YC=()=>{const{domain:e}=wf(),{shortCode:t=""}=vf();return T.useMemo(()=>({shortCode:VC(t),domain:e}),[e,t])},$y=()=>{const e=FW();return v.jsx(Kv,{size:"lg",className:"[&]:p-1 mr-4",onClick:e,"aria-label":"Go back",children:v.jsx(Ye,{icon:nV})})},pve={AF:"Afghanistan",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia",BA:"Bosnia and Herzegovina",BW:"Botswana",BR:"Brazil",IO:"British Indian Ocean Territory",VG:"British Virgin Islands",BN:"Brunei",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CC:"Cocos Islands",CO:"Colombia",KM:"Comoros",CK:"Cook Islands",CR:"Costa Rica",HR:"Croatia",CU:"Cuba",CW:"Curacao",CY:"Cyprus",CZ:"Czech Republic",CD:"Democratic Republic of the Congo",DK:"Denmark",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",TL:"East Timor",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",FK:"Falkland Islands",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",PF:"French Polynesia",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GU:"Guam",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HN:"Honduras",HK:"Hong Kong",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran",IQ:"Iraq",IE:"Ireland",IM:"Isle of Man",IL:"Israel",IT:"Italy",CI:"Ivory Coast",JM:"Jamaica",JP:"Japan",JE:"Jersey",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",XK:"Kosovo",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Laos",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macao",MK:"Macedonia",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia",MD:"Moldova",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",AN:"Netherlands Antilles",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",KP:"North Korea",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",PK:"Pakistan",PW:"Palau",PS:"Palestine",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",CG:"Republic of the Congo",RE:"Reunion",RO:"Romania",RU:"Russia",RW:"Rwanda",BL:"Saint Barthelemy",SH:"Saint Helena",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",MF:"Saint Martin",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"Sao Tome and Principe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SX:"Sint Maarten",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",KR:"South Korea",SS:"South Sudan",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Swaziland",SE:"Sweden",CH:"Switzerland",SY:"Syria",TW:"Taiwan",TJ:"Tajikistan",TZ:"Tanzania",TH:"Thailand",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",VI:"U.S. Virgin Islands",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VA:"Vatican",VE:"Venezuela",VN:"Vietnam",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"},gve=({deviceType:e,onDeviceTypeChange:t})=>{const n=Xi("desktopDeviceTypes"),r=T.useMemo(()=>{const i={android:"Android",ios:"iOS"};return n&&(i.mobile="Any mobile device",i.windows="Windows",i.macos="MacOS",i.linux="Linux",i.chromeos="ChromeOS"),i.desktop="Any desktop device",i},[n]);return v.jsxs(xw,{label:"Device type:",value:e??void 0,onChange:i=>t(i.target.value),hiddenRequired:!0,children:[!e&&v.jsx("option",{value:"",children:"- Select type -"}),Object.entries(r).map(([i,a])=>v.jsx("option",{value:i,children:a},i))]})},WC=({value:e,onValueChange:t,label:n,placeholder:r})=>v.jsx(ti,{label:`${n}:`,value:e??"",onChange:i=>t(i.target.value),placeholder:r,hiddenRequired:!0}),vve=({language:e,onLanguageChange:t})=>v.jsx(WC,{value:e,onValueChange:t,label:"Language",placeholder:"en-US / en"}),K_=({name:e,value:t,onNameChange:n,onValueChange:r})=>v.jsxs(v.Fragment,{children:[v.jsx(ti,{label:"Param name:",value:e??"",onChange:i=>n(i.target.value),placeholder:"hello",hiddenRequired:!0}),typeof t=="string"&&v.jsx(ti,{label:"Param value:",value:t,onChange:i=>r(i.target.value),placeholder:"world",hiddenRequired:!0})]}),yve=({ipAddress:e,onIpAddressChange:t})=>v.jsx(WC,{value:e,onValueChange:t,label:"IP address",placeholder:"192.168.1.10"}),bve=({countryCode:e,onCountryCodeChange:t})=>v.jsxs(xw,{label:"Country:",value:e??void 0,onChange:n=>t(n.target.value),hiddenRequired:!0,children:[!e&&v.jsx("option",{value:"",children:"- Select country -"}),Object.entries(pve).map(([n,r])=>v.jsx("option",{value:n,children:r},n))]}),_ve=({cityName:e,onCityNameChange:t})=>v.jsx(WC,{value:e,onValueChange:t,label:"City name",placeholder:"New York"}),xve=({condition:e,onConditionChange:t,onDelete:n})=>{const r=T.useCallback(m=>t({type:m,matchValue:null,matchKey:null}),[t]),i=T.useCallback(m=>t({...e,matchValue:m}),[e,t]),a=T.useCallback(m=>t({...e,matchKey:m}),[e,t]),s=Xi("ipRedirectCondition"),u=Xi("geolocationRedirectCondition"),d=Xi("advancedQueryRedirectConditions"),f=T.useMemo(()=>{const m={device:"Device type",language:"Language","query-param":"Query param"};return d&&(m["any-value-query-param"]="Any value query param",m["valueless-query-param"]="Valueless query param"),s&&(m["ip-address"]="IP address"),u&&(m["geolocation-country-code"]="Country (geolocation)",m["geolocation-city-name"]="City name (geolocation)"),m},[d,u,s]);return v.jsxs("div",{className:Ne("flex flex-col gap-2","border border-lm-border dark:border-dm-border","rounded-md relative p-4 h-full"),children:[v.jsxs("div",{children:[v.jsx(Mt,{variant:"secondary","aria-label":"Remove condition",onClick:n,className:Ne("absolute -top-3.5 -right-3.5 [&]:px-2","[&]:rounded-full bg-lm-primary dark:bg-dm-primary"),children:v.jsx(Ye,{icon:Iv,widthAuto:!0})}),v.jsx(xw,{label:"Type:",value:e.type,onChange:m=>r(m.target.value),hiddenRequired:!0,children:Object.entries(f).map(([m,p])=>v.jsx("option",{value:m,children:p},m))})]}),e.type==="device"&&v.jsx(gve,{deviceType:e.matchValue,onDeviceTypeChange:i}),e.type==="language"&&v.jsx(vve,{language:e.matchValue,onLanguageChange:i}),e.type==="query-param"&&v.jsx(K_,{name:e.matchKey,value:e.matchValue??"",onNameChange:a,onValueChange:i}),e.type==="any-value-query-param"&&v.jsx(K_,{name:e.matchKey,onNameChange:a,onValueChange:i}),e.type==="valueless-query-param"&&v.jsx(K_,{name:e.matchKey,onNameChange:a,onValueChange:i}),e.type==="ip-address"&&v.jsx(yve,{ipAddress:e.matchValue,onIpAddressChange:i}),e.type==="geolocation-country-code"&&v.jsx(bve,{countryCode:e.matchValue,onCountryCodeChange:i}),e.type==="geolocation-city-name"&&v.jsx(_ve,{cityName:e.matchValue,onCityNameChange:i})]})},hI=({isOpen:e,onClose:t,onSave:n,initialData:r})=>{const[i,a]=T.useState(r??{longUrl:"",conditions:[]}),s=T.useCallback(()=>{i&&n(i),t()},[n,i,t]),u=T.useCallback(()=>a(({longUrl:b,conditions:_})=>({longUrl:b,conditions:[..._,{type:"device",matchValue:null,matchKey:null}]})),[]),d=T.useCallback((b,_)=>a(({longUrl:w,conditions:x})=>{const E=[...x];return E[b]=_,{longUrl:w,conditions:E}}),[]),f=T.useCallback(b=>a(({longUrl:_,conditions:w})=>{const x=[...w];return x.splice(b,1),{longUrl:_,conditions:x}}),[]),m=T.useRef(null),p=T.useCallback(()=>a(r??{longUrl:"",conditions:[]}),[r]);return T.useEffect(()=>{const b=new MutationObserver(()=>{m.current&&e&&(m.current.focus(),b.disconnect())});return b.observe(document.body,{childList:!0,subtree:!0}),()=>b.disconnect()},[e]),v.jsxs(Ja,{size:"xl",title:"Redirect rule",open:e,onClose:t,onClosed:p,onConfirm:s,confirmDisabled:i.conditions.length===0,confirmText:"Confirm",children:[v.jsx(ti,{label:"Long URL:",type:"url",placeholder:"https://www.example.com",value:i.longUrl,onChange:b=>a(_=>({..._,longUrl:b.target.value})),hiddenRequired:!0,ref:m}),v.jsx("hr",{}),v.jsxs("div",{className:"flex justify-between",children:[v.jsx("b",{children:"Conditions:"}),v.jsx(Mt,{className:"[&]:px-1.5",variant:"secondary","aria-label":"Add condition",onClick:u,children:v.jsx(Ye,{icon:kh})})]}),i.conditions.length===0&&v.jsx("div",{className:"text-center",children:v.jsx("i",{children:"Add conditions..."})}),i.conditions.length>0&&v.jsx("div",{className:"pr-3 mt-6 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:i.conditions.map((b,_)=>v.jsx(xve,{condition:b,onConditionChange:w=>d(_,w),onDelete:()=>f(_)},`${_}_${b.type}`))})]})},wve=({priority:e,isLast:t,redirectRule:n,onDelete:r,onMoveUp:i,onMoveDown:a,onUpdate:s})=>{const{flag:u,setToTrue:d,setToFalse:f}=Sn();return v.jsxs(Pt,{children:[v.jsxs("div",{className:"flex align-center gap-4",children:[v.jsx("div",{className:"flex flex-col my-auto hidden md:block cursor-grab drag-n-drop-handler",children:v.jsx(Ye,{icon:X$})}),v.jsxs("div",{className:"flex flex-col my-auto",children:[v.jsx(Mt,{variant:"secondary","aria-label":`Move rule with priority ${e} up`,disabled:e===1,onClick:i,className:"[&]:px-2 rounded-b-none mb-[-1px]",children:v.jsx(Ye,{icon:$$})}),v.jsx(Mt,{variant:"secondary","aria-label":`Move rule with priority ${e} down`,disabled:t,onClick:a,className:"[&]:px-2 rounded-t-none",children:v.jsx(Ye,{icon:dV})})]}),v.jsxs("div",{className:"grow",children:[v.jsxs("div",{className:"mb-2",children:[v.jsx("b",{children:"Long URL:"})," ",v.jsx(Si,{href:n.longUrl,"data-testid":"rule-long-url"})]}),v.jsxs("div",{className:"flex flex-col lg:flex-row gap-2",children:[v.jsx("b",{children:"Conditions:"}),n.conditions.map((m,p)=>v.jsxs("div",{className:"rounded-sm bg-gray-600 px-1 text-white",children:[m.type==="device"&&v.jsxs(v.Fragment,{children:["Device is ",m.matchValue]}),m.type==="language"&&v.jsxs(v.Fragment,{children:[m.matchValue," language is accepted"]}),m.type==="query-param"&&v.jsxs(v.Fragment,{children:["Query string contains ",m.matchKey,"=",m.matchValue]}),m.type==="ip-address"&&v.jsxs(v.Fragment,{children:["IP address matches ",m.matchValue]}),m.type==="geolocation-country-code"&&v.jsxs(v.Fragment,{children:["Country code is ",m.matchValue]}),m.type==="geolocation-city-name"&&v.jsxs(v.Fragment,{children:["City name is ",m.matchValue]})]},`${m.type}_${p}`))]})]}),v.jsxs("div",{className:"flex flex-col sm:flex-row gap-1 my-auto",children:[v.jsx(Mt,{className:"[&]:px-1.5",variant:"secondary","aria-label":`Edit rule with priority ${e}`,onClick:d,children:v.jsx(Ye,{icon:zR})}),v.jsx(Mt,{className:"[&]:px-2",variant:"danger","aria-label":`Delete rule with priority ${e}`,onClick:r,children:v.jsx(Ye,{icon:V$})})]})]}),v.jsx(hI,{onSave:s,isOpen:u,onClose:f,initialData:n})]})},Sve=({shortUrlRedirectRules:e,getShortUrlRedirectRules:t,getShortUrlsDetails:n,shortUrlsDetails:r,setShortUrlRedirectRules:i,shortUrlRedirectRulesSaving:a,resetSetRules:s})=>{const u=YC(),{shortUrls:d}=r,f=u&&d?.get(u),[m,p,b]=mve([],{dragHandle:".drag-n-drop-handler",dropZoneClass:"opacity-25"}),{saving:_,saved:w,errorData:x}=a,{flag:E,setToFalse:A,setToTrue:j}=Sn(),O=T.useCallback(ee=>b((J=[])=>[...J,ee]),[b]),N=T.useCallback(ee=>b((J=[])=>{const ne=[...J];return ne.splice(ee,1),ne}),[b]),U=T.useCallback((ee,J)=>b((ne=[])=>{const he=[...ne];return he[ee]=J,he}),[b]),V=T.useCallback((ee,J)=>b((ne=[])=>{if(!ne[J])return ne;const he=[...ne],Q=he[J];return he[J]=he[ee],he[ee]=Q,he}),[b]),Z=T.useCallback(ee=>V(ee,ee-1),[V]),X=T.useCallback(ee=>V(ee,ee+1),[V]),oe=T.useCallback(ee=>{ee.preventDefault(),p&&i({shortUrl:u,data:{redirectRules:p}})},[u,p,i]);return T.useEffect(()=>(t(u),n([u]),s),[t,n,u,s]),T.useEffect(()=>{e.redirectRules&&b(e.redirectRules)},[b,e.redirectRules]),v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsx("header",{children:v.jsxs(Pt,{children:[v.jsxs("h2",{className:"sm:flex justify-between items-center",children:[v.jsx($y,{}),v.jsxs("div",{className:"text-center grow",children:[r.loading&&v.jsx(v.Fragment,{children:"Loading..."}),!r.loading&&v.jsxs("small",{children:["Redirect rules for ",v.jsx(Si,{href:f?.shortUrl??""})]})]})]}),v.jsx("hr",{}),v.jsxs("div",{children:[v.jsx("p",{children:"Configure dynamic conditions that will be checked at runtime."}),v.jsxs("p",{children:["If no conditions match, visitors will be redirected to: ",v.jsx(Si,{href:e.defaultLongUrl??""})]})]})]})}),v.jsx("div",{children:v.jsxs(Mt,{onClick:j,children:[v.jsx(Ye,{icon:kh})," Add rule"]})}),v.jsxs("form",{onSubmit:oe,children:[e.loading&&v.jsx(Vo,{loading:!0}),p.length===0&&!e.loading&&v.jsx(Pt,{className:"text-center",children:v.jsx("i",{children:"This short URL has no dynamic redirect rules"})}),v.jsx("div",{className:"flex flex-col gap-2",ref:m,children:p.map((ee,J)=>v.jsx(wve,{redirectRule:ee,priority:J+1,isLast:J===p.length-1,onDelete:()=>N(J),onMoveUp:()=>Z(J),onMoveDown:()=>X(J),onUpdate:ne=>U(J,ne)},`${ee.longUrl}_${J}`))}),v.jsx("div",{className:"text-center mt-4",children:v.jsx(Mt,{type:"submit",inline:!0,className:"max-md:w-full",disabled:_,"data-testid":"save-button",children:_?"Saving...":"Save rules"})})]}),x&&v.jsx(zr,{variant:"error",children:v.jsx(Za,{errorData:x,fallbackMessage:"An error occurred while saving short URL redirect rules :("})}),w&&v.jsx(zr,{variant:"success",children:"Redirect rules properly saved."}),v.jsx(hI,{isOpen:E,onClose:A,onSave:O})]})},Cve=(e,t)=>{e.serviceFactory("ShortUrlRedirectRules",()=>Sve),e.decorator("ShortUrlRedirectRules",t(["shortUrlRedirectRules","shortUrlsDetails","shortUrlRedirectRulesSaving"],["getShortUrlRedirectRules","getShortUrlsDetails","setShortUrlRedirectRules","resetSetRules"])),e.serviceFactory("getShortUrlRedirectRules",dge,"apiClientFactory"),e.serviceFactory("setShortUrlRedirectRules",uge,"apiClientFactory"),e.serviceFactory("resetSetRules",n=>n.resetSetRules,"setShortUrlRedirectRulesReducerCreator"),e.serviceFactory("shortUrlRedirectRulesReducerCreator",hge,"getShortUrlRedirectRules"),e.serviceFactory("shortUrlRedirectRulesReducer",n=>n.reducer,"shortUrlRedirectRulesReducerCreator"),e.serviceFactory("setShortUrlRedirectRulesReducerCreator",cge,"setShortUrlRedirectRules"),e.serviceFactory("setShortUrlRedirectRulesReducer",n=>n.reducer,"setShortUrlRedirectRulesReducerCreator")},Eve=({creation:e,resetCreateShortUrl:t,canBeClosed:n=!1})=>{const{error:r,saved:i}=e;if(T.useEffect(()=>{t()},[t]),r)return v.jsxs(zr,{variant:"error",className:"mt-4 relative",children:[n&&v.jsx("div",{className:"absolute right-1.5 top-1.5","data-testid":"error-close-button",children:v.jsx(ju,{onClick:t})}),v.jsx(Za,{errorData:e.errorData,fallbackMessage:"An error occurred while creating the URL :("})]});if(!i)return null;const{shortUrl:a}=e.result;return v.jsxs(zr,{variant:"success",className:"mt-4 relative",children:[n&&v.jsx("div",{className:"absolute right-1.5 top-1.5","data-testid":"success-close-button",children:v.jsx(ju,{onClick:t})}),v.jsxs("div",{className:"flex items-center justify-center gap-1",children:[v.jsxs("span",{children:[v.jsx("b",{children:"Great!"})," The short URL is ",v.jsx("b",{children:a})]}),v.jsx(dN,{text:a})]})]})},Ave=e=>({longUrl:"",tags:[],customSlug:"",title:void 0,shortCodeLength:void 0,domain:"",validSince:void 0,validUntil:void 0,maxVisits:void 0,findIfExists:!1,validateUrl:e?.validateUrls??!1,forwardQuery:e?.forwardQuery??!0}),mI=({createShortUrl:e,shortUrlCreation:t,resetCreateShortUrl:n,basicMode:r=!1})=>{const{ShortUrlForm:i}=Pn(mI),a=Dn("shortUrlCreation"),s=T.useMemo(()=>Ave(a),[a]);return v.jsxs(v.Fragment,{children:[v.jsx(i,{initialState:s,saving:t.saving,basicMode:r,onSave:async u=>(n(),e(u))}),v.jsx(Eve,{creation:t,resetCreateShortUrl:n,canBeClosed:r})]})},Tve=Mn(mI,["ShortUrlForm"]),pI=({shortUrlsDetails:e,getShortUrlsDetails:t,shortUrlEdition:n,editShortUrl:r})=>{const{ShortUrlForm:i}=Pn(pI),a=YC(),{loading:s,error:u,errorData:d,shortUrls:f}=e,m=a&&f?.get(a),{saving:p,saved:b,error:_,errorData:w}=n,x=Dn("shortUrlCreation"),E=T.useMemo(()=>tge(m,x),[m,x]);return T.useEffect(()=>{a&&t([a])},[t,a]),s?v.jsx(Vo,{loading:!0}):u?v.jsx(zr,{variant:"error",children:v.jsx(Za,{errorData:d,fallbackMessage:"An error occurred while loading short URL detail :("})}):v.jsxs("div",{className:"flex flex-col gap-y-4",children:[v.jsx("header",{children:v.jsx(Pt,{children:v.jsxs("h2",{className:"sm:flex items-center",children:[v.jsx($y,{}),v.jsx("div",{className:"text-center grow",children:v.jsxs("small",{children:["Edit ",v.jsx(Si,{href:m?.shortUrl??""})]})})]})})}),v.jsx(i,{initialState:E,saving:p,onSave:async A=>{m&&r({...m,data:A})}}),b&&_&&v.jsx(zr,{variant:"error",children:v.jsx(Za,{errorData:w,fallbackMessage:"An error occurred while updating short URL :("})}),b&&!_&&v.jsx(zr,{variant:"success",children:"Short URL properly edited."})]})},Ove=Mn(pI,["ShortUrlForm"]),Z_="delete",jve=({shortUrl:e,onClose:t,isOpen:n,shortUrlDeletion:r,resetDeleteShortUrl:i,deleteShortUrl:a,shortUrlDeleted:s})=>{const[u,d]=T.useState("");T.useEffect(()=>i,[i]);const{loading:f,error:m,deleted:p,errorData:b}=r,_=T.useCallback(()=>{i(),t()},[i,t]),w=T.useCallback(()=>a(e).then(x=>!BC(x)&&t()),[a,e,t]);return v.jsx(Ja,{open:n,title:"Delete short URL",variant:"danger",confirmText:f?"Deleting...":"Delete",confirmDisabled:u!==Z_||f,onConfirm:w,onClose:_,onClosed:()=>p&&s(e),children:v.jsxs("div",{className:"flex flex-col gap-y-2",children:[v.jsxs("p",{children:[v.jsx("b",{className:"text-danger",children:"Caution!"})," You are about to delete a short URL."]}),v.jsx("p",{children:"This action cannot be undone. Once you have deleted it, all the visits stats will be lost."}),v.jsx(ti,{label:v.jsxs(v.Fragment,{children:["Type ",v.jsx("b",{children:Z_})," to confirm deletion."]}),type:"text",placeholder:Z_,value:u,onChange:x=>d(x.target.value),onKeyDown:x=>x.key==="Enter"&&w()}),m&&v.jsx(zr,{variant:Npe(b)?"warning":"error",size:"sm",className:"mt-2",children:v.jsx(Za,{errorData:b,fallbackMessage:"Something went wrong while deleting the URL :("})})]})})},gI=({amount:e=0,loading:t=!1,...n})=>v.jsxs(Mt,{...n,disabled:t,solid:!Qo(),children:[v.jsx(Ye,{icon:Z$})," ",t?"Exporting...":v.jsxs(v.Fragment,{children:["Export (",On(e),")"]})]}),E5=20,vI=({amount:e=0})=>{const{apiClientFactory:t,ReportExporter:n}=Pn(vI),[{tags:r,search:i,startDate:a,endDate:s,orderBy:u,tagsMode:d}]=Fy(),{flag:f,setToTrue:m,setToFalse:p}=Sn(),b=T.useCallback(async()=>{const _=e/E5,w=async(E=1)=>{const{data:A}=await t().listShortUrls({page:`${E}`,tags:r,searchTerm:i,startDate:a,endDate:s,orderBy:u,tagsMode:d,itemsPerPage:E5});return E>=_?A:A.concat(await w(E+1))};m();const x=await w();n.exportShortUrls(x.map(E=>{const{hostname:A,pathname:j}=new URL(E.shortUrl),O=j.substring(1);return{createdAt:E.dateCreated,domain:A,shortCode:O,shortUrl:E.shortUrl,longUrl:E.longUrl,title:E.title??"",tags:E.tags.join("|"),visits:E?.visitsSummary?.total??E.visitsCount??0}})),p()},[e,t,s,u,n,i,a,m,p,r,d]);return v.jsx(gI,{loading:f,className:"max-lg:w-full",amount:e,onClick:b})},Pve=Mn(vI,["apiClientFactory","ReportExporter"]),Mve="yyyy-MM-dd",yI="yyyy-MM-dd HH:mm",El=()=>new Date,KC=e=>typeof e!="string",ZC=(e,t)=>!e||!KC(e)?e:t?qg(e,t):IQ(e),Al=e=>ZC(e,void 0),sl=e=>ZC(e,Mve),Rh=e=>ZC(e,yI),_i=e=>KC(e)?e:yl(e),sm=(e,t,n)=>{const r=_i(e),i=t&&_i(t),a=n&&_i(n);if(i&&a)try{return zQ(r,{start:i,end:a})}catch{return!1}return i?Bx(r,i)||BQ(r,i):a?Bx(r,a)||Gg(r,a):!0},lu=(e,t)=>Bx(e,t)||Gg(e,t),Av=({date:e,format:t=yI,relative:n=!1})=>{const r=KC(e)?e:yl(e);return v.jsx("time",{dateTime:`${UQ(r)}000`,children:n?`${kQ(El(),r)} ago`:qg(r,t)})},bI=(e,{shortCode:t,domain:n},r)=>{const i=n?`?domain=${n}`:"";return`${e}/short-code/${Y7(t)}/${r}${i}`},_I=({shortUrl:e,suffix:t,asLink:n,children:r,...i})=>{const a=as();return!n||!e?v.jsx("span",{...i,children:r}):v.jsx(Mr,{to:bI(a,e,t),...i,children:r})},Rve=e=>{const{meta:t,visitsCount:n,visitsSummary:r}=e,{maxVisits:i,validSince:a,validUntil:s}=t,u=r?.total??n??0;return i&&u>=i?{icon:iV,className:"text-danger",description:`This short URL cannot be currently visited because it has reached the maximum amount of ${i} visit${i>1?"s":""}`}:s&&Gg(_i(s),El())?{icon:OA,className:"text-danger",description:`This short URL cannot be visited since ${Rh(_i(s))}`}:a&&Gg(El(),_i(a))?{icon:OA,className:"text-warning",description:`This short URL will start working on ${Rh(_i(a))}`}:{icon:Au,className:"text-lm-brand dark:text-dm-brand",description:"This short URL can be visited normally"}},Nve=({shortUrl:e})=>{const{icon:t,className:n,description:r}=T.useMemo(()=>Rve(e),[e]);return v.jsx("span",{className:"cursor-help",title:r,children:v.jsx(Ye,{icon:t,className:n})})},xI=({visitsCount:e,shortUrl:t,active:n=!1,asLink:r=!1})=>{const{anchor:i,tooltip:a}=eo(),{maxVisits:s,validSince:u,validUntil:d}=t?.meta??{},f=!!s||!!u||!!d,m=v.jsx(_I,{shortUrl:t,suffix:"visits",asLink:r,children:v.jsx("strong",{className:Ne("inline-block transition-all duration-300",{"scale-150":n}),children:On(e)})});return f?v.jsxs(v.Fragment,{children:[v.jsxs("span",{className:"whitespace-nowrap",children:[m,v.jsxs("small",{className:"cursor-help",...i,children:[s&&v.jsxs(v.Fragment,{children:[" / ",On(s)]}),v.jsx("sup",{className:"ml-1",children:v.jsx(Ye,{icon:Uv})})]})]}),v.jsx(to,{...a,children:v.jsxs("ul",{className:"flex flex-col gap-y-2",children:[s&&v.jsxs("li",{children:["This short URL will not accept more than ",v.jsx("b",{children:On(s)})," visit",s===1?"":"s","."]}),u&&v.jsxs("li",{children:["This short URL will not accept visits before ",v.jsx("b",{className:"whitespace-nowrap",children:Rh(_i(u))}),"."]}),d&&v.jsxs("li",{children:["This short URL will not accept visits after ",v.jsx("b",{className:"whitespace-nowrap",children:Rh(_i(d))}),"."]})]})})]}):m},hf=({className:e,...t})=>v.jsx("button",{type:"button",className:Ne("rounded-sm focus-ring cursor-pointer",e),...t}),Lve=e=>!!e.onClose,Dve=e=>!!e.onClick,XC=e=>{const{text:t,children:n,className:r,colorGenerator:i}=e,a=Dve(e),s=Lve(e),u=a?hf:"span",d=T.useMemo(()=>i.stylesForKey(t),[t,i]);return v.jsxs(u,{className:Ne("inline-flex items-center gap-1","font-bold [&]:rounded-md",{"text-sm px-1.5 py-0.5":!s,"py-1 px-2":s,"cursor-pointer":a},r),style:d,onClick:a?e.onClick:void 0,"data-testid":"tag",children:[n??t,s&&v.jsx(hf,{"aria-label":`Remove ${t}`,className:"p-0 text-lg leading-5.5",onClick:e.onClose,children:v.jsx(Ye,{icon:ew,size:"sm"})})]})},kve=({tags:e,onTagClick:t,colorGenerator:n})=>e.length===0?v.jsx("i",{className:"whitespace-nowrap",children:v.jsx("small",{children:"No tags"})}):v.jsx("div",{className:"inline-flex flex-wrap gap-1 items-center",children:e.map(r=>v.jsx(XC,{text:r,colorGenerator:n,onClick:()=>t?.(r)},r))}),wI=({shortUrl:e,onTagClick:t})=>{const{ShortUrlsRowMenu:n,ColorGenerator:r,useTimeoutToggle:i}=Pn(wI),[a,s]=i({initialValue:!1,delay:500}),u=T.useRef(!0),[{excludeBots:d}]=Fy(),f=Dn("visits"),m=d??f?.excludeBots;return T.useEffect(()=>{u.current||s(),u.current=!1},[e.visitsSummary?.total,e.visitsSummary?.nonBots,e.visitsCount,s]),v.jsxs(Ke.Row,{className:"relative",children:[v.jsx(Ke.Cell,{className:"whitespace-nowrap",columnName:"Created at:",children:v.jsx(Av,{date:e.dateCreated})}),v.jsx(Ke.Cell,{columnName:"Short URL:",children:v.jsxs("span",{className:"lg:whitespace-nowrap inline-flex items-center gap-x-2",children:[v.jsx(Si,{href:e.shortUrl,className:"max-md:break-all lg:truncate max-w-72"}),v.jsx(dN,{text:e.shortUrl})]})}),v.jsx(Ke.Cell,{className:"break-all",columnName:`${e.title?"Title":"Long URL"}:`,children:v.jsx(Si,{href:e.longUrl,children:e.title??e.longUrl})}),e.title&&v.jsx(Ke.Cell,{className:"break-all [&]:lg:hidden",columnName:"Long URL:",children:v.jsx(Si,{href:e.longUrl})}),v.jsx(Ke.Cell,{columnName:"Tags:",children:v.jsx(kve,{tags:e.tags,colorGenerator:r,onTagClick:t})}),v.jsx(Ke.Cell,{className:"lg:text-right",columnName:"Visits:",children:v.jsx(xI,{visitsCount:(m?e.visitsSummary?.nonBots:e.visitsSummary?.total)??e.visitsCount??0,shortUrl:e,active:a,asLink:!0})}),v.jsx(Ke.Cell,{columnName:"Status:",className:"max-lg:border-none",children:v.jsxs("div",{className:"inline-flex gap-2",children:[v.jsx(Nve,{shortUrl:e}),e.hasRedirectRules&&v.jsx(_I,{asLink:!0,shortUrl:e,suffix:"redirect-rules",title:"This short URL has dynamic redirect rules",children:v.jsx(Ye,{icon:BR})})]})}),v.jsx(Ke.Cell,{className:"text-right max-lg:absolute max-lg:top-1 max-lg:right-1 max-lg:p-0",children:v.jsx(n,{shortUrl:e})})]})},Ive=Mn(wI,["ShortUrlsRowMenu","ColorGenerator","useTimeoutToggle"]),SI=T.forwardRef(({name:e,color:t,onChange:n,className:r},i)=>v.jsxs("div",{className:Ne("relative rounded w-12",r),style:{backgroundColor:t,borderColor:t},children:[v.jsx(Qr,{className:"w-full h-full cursor-pointer relative z-1 opacity-0",type:"color",value:t,onChange:a=>n(a.target.value),ref:i,name:e,"aria-label":e.replace("-"," ")}),v.jsx(Ye,{icon:T$,className:"absolute top-1/2 left-1/2 -translate-1/2",style:{color:ww(t.substring(1))?"#000":"#fff"}})]})),A5=({color:e,onChange:t,name:n})=>{const r=T.useRef(null);return v.jsxs("div",{className:"flex",children:[v.jsx(SI,{name:`${n}-picker`,color:e,onChange:t,className:"rounded-r-none",ref:r}),v.jsx(Qr,{readOnly:!0,value:e,onClick:()=>r.current?.click(),"aria-label":n,"data-testid":"text-input",className:"grow rounded-l-none"})]})};function Uve(e){switch(e){case"L":return 1;case"M":return .5;default:return .3}}const Bve=T.forwardRef(({data:e,color:t="#000000",bgColor:n="#ffffff",margin:r=0,errorCorrection:i="L",size:a=300,drawType:s="canvas",logo:u},d)=>{const f=T.useRef(null),m=T.useRef(new aJ),p=T.useCallback((_,w)=>m.current.download({name:_,extension:w}),[]),b=T.useCallback(_=>new Promise((w,x)=>{const E=m.current.getRawData(_),A=new FileReader;A.onload=()=>{const{result:j}=A;j&&w(j.toString())},A.onerror=x,E.then(j=>{j instanceof Blob?A.readAsDataURL(j):x(new Error("QR code image blob not available"))})}),[]);return T.useImperativeHandle(d,()=>({download:p,getDataUri:b}),[p,b]),T.useEffect(()=>{const _=f.current;m.current.append(_)},[]),T.useEffect(()=>{m.current.update({type:s,data:e,width:a+r,height:a+r,margin:r,dotsOptions:{color:t},backgroundOptions:{color:n},qrOptions:{errorCorrectionLevel:i},imageOptions:{margin:5,imageSize:Uve(i)},image:u})},[n,t,e,s,i,u,r,a]),v.jsxs(v.Fragment,{children:[v.jsx("style",{dangerouslySetInnerHTML:{__html:"#qr-code-canvas-container canvas { max-width: 100% }"}}),v.jsx("div",{ref:f,id:"qr-code-canvas-container"})]})}),zve=async({text:e,onCopy:t},n=navigator)=>{const r=typeof e=="string"?e:await e;return n.clipboard?.writeText(r).then(()=>t?.({text:r,copied:!0})).catch(()=>t?.({text:r,copied:!1}))},T5=({name:e,value:t,step:n,min:r,max:i,onChange:a})=>{const s=T.useId();return v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsxs("label",{htmlFor:s,className:"capitalize",children:[e,": ",t,"px"]}),v.jsx("input",{id:s,type:"range",value:t,step:n,min:r,max:i,onChange:u=>a(Number(u.target.value))})]})},Fve=({shortUrl:{shortUrl:e,shortCode:t},onClose:n,isOpen:r,qrDrawType:i})=>{const a=Dn("qrCodes",Cf),[{size:s,margin:u,color:d,bgColor:f,errorCorrection:m,format:p},b]=T.useState(a),_=T.useCallback(X=>b(oe=>({...oe,...X})),[]),w=T.useRef(null),[x,E]=T.useState(),A=T.useCallback(X=>{const oe=X.target.files?.[0];oe&&E({url:URL.createObjectURL(new Blob([oe],{type:oe.type})),name:oe.name})},[]),j=T.useRef(null),O=T.useCallback(()=>j.current?.download(`${t}-qr-code`,p),[p,t]),[N,U]=Wv({}),V=T.useCallback(()=>{const X=j.current?.getDataUri(p)??"";return zve({text:X,onCopy:U})},[p,U]),Z=T.useCallback(()=>{b(a),E(void 0)},[a]);return v.jsx(Ja,{size:"lg",open:r,onClose:n,title:v.jsxs(v.Fragment,{children:["QR code for ",v.jsx(Si,{href:e})]}),onClosed:Z,children:v.jsxs("div",{className:"flex flex-col-reverse lg:flex-row gap-4",children:[v.jsx("div",{className:"grow flex items-center justify-around",children:v.jsxs("div",{className:"flex flex-col gap-1 items-center","data-testid":"qr-code-container",children:[v.jsx(Bve,{ref:j,data:e,size:s,margin:u,errorCorrection:m,color:d,bgColor:f,logo:x?.url,drawType:i}),v.jsxs("div",{className:"italic",children:["Preview (",s+u,"x",s+u,")"]})]})}),v.jsxs("div",{className:"flex flex-col gap-2 lg:w-64",children:[v.jsx(T5,{name:"size",value:s,onChange:X=>_({size:X}),step:10,min:50,max:1e3}),v.jsx(T5,{name:"margin",value:u,onChange:X=>_({margin:X}),step:1,min:0,max:100}),v.jsx(sL,{errorCorrection:m,onChange:X=>_({errorCorrection:X})}),v.jsx(A5,{name:"color",color:d,onChange:X=>_({color:X})}),v.jsx(A5,{name:"background",color:f,onChange:X=>_({bgColor:X})}),!x&&v.jsxs(v.Fragment,{children:[v.jsxs(Mt,{variant:"secondary",onClick:()=>w.current?.click(),children:[v.jsx(Ye,{icon:mW}),"Select logo"]}),v.jsx("input",{ref:w,type:"file",accept:"image/*","aria-hidden":!0,tabIndex:-1,className:"hidden",onChange:A,"data-testid":"logo-input"})]}),x&&v.jsxs(Mt,{variant:"secondary",onClick:()=>E(void 0),children:[v.jsx(Ye,{icon:Iv}),v.jsxs("div",{className:"truncate",children:["Clear logo (",x.name,")"]})]}),v.jsx("div",{className:"my-auto",children:v.jsx("hr",{className:"my-2"})}),v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(lL,{format:p,onChange:X=>_({format:X})}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(Mt,{onClick:V,"aria-label":"Copy data URI",title:"Copy data URI",className:"h-full",children:v.jsx(Ye,{icon:N?Au:cN})}),v.jsxs(Mt,{solid:!0,onClick:O,className:"grow",children:["Download ",v.jsx(Ye,{icon:UR})]})]})]})]})]})})},CI=({shortUrl:e,deleteShortUrl:t,shortUrlDeleted:n})=>{const{DeleteShortUrlModal:r}=Pn(CI),{flag:i,setToTrue:a,setToFalse:s}=Sn(),{flag:u,setToTrue:d,setToFalse:f}=Sn(),m=ky(),p=Xi("shortUrlRedirectRules"),{confirmDeletions:b=!0}=Dn("shortUrlsList",{}),_=T.useCallback(async()=>{const E=await t(e);BC(E)||n(e)},[t,e,n]),w=as(),x=T.useCallback(E=>bI(w,e,E),[w,e]);return v.jsxs(v.Fragment,{children:[v.jsxs(an,{menuAlignment:"right",children:[v.jsxs(an.Item,{to:x("visits"),className:"gap-1.5",children:[v.jsx(Ye,{icon:nw})," Visit stats"]}),m&&v.jsxs(v.Fragment,{children:[v.jsxs(an.Item,{className:"gap-1.5",disabled:!m.canAddItemWithName(e.shortUrl),onClick:()=>m.addItemToCompare({name:e.shortUrl,query:HC(e)}),children:[v.jsx(Ye,{icon:kv})," Compare visits"]}),v.jsx(an.Separator,{})]}),v.jsxs(an.Item,{to:x("edit"),className:"gap-1.5",children:[v.jsx(Ye,{icon:J2})," Edit short URL"]}),p&&v.jsxs(an.Item,{to:x("redirect-rules"),className:"gap-1.5",children:[v.jsx(Ye,{icon:BR})," Manage redirect rules"]}),v.jsxs(an.Item,{onClick:a,className:"gap-1.5",children:[v.jsx(Ye,{icon:gV})," QR code"]}),v.jsx(an.Separator,{}),v.jsxs(an.Item,{className:"[&]:text-danger gap-1.5",onClick:b?d:_,children:[v.jsx(Ye,{icon:HR})," Delete short URL"]})]}),v.jsx(Fve,{shortUrl:e,isOpen:i,onClose:s}),v.jsx(r,{shortUrl:e,deleteShortUrl:t,shortUrlDeleted:n,isOpen:u,onClose:f})]})},$ve=Mn(CI,["DeleteShortUrlModal"]),EI="shlink/shortUrlCreation",O5={saving:!1,saved:!1,error:!1},Vve=e=>Yn(`${EI}/createShortUrl`,t=>e().createShortUrl(t)),Hve=e=>{const{reducer:t,actions:n}=Rt({name:EI,initialState:O5,reducers:{resetCreateShortUrl:()=>O5},extraReducers:i=>{i.addCase(e.pending,()=>({saving:!0,saved:!1,error:!1})),i.addCase(e.rejected,(a,{error:s})=>({saving:!1,saved:!1,error:!0,errorData:Ni(s)})),i.addCase(e.fulfilled,(a,{payload:s})=>({result:s,saving:!1,saved:!0,error:!1}))}}),{resetCreateShortUrl:r}=n;return{reducer:t,resetCreateShortUrl:r}},AI="shlink/shortUrlEdition",qve={saving:!1,saved:!1,error:!1},Gve=e=>Yn(`${AI}/editShortUrl`,({shortCode:t,domain:n,data:r})=>e().updateShortUrl({shortCode:t,domain:n},r)),Yve=e=>Rt({name:AI,initialState:qve,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:Ni(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({shortUrl:r,saving:!1,error:!1,saved:!0}))}}),j5="shlink/shortUrlsDetails",P5={loading:!1,error:!1},Wve=e=>{const t=Yn(`${j5}/getShortUrlsDetails`,async(r,{getState:i})=>{const{shortUrlsList:a}=i(),s=await Promise.all(r.map(async u=>{const{shortCode:d,domain:f}=u,m=a?.shortUrls?.data.find(p=>fh(p,d,f));return[u,m??await e().getShortUrl({shortCode:d,domain:f})]}));return new Map(s)}),{reducer:n}=Rt({name:j5,initialState:P5,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({loading:!0,error:!1})),r.addCase(t.rejected,(i,{error:a})=>({loading:!1,error:!0,errorData:Ni(a)})),r.addCase(t.fulfilled,(i,{payload:a})=>({...P5,shortUrls:a}))}});return{reducer:n,getShortUrlsDetails:t}},Kve=({domains:e,value:t,onChange:n})=>{const{flag:r,setToTrue:i,setToFalse:a}=Sn(),s=!t,u=T.useCallback(()=>{n(""),a()},[n,a]),d=T.useCallback(()=>{n(""),i()},[n,i]);return r?v.jsxs("div",{className:"flex",children:[v.jsx(Qr,{value:t??"",placeholder:"Domain",onChange:f=>n(f.target.value),className:"flex-grow rounded-r-none [&]:border-r-0"}),v.jsx(Mt,{variant:"secondary",type:"button",className:"rounded-l-none","aria-label":"Back to domains list",title:"Existing domains",onClick:u,children:v.jsx(Ye,{icon:uV})})]}):v.jsxs(Qe,{buttonContent:s?"Domain":`Domain: ${t}`,buttonClassName:Ne("w-full",{"text-placeholder":s}),children:[e.map(({domain:f,isDefault:m})=>v.jsxs(Qe.Item,{selected:(t===f||m)&&s,onClick:()=>n(f),className:"flex justify-between items-center",children:[f,m&&v.jsx(Ru,{children:"default"})]},f)),v.jsx(Qe.Separator,{}),v.jsx(Qe.Item,{onClick:d,children:v.jsx("i",{children:"New domain"})})]})},X_=({icon:e,className:t,...n})=>{const r=T.useRef(null);return v.jsxs("div",{className:"relative",children:[v.jsx(Qr,{className:Ne("pr-11",t),ref:r,...n}),v.jsx(Ye,{icon:e,className:"absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer",onClick:()=>r.current?.focus()})]})},Zve=({minDate:e,maxDate:t,value:n,onChange:r,withTime:i=!1,...a})=>{const s=T.useCallback(({target:d})=>{if(!d.value){r?.(null);return}r?.(_i(d.value))},[r]),u=T.useMemo(()=>i?Rh:sl,[i]);return v.jsx(Qr,{...a,type:i?"datetime-local":"date",value:u(n)??"",max:u(t)??void 0,min:u(e)??void 0,onChange:s})},Tv=({label:e,id:t,...n})=>{const r=T.useId();return v.jsxs(v.Fragment,{children:[v.jsxs("label",{htmlFor:t??r,className:"mb-1",children:[e,":"]}),v.jsx(Zve,{id:t??r,...n})]})},Xve=({className:e,placement:t,children:n})=>{const{anchor:r,tooltip:i}=eo({placement:t});return v.jsxs(v.Fragment,{children:[v.jsx("span",{className:e,...r,"data-placement":t,"data-testid":"tooltip-anchor",children:v.jsx(Ye,{icon:Uv})}),v.jsx(to,{...i,children:n})]})},Q_=({children:e,infoTooltip:t,checked:n,onChange:r})=>v.jsxs("div",{className:"flex items-center gap-x-2",children:[v.jsxs(wa,{className:"inline-flex items-center gap-x-1.5",children:[v.jsx(bw,{checked:n,onChange:r}),e]}),v.jsx(Xve,{placement:"right",children:t})]}),Qve=e=>v.jsx(Ja,{...e,title:"Info",size:"lg",children:v.jsxs("div",{className:"flex flex-col gap-y-2",children:[v.jsxs("p",{children:["When the ",v.jsx("b",{children:v.jsx("i",{children:'"Use existing URL if found"'})})," checkbox is checked, the server will return an existing short URL if it matches provided params."]}),v.jsx("p",{children:"These are the checks performed by Shlink in order to determine if an existing short URL should be returned:"}),v.jsxs("ul",{className:"list-disc pl-5",children:[v.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."}),v.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.",v.jsx("br",{}),"If the slug is being used by another long URL, an error will be returned."]}),v.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"})]})]})}),Jve=()=>{const{flag:e,setToFalse:t,setToTrue:n}=Sn();return v.jsxs(v.Fragment,{children:[v.jsx(hf,{title:"What does this mean?",onClick:n,children:v.jsx(Ye,{icon:Uv})}),v.jsx(Qve,{open:e,onClose:t})]})},ig=e=>typeof e=="string"?yl(e):e,eye=e=>"shortCodeLength"in e&&"customSlug"in e&&"domain"in e,TI=({basicMode:e=!1,saving:t,onSave:n,initialState:r,tagsList:i,domainsList:a})=>{const{TagsSelector:s}=Pn(TI),[u,d]=T.useState(r),f=eye(u),m=Xi("deviceLongUrls"),p=Xi("urlValidation"),b=p||f,_=T.useCallback(()=>d(r),[r]),w=T.useCallback((O,N)=>hu(O)?O:hu(N)?null:void 0,[]),x=T.useCallback((O,N)=>d(({deviceLongUrls:U={},...V})=>({...V,deviceLongUrls:{...U,[O]:w(N,r.deviceLongUrls?.[O])}})),[r.deviceLongUrls,w]),E=T.useCallback(O=>d(N=>({...N,tags:O})),[]),A=T.useCallback(async O=>(O.preventDefault(),n(u).then(N=>f&&!BC(N)&&_()).catch(()=>{})),[f,n,_,u]),j=T.useMemo(()=>v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsx(Qr,{size:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:u.longUrl,onChange:O=>d(N=>({...N,longUrl:O.target.value}))}),v.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[e&&f&&v.jsx("div",{className:"w-full lg:w-1/2",children:v.jsx(Qr,{size:"lg",placeholder:"Custom slug",value:u.customSlug??"",onChange:O=>d(N=>({...N,customSlug:O.target.value}))})}),v.jsx("div",{className:Ne("w-full",{"lg:w-1/2":e}),children:v.jsx(s,{tags:i.tags,selectedTags:u.tags??[],onChange:E})})]})]}),[s,e,E,f,u,i.tags]);return v.jsxs("form",{name:"shortUrlForm",onSubmit:A,className:"flex flex-col gap-4",children:[e&&j,!e&&v.jsxs(v.Fragment,{children:[v.jsxs("div",{children:[v.jsx("div",{className:Ne({"sm:w-1/2":m,"w-full":!m}),children:v.jsx(Pt,{title:"Main options",className:"card",children:j})}),m&&v.jsx("div",{className:"w-full sm:w-1/2",children:v.jsxs(Pt,{title:"Device-specific long URLs",bodyClassName:"flex flex-col gap-y-4",className:"card",children:[v.jsx(X_,{type:"url",icon:sJ,placeholder:"Android-specific redirection",value:u.deviceLongUrls?.android??"",onChange:({target:O})=>x("android",O.value)}),v.jsx(X_,{type:"url",icon:oJ,placeholder:"iOS-specific redirection",value:u.deviceLongUrls?.ios??"",onChange:({target:O})=>x("ios",O.value)}),v.jsx(X_,{type:"url",icon:fV,placeholder:"Desktop-specific redirection",value:u.deviceLongUrls?.desktop??"",onChange:({target:O})=>x("desktop",O.value)})]})})]}),v.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[v.jsx("div",{className:"w-full sm:w-1/2",children:v.jsxs(Pt,{title:"Customize the short URL",bodyClassName:"flex flex-col gap-4",className:"card h-full",children:[v.jsx(Qr,{placeholder:"Title",value:u.title??"",onChange:({target:O})=>d(N=>({...N,title:w(O.value,r.title)}))}),f&&v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[v.jsx("div",{className:"lg:w-1/2",children:v.jsx(Qr,{placeholder:"Custom slug",value:u.customSlug??"",onChange:O=>d(N=>({...N,customSlug:O.target.value})),disabled:hu(u.shortCodeLength)})}),v.jsx("div",{className:"lg:w-1/2",children:v.jsx(Qr,{type:"number",placeholder:"Short code length",value:u.shortCodeLength??"",onChange:O=>d(N=>({...N,shortCodeLength:O.target.value})),min:4,disabled:hu(u.customSlug)})})]}),v.jsx(Kve,{value:u.domain,onChange:O=>d(N=>({...N,domain:O})),domains:a.domains})]})]})}),v.jsx("div",{className:"w-full sm:w-1/2",children:v.jsxs(Pt,{title:"Limit access to the short URL",className:"card h-full",bodyClassName:"flex flex-col gap-y-4",children:[v.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[v.jsx("div",{className:"lg:w-1/2",children:v.jsx(Tv,{label:"Enabled since",withTime:!0,maxDate:u.validUntil?ig(u.validUntil):void 0,value:u.validSince?ig(u.validSince):null,onChange:O=>d(N=>({...N,validSince:Al(O)}))})}),v.jsx("div",{className:"lg:w-1/2",children:v.jsx(Tv,{label:"Enabled until",withTime:!0,minDate:u.validSince?ig(u.validSince):void 0,value:u.validUntil?ig(u.validUntil):null,onChange:O=>d(N=>({...N,validUntil:Al(O)}))})})]}),v.jsx(ti,{label:"Maximum visits allowed:",type:"number",min:1,placeholder:"25...",value:u.maxVisits??"",onChange:O=>d(N=>({...N,maxVisits:hu(O.target.value)?Number(O.target.value):null}))})]})})]}),v.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[b&&v.jsx("div",{className:"w-full sm:w-1/2",children:v.jsxs(Pt,{title:"Extra checks",className:"h-full",children:[p&&v.jsx(Q_,{infoTooltip:"If checked, Shlink will try to reach the long URL, failing in case it's not publicly accessible.",checked:u.validateUrl,onChange:O=>d(N=>({...N,validateUrl:O})),children:"Validate URL"}),f&&v.jsxs("p",{className:"inline-flex items-center gap-x-2",children:[v.jsxs(wa,{className:"inline-flex items-center gap-x-1.5",children:[v.jsx(bw,{checked:u.findIfExists,onChange:O=>d(N=>({...N,findIfExists:O}))}),"Use existing URL if found"]}),v.jsx(Jve,{})]})]})}),v.jsx("div",{className:Ne("w-full",{"sm:w-1/2":b}),children:v.jsxs(Pt,{title:"Configure behavior",children:[v.jsx(Q_,{infoTooltip:"This short URL will be included in the robots.txt for your Shlink instance, allowing web crawlers (like Google) to index it.",checked:u.crawlable,onChange:O=>d(N=>({...N,crawlable:O})),children:"Make it crawlable"}),v.jsx(Q_,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:u.forwardQuery,onChange:O=>d(N=>({...N,forwardQuery:O})),children:"Forward query params on redirect"})]})})]})]}),v.jsx("div",{className:"text-center",children:v.jsx(Mt,{type:"submit",inline:!0,solid:!0,disabled:t||!u.longUrl,className:"max-md:w-full",children:t?"Saving...":"Save"})})]})},tye=Mn(TI,["TagsSelector"]),nye=({startDate:e,endDate:t,disabled:n=!1,onStartDateChange:r,onEndDateChange:i})=>v.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-y-3 gap-x-4",children:[v.jsx("div",{className:"flex flex-col",children:v.jsx(Tv,{label:"Since",value:e,maxDate:t??void 0,disabled:n,onChange:r})}),v.jsx("div",{className:"flex flex-col",children:v.jsx(Tv,{label:"Until",value:t,minDate:e??void 0,disabled:n,onChange:a=>i(a&&nf(a))})})]}),Vy="all",OI={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days",[Vy]:void 0},jI=Object.keys(OI),rye=e=>!e||!e.startDate&&!e.endDate,Ov=e=>typeof e=="string"&&jI.includes(e),iye=jI.filter(e=>e!==Vy),M5=e=>e?_i(e):null,PI=(e,t)=>({startDate:M5(e),endDate:M5(t)}),aye=e=>{if(!(!e||rye(e)))return e.startDate&&!e.endDate?`Since ${sl(e.startDate)}`:!e.startDate&&e.endDate?`Until ${sl(e.endDate)}`:`${sl(e.startDate)} - ${sl(e.endDate)}`},R5=e=>{if(!(!e||e===Vy))return Ov(e)?OI[e]:aye(e)},Ki=e=>Lu(Yg(El(),e)),Bc=e=>({startDate:e,endDate:nf(El())}),MI=e=>[[()=>e==="today",()=>Bc(Lu(El()))],[()=>e==="yesterday",()=>({startDate:Ki(1),endDate:nf(Yg(El(),1))})],[()=>e==="last7Days",()=>Bc(Ki(7))],[()=>e==="last30Days",()=>Bc(Ki(30))],[()=>e==="last90Days",()=>Bc(Ki(90))],[()=>e==="last180Days",()=>Bc(Ki(180))],[()=>e==="last365Days",()=>Bc(Ki(365))]].find(([t])=>t())?.[1]()??{},oye=e=>{const t=_i(e);return[[()=>lu(Lu(El()),t),"today"],[()=>lu(Ki(1),t),"yesterday"],[()=>lu(Ki(7),t),"last7Days"],[()=>lu(Ki(30),t),"last30Days"],[()=>lu(Ki(90),t),"last90Days"],[()=>lu(Ki(180),t),"last180Days"],[()=>lu(Ki(365),t),"last365Days"]].find(([n])=>n())?.[1]??Vy},RI=e=>Ov(e)?MI(e):e,NI=e=>!!(e&&e.startDate),sye=({startDate:e,endDate:t})=>{const n=gL(nf(t??new Date),Lu(e))+1,r=Yg(Lu(e),n),i=Yg(nf(e),1);return{startDate:r,endDate:i}},lye=e=>{if(NI(e))return gL(e.endDate??new Date,e.startDate)},QC=({onDatesChange:e,dateRangeOrInterval:t,defaultText:n,disabled:r})=>{const i=T.useMemo(()=>R5(t)??n,[t,n]),[a,s]=T.useMemo(()=>Ov(t)?[void 0,t]:[t,void 0],[t]),u=T.useCallback(d=>{Ov(d)?e(MI(d),d):e(d)},[e]);return v.jsxs(Qe,{buttonDisabled:r,buttonContent:i,containerClassName:"[&]:block",buttonClassName:"w-full",children:[v.jsx(Qe.Item,{selected:s==="all",onClick:()=>u("all"),children:n}),v.jsx(Qe.Separator,{}),iye.map(d=>v.jsx(Qe.Item,{selected:s===d,onClick:()=>u(d),children:R5(d)},d)),v.jsx(Qe.Separator,{}),v.jsx(Qe.Misc,{children:v.jsx(nye,{...a,onStartDateChange:d=>u({...a,startDate:d}),onEndDateChange:d=>u({...a,endDate:d})})})]})},uye={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},cye=({onChange:e,selected:t={},domains:n})=>{const r=Xi("filterShortUrlsByDomain"),{excludeBots:i=!1,excludeMaxVisitsReached:a=!1,excludePastValidUntil:s=!1,domain:u}=t,d=T.useCallback(m=>e({...t,...m}),[e,t]),f=T.useCallback(m=>d({[m]:!t?.[m]}),[d,t]);return v.jsxs(Qe,{buttonContent:"Filters",buttonClassName:"w-full",menuAlignment:"right",children:[v.jsx(Qe.Title,{children:"Visits:"}),v.jsx(Qe.Item,{selected:i,onClick:()=>f("excludeBots"),children:"Ignore visits from bots"}),v.jsx(Qe.Separator,{}),v.jsx(Qe.Title,{children:"Short URLs:"}),v.jsx(Qe.Item,{selected:a,onClick:()=>f("excludeMaxVisitsReached"),children:"Exclude with visits reached"}),v.jsx(Qe.Item,{selected:s,onClick:()=>f("excludePastValidUntil"),children:"Exclude enabled in the past"}),r&&v.jsxs(v.Fragment,{children:[v.jsx(Qe.Separator,{}),v.jsxs(Qe.Title,{children:["Domain: ",!n&&v.jsx("i",{children:"loading..."})]}),n?.map(m=>{const p=m.isDefault?ff:m.domain,b=u===p;return v.jsx(Qe.Item,{selected:b,onClick:()=>d({domain:b?void 0:p}),children:m.domain},m.domain)})]}),v.jsx(Qe.Separator,{}),v.jsx(Qe.Item,{disabled:t.excludeBots===void 0&&t.excludeMaxVisitsReached===void 0&&t.excludePastValidUntil===void 0&&t.domain===void 0,onClick:()=>e({excludeBots:void 0,excludeMaxVisitsReached:void 0,excludePastValidUntil:void 0,domain:void 0}),className:"italic",children:"Reset to defaults"})]})},LI=({className:e,shortUrlsAmount:t,order:n,handleOrderBy:r,tagsList:i,domainsList:a})=>{const{ExportShortUrlsBtn:s,TagsSelector:u}=Pn(LI),[{search:d,tags:f,startDate:m,endDate:p,excludeBots:b,excludeMaxVisitsReached:_,excludePastValidUntil:w,domain:x,tagsMode:E="any"},A]=Fy(),j=Dn("visits"),[O,N]=T.useState(),U=T.useCallback(({startDate:J,endDate:ne},he)=>{A({startDate:Al(J)??void 0,endDate:Al(ne)??void 0}),N(he)},[A]),V=T.useCallback(J=>A({search:J||void 0}),[A]),Z=T.useCallback(J=>A({tags:J}),[A]),X=T.useCallback(()=>A({tagsMode:E==="any"?"all":"any"}),[E,A]),{anchor:oe,tooltip:ee}=eo({placement:"left"});return v.jsxs("div",{className:Ne("flex flex-col gap-y-4",e),children:[v.jsx(xf,{defaultValue:d,onChange:V}),v.jsxs("div",{className:"flex w-full",children:[v.jsx("div",{className:"flex-grow",children:v.jsx(u,{immutable:!0,placeholder:"With tags...",tags:i.tags,selectedTags:f,onChange:Z,containerClassName:Ne(f.length>1&&"[&]:rounded-r-none")})}),f.length>1&&v.jsxs(v.Fragment,{children:[v.jsx(Mt,{variant:"secondary",onClick:X,"aria-label":"Change tags mode",className:"[&]:border-l-none [&]:rounded-l-none",...oe,children:v.jsx(Ye,{className:"text-2xl",icon:E==="all"?FR:cV})}),v.jsx(to,{...ee,children:E==="all"?v.jsxs(v.Fragment,{children:["With ",v.jsx("b",{children:"all"})," the tags"]}):v.jsxs(v.Fragment,{children:["With ",v.jsx("b",{children:"any"})," of the tags"]})})]})]}),v.jsxs("div",{className:"flex flex-col lg:flex-row-reverse gap-y-4",children:[v.jsxs("div",{className:"lg:w-2/3 xl:w-1/2 inline-flex flex-col md:flex-row gap-4",children:[v.jsx("div",{className:"grow",children:v.jsx(QC,{defaultText:"All short URLs",dateRangeOrInterval:O??PI(m,p),onDatesChange:U})}),v.jsx(cye,{selected:{excludeBots:b??j?.excludeBots,excludeMaxVisitsReached:_,excludePastValidUntil:w,domain:x},onChange:A,domains:a.loading?void 0:a.domains})]}),v.jsxs("div",{className:"lg:w-1/3 xl:w-1/2 inline-flex gap-3",children:[v.jsx("div",{className:"max-lg:w-1/2 lg:hidden",children:v.jsx(Vh,{containerClassName:"[&]:block",buttonClassName:"w-full",prefixed:!1,items:uye,order:n,onChange:({field:J,dir:ne})=>r(J,ne)})}),v.jsx("div",{className:"max-lg:w-1/2",children:v.jsx(s,{amount:t})})]})]})]})},fye=Mn(LI,["ExportShortUrlsBtn","TagsSelector"]);function dh({currentOrder:e,field:t,className:n="ml-1"}){return!e.dir||e.field!==t?null:v.jsx(Ye,{icon:e.dir==="ASC"?eV:VR,className:n})}const dye=({paginator:e,currentQueryString:t=""})=>{const{currentPage:n=0,pagesCount:r=0}=e??{},i=as(),a=T.useCallback(s=>`${i}/list-short-urls/${s}${t}`,[t,i]);return r<=1?v.jsx("div",{"data-testid":"empty-gap",className:"pb-4"}):v.jsx("div",{"data-testid":"short-urls-paginator",className:Ne("sticky bottom-0 py-4 -mx-0.5","flex justify-around","bg-lm-primary dark:bg-dm-primary","border-t border-lm-border dark:border-dm-border"),children:v.jsx(Zv,{urlForPage:a,currentPage:n,pagesCount:r})})},hye={field:"dateCreated",dir:"DESC"},DI=Aa(({listShortUrls:e,shortUrlsList:t})=>{const{ShortUrlsTable:n,ShortUrlsFilteringBar:r}=Pn(DI),{page:i}=vf(),a=xr(),[{tags:s,search:u,startDate:d,endDate:f,orderBy:m,tagsMode:p,excludeBots:b,excludePastValidUntil:_,excludeMaxVisitsReached:w,domain:x},E]=Fy(),A=Lw(),[j,O]=T.useState(m??A.shortUrlsList?.defaultOrdering??hye),{pagination:N}=t?.shortUrls??{},U=T.useMemo(()=>b??A.visits?.excludeBots,[b,A.visits?.excludeBots]),V=T.useCallback((ne,he)=>{E({orderBy:{field:ne,dir:he}}),O({field:ne,dir:he})},[E]),Z=ne=>()=>V(ne,_N({currentOrderDir:j.dir,currentField:j.field,newField:ne})),X=ne=>v.jsx(dh,{currentOrder:j,field:ne}),oe=T.useCallback(ne=>E({tags:[...new Set([...s,ne])]}),[s,E]),ee=T.useCallback(({field:ne,dir:he})=>U&&ne==="visits"?{field:"nonBotVisits",dir:he}:{field:ne,dir:he},[U]),J=FC();return T.useEffect(()=>{e({page:i,searchTerm:u,tags:s,startDate:d,endDate:f,orderBy:ee(j),tagsMode:p,excludePastValidUntil:_,excludeMaxVisitsReached:w,domain:x})},[e,ee,i,u,s,d,f,j,p,_,w,x]),v.jsxs(zC,{value:J,children:[v.jsx(r,{shortUrlsAmount:t.shortUrls?.pagination.totalItems,order:j,handleOrderBy:V,className:"mb-4"}),v.jsx($C,{type:"short-urls",className:"mb-4"}),v.jsxs(Pt,{bodyClassName:Ne({"pb-0":!t.loading}),children:[v.jsx(n,{shortUrlsList:t,orderByColumn:Z,renderOrderIcon:X,onTagClick:oe}),!t.loading&&v.jsx(dye,{paginator:N,currentQueryString:a.search})]})]})},()=>[Ji.visits]),mye=Mn(DI,["ShortUrlsTable","ShortUrlsFilteringBar"]),J_=({children:e,danger:t})=>v.jsx(Ke.Row,{children:v.jsx(Ke.Cell,{colSpan:6,className:Ne("text-center",{"text-danger font-bold":t}),children:e})}),pye=({shortUrlsList:e,onTagClick:t,ShortUrlsRow:n})=>{const{error:r,loading:i,shortUrls:a}=e;return r?v.jsx(J_,{danger:!0,children:"Something went wrong while loading short URLs :("}):i?v.jsx(J_,{children:"Loading..."}):!a||a.data.length===0?v.jsx(J_,{children:"No results found"}):a?.data.map(s=>v.jsx(n,{shortUrl:s,onTagClick:t},s.shortUrl))},kI=({orderByColumn:e,renderOrderIcon:t,shortUrlsList:n,onTagClick:r})=>{const{ShortUrlsRow:i}=Pn(kI),a=Ne({"cursor-pointer":!!e});return v.jsx(Ke,{className:"mb-[-1px] w-full",header:v.jsxs(Ke.Row,{children:[v.jsxs(Ke.Cell,{className:a,onClick:e?.("dateCreated"),children:["Created at ",t?.("dateCreated")]}),v.jsxs(Ke.Cell,{className:a,onClick:e?.("shortCode"),children:["Short URL ",t?.("shortCode")]}),v.jsxs(Ke.Cell,{children:[v.jsxs(hf,{className:Ne("p-0",a),onClick:e?.("title"),children:["Title ",t?.("title")]}),"  /  ",v.jsxs(hf,{className:Ne("p-0",a),onClick:e?.("longUrl"),children:[v.jsx("span",{className:"whitespace-nowrap",children:"Long URL"})," ",t?.("longUrl")]})]}),v.jsx(Ke.Cell,{children:"Tags"}),v.jsx(Ke.Cell,{className:a,onClick:e?.("visits"),children:v.jsxs("span",{className:"whitespace-nowrap",children:["Visits ",t?.("visits")]})}),v.jsx(Ke.Cell,{colSpan:2,"aria-hidden":!0})]}),children:v.jsx(pye,{ShortUrlsRow:i,shortUrlsList:n,onTagClick:r})})},gye=Mn(kI,["ShortUrlsRow"]),vye=(e,t)=>{e.factory("ShortUrlsList",mye),e.decorator("ShortUrlsList",t(["mercureInfo","shortUrlsList"],["listShortUrls","createNewVisits","loadMercureInfo"])),e.factory("ShortUrlsTable",gye),e.factory("ShortUrlsRow",Ive),e.factory("ShortUrlsRowMenu",$ve),e.decorator("ShortUrlsRowMenu",t(null,["shortUrlDeleted","deleteShortUrl"])),e.factory("ShortUrlForm",tye),e.decorator("ShortUrlForm",t(["tagsList","domainsList"])),e.factory("CreateShortUrl",Tve),e.decorator("CreateShortUrl",t(["shortUrlCreation"],["createShortUrl","resetCreateShortUrl"])),e.factory("EditShortUrl",Ove),e.decorator("EditShortUrl",t(["shortUrlsDetails","shortUrlEdition"],["getShortUrlsDetails","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",()=>jve),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["resetDeleteShortUrl"])),e.factory("ExportShortUrlsBtn",Pve),e.factory("ShortUrlsFilteringBar",fye),e.decorator("ShortUrlsFilteringBar",t(["tagsList","domainsList"])),e.serviceFactory("shortUrlsListReducerCreator",oge,"listShortUrls","editShortUrl","createShortUrl"),e.serviceFactory("shortUrlsListReducer",n=>n.reducer,"shortUrlsListReducerCreator"),e.serviceFactory("shortUrlCreationReducerCreator",Hve,"createShortUrl"),e.serviceFactory("shortUrlCreationReducer",n=>n.reducer,"shortUrlCreationReducerCreator"),e.serviceFactory("shortUrlEditionReducerCreator",Yve,"editShortUrl"),e.serviceFactory("shortUrlEditionReducer",n=>n.reducer,"shortUrlEditionReducerCreator"),e.serviceFactory("shortUrlDeletionReducerCreator",rge,"deleteShortUrl"),e.serviceFactory("shortUrlDeletionReducer",n=>n.reducer,"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlsDetailsReducerCreator",Wve,"apiClientFactory"),e.serviceFactory("shortUrlsDetailsReducer",n=>n.reducer,"shortUrlsDetailsReducerCreator"),e.serviceFactory("listShortUrls",age,"apiClientFactory"),e.serviceFactory("createShortUrl",Vve,"apiClientFactory"),e.serviceFactory("resetCreateShortUrl",n=>n.resetCreateShortUrl,"shortUrlCreationReducerCreator"),e.serviceFactory("deleteShortUrl",nge,"apiClientFactory"),e.serviceFactory("resetDeleteShortUrl",n=>n.resetDeleteShortUrl,"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDeleted",()=>K7),e.serviceFactory("getShortUrlsDetails",n=>n.getShortUrlsDetails,"shortUrlsDetailsReducerCreator"),e.serviceFactory("editShortUrl",Gve,"apiClientFactory")},yye=({tag:e,onClose:t,isOpen:n,deleteTag:r,tagDelete:i,tagDeleted:a})=>{const{deleting:s,error:u,deleted:d,errorData:f}=i;return v.jsxs(Ja,{title:"Delete tag",variant:"danger",open:n,onClose:t,onClosed:()=>d&&a(e),onConfirm:async()=>{await r(e),t()},confirmText:s?"Deleting tag...":"Delete tag",confirmDisabled:s,children:["Are you sure you want to delete tag ",v.jsx("b",{children:e}),"?",u&&v.jsx(zr,{variant:"error",size:"sm",className:"mt-2",children:v.jsx(Za,{errorData:f,fallbackMessage:"Something went wrong while deleting the tag :("})})]})},II=({tag:e,editTag:t,onClose:n,tagEdited:r,isOpen:i,tagEdit:a})=>{const{ColorGenerator:s}=Pn(II),[u,d]=T.useState(e),[f,m]=T.useState(s.getColorForKey(e)),{editing:p,error:b,edited:_,errorData:w}=a,x=T.useCallback(async()=>{await t({oldName:e,newName:u,color:f}),n()},[f,t,u,n,e]),E=T.useCallback(()=>_&&r({oldName:e,newName:u,color:f}),[f,_,u,e,r]);return v.jsxs(Ja,{title:"Edit tag",open:i,onClose:n,onClosed:E,onConfirm:x,confirmText:p?"Saving...":"Save",confirmDisabled:p,children:[v.jsxs("div",{className:"flex",children:[v.jsx(SI,{color:f,onChange:m,className:"rounded-r-none",name:"tag-color"}),v.jsx(Qr,{className:"grow [&]:rounded-l-none",value:u,placeholder:"Tag",required:!0,onChange:({target:A})=>d(A.value)})]}),b&&v.jsx(zr,{variant:"error",size:"sm",className:"mt-2",children:v.jsx(Za,{errorData:w,fallbackMessage:"Something went wrong while editing the tag :("})})]})},bye=Mn(II,["ColorGenerator"]),UI=({onChange:e,placeholder:t,...n})=>{const{ColorGenerator:r}=Pn(UI),i=Dn("shortUrlCreation")?.tagFilteringMode??"startsWith";return v.jsx(UW,{...n,onTagsChange:e,getColorForTag:a=>r.getColorForKey(a),size:"lg",placeholder:t??"Add tags to the URL",searchMode:i})},_ye=Mn(UI,["ColorGenerator"]),M2="shlink/tagDelete",xye={deleting:!1,deleted:!1,error:!1},BI=fn(`${M2}/tagDeleted`),wye=e=>{const t=Yn(`${M2}/deleteTag`,async r=>{await e().deleteTags([r])}),{reducer:n}=Rt({name:M2,initialState:xye,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({deleting:!0,deleted:!1,error:!1})),r.addCase(t.rejected,(i,{error:a})=>({deleting:!1,deleted:!1,error:!0,errorData:Ni(a)})),r.addCase(t.fulfilled,()=>({deleting:!1,deleted:!0,error:!1}))}});return{reducer:n,deleteTag:t}},JC="shlink/tagEdit",Sye={editing:!1,edited:!1,error:!1},zI=fn(`${JC}/tagEdited`),Cye=(e,t)=>Yn(`${JC}/editTag`,async({oldName:n,newName:r,color:i})=>(await e().editTag({oldName:n,newName:r}),t.setColorForKey(r,i),{oldName:n,newName:r,color:i})),Eye=e=>Rt({name:JC,initialState:Sye,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:Ni(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>{const{oldName:i,newName:a}=r;return{oldName:i,newName:a,editing:!1,edited:!0,error:!1}})}}),e3="shlink/tagsList",ex={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},N5=(e,t)=>n=>n===e?t:n,L5=(e,t)=>e.filter(n=>n!==t),Aye=(e,t)=>e.reduce((n,[r,i])=>{if(!n[r])return n;const{bots:a,nonBots:s}=i,u=n[r];return{...n,[r]:{...u,visitsSummary:u.visitsSummary&&{total:u.visitsSummary.total+a+s,bots:u.visitsSummary.bots+a,nonBots:u.visitsSummary.nonBots+s},visitsCount:(u.visitsCount??0)+a+s}}},{...t}),Tye=e=>Object.entries(e.reduce((t,{shortUrl:n,visit:r})=>(n?.tags.forEach(i=>{t[i]||(t[i]={bots:0,nonBots:0}),r.potentialBot?t[i].bots+=1:t[i].nonBots+=1}),t),{})),Oye=e=>Yn(`${e3}/listTags`,async()=>{const{data:t}=await e().tagsStats(),n=t.reduce((r,{tag:i,...a})=>(r[i]=a,r),{});return{tags:Object.keys(n),stats:n}}),FI=fn(`${e3}/filterTags`),jye=(e,t)=>Rt({name:e3,initialState:ex,reducers:{},extraReducers:n=>{n.addCase(FI,(r,{payload:i})=>({...r,filteredTags:r.tags.filter(a=>a.toLowerCase().match(i.toLowerCase()))})),n.addCase(e.pending,r=>({...r,loading:!0,error:!1})),n.addCase(e.rejected,(r,{error:i})=>({...ex,error:!0,errorData:Ni(i)})),n.addCase(e.fulfilled,(r,{payload:i})=>({...ex,stats:i.stats,tags:i.tags,filteredTags:i.tags})),n.addCase(BI,({tags:r,filteredTags:i,...a},{payload:s})=>({...a,tags:L5(r,s),filteredTags:L5(i,s)})),n.addCase(zI,({tags:r,filteredTags:i,stats:a,...s},{payload:u})=>({...s,stats:{...a,[u.newName]:a[u.oldName]},tags:r.map(N5(u.oldName,u.newName)).sort(),filteredTags:i.map(N5(u.oldName,u.newName)).sort()})),n.addCase(Lf,(r,{payload:i})=>({...r,stats:Aye(Tye(i.createdVisits),r.stats)})),n.addCase(t.fulfilled,({tags:r,...i},{payload:a})=>({...i,tags:r.concat(a.tags.filter(s=>!r.includes(s)))}))}}),Pye={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},$I=Aa(({filterTags:e,tagsList:t})=>{const{TagsTable:n}=Pn($I),r=Lw(),[i,a]=T.useState(r.tags?.defaultOrdering??{}),s=T.useMemo(()=>{const d=t.filteredTags.map(f=>{const m=t.stats[f],p=(r.visits?.excludeBots?m?.visitsSummary?.nonBots:m?.visitsSummary?.total)??m?.visitsCount??0;return{tag:f,visits:p,shortUrls:m?.shortUrlsCount??0}});return xN(d,i)},[i,r.visits?.excludeBots,t.filteredTags,t.stats]),u=FC();return t.loading?v.jsx(Vo,{loading:!0}):t.error?v.jsx(zr,{variant:"error",children:v.jsx(Za,{errorData:t.errorData,fallbackMessage:"Error loading tags :("})}):v.jsx(zC,{value:u,children:v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsx(xf,{onChange:e}),v.jsx("div",{className:"flex flex-col lg:flex-row lg:justify-end",children:v.jsx("div",{className:"lg:w-1/2",children:v.jsx(Vh,{containerClassName:"[&]:block",buttonClassName:"w-full",items:Pye,order:i,onChange:a})})}),v.jsx($C,{type:"tags"}),v.jsx(n,{sortedTags:s,currentOrder:i,orderByColumn:d=>()=>a(Cw({currentField:i.field,currentOrderDir:i.dir,newField:d}))})]})})},()=>[Ji.visits]),Mye=Mn($I,["TagsTable"]),Rye=(e,t)=>{const n=r=>i=>{i.event.composedPath().some(({classList:a})=>a?.contains("visits-table"))||document.querySelector(".modal")||r()};return yJ({delta:40,onSwipedLeft:n(t),onSwipedRight:n(e)})},Nye=(e,t)=>{const[n,r]=T.useState(t),i=T.useCallback(a=>{const{location:s,history:u}=window,d=hN(s.search);d[e]=a,u.pushState(null,"",`${s.pathname}?${Sw(d)}`),r(a)},[e]);return[n,i]},t3=e=>{const t=wf();return T.useMemo(()=>t[e]?.split(",").filter(Boolean)??[],[e,t])},Lye=(e,t)=>{const n=T.useCallback(()=>t(`(max-width: ${e}px)`).matches,[t,e]),[r,i]=T.useState(n());return T.useEffect(()=>{const a=()=>i(n());return window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[n]),r},Dye=(e,t,n)=>{T.useEffect(()=>{if(!n)return()=>{};const r=new AbortController;return document.addEventListener("keydown",i=>i.key===e&&t(),{signal:r.signal}),()=>r.abort()},[n,t,e])},kye=20,VI=({sortedTags:e,orderByColumn:t,currentOrder:n})=>{const{TagsTableRow:r}=Pn(VI),i=T.useRef(!0),{page:a=1}=wf(),[s,u]=Nye("page",Number(a)),d=T.useCallback(_=>{u(_),scrollTo(0,0)},[u]),f=Wc(e,kye),m=f.length>1,p=f[s-1]??[];T.useEffect(()=>{i.current||d(1),i.current=!1},[d,e]);const b="cursor-pointer top-(--header-height) sticky-cell";return v.jsxs(Pt,{bodyClassName:m?"pb-1":"",children:[v.jsxs(Ke,{header:v.jsxs(Ke.Row,{children:[v.jsxs(Ke.Cell,{onClick:t("tag"),className:b,children:["Tag ",v.jsx(dh,{currentOrder:n,field:"tag"})]}),v.jsxs(Ke.Cell,{onClick:t("shortUrls"),className:`lg:text-right ${b}`,children:["Short URLs ",v.jsx(dh,{currentOrder:n,field:"shortUrls"})]}),v.jsxs(Ke.Cell,{onClick:t("visits"),className:`lg:text-right ${b}`,children:["Visits ",v.jsx(dh,{currentOrder:n,field:"visits"})]}),v.jsx(Ke.Cell,{className:b,children:v.jsx("span",{className:"sr-only",children:"Options"})})]}),children:[p.length===0&&v.jsx(Ke.Row,{children:v.jsx(Ke.Cell,{colSpan:4,className:"text-center",children:"No tags found"})}),p.map(_=>v.jsx(r,{tag:_},_.tag))]}),m&&v.jsx("div",{className:Ne("sticky bottom-0 py-4 -mx-0.5","flex justify-around","bg-lm-primary dark:bg-dm-primary","border-t border-lm-border dark:border-dm-border"),"data-testid":"tags-paginator",children:v.jsx(Zv,{pagesCount:f.length,currentPage:s,onPageChange:d})})]},s)},Iye=Mn(VI,["TagsTableRow"]),n3=({color:e,testId:t})=>v.jsx("div",{"data-testid":t,style:{backgroundColor:e},className:Ne("inline-block w-[20px] h-[20px] rounded-full","align-[-4px] mr-1.5")}),Uye=({tag:e,colorGenerator:t})=>v.jsx(n3,{color:t.getColorForKey(e)}),HI=({tag:e})=>{const{DeleteTagConfirmModal:t,EditTagModal:n,ColorGenerator:r}=Pn(HI),{flag:i,setToFalse:a,setToTrue:s}=Sn(),{flag:u,setToFalse:d,setToTrue:f}=Sn(),m=as(),p=ky();return v.jsxs(Ke.Row,{className:"max-lg:relative",children:[v.jsxs(Ke.Cell,{columnName:"Tag",children:[v.jsx(Uye,{tag:e.tag,colorGenerator:r})," ",e.tag]}),v.jsx(Ke.Cell,{className:"lg:text-right",columnName:"Short URLs",children:v.jsx(Mr,{to:`${m}/list-short-urls/1?tags=${encodeURIComponent(e.tag)}`,children:On(e.shortUrls)})}),v.jsx(Ke.Cell,{className:"lg:text-right",columnName:"Visits",children:v.jsx(Mr,{to:`${m}/tag/${e.tag}/visits`,children:On(e.visits)})}),v.jsx(Ke.Cell,{className:"lg:text-right max-lg:absolute max-lg:top-1.25 max-lg:right-0 max-lg:p-0",children:v.jsxs(an,{menuAlignment:"right",children:[v.jsxs(an.Item,{onClick:f,className:"gap-1.5",children:[v.jsx(Ye,{icon:zR})," Edit"]}),v.jsxs(an.Item,{className:"gap-1.5",disabled:!p||!p.canAddItemWithName(e.tag),onClick:()=>p?.addItemToCompare({name:e.tag,query:e.tag,style:r.stylesForKey(e.tag)}),children:[v.jsx(Ye,{icon:kv})," Compare visits"]}),v.jsx(an.Separator,{}),v.jsxs(an.Item,{className:"[&]:text-danger gap-1.5",onClick:s,children:[v.jsx(Ye,{icon:j$})," Delete tag"]})]})}),v.jsx(n,{tag:e.tag,onClose:d,isOpen:u}),v.jsx(t,{tag:e.tag,onClose:a,isOpen:i})]})},Bye=Mn(HI,["DeleteTagConfirmModal","EditTagModal","ColorGenerator"]),zye=(e,t)=>{e.factory("TagsSelector",_ye),e.serviceFactory("DeleteTagConfirmModal",()=>yye),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.factory("EditTagModal",bye),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.factory("TagsTableRow",Bye),e.factory("TagsTable",Iye),e.factory("TagsList",Mye),e.decorator("TagsList",t(["tagsList","mercureInfo"],["filterTags","createNewVisits","loadMercureInfo"])),e.serviceFactory("tagEditReducerCreator",Eye,"editTag"),e.serviceFactory("tagEditReducer",n=>n.reducer,"tagEditReducerCreator"),e.serviceFactory("tagDeleteReducerCreator",wye,"apiClientFactory"),e.serviceFactory("tagDeleteReducer",n=>n.reducer,"tagDeleteReducerCreator"),e.serviceFactory("tagsListReducerCreator",jye,"listTags","createShortUrl"),e.serviceFactory("tagsListReducer",n=>n.reducer,"tagsListReducerCreator"),e.serviceFactory("listTags",Oye,"apiClientFactory"),e.serviceFactory("filterTags",()=>FI),e.serviceFactory("deleteTag",n=>n.deleteTag,"tagDeleteReducerCreator"),e.serviceFactory("tagDeleted",()=>BI),e.serviceFactory("editTag",Cye,"apiClientFactory","ColorGenerator"),e.serviceFactory("tagEdited",()=>zI)},Fye=new SL,$ye=e=>Fye.parse(e),Vye=6,D5="0123456789ABCDEF";function Hye(){return`#${Nw(Vye,()=>D5[Math.floor(Math.random()*D5.length)]).join("")}`}const k5=e=>e.toLowerCase().trim();class qye{constructor(t){this.storage=t,this.colors=this.storage?.getTagColors()??{},this.lights={}}colors;lights;getColorForKey(t){const n=k5(t);return this.colors[n]||this.setColorForKey(n,Hye())}setColorForKey(t,n){const r=k5(t);return this.colors[r]=n,this.storage?.storeTagColors(this.colors),n}stylesForKey(t){const n=this.getColorForKey(t);return{backgroundColor:n,color:this.isLightColor(n)?"#222":"#fff"}}isLightColor(t){const n=t.substring(1);return this.lights[n]===void 0&&(this.lights[n]=ww(n)),this.lights[n]}}const qI=({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)},Gye=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);qI(e,i,n)};class Yye{constructor(t,n){this.fetch=t,this.window=n}async saveImage(t,n){const r=await this.fetch(t).then(a=>a.blob()),i=URL.createObjectURL(r);qI(this.window,i,n)}}class Wye{constructor(t,n){this.window=t,this.jsonToCsv=n}exportVisits=(t,n)=>{n.length&&this.exportCsv(t,n)};exportShortUrls=t=>{t.length&&this.exportCsv("short_urls.csv",t)};exportCsv=(t,n)=>{const r=this.jsonToCsv(n);Gye(this.window,r,t)}}function Kye(e){e.constant("window",window),e.constant("fetch",window.fetch.bind(window)),e.service("ImageDownloader",Yye,"fetch","window"),e.service("ColorGenerator",qye,"TagColorsStorage"),e.constant("jsonToCsv",$ye),e.service("ReportExporter",Wye,"window","jsonToCsv"),e.serviceFactory("useTimeoutToggle",()=>Wv)}const lm=({visits:e,shortUrl:t,children:n,title:r})=>v.jsx("header",{children:v.jsxs(Pt,{children:[v.jsxs("h2",{className:"flex justify-between items-center",children:[v.jsx($y,{}),v.jsx("span",{className:"text-center hidden sm:block",children:v.jsx("small",{children:r})}),v.jsxs("span",{className:Ne("px-3 py-1.5 rounded-md ml-3","font-bold text-white text-2xl","bg-lm-main dark:bg-dm-main"),"data-testid":"badge",children:["Visits:"," ",v.jsx(xI,{visitsCount:e.length,shortUrl:t})]})]}),v.jsx("h3",{className:"text-center block sm:hidden mt-3",children:v.jsx("small",{children:r})}),n&&v.jsx("div",{className:"md:mt-3",children:n})]})}),r3=({children:e,className:t})=>v.jsx("div",{className:Ne("flex justify-between items-center",t),children:e}),GI=({title:e,footer:t,children:n})=>v.jsxs(un,{role:"document",children:[v.jsx(un.Header,{children:e}),v.jsx(un.Body,{children:n}),t&&v.jsx(un.Footer,{className:"sticky bottom-0",children:t})]}),YI=T.createContext(null),{Provider:k_e}=YI,i3=e=>{const t=T.useContext(YI)??void 0,n=T.useMemo(()=>t?{}:{width:"100%",height:e},[e,t]);return{ChartWrapper:t?T.Fragment:Wle,dimensions:t,wrapperDimensions:n}},WI={color:"white",background:"rgb(0 0 0 / .9)",border:"none",borderRadius:"5px"},Zye={marginBottom:"5px",fontWeight:"bold"},KI={contentStyle:WI,labelStyle:Zye,itemStyle:{padding:0}},I5=["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],ZI=e=>I5[e%I5.length],jv=()=>Qo()?"#46e587":"#1DAA58",Xye=()=>Qo()?"rgba(70, 229, 135, 0.4)":"rgba(29, 170, 88, 0.4)",Qye=({chartData:e,showNumbers:t})=>v.jsx("ul",{className:"space-y-1",children:e.map(({name:n,color:r,value:i},a)=>v.jsxs("li",{className:"flex items-center",children:[v.jsx(n3,{color:r,testId:`color-bullet-${a}`}),v.jsxs("small",{className:"truncate grow","data-testid":`name-${a}`,children:[n,t&&v.jsxs("b",{children:[" (",On(i),")"]})]})]},n))}),U5=e=>T.useMemo(()=>Object.entries(e).map(([t,n],r)=>({name:t,value:n,color:ZI(r)})),[e]),Jye=({stats:e,prevStats:t,showNumbersInLegend:n})=>{const r=U5(e),i=U5(t),a=i.length>0,s=Qo()?_K:bK,{ChartWrapper:u,dimensions:d,wrapperDimensions:f}=i3(300);return v.jsxs("div",{className:"flex flex-col md:flex-row md:items-center gap-y-4",children:[v.jsx("div",{className:"md:flex-7",children:v.jsx("div",{style:f,children:v.jsx(u,{children:v.jsxs(ipe,{...d,children:[v.jsx(cC,{formatter:On,contentStyle:WI,itemStyle:{color:"white"}}),v.jsx(b2,{data:r,dataKey:"value",nameKey:"name",startAngle:360,endAngle:0,outerRadius:"100%",innerRadius:a?"65%":"50%",animationBegin:0,children:r.map((m,p)=>v.jsx(ul,{fill:m.color,stroke:s},`${m.name}-${p}`))}),a&&v.jsx(b2,{data:i,dataKey:"value",nameKey:"name",startAngle:360,endAngle:0,outerRadius:"55%",innerRadius:"20%",animationBegin:0,stroke:s,fill:jv()})]})})})}),v.jsx("div",{className:"md:flex-5",children:v.jsx(Qye,{chartData:r,showNumbers:n})})]})},B5=({title:e,...t})=>{const{flag:n,toggle:r}=Sn();return v.jsx(GI,{title:v.jsxs(r3,{children:[e,v.jsx(qo,{checked:n,onChange:r,children:"Show numbers"})]}),children:v.jsx(Jye,{...t,showNumbersInLegend:n})})},e0e=T.forwardRef(({visitsGroups:e},t)=>{const n=T.useMemo(()=>Object.entries(e),[e]);return n.length===0?null:v.jsx("ul",{className:"mt-2 flex flex-wrap justify-center gap-4",ref:t,children:n.map(([r,i],a)=>v.jsxs("li",{className:"inline",children:[v.jsx(n3,{color:XI(i)}),v.jsxs("strong",{children:[r," (",On(i.length),")"]})]},`${r}${a}`))})}),t0e={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},n0e={hourly:e=>({hours:e}),daily:e=>({days:e}),weekly:e=>({weeks:e}),monthly:e=>({months:e})},r0e={hourly:PX,daily:ay,weekly:jX,monthly:Hg},a3={hourly:e=>qg(e,"yyyy-MM-dd HH:00"),daily:e=>sl(e),weekly(e){const t=sl(xh(e)),n=sl(UX(e));return`${t} - ${n}`},monthly:e=>qg(e,"yyyy-MM")},i0e=e=>{const t=Object.values(e).filter(a=>a.length>0);if(t.length===0)return"monthly";const n=new Date,r=t.map(a=>yl(a[a.length-1].date)),i=pL(r);return[[()=>ay(n,i)<=2,"hourly"],[()=>Hg(n,i)<=1,"daily"],[()=>Hg(n,i)<=6,"weekly"]].find(([a])=>a())?.[1]??"monthly"},a0e=(e,t)=>Object.keys(t).reduce((n,r)=>(n[r]=JN(t[r],i=>a3[e](yl(i.date))),n),{}),o0e=(e,t)=>t.reduce((n,r)=>{const i=a3[e](yl(r.date));return n[i]=n[i]??[],n[i].push(r),n},{}),s0e=(e,t)=>{const n=Object.values(t).filter(m=>m.length>0).map(m=>[...m].reverse());if(n.length===0)return[];const r=r0e[e],i=a3[e],a=n0e[e],s=n.flat(),u=yl(s[0].date),d=yl(s[s.length-1].date),f=r(d,u)||1;return[{formattedDate:i(u),date:u},...Nw(f,m=>{const p=SX(u,a(m));return{formattedDate:i(p),date:p}})]},XI=e=>{if(e.color)return e.color;const t={main:yh(),highlighted:Ox,previous:jv()};return e.type?t[e.type]:yh()},z5=(e,t)=>T.useMemo(()=>Object.values(e).find(n=>n.type===t)??[],[e,t]),l0e=(e,t,n)=>{const r=z5(e,"main"),i=z5(e,"highlighted"),a=T.useMemo(()=>n?o0e(t,r):{},[n,t,r]),s=T.useCallback((u,{payload:d})=>{const f=a[d.formattedDate]??[];n?.(f===i?[]:f)},[a,i,n]);return n&&{cursor:"pointer",onClick:s}},QI=({visitsGroups:e,setSelectedVisits:t,matchMedia:n,onDateRangeChange:r})=>{const[i,a]=T.useState(i0e(e)),s=Lye(767,n??window.matchMedia),u=T.useMemo(()=>{const J=a0e(i,e),ne=Object.keys(J);return s0e(i,e).map(({formattedDate:he,date:Q})=>({date:Q,formattedDate:he,...ne.reduce((se,W)=>(se[W]=J[W][he]??0,se),{})}))},[i,e]),d=l0e(e,i,t),{flag:f,toggle:m,setToFalse:p}=Sn(),b=T.useId(),_=T.useRef(null),[w,x]=T.useState(s?300:400);T.useLayoutEffect(()=>{if(!f)return x(s?300:400),()=>{};const J=new ResizeObserver(()=>{const ne=window.innerHeight,{height:he}=_.current.getBoundingClientRect();x(ne-he-98)});return J.observe(_.current),()=>J.disconnect()},[f,s,_]),Dye("Escape",p,f);const{ChartWrapper:E,dimensions:A,wrapperDimensions:j}=i3(w),[O,N]=T.useState(),[U,V]=T.useState(),Z=T.useCallback(()=>{N(void 0),V(void 0)},[]),X=T.useCallback((J,ne)=>{const he=J.activeIndex&&u[J.activeIndex];ne.button===0&&he&&N(he)},[u]),oe=T.useCallback(J=>{const ne=J.activeIndex&&u[J.activeIndex];O&&ne&&V(ne)},[u,O]),ee=T.useCallback(()=>{if(!O||!U){Z();return}const J=[O.date,U.date],ne=AX(J),he=pL(J);Z(),r({startDate:ne,endDate:he})},[r,Z,U,O]);return v.jsxs(un,{className:Ne({"fixed top-0 bottom-0 left-0 right-0 z-1030":f}),"data-testid":"line-chart-card",children:[v.jsxs(un.Header,{role:"heading","aria-level":4,className:"flex justify-between items-center",children:["Visits over time",v.jsxs("div",{className:"flex content-center gap-1",children:[v.jsx(Kv,{"aria-label":f?"Collapse":"Expand","aria-expanded":f,"aria-controls":b,size:"sm",onClick:m,children:v.jsx(Ye,{icon:f?rV:F$})}),v.jsx(Qe,{buttonContent:"Group by",buttonSize:"sm",buttonVariant:"link",buttonClassName:"[&]:p-0",menuAlignment:"right",menuClassName:"w-40",children:Object.entries(t0e).map(([J,ne])=>v.jsx(Qe.Item,{selected:i===J,onClick:()=>a(J),children:ne},J))})]})]}),v.jsxs(un.Body,{id:b,children:[v.jsx(E,{...j,children:v.jsxs(Wme,{className:"select-none",data:u,...A,onMouseDown:X,onMouseMove:oe,onMouseUp:ee,children:[v.jsx(Ly,{dataKey:"formattedDate"}),v.jsx(Dy,{tickFormatter:On,yAxisId:"1"}),v.jsx(cC,{formatter:On,...KI}),v.jsx(PC,{strokeOpacity:Qo()?.1:.9}),Object.entries(e).map(([J,ne])=>ne.length>0&&v.jsx(v7,{yAxisId:"1",dataKey:J,type:"monotone",stroke:XI(ne),strokeWidth:2,activeDot:ne.type==="previous"?void 0:d,strokeDasharray:ne.type==="previous"?"8 3":void 0},J)),O&&U&&v.jsx(TC,{yAxisId:"1",x1:O.formattedDate,x2:U.formattedDate})]})}),v.jsx(e0e,{visitsGroups:e,ref:_})]})]})},u0e=({ranges:e,value:t,setValue:n})=>v.jsxs(Qe,{buttonContent:"Paginate",buttonVariant:"link",buttonClassName:"[&]:p-0",buttonSize:"sm",menuAlignment:"right",children:[e.map(r=>v.jsxs(Qe.Item,{selected:r===t,onClick:()=>n(r),children:[v.jsx("b",{children:r})," items per page"]},r)),v.jsx(Qe.Separator,{}),v.jsx(Qe.Item,{disabled:t===1/0,onClick:()=>n(1/0),children:v.jsx("i",{children:"Clear pagination"})})]}),F5=e=>typeof e!="string"||e.startsWith("hidden_"),c0e=({stats:e,prevStats:t,highlightedStats:n,highlightedLabel:r,max:i,onClick:a})=>{const s=T.useMemo(()=>Object.entries(e).map(([p,b])=>{const _=n?.[p]??0,w=t?.[p]??0,x=F5(p);return{name:p,amount:Math.max(b,w),nonHighlightedAmount:x?null:b-_,highlightedAmount:x?null:_,prevAmount:x?null:w}}),[e,t,n]),u=T.useMemo(()=>{const p=s.reduce((b,{name:_})=>b>_.length?b:_.length,0);return Math.min(150,p*7)},[s]),{ChartWrapper:d,dimensions:f,wrapperDimensions:m}=i3(Math.max(300,s.length*(t?44:22)));return v.jsx(d,{...m,children:v.jsxs(ope,{layout:"vertical",data:s,barCategoryGap:3,...f,children:[v.jsx(Ly,{type:"number",dataKey:"amount",tickFormatter:On,domain:i?[0,i]:void 0}),v.jsx(Dy,{type:"category",dataKey:"name",width:u,interval:0,style:{fontSize:".8rem"},tickFormatter:p=>F5(p)?"":p}),v.jsx(PC,{strokeOpacity:Qo()?.05:.9}),v.jsx(cC,{filterNull:!0,...KI,formatter:(p,b)=>[On(p),b==="highlightedAmount"?r:b==="prevAmount"?"Previous period":n?"Non-selected":"Visits"]}),v.jsx(_g,{dataKey:"nonHighlightedAmount",stackId:"main",cursor:"pointer",fill:yh(),onClick:({name:p})=>p&&a?.(p),children:s.map(p=>v.jsx(ul,{fill:vK(),stroke:yh(),strokeWidth:2},p.name))}),n&&v.jsx(_g,{dataKey:"highlightedAmount",stackId:"main",cursor:"pointer",fill:Ox,onClick:({name:p})=>p&&a?.(p),children:s.map(p=>v.jsx(ul,{fill:yK,stroke:Ox,strokeWidth:2},p.name))}),t&&v.jsx(_g,{dataKey:"prevAmount",fill:jv(),children:s.map(p=>v.jsx(ul,{fill:Xye(),stroke:jv(),strokeWidth:2},p.name))})]})})},f0e=e=>typeof e=="string"?e.toLowerCase():e,d0e=([e])=>e,h0e=([,e])=>e,ag=({stats:e,prevStats:t,highlightedStats:n,title:r,sortingItems:i,extraHeaderContent:a,withPagination:s=!0,...u})=>{const[d,f]=T.useState({}),[m,p]=T.useState(1),[b,_]=T.useState(50),w=T.useCallback((X,oe)=>{const ee=Object.entries(X),J=d.field?VZ(ee,([ne,he])=>f0e(d.field===Object.keys(oe)[0]?ne:he)):ee;return!d.dir||d.dir==="ASC"?J:[...J].reverse()},[d.dir,d.field]),x=T.useCallback(X=>{const oe=X[m-1];if(m<X.length)return oe;const ee=X[0].length;return[...oe,...Nw(ee-oe.length,J=>[`hidden_${J}`,0])]},[m]),E=T.useCallback(X=>v.jsx(Zv,{currentPage:m,pagesCount:X,onPageChange:p}),[m]),A=T.useCallback((X,oe,ee,J)=>{const ne=w(X,oe),he=ne.map(d0e),Q=ee&&Object.entries({...YT(he,he.map(()=>0)),...ee}),se=J&&Object.entries({...YT(he,he.map(()=>0)),...J});if(ne.length<=b)return{currentPageStats:Object.fromEntries(ne),currentPageHighlightedStats:Q&&Object.fromEntries(Q),currentPagePrevStats:se&&Object.fromEntries(se)};const W=Wc(ne,b),B=Q&&Wc(Q,b),I=se&&Wc(se,b);return{currentPageStats:Object.fromEntries(x(W)),currentPageHighlightedStats:B&&Object.fromEntries(x(B)),currentPagePrevStats:I&&Object.fromEntries(x(I)),pagination:E(W.length),max:nK(Math.max(...ne.map(h0e)))}},[x,w,b,E]),{currentPageStats:j,currentPagePrevStats:O,currentPageHighlightedStats:N,pagination:U,max:V}=T.useMemo(()=>A(e,i,n&&Object.keys(n).length>0?n:void 0,t&&Object.keys(t).length>0?t:void 0),[A,n,t,i,e]),Z=T.useMemo(()=>Object.keys(j),[j]);return v.jsx(GI,{title:v.jsxs(r3,{children:[r,v.jsxs("div",{className:"flex items-center gap-3",children:[a?.(U?Z:void 0),s&&Object.keys(e).length>50&&v.jsx(u0e,{ranges:[50,100,200,500],value:b,setValue:X=>{_(X),p(1)}}),v.jsx(Vh,{buttonVariant:"link",menuAlignment:"right",buttonSize:"sm",buttonClassName:"[&]:p-0",items:i,order:d,onChange:X=>{f(X),p(1)}})]})]}),footer:U&&v.jsx("div",{className:"flex justify-around items-center","data-testid":"chart-paginator",children:U}),children:v.jsx(c0e,{stats:j,prevStats:O,highlightedStats:N,max:V,...u})})},o3=e=>e.type!==void 0,m0e=e=>e.type!==void 0,p0e=e=>{const t=eL(e,n=>o3(n.visit)?"orphanVisits":"nonOrphanVisits");return{orphanVisits:[],nonOrphanVisits:[],...t}},JI=(e,{shortCode:t,domain:n},{endDate:r,startDate:i}={})=>e.filter(({shortUrl:a,visit:s})=>a&&fh(a,t,n)&&sm(s.date,i,r)),e9=(e,t,{endDate:n,startDate:r}={})=>e.filter(({shortUrl:i,visit:a})=>i&&ege(i,t)&&sm(a.date,r,n)),t9=(e,t,{endDate:n,startDate:r}={})=>e.filter(({shortUrl:i,visit:a})=>i?.tags.includes(t)&&sm(a.date,r,n)),og=(e,t)=>JN(e,n=>n[t]),g0e=e=>{const t=(e?.startDate&&Al(e?.startDate))??void 0,n=(e?.endDate&&Al(e?.endDate))??void 0;return{startDate:t,endDate:n}},R2=({filter:e,dateRange:t})=>{const{startDate:n,endDate:r}=g0e(t),i=e?.excludeBots||void 0;return{startDate:n,endDate:r,excludeBots:i}},v0e=e=>NI(e.dateRange),y0e=({dateRange:e,...t})=>({...t,dateRange:sye(e)}),$5=(e,t)=>{if(!(!t||!(e in t)))return t[e]&&Al(t[e])||""},n9=()=>{const e=Qa(),t=wf(),{startDate:n,endDate:r,orphanVisitsType:i,excludeBots:a,loadPrevInterval:s,...u}=t,d=T.useMemo(()=>({dateRange:n!=null||r!=null?PI(n,r):void 0,visitsFilter:{orphanVisitsType:i,excludeBots:a!==void 0?a==="true":void 0},loadPrevInterval:s!==void 0?s==="true":void 0}),[r,a,s,i,n]),f=T.useCallback(m=>{const{dateRange:p,visitsFilter:b={},loadPrevInterval:_}=Sf(d,m),{excludeBots:w,orphanVisitsType:x}=b,E={...u,startDate:$5("startDate",p),endDate:$5("endDate",p),excludeBots:w===void 0?void 0:Ux(w),orphanVisitsType:x,loadPrevInterval:_===void 0?void 0:Ux(_)},A=Sw(E),j=A?`?${A}`:"";e(j,{replace:!0,relative:"route"})},[d,e,u]);return[d,f]},b0e=()=>v.jsx(Epe,{attribution:'&copy <a href="https://osm.org/copyright">OpenStreetMap</a> contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),_0e=e=>{if(e.length===0)return{};if(e.length>1)return{bounds:e.map(({latLong:n})=>n)};const[{latLong:t}]=e;return{zoom:10,center:t}},r9=({toggle:e,isOpen:t,title:n,locations:r=[]})=>v.jsx(Ja,{open:t,onClose:e,title:n,variant:"cover",children:v.jsxs(wpe,{..._0e(r),className:"h-full w-full",children:[v.jsx(b0e,{}),r.map(({cityName:i,latLong:a,count:s},u)=>v.jsx(Spe,{position:a,children:v.jsxs(Cpe,{children:[v.jsx("b",{children:s})," visit",s>1?"s":""," from ",v.jsx("b",{children:i})]})},u))]})}),x0e=({modalTitle:e,activeCities:t,locations:n=[]})=>{const{flag:r,setToTrue:i,setToFalse:a}=Sn(),[s,u]=T.useState([]),d=T.useCallback(f=>{u(f?n.filter(f):n),i()},[n,i]);return v.jsxs(v.Fragment,{children:[!t&&v.jsx(Kv,{onClick:()=>d(),"aria-label":"Show in map",title:"Show in map",className:"[&]:p-0",children:v.jsx(Ye,{icon:lx})}),t&&v.jsxs(Qe,{buttonContent:v.jsx(Ye,{icon:lx,title:"Show in map"}),buttonLabel:"Show in map",buttonVariant:"link",buttonClassName:"[&]:p-0",menuAlignment:"right",caretless:!0,children:[v.jsx(Qe.Item,{onClick:()=>d(),children:"Show all locations"}),v.jsx(Qe.Item,{onClick:()=>d(({cityName:f})=>t.includes(f)),children:"Show locations in current page"})]}),v.jsx(r9,{toggle:a,isOpen:r,title:e,locations:s})]})},i9=({onChange:e,selected:t={},isOrphanVisits:n=!1,withPrevInterval:r=!1,disabled:i})=>{const{orphanVisitsType:a,excludeBots:s=!1,loadPrevInterval:u=!1}=t,d=p=>({selected:a===p,onClick:()=>e({...t,orphanVisitsType:p===a?void 0:p})}),f=T.useCallback(()=>e({...t,excludeBots:!s}),[s,e,t]),m=T.useCallback(()=>e({...t,loadPrevInterval:!u}),[u,e,t]);return v.jsxs(Qe,{buttonDisabled:i,buttonContent:"More",buttonClassName:"w-full",menuAlignment:"right",children:[r&&v.jsxs(v.Fragment,{children:[v.jsx(Qe.Item,{selected:u,onClick:m,children:"Compare with previous period"}),v.jsx(Qe.Separator,{})]}),v.jsx(Qe.Title,{children:"Bots:"}),v.jsx(Qe.Item,{selected:s,onClick:f,children:"Exclude potential bots"}),n&&v.jsxs(v.Fragment,{children:[v.jsx(Qe.Separator,{}),v.jsx(Qe.Title,{children:"Orphan visits type:"}),v.jsx(Qe.Item,{...d("base_url"),children:"Base URL"}),v.jsx(Qe.Item,{...d("invalid_short_url"),children:"Invalid short URL"}),v.jsx(Qe.Item,{...d("regular_404"),children:"Regular 404"})]}),v.jsx(Qe.Separator,{}),v.jsx(Qe.Item,{disabled:t.excludeBots===void 0&&t.loadPrevInterval===void 0&&t.orphanVisitsType===void 0,onClick:()=>e({excludeBots:void 0,loadPrevInterval:void 0,orphanVisitsType:void 0}),children:v.jsx("i",{children:"Reset to defaults"})})]})},w0e=({className:e,value:t,...n})=>{const r=Math.min(100,Math.max(0,t));return v.jsx("div",{className:Ne("flex h-4 bg-gray-100 overflow-hidden rounded-md",e),...n,children:v.jsx("div",{role:"progressbar","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":r,className:"bg-lm-brand dark:bg-dm-brand transition-[width]",style:{width:`${r}%`}})})},a9=({info:e})=>{const{loading:t,errorData:n,progress:r}=e;return v.jsxs(v.Fragment,{children:[t&&r===null&&v.jsx(Vo,{loading:!0}),t&&r!==null&&v.jsxs(Vo,{loading:!0,children:["This is going to take a while... :S",v.jsx(w0e,{value:r,className:"mt-4"})]}),n&&v.jsx(zr,{variant:"error",children:v.jsx(Za,{errorData:n,fallbackMessage:"An error occurred while loading visits :("})})]})},xg=({children:e,showFallback:t})=>v.jsxs(v.Fragment,{children:[t&&v.jsx(Vo,{children:"There are no visits matching current filter"}),!t&&v.jsx(v.Fragment,{children:e})]}),S0e=({visitsDeletion:e,deleteVisits:t})=>{const{deleting:n}=e,{flag:r,setToTrue:i}=Sn();return v.jsx(Pt,{title:v.jsx("span",{className:"text-danger font-bold text-base",children:"Danger zone"}),children:v.jsxs(r3,{children:[v.jsxs("dl",{className:"m-0 mr-3",children:[v.jsx("dt",{children:"Delete visits."}),v.jsxs("dd",{className:"m-0",children:["This will delete ",v.jsx("b",{children:"all"})," visits, not only the ones matching current filter."]})]}),!r&&v.jsx(Mt,{variant:"danger",solid:!0,className:"whitespace-nowrap",onClick:i,children:"Delete visits"}),r&&v.jsxs(Mt,{solid:!0,variant:"danger",disabled:n,className:"whitespace-nowrap",onClick:t,autoFocus:!0,children:[!n&&v.jsx(v.Fragment,{children:"Click again to confirm"}),n&&v.jsx(v.Fragment,{children:"Deleting..."})]})]})})},sg="Others",C0e=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],E0e=e=>{if(!hu(e))return{browser:sg,os:sg};const{browser:{name:t},os:{name:n}}=Mpe.parse(e);return{os:n??sg,browser:t&&C0e.includes(t)?t:sg}},A0e=e=>hu(e)?e.split("/")[e.includes("://")?2:0]?.split(":")[0]??"":"Direct",o9=(e,t)=>e[t]!==void 0,V5=e=>typeof e=="number"?e:e?parseFloat(e):0,T0e=(e,{os:t})=>{e[t]=(e[t]||0)+1},O0e=(e,{browser:t})=>{e[t]=(e[t]||0)+1},j0e=(e,{referer:t})=>{e[t]=(e[t]||0)+1},s9=e=>(t,n)=>{const r=o9(n,e)?n[e]:"Unknown";t[r]=(t[r]||0)+1},P0e=s9("country"),M0e=s9("city"),R0e=(e,t)=>{if(!o9(t,"city")||t.city==="Unknown")return;const{city:n,latitude:r,longitude:i}=t,a=e[n]||{cityName:n,count:0,latLong:[V5(r),V5(i)]};a.count+=1,e[n]=a},N0e=(e,t)=>{if(!m0e(t))return;const{visitedUrl:n}=t;e[n]=(e[n]||0)+1},N2=e=>e.reduce((t,n)=>(T0e(t.os,n),O0e(t.browsers,n),j0e(t.referrers,n),P0e(t.countries,n),M0e(t.cities,n),R0e(t.citiesForMap,n),N0e(t.visitedUrls,n),t),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}}),Pv=e=>e.map(t=>{const{userAgent:n,date:r,referer:i,visitLocation:a,potentialBot:s}=t;return{date:r,potentialBot:s,userAgent:n,...E0e(n),referer:A0e(i),country:a?.countryName||"Unknown",region:a?.regionName||"Unknown",city:a?.cityName||"Unknown",latitude:a?.latitude,longitude:a?.longitude,visitedUrl:t.visitedUrl,type:o3(t)?t.type:void 0}}),L0e=Object.freeze(Object.defineProperty({__proto__:null,normalizeVisits:Pv,processStatsFromVisits:N2},Symbol.toStringTag,{value:"Module"})),ih=20,D0e=({browser:e,os:t,referer:n,country:r,city:i,userAgent:a,...s},u,d)=>{const f=d?a:`${r} ${i}`;return`${e} ${t} ${n} ${f} ${s.visitedUrl}`.toLowerCase().includes(u.toLowerCase())},k0e=(e,t,n)=>t.filter(r=>D0e(r,e,n)),I0e=(e,t)=>xN(t,e),U0e=({visits:e,searchTerm:t,order:n,searchInRawUserAgent:r})=>{const i=t?k0e(t,e,r):[...e],a=I0e(n,i),s=a.length;return{visitsGroups:Wc(a,ih),total:s}},ca="cursor-pointer md:sticky-cell-separated md:top-[calc(var(--header-height)+41px)]",B0e=()=>{const{anchor:e,tooltip:t}=eo({placement:"right"});return v.jsxs(v.Fragment,{children:[v.jsx(Ye,{icon:$R,...e}),v.jsx(to,{...t,children:"Potentially a visit from a bot or crawler"})]})},z0e=({visits:e,selectedVisits:t=[],setSelectedVisits:n})=>{const[r,i]=T.useState(),a=T.useCallback(N=>{i(N),b(1),n([])},[n]),[s,u]=T.useState({}),d=Dn("visitsList"),f=T.useMemo(()=>Sf(iy,d?.columns??{}),[d?.columns]),m=T.useMemo(()=>U0e({visits:e,searchTerm:r,order:s,searchInRawUserAgent:f.userAgent}),[e,r,s,f.userAgent]),[p,b]=T.useState(1),_=p*ih,w=_-ih,x=T.useMemo(()=>f.visitedUrl?m.visitsGroups.length===0||!!m.visitsGroups[p-1]?.[0]?.visitedUrl:!1,[f.visitedUrl,p,m.visitsGroups]),E=6+Number(x)+(f.userAgent?1:2),A=m.total>0,j=N=>u(Cw({currentField:s.field,currentOrderDir:s.dir,newField:N})),O=N=>v.jsx(dh,{currentOrder:s,field:N,className:"float-right mt-[5px] ml-[5px]"});return v.jsx(Pt,{bodyClassName:"[&]:p-0 [&]:pb-1",title:"Visits list",children:v.jsxs(Ke,{responsive:!1,size:"sm",className:"w-full relative overflow-y-hidden bg-lm-primary dark:bg-dm-primary",header:v.jsxs(v.Fragment,{children:[v.jsxs(Ke.Row,{children:[v.jsxs(Ke.Cell,{className:Ne(ca,"[&]:text-center"),onClick:()=>n(t.length<m.total?m.visitsGroups.flat():[]),children:[v.jsx("span",{className:"sr-only",children:"Is selected"}),v.jsx(Ye,{icon:Au,className:Ne({"text-lm-brand dark:text-dm-brand":t.length>0})})]}),f.potentialBot&&v.jsxs(Ke.Cell,{className:Ne(ca,"[&]:text-center"),onClick:()=>j("potentialBot"),children:[v.jsx("span",{className:"sr-only",children:"Is bot"}),v.jsx(Ye,{icon:$R}),O("potentialBot")]}),f.date&&v.jsxs(Ke.Cell,{className:ca,onClick:()=>j("date"),children:["Date",O("date")]}),f.country&&v.jsxs(Ke.Cell,{className:ca,onClick:()=>j("country"),children:["Country",O("country")]}),f.region&&v.jsxs(Ke.Cell,{className:ca,onClick:()=>j("region"),children:["Region",O("region")]}),f.city&&v.jsxs(Ke.Cell,{className:ca,onClick:()=>j("city"),children:["City",O("city")]}),f.userAgent&&v.jsxs(Ke.Cell,{className:ca,onClick:()=>j("userAgent"),children:["User agent",O("userAgent")]}),f.browser&&v.jsxs(Ke.Cell,{className:ca,onClick:()=>j("browser"),children:["Browser",O("browser")]}),f.browser&&v.jsxs(Ke.Cell,{className:ca,onClick:()=>j("os"),children:["OS",O("os")]}),f.referer&&v.jsxs(Ke.Cell,{className:ca,onClick:()=>j("referer"),children:["Referrer",O("referer")]}),x&&v.jsxs(Ke.Cell,{className:ca,onClick:()=>j("visitedUrl"),children:["Visited URL",O("visitedUrl")]})]}),v.jsx(Ke.Row,{children:v.jsx(Ke.Cell,{colSpan:E,className:"[&]:p-0",children:v.jsx(xf,{size:"md",borderless:!0,onChange:a})})})]}),footer:m.total>ih?v.jsx(Ke.Row,{children:v.jsx(Ke.Cell,{type:"td",colSpan:E,className:"md:sticky-cell-separated bottom-0",children:v.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-center gap-4 p-1",children:[v.jsx(Zv,{pagesCount:Math.ceil(m.total/ih),currentPage:p,onPageChange:b}),v.jsxs("div",{children:["Visits ",v.jsx("b",{children:On(w+1)})," to"," ",v.jsx("b",{children:On(Math.min(_,m.total))})," of"," ",v.jsx("b",{children:On(m.total)})]})]})})}):void 0,children:[!A&&v.jsx(Ke.Row,{children:v.jsx(Ke.Cell,{colSpan:E,className:"text-center",children:"There are no visits matching current filter"})}),m.visitsGroups[p-1]?.map((N,U)=>{const V=t.includes(N);return v.jsxs(Ke.Row,{className:Ne("cursor-pointer",V&&["bg-lm-table-highlight hover:[&]:bg-lm-table-highlight","dark:bg-dm-table-highlight dark:hover:[&]:bg-dm-table-highlight"]),onClick:()=>n(V?t.filter(Z=>Z!==N):[...t,N]),children:[v.jsx(Ke.Cell,{className:"text-center",children:V&&v.jsx(Ye,{icon:Au,className:"text-lm-brand dark:text-dm-brand"})}),f.potentialBot&&v.jsx(Ke.Cell,{className:"text-center",children:N.potentialBot&&v.jsx(B0e,{})}),f.date&&v.jsx(Ke.Cell,{children:v.jsx(Av,{date:N.date})}),f.country&&v.jsx(Ke.Cell,{children:N.country}),f.region&&v.jsx(Ke.Cell,{children:N.region}),f.city&&v.jsx(Ke.Cell,{children:N.city}),f.userAgent&&v.jsx(Ke.Cell,{children:N.userAgent}),f.browser&&v.jsx(Ke.Cell,{children:N.browser}),f.os&&v.jsx(Ke.Cell,{children:N.os}),f.referer&&v.jsx(Ke.Cell,{children:N.referer}),x&&v.jsx(Ke.Cell,{children:N.visitedUrl??""})]},U)})]})})},nl={byTime:{title:"By time",subPath:"by-time",icon:_$},byContext:{title:"By context",subPath:"by-context",icon:nw},byLocation:{title:"By location",subPath:"by-location",icon:lx},list:{title:"List",subPath:"list",icon:tw},options:{title:"Options",subPath:"options",icon:IR,shouldRender:({deletion:e})=>!!e}};Object.freeze(nl);const tx=({display:e})=>e&&v.jsx("div",{className:"mx-auto w-3/4",children:v.jsx(Pt,{children:v.jsxs("div",{className:"flex gap-2",children:[v.jsx(Ye,{icon:J$,className:"mt-1"}),v.jsx("i",{children:"Could not calculate previous period because selected one does not have a strictly defined start date."})]})})}),um=e=>{const{children:t,visitsInfo:n,getVisits:r,cancelGetVisits:i,deletion:a,exportCsv:s,isOrphanVisits:u=!1}=e,{visits:d,prevVisits:f,loading:m,errorData:p,fallbackInterval:b}=n,[{dateRange:_,visitsFilter:w,loadPrevInterval:x},E]=n9(),A=Dn("visits"),[j,O]=T.useState(),N=T.useCallback(({startDate:G,endDate:le},H)=>{E({dateRange:{startDate:G??void 0,endDate:le??void 0}}),O(H)},[E]),[U,V]=T.useState(b??A?.defaultInterval??"last30Days"),[Z,X]=T.useState([]),[oe,ee]=T.useState(),J=T.useRef(!0),{search:ne}=xr(),he=T.useCallback(G=>G?`../${G}${ne}`:ne,[ne]),Q=T.useMemo(()=>Pv(d),[d]),se=T.useMemo(()=>f&&Pv(f),[f]),{os:W,browsers:B,referrers:I,countries:z,cities:M,citiesForMap:D,visitedUrls:Y}=T.useMemo(()=>N2(Q),[Q]),q=T.useMemo(()=>N2(se??[]),[se]),re=T.useMemo(()=>Object.fromEntries([["Visits",Object.assign(Q,{type:"main"})],se&&["Previous period",Object.assign(se,{type:"previous"})],Z.length>0&&[oe??"Selected",Object.assign(Z,{type:"highlighted"})]].filter(Boolean)),[oe,Z,se,Q]),ue=T.useMemo(()=>({...w,excludeBots:w.excludeBots??A?.excludeBots,loadPrevInterval:x??A?.loadPrevInterval}),[x,w,A?.excludeBots,A?.loadPrevInterval]),ce=T.useMemo(()=>Object.values(D),[D]),ve=T.useRef(void 0),k=T.useCallback(G=>{ve.current=void 0,X(G)},[]),F=T.useCallback((G,le)=>{const H=`${G}_${le}`;ve.current===H?(X([]),ee(void 0),ve.current=void 0):(X(Q.filter(ae=>ae[G]===le)),ee(le),ve.current=H)},[Q]);return T.useEffect(()=>i,[i]),T.useEffect(()=>{const G=_??RI(U),{loadPrevInterval:le,...H}=ue,ae={doIntervalFallback:J.current,loadPrevInterval:le};r({dateRange:G,filter:H},ae),k([]),J.current=!1},[U,_,r,ue,k]),T.useEffect(()=>{b&&U===(A?.defaultInterval??"last30Days")&&V(b)},[U,b,A?.defaultInterval]),v.jsxs("div",{className:"flex flex-col gap-y-4",children:[t,v.jsxs("section",{className:"flex flex-col lg:flex-row-reverse gap-4",children:[v.jsxs("div",{className:"lg:flex-3 flex flex-col md:flex-row gap-x-2 gap-y-4",children:[v.jsx("div",{className:"grow",children:v.jsx(QC,{disabled:m,dateRangeOrInterval:j??_??U,defaultText:"All visits",onDatesChange:N})}),v.jsx(i9,{disabled:m,isOrphanVisits:u,withPrevInterval:!0,selected:ue,onChange:({loadPrevInterval:G,...le})=>E({visitsFilter:le,loadPrevInterval:G})})]}),v.jsx("div",{className:"lg:flex-2 xl:flex-3 flex gap-2",children:d.length>0&&v.jsxs(v.Fragment,{children:[v.jsx(gI,{className:"max-lg:w-full",amount:Q.length,onClick:()=>s(Q)}),v.jsxs(Mt,{variant:"secondary",solid:Z.length>0&&!Qo(),disabled:Z.length===0,className:"max-lg:w-full",onClick:()=>k([]),children:["Clear selection ",Z.length>0&&v.jsxs(v.Fragment,{children:["(",On(Z.length),")"]})]})]})})]}),v.jsxs("section",{className:"flex flex-col gap-4",children:[v.jsx(a9,{info:n}),!m&&!p&&v.jsxs(v.Fragment,{children:[v.jsx(rl,{fill:!0,className:"sticky top-(--header-height) z-2",children:Object.values(nl).map(({title:G,icon:le,subPath:H,shouldRender:ae},fe)=>!ae||ae(e)?v.jsxs(rl.Pill,{to:he(H),replace:!0,children:[v.jsx(Ye,{icon:le}),v.jsx("span",{className:"ml-2 max-lg:sr-only",children:G})]},fe):void 0).filter(Boolean)}),v.jsxs(Nv,{children:[v.jsx(gt,{path:nl.byTime.subPath,element:v.jsxs(xg,{showFallback:d.length===0,children:[v.jsx("div",{"data-testid":"line-chart-container",children:v.jsx(QI,{visitsGroups:re,setSelectedVisits:k,onDateRangeChange:N})}),v.jsx(tx,{display:!!ue.loadPrevInterval&&!f})]})}),v.jsx(gt,{path:nl.byContext.subPath,element:v.jsxs(xg,{showFallback:d.length===0,children:[v.jsxs("div",{className:Ne("grid grid-cols-1 gap-4",{"lg:grid-cols-2":u,"xl:grid-cols-3":!u}),children:[v.jsx(B5,{title:"Operating systems",stats:W,prevStats:q.os}),v.jsx(B5,{title:"Browsers",stats:B,prevStats:q.browsers}),v.jsx(ag,{title:"Referrers",withPagination:!1,stats:I,prevStats:q.referrers,highlightedStats:og(Z,"referer"),highlightedLabel:oe,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:G=>F("referer",G)}),u&&v.jsx(ag,{title:"Visited URLs",stats:Y,prevStats:q.visitedUrls,highlightedStats:og(Z,"visitedUrl"),highlightedLabel:oe,sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:G=>F("visitedUrl",G)})]}),v.jsx(tx,{display:!!ue.loadPrevInterval&&!f})]})}),v.jsx(gt,{path:nl.byLocation.subPath,element:v.jsxs(xg,{showFallback:d.length===0,children:[v.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[v.jsx(ag,{title:"Countries",stats:z,prevStats:q.countries,highlightedStats:og(Z,"country"),highlightedLabel:oe,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:G=>F("country",G)}),v.jsx(ag,{title:"Cities",stats:M,prevStats:q.cities,highlightedStats:og(Z,"city"),highlightedLabel:oe,extraHeaderContent:G=>ce.length>0&&v.jsx(x0e,{modalTitle:"Cities",locations:ce,activeCities:G}),sortingItems:{name:"City name",amount:"Visits amount"},onClick:G=>F("city",G)})]}),v.jsx(tx,{display:!!ue.loadPrevInterval&&!f})]})}),v.jsx(gt,{path:nl.list.subPath,element:v.jsx(z0e,{visits:Q,selectedVisits:Z,setSelectedVisits:k})}),a&&v.jsx(gt,{path:nl.options.subPath,element:v.jsx(S0e,{...a})}),v.jsx(gt,{path:"*",element:v.jsx(V2,{replace:!0,to:he(nl.byTime.subPath)})})]})]})]})]})},l9=Aa(({getDomainVisits:e,domainVisits:t,cancelGetDomainVisits:n})=>{const{ReportExporter:r}=Pn(l9),{domain:i=""}=vf(),[a,s=a]=i.split("_"),u=T.useCallback((f,m)=>e({domain:s,options:m,params:f}),[s,e]),d=T.useCallback(f=>r.exportVisits(`domain_${a}_visits.csv`,f),[a,r]);return v.jsx(um,{getVisits:u,cancelGetVisits:n,visitsInfo:t,exportCsv:d,children:v.jsx(lm,{visits:t.visits,title:`"${a}" visits`})})},()=>[Ji.visits]),F0e=Mn(l9,["ReportExporter"]),u9=Aa(({getNonOrphanVisits:e,nonOrphanVisits:t,cancelGetNonOrphanVisits:n})=>{const{ReportExporter:r}=Pn(u9),i=T.useCallback(s=>r.exportVisits("non_orphan_visits.csv",s),[r]),a=T.useCallback((s,u)=>e({options:u,params:s}),[e]);return v.jsx(um,{getVisits:a,cancelGetVisits:n,visitsInfo:t,exportCsv:i,children:v.jsx(lm,{title:"Non-orphan visits",visits:t.visits})})},()=>[Ji.visits]),$0e=Mn(u9,["ReportExporter"]),c9=Aa(({getOrphanVisits:e,orphanVisits:t,cancelGetOrphanVisits:n,deleteOrphanVisits:r,orphanVisitsDeletion:i})=>{const a=Xi("orphanVisitsDeletion"),{ReportExporter:s}=Pn(c9),u=T.useCallback(m=>s.exportVisits("orphan_visits.csv",m),[s]),d=T.useCallback((m,p)=>e({options:p,params:m,orphanVisitsType:m.filter?.orphanVisitsType}),[e]),f=T.useMemo(()=>a?{deleteVisits:r,visitsDeletion:i}:void 0,[r,i,a]);return v.jsx(um,{getVisits:d,cancelGetVisits:n,visitsInfo:t,exportCsv:u,deletion:f,isOrphanVisits:!0,children:v.jsx(lm,{title:"Orphan visits",visits:t.visits})})},()=>[Ji.orphanVisits]),V0e=Mn(c9,["ReportExporter"]),H5=5e3,H0e=2,q0e=4,G0e=({currentPage:e,pagesCount:t})=>e>=t,Y0e=(e,t)=>t*100/e,f9=({visitsLoader:e,shouldCancel:t,progressChanged:n,batchSize:r})=>{const i=async(s,u)=>Promise.all(u.map(async d=>e({...s,page:d,itemsPerPage:H5}).then(({data:f})=>f))).then(d=>d.flat()),a=async(s,u,d=0)=>{if(t())return[];const f=await i(s,u[d]);return n(Y0e(u.length,d+1)),d<u.length-1?f.concat(await a(s,u,d+1)):f};return async s=>{const{pagination:u,data:d}=await e({...s,page:1,itemsPerPage:H5});if(G0e(u))return d;const f=nL(H0e,u.pagesCount+1),m=Wc(f,r);return u.pagesCount-1>r&&n(0),d.concat(await a(s,m))}},cm=(e,t)=>async n=>e?t({page:1,itemsPerPage:1,excludeBots:n}).then(({data:r})=>r[0]):Promise.resolve(void 0),fm=({typePrefix:e,createLoaders:t,shouldCancel:n})=>{const r=fn(`${e}/progressChanged`),i=fn(`${e}/fallbackToInterval`),a=Yn(e,async(s,{getState:u,dispatch:d})=>{const{params:f,options:m}=s,{visitsLoader:p,lastVisitLoader:b}=t(s),_=lye(f.dateRange),w=R2(f),x=m.loadPrevInterval&&v0e(f)?R2(y0e(f)):void 0,E=q0e/(x?2:1),A=x?{main:0,prev:0}:{main:0},j=(Z,X)=>{A[Z]=X;const oe=Object.values(A),ee=oe.reduce((J,ne)=>J+ne,0);d(r(ee/oe.length))},O=f9({visitsLoader:p,shouldCancel:()=>n(u),progressChanged:Z=>j("main",Z),batchSize:E}),[N,U,V]=await Promise.all([O(w),b(f.filter?.excludeBots),x?O(x).then(Z=>Z.map(X=>{if(_===void 0)return X;const{date:oe,...ee}=X,J=Iw(_i(oe),_);return{...ee,date:Al(J)}})):Promise.resolve(void 0)]);return!N.length&&U&&d(i(oye(U.date))),{...s,visits:N,prevVisits:V}});return Object.assign(a,{progressChanged:r,fallbackToInterval:i})},dm=({name:e,asyncThunkCreator:t,initialState:n,filterCreatedVisits:r,extraReducers:i})=>{const{pending:a,rejected:s,fulfilled:u,progressChanged:d,fallbackToInterval:f}=t,{reducer:m,actions:p}=Rt({name:e,initialState:n,reducers:{cancelGetVisits:_=>({..._,cancelLoad:!0})},extraReducers:_=>{_.addCase(a,()=>({...n,loading:!0})),_.addCase(s,(w,{error:x})=>({...n,errorData:Ni(x)??null})),_.addCase(u,(w,{payload:x})=>({...w,...x,loading:!1,progress:null,errorData:null})),_.addCase(d,(w,{payload:x})=>({...w,progress:x})),_.addCase(f,(w,{payload:x})=>({...w,fallbackInterval:x})),_.addCase(Lf,(w,{payload:x})=>{const{visits:E}=w,A=r(w,x.createdVisits).map(({visit:j})=>j);return A.length?{...w,visits:[...A,...E]}:w}),i?.(_)}}),{cancelGetVisits:b}=p;return{reducer:m,cancelGetVisits:b}},d9="shlink/domainVisits",W0e={visits:[],domain:"",loading:!1,cancelLoad:!1,errorData:null,progress:null},K0e=e=>fm({typePrefix:`${d9}/getDomainVisits`,createLoaders:({domain:t,options:n})=>{const r=e(),{doIntervalFallback:i=!1}=n,a=u=>r.getDomainVisits(t,u),s=cm(i,u=>r.getDomainVisits(t,u));return{visitsLoader:a,lastVisitLoader:s}},shouldCancel:t=>t().domainVisits.cancelLoad}),Z0e=e=>dm({name:d9,initialState:W0e,asyncThunkCreator:e,filterCreatedVisits:({domain:t,params:n},r)=>e9(r,t,n?.dateRange)}),h9="shlink/orphanVisits",X0e={visits:[],loading:!1,cancelLoad:!1,errorData:null,progress:null},Q0e=e=>fm({typePrefix:`${h9}/getNonOrphanVisits`,createLoaders:({options:t})=>{const n=e(),{doIntervalFallback:r=!1}=t,i=async s=>n.getNonOrphanVisits(s),a=cm(r,s=>n.getNonOrphanVisits(s));return{visitsLoader:i,lastVisitLoader:a}},shouldCancel:t=>t().orphanVisits.cancelLoad}),J0e=e=>dm({name:h9,initialState:X0e,asyncThunkCreator:e,filterCreatedVisits:({params:t},n)=>{const{startDate:r,endDate:i}=t?.dateRange??{};return n.filter(({visit:a})=>sm(a.date,r,i))}}),m9="shlink/orphanVisits",e1e={visits:[],loading:!1,cancelLoad:!1,errorData:null,progress:null},t1e=(e,t)=>!t||t===e.type,n1e=({data:e,...t},n)=>{const r=e.filter(i=>o3(i)&&t1e(i,n));return{...t,data:r}},r1e=e=>fm({typePrefix:`${m9}/getOrphanVisits`,createLoaders:({orphanVisitsType:t,options:n})=>{const r=e(),{doIntervalFallback:i=!1}=n,a=async u=>r.getOrphanVisits({...u,type:t}).then(d=>n1e(d,t)),s=cm(i,u=>r.getOrphanVisits(u));return{visitsLoader:a,lastVisitLoader:s}},shouldCancel:t=>t().orphanVisits.cancelLoad}),i1e=(e,t)=>dm({name:m9,initialState:e1e,asyncThunkCreator:e,extraReducers:n=>{n.addCase(t.fulfilled,r=>({...r,visits:[]}))},filterCreatedVisits:({params:n},r)=>{const{startDate:i,endDate:a}=n?.dateRange??{};return r.filter(({visit:s,shortUrl:u})=>!u&&sm(s.date,i,a))}}),p9="shlink/orphanVisitsDeletion",q5={deletedVisits:0,deleting:!1,error:!1},a1e=e=>Yn(`${p9}/deleteOrphanVisits`,()=>e().deleteOrphanVisits()),o1e=e=>Rt({name:p9,initialState:q5,reducers:{},extraReducers:t=>{t.addCase(e.pending,n=>({...n,deleting:!0,error:!1})),t.addCase(e.rejected,(n,{error:r})=>({...n,deleting:!1,error:!0,errorData:Ni(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>{const{deletedVisits:i}=r;return{...q5,deletedVisits:i}})}}),g9="shlink/shortUrlVisits",s1e={visits:[],shortCode:"",loading:!1,errorData:null,cancelLoad:!1,progress:null},l1e=e=>fm({typePrefix:`${g9}/getShortUrlVisits`,createLoaders:({shortCode:t,domain:n,options:r})=>{const i=e(),{doIntervalFallback:a=!1}=r,s=d=>i.getShortUrlVisits({shortCode:t,domain:n},d),u=cm(a,d=>i.getShortUrlVisits({shortCode:t,domain:n},d));return{visitsLoader:s,lastVisitLoader:u}},shouldCancel:t=>t().shortUrlVisits.cancelLoad}),u1e=(e,t)=>dm({name:g9,initialState:s1e,asyncThunkCreator:e,extraReducers:n=>{n.addCase(t.fulfilled,(r,{payload:i})=>r.shortCode===i.shortCode&&r.domain===i.domain?{...r,visits:[]}:r)},filterCreatedVisits:({shortCode:n,domain:r,params:i},a)=>JI(a,{shortCode:n,domain:r},i?.dateRange)}),v9="shlink/shortUrlVisitsDeletion",G5={shortCode:"",deletedVisits:0,deleting:!1,error:!1},c1e=e=>Yn(`${v9}/deleteShortUrlVisits`,async({shortCode:t,domain:n})=>({...await e().deleteShortUrlVisits({shortCode:t,domain:n}),shortCode:t,domain:n})),f1e=e=>Rt({name:v9,initialState:G5,reducers:{},extraReducers:t=>{t.addCase(e.pending,n=>({...n,deleting:!0,error:!1})),t.addCase(e.rejected,(n,{error:r})=>({...n,deleting:!1,error:!0,errorData:Ni(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>{const{shortCode:i,domain:a,deletedVisits:s}=r;return{...G5,shortCode:i,domain:a,deletedVisits:s}})}}),y9="shlink/tagVisits",d1e={visits:[],tag:"",loading:!1,cancelLoad:!1,errorData:null,progress:null},h1e=e=>fm({typePrefix:`${y9}/getTagVisits`,createLoaders:({tag:t,options:n})=>{const r=e(),{doIntervalFallback:i=!1}=n,a=u=>r.getTagVisits(t,u),s=cm(i,async u=>r.getTagVisits(t,u));return{visitsLoader:a,lastVisitLoader:s}},shouldCancel:t=>t().tagVisits.cancelLoad}),m1e=e=>dm({name:y9,initialState:d1e,asyncThunkCreator:e,filterCreatedVisits:({tag:t,params:n},r)=>t9(r,t,n?.dateRange)}),b9="shlink/visitsOverview",lg={nonOrphanVisits:{total:0},orphanVisits:{total:0},loading:!1,error:!1},Y5=e=>e.filter(({visit:t})=>t.potentialBot).length,p1e=e=>Yn(`${b9}/loadVisitsOverview`,()=>e().getVisitsOverview().then(({nonOrphanVisits:t,visitsCount:n=0,orphanVisits:r,orphanVisitsCount:i=0})=>({nonOrphanVisits:{total:t?.total??n,nonBots:t?.nonBots,bots:t?.bots},orphanVisits:{total:r?.total??i,nonBots:r?.nonBots,bots:r?.bots}}))),g1e=e=>Rt({name:b9,initialState:lg,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({...lg,loading:!0})),t.addCase(e.rejected,()=>({...lg,error:!0})),t.addCase(e.fulfilled,(n,{payload:r})=>({...lg,...r})),t.addCase(Lf,({nonOrphanVisits:n,orphanVisits:r,...i},{payload:a})=>{const{nonOrphanVisits:s,orphanVisits:u}=p0e(a.createdVisits),d=s.length,f=Y5(s),m=d-f,p=u.length,b=Y5(u),_=p-b;return{...i,nonOrphanVisits:{total:n.total+d,bots:n.bots&&n.bots+f,nonBots:n.nonBots&&n.nonBots+m},orphanVisits:{total:r.total+p,bots:r.bots&&r.bots+b,nonBots:r.nonBots&&r.nonBots+_}}})}}),v1e=({shortUrl:e})=>{const{anchor:t,tooltip:n}=eo({placement:"bottom"});return e?v.jsxs("span",{children:[v.jsx("b",{className:"cursor-default",...t,children:v.jsx(Av,{date:e.dateCreated,relative:!0})}),v.jsx(to,{...n,children:v.jsx(Av,{date:e.dateCreated})})]}):v.jsx("small",{children:"Loading..."})},y1e=({shortUrl:e,loading:t,shortUrlVisits:n})=>{const{visits:r}=n,i=e?.shortUrl??"",a=e?.longUrl??"",s=e?.title;return v.jsxs(lm,{title:v.jsxs(v.Fragment,{children:["Visits for ",v.jsx(Si,{href:i})]}),visits:r,shortUrl:e,children:[v.jsx("hr",{}),v.jsxs("div",{children:["Created: ",v.jsx(v1e,{shortUrl:e})]}),v.jsxs("div",{"data-testid":"long-url-container",children:[`${s?"Title":"Long URL"}: `,t&&v.jsx("small",{children:"Loading..."}),!t&&v.jsx(Si,{href:a,children:s??a})]})]})},_9=Aa(({shortUrlVisits:e,shortUrlVisitsDeletion:t,shortUrlsDetails:n,getShortUrlVisits:r,getShortUrlsDetails:i,deleteShortUrlVisits:a,cancelGetShortUrlVisits:s})=>{const u=Xi("shortUrlVisitsDeletion"),{ReportExporter:d}=Pn(_9),f=YC(),m=T.useMemo(()=>n.shortUrls?.get(f),[f,n.shortUrls]),p=T.useCallback((w,x)=>r({...f,options:x,params:w}),[r,f]),b=T.useCallback(w=>d.exportVisits(`short-url_${m?.shortUrl.replace(/https?:\/\//g,"")}_visits.csv`,w),[d,m?.shortUrl]),_=T.useMemo(()=>u?{deleteVisits:()=>a(f),visitsDeletion:t}:void 0,[a,f,t,u]);return T.useEffect(()=>{i([f])},[f,i]),v.jsx(um,{getVisits:p,cancelGetVisits:s,visitsInfo:e,exportCsv:b,deletion:_,children:v.jsx(y1e,{shortUrl:m,loading:n.loading,shortUrlVisits:e})})},e=>e.shortCode?[Ji.shortUrlVisits(VC(e.shortCode))]:[]),b1e=Mn(_9,["ReportExporter"]),_1e=({tagVisits:e,colorGenerator:t})=>{const{visits:n,tag:r}=e;return v.jsx(lm,{title:v.jsxs("span",{className:"flex items-center justify-center",children:[v.jsx("span",{className:"mr-2",children:"Visits for"}),v.jsx(XC,{text:r,colorGenerator:t})]}),visits:n})},x9=Aa(({getTagVisits:e,tagVisits:t,cancelGetTagVisits:n})=>{const{ColorGenerator:r,ReportExporter:i}=Pn(x9),{tag:a=""}=vf(),s=T.useCallback((d,f)=>e({tag:a,params:d,options:f}),[e,a]),u=T.useCallback(d=>i.exportVisits(`tag_${a}_visits.csv`,d),[i,a]);return v.jsx(um,{getVisits:s,cancelGetVisits:n,visitsInfo:t,exportCsv:u,children:v.jsx(_1e,{tagVisits:t,colorGenerator:r})})},()=>[Ji.visits]),x1e=Mn(x9,["ColorGenerator","ReportExporter"]),s3=({title:e,colors:t,getVisitsForComparison:n,visitsComparisonInfo:r,cancelGetVisitsComparison:i})=>{const{loading:a,visitsGroups:s}=r,u=Dn("visits"),d=T.useMemo(()=>Object.keys(s).reduce((j,O,N)=>(j[O]=Object.assign(Pv(s[O]),{color:t?.[O]??ZI(N)}),j),{}),[t,s]),f=T.useMemo(()=>Object.values(s).every(j=>j.length===0),[s]),[{dateRange:m,visitsFilter:p},b]=n9(),[_,w]=T.useState(),x=T.useCallback(({startDate:j,endDate:O},N)=>{b({dateRange:{startDate:j??void 0,endDate:O??void 0}}),w(N)},[b]),[E]=T.useState(()=>m??u?.defaultInterval??"last30Days"),A=T.useMemo(()=>({...p,excludeBots:p.excludeBots??u?.excludeBots}),[p,u?.excludeBots]);return T.useEffect(()=>{const j=m??RI(E);return n({params:{dateRange:j,filter:A}}),i},[i,m,n,E,A]),v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsxs(Pt,{bodyClassName:"flex items-center",children:[v.jsx($y,{}),v.jsx("h3",{className:"grow text-center",children:e})]}),v.jsxs("div",{className:"flex flex-col lg:flex-row-reverse gap-4",children:[v.jsxs("div",{className:"lg:flex-3 flex flex-col md:flex-row gap-x-2 gap-y-4",children:[v.jsx("div",{className:"grow",children:v.jsx(QC,{disabled:a,defaultText:"All visits",dateRangeOrInterval:_??m??E,onDatesChange:x})}),v.jsx(i9,{disabled:a,selected:A,onChange:({orphanVisitsType:j,excludeBots:O})=>b({visitsFilter:{orphanVisitsType:j,excludeBots:O}})})]}),v.jsx("div",{className:"hidden lg:block lg:flex-2 xl:flex-3"})]}),v.jsx(a9,{info:r}),!a&&v.jsx(xg,{showFallback:f,children:v.jsx(QI,{visitsGroups:d,onDateRangeChange:x})})]})},w1e=Aa(({getDomainVisitsForComparison:e,domainVisitsComparison:t,cancelGetDomainVisitsComparison:n})=>{const r=t3("domains"),i=T.useCallback(a=>e({...a,domains:r}),[r,e]);return v.jsx(s3,{title:`Comparing "${r.join('", "')}"`,getVisitsForComparison:i,visitsComparisonInfo:t,cancelGetVisitsComparison:n})},()=>[Ji.visits]),S1e=({visitsLoaders:e,shouldCancel:t,progressChanged:n})=>{const r=Object.keys(e),i=Math.max(1,Math.round(4/r.length)),a=Object.fromEntries(r.map(d=>[d,0])),s=(d,f)=>{a[d]=f;const m=Object.values(a),p=m.reduce((b,_)=>b+_,0);n(p/m.length)},u=Object.entries(e).map(([d,f])=>[d,f9({visitsLoader:f,batchSize:i,shouldCancel:t,progressChanged:m=>s(d,m)})]);return async d=>{const f=await Promise.all(u.map(async([m,p])=>{const b=await p(d);return[m,b]}));return Object.fromEntries(f)}},l3=({typePrefix:e,createLoaders:t,shouldCancel:n})=>{const r=fn(`${e}/progressChanged`),i=Yn(e,async(a,{getState:s,dispatch:u})=>{const d=t(a),f=await S1e({visitsLoaders:d,shouldCancel:()=>n(s),progressChanged:m=>u(r(m))})(R2(a.params));return{...a,visitsGroups:f}});return Object.assign(i,{progressChanged:r})},u3=({name:e,asyncThunkCreator:t,initialState:n,filterCreatedVisitsForGroup:r})=>{const{pending:i,rejected:a,fulfilled:s,progressChanged:u}=t,{reducer:d,actions:f}=Rt({name:e,initialState:n,reducers:{cancelGetVisits:p=>({...p,cancelLoad:!0})},extraReducers:p=>{p.addCase(i,()=>({...n,loading:!0})),p.addCase(a,(b,{error:_})=>({...n,errorData:Ni(_)??null})),p.addCase(s,(b,{payload:_})=>({...b,..._,loading:!1,progress:null,errorData:null})),p.addCase(u,(b,{payload:_})=>({...b,progress:_})),p.addCase(Lf,(b,{payload:_})=>{const{visitsGroups:w,...x}=b,E=Object.keys(w).map(j=>{const O=r({...x,groupKey:j},_.createdVisits).map(({visit:N})=>N);return[j,[...O,...w[j]]]}),A=Object.fromEntries(E);return{...x,visitsGroups:A}})}}),{cancelGetVisits:m}=f;return{reducer:d,cancelGetVisits:m}},w9="shlink/domainVisitsComparison",C1e={visitsGroups:{},loading:!1,cancelLoad:!1,errorData:null,progress:null},E1e=e=>l3({typePrefix:`${w9}/getDomainVisitsForComparison`,createLoaders:({domains:t})=>{const n=e(),r=t.map(i=>[i,a=>n.getDomainVisits(i,a)]);return Object.fromEntries(r)},shouldCancel:t=>t().domainVisitsComparison.cancelLoad}),A1e=e=>u3({name:w9,initialState:C1e,asyncThunkCreator:e,filterCreatedVisitsForGroup:({groupKey:t,params:n},r)=>e9(r,t,n?.dateRange)}),S9="shlink/shortUrlVisitsComparison",T1e={visitsGroups:{},loading:!1,cancelLoad:!1,errorData:null,progress:null},O1e=e=>l3({typePrefix:`${S9}/getShortUrlVisitsForComparison`,createLoaders:({shortUrls:t})=>{const n=e(),r=t.map(i=>[HC(i),a=>n.getShortUrlVisits(i,a)]);return Object.fromEntries(r)},shouldCancel:t=>t().shortUrlVisitsComparison.cancelLoad}),j1e=e=>u3({name:S9,initialState:T1e,asyncThunkCreator:e,filterCreatedVisitsForGroup:({groupKey:t,params:n},r)=>JI(r,W7(t),n?.dateRange)}),C9="shlink/tagVisitsComparison",P1e={visitsGroups:{},loading:!1,cancelLoad:!1,errorData:null,progress:null},M1e=e=>l3({typePrefix:`${C9}/getTagVisitsForComparison`,createLoaders:({tags:t})=>{const n=e(),r=t.map(i=>[i,a=>n.getTagVisits(i,a)]);return Object.fromEntries(r)},shouldCancel:t=>t().tagVisitsComparison.cancelLoad}),R1e=e=>u3({name:C9,initialState:P1e,asyncThunkCreator:e,filterCreatedVisitsForGroup:({groupKey:t,params:n},r)=>t9(r,t,n?.dateRange)}),N1e=Aa(({getShortUrlVisitsForComparison:e,shortUrlVisitsComparison:t,cancelGetShortUrlVisitsComparison:n,shortUrlsDetails:r,getShortUrlsDetails:i})=>{const a=t3("short-urls"),s=T.useMemo(()=>a.map(W7),[a]),u=T.useCallback(m=>e({...m,shortUrls:s}),[e,s]),d=T.useMemo(()=>[...r.shortUrls?.values()??[]],[r.shortUrls]),f=T.useMemo(()=>{const{visitsGroups:m,loading:p,...b}=t,_=d.reduce((w,x)=>(w[x.shortUrl]=m[HC(x)]??[],w),{});return{...b,visitsGroups:_,loading:p||r.loading}},[t,r.loading,d]);return T.useEffect(()=>{s.length>0&&i(s)},[i,s]),v.jsx(s3,{title:v.jsx("span",{"data-testid":"title",children:r.loading?"Loading...":`Comparing ${d.length} short URLs`}),getVisitsForComparison:u,visitsComparisonInfo:f,cancelGetVisitsComparison:n})},()=>[Ji.visits]),E9=Aa(({getTagVisitsForComparison:e,tagVisitsComparison:t,cancelGetTagVisitsComparison:n})=>{const{ColorGenerator:r}=Pn(E9),i=t3("tags"),a=T.useCallback(d=>e({...d,tags:i}),[e,i]),{visitsGroups:s}=t,u=T.useMemo(()=>Object.keys(s).reduce((d,f)=>(d[f]=r.getColorForKey(f),d),{}),[r,s]);return v.jsx(s3,{title:v.jsxs(v.Fragment,{children:["Comparing ",i.map(d=>v.jsx(XC,{colorGenerator:r,text:d},d))]}),getVisitsForComparison:a,visitsComparisonInfo:t,cancelGetVisitsComparison:n,colors:u})},()=>[Ji.visits]),L1e=Mn(E9,["ColorGenerator"]),D1e=(e,t)=>{const n=(r,i)=>t([...r,"mercureInfo"],[...i,"createNewVisits","loadMercureInfo"]);e.serviceFactory("MapModal",()=>r9),e.factory("ShortUrlVisits",b1e),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlVisitsDeletion","shortUrlsDetails","mercureInfo"],["getShortUrlVisits","deleteShortUrlVisits","getShortUrlsDetails","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.factory("TagVisits",x1e),e.decorator("TagVisits",n(["tagVisits"],["getTagVisits","cancelGetTagVisits"])),e.factory("TagVisitsComparison",L1e),e.decorator("TagVisitsComparison",n(["tagVisitsComparison"],["getTagVisitsForComparison","cancelGetTagVisitsForComparison"])),e.serviceFactory("DomainVisitsComparison",()=>w1e),e.decorator("DomainVisitsComparison",n(["domainVisitsComparison"],["getDomainVisitsForComparison","cancelGetDomainVisitsForComparison"])),e.serviceFactory("ShortUrlVisitsComparison",()=>N1e),e.decorator("ShortUrlVisitsComparison",n(["shortUrlVisitsComparison","shortUrlsDetails"],["getShortUrlVisitsForComparison","cancelGetShortUrlVisitsForComparison","getShortUrlsDetails"])),e.factory("DomainVisits",F0e),e.decorator("DomainVisits",n(["domainVisits"],["getDomainVisits","cancelGetDomainVisits"])),e.factory("OrphanVisits",V0e),e.decorator("OrphanVisits",n(["orphanVisits","orphanVisitsDeletion"],["getOrphanVisits","cancelGetOrphanVisits","deleteOrphanVisits"])),e.factory("NonOrphanVisits",$0e),e.decorator("NonOrphanVisits",n(["nonOrphanVisits"],["getNonOrphanVisits","cancelGetNonOrphanVisits"])),e.serviceFactory("VisitsParser",()=>L0e),e.serviceFactory("getShortUrlVisits",l1e,"apiClientFactory"),e.serviceFactory("cancelGetShortUrlVisits",r=>r.cancelGetVisits,"shortUrlVisitsReducerCreator"),e.serviceFactory("getShortUrlVisitsForComparison",O1e,"apiClientFactory"),e.serviceFactory("cancelGetShortUrlVisitsForComparison",r=>r.cancelGetVisits,"shortUrlVisitsComparisonReducerCreator"),e.serviceFactory("deleteShortUrlVisits",c1e,"apiClientFactory"),e.serviceFactory("getTagVisits",h1e,"apiClientFactory"),e.serviceFactory("cancelGetTagVisits",r=>r.cancelGetVisits,"tagVisitsReducerCreator"),e.serviceFactory("getTagVisitsForComparison",M1e,"apiClientFactory"),e.serviceFactory("cancelGetTagVisitsForComparison",r=>r.cancelGetVisits,"tagVisitsComparisonReducerCreator"),e.serviceFactory("getDomainVisits",K0e,"apiClientFactory"),e.serviceFactory("cancelGetDomainVisits",r=>r.cancelGetVisits,"domainVisitsReducerCreator"),e.serviceFactory("getDomainVisitsForComparison",E1e,"apiClientFactory"),e.serviceFactory("cancelGetDomainVisitsForComparison",r=>r.cancelGetVisits,"domainVisitsComparisonReducerCreator"),e.serviceFactory("getOrphanVisits",r1e,"apiClientFactory"),e.serviceFactory("cancelGetOrphanVisits",r=>r.cancelGetVisits,"orphanVisitsReducerCreator"),e.serviceFactory("deleteOrphanVisits",a1e,"apiClientFactory"),e.serviceFactory("getNonOrphanVisits",Q0e,"apiClientFactory"),e.serviceFactory("cancelGetNonOrphanVisits",r=>r.cancelGetVisits,"nonOrphanVisitsReducerCreator"),e.serviceFactory("createNewVisits",()=>Lf),e.serviceFactory("loadVisitsOverview",p1e,"apiClientFactory"),e.serviceFactory("visitsOverviewReducerCreator",g1e,"loadVisitsOverview"),e.serviceFactory("visitsOverviewReducer",r=>r.reducer,"visitsOverviewReducerCreator"),e.serviceFactory("domainVisitsReducerCreator",Z0e,"getDomainVisits"),e.serviceFactory("domainVisitsReducer",r=>r.reducer,"domainVisitsReducerCreator"),e.serviceFactory("nonOrphanVisitsReducerCreator",J0e,"getNonOrphanVisits"),e.serviceFactory("nonOrphanVisitsReducer",r=>r.reducer,"nonOrphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsReducerCreator",i1e,"getOrphanVisits","deleteOrphanVisits"),e.serviceFactory("orphanVisitsReducer",r=>r.reducer,"orphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsDeletionReducerCreator",o1e,"deleteOrphanVisits"),e.serviceFactory("orphanVisitsDeletionReducer",r=>r.reducer,"orphanVisitsDeletionReducerCreator"),e.serviceFactory("shortUrlVisitsReducerCreator",u1e,"getShortUrlVisits","deleteShortUrlVisits"),e.serviceFactory("shortUrlVisitsReducer",r=>r.reducer,"shortUrlVisitsReducerCreator"),e.serviceFactory("shortUrlVisitsDeletionReducerCreator",f1e,"deleteShortUrlVisits"),e.serviceFactory("shortUrlVisitsDeletionReducer",r=>r.reducer,"shortUrlVisitsDeletionReducerCreator"),e.serviceFactory("tagVisitsReducerCreator",m1e,"getTagVisits"),e.serviceFactory("tagVisitsReducer",r=>r.reducer,"tagVisitsReducerCreator"),e.serviceFactory("tagVisitsComparisonReducerCreator",R1e,"getTagVisitsForComparison"),e.serviceFactory("tagVisitsComparisonReducer",r=>r.reducer,"tagVisitsComparisonReducerCreator"),e.serviceFactory("domainVisitsComparisonReducerCreator",A1e,"getDomainVisitsForComparison"),e.serviceFactory("domainVisitsComparisonReducer",r=>r.reducer,"domainVisitsComparisonReducerCreator"),e.serviceFactory("shortUrlVisitsComparisonReducerCreator",j1e,"getShortUrlVisitsForComparison"),e.serviceFactory("shortUrlVisitsComparisonReducer",r=>r.reducer,"shortUrlVisitsComparisonReducerCreator")},Zd=({children:e,to:t,active:n,...r})=>v.jsx(G2,{...r,className:({isActive:i})=>Ne("flex items-center gap-2","no-underline rounded-none px-5 py-2.5",{"text-white bg-lm-main dark:bg-dm-main":i||n,"highlight:bg-lm-secondary highlight:dark:bg-dm-secondary":!i&&!n}),to:t,children:e}),k1e=({routePrefix:e,showOnMobile:t=!1})=>{const{pathname:n}=xr(),r=i=>`${e}${i}`;return v.jsx("aside",{className:Ne("w-(--aside-menu-width) bg-lm-primary dark:bg-dm-primary","pt-[15px] md:pt-[30px] pb-[10px]","fixed! bottom-0 top-(--header-height) z-890 transition-[left] duration-300","shadow-aside-menu-mobile md:shadow-aside-menu",{"left-0":t,"max-md:left-[calc(-1*(var(--aside-menu-width)+35px))]":!t}),children:v.jsxs("nav",{className:"flex flex-col h-full",children:[v.jsxs(Zd,{to:r("/overview"),children:[v.jsx(Ye,{icon:q$}),"Overview"]}),v.jsxs(Zd,{to:r("/list-short-urls/1"),active:n.match("/list-short-urls")!==null,children:[v.jsx(Ye,{icon:tw}),"List short URLs"]}),v.jsxs(Zd,{to:r("/create-short-url"),children:[v.jsx(Ye,{icon:z$,flip:"horizontal"}),"Create short URL"]}),v.jsxs(Zd,{to:r("/manage-tags"),children:[v.jsx(Ye,{icon:FR}),"Manage tags"]}),v.jsxs(Zd,{to:r("/manage-domains"),children:[v.jsx(Ye,{icon:tV}),"Manage domains"]})]})})},A9=T.createContext(void 0),c3=()=>T.useContext(A9),T9=({children:e})=>{const t=c3(),{flag:n,toggle:r,setToTrue:i,setToFalse:a}=Sn(),s=t??{sidebarVisible:n,toggleSidebar:r,showSidebar:i,hideSidebar:a};return v.jsx(A9.Provider,{value:s,children:e})},O9=({className:e,...t})=>{const n=c3();if(!n)throw new Error("ShlinkSidebarToggleButton has to be used inside a ShlinkSidebarVisibilityProvider");const{sidebarVisible:r,toggleSidebar:i}=n;return v.jsx(hf,{"aria-label":"Toggle sidebar",className:Ne("md:hidden transition-colors",{"text-white/50":!r,"text-white":r},e),onClick:i,...t,children:v.jsx(Ye,{icon:hV,size:"xl"})})},j9=({createNotFound:e,autoToggleButton:t})=>{const{TagsList:n,ShortUrlsList:r,CreateShortUrl:i,ShortUrlVisits:a,TagVisits:s,DomainVisits:u,OrphanVisits:d,NonOrphanVisits:f,Overview:m,EditShortUrl:p,ManageDomains:b,TagVisitsComparison:_,DomainVisitsComparison:w,ShortUrlVisitsComparison:x,ShortUrlRedirectRules:E}=Pn(j9),A=xr(),j=as(),{sidebarVisible:O,showSidebar:N,hideSidebar:U}=c3();T.useEffect(()=>U(),[A,U]);const V=Rye(N,U),Z=Xi("shortUrlRedirectRules");return v.jsxs(v.Fragment,{children:[t&&v.jsx(O9,{className:"fixed top-4 left-3 z-1035"}),v.jsx("div",{...V,className:"h-full",children:v.jsxs("div",{className:"h-full",children:[v.jsx(k1e,{routePrefix:j,showOnMobile:O}),v.jsx("div",{className:"min-h-full pt-[20px] md:pt-[30px] md:pl-(--aside-menu-width)",onPointerDown:U,children:v.jsx("div",{className:"container mx-auto px-3",children:v.jsxs(Nv,{children:[v.jsx(gt,{index:!0,element:v.jsx(V2,{replace:!0,to:"overview"})}),v.jsx(gt,{path:"/overview",element:v.jsx(m,{})}),v.jsx(gt,{path:"/list-short-urls/:page",element:v.jsx(r,{})}),v.jsx(gt,{path:"/create-short-url",element:v.jsx(i,{})}),v.jsx(gt,{path:"/short-code/:shortCode/visits",children:["","*"].map(X=>v.jsx(gt,{path:X,element:v.jsx(a,{})},X))}),v.jsx(gt,{path:"/short-code/:shortCode/edit",element:v.jsx(p,{})}),Z&&v.jsx(gt,{path:"/short-code/:shortCode/redirect-rules",element:v.jsx(E,{})}),v.jsx(gt,{path:"/short-urls/compare-visits",element:v.jsx(x,{})}),v.jsx(gt,{path:"/tag/:tag/visits",children:["","*"].map(X=>v.jsx(gt,{path:X,element:v.jsx(s,{})},X))}),v.jsx(gt,{path:"/tags/compare-visits",element:v.jsx(_,{})}),v.jsx(gt,{path:"/domain/:domain/visits",children:["","*"].map(X=>v.jsx(gt,{path:X,element:v.jsx(u,{})},X))}),v.jsx(gt,{path:"/orphan-visits",children:["","*"].map(X=>v.jsx(gt,{path:X,element:v.jsx(d,{})},X))}),v.jsx(gt,{path:"/non-orphan-visits",children:["","*"].map(X=>v.jsx(gt,{path:X,element:v.jsx(f,{})},X))}),v.jsx(gt,{path:"/manage-tags",element:v.jsx(n,{})}),v.jsx(gt,{path:"/manage-domains",element:v.jsx(b,{})}),v.jsx(gt,{path:"/domains/compare-visits",element:v.jsx(w,{})}),e&&v.jsx(gt,{path:"*",element:e("/list-short-urls/1")})]})})})]})})]})},I1e=Mn(j9,["TagsList","ShortUrlsList","CreateShortUrl","ShortUrlVisits","TagVisits","DomainVisits","OrphanVisits","NonOrphanVisits","Overview","EditShortUrl","ManageDomains","TagVisitsComparison","DomainVisitsComparison","ShortUrlVisitsComparison","ShortUrlRedirectRules"]),U1e=e=>jw({devTools:!1,reducer:Xv({mercureInfo:e.mercureInfoReducer,shortUrlsList:e.shortUrlsListReducer,shortUrlCreation:e.shortUrlCreationReducer,shortUrlDeletion:e.shortUrlDeletionReducer,shortUrlEdition:e.shortUrlEditionReducer,shortUrlsDetails:e.shortUrlsDetailsReducer,shortUrlVisits:e.shortUrlVisitsReducer,shortUrlVisitsDeletion:e.shortUrlVisitsDeletionReducer,shortUrlVisitsComparison:e.shortUrlVisitsComparisonReducer,tagVisits:e.tagVisitsReducer,tagVisitsComparison:e.tagVisitsComparisonReducer,domainVisits:e.domainVisitsReducer,domainVisitsComparison:e.domainVisitsComparisonReducer,orphanVisits:e.orphanVisitsReducer,orphanVisitsDeletion:e.orphanVisitsDeletionReducer,nonOrphanVisits:e.nonOrphanVisitsReducer,tagsList:e.tagsListReducer,tagDelete:e.tagDeleteReducer,tagEdit:e.tagEditReducer,domainsList:e.domainsListReducer,visitsOverview:e.visitsOverviewReducer,shortUrlRedirectRules:e.shortUrlRedirectRulesReducer,shortUrlRedirectRulesSaving:e.setShortUrlRedirectRulesReducer}),middleware:t=>t({immutableCheck:!1,serializableCheck:!1})}),B1e=e=>{e.factory("Main",I1e),e.factory("store",U1e)},Ta=new LR,{container:z1e}=Ta,F1e=e=>t=>Object.fromEntries(e.map(n=>[n,t[n]])),$1e=(e,t)=>(...n)=>e[t](...n),V1e=(e,t)=>({...e,[t]:$1e(z1e,t)}),kf=(e,t=[])=>lR(e?F1e(e):null,t.reduce(V1e,{}));B1e(Ta);vye(Ta,kf);zye(Ta,kf);D1e(Ta,kf);Qpe(Ta);Kpe(Ta,kf);lge(Ta,kf);Kye(Ta);Cve(Ta,kf);let W5;const H1e=e=>({serverVersion:t,apiClient:n,settings:r,routesPrefix:i="",createNotFound:a,tagColorsStorage:s,autoSidebarToggle:u=!0})=>{const d=Bpe(t),f=T.useRef(void 0),[m,p]=T.useState(),b=Uu(),_=T.useMemo(()=>b?T.Fragment:xR,[b]);return T.useEffect(()=>{W5=n,e.value("apiClientFactory",()=>W5),s&&e.value("TagColorsStorage",s);const{Main:w,store:x,loadMercureInfo:E,listTags:A,listDomains:j}=e.container;f.current=v.jsx(w,{createNotFound:a,autoToggleButton:u}),p(x),x.dispatch(E(r)),x.dispatch(A()),x.dispatch(j())},[n,u,a,r,s]),m?v.jsx(I2,{store:m,children:v.jsx(dL,{value:r??{},children:v.jsx(Upe,{value:d,children:v.jsx(T9,{children:v.jsx(Dpe,{value:i,children:v.jsx(_,{children:f.current})})})})})}):v.jsx(v.Fragment,{})},q1e="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=",G1e="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==",Y1e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",W1e=()=>{delete c5.Icon.Default.prototype._getIconUrl,c5.Icon.Default.mergeOptions({iconRetinaUrl:G1e,iconUrl:q1e,shadowUrl:Y1e})};W1e();const K1e=H1e(Ta),If=({children:e,className:t})=>v.jsx("div",{className:Ne("container mx-auto p-5 pt-8 max-md:p-3 max-md:py-4",t),children:e});function P9(e){const t=n=>{const{ServerError:r}=Sa(t),i=vf(),{selectServer:a,selectedServer:s}=n;return T.useEffect(()=>{i.serverId&&a(i.serverId)},[i.serverId,a]),s?o$(s)?v.jsx(r,{}):v.jsx(e,{...n}):v.jsx(If,{children:v.jsx(Vo,{loading:!0})})};return t}const M9=P9(T.memo(({selectedServer:e,settings:t})=>{const{buildShlinkApiClient:n,TagColorsStorage:r,ServerError:i}=Sa(M9);if(!X2(e))return v.jsx(i,{});const a=`/server/${e.id}`;return v.jsxs(T9,{children:[v.jsx(O9,{className:"fixed top-3.5 left-3 z-901"}),v.jsx(K1e,{serverVersion:e.version,apiClient:n(e),settings:t,routesPrefix:a,tagColorsStorage:r,createNotFound:s=>v.jsx(SN,{to:`${a}${s}`,children:"List short URLs"}),autoSidebarToggle:!1})]})})),Z1e=Ca(M9,["buildShlinkApiClient","TagColorsStorage","ServerError"]),X1e=(e,t)=>{e.constant("window",window),e.constant("console",console),e.constant("fetch",window.fetch.bind(window)),e.service("HttpClient",IZ,"fetch"),e.serviceFactory("ScrollToTop",()=>$Z),e.factory("MainHeader",FZ),e.serviceFactory("Home",()=>zZ),e.decorator("Home",Vg),e.decorator("Home",t(["servers"],["resetSelectedServer"])),e.factory("ShlinkWebComponentContainer",Z1e),e.decorator("ShlinkWebComponentContainer",t(["selectedServer","settings"],["selectServer"])),e.serviceFactory("ShlinkVersionsContainer",()=>QZ),e.decorator("ShlinkVersionsContainer",t(["selectedServer"])),e.serviceFactory("ErrorHandler",()=>UZ)},R9=()=>{const e=Qa();return T.useCallback(()=>e(-1),[e])};function Q1e(e){let t=e.url;try{const{host:n,pathname:r}=new URL(t);t=n;const i=r.substring(1);i.length>0&&(t=`${t} ${i}`)}catch{}return`${e.name} ${t}`.toLowerCase().replace(/[^a-zA-Z0-9-_.~]/g,"-")}function J1e(e){const t={};return e.forEach(n=>{t[n.id]=n}),t}const ebe=(e,{url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n);function tbe(e,t){const n=Object.values(e),{duplicatedServers:r=[],newServers:i=[]}=eL(t,a=>ebe(n,a)?"duplicatedServers":"newServers");return{duplicatedServers:r,newServers:i}}function Mv(e,t){const n=new Set(Object.keys(e)),r=[];return t.forEach(i=>{const a=Q1e(i);let s=a,u=1;for(;n.has(s);)s=`${a}-${u}`,u++;r.push({...i,id:s}),n.add(s)}),r}const N9=({open:e,duplicatedServers:t,onClose:n,onConfirm:r})=>{const i=t.length>1;return v.jsxs(Ja,{size:"lg",title:`Duplicated server${i?"s":""}`,open:e,onClose:n,onConfirm:r,confirmText:`Save duplicate${i?"s":""}`,cancelText:i?"Ignore duplicates":"Discard",children:[v.jsx("p",{children:i?"The next servers already exist:":"There is already a server with:"}),v.jsx("ul",{className:"list-disc mt-4",children:t.map(({url:a,apiKey:s},u)=>i?v.jsxs("li",{children:[v.jsx("b",{children:a})," - ",v.jsx("b",{children:s})]},u):v.jsxs(T.Fragment,{children:[v.jsxs("li",{children:["URL: ",v.jsx("b",{children:a})]}),v.jsxs("li",{children:["API key: ",v.jsx("b",{children:s})]})]},u))}),v.jsxs("span",{children:[i?"Do you want to save duplicated servers":"Do you want to save this server","?"]})]})},nbe=e=>T.useCallback(t=>{t.preventDefault(),e(t)},[e]),L9=({onSubmit:e,initialValues:t,children:n,title:r})=>{const[i,a]=T.useState(t?.name??""),[s,u]=T.useState(t?.url??""),[d,f]=T.useState(t?.apiKey??""),{flag:m,toggle:p}=Sn(t?.forwardCredentials??!1),b=nbe(()=>e({name:i,url:s,apiKey:d,forwardCredentials:m}));return v.jsxs("form",{name:"serverForm",onSubmit:b,children:[v.jsxs(Pt,{className:"mb-4",bodyClassName:"flex flex-col gap-y-3",title:r,children:[v.jsx(ti,{label:"Name",value:i,onChange:_=>a(_.target.value),required:!0}),v.jsx(ti,{label:"URL",type:"url",value:s,onChange:_=>u(_.target.value),required:!0}),v.jsx(MW,{label:"API key",value:d,onChange:_=>f(_.target.value),required:!0}),v.jsx(yW,{summary:"Advanced options",children:v.jsxs("div",{className:"flex flex-col gap-0.5",children:[v.jsxs(wa,{className:"flex items-center gap-x-1.5 cursor-pointer",children:[v.jsx(bw,{onChange:p,checked:m}),"Forward credentials to this server on every request."]}),v.jsxs("small",{className:"pl-5.5 text-gray-600 dark:text-gray-400 mt-0.5",children:['"',"Credentials",'"'," here means cookies, TLS client certificates, or authentication headers containing a username and password."]}),v.jsxs("small",{className:"pl-5.5 text-gray-600 dark:text-gray-400",children:[v.jsx("b",{children:"Important!"})," If you are not sure what this means, leave it unchecked. Enabling this option will make all requests fail for Shlink older than v4.5.0, as it requires the server to set a more strict value for ",v.jsx("code",{className:"whitespace-nowrap",children:"Access-Control-Allow-Origin"})," than ",v.jsx("code",{children:"*"}),"."]})]})})]}),v.jsx("div",{className:"flex items-center justify-end gap-x-2",children:n})]})},K5=4e3,Z5=({variant:e})=>v.jsx("div",{className:"mt-4",children:v.jsxs(zr,{variant: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."]})}),D9=({servers:e,createServers:t})=>{const{ImportServersBtn:n,useTimeoutToggle:r}=Sa(D9),i=Qa(),a=R9(),s=!!Object.keys(e).length,[u,d]=r({delay:K5}),[f,m]=r({delay:K5}),{flag:p,toggle:b}=Sn(),[_,w]=T.useState(),x=T.useCallback(A=>{const[j]=Mv(e,[A]);t([j]),i(`/server/${j.id}`)},[t,i,e]),E=T.useCallback(A=>{w(A),Object.values(e).some(({url:O,apiKey:N})=>A.url===O&&A.apiKey===N)?b():x(A)},[x,e,b]);return v.jsxs(If,{children:[v.jsxs(L9,{title:"Add new server",onSubmit:E,children:[!s&&v.jsx(n,{tooltipPlacement:"top",onImport:d,onError:m}),s&&v.jsx(Mt,{variant:"secondary",onClick:a,children:"Cancel"}),v.jsx(Mt,{type:"submit",children:"Create server"})]}),u&&v.jsx(Z5,{variant:"success"}),f&&v.jsx(Z5,{variant:"error"}),v.jsx(N9,{open:p,duplicatedServers:_?[_]:[],onClose:a,onConfirm:()=>_&&x(_)})]})},rbe=Ca(D9,["ImportServersBtn","useTimeoutToggle"]),k9=({server:e,children:t})=>{const{DeleteServerModal:n}=Sa(k9),{flag:r,setToTrue:i,setToFalse:a}=Sn(),s=Qa(),u=T.useCallback(d=>{a(),d&&s("/")},[a,s]);return v.jsxs(v.Fragment,{children:[v.jsx("button",{type:"button",className:"text-danger hover:underline",onClick:i,children:t}),v.jsx(n,{server:e,open:r,onClose:u})]})},ibe=Ca(k9,["DeleteServerModal"]),abe=({server:e,onClose:t,open:n,deleteServer:r})=>{const i=T.useCallback(a=>{a==="confirm"&&r(e)},[r,e]);return v.jsx(Ja,{open:n,title:"Remove server",variant:"danger",onClose:()=>t(!1),onConfirm:()=>t(!0),onClosed:i,confirmText:"Delete",children:v.jsxs("div",{className:"flex flex-col gap-y-4",children:[v.jsxs("p",{children:["Are you sure you want to remove ",v.jsx("b",{children:e?e.name:""}),"?"]}),v.jsx("p",{children:v.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."})})]})})},obe=P9(({editServer:e,selectedServer:t,selectServer:n})=>{const r=R9(),{reconnect:i}=wf();if(!ah(t))return null;const a=s=>{e(t.id,s),i==="true"&&n(t.id),r()};return v.jsx(If,{children:v.jsxs(L9,{title:v.jsxs(v.Fragment,{children:['Edit "',t.name,'"']}),initialValues:t,onSubmit:a,children:[v.jsx(Mt,{variant:"secondary",onClick:r,children:"Cancel"}),v.jsx(Mt,{type:"submit",children:"Save"})]})})}),sbe=Ca(obe,["ServerError"]),I9=({createServers:e,servers:t,children:n,onImport:r,onError:i=()=>{},tooltipPlacement:a="bottom",className:s=""})=>{const{ServersImporter:u}=Sa(I9),d=T.useRef(null),{anchor:f,tooltip:m}=eo({placement:a}),[p,b]=T.useState([]),{flag:_,setToTrue:w,setToFalse:x}=Sn(),E=T.useRef(!1),A=T.useCallback(async({target:N})=>u.importServersFromFile(N.files?.[0]).then(U=>{const{duplicatedServers:V,newServers:Z}=tbe(t,U);E.current=Z.length>0,e(Mv(t,Z)),V.length>0?(b(V),w()):r?.()}).then(()=>{N.value=null}).catch(i),[e,i,r,t,u,w]),j=T.useCallback(()=>{e(Mv(t,p)),x(),r?.()},[e,p,x,r,t]),O=T.useCallback(()=>{x(),E.current&&r?.()},[x,r]);return v.jsxs(v.Fragment,{children:[v.jsxs(Mt,{variant:"secondary",className:s,onClick:()=>d.current?.click(),...f,children:[v.jsx(Ye,{icon:L$,widthAuto:!0})," ",n??"Import from file"]}),v.jsxs(to,{...m,children:["You can create servers by importing a CSV file with ",v.jsx("b",{children:"name"}),", ",v.jsx("b",{children:"apiKey"})," and ",v.jsx("b",{children:"url"})," columns."]}),v.jsx("input",{type:"file",accept:".csv",className:"hidden","aria-hidden":!0,tabIndex:-1,ref:d,onChange:A,"data-testid":"csv-file-input"}),v.jsx(N9,{open:_,duplicatedServers:p,onClose:O,onConfirm:j})]})},lbe=Ca(I9,["ServersImporter"]),U9=({servers:e,selectedServer:t})=>{const{DeleteServerButton:n}=Sa(U9);return v.jsx(If,{children:v.jsxs("div",{className:"flex flex-col items-center gap-y-4 md:gap-y-8",children:[v.jsxs(Vo,{className:"w-full lg:w-[80%]",variant:"error",children:[!ah(t)&&"Could not find this Shlink server.",ah(t)&&v.jsxs(v.Fragment,{children:[v.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."]})]}),v.jsxs("p",{className:"text-xl",children:["These are the Shlink servers currently configured. Choose one of them or ",v.jsx(Mr,{to:"/server/create",children:"add a new one"}),"."]}),v.jsx(un,{className:"w-full max-w-100 overflow-hidden",children:v.jsx(ZN,{borderless:!0,servers:Object.values(e)})}),ah(t)&&v.jsxs("p",{className:"text-xl",children:["Alternatively, if you think you may have misconfigured this server, you can ",v.jsx(n,{server:t,children:"remove it"})," or ",v.jsx(Mr,{to:`/server/${t.id}/edit?reconnect=true`,children:"edit it"}),"."]})]})})},ube=Ca(U9,["DeleteServerButton"]),cbe=4e3,B9=({servers:e})=>{const{ServersExporter:t,ImportServersBtn:n,useTimeoutToggle:r,ManageServersRow:i}=Sa(B9),[a,s]=T.useState(""),u=T.useMemo(()=>Object.values(e),[e]),d=T.useMemo(()=>u.filter(({name:b,url:_})=>`${b} ${_}`.toLowerCase().match(a.toLowerCase())),[u,a]),f=u.some(({autoConnect:b})=>!!b),[m,p]=r({delay:cbe});return v.jsxs(If,{className:"flex flex-col gap-y-4",children:[v.jsx(xf,{onChange:s}),v.jsxs("div",{className:"flex flex-col md:flex-row gap-2",children:[v.jsxs("div",{className:"flex gap-2",children:[v.jsx(n,{className:"flex-grow",onError:p,children:"Import servers"}),d.length>0&&v.jsxs(Mt,{variant:"secondary",className:"flex-grow",onClick:async()=>t.exportServers(),children:[v.jsx(Ye,{icon:UR,widthAuto:!0})," Export servers"]})]}),v.jsxs(Mt,{className:"md:ml-auto",to:"/server/create",children:[v.jsx(Ye,{icon:kh,widthAuto:!0})," Add a server"]})]}),v.jsx(Pt,{className:"card",children:v.jsxs(Ke,{header:v.jsxs(Ke.Row,{children:[f&&v.jsx(Ke.Cell,{className:"w-[35px]",children:v.jsx("span",{className:"sr-only",children:"Auto-connect"})}),v.jsx(Ke.Cell,{children:"Name"}),v.jsx(Ke.Cell,{children:"Base URL"}),v.jsx(Ke.Cell,{children:v.jsx("span",{className:"sr-only",children:"Options"})})]}),children:[!d.length&&v.jsx(Ke.Row,{className:"text-center",children:v.jsx(Ke.Cell,{colSpan:4,children:"No servers found."})}),d.map(b=>v.jsx(i,{server:b,hasAutoConnect:f},b.id))]})}),m&&v.jsx("div",{children:v.jsx(zr,{variant:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})},fbe=Ca(B9,["ServersExporter","ImportServersBtn","useTimeoutToggle","ManageServersRow"]),z9=({server:e,hasAutoConnect:t})=>{const{ManageServersRowDropdown:n}=Sa(z9),{anchor:r,tooltip:i}=eo();return v.jsxs(Ke.Row,{className:"relative",children:[t&&v.jsx(Ke.Cell,{columnName:"Auto-connect",children:e.autoConnect&&v.jsxs(v.Fragment,{children:[v.jsx(Ye,{icon:Au,className:"text-lm-brand dark:text-dm-brand",...r}),v.jsx(to,{...i,children:"Auto-connect to this server"})]})}),v.jsx(Ke.Cell,{className:"font-bold",columnName:"Name",children:v.jsx(Mr,{to:`/server/${e.id}`,children:e.name})}),v.jsx(Ke.Cell,{columnName:"Base URL",className:"max-lg:border-b-0",children:e.url}),v.jsx(Ke.Cell,{className:"text-right max-lg:absolute right-0 -top-1 mx-lg:pt-0",children:v.jsx(n,{server:e})})]})},dbe=Ca(z9,["ManageServersRowDropdown"]),F9=({server:e,setAutoConnect:t})=>{const{DeleteServerModal:n}=Sa(F9),{flag:r,setToTrue:i,setToFalse:a}=Sn(),s=`/server/${e.id}`,{autoConnect:u}=e,d=u?A$:pW;return v.jsxs(v.Fragment,{children:[v.jsxs(an,{menuAlignment:"right",children:[v.jsxs(an.Item,{to:s,className:"gap-1.5",children:[v.jsx(Ye,{icon:K$})," Connect"]}),v.jsxs(an.Item,{to:`${s}/edit`,className:"gap-1.5",children:[v.jsx(Ye,{icon:J2})," Edit server"]}),v.jsxs(an.Item,{onClick:()=>t(e,!u),className:"gap-1.5",children:[v.jsx(Ye,{icon:d})," ",u?"Do not a":"A","uto-connect"]}),v.jsx(an.Separator,{}),v.jsxs(an.Item,{className:"[&]:text-danger gap-1.5",onClick:i,children:[v.jsx(Ye,{icon:HR})," Remove server"]})]}),v.jsx(n,{server:e,open:r,onClose:a})]})},hbe=Ca(F9,["DeleteServerModal"]),$9=(e,t)=>BN(e,t,{serializeError:n=>n}),mbe={},{actions:pbe,reducer:gbe}=Rt({name:"shlink/servers",initialState:mbe,reducers:{editServer:{prepare:(e,t)=>({payload:{serverId:e,serverData:t}}),reducer:(e,{payload:t})=>{const{serverId:n,serverData:r}=t;return e[n]?{...e,[n]:{...e[n],...r}}:e}},deleteServer:(e,{payload:t})=>(delete e[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?Object.fromEntries(Object.entries(e).map(([i,a])=>[i,{...a,autoConnect:i===n}])):{...e,[n]:{...e[n],autoConnect:r}}:e}},createServers:{prepare:e=>({payload:J1e(e)}),reducer:(e,{payload:t})=>({...e,...t})}}}),{editServer:vbe,deleteServer:ybe,setAutoConnect:bbe,createServers:V9}=pbe,_be=gbe,xbe=e=>Mv({},Array.isArray(e)?e.filter(DR):[]),wbe=e=>$9("shlink/remoteServers/fetchServers",async(t,{dispatch:n})=>{const r=await e.jsonRequest(`${Cg.homepage}/servers.json`),i=xbe(r);n(V9(i))}),f3="shlink/selectedServer",Sbe="1.0.0",Cbe="999.999.999",Ebe="latest",Abe=e=>oL(e===Ebe?Cbe:e,Sbe),Tbe=tL(e=>`${e.id}_${e.url}_${e.apiKey}`,async(e,t)=>t().then(({version:n})=>({version:Abe(n),printableVersion:aL(n)}))),X5=null,d3=fn(`${f3}/resetSelectedServer`),Obe=e=>$9(`${f3}/selectServer`,async(t,{dispatch:n,getState:r})=>{n(d3());const{servers:i}=r(),a=i[t];if(!a)return{serverNotFound:!0};try{const s=e(a),{version:u,printableVersion:d}=await Tbe(a,()=>s.health());return{...a,version:u,printableVersion:d}}catch{return{...a,serverNotReachable:!0}}}),jbe=e=>Rt({name:f3,initialState:X5,reducers:{},extraReducers:t=>{t.addCase(d3,()=>X5),t.addCase(e.fulfilled,(n,{payload:r})=>r)}}),Pbe=({servers:e,selectedServer:t})=>{const n=Object.values(e);return v.jsx(Ax.Dropdown,{buttonContent:v.jsxs("span",{className:"flex items-center gap-1.5",children:[v.jsx(Ye,{icon:TA})," Servers"]}),children:n.length===0?v.jsxs(Qe.Item,{to:"/server/create",children:[v.jsx(Ye,{icon:kh})," Add a server"]}):v.jsxs(v.Fragment,{children:[n.map(({name:r,id:i})=>v.jsx(Qe.Item,{to:`/server/${i}`,selected:s$(t)===i,children:r},i)),v.jsx(Qe.Separator,{}),v.jsxs(Qe.Item,{to:"/manage-servers",children:[v.jsx(Ye,{icon:TA})," Manage servers"]})]})})},Mbe=({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)},Rbe=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);Mbe(e,i,n)},Nbe="shlink-servers.csv";class Lbe{#t;#r;#n;constructor(t,n,r){this.#t=t,this.#r=n,this.#n=r}exportServers=async()=>{const t=Object.values(this.#t.get("servers")??{}).map(l$);try{const n=this.#n(t);Rbe(this.#r,n,Nbe)}catch(n){console.error(n)}}}const Dbe=e=>{if(!Array.isArray(e))throw new Error("Provided file does not have the right format.");return e.map(c$)};class kbe{#t;constructor(t){this.#t=t}async importServersFromFile(t){if(!t)throw new Error("No file provided");const n=await t.text(),r=await this.#t(n);return Dbe(r)}}const Ibe=(e,t)=>{e.factory("ManageServers",fbe),e.decorator("ManageServers",Vg),e.decorator("ManageServers",t(["selectedServer","servers"],["resetSelectedServer"])),e.factory("ManageServersRow",dbe),e.factory("ManageServersRowDropdown",hbe),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.factory("CreateServer",rbe),e.decorator("CreateServer",Vg),e.decorator("CreateServer",t(["selectedServer","servers"],["createServers","resetSelectedServer"])),e.factory("EditServer",sbe),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer","resetSelectedServer"])),e.serviceFactory("ServersDropdown",()=>Pbe),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",()=>abe),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.factory("DeleteServerButton",ibe),e.factory("ImportServersBtn",lbe),e.decorator("ImportServersBtn",t(["servers"],["createServers"])),e.factory("ServerError",ube),e.decorator("ServerError",t(["servers","selectedServer"])),e.service("ServersImporter",kbe,"csvToJson"),e.service("ServersExporter",Lbe,"Storage","window","jsonToCsv"),e.serviceFactory("selectServer",Obe,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServers",()=>V9),e.serviceFactory("deleteServer",()=>ybe),e.serviceFactory("editServer",()=>vbe),e.serviceFactory("setAutoConnect",()=>bbe),e.serviceFactory("fetchServers",wbe,"HttpClient"),e.serviceFactory("resetSelectedServer",()=>d3),e.serviceFactory("selectedServerReducerCreator",jbe,"selectServer"),e.serviceFactory("selectedServerReducer",n=>n.reducer,"selectedServerReducerCreator")},H9={field:"dateCreated",dir:"DESC"},Ube={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:Ew()},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:H9}},{reducer:Bbe,actions:zbe}=Rt({name:"shlink/settings",initialState:Ube,reducers:{setSettings:(e,{payload:t})=>Sf(e,t)}}),{setSettings:Fbe}=zbe,$be=Bbe,Vbe=({settings:e,setSettings:t})=>v.jsx(If,{children:v.jsx(vX,{settings:e,onUpdateSettings:t,defaultShortUrlsListOrdering:H9})}),Hbe=(e,t)=>{e.serviceFactory("Settings",()=>Vbe),e.decorator("Settings",Vg),e.decorator("Settings",t(["settings"],["setSettings","resetSelectedServer"])),e.serviceFactory("setSettings",()=>Fbe)};var nx,Q5;function qbe(){return Q5||(Q5=1,nx=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,a){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:a})},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 a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var s in r)n.d(a,s,(function(u){return r[u]}).bind(null,s));return a},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(w){var x=[];for(var E in w)x.push(E);return x};e.exports=p;var a=n(5);a.inherits=n(2);var s=n(23),u=n(14);a.inherits(p,s);for(var d=i(u.prototype),f=0;f<d.length;f++){var m=d[f];p.prototype[m]||(p.prototype[m]=u.prototype[m])}function p(w){if(!(this instanceof p))return new p(w);s.call(this,w),u.call(this,w),w&&w.readable===!1&&(this.readable=!1),w&&w.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,w&&w.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",b)}function b(){this.allowHalfOpen||this._writableState.ended||r.nextTick(_,this)}function _(w){w.end()}Object.defineProperty(p.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(p.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(w){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=w,this._writableState.destroyed=w)}}),p.prototype._destroy=function(w,x){this.push(null),this.end(),r.nextTick(x,w)}},function(e,t){typeof Object.create=="function"?e.exports=function(n,r){n.super_=r,n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(n,r){n.super_=r;var i=function(){};i.prototype=r.prototype,n.prototype=new i,n.prototype.constructor=n}},function(e,t,n){(function(r){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/var i=n(38),a=n(39),s=n(40);function u(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function d(k,F){if(u()<F)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(k=new Uint8Array(F)).__proto__=f.prototype:(k===null&&(k=new f(F)),k.length=F),k}function f(k,F,G){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(k,F,G);if(typeof k=="number"){if(typeof F=="string")throw new Error("If encoding is specified then the first argument must be a string");return b(this,k)}return m(this,k,F,G)}function m(k,F,G,le){if(typeof F=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&F instanceof ArrayBuffer?function(H,ae,fe,ge){if(ae.byteLength,fe<0||ae.byteLength<fe)throw new RangeError("'offset' is out of bounds");if(ae.byteLength<fe+(ge||0))throw new RangeError("'length' is out of bounds");return ae=fe===void 0&&ge===void 0?new Uint8Array(ae):ge===void 0?new Uint8Array(ae,fe):new Uint8Array(ae,fe,ge),f.TYPED_ARRAY_SUPPORT?(H=ae).__proto__=f.prototype:H=_(H,ae),H}(k,F,G,le):typeof F=="string"?function(H,ae,fe){if(typeof fe=="string"&&fe!==""||(fe="utf8"),!f.isEncoding(fe))throw new TypeError('"encoding" must be a valid string encoding');var ge=0|x(ae,fe),de=(H=d(H,ge)).write(ae,fe);return de!==ge&&(H=H.slice(0,de)),H}(k,F,G):function(H,ae){if(f.isBuffer(ae)){var fe=0|w(ae.length);return(H=d(H,fe)).length===0||ae.copy(H,0,0,fe),H}if(ae){if(typeof ArrayBuffer<"u"&&ae.buffer instanceof ArrayBuffer||"length"in ae)return typeof ae.length!="number"||function(ge){return ge!=ge}(ae.length)?d(H,0):_(H,ae);if(ae.type==="Buffer"&&s(ae.data))return _(H,ae.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(k,F)}function p(k){if(typeof k!="number")throw new TypeError('"size" argument must be a number');if(k<0)throw new RangeError('"size" argument must not be negative')}function b(k,F){if(p(F),k=d(k,F<0?0:0|w(F)),!f.TYPED_ARRAY_SUPPORT)for(var G=0;G<F;++G)k[G]=0;return k}function _(k,F){var G=F.length<0?0:0|w(F.length);k=d(k,G);for(var le=0;le<G;le+=1)k[le]=255&F[le];return k}function w(k){if(k>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|k}function x(k,F){if(f.isBuffer(k))return k.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(k)||k instanceof ArrayBuffer))return k.byteLength;typeof k!="string"&&(k=""+k);var G=k.length;if(G===0)return 0;for(var le=!1;;)switch(F){case"ascii":case"latin1":case"binary":return G;case"utf8":case"utf-8":case void 0:return ue(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*G;case"hex":return G>>>1;case"base64":return ce(k).length;default:if(le)return ue(k).length;F=(""+F).toLowerCase(),le=!0}}function E(k,F,G){var le=k[F];k[F]=k[G],k[G]=le}function A(k,F,G,le,H){if(k.length===0)return-1;if(typeof G=="string"?(le=G,G=0):G>2147483647?G=2147483647:G<-2147483648&&(G=-2147483648),G=+G,isNaN(G)&&(G=H?0:k.length-1),G<0&&(G=k.length+G),G>=k.length){if(H)return-1;G=k.length-1}else if(G<0){if(!H)return-1;G=0}if(typeof F=="string"&&(F=f.from(F,le)),f.isBuffer(F))return F.length===0?-1:j(k,F,G,le,H);if(typeof F=="number")return F&=255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?H?Uint8Array.prototype.indexOf.call(k,F,G):Uint8Array.prototype.lastIndexOf.call(k,F,G):j(k,[F],G,le,H);throw new TypeError("val must be string, number or Buffer")}function j(k,F,G,le,H){var ae,fe=1,ge=k.length,de=F.length;if(le!==void 0&&((le=String(le).toLowerCase())==="ucs2"||le==="ucs-2"||le==="utf16le"||le==="utf-16le")){if(k.length<2||F.length<2)return-1;fe=2,ge/=2,de/=2,G/=2}function _e(Be,He){return fe===1?Be[He]:Be.readUInt16BE(He*fe)}if(H){var Te=-1;for(ae=G;ae<ge;ae++)if(_e(k,ae)===_e(F,Te===-1?0:ae-Te)){if(Te===-1&&(Te=ae),ae-Te+1===de)return Te*fe}else Te!==-1&&(ae-=ae-Te),Te=-1}else for(G+de>ge&&(G=ge-de),ae=G;ae>=0;ae--){for(var Le=!0,qe=0;qe<de;qe++)if(_e(k,ae+qe)!==_e(F,qe)){Le=!1;break}if(Le)return ae}return-1}function O(k,F,G,le){G=Number(G)||0;var H=k.length-G;le?(le=Number(le))>H&&(le=H):le=H;var ae=F.length;if(ae%2!=0)throw new TypeError("Invalid hex string");le>ae/2&&(le=ae/2);for(var fe=0;fe<le;++fe){var ge=parseInt(F.substr(2*fe,2),16);if(isNaN(ge))return fe;k[G+fe]=ge}return fe}function N(k,F,G,le){return ve(ue(F,k.length-G),k,G,le)}function U(k,F,G,le){return ve(function(H){for(var ae=[],fe=0;fe<H.length;++fe)ae.push(255&H.charCodeAt(fe));return ae}(F),k,G,le)}function V(k,F,G,le){return U(k,F,G,le)}function Z(k,F,G,le){return ve(ce(F),k,G,le)}function X(k,F,G,le){return ve(function(H,ae){for(var fe,ge,de,_e=[],Te=0;Te<H.length&&!((ae-=2)<0);++Te)ge=(fe=H.charCodeAt(Te))>>8,de=fe%256,_e.push(de),_e.push(ge);return _e}(F,k.length-G),k,G,le)}function oe(k,F,G){return F===0&&G===k.length?i.fromByteArray(k):i.fromByteArray(k.slice(F,G))}function ee(k,F,G){G=Math.min(k.length,G);for(var le=[],H=F;H<G;){var ae,fe,ge,de,_e=k[H],Te=null,Le=_e>239?4:_e>223?3:_e>191?2:1;if(H+Le<=G)switch(Le){case 1:_e<128&&(Te=_e);break;case 2:(192&(ae=k[H+1]))==128&&(de=(31&_e)<<6|63&ae)>127&&(Te=de);break;case 3:ae=k[H+1],fe=k[H+2],(192&ae)==128&&(192&fe)==128&&(de=(15&_e)<<12|(63&ae)<<6|63&fe)>2047&&(de<55296||de>57343)&&(Te=de);break;case 4:ae=k[H+1],fe=k[H+2],ge=k[H+3],(192&ae)==128&&(192&fe)==128&&(192&ge)==128&&(de=(15&_e)<<18|(63&ae)<<12|(63&fe)<<6|63&ge)>65535&&de<1114112&&(Te=de)}Te===null?(Te=65533,Le=1):Te>65535&&(Te-=65536,le.push(Te>>>10&1023|55296),Te=56320|1023&Te),le.push(Te),H+=Le}return function(qe){var Be=qe.length;if(Be<=J)return String.fromCharCode.apply(String,qe);for(var He="",be=0;be<Be;)He+=String.fromCharCode.apply(String,qe.slice(be,be+=J));return He}(le)}t.Buffer=f,t.SlowBuffer=function(k){return+k!=k&&(k=0),f.alloc(+k)},t.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=r.TYPED_ARRAY_SUPPORT!==void 0?r.TYPED_ARRAY_SUPPORT:function(){try{var k=new Uint8Array(1);return k.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},k.foo()===42&&typeof k.subarray=="function"&&k.subarray(1,1).byteLength===0}catch{return!1}}(),t.kMaxLength=u(),f.poolSize=8192,f._augment=function(k){return k.__proto__=f.prototype,k},f.from=function(k,F,G){return m(null,k,F,G)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(k,F,G){return function(le,H,ae,fe){return p(H),H<=0?d(le,H):ae!==void 0?typeof fe=="string"?d(le,H).fill(ae,fe):d(le,H).fill(ae):d(le,H)}(null,k,F,G)},f.allocUnsafe=function(k){return b(null,k)},f.allocUnsafeSlow=function(k){return b(null,k)},f.isBuffer=function(k){return!(k==null||!k._isBuffer)},f.compare=function(k,F){if(!f.isBuffer(k)||!f.isBuffer(F))throw new TypeError("Arguments must be Buffers");if(k===F)return 0;for(var G=k.length,le=F.length,H=0,ae=Math.min(G,le);H<ae;++H)if(k[H]!==F[H]){G=k[H],le=F[H];break}return G<le?-1:le<G?1:0},f.isEncoding=function(k){switch(String(k).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(k,F){if(!s(k))throw new TypeError('"list" argument must be an Array of Buffers');if(k.length===0)return f.alloc(0);var G;if(F===void 0)for(F=0,G=0;G<k.length;++G)F+=k[G].length;var le=f.allocUnsafe(F),H=0;for(G=0;G<k.length;++G){var ae=k[G];if(!f.isBuffer(ae))throw new TypeError('"list" argument must be an Array of Buffers');ae.copy(le,H),H+=ae.length}return le},f.byteLength=x,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var k=this.length;if(k%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var F=0;F<k;F+=2)E(this,F,F+1);return this},f.prototype.swap32=function(){var k=this.length;if(k%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var F=0;F<k;F+=4)E(this,F,F+3),E(this,F+1,F+2);return this},f.prototype.swap64=function(){var k=this.length;if(k%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var F=0;F<k;F+=8)E(this,F,F+7),E(this,F+1,F+6),E(this,F+2,F+5),E(this,F+3,F+4);return this},f.prototype.toString=function(){var k=0|this.length;return k===0?"":arguments.length===0?ee(this,0,k):(function(F,G,le){var H=!1;if((G===void 0||G<0)&&(G=0),G>this.length||((le===void 0||le>this.length)&&(le=this.length),le<=0)||(le>>>=0)<=(G>>>=0))return"";for(F||(F="utf8");;)switch(F){case"hex":return Q(this,G,le);case"utf8":case"utf-8":return ee(this,G,le);case"ascii":return ne(this,G,le);case"latin1":case"binary":return he(this,G,le);case"base64":return oe(this,G,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return se(this,G,le);default:if(H)throw new TypeError("Unknown encoding: "+F);F=(F+"").toLowerCase(),H=!0}}).apply(this,arguments)},f.prototype.equals=function(k){if(!f.isBuffer(k))throw new TypeError("Argument must be a Buffer");return this===k||f.compare(this,k)===0},f.prototype.inspect=function(){var k="",F=t.INSPECT_MAX_BYTES;return this.length>0&&(k=this.toString("hex",0,F).match(/.{2}/g).join(" "),this.length>F&&(k+=" ... ")),"<Buffer "+k+">"},f.prototype.compare=function(k,F,G,le,H){if(!f.isBuffer(k))throw new TypeError("Argument must be a Buffer");if(F===void 0&&(F=0),G===void 0&&(G=k?k.length:0),le===void 0&&(le=0),H===void 0&&(H=this.length),F<0||G>k.length||le<0||H>this.length)throw new RangeError("out of range index");if(le>=H&&F>=G)return 0;if(le>=H)return-1;if(F>=G)return 1;if(F>>>=0,G>>>=0,le>>>=0,H>>>=0,this===k)return 0;for(var ae=H-le,fe=G-F,ge=Math.min(ae,fe),de=this.slice(le,H),_e=k.slice(F,G),Te=0;Te<ge;++Te)if(de[Te]!==_e[Te]){ae=de[Te],fe=_e[Te];break}return ae<fe?-1:fe<ae?1:0},f.prototype.includes=function(k,F,G){return this.indexOf(k,F,G)!==-1},f.prototype.indexOf=function(k,F,G){return A(this,k,F,G,!0)},f.prototype.lastIndexOf=function(k,F,G){return A(this,k,F,G,!1)},f.prototype.write=function(k,F,G,le){if(F===void 0)le="utf8",G=this.length,F=0;else if(G===void 0&&typeof F=="string")le=F,G=this.length,F=0;else{if(!isFinite(F))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");F|=0,isFinite(G)?(G|=0,le===void 0&&(le="utf8")):(le=G,G=void 0)}var H=this.length-F;if((G===void 0||G>H)&&(G=H),k.length>0&&(G<0||F<0)||F>this.length)throw new RangeError("Attempt to write outside buffer bounds");le||(le="utf8");for(var ae=!1;;)switch(le){case"hex":return O(this,k,F,G);case"utf8":case"utf-8":return N(this,k,F,G);case"ascii":return U(this,k,F,G);case"latin1":case"binary":return V(this,k,F,G);case"base64":return Z(this,k,F,G);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,k,F,G);default:if(ae)throw new TypeError("Unknown encoding: "+le);le=(""+le).toLowerCase(),ae=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var J=4096;function ne(k,F,G){var le="";G=Math.min(k.length,G);for(var H=F;H<G;++H)le+=String.fromCharCode(127&k[H]);return le}function he(k,F,G){var le="";G=Math.min(k.length,G);for(var H=F;H<G;++H)le+=String.fromCharCode(k[H]);return le}function Q(k,F,G){var le=k.length;(!F||F<0)&&(F=0),(!G||G<0||G>le)&&(G=le);for(var H="",ae=F;ae<G;++ae)H+=re(k[ae]);return H}function se(k,F,G){for(var le=k.slice(F,G),H="",ae=0;ae<le.length;ae+=2)H+=String.fromCharCode(le[ae]+256*le[ae+1]);return H}function W(k,F,G){if(k%1!=0||k<0)throw new RangeError("offset is not uint");if(k+F>G)throw new RangeError("Trying to access beyond buffer length")}function B(k,F,G,le,H,ae){if(!f.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(F>H||F<ae)throw new RangeError('"value" argument is out of bounds');if(G+le>k.length)throw new RangeError("Index out of range")}function I(k,F,G,le){F<0&&(F=65535+F+1);for(var H=0,ae=Math.min(k.length-G,2);H<ae;++H)k[G+H]=(F&255<<8*(le?H:1-H))>>>8*(le?H:1-H)}function z(k,F,G,le){F<0&&(F=4294967295+F+1);for(var H=0,ae=Math.min(k.length-G,4);H<ae;++H)k[G+H]=F>>>8*(le?H:3-H)&255}function M(k,F,G,le,H,ae){if(G+le>k.length)throw new RangeError("Index out of range");if(G<0)throw new RangeError("Index out of range")}function D(k,F,G,le,H){return H||M(k,0,G,4),a.write(k,F,G,le,23,4),G+4}function Y(k,F,G,le,H){return H||M(k,0,G,8),a.write(k,F,G,le,52,8),G+8}f.prototype.slice=function(k,F){var G,le=this.length;if(k=~~k,F=F===void 0?le:~~F,k<0?(k+=le)<0&&(k=0):k>le&&(k=le),F<0?(F+=le)<0&&(F=0):F>le&&(F=le),F<k&&(F=k),f.TYPED_ARRAY_SUPPORT)(G=this.subarray(k,F)).__proto__=f.prototype;else{var H=F-k;G=new f(H,void 0);for(var ae=0;ae<H;++ae)G[ae]=this[ae+k]}return G},f.prototype.readUIntLE=function(k,F,G){k|=0,F|=0,G||W(k,F,this.length);for(var le=this[k],H=1,ae=0;++ae<F&&(H*=256);)le+=this[k+ae]*H;return le},f.prototype.readUIntBE=function(k,F,G){k|=0,F|=0,G||W(k,F,this.length);for(var le=this[k+--F],H=1;F>0&&(H*=256);)le+=this[k+--F]*H;return le},f.prototype.readUInt8=function(k,F){return F||W(k,1,this.length),this[k]},f.prototype.readUInt16LE=function(k,F){return F||W(k,2,this.length),this[k]|this[k+1]<<8},f.prototype.readUInt16BE=function(k,F){return F||W(k,2,this.length),this[k]<<8|this[k+1]},f.prototype.readUInt32LE=function(k,F){return F||W(k,4,this.length),(this[k]|this[k+1]<<8|this[k+2]<<16)+16777216*this[k+3]},f.prototype.readUInt32BE=function(k,F){return F||W(k,4,this.length),16777216*this[k]+(this[k+1]<<16|this[k+2]<<8|this[k+3])},f.prototype.readIntLE=function(k,F,G){k|=0,F|=0,G||W(k,F,this.length);for(var le=this[k],H=1,ae=0;++ae<F&&(H*=256);)le+=this[k+ae]*H;return le>=(H*=128)&&(le-=Math.pow(2,8*F)),le},f.prototype.readIntBE=function(k,F,G){k|=0,F|=0,G||W(k,F,this.length);for(var le=F,H=1,ae=this[k+--le];le>0&&(H*=256);)ae+=this[k+--le]*H;return ae>=(H*=128)&&(ae-=Math.pow(2,8*F)),ae},f.prototype.readInt8=function(k,F){return F||W(k,1,this.length),128&this[k]?-1*(255-this[k]+1):this[k]},f.prototype.readInt16LE=function(k,F){F||W(k,2,this.length);var G=this[k]|this[k+1]<<8;return 32768&G?4294901760|G:G},f.prototype.readInt16BE=function(k,F){F||W(k,2,this.length);var G=this[k+1]|this[k]<<8;return 32768&G?4294901760|G:G},f.prototype.readInt32LE=function(k,F){return F||W(k,4,this.length),this[k]|this[k+1]<<8|this[k+2]<<16|this[k+3]<<24},f.prototype.readInt32BE=function(k,F){return F||W(k,4,this.length),this[k]<<24|this[k+1]<<16|this[k+2]<<8|this[k+3]},f.prototype.readFloatLE=function(k,F){return F||W(k,4,this.length),a.read(this,k,!0,23,4)},f.prototype.readFloatBE=function(k,F){return F||W(k,4,this.length),a.read(this,k,!1,23,4)},f.prototype.readDoubleLE=function(k,F){return F||W(k,8,this.length),a.read(this,k,!0,52,8)},f.prototype.readDoubleBE=function(k,F){return F||W(k,8,this.length),a.read(this,k,!1,52,8)},f.prototype.writeUIntLE=function(k,F,G,le){k=+k,F|=0,G|=0,le||B(this,k,F,G,Math.pow(2,8*G)-1,0);var H=1,ae=0;for(this[F]=255&k;++ae<G&&(H*=256);)this[F+ae]=k/H&255;return F+G},f.prototype.writeUIntBE=function(k,F,G,le){k=+k,F|=0,G|=0,le||B(this,k,F,G,Math.pow(2,8*G)-1,0);var H=G-1,ae=1;for(this[F+H]=255&k;--H>=0&&(ae*=256);)this[F+H]=k/ae&255;return F+G},f.prototype.writeUInt8=function(k,F,G){return k=+k,F|=0,G||B(this,k,F,1,255,0),f.TYPED_ARRAY_SUPPORT||(k=Math.floor(k)),this[F]=255&k,F+1},f.prototype.writeUInt16LE=function(k,F,G){return k=+k,F|=0,G||B(this,k,F,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[F]=255&k,this[F+1]=k>>>8):I(this,k,F,!0),F+2},f.prototype.writeUInt16BE=function(k,F,G){return k=+k,F|=0,G||B(this,k,F,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[F]=k>>>8,this[F+1]=255&k):I(this,k,F,!1),F+2},f.prototype.writeUInt32LE=function(k,F,G){return k=+k,F|=0,G||B(this,k,F,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[F+3]=k>>>24,this[F+2]=k>>>16,this[F+1]=k>>>8,this[F]=255&k):z(this,k,F,!0),F+4},f.prototype.writeUInt32BE=function(k,F,G){return k=+k,F|=0,G||B(this,k,F,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[F]=k>>>24,this[F+1]=k>>>16,this[F+2]=k>>>8,this[F+3]=255&k):z(this,k,F,!1),F+4},f.prototype.writeIntLE=function(k,F,G,le){if(k=+k,F|=0,!le){var H=Math.pow(2,8*G-1);B(this,k,F,G,H-1,-H)}var ae=0,fe=1,ge=0;for(this[F]=255&k;++ae<G&&(fe*=256);)k<0&&ge===0&&this[F+ae-1]!==0&&(ge=1),this[F+ae]=(k/fe>>0)-ge&255;return F+G},f.prototype.writeIntBE=function(k,F,G,le){if(k=+k,F|=0,!le){var H=Math.pow(2,8*G-1);B(this,k,F,G,H-1,-H)}var ae=G-1,fe=1,ge=0;for(this[F+ae]=255&k;--ae>=0&&(fe*=256);)k<0&&ge===0&&this[F+ae+1]!==0&&(ge=1),this[F+ae]=(k/fe>>0)-ge&255;return F+G},f.prototype.writeInt8=function(k,F,G){return k=+k,F|=0,G||B(this,k,F,1,127,-128),f.TYPED_ARRAY_SUPPORT||(k=Math.floor(k)),k<0&&(k=255+k+1),this[F]=255&k,F+1},f.prototype.writeInt16LE=function(k,F,G){return k=+k,F|=0,G||B(this,k,F,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[F]=255&k,this[F+1]=k>>>8):I(this,k,F,!0),F+2},f.prototype.writeInt16BE=function(k,F,G){return k=+k,F|=0,G||B(this,k,F,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[F]=k>>>8,this[F+1]=255&k):I(this,k,F,!1),F+2},f.prototype.writeInt32LE=function(k,F,G){return k=+k,F|=0,G||B(this,k,F,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[F]=255&k,this[F+1]=k>>>8,this[F+2]=k>>>16,this[F+3]=k>>>24):z(this,k,F,!0),F+4},f.prototype.writeInt32BE=function(k,F,G){return k=+k,F|=0,G||B(this,k,F,4,2147483647,-2147483648),k<0&&(k=4294967295+k+1),f.TYPED_ARRAY_SUPPORT?(this[F]=k>>>24,this[F+1]=k>>>16,this[F+2]=k>>>8,this[F+3]=255&k):z(this,k,F,!1),F+4},f.prototype.writeFloatLE=function(k,F,G){return D(this,k,F,!0,G)},f.prototype.writeFloatBE=function(k,F,G){return D(this,k,F,!1,G)},f.prototype.writeDoubleLE=function(k,F,G){return Y(this,k,F,!0,G)},f.prototype.writeDoubleBE=function(k,F,G){return Y(this,k,F,!1,G)},f.prototype.copy=function(k,F,G,le){if(G||(G=0),le||le===0||(le=this.length),F>=k.length&&(F=k.length),F||(F=0),le>0&&le<G&&(le=G),le===G||k.length===0||this.length===0)return 0;if(F<0)throw new RangeError("targetStart out of bounds");if(G<0||G>=this.length)throw new RangeError("sourceStart out of bounds");if(le<0)throw new RangeError("sourceEnd out of bounds");le>this.length&&(le=this.length),k.length-F<le-G&&(le=k.length-F+G);var H,ae=le-G;if(this===k&&G<F&&F<le)for(H=ae-1;H>=0;--H)k[H+F]=this[H+G];else if(ae<1e3||!f.TYPED_ARRAY_SUPPORT)for(H=0;H<ae;++H)k[H+F]=this[H+G];else Uint8Array.prototype.set.call(k,this.subarray(G,G+ae),F);return ae},f.prototype.fill=function(k,F,G,le){if(typeof k=="string"){if(typeof F=="string"?(le=F,F=0,G=this.length):typeof G=="string"&&(le=G,G=this.length),k.length===1){var H=k.charCodeAt(0);H<256&&(k=H)}if(le!==void 0&&typeof le!="string")throw new TypeError("encoding must be a string");if(typeof le=="string"&&!f.isEncoding(le))throw new TypeError("Unknown encoding: "+le)}else typeof k=="number"&&(k&=255);if(F<0||this.length<F||this.length<G)throw new RangeError("Out of range index");if(G<=F)return this;var ae;if(F>>>=0,G=G===void 0?this.length:G>>>0,k||(k=0),typeof k=="number")for(ae=F;ae<G;++ae)this[ae]=k;else{var fe=f.isBuffer(k)?k:ue(new f(k,le).toString()),ge=fe.length;for(ae=0;ae<G-F;++ae)this[ae+F]=fe[ae%ge]}return this};var q=/[^+\/0-9A-Za-z-_]/g;function re(k){return k<16?"0"+k.toString(16):k.toString(16)}function ue(k,F){var G;F=F||1/0;for(var le=k.length,H=null,ae=[],fe=0;fe<le;++fe){if((G=k.charCodeAt(fe))>55295&&G<57344){if(!H){if(G>56319){(F-=3)>-1&&ae.push(239,191,189);continue}if(fe+1===le){(F-=3)>-1&&ae.push(239,191,189);continue}H=G;continue}if(G<56320){(F-=3)>-1&&ae.push(239,191,189),H=G;continue}G=65536+(H-55296<<10|G-56320)}else H&&(F-=3)>-1&&ae.push(239,191,189);if(H=null,G<128){if((F-=1)<0)break;ae.push(G)}else if(G<2048){if((F-=2)<0)break;ae.push(G>>6|192,63&G|128)}else if(G<65536){if((F-=3)<0)break;ae.push(G>>12|224,G>>6&63|128,63&G|128)}else{if(!(G<1114112))throw new Error("Invalid code point");if((F-=4)<0)break;ae.push(G>>18|240,G>>12&63|128,G>>6&63|128,63&G|128)}}return ae}function ce(k){return i.toByteArray(function(F){if((F=function(G){return G.trim?G.trim():G.replace(/^\s+|\s+$/g,"")}(F).replace(q,"")).length<2)return"";for(;F.length%4!=0;)F+="=";return F}(k))}function ve(k,F,G,le){for(var H=0;H<le&&!(H+G>=F.length||H>=k.length);++H)F[H+G]=k[H];return H}}).call(this,n(0))},function(e,t){var n,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(E){if(n===setTimeout)return setTimeout(E,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(E,0);try{return n(E,0)}catch{try{return n.call(null,E,0)}catch{return n.call(this,E,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:a}catch{n=a}try{r=typeof clearTimeout=="function"?clearTimeout:s}catch{r=s}})();var d,f=[],m=!1,p=-1;function b(){m&&d&&(m=!1,d.length?f=d.concat(f):p=-1,f.length&&_())}function _(){if(!m){var E=u(b);m=!0;for(var A=f.length;A;){for(d=f,f=[];++p<A;)d&&d[p].run();p=-1,A=f.length}d=null,m=!1,function(j){if(r===clearTimeout)return clearTimeout(j);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(j);try{r(j)}catch{try{return r.call(null,j)}catch{return r.call(this,j)}}}(E)}}function w(E,A){this.fun=E,this.array=A}function x(){}i.nextTick=function(E){var A=new Array(arguments.length-1);if(arguments.length>1)for(var j=1;j<arguments.length;j++)A[j-1]=arguments[j];f.push(new w(E,A)),f.length!==1||m||u(_)},w.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=x,i.addListener=x,i.once=x,i.off=x,i.removeListener=x,i.removeAllListeners=x,i.emit=x,i.prependListener=x,i.prependOnceListener=x,i.listeners=function(E){return[]},i.binding=function(E){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(E){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){(function(r){function i(a){return Object.prototype.toString.call(a)}t.isArray=function(a){return Array.isArray?Array.isArray(a):i(a)==="[object Array]"},t.isBoolean=function(a){return typeof a=="boolean"},t.isNull=function(a){return a===null},t.isNullOrUndefined=function(a){return a==null},t.isNumber=function(a){return typeof a=="number"},t.isString=function(a){return typeof a=="string"},t.isSymbol=function(a){return typeof a=="symbol"},t.isUndefined=function(a){return a===void 0},t.isRegExp=function(a){return i(a)==="[object RegExp]"},t.isObject=function(a){return typeof a=="object"&&a!==null},t.isDate=function(a){return i(a)==="[object Date]"},t.isError=function(a){return i(a)==="[object Error]"||a instanceof Error},t.isFunction=function(a){return typeof a=="function"},t.isPrimitive=function(a){return a===null||typeof a=="boolean"||typeof a=="number"||typeof a=="string"||typeof a=="symbol"||a===void 0},t.isBuffer=r.isBuffer}).call(this,n(3).Buffer)},function(e,t,n){(function(r){!r.version||r.version.indexOf("v0.")===0||r.version.indexOf("v1.")===0&&r.version.indexOf("v1.8.")!==0?e.exports={nextTick:function(i,a,s,u){if(typeof i!="function")throw new TypeError('"callback" argument must be a function');var d,f,m=arguments.length;switch(m){case 0:case 1:return r.nextTick(i);case 2:return r.nextTick(function(){i.call(null,a)});case 3:return r.nextTick(function(){i.call(null,a,s)});case 4:return r.nextTick(function(){i.call(null,a,s,u)});default:for(d=new Array(m-1),f=0;f<d.length;)d[f++]=arguments[f];return r.nextTick(function(){i.apply(null,d)})}}}:e.exports=r}).call(this,n(4))},function(e,t,n){var r=n(3),i=r.Buffer;function a(u,d){for(var f in u)d[f]=u[f]}function s(u,d,f){return i(u,d,f)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=s),a(i,s),s.from=function(u,d,f){if(typeof u=="number")throw new TypeError("Argument must not be a number");return i(u,d,f)},s.alloc=function(u,d,f){if(typeof u!="number")throw new TypeError("Argument must be a number");var m=i(u);return d!==void 0?typeof f=="string"?m.fill(d,f):m.fill(d):m.fill(0),m},s.allocUnsafe=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return i(u)},s.allocUnsafeSlow=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(u)}},function(e,t,n){var r=n(17)(Object,"create");e.exports=r},function(e,t,n){var r=n(31);e.exports=function(i,a){for(var s=i.length;s--;)if(r(i[s][0],a))return s;return-1}},function(e,t,n){var r=n(96);e.exports=function(i,a){var s=i.__data__;return r(a)?s[typeof a=="string"?"string":"hash"]:s.map}},function(e,t,n){(function(r){var i=r!==void 0&&r||typeof self<"u"&&self||window,a=Function.prototype.apply;function s(u,d){this._id=u,this._clearFn=d}t.setTimeout=function(){return new s(a.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new s(a.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(u){u&&u.close()},s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(u,d){clearTimeout(u._idleTimeoutId),u._idleTimeout=d},t.unenroll=function(u){clearTimeout(u._idleTimeoutId),u._idleTimeout=-1},t._unrefActive=t.active=function(u){clearTimeout(u._idleTimeoutId);var d=u._idleTimeout;d>=0&&(u._idleTimeoutId=setTimeout(function(){u._onTimeout&&u._onTimeout()},d))},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(s){return typeof s=="function"}function i(s){return typeof s=="object"&&s!==null}function a(s){return s===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(s){if(!function(u){return typeof u=="number"}(s)||s<0||isNaN(s))throw TypeError("n must be a positive number");return this._maxListeners=s,this},n.prototype.emit=function(s){var u,d,f,m,p,b;if(this._events||(this._events={}),s==="error"&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((u=arguments[1])instanceof Error)throw u;var _=new Error('Uncaught, unspecified "error" event. ('+u+")");throw _.context=u,_}if(a(d=this._events[s]))return!1;if(r(d))switch(arguments.length){case 1:d.call(this);break;case 2:d.call(this,arguments[1]);break;case 3:d.call(this,arguments[1],arguments[2]);break;default:m=Array.prototype.slice.call(arguments,1),d.apply(this,m)}else if(i(d))for(m=Array.prototype.slice.call(arguments,1),f=(b=d.slice()).length,p=0;p<f;p++)b[p].apply(this,m);return!0},n.prototype.addListener=function(s,u){var d;if(!r(u))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",s,r(u.listener)?u.listener:u),this._events[s]?i(this._events[s])?this._events[s].push(u):this._events[s]=[this._events[s],u]:this._events[s]=u,i(this._events[s])&&!this._events[s].warned&&(d=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&d>0&&this._events[s].length>d&&(this._events[s].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[s].length),typeof console.trace=="function"&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(s,u){if(!r(u))throw TypeError("listener must be a function");var d=!1;function f(){this.removeListener(s,f),d||(d=!0,u.apply(this,arguments))}return f.listener=u,this.on(s,f),this},n.prototype.removeListener=function(s,u){var d,f,m,p;if(!r(u))throw TypeError("listener must be a function");if(!this._events||!this._events[s])return this;if(m=(d=this._events[s]).length,f=-1,d===u||r(d.listener)&&d.listener===u)delete this._events[s],this._events.removeListener&&this.emit("removeListener",s,u);else if(i(d)){for(p=m;p-- >0;)if(d[p]===u||d[p].listener&&d[p].listener===u){f=p;break}if(f<0)return this;d.length===1?(d.length=0,delete this._events[s]):d.splice(f,1),this._events.removeListener&&this.emit("removeListener",s,u)}return this},n.prototype.removeAllListeners=function(s){var u,d;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[s]&&delete this._events[s],this;if(arguments.length===0){for(u in this._events)u!=="removeListener"&&this.removeAllListeners(u);return this.removeAllListeners("removeListener"),this._events={},this}if(r(d=this._events[s]))this.removeListener(s,d);else if(d)for(;d.length;)this.removeListener(s,d[d.length-1]);return delete this._events[s],this},n.prototype.listeners=function(s){return this._events&&this._events[s]?r(this._events[s])?[this._events[s]]:this._events[s].slice():[]},n.prototype.listenerCount=function(s){if(this._events){var u=this._events[s];if(r(u))return 1;if(u)return u.length}return 0},n.listenerCount=function(s,u){return s.listenerCount(u)}},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,a){var s=n(6);function u(ee){var J=this;this.next=null,this.entry=null,this.finish=function(){(function(ne,he,Q){var se=ne.entry;for(ne.entry=null;se;){var W=se.callback;he.pendingcb--,W(void 0),se=se.next}he.corkedRequestsFree?he.corkedRequestsFree.next=ne:he.corkedRequestsFree=ne})(J,ee)}}e.exports=O;var d,f=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?i:s.nextTick;O.WritableState=j;var m=n(5);m.inherits=n(2);var p,b={deprecate:n(44)},_=n(24),w=n(7).Buffer,x=a.Uint8Array||function(){},E=n(25);function A(){}function j(ee,J){d=d||n(1),ee=ee||{};var ne=J instanceof d;this.objectMode=!!ee.objectMode,ne&&(this.objectMode=this.objectMode||!!ee.writableObjectMode);var he=ee.highWaterMark,Q=ee.writableHighWaterMark,se=this.objectMode?16:16384;this.highWaterMark=he||he===0?he:ne&&(Q||Q===0)?Q:se,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 W=ee.decodeStrings===!1;this.decodeStrings=!W,this.defaultEncoding=ee.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(B){(function(I,z){var M=I._writableState,D=M.sync,Y=M.writecb;if(function(re){re.writing=!1,re.writecb=null,re.length-=re.writelen,re.writelen=0}(M),z)(function(re,ue,ce,ve,k){--ue.pendingcb,ce?(s.nextTick(k,ve),s.nextTick(oe,re,ue),re._writableState.errorEmitted=!0,re.emit("error",ve)):(k(ve),re._writableState.errorEmitted=!0,re.emit("error",ve),oe(re,ue))})(I,M,D,z,Y);else{var q=Z(M);q||M.corked||M.bufferProcessing||!M.bufferedRequest||V(I,M),D?f(U,I,M,q,Y):U(I,M,q,Y)}})(J,B)},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 u(this)}function O(ee){if(d=d||n(1),!(p.call(O,this)||this instanceof d))return new O(ee);this._writableState=new j(ee,this),this.writable=!0,ee&&(typeof ee.write=="function"&&(this._write=ee.write),typeof ee.writev=="function"&&(this._writev=ee.writev),typeof ee.destroy=="function"&&(this._destroy=ee.destroy),typeof ee.final=="function"&&(this._final=ee.final)),_.call(this)}function N(ee,J,ne,he,Q,se,W){J.writelen=he,J.writecb=W,J.writing=!0,J.sync=!0,ne?ee._writev(Q,J.onwrite):ee._write(Q,se,J.onwrite),J.sync=!1}function U(ee,J,ne,he){ne||function(Q,se){se.length===0&&se.needDrain&&(se.needDrain=!1,Q.emit("drain"))}(ee,J),J.pendingcb--,he(),oe(ee,J)}function V(ee,J){J.bufferProcessing=!0;var ne=J.bufferedRequest;if(ee._writev&&ne&&ne.next){var he=J.bufferedRequestCount,Q=new Array(he),se=J.corkedRequestsFree;se.entry=ne;for(var W=0,B=!0;ne;)Q[W]=ne,ne.isBuf||(B=!1),ne=ne.next,W+=1;Q.allBuffers=B,N(ee,J,!0,J.length,Q,"",se.finish),J.pendingcb++,J.lastBufferedRequest=null,se.next?(J.corkedRequestsFree=se.next,se.next=null):J.corkedRequestsFree=new u(J),J.bufferedRequestCount=0}else{for(;ne;){var I=ne.chunk,z=ne.encoding,M=ne.callback;if(N(ee,J,!1,J.objectMode?1:I.length,I,z,M),ne=ne.next,J.bufferedRequestCount--,J.writing)break}ne===null&&(J.lastBufferedRequest=null)}J.bufferedRequest=ne,J.bufferProcessing=!1}function Z(ee){return ee.ending&&ee.length===0&&ee.bufferedRequest===null&&!ee.finished&&!ee.writing}function X(ee,J){ee._final(function(ne){J.pendingcb--,ne&&ee.emit("error",ne),J.prefinished=!0,ee.emit("prefinish"),oe(ee,J)})}function oe(ee,J){var ne=Z(J);return ne&&(function(he,Q){Q.prefinished||Q.finalCalled||(typeof he._final=="function"?(Q.pendingcb++,Q.finalCalled=!0,s.nextTick(X,he,Q)):(Q.prefinished=!0,he.emit("prefinish")))}(ee,J),J.pendingcb===0&&(J.finished=!0,ee.emit("finish"))),ne}m.inherits(O,_),j.prototype.getBuffer=function(){for(var ee=this.bufferedRequest,J=[];ee;)J.push(ee),ee=ee.next;return J},function(){try{Object.defineProperty(j.prototype,"buffer",{get:b.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"?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(O,Symbol.hasInstance,{value:function(ee){return!!p.call(this,ee)||this===O&&ee&&ee._writableState instanceof j}})):p=function(ee){return ee instanceof this},O.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},O.prototype.write=function(ee,J,ne){var he=this._writableState,Q=!1,se=!he.objectMode&&function(W){return w.isBuffer(W)||W instanceof x}(ee);return se&&!w.isBuffer(ee)&&(ee=function(W){return w.from(W)}(ee)),typeof J=="function"&&(ne=J,J=null),se?J="buffer":J||(J=he.defaultEncoding),typeof ne!="function"&&(ne=A),he.ended?function(W,B){var I=new Error("write after end");W.emit("error",I),s.nextTick(B,I)}(this,ne):(se||function(W,B,I,z){var M=!0,D=!1;return I===null?D=new TypeError("May not write null values to stream"):typeof I=="string"||I===void 0||B.objectMode||(D=new TypeError("Invalid non-string/buffer chunk")),D&&(W.emit("error",D),s.nextTick(z,D),M=!1),M}(this,he,ee,ne))&&(he.pendingcb++,Q=function(W,B,I,z,M,D){if(!I){var Y=function(ce,ve,k){return ce.objectMode||ce.decodeStrings===!1||typeof ve!="string"||(ve=w.from(ve,k)),ve}(B,z,M);z!==Y&&(I=!0,M="buffer",z=Y)}var q=B.objectMode?1:z.length;B.length+=q;var re=B.length<B.highWaterMark;if(re||(B.needDrain=!0),B.writing||B.corked){var ue=B.lastBufferedRequest;B.lastBufferedRequest={chunk:z,encoding:M,isBuf:I,callback:D,next:null},ue?ue.next=B.lastBufferedRequest:B.bufferedRequest=B.lastBufferedRequest,B.bufferedRequestCount+=1}else N(W,B,!1,q,z,M,D);return re}(this,he,se,ee,J,ne)),Q},O.prototype.cork=function(){this._writableState.corked++},O.prototype.uncork=function(){var ee=this._writableState;ee.corked&&(ee.corked--,ee.writing||ee.corked||ee.finished||ee.bufferProcessing||!ee.bufferedRequest||V(this,ee))},O.prototype.setDefaultEncoding=function(ee){if(typeof ee=="string"&&(ee=ee.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ee+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ee);return this._writableState.defaultEncoding=ee,this},Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),O.prototype._write=function(ee,J,ne){ne(new Error("_write() is not implemented"))},O.prototype._writev=null,O.prototype.end=function(ee,J,ne){var he=this._writableState;typeof ee=="function"?(ne=ee,ee=null,J=null):typeof J=="function"&&(ne=J,J=null),ee!=null&&this.write(ee,J),he.corked&&(he.corked=1,this.uncork()),he.ending||he.finished||function(Q,se,W){se.ending=!0,oe(Q,se),W&&(se.finished?s.nextTick(W):Q.once("finish",W)),se.ended=!0,Q.writable=!1}(this,he,ne)},Object.defineProperty(O.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(ee){this._writableState&&(this._writableState.destroyed=ee)}}),O.prototype.destroy=E.destroy,O.prototype._undestroy=E.undestroy,O.prototype._destroy=function(ee,J){this.end(),J(ee)}}).call(this,n(4),n(11).setImmediate,n(0))},function(e,t,n){(function(r,i,a){e.exports=function s(u,d,f){function m(_,w){if(!d[_]){if(!u[_]){var x=typeof _dereq_=="function"&&_dereq_;if(!w&&x)return x(_,!0);if(p)return p(_,!0);var E=new Error("Cannot find module '"+_+"'");throw E.code="MODULE_NOT_FOUND",E}var A=d[_]={exports:{}};u[_][0].call(A.exports,function(j){return m(u[_][1][j]||j)},A,A.exports,s,u,d,f)}return d[_].exports}for(var p=typeof _dereq_=="function"&&_dereq_,b=0;b<f.length;b++)m(f[b]);return m}({1:[function(s,u,d){u.exports=function(f){var m=f._SomePromiseArray;function p(b){var _=new m(b),w=_.promise();return _.setHowMany(1),_.setUnwrap(),_.init(),w}f.any=function(b){return p(b)},f.prototype.any=function(){return p(this)}}},{}],2:[function(s,u,d){var f;try{throw new Error}catch(A){f=A}var m=s("./schedule"),p=s("./queue"),b=s("./util");function _(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new p(16),this._normalQueue=new p(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var A=this;this.drainQueues=function(){A._drainQueues()},this._schedule=m}function w(A,j,O){this._lateQueue.push(A,j,O),this._queueTick()}function x(A,j,O){this._normalQueue.push(A,j,O),this._queueTick()}function E(A){this._normalQueue._pushOne(A),this._queueTick()}_.prototype.setScheduler=function(A){var j=this._schedule;return this._schedule=A,this._customScheduler=!0,j},_.prototype.hasCustomScheduler=function(){return this._customScheduler},_.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},_.prototype.disableTrampolineIfNecessary=function(){b.hasDevTools&&(this._trampolineEnabled=!1)},_.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},_.prototype.fatalError=function(A,j){j?(r.stderr.write("Fatal "+(A instanceof Error?A.stack:A)+`
`),r.exit(2)):this.throwLater(A)},_.prototype.throwLater=function(A,j){if(arguments.length===1&&(j=A,A=function(){throw j}),typeof setTimeout<"u")setTimeout(function(){A(j)},0);else try{this._schedule(function(){A(j)})}catch{throw new Error(`No async scheduler available
See http://goo.gl/MqrFmX
`)}},b.hasDevTools?(_.prototype.invokeLater=function(A,j,O){this._trampolineEnabled?w.call(this,A,j,O):this._schedule(function(){setTimeout(function(){A.call(j,O)},100)})},_.prototype.invoke=function(A,j,O){this._trampolineEnabled?x.call(this,A,j,O):this._schedule(function(){A.call(j,O)})},_.prototype.settlePromises=function(A){this._trampolineEnabled?E.call(this,A):this._schedule(function(){A._settlePromises()})}):(_.prototype.invokeLater=w,_.prototype.invoke=x,_.prototype.settlePromises=E),_.prototype._drainQueue=function(A){for(;A.length()>0;){var j=A.shift();if(typeof j=="function"){var O=A.shift(),N=A.shift();j.call(O,N)}else j._settlePromises()}},_.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},_.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},_.prototype._reset=function(){this._isTickUsed=!1},u.exports=_,u.exports.firstLineError=f},{"./queue":26,"./schedule":29,"./util":36}],3:[function(s,u,d){u.exports=function(f,m,p,b){var _=!1,w=function(j,O){this._reject(O)},x=function(j,O){O.promiseRejectionQueued=!0,O.bindingPromise._then(w,w,null,this,j)},E=function(j,O){(50397184&this._bitField)==0&&this._resolveCallback(O.target)},A=function(j,O){O.promiseRejectionQueued||this._reject(j)};f.prototype.bind=function(j){_||(_=!0,f.prototype._propagateFrom=b.propagateFromFunction(),f.prototype._boundValue=b.boundValueFunction());var O=p(j),N=new f(m);N._propagateFrom(this,1);var U=this._target();if(N._setBoundTo(O),O instanceof f){var V={promiseRejectionQueued:!1,promise:N,target:U,bindingPromise:O};U._then(m,x,void 0,N,V),O._then(E,A,void 0,N,V),N._setOnCancel(O)}else N._resolveCallback(U);return N},f.prototype._setBoundTo=function(j){j!==void 0?(this._bitField=2097152|this._bitField,this._boundTo=j):this._bitField=-2097153&this._bitField},f.prototype._isBound=function(){return(2097152&this._bitField)==2097152},f.bind=function(j,O){return f.resolve(O).bind(j)}}},{}],4:[function(s,u,d){var f;typeof Promise<"u"&&(f=Promise);var m=s("./promise")();m.noConflict=function(){try{Promise===m&&(Promise=f)}catch{}return m},u.exports=m},{"./promise":22}],5:[function(s,u,d){var f=Object.create;if(f){var m=f(null),p=f(null);m[" size"]=p[" size"]=0}u.exports=function(b){var _=s("./util"),w=_.canEvaluate;function x(j){return function(O,N){var U;if(O!=null&&(U=O[N]),typeof U!="function"){var V="Object "+_.classString(O)+" has no method '"+_.toString(N)+"'";throw new b.TypeError(V)}return U}(j,this.pop()).apply(j,this)}function E(j){return j[this]}function A(j){var O=+this;return O<0&&(O=Math.max(0,O+j.length)),j[O]}_.isIdentifier,b.prototype.call=function(j){var O=[].slice.call(arguments,1);return O.push(j),this._then(x,void 0,void 0,O,void 0)},b.prototype.get=function(j){var O;if(typeof j=="number")O=A;else if(w){var N=(void 0)(j);O=N!==null?N:E}else O=E;return this._then(O,void 0,void 0,j,void 0)}}},{"./util":36}],6:[function(s,u,d){u.exports=function(f,m,p,b){var _=s("./util"),w=_.tryCatch,x=_.errorObj,E=f._async;f.prototype.break=f.prototype.cancel=function(){if(!b.cancellation())return this._warn("cancellation is disabled");for(var A=this,j=A;A._isCancellable();){if(!A._cancelBy(j)){j._isFollowing()?j._followee().cancel():j._cancelBranched();break}var O=A._cancellationParent;if(O==null||!O._isCancellable()){A._isFollowing()?A._followee().cancel():A._cancelBranched();break}A._isFollowing()&&A._followee().cancel(),A._setWillBeCancelled(),j=A,A=O}},f.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},f.prototype._enoughBranchesHaveCancelled=function(){return this._branchesRemainingToCancel===void 0||this._branchesRemainingToCancel<=0},f.prototype._cancelBy=function(A){return A===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},f.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},f.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),E.invoke(this._cancelPromises,this,void 0))},f.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},f.prototype._unsetOnCancel=function(){this._onCancelField=void 0},f.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},f.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},f.prototype._doInvokeOnCancel=function(A,j){if(_.isArray(A))for(var O=0;O<A.length;++O)this._doInvokeOnCancel(A[O],j);else if(A!==void 0)if(typeof A=="function"){if(!j){var N=w(A).call(this._boundValue());N===x&&(this._attachExtraTrace(N.e),E.throwLater(N.e))}}else A._resultCancelled(this)},f.prototype._invokeOnCancel=function(){var A=this._onCancel();this._unsetOnCancel(),E.invoke(this._doInvokeOnCancel,this,A)},f.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},f.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(s,u,d){u.exports=function(f){var m=s("./util"),p=s("./es5").keys,b=m.tryCatch,_=m.errorObj;return function(w,x,E){return function(A){var j=E._boundValue();e:for(var O=0;O<w.length;++O){var N=w[O];if(N===Error||N!=null&&N.prototype instanceof Error){if(A instanceof N)return b(x).call(j,A)}else if(typeof N=="function"){var U=b(N).call(j,A);if(U===_)return U;if(U)return b(x).call(j,A)}else if(m.isObject(A)){for(var V=p(N),Z=0;Z<V.length;++Z){var X=V[Z];if(N[X]!=A[X])continue e}return b(x).call(j,A)}}return f}}}},{"./es5":13,"./util":36}],8:[function(s,u,d){u.exports=function(f){var m=!1,p=[];function b(){this._trace=new b.CapturedTrace(_())}function _(){var w=p.length-1;if(w>=0)return p[w]}return f.prototype._promiseCreated=function(){},f.prototype._pushContext=function(){},f.prototype._popContext=function(){return null},f._peekContext=f.prototype._peekContext=function(){},b.prototype._pushContext=function(){this._trace!==void 0&&(this._trace._promiseCreated=null,p.push(this._trace))},b.prototype._popContext=function(){if(this._trace!==void 0){var w=p.pop(),x=w._promiseCreated;return w._promiseCreated=null,x}return null},b.CapturedTrace=null,b.create=function(){if(m)return new b},b.deactivateLongStackTraces=function(){},b.activateLongStackTraces=function(){var w=f.prototype._pushContext,x=f.prototype._popContext,E=f._peekContext,A=f.prototype._peekContext,j=f.prototype._promiseCreated;b.deactivateLongStackTraces=function(){f.prototype._pushContext=w,f.prototype._popContext=x,f._peekContext=E,f.prototype._peekContext=A,f.prototype._promiseCreated=j,m=!1},m=!0,f.prototype._pushContext=b.prototype._pushContext,f.prototype._popContext=b.prototype._popContext,f._peekContext=f.prototype._peekContext=_,f.prototype._promiseCreated=function(){var O=this._peekContext();O&&O._promiseCreated==null&&(O._promiseCreated=this)}},b}},{}],9:[function(s,u,d){u.exports=function(f,m){var p,b,_,w=f._getDomain,x=f._async,E=s("./errors").Warning,A=s("./util"),j=A.canAttachTrace,O=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,N=/\((?:timers\.js):\d+:\d+\)/,U=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,V=null,Z=null,X=!1,oe=A.env("BLUEBIRD_DEBUG")!=0,ee=!(A.env("BLUEBIRD_WARNINGS")==0||!oe&&!A.env("BLUEBIRD_WARNINGS")),J=!(A.env("BLUEBIRD_LONG_STACK_TRACES")==0||!oe&&!A.env("BLUEBIRD_LONG_STACK_TRACES")),ne=A.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(ee||!!A.env("BLUEBIRD_W_FORGOTTEN_RETURN"));f.prototype.suppressUnhandledRejections=function(){var be=this._target();be._bitField=-1048577&be._bitField|524288},f.prototype._ensurePossibleRejectionHandled=function(){if((524288&this._bitField)==0){this._setRejectionIsUnhandled();var be=this;setTimeout(function(){be._notifyUnhandledRejection()},1)}},f.prototype._notifyUnhandledRejectionIsHandled=function(){fe("rejectionHandled",p,void 0,this)},f.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},f.prototype._returnedNonUndefined=function(){return(268435456&this._bitField)!=0},f.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var be=this._settledValue();this._setUnhandledRejectionIsNotified(),fe("unhandledRejection",b,be,this)}},f.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},f.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},f.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},f.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},f.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},f.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},f.prototype._warn=function(be,we,De){return G(be,we,De||this)},f.onPossiblyUnhandledRejection=function(be){var we=w();b=typeof be=="function"?we===null?be:A.domainBind(we,be):void 0},f.onUnhandledRejectionHandled=function(be){var we=w();p=typeof be=="function"?we===null?be:A.domainBind(we,be):void 0};var he=function(){};f.longStackTraces=function(){if(x.haveItemsQueued()&&!He.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created
See http://goo.gl/MqrFmX
`);if(!He.longStackTraces&&de()){var be=f.prototype._captureStackTrace,we=f.prototype._attachExtraTrace;He.longStackTraces=!0,he=function(){if(x.haveItemsQueued()&&!He.longStackTraces)throw new Error(`cannot enable long stack traces after promises have been created
See http://goo.gl/MqrFmX
`);f.prototype._captureStackTrace=be,f.prototype._attachExtraTrace=we,m.deactivateLongStackTraces(),x.enableTrampoline(),He.longStackTraces=!1},f.prototype._captureStackTrace=k,f.prototype._attachExtraTrace=F,m.activateLongStackTraces(),x.disableTrampolineIfNecessary()}},f.hasLongStackTraces=function(){return He.longStackTraces&&de()};var Q=function(){try{if(typeof CustomEvent=="function"){var be=new CustomEvent("CustomEvent");return A.global.dispatchEvent(be),function(we,De){var Re=new CustomEvent(we.toLowerCase(),{detail:De,cancelable:!0});return!A.global.dispatchEvent(Re)}}return typeof Event=="function"?(be=new Event("CustomEvent"),A.global.dispatchEvent(be),function(we,De){var Re=new Event(we.toLowerCase(),{cancelable:!0});return Re.detail=De,!A.global.dispatchEvent(Re)}):((be=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),A.global.dispatchEvent(be),function(we,De){var Re=document.createEvent("CustomEvent");return Re.initCustomEvent(we.toLowerCase(),!1,!0,De),!A.global.dispatchEvent(Re)})}catch{}return function(){return!1}}(),se=A.isNode?function(){return r.emit.apply(r,arguments)}:A.global?function(be){var we="on"+be.toLowerCase(),De=A.global[we];return!!De&&(De.apply(A.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function W(be,we){return{promise:we}}var B={promiseCreated:W,promiseFulfilled:W,promiseRejected:W,promiseResolved:W,promiseCancelled:W,promiseChained:function(be,we,De){return{promise:we,child:De}},warning:function(be,we){return{warning:we}},unhandledRejection:function(be,we,De){return{reason:we,promise:De}},rejectionHandled:W},I=function(be){var we=!1;try{we=se.apply(null,arguments)}catch(Re){x.throwLater(Re),we=!0}var De=!1;try{De=Q(be,B[be].apply(null,arguments))}catch(Re){x.throwLater(Re),De=!0}return De||we};function z(){return!1}function M(be,we,De){var Re=this;try{be(we,De,function(Ae){if(typeof Ae!="function")throw new TypeError("onCancel must be a function, got: "+A.toString(Ae));Re._attachCancellationCallback(Ae)})}catch(Ae){return Ae}}function D(be){if(!this._isCancellable())return this;var we=this._onCancel();we!==void 0?A.isArray(we)?we.push(be):this._setOnCancel([we,be]):this._setOnCancel(be)}function Y(){return this._onCancelField}function q(be){this._onCancelField=be}function re(){this._cancellationParent=void 0,this._onCancelField=void 0}function ue(be,we){if((1&we)!=0){this._cancellationParent=be;var De=be._branchesRemainingToCancel;De===void 0&&(De=0),be._branchesRemainingToCancel=De+1}(2&we)!=0&&be._isBound()&&this._setBoundTo(be._boundTo)}f.config=function(be){if("longStackTraces"in(be=Object(be))&&(be.longStackTraces?f.longStackTraces():!be.longStackTraces&&f.hasLongStackTraces()&&he()),"warnings"in be){var we=be.warnings;He.warnings=!!we,ne=He.warnings,A.isObject(we)&&"wForgottenReturn"in we&&(ne=!!we.wForgottenReturn)}if("cancellation"in be&&be.cancellation&&!He.cancellation){if(x.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");f.prototype._clearCancellationData=re,f.prototype._propagateFrom=ue,f.prototype._onCancel=Y,f.prototype._setOnCancel=q,f.prototype._attachCancellationCallback=D,f.prototype._execute=M,ce=ue,He.cancellation=!0}return"monitoring"in be&&(be.monitoring&&!He.monitoring?(He.monitoring=!0,f.prototype._fireEvent=I):!be.monitoring&&He.monitoring&&(He.monitoring=!1,f.prototype._fireEvent=z)),f},f.prototype._fireEvent=z,f.prototype._execute=function(be,we,De){try{be(we,De)}catch(Re){return Re}},f.prototype._onCancel=function(){},f.prototype._setOnCancel=function(be){},f.prototype._attachCancellationCallback=function(be){},f.prototype._captureStackTrace=function(){},f.prototype._attachExtraTrace=function(){},f.prototype._clearCancellationData=function(){},f.prototype._propagateFrom=function(be,we){};var ce=function(be,we){(2&we)!=0&&be._isBound()&&this._setBoundTo(be._boundTo)};function ve(){var be=this._boundTo;return be!==void 0&&be instanceof f?be.isFulfilled()?be.value():void 0:be}function k(){this._trace=new qe(this._peekContext())}function F(be,we){if(j(be)){var De=this._trace;if(De!==void 0&&we&&(De=De._parent),De!==void 0)De.attachExtraTrace(be);else if(!be.__stackCleaned__){var Re=H(be);A.notEnumerableProp(be,"stack",Re.message+`
`+Re.stack.join(`
`)),A.notEnumerableProp(be,"__stackCleaned__",!0)}}}function G(be,we,De){if(He.warnings){var Re,Ae=new E(be);if(we)De._attachExtraTrace(Ae);else if(He.longStackTraces&&(Re=f._peekContext()))Re.attachExtraTrace(Ae);else{var Fe=H(Ae);Ae.stack=Fe.message+`
`+Fe.stack.join(`
`)}I("warning",Ae)||ae(Ae,"",!0)}}function le(be){for(var we=[],De=0;De<be.length;++De){var Re=be[De],Ae=Re===" (No stack trace)"||V.test(Re),Fe=Ae&&_e(Re);Ae&&!Fe&&(X&&Re.charAt(0)!==" "&&(Re=" "+Re),we.push(Re))}return we}function H(be){var we=be.stack,De=be.toString();return we=typeof we=="string"&&we.length>0?function(Re){for(var Ae=Re.stack.replace(/\s+$/g,"").split(`
`),Fe=0;Fe<Ae.length;++Fe){var Ve=Ae[Fe];if(Ve===" (No stack trace)"||V.test(Ve))break}return Fe>0&&Re.name!="SyntaxError"&&(Ae=Ae.slice(Fe)),Ae}(be):[" (No stack trace)"],{message:De,stack:be.name=="SyntaxError"?we:le(we)}}function ae(be,we,De){if(typeof console<"u"){var Re;if(A.isObject(be)){var Ae=be.stack;Re=we+Z(Ae,be)}else Re=we+String(be);typeof _=="function"?_(Re,De):typeof console.log!="function"&&typeof console.log!="object"||console.log(Re)}}function fe(be,we,De,Re){var Ae=!1;try{typeof we=="function"&&(Ae=!0,be==="rejectionHandled"?we(Re):we(De,Re))}catch(Fe){x.throwLater(Fe)}be==="unhandledRejection"?I(be,De,Re)||Ae||ae(De,"Unhandled rejection "):I(be,Re)}function ge(be){var we;if(typeof be=="function")we="[function "+(be.name||"anonymous")+"]";else{if(we=be&&typeof be.toString=="function"?be.toString():A.toString(be),/\[object [a-zA-Z0-9$_]+\]/.test(we))try{we=JSON.stringify(be)}catch{}we.length===0&&(we="(empty array)")}return"(<"+function(De){return De.length<41?De:De.substr(0,38)+"..."}(we)+">, no stack trace)"}function de(){return typeof Be=="function"}var _e=function(){return!1},Te=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function Le(be){var we=be.match(Te);if(we)return{fileName:we[1],line:parseInt(we[2],10)}}function qe(be){this._parent=be,this._promisesCreated=0;var we=this._length=1+(be===void 0?0:be._length);Be(this,qe),we>32&&this.uncycle()}A.inherits(qe,Error),m.CapturedTrace=qe,qe.prototype.uncycle=function(){var be=this._length;if(!(be<2)){for(var we=[],De={},Re=0,Ae=this;Ae!==void 0;++Re)we.push(Ae),Ae=Ae._parent;for(Re=(be=this._length=Re)-1;Re>=0;--Re){var Fe=we[Re].stack;De[Fe]===void 0&&(De[Fe]=Re)}for(Re=0;Re<be;++Re){var Ve=De[we[Re].stack];if(Ve!==void 0&&Ve!==Re){Ve>0&&(we[Ve-1]._parent=void 0,we[Ve-1]._length=1),we[Re]._parent=void 0,we[Re]._length=1;var Ze=Re>0?we[Re-1]:this;Ve<be-1?(Ze._parent=we[Ve+1],Ze._parent.uncycle(),Ze._length=Ze._parent._length+1):(Ze._parent=void 0,Ze._length=1);for(var ut=Ze._length+1,at=Re-2;at>=0;--at)we[at]._length=ut,ut++;return}}}},qe.prototype.attachExtraTrace=function(be){if(!be.__stackCleaned__){this.uncycle();for(var we=H(be),De=we.message,Re=[we.stack],Ae=this;Ae!==void 0;)Re.push(le(Ae.stack.split(`
`))),Ae=Ae._parent;(function(Fe){for(var Ve=Fe[0],Ze=1;Ze<Fe.length;++Ze){for(var ut=Fe[Ze],at=Ve.length-1,pt=Ve[at],Lt=-1,Dt=ut.length-1;Dt>=0;--Dt)if(ut[Dt]===pt){Lt=Dt;break}for(Dt=Lt;Dt>=0;--Dt){var kt=ut[Dt];if(Ve[at]!==kt)break;Ve.pop(),at--}Ve=ut}})(Re),function(Fe){for(var Ve=0;Ve<Fe.length;++Ve)(Fe[Ve].length===0||Ve+1<Fe.length&&Fe[Ve][0]===Fe[Ve+1][0])&&(Fe.splice(Ve,1),Ve--)}(Re),A.notEnumerableProp(be,"stack",function(Fe,Ve){for(var Ze=0;Ze<Ve.length-1;++Ze)Ve[Ze].push("From previous event:"),Ve[Ze]=Ve[Ze].join(`
`);return Ze<Ve.length&&(Ve[Ze]=Ve[Ze].join(`
`)),Fe+`
`+Ve.join(`
`)}(De,Re)),A.notEnumerableProp(be,"__stackCleaned__",!0)}};var Be=function(){var be=/^\s*at\s*/,we=function(Fe,Ve){return typeof Fe=="string"?Fe:Ve.name!==void 0&&Ve.message!==void 0?Ve.toString():ge(Ve)};if(typeof Error.stackTraceLimit=="number"&&typeof Error.captureStackTrace=="function"){Error.stackTraceLimit+=6,V=be,Z=we;var De=Error.captureStackTrace;return _e=function(Fe){return O.test(Fe)},function(Fe,Ve){Error.stackTraceLimit+=6,De(Fe,Ve),Error.stackTraceLimit-=6}}var Re,Ae=new Error;if(typeof Ae.stack=="string"&&Ae.stack.split(`
`)[0].indexOf("stackDetection@")>=0)return V=/@/,Z=we,X=!0,function(Fe){Fe.stack=new Error().stack};try{throw new Error}catch(Fe){Re="stack"in Fe}return"stack"in Ae||!Re||typeof Error.stackTraceLimit!="number"?(Z=function(Fe,Ve){return typeof Fe=="string"?Fe:typeof Ve!="object"&&typeof Ve!="function"||Ve.name===void 0||Ve.message===void 0?ge(Ve):Ve.toString()},null):(V=be,Z=we,function(Fe){Error.stackTraceLimit+=6;try{throw new Error}catch(Ve){Fe.stack=Ve.stack}Error.stackTraceLimit-=6})}();typeof console<"u"&&console.warn!==void 0&&(_=function(be){console.warn(be)},A.isNode&&r.stderr.isTTY?_=function(be,we){var De=we?"\x1B[33m":"\x1B[31m";console.warn(De+be+`\x1B[0m
`)}:A.isNode||typeof new Error().stack!="string"||(_=function(be,we){console.warn("%c"+be,we?"color: darkorange":"color: red")}));var He={warnings:ee,longStackTraces:!1,cancellation:!1,monitoring:!1};return J&&f.longStackTraces(),{longStackTraces:function(){return He.longStackTraces},warnings:function(){return He.warnings},cancellation:function(){return He.cancellation},monitoring:function(){return He.monitoring},propagateFromFunction:function(){return ce},boundValueFunction:function(){return ve},checkForgottenReturns:function(be,we,De,Re,Ae){if(be===void 0&&we!==null&&ne){if(Ae!==void 0&&Ae._returnedNonUndefined()||(65535&Re._bitField)==0)return;De&&(De+=" ");var Fe="",Ve="";if(we._trace){for(var Ze=we._trace.stack.split(`
`),ut=le(Ze),at=ut.length-1;at>=0;--at){var pt=ut[at];if(!N.test(pt)){var Lt=pt.match(U);Lt&&(Fe="at "+Lt[1]+":"+Lt[2]+":"+Lt[3]+" ");break}}if(ut.length>0){var Dt=ut[0];for(at=0;at<Ze.length;++at)if(Ze[at]===Dt){at>0&&(Ve=`
`+Ze[at-1]);break}}}var kt="a promise was created in a "+De+"handler "+Fe+"but was not returned from it, see http://goo.gl/rRqMUw"+Ve;Re._warn(kt,!0,we)}},setBounds:function(be,we){if(de()){for(var De,Re,Ae=be.stack.split(`
`),Fe=we.stack.split(`
`),Ve=-1,Ze=-1,ut=0;ut<Ae.length;++ut)if(at=Le(Ae[ut])){De=at.fileName,Ve=at.line;break}for(ut=0;ut<Fe.length;++ut){var at;if(at=Le(Fe[ut])){Re=at.fileName,Ze=at.line;break}}Ve<0||Ze<0||!De||!Re||De!==Re||Ve>=Ze||(_e=function(pt){if(O.test(pt))return!0;var Lt=Le(pt);return!!(Lt&&Lt.fileName===De&&Ve<=Lt.line&&Lt.line<=Ze)})}},warn:G,deprecated:function(be,we){var De=be+" is deprecated and will be removed in a future version.";return we&&(De+=" Use "+we+" instead."),G(De)},CapturedTrace:qe,fireDomEvent:Q,fireGlobalEvent:se}}},{"./errors":12,"./util":36}],10:[function(s,u,d){u.exports=function(f){function m(){return this.value}function p(){throw this.reason}f.prototype.return=f.prototype.thenReturn=function(b){return b instanceof f&&b.suppressUnhandledRejections(),this._then(m,void 0,void 0,{value:b},void 0)},f.prototype.throw=f.prototype.thenThrow=function(b){return this._then(p,void 0,void 0,{reason:b},void 0)},f.prototype.catchThrow=function(b){if(arguments.length<=1)return this._then(void 0,p,void 0,{reason:b},void 0);var _=arguments[1];return this.caught(b,function(){throw _})},f.prototype.catchReturn=function(b){if(arguments.length<=1)return b instanceof f&&b.suppressUnhandledRejections(),this._then(void 0,m,void 0,{value:b},void 0);var _=arguments[1];return _ instanceof f&&_.suppressUnhandledRejections(),this.caught(b,function(){return _})}}},{}],11:[function(s,u,d){u.exports=function(f,m){var p=f.reduce,b=f.all;function _(){return b(this)}f.prototype.each=function(w){return p(this,w,m,0)._then(_,void 0,void 0,this,void 0)},f.prototype.mapSeries=function(w){return p(this,w,m,m)},f.each=function(w,x){return p(w,x,m,0)._then(_,void 0,void 0,w,void 0)},f.mapSeries=function(w,x){return p(w,x,m,m)}}},{}],12:[function(s,u,d){var f,m,p=s("./es5"),b=p.freeze,_=s("./util"),w=_.inherits,x=_.notEnumerableProp;function E(ee,J){function ne(he){if(!(this instanceof ne))return new ne(he);x(this,"message",typeof he=="string"?he:J),x(this,"name",ee),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return w(ne,Error),ne}var A=E("Warning","warning"),j=E("CancellationError","cancellation error"),O=E("TimeoutError","timeout error"),N=E("AggregateError","aggregate error");try{f=TypeError,m=RangeError}catch{f=E("TypeError","type error"),m=E("RangeError","range error")}for(var U="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),V=0;V<U.length;++V)typeof Array.prototype[U[V]]=="function"&&(N.prototype[U[V]]=Array.prototype[U[V]]);p.defineProperty(N.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),N.prototype.isOperational=!0;var Z=0;function X(ee){if(!(this instanceof X))return new X(ee);x(this,"name","OperationalError"),x(this,"message",ee),this.cause=ee,this.isOperational=!0,ee instanceof Error?(x(this,"message",ee.message),x(this,"stack",ee.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}N.prototype.toString=function(){var ee=Array(4*Z+1).join(" "),J=`
`+ee+`AggregateError of:
`;Z++,ee=Array(4*Z+1).join(" ");for(var ne=0;ne<this.length;++ne){for(var he=this[ne]===this?"[Circular AggregateError]":this[ne]+"",Q=he.split(`
`),se=0;se<Q.length;++se)Q[se]=ee+Q[se];J+=(he=Q.join(`
`))+`
`}return Z--,J},w(X,Error);var oe=Error.__BluebirdErrorTypes__;oe||(oe=b({CancellationError:j,TimeoutError:O,OperationalError:X,RejectionError:X,AggregateError:N}),p.defineProperty(Error,"__BluebirdErrorTypes__",{value:oe,writable:!1,enumerable:!1,configurable:!1})),u.exports={Error,TypeError:f,RangeError:m,CancellationError:oe.CancellationError,OperationalError:oe.OperationalError,TimeoutError:oe.TimeoutError,AggregateError:oe.AggregateError,Warning:A}},{"./es5":13,"./util":36}],13:[function(s,u,d){var f=function(){return this===void 0}();if(f)u.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:f,propertyIsWritable:function(w,x){var E=Object.getOwnPropertyDescriptor(w,x);return!(E&&!E.writable&&!E.set)}};else{var m={}.hasOwnProperty,p={}.toString,b={}.constructor.prototype,_=function(w){var x=[];for(var E in w)m.call(w,E)&&x.push(E);return x};u.exports={isArray:function(w){try{return p.call(w)==="[object Array]"}catch{return!1}},keys:_,names:_,defineProperty:function(w,x,E){return w[x]=E.value,w},getDescriptor:function(w,x){return{value:w[x]}},freeze:function(w){return w},getPrototypeOf:function(w){try{return Object(w).constructor.prototype}catch{return b}},isES5:f,propertyIsWritable:function(){return!0}}}},{}],14:[function(s,u,d){u.exports=function(f,m){var p=f.map;f.prototype.filter=function(b,_){return p(this,b,_,m)},f.filter=function(b,_,w){return p(b,_,w,m)}}},{}],15:[function(s,u,d){u.exports=function(f,m,p){var b=s("./util"),_=f.CancellationError,w=b.errorObj,x=s("./catch_filter")(p);function E(V,Z,X){this.promise=V,this.type=Z,this.handler=X,this.called=!1,this.cancelPromise=null}function A(V){this.finallyHandler=V}function j(V,Z){return V.cancelPromise!=null&&(arguments.length>1?V.cancelPromise._reject(Z):V.cancelPromise._cancel(),V.cancelPromise=null,!0)}function O(){return U.call(this,this.promise._target()._settledValue())}function N(V){if(!j(this,V))return w.e=V,w}function U(V){var Z=this.promise,X=this.handler;if(!this.called){this.called=!0;var oe=this.isFinallyHandler()?X.call(Z._boundValue()):X.call(Z._boundValue(),V);if(oe===p)return oe;if(oe!==void 0){Z._setReturnedNonUndefined();var ee=m(oe,Z);if(ee instanceof f){if(this.cancelPromise!=null){if(ee._isCancelled()){var J=new _("late cancellation observer");return Z._attachExtraTrace(J),w.e=J,w}ee.isPending()&&ee._attachCancellationCallback(new A(this))}return ee._then(O,N,void 0,this,void 0)}}}return Z.isRejected()?(j(this),w.e=V,w):(j(this),V)}return E.prototype.isFinallyHandler=function(){return this.type===0},A.prototype._resultCancelled=function(){j(this.finallyHandler)},f.prototype._passThrough=function(V,Z,X,oe){return typeof V!="function"?this.then():this._then(X,oe,void 0,new E(this,Z,V),void 0)},f.prototype.lastly=f.prototype.finally=function(V){return this._passThrough(V,0,U,U)},f.prototype.tap=function(V){return this._passThrough(V,1,U)},f.prototype.tapCatch=function(V){var Z=arguments.length;if(Z===1)return this._passThrough(V,1,void 0,U);var X,oe=new Array(Z-1),ee=0;for(X=0;X<Z-1;++X){var J=arguments[X];if(!b.isObject(J))return f.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+b.classString(J)));oe[ee++]=J}oe.length=ee;var ne=arguments[X];return this._passThrough(x(oe,ne,this),1,void 0,U)},E}},{"./catch_filter":7,"./util":36}],16:[function(s,u,d){u.exports=function(f,m,p,b,_,w){var x=s("./errors").TypeError,E=s("./util"),A=E.errorObj,j=E.tryCatch,O=[];function N(U,V,Z,X){if(w.cancellation()){var oe=new f(p),ee=this._finallyPromise=new f(p);this._promise=oe.lastly(function(){return ee}),oe._captureStackTrace(),oe._setOnCancel(this)}else(this._promise=new f(p))._captureStackTrace();this._stack=X,this._generatorFunction=U,this._receiver=V,this._generator=void 0,this._yieldHandlers=typeof Z=="function"?[Z].concat(O):O,this._yieldedPromise=null,this._cancellationPhase=!1}E.inherits(N,_),N.prototype._isResolved=function(){return this._promise===null},N.prototype._cleanup=function(){this._promise=this._generator=null,w.cancellation()&&this._finallyPromise!==null&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},N.prototype._promiseCancelled=function(){if(!this._isResolved()){var U;if(this._generator.return!==void 0)this._promise._pushContext(),U=j(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var V=new f.CancellationError("generator .return() sentinel");f.coroutine.returnSentinel=V,this._promise._attachExtraTrace(V),this._promise._pushContext(),U=j(this._generator.throw).call(this._generator,V),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(U)}},N.prototype._promiseFulfilled=function(U){this._yieldedPromise=null,this._promise._pushContext();var V=j(this._generator.next).call(this._generator,U);this._promise._popContext(),this._continue(V)},N.prototype._promiseRejected=function(U){this._yieldedPromise=null,this._promise._attachExtraTrace(U),this._promise._pushContext();var V=j(this._generator.throw).call(this._generator,U);this._promise._popContext(),this._continue(V)},N.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof f){var U=this._yieldedPromise;this._yieldedPromise=null,U.cancel()}},N.prototype.promise=function(){return this._promise},N.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},N.prototype._continue=function(U){var V=this._promise;if(U===A)return this._cleanup(),this._cancellationPhase?V.cancel():V._rejectCallback(U.e,!1);var Z=U.value;if(U.done===!0)return this._cleanup(),this._cancellationPhase?V.cancel():V._resolveCallback(Z);var X=b(Z,this._promise);if(X instanceof f||(X=function(ee,J,ne){for(var he=0;he<J.length;++he){ne._pushContext();var Q=j(J[he])(ee);if(ne._popContext(),Q===A){ne._pushContext();var se=f.reject(A.e);return ne._popContext(),se}var W=b(Q,ne);if(W instanceof f)return W}return null}(X,this._yieldHandlers,this._promise))!==null){var oe=(X=X._target())._bitField;(50397184&oe)==0?(this._yieldedPromise=X,X._proxy(this,null)):(33554432&oe)!=0?f._async.invoke(this._promiseFulfilled,this,X._value()):(16777216&oe)!=0?f._async.invoke(this._promiseRejected,this,X._reason()):this._promiseCancelled()}else this._promiseRejected(new x(`A value %s was yielded that could not be treated as a promise
See http://goo.gl/MqrFmX
`.replace("%s",String(Z))+`From coroutine:
`+this._stack.split(`
`).slice(1,-7).join(`
`)))},f.coroutine=function(U,V){if(typeof U!="function")throw new x(`generatorFunction must be a function
See http://goo.gl/MqrFmX
`);var Z=Object(V).yieldHandler,X=N,oe=new Error().stack;return function(){var ee=U.apply(this,arguments),J=new X(void 0,void 0,Z,oe),ne=J.promise();return J._generator=ee,J._promiseFulfilled(void 0),ne}},f.coroutine.addYieldHandler=function(U){if(typeof U!="function")throw new x("expecting a function but got "+E.classString(U));O.push(U)},f.spawn=function(U){if(w.deprecated("Promise.spawn()","Promise.coroutine()"),typeof U!="function")return m(`generatorFunction must be a function
See http://goo.gl/MqrFmX
`);var V=new N(U,this),Z=V.promise();return V._run(f.spawn),Z}}},{"./errors":12,"./util":36}],17:[function(s,u,d){u.exports=function(f,m,p,b,_,w){var x=s("./util");x.canEvaluate,x.tryCatch,x.errorObj,f.join=function(){var E,A=arguments.length-1;A>0&&typeof arguments[A]=="function"&&(E=arguments[A]);var j=[].slice.call(arguments);E&&j.pop();var O=new m(j).promise();return E!==void 0?O.spread(E):O}}},{"./util":36}],18:[function(s,u,d){u.exports=function(f,m,p,b,_,w){var x=f._getDomain,E=s("./util"),A=E.tryCatch,j=E.errorObj,O=f._async;function N(V,Z,X,oe){this.constructor$(V),this._promise._captureStackTrace();var ee=x();this._callback=ee===null?Z:E.domainBind(ee,Z),this._preservedValues=oe===_?new Array(this.length()):null,this._limit=X,this._inFlight=0,this._queue=[],O.invoke(this._asyncInit,this,void 0)}function U(V,Z,X,oe){if(typeof Z!="function")return p("expecting a function but got "+E.classString(Z));var ee=0;if(X!==void 0){if(typeof X!="object"||X===null)return f.reject(new TypeError("options argument must be an object but it is "+E.classString(X)));if(typeof X.concurrency!="number")return f.reject(new TypeError("'concurrency' must be a number but it is "+E.classString(X.concurrency)));ee=X.concurrency}return new N(V,Z,ee=typeof ee=="number"&&isFinite(ee)&&ee>=1?ee:0,oe).promise()}E.inherits(N,m),N.prototype._asyncInit=function(){this._init$(void 0,-2)},N.prototype._init=function(){},N.prototype._promiseFulfilled=function(V,Z){var X=this._values,oe=this.length(),ee=this._preservedValues,J=this._limit;if(Z<0){if(X[Z=-1*Z-1]=V,J>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(J>=1&&this._inFlight>=J)return X[Z]=V,this._queue.push(Z),!1;ee!==null&&(ee[Z]=V);var ne=this._promise,he=this._callback,Q=ne._boundValue();ne._pushContext();var se=A(he).call(Q,V,Z,oe),W=ne._popContext();if(w.checkForgottenReturns(se,W,ee!==null?"Promise.filter":"Promise.map",ne),se===j)return this._reject(se.e),!0;var B=b(se,this._promise);if(B instanceof f){var I=(B=B._target())._bitField;if((50397184&I)==0)return J>=1&&this._inFlight++,X[Z]=B,B._proxy(this,-1*(Z+1)),!1;if((33554432&I)==0)return(16777216&I)!=0?(this._reject(B._reason()),!0):(this._cancel(),!0);se=B._value()}X[Z]=se}return++this._totalResolved>=oe&&(ee!==null?this._filter(X,ee):this._resolve(X),!0)},N.prototype._drainQueue=function(){for(var V=this._queue,Z=this._limit,X=this._values;V.length>0&&this._inFlight<Z;){if(this._isResolved())return;var oe=V.pop();this._promiseFulfilled(X[oe],oe)}},N.prototype._filter=function(V,Z){for(var X=Z.length,oe=new Array(X),ee=0,J=0;J<X;++J)V[J]&&(oe[ee++]=Z[J]);oe.length=ee,this._resolve(oe)},N.prototype.preservedValues=function(){return this._preservedValues},f.prototype.map=function(V,Z){return U(this,V,Z,null)},f.map=function(V,Z,X,oe){return U(V,Z,X,oe)}}},{"./util":36}],19:[function(s,u,d){u.exports=function(f,m,p,b,_){var w=s("./util"),x=w.tryCatch;f.method=function(E){if(typeof E!="function")throw new f.TypeError("expecting a function but got "+w.classString(E));return function(){var A=new f(m);A._captureStackTrace(),A._pushContext();var j=x(E).apply(this,arguments),O=A._popContext();return _.checkForgottenReturns(j,O,"Promise.method",A),A._resolveFromSyncValue(j),A}},f.attempt=f.try=function(E){if(typeof E!="function")return b("expecting a function but got "+w.classString(E));var A,j=new f(m);if(j._captureStackTrace(),j._pushContext(),arguments.length>1){_.deprecated("calling Promise.try with more than 1 argument");var O=arguments[1],N=arguments[2];A=w.isArray(O)?x(E).apply(N,O):x(E).call(N,O)}else A=x(E)();var U=j._popContext();return _.checkForgottenReturns(A,U,"Promise.try",j),j._resolveFromSyncValue(A),j},f.prototype._resolveFromSyncValue=function(E){E===w.errorObj?this._rejectCallback(E.e,!1):this._resolveCallback(E,!0)}}},{"./util":36}],20:[function(s,u,d){var f=s("./util"),m=f.maybeWrapAsError,p=s("./errors").OperationalError,b=s("./es5"),_=/^(?:name|message|stack|cause)$/;function w(x){var E;if(function(N){return N instanceof Error&&b.getPrototypeOf(N)===Error.prototype}(x)){(E=new p(x)).name=x.name,E.message=x.message,E.stack=x.stack;for(var A=b.keys(x),j=0;j<A.length;++j){var O=A[j];_.test(O)||(E[O]=x[O])}return E}return f.markAsOriginatingFromRejection(x),x}u.exports=function(x,E){return function(A,j){if(x!==null){if(A){var O=w(m(A));x._attachExtraTrace(O),x._reject(O)}else if(E){var N=[].slice.call(arguments,1);x._fulfill(N)}else x._fulfill(j);x=null}}}},{"./errors":12,"./es5":13,"./util":36}],21:[function(s,u,d){u.exports=function(f){var m=s("./util"),p=f._async,b=m.tryCatch,_=m.errorObj;function w(A,j){if(!m.isArray(A))return x.call(this,A,j);var O=b(j).apply(this._boundValue(),[null].concat(A));O===_&&p.throwLater(O.e)}function x(A,j){var O=this._boundValue(),N=A===void 0?b(j).call(O,null):b(j).call(O,null,A);N===_&&p.throwLater(N.e)}function E(A,j){if(!A){var O=new Error(A+"");O.cause=A,A=O}var N=b(j).call(this._boundValue(),A);N===_&&p.throwLater(N.e)}f.prototype.asCallback=f.prototype.nodeify=function(A,j){if(typeof A=="function"){var O=x;j!==void 0&&Object(j).spread&&(O=w),this._then(O,E,void 0,this,A)}return this}}},{"./util":36}],22:[function(s,u,d){u.exports=function(){var f=function(){return new N(`circular promise resolution chain
See http://goo.gl/MqrFmX
`)},m=function(){return new z.PromiseInspection(this._target())},p=function(q){return z.reject(new N(q))};function b(){}var _,w={},x=s("./util");_=x.isNode?function(){var q=r.domain;return q===void 0&&(q=null),q}:function(){return null},x.notEnumerableProp(z,"_getDomain",_);var E=s("./es5"),A=s("./async"),j=new A;E.defineProperty(z,"_async",{value:j});var O=s("./errors"),N=z.TypeError=O.TypeError;z.RangeError=O.RangeError;var U=z.CancellationError=O.CancellationError;z.TimeoutError=O.TimeoutError,z.OperationalError=O.OperationalError,z.RejectionError=O.OperationalError,z.AggregateError=O.AggregateError;var V=function(){},Z={},X={},oe=s("./thenables")(z,V),ee=s("./promise_array")(z,V,oe,p,b),J=s("./context")(z),ne=J.create,he=s("./debuggability")(z,J),Q=(he.CapturedTrace,s("./finally")(z,oe,X)),se=s("./catch_filter")(X),W=s("./nodeback"),B=x.errorObj,I=x.tryCatch;function z(q){q!==V&&function(re,ue){if(re==null||re.constructor!==z)throw new N(`the promise constructor cannot be invoked directly
See http://goo.gl/MqrFmX
`);if(typeof ue!="function")throw new N("expecting a function but got "+x.classString(ue))}(this,q),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(q),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function M(q){this.promise._resolveCallback(q)}function D(q){this.promise._rejectCallback(q,!1)}function Y(q){var re=new z(V);re._fulfillmentHandler0=q,re._rejectionHandler0=q,re._promise0=q,re._receiver0=q}return z.prototype.toString=function(){return"[object Promise]"},z.prototype.caught=z.prototype.catch=function(q){var re=arguments.length;if(re>1){var ue,ce=new Array(re-1),ve=0;for(ue=0;ue<re-1;++ue){var k=arguments[ue];if(!x.isObject(k))return p("Catch statement predicate: expecting an object but got "+x.classString(k));ce[ve++]=k}return ce.length=ve,q=arguments[ue],this.then(void 0,se(ce,q,this))}return this.then(void 0,q)},z.prototype.reflect=function(){return this._then(m,m,void 0,this,void 0)},z.prototype.then=function(q,re){if(he.warnings()&&arguments.length>0&&typeof q!="function"&&typeof re!="function"){var ue=".then() only accepts functions but was passed: "+x.classString(q);arguments.length>1&&(ue+=", "+x.classString(re)),this._warn(ue)}return this._then(q,re,void 0,void 0,void 0)},z.prototype.done=function(q,re){this._then(q,re,void 0,void 0,void 0)._setIsFinal()},z.prototype.spread=function(q){return typeof q!="function"?p("expecting a function but got "+x.classString(q)):this.all()._then(q,void 0,void 0,Z,void 0)},z.prototype.toJSON=function(){var q={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(q.fulfillmentValue=this.value(),q.isFulfilled=!0):this.isRejected()&&(q.rejectionReason=this.reason(),q.isRejected=!0),q},z.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new ee(this).promise()},z.prototype.error=function(q){return this.caught(x.originatesFromRejection,q)},z.getNewLibraryCopy=u.exports,z.is=function(q){return q instanceof z},z.fromNode=z.fromCallback=function(q){var re=new z(V);re._captureStackTrace();var ue=arguments.length>1&&!!Object(arguments[1]).multiArgs,ce=I(q)(W(re,ue));return ce===B&&re._rejectCallback(ce.e,!0),re._isFateSealed()||re._setAsyncGuaranteed(),re},z.all=function(q){return new ee(q).promise()},z.cast=function(q){var re=oe(q);return re instanceof z||((re=new z(V))._captureStackTrace(),re._setFulfilled(),re._rejectionHandler0=q),re},z.resolve=z.fulfilled=z.cast,z.reject=z.rejected=function(q){var re=new z(V);return re._captureStackTrace(),re._rejectCallback(q,!0),re},z.setScheduler=function(q){if(typeof q!="function")throw new N("expecting a function but got "+x.classString(q));return j.setScheduler(q)},z.prototype._then=function(q,re,ue,ce,ve){var k=ve!==void 0,F=k?ve:new z(V),G=this._target(),le=G._bitField;k||(F._propagateFrom(this,3),F._captureStackTrace(),ce===void 0&&(2097152&this._bitField)!=0&&(ce=(50397184&le)!=0?this._boundValue():G===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,F));var H=_();if((50397184&le)!=0){var ae,fe,ge=G._settlePromiseCtx;(33554432&le)!=0?(fe=G._rejectionHandler0,ae=q):(16777216&le)!=0?(fe=G._fulfillmentHandler0,ae=re,G._unsetRejectionIsUnhandled()):(ge=G._settlePromiseLateCancellationObserver,fe=new U("late cancellation observer"),G._attachExtraTrace(fe),ae=re),j.invoke(ge,G,{handler:H===null?ae:typeof ae=="function"&&x.domainBind(H,ae),promise:F,receiver:ce,value:fe})}else G._addCallbacks(q,re,F,ce,H);return F},z.prototype._length=function(){return 65535&this._bitField},z.prototype._isFateSealed=function(){return(117506048&this._bitField)!=0},z.prototype._isFollowing=function(){return(67108864&this._bitField)==67108864},z.prototype._setLength=function(q){this._bitField=-65536&this._bitField|65535&q},z.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},z.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},z.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},z.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},z.prototype._isFinal=function(){return(4194304&this._bitField)>0},z.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},z.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},z.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},z.prototype._setAsyncGuaranteed=function(){j.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},z.prototype._receiverAt=function(q){var re=q===0?this._receiver0:this[4*q-4+3];if(re!==w)return re===void 0&&this._isBound()?this._boundValue():re},z.prototype._promiseAt=function(q){return this[4*q-4+2]},z.prototype._fulfillmentHandlerAt=function(q){return this[4*q-4+0]},z.prototype._rejectionHandlerAt=function(q){return this[4*q-4+1]},z.prototype._boundValue=function(){},z.prototype._migrateCallback0=function(q){q._bitField;var re=q._fulfillmentHandler0,ue=q._rejectionHandler0,ce=q._promise0,ve=q._receiverAt(0);ve===void 0&&(ve=w),this._addCallbacks(re,ue,ce,ve,null)},z.prototype._migrateCallbackAt=function(q,re){var ue=q._fulfillmentHandlerAt(re),ce=q._rejectionHandlerAt(re),ve=q._promiseAt(re),k=q._receiverAt(re);k===void 0&&(k=w),this._addCallbacks(ue,ce,ve,k,null)},z.prototype._addCallbacks=function(q,re,ue,ce,ve){var k=this._length();if(k>=65531&&(k=0,this._setLength(0)),k===0)this._promise0=ue,this._receiver0=ce,typeof q=="function"&&(this._fulfillmentHandler0=ve===null?q:x.domainBind(ve,q)),typeof re=="function"&&(this._rejectionHandler0=ve===null?re:x.domainBind(ve,re));else{var F=4*k-4;this[F+2]=ue,this[F+3]=ce,typeof q=="function"&&(this[F+0]=ve===null?q:x.domainBind(ve,q)),typeof re=="function"&&(this[F+1]=ve===null?re:x.domainBind(ve,re))}return this._setLength(k+1),k},z.prototype._proxy=function(q,re){this._addCallbacks(void 0,void 0,re,q,null)},z.prototype._resolveCallback=function(q,re){if((117506048&this._bitField)==0){if(q===this)return this._rejectCallback(f(),!1);var ue=oe(q,this);if(!(ue instanceof z))return this._fulfill(q);re&&this._propagateFrom(ue,2);var ce=ue._target();if(ce!==this){var ve=ce._bitField;if((50397184&ve)==0){var k=this._length();k>0&&ce._migrateCallback0(this);for(var F=1;F<k;++F)ce._migrateCallbackAt(this,F);this._setFollowing(),this._setLength(0),this._setFollowee(ce)}else if((33554432&ve)!=0)this._fulfill(ce._value());else if((16777216&ve)!=0)this._reject(ce._reason());else{var G=new U("late cancellation observer");ce._attachExtraTrace(G),this._reject(G)}}else this._reject(f())}},z.prototype._rejectCallback=function(q,re,ue){var ce=x.ensureErrorObject(q),ve=ce===q;if(!ve&&!ue&&he.warnings()){var k="a promise was rejected with a non-error: "+x.classString(q);this._warn(k,!0)}this._attachExtraTrace(ce,!!re&&ve),this._reject(q)},z.prototype._resolveFromExecutor=function(q){if(q!==V){var re=this;this._captureStackTrace(),this._pushContext();var ue=!0,ce=this._execute(q,function(ve){re._resolveCallback(ve)},function(ve){re._rejectCallback(ve,ue)});ue=!1,this._popContext(),ce!==void 0&&re._rejectCallback(ce,!0)}},z.prototype._settlePromiseFromHandler=function(q,re,ue,ce){var ve=ce._bitField;if((65536&ve)==0){var k;ce._pushContext(),re===Z?ue&&typeof ue.length=="number"?k=I(q).apply(this._boundValue(),ue):(k=B).e=new N("cannot .spread() a non-array: "+x.classString(ue)):k=I(q).call(re,ue);var F=ce._popContext();(65536&(ve=ce._bitField))==0&&(k===X?ce._reject(ue):k===B?ce._rejectCallback(k.e,!1):(he.checkForgottenReturns(k,F,"",ce,this),ce._resolveCallback(k)))}},z.prototype._target=function(){for(var q=this;q._isFollowing();)q=q._followee();return q},z.prototype._followee=function(){return this._rejectionHandler0},z.prototype._setFollowee=function(q){this._rejectionHandler0=q},z.prototype._settlePromise=function(q,re,ue,ce){var ve=q instanceof z,k=this._bitField,F=(134217728&k)!=0;(65536&k)!=0?(ve&&q._invokeInternalOnCancel(),ue instanceof Q&&ue.isFinallyHandler()?(ue.cancelPromise=q,I(re).call(ue,ce)===B&&q._reject(B.e)):re===m?q._fulfill(m.call(ue)):ue instanceof b?ue._promiseCancelled(q):ve||q instanceof ee?q._cancel():ue.cancel()):typeof re=="function"?ve?(F&&q._setAsyncGuaranteed(),this._settlePromiseFromHandler(re,ue,ce,q)):re.call(ue,ce,q):ue instanceof b?ue._isResolved()||((33554432&k)!=0?ue._promiseFulfilled(ce,q):ue._promiseRejected(ce,q)):ve&&(F&&q._setAsyncGuaranteed(),(33554432&k)!=0?q._fulfill(ce):q._reject(ce))},z.prototype._settlePromiseLateCancellationObserver=function(q){var re=q.handler,ue=q.promise,ce=q.receiver,ve=q.value;typeof re=="function"?ue instanceof z?this._settlePromiseFromHandler(re,ce,ve,ue):re.call(ce,ve,ue):ue instanceof z&&ue._reject(ve)},z.prototype._settlePromiseCtx=function(q){this._settlePromise(q.promise,q.handler,q.receiver,q.value)},z.prototype._settlePromise0=function(q,re,ue){var ce=this._promise0,ve=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(ce,q,ve,re)},z.prototype._clearCallbackDataAtIndex=function(q){var re=4*q-4;this[re+2]=this[re+3]=this[re+0]=this[re+1]=void 0},z.prototype._fulfill=function(q){var re=this._bitField;if(!((117506048&re)>>>16)){if(q===this){var ue=f();return this._attachExtraTrace(ue),this._reject(ue)}this._setFulfilled(),this._rejectionHandler0=q,(65535&re)>0&&((134217728&re)!=0?this._settlePromises():j.settlePromises(this))}},z.prototype._reject=function(q){var re=this._bitField;if(!((117506048&re)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=q,this._isFinal())return j.fatalError(q,x.isNode);(65535&re)>0?j.settlePromises(this):this._ensurePossibleRejectionHandled()}},z.prototype._fulfillPromises=function(q,re){for(var ue=1;ue<q;ue++){var ce=this._fulfillmentHandlerAt(ue),ve=this._promiseAt(ue),k=this._receiverAt(ue);this._clearCallbackDataAtIndex(ue),this._settlePromise(ve,ce,k,re)}},z.prototype._rejectPromises=function(q,re){for(var ue=1;ue<q;ue++){var ce=this._rejectionHandlerAt(ue),ve=this._promiseAt(ue),k=this._receiverAt(ue);this._clearCallbackDataAtIndex(ue),this._settlePromise(ve,ce,k,re)}},z.prototype._settlePromises=function(){var q=this._bitField,re=65535&q;if(re>0){if((16842752&q)!=0){var ue=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,ue,q),this._rejectPromises(re,ue)}else{var ce=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,ce,q),this._fulfillPromises(re,ce)}this._setLength(0)}this._clearCancellationData()},z.prototype._settledValue=function(){var q=this._bitField;return(33554432&q)!=0?this._rejectionHandler0:(16777216&q)!=0?this._fulfillmentHandler0:void 0},z.defer=z.pending=function(){return he.deprecated("Promise.defer","new Promise"),{promise:new z(V),resolve:M,reject:D}},x.notEnumerableProp(z,"_makeSelfResolutionError",f),s("./method")(z,V,oe,p,he),s("./bind")(z,V,oe,he),s("./cancel")(z,ee,p,he),s("./direct_resolve")(z),s("./synchronous_inspection")(z),s("./join")(z,ee,oe,V,j,_),z.Promise=z,z.version="3.5.1",s("./map.js")(z,ee,p,oe,V,he),s("./call_get.js")(z),s("./using.js")(z,p,oe,ne,V,he),s("./timers.js")(z,V,he),s("./generators.js")(z,p,V,oe,b,he),s("./nodeify.js")(z),s("./promisify.js")(z,V),s("./props.js")(z,ee,oe,p),s("./race.js")(z,V,oe,p),s("./reduce.js")(z,ee,p,oe,V,he),s("./settle.js")(z,ee,he),s("./some.js")(z,ee,p),s("./filter.js")(z,V),s("./each.js")(z,V),s("./any.js")(z),x.toFastProperties(z),x.toFastProperties(z.prototype),Y({a:1}),Y({b:2}),Y({c:3}),Y(1),Y(function(){}),Y(void 0),Y(!1),Y(new z(V)),he.setBounds(A.firstLineError,x.lastLineError),z}},{"./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(s,u,d){u.exports=function(f,m,p,b,_){var w=s("./util");function x(E){var A=this._promise=new f(m);E instanceof f&&A._propagateFrom(E,3),A._setOnCancel(this),this._values=E,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return w.isArray,w.inherits(x,_),x.prototype.length=function(){return this._length},x.prototype.promise=function(){return this._promise},x.prototype._init=function E(A,j){var O=p(this._values,this._promise);if(O instanceof f){var N=(O=O._target())._bitField;if(this._values=O,(50397184&N)==0)return this._promise._setAsyncGuaranteed(),O._then(E,this._reject,void 0,this,j);if((33554432&N)==0)return(16777216&N)!=0?this._reject(O._reason()):this._cancel();O=O._value()}if((O=w.asArray(O))!==null)O.length!==0?this._iterate(O):j===-5?this._resolveEmptyArray():this._resolve(function(V){switch(j){case-2:return[];case-3:return{};case-6:return new Map}}());else{var U=b("expecting an array or an iterable object but got "+w.classString(O)).reason();this._promise._rejectCallback(U,!1)}},x.prototype._iterate=function(E){var A=this.getActualLength(E.length);this._length=A,this._values=this.shouldCopyValues()?new Array(A):this._values;for(var j=this._promise,O=!1,N=null,U=0;U<A;++U){var V=p(E[U],j);N=V instanceof f?(V=V._target())._bitField:null,O?N!==null&&V.suppressUnhandledRejections():N!==null?(50397184&N)==0?(V._proxy(this,U),this._values[U]=V):O=(33554432&N)!=0?this._promiseFulfilled(V._value(),U):(16777216&N)!=0?this._promiseRejected(V._reason(),U):this._promiseCancelled(U):O=this._promiseFulfilled(V,U)}O||j._setAsyncGuaranteed()},x.prototype._isResolved=function(){return this._values===null},x.prototype._resolve=function(E){this._values=null,this._promise._fulfill(E)},x.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},x.prototype._reject=function(E){this._values=null,this._promise._rejectCallback(E,!1)},x.prototype._promiseFulfilled=function(E,A){return this._values[A]=E,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},x.prototype._promiseCancelled=function(){return this._cancel(),!0},x.prototype._promiseRejected=function(E){return this._totalResolved++,this._reject(E),!0},x.prototype._resultCancelled=function(){if(!this._isResolved()){var E=this._values;if(this._cancel(),E instanceof f)E.cancel();else for(var A=0;A<E.length;++A)E[A]instanceof f&&E[A].cancel()}},x.prototype.shouldCopyValues=function(){return!0},x.prototype.getActualLength=function(E){return E},x}},{"./util":36}],24:[function(s,u,d){u.exports=function(f,m){var p={},b=s("./util"),_=s("./nodeback"),w=b.withAppended,x=b.maybeWrapAsError,E=b.canEvaluate,A=s("./errors").TypeError,j={__isPromisified__:!0},O=new RegExp("^(?:"+["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"].join("|")+")$"),N=function(ne){return b.isIdentifier(ne)&&ne.charAt(0)!=="_"&&ne!=="constructor"};function U(ne){return!O.test(ne)}function V(ne){try{return ne.__isPromisified__===!0}catch{return!1}}function Z(ne,he,Q){var se=b.getDataPropertyOrDefault(ne,he+Q,j);return!!se&&V(se)}function X(ne,he,Q,se){for(var W=b.inheritedDataKeys(ne),B=[],I=0;I<W.length;++I){var z=W[I],M=ne[z],D=se===N||N(z);typeof M!="function"||V(M)||Z(ne,z,he)||!se(z,M,ne,D)||B.push(z,M)}return function(Y,q,re){for(var ue=0;ue<Y.length;ue+=2){var ce=Y[ue];if(re.test(ce)){for(var ve=ce.replace(re,""),k=0;k<Y.length;k+=2)if(Y[k]===ve)throw new A(`Cannot promisify an API that has normal methods with '%s'-suffix
See http://goo.gl/MqrFmX
`.replace("%s",q))}}}(B,he,Q),B}var oe=function(ne){return ne.replace(/([$])/,"\\$")},ee=E?void 0:function(ne,he,Q,se,W,B){var I=function(){return this}(),z=ne;function M(){var D=he;he===p&&(D=this);var Y=new f(m);Y._captureStackTrace();var q=typeof z=="string"&&this!==I?this[z]:ne,re=_(Y,B);try{q.apply(D,w(arguments,re))}catch(ue){Y._rejectCallback(x(ue),!0,!0)}return Y._isFateSealed()||Y._setAsyncGuaranteed(),Y}return typeof z=="string"&&(ne=se),b.notEnumerableProp(M,"__isPromisified__",!0),M};function J(ne,he,Q,se,W){for(var B=new RegExp(oe(he)+"$"),I=X(ne,he,B,Q),z=0,M=I.length;z<M;z+=2){var D=I[z],Y=I[z+1],q=D+he;if(se===ee)ne[q]=ee(D,p,D,Y,he,W);else{var re=se(Y,function(){return ee(D,p,D,Y,he,W)});b.notEnumerableProp(re,"__isPromisified__",!0),ne[q]=re}}return b.toFastProperties(ne),ne}f.promisify=function(ne,he){if(typeof ne!="function")throw new A("expecting a function but got "+b.classString(ne));if(V(ne))return ne;var Q=(he=Object(he)).context===void 0?p:he.context,se=!!he.multiArgs,W=function(B,I,z){return ee(B,I,void 0,B,null,se)}(ne,Q);return b.copyDescriptors(ne,W,U),W},f.promisifyAll=function(ne,he){if(typeof ne!="function"&&typeof ne!="object")throw new A(`the target of promisifyAll must be an object or a function
See http://goo.gl/MqrFmX
`);var Q=!!(he=Object(he)).multiArgs,se=he.suffix;typeof se!="string"&&(se="Async");var W=he.filter;typeof W!="function"&&(W=N);var B=he.promisifier;if(typeof B!="function"&&(B=ee),!b.isIdentifier(se))throw new RangeError(`suffix must be a valid identifier
See http://goo.gl/MqrFmX
`);for(var I=b.inheritedDataKeys(ne),z=0;z<I.length;++z){var M=ne[I[z]];I[z]!=="constructor"&&b.isClass(M)&&(J(M.prototype,se,W,B,Q),J(M,se,W,B,Q))}return J(ne,se,W,B,Q)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(s,u,d){u.exports=function(f,m,p,b){var _,w=s("./util"),x=w.isObject,E=s("./es5");typeof Map=="function"&&(_=Map);var A=function(){var N=0,U=0;function V(Z,X){this[N]=Z,this[N+U]=X,N++}return function(Z){U=Z.size,N=0;var X=new Array(2*Z.size);return Z.forEach(V,X),X}}();function j(N){var U,V=!1;if(_!==void 0&&N instanceof _)U=A(N),V=!0;else{var Z=E.keys(N),X=Z.length;U=new Array(2*X);for(var oe=0;oe<X;++oe){var ee=Z[oe];U[oe]=N[ee],U[oe+X]=ee}}this.constructor$(U),this._isMap=V,this._init$(void 0,V?-6:-3)}function O(N){var U,V=p(N);return x(V)?(U=V instanceof f?V._then(f.props,void 0,void 0,void 0,void 0):new j(V).promise(),V instanceof f&&U._propagateFrom(V,2),U):b(`cannot await properties of a non-object
See http://goo.gl/MqrFmX
`)}w.inherits(j,m),j.prototype._init=function(){},j.prototype._promiseFulfilled=function(N,U){if(this._values[U]=N,++this._totalResolved>=this._length){var V;if(this._isMap)V=function(ee){for(var J=new _,ne=ee.length/2|0,he=0;he<ne;++he){var Q=ee[ne+he],se=ee[he];J.set(Q,se)}return J}(this._values);else{V={};for(var Z=this.length(),X=0,oe=this.length();X<oe;++X)V[this._values[X+Z]]=this._values[X]}return this._resolve(V),!0}return!1},j.prototype.shouldCopyValues=function(){return!1},j.prototype.getActualLength=function(N){return N>>1},f.prototype.props=function(){return O(this)},f.props=function(N){return O(N)}}},{"./es5":13,"./util":36}],26:[function(s,u,d){function f(m){this._capacity=m,this._length=0,this._front=0}f.prototype._willBeOverCapacity=function(m){return this._capacity<m},f.prototype._pushOne=function(m){var p=this.length();this._checkCapacity(p+1),this[this._front+p&this._capacity-1]=m,this._length=p+1},f.prototype.push=function(m,p,b){var _=this.length()+3;if(this._willBeOverCapacity(_))return this._pushOne(m),this._pushOne(p),void this._pushOne(b);var w=this._front+_-3;this._checkCapacity(_);var x=this._capacity-1;this[w+0&x]=m,this[w+1&x]=p,this[w+2&x]=b,this._length=_},f.prototype.shift=function(){var m=this._front,p=this[m];return this[m]=void 0,this._front=m+1&this._capacity-1,this._length--,p},f.prototype.length=function(){return this._length},f.prototype._checkCapacity=function(m){this._capacity<m&&this._resizeTo(this._capacity<<1)},f.prototype._resizeTo=function(m){var p=this._capacity;this._capacity=m,function(b,_,w,x,E){for(var A=0;A<E;++A)w[A+x]=b[A+0],b[A+0]=void 0}(this,0,this,p,this._front+this._length&p-1)},u.exports=f},{}],27:[function(s,u,d){u.exports=function(f,m,p,b){var _=s("./util"),w=function(E){return E.then(function(A){return x(A,E)})};function x(E,A){var j=p(E);if(j instanceof f)return w(j);if((E=_.asArray(E))===null)return b("expecting an array or an iterable object but got "+_.classString(E));var O=new f(m);A!==void 0&&O._propagateFrom(A,3);for(var N=O._fulfill,U=O._reject,V=0,Z=E.length;V<Z;++V){var X=E[V];(X!==void 0||V in E)&&f.cast(X)._then(N,U,void 0,O,null)}return O}f.race=function(E){return x(E,void 0)},f.prototype.race=function(){return x(this,void 0)}}},{"./util":36}],28:[function(s,u,d){u.exports=function(f,m,p,b,_,w){var x=f._getDomain,E=s("./util"),A=E.tryCatch;function j(Z,X,oe,ee){this.constructor$(Z);var J=x();this._fn=J===null?X:E.domainBind(J,X),oe!==void 0&&(oe=f.resolve(oe))._attachCancellationCallback(this),this._initialValue=oe,this._currentCancellable=null,this._eachValues=ee===_?Array(this._length):ee===0?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function O(Z,X){this.isFulfilled()?X._resolve(Z):X._reject(Z)}function N(Z,X,oe,ee){return typeof X!="function"?p("expecting a function but got "+E.classString(X)):new j(Z,X,oe,ee).promise()}function U(Z){this.accum=Z,this.array._gotAccum(Z);var X=b(this.value,this.array._promise);return X instanceof f?(this.array._currentCancellable=X,X._then(V,void 0,void 0,this,void 0)):V.call(this,X)}function V(Z){var X,oe=this.array,ee=oe._promise,J=A(oe._fn);ee._pushContext(),(X=oe._eachValues!==void 0?J.call(ee._boundValue(),Z,this.index,this.length):J.call(ee._boundValue(),this.accum,Z,this.index,this.length))instanceof f&&(oe._currentCancellable=X);var ne=ee._popContext();return w.checkForgottenReturns(X,ne,oe._eachValues!==void 0?"Promise.each":"Promise.reduce",ee),X}E.inherits(j,m),j.prototype._gotAccum=function(Z){this._eachValues!==void 0&&this._eachValues!==null&&Z!==_&&this._eachValues.push(Z)},j.prototype._eachComplete=function(Z){return this._eachValues!==null&&this._eachValues.push(Z),this._eachValues},j.prototype._init=function(){},j.prototype._resolveEmptyArray=function(){this._resolve(this._eachValues!==void 0?this._eachValues:this._initialValue)},j.prototype.shouldCopyValues=function(){return!1},j.prototype._resolve=function(Z){this._promise._resolveCallback(Z),this._values=null},j.prototype._resultCancelled=function(Z){if(Z===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof f&&this._currentCancellable.cancel(),this._initialValue instanceof f&&this._initialValue.cancel())},j.prototype._iterate=function(Z){var X,oe;this._values=Z;var ee=Z.length;if(this._initialValue!==void 0?(X=this._initialValue,oe=0):(X=f.resolve(Z[0]),oe=1),this._currentCancellable=X,!X.isRejected())for(;oe<ee;++oe){var J={accum:null,value:Z[oe],index:oe,length:ee,array:this};X=X._then(U,void 0,void 0,J,void 0)}this._eachValues!==void 0&&(X=X._then(this._eachComplete,void 0,void 0,this,void 0)),X._then(O,O,void 0,X,this)},f.prototype.reduce=function(Z,X){return N(this,Z,X,null)},f.reduce=function(Z,X,oe,ee){return N(Z,X,oe,ee)}}},{"./util":36}],29:[function(s,u,d){var f,m=s("./util"),p=m.getNativePromise();if(m.isNode&&typeof MutationObserver>"u"){var b=i.setImmediate,_=r.nextTick;f=m.isRecentNode?function(x){b.call(i,x)}:function(x){_.call(r,x)}}else if(typeof p=="function"&&typeof p.resolve=="function"){var w=p.resolve();f=function(x){w.then(x)}}else f=typeof MutationObserver>"u"||typeof window<"u"&&window.navigator&&(window.navigator.standalone||window.cordova)?a!==void 0?function(x){a(x)}:typeof setTimeout<"u"?function(x){setTimeout(x,0)}:function(){throw new Error(`No async scheduler available
See http://goo.gl/MqrFmX
`)}:function(){var x=document.createElement("div"),E={attributes:!0},A=!1,j=document.createElement("div");return new MutationObserver(function(){x.classList.toggle("foo"),A=!1}).observe(j,E),function(O){var N=new MutationObserver(function(){N.disconnect(),O()});N.observe(x,E),A||(A=!0,j.classList.toggle("foo"))}}();u.exports=f},{"./util":36}],30:[function(s,u,d){u.exports=function(f,m,p){var b=f.PromiseInspection;function _(w){this.constructor$(w)}s("./util").inherits(_,m),_.prototype._promiseResolved=function(w,x){return this._values[w]=x,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},_.prototype._promiseFulfilled=function(w,x){var E=new b;return E._bitField=33554432,E._settledValueField=w,this._promiseResolved(x,E)},_.prototype._promiseRejected=function(w,x){var E=new b;return E._bitField=16777216,E._settledValueField=w,this._promiseResolved(x,E)},f.settle=function(w){return p.deprecated(".settle()",".reflect()"),new _(w).promise()},f.prototype.settle=function(){return f.settle(this)}}},{"./util":36}],31:[function(s,u,d){u.exports=function(f,m,p){var b=s("./util"),_=s("./errors").RangeError,w=s("./errors").AggregateError,x=b.isArray,E={};function A(O){this.constructor$(O),this._howMany=0,this._unwrap=!1,this._initialized=!1}function j(O,N){if((0|N)!==N||N<0)return p(`expecting a positive integer
See http://goo.gl/MqrFmX
`);var U=new A(O),V=U.promise();return U.setHowMany(N),U.init(),V}b.inherits(A,m),A.prototype._init=function(){if(this._initialized)if(this._howMany!==0){this._init$(void 0,-5);var O=x(this._values);!this._isResolved()&&O&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},A.prototype.init=function(){this._initialized=!0,this._init()},A.prototype.setUnwrap=function(){this._unwrap=!0},A.prototype.howMany=function(){return this._howMany},A.prototype.setHowMany=function(O){this._howMany=O},A.prototype._promiseFulfilled=function(O){return this._addFulfilled(O),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),this.howMany()===1&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},A.prototype._promiseRejected=function(O){return this._addRejected(O),this._checkOutcome()},A.prototype._promiseCancelled=function(){return this._values instanceof f||this._values==null?this._cancel():(this._addRejected(E),this._checkOutcome())},A.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var O=new w,N=this.length();N<this._values.length;++N)this._values[N]!==E&&O.push(this._values[N]);return O.length>0?this._reject(O):this._cancel(),!0}return!1},A.prototype._fulfilled=function(){return this._totalResolved},A.prototype._rejected=function(){return this._values.length-this.length()},A.prototype._addRejected=function(O){this._values.push(O)},A.prototype._addFulfilled=function(O){this._values[this._totalResolved++]=O},A.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},A.prototype._getRangeError=function(O){var N="Input array must contain at least "+this._howMany+" items but contains only "+O+" items";return new _(N)},A.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},f.some=function(O,N){return j(O,N)},f.prototype.some=function(O){return j(this,O)},f._SomePromiseArray=A}},{"./errors":12,"./util":36}],32:[function(s,u,d){u.exports=function(f){function m(A){A!==void 0?(A=A._target(),this._bitField=A._bitField,this._settledValueField=A._isFateSealed()?A._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}m.prototype._settledValue=function(){return this._settledValueField};var p=m.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()},b=m.prototype.error=m.prototype.reason=function(){if(!this.isRejected())throw new TypeError(`cannot get rejection reason of a non-rejected promise
See http://goo.gl/MqrFmX
`);return this._settledValue()},_=m.prototype.isFulfilled=function(){return(33554432&this._bitField)!=0},w=m.prototype.isRejected=function(){return(16777216&this._bitField)!=0},x=m.prototype.isPending=function(){return(50397184&this._bitField)==0},E=m.prototype.isResolved=function(){return(50331648&this._bitField)!=0};m.prototype.isCancelled=function(){return(8454144&this._bitField)!=0},f.prototype.__isCancelled=function(){return(65536&this._bitField)==65536},f.prototype._isCancelled=function(){return this._target().__isCancelled()},f.prototype.isCancelled=function(){return(8454144&this._target()._bitField)!=0},f.prototype.isPending=function(){return x.call(this._target())},f.prototype.isRejected=function(){return w.call(this._target())},f.prototype.isFulfilled=function(){return _.call(this._target())},f.prototype.isResolved=function(){return E.call(this._target())},f.prototype.value=function(){return p.call(this._target())},f.prototype.reason=function(){var A=this._target();return A._unsetRejectionIsUnhandled(),b.call(A)},f.prototype._value=function(){return this._settledValue()},f.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},f.PromiseInspection=m}},{}],33:[function(s,u,d){u.exports=function(f,m){var p=s("./util"),b=p.errorObj,_=p.isObject,w={}.hasOwnProperty;return function(x,E){if(_(x)){if(x instanceof f)return x;var A=function(O){try{return function(N){return N.then}(O)}catch(N){return b.e=N,b}}(x);if(A===b){E&&E._pushContext();var j=f.reject(A.e);return E&&E._popContext(),j}if(typeof A=="function")return function(O){try{return w.call(O,"_promise0")}catch{return!1}}(x)?(j=new f(m),x._then(j._fulfill,j._reject,void 0,j,null),j):function(O,N,U){var V=new f(m),Z=V;U&&U._pushContext(),V._captureStackTrace(),U&&U._popContext();var X=!0,oe=p.tryCatch(N).call(O,function(ee){V&&(V._resolveCallback(ee),V=null)},function(ee){V&&(V._rejectCallback(ee,X,!0),V=null)});return X=!1,V&&oe===b&&(V._rejectCallback(oe.e,!0,!0),V=null),Z}(x,A,E)}return x}}},{"./util":36}],34:[function(s,u,d){u.exports=function(f,m,p){var b=s("./util"),_=f.TimeoutError;function w(O){this.handle=O}w.prototype._resultCancelled=function(){clearTimeout(this.handle)};var x=function(O){return E(+this).thenReturn(O)},E=f.delay=function(O,N){var U,V;return N!==void 0?(U=f.resolve(N)._then(x,null,null,O,void 0),p.cancellation()&&N instanceof f&&U._setOnCancel(N)):(U=new f(m),V=setTimeout(function(){U._fulfill()},+O),p.cancellation()&&U._setOnCancel(new w(V)),U._captureStackTrace()),U._setAsyncGuaranteed(),U};function A(O){return clearTimeout(this.handle),O}function j(O){throw clearTimeout(this.handle),O}f.prototype.delay=function(O){return E(O,this)},f.prototype.timeout=function(O,N){var U,V;O=+O;var Z=new w(setTimeout(function(){U.isPending()&&function(X,oe,ee){var J;J=typeof oe!="string"?oe instanceof Error?oe:new _("operation timed out"):new _(oe),b.markAsOriginatingFromRejection(J),X._attachExtraTrace(J),X._reject(J),ee?.cancel()}(U,N,V)},O));return p.cancellation()?(V=this.then(),(U=V._then(A,j,void 0,Z,void 0))._setOnCancel(Z)):U=this._then(A,j,void 0,Z,void 0),U}}},{"./util":36}],35:[function(s,u,d){u.exports=function(f,m,p,b,_,w){var x=s("./util"),E=s("./errors").TypeError,A=s("./util").inherits,j=x.errorObj,O=x.tryCatch,N={};function U(J){setTimeout(function(){throw J},0)}function V(J,ne){var he=0,Q=J.length,se=new f(_);return function W(){if(he>=Q)return se._fulfill();var B=function(I){var z=p(I);return z!==I&&typeof I._isDisposable=="function"&&typeof I._getDisposer=="function"&&I._isDisposable()&&z._setDisposable(I._getDisposer()),z}(J[he++]);if(B instanceof f&&B._isDisposable()){try{B=p(B._getDisposer().tryDispose(ne),J.promise)}catch(I){return U(I)}if(B instanceof f)return B._then(W,U,null,null,null)}W()}(),se}function Z(J,ne,he){this._data=J,this._promise=ne,this._context=he}function X(J,ne,he){this.constructor$(J,ne,he)}function oe(J){return Z.isDisposer(J)?(this.resources[this.index]._setDisposable(J),J.promise()):J}function ee(J){this.length=J,this.promise=null,this[J-1]=null}Z.prototype.data=function(){return this._data},Z.prototype.promise=function(){return this._promise},Z.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():N},Z.prototype.tryDispose=function(J){var ne=this.resource(),he=this._context;he!==void 0&&he._pushContext();var Q=ne!==N?this.doDispose(ne,J):null;return he!==void 0&&he._popContext(),this._promise._unsetDisposable(),this._data=null,Q},Z.isDisposer=function(J){return J!=null&&typeof J.resource=="function"&&typeof J.tryDispose=="function"},A(X,Z),X.prototype.doDispose=function(J,ne){return this.data().call(J,J,ne)},ee.prototype._resultCancelled=function(){for(var J=this.length,ne=0;ne<J;++ne){var he=this[ne];he instanceof f&&he.cancel()}},f.using=function(){var J=arguments.length;if(J<2)return m("you must pass at least 2 arguments to Promise.using");var ne,he=arguments[J-1];if(typeof he!="function")return m("expecting a function but got "+x.classString(he));var Q=!0;J===2&&Array.isArray(arguments[0])?(J=(ne=arguments[0]).length,Q=!1):(ne=arguments,J--);for(var se=new ee(J),W=0;W<J;++W){var B=ne[W];if(Z.isDisposer(B)){var I=B;(B=B.promise())._setDisposable(I)}else{var z=p(B);z instanceof f&&(B=z._then(oe,null,null,{resources:se,index:W},void 0))}se[W]=B}var M=new Array(se.length);for(W=0;W<M.length;++W)M[W]=f.resolve(se[W]).reflect();var D=f.all(M).then(function(q){for(var re=0;re<q.length;++re){var ue=q[re];if(ue.isRejected())return j.e=ue.error(),j;if(!ue.isFulfilled())return void D.cancel();q[re]=ue.value()}Y._pushContext(),he=O(he);var ce=Q?he.apply(void 0,q):he(q),ve=Y._popContext();return w.checkForgottenReturns(ce,ve,"Promise.using",Y),ce}),Y=D.lastly(function(){var q=new f.PromiseInspection(D);return V(se,q)});return se.promise=Y,Y._setOnCancel(se),Y},f.prototype._setDisposable=function(J){this._bitField=131072|this._bitField,this._disposer=J},f.prototype._isDisposable=function(){return(131072&this._bitField)>0},f.prototype._getDisposer=function(){return this._disposer},f.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},f.prototype.disposer=function(J){if(typeof J=="function")return new X(J,this,b());throw new E}}},{"./errors":12,"./util":36}],36:[function(s,u,d){var f,m=s("./es5"),p=typeof navigator>"u",b={e:{}},_=typeof self<"u"?self:typeof window<"u"?window:i!==void 0?i:this!==void 0?this:null;function w(){try{var Q=f;return f=null,Q.apply(this,arguments)}catch(se){return b.e=se,b}}function x(Q){return Q==null||Q===!0||Q===!1||typeof Q=="string"||typeof Q=="number"}function E(Q,se,W){if(x(Q))return Q;var B={value:W,configurable:!0,enumerable:!1,writable:!0};return m.defineProperty(Q,se,B),Q}var A=function(){var Q=[Array.prototype,Object.prototype,Function.prototype],se=function(I){for(var z=0;z<Q.length;++z)if(Q[z]===I)return!0;return!1};if(m.isES5){var W=Object.getOwnPropertyNames;return function(I){for(var z=[],M=Object.create(null);I!=null&&!se(I);){var D;try{D=W(I)}catch{return z}for(var Y=0;Y<D.length;++Y){var q=D[Y];if(!M[q]){M[q]=!0;var re=Object.getOwnPropertyDescriptor(I,q);re!=null&&re.get==null&&re.set==null&&z.push(q)}}I=m.getPrototypeOf(I)}return z}}var B={}.hasOwnProperty;return function(I){if(se(I))return[];var z=[];e:for(var M in I)if(B.call(I,M))z.push(M);else{for(var D=0;D<Q.length;++D)if(B.call(Q[D],M))continue e;z.push(M)}return z}}(),j=/this\s*\.\s*\S+\s*=/,O=/^[a-z$_][a-z$_0-9]*$/i;function N(Q){try{return Q+""}catch{return"[no string representation]"}}function U(Q){return Q instanceof Error||Q!==null&&typeof Q=="object"&&typeof Q.message=="string"&&typeof Q.name=="string"}function V(Q){return U(Q)&&m.propertyIsWritable(Q,"stack")}var Z="stack"in new Error?function(Q){return V(Q)?Q:new Error(N(Q))}:function(Q){if(V(Q))return Q;try{throw new Error(N(Q))}catch(se){return se}};function X(Q){return{}.toString.call(Q)}var oe=function(Q){return m.isArray(Q)?Q:null};if(typeof Symbol<"u"&&Symbol.iterator){var ee=typeof Array.from=="function"?function(Q){return Array.from(Q)}:function(Q){for(var se,W=[],B=Q[Symbol.iterator]();!(se=B.next()).done;)W.push(se.value);return W};oe=function(Q){return m.isArray(Q)?Q:Q!=null&&typeof Q[Symbol.iterator]=="function"?ee(Q):null}}var J=r!==void 0&&X(r).toLowerCase()==="[object process]",ne=r!==void 0&&r.env!==void 0,he={isClass:function(Q){try{if(typeof Q=="function"){var se=m.names(Q.prototype),W=m.isES5&&se.length>1,B=se.length>0&&!(se.length===1&&se[0]==="constructor"),I=j.test(Q+"")&&m.names(Q).length>0;if(W||B||I)return!0}return!1}catch{return!1}},isIdentifier:function(Q){return O.test(Q)},inheritedDataKeys:A,getDataPropertyOrDefault:function(Q,se,W){if(!m.isES5)return{}.hasOwnProperty.call(Q,se)?Q[se]:void 0;var B=Object.getOwnPropertyDescriptor(Q,se);return B!=null?B.get==null&&B.set==null?B.value:W:void 0},thrower:function(Q){throw Q},isArray:m.isArray,asArray:oe,notEnumerableProp:E,isPrimitive:x,isObject:function(Q){return typeof Q=="function"||typeof Q=="object"&&Q!==null},isError:U,canEvaluate:p,errorObj:b,tryCatch:function(Q){return f=Q,w},inherits:function(Q,se){var W={}.hasOwnProperty;function B(){for(var I in this.constructor=Q,this.constructor$=se,se.prototype)W.call(se.prototype,I)&&I.charAt(I.length-1)!=="$"&&(this[I+"$"]=se.prototype[I])}return B.prototype=se.prototype,Q.prototype=new B,Q.prototype},withAppended:function(Q,se){var W,B=Q.length,I=new Array(B+1);for(W=0;W<B;++W)I[W]=Q[W];return I[W]=se,I},maybeWrapAsError:function(Q){return x(Q)?new Error(N(Q)):Q},toFastProperties:function(Q){return Q},filledRange:function(Q,se,W){for(var B=new Array(Q),I=0;I<Q;++I)B[I]=se+I+W;return B},toString:N,canAttachTrace:V,ensureErrorObject:Z,originatesFromRejection:function(Q){return Q!=null&&(Q instanceof Error.__BluebirdErrorTypes__.OperationalError||Q.isOperational===!0)},markAsOriginatingFromRejection:function(Q){try{E(Q,"isOperational",!0)}catch{}},classString:X,copyDescriptors:function(Q,se,W){for(var B=m.names(Q),I=0;I<B.length;++I){var z=B[I];if(W(z))try{m.defineProperty(se,z,m.getDescriptor(Q,z))}catch{}}},hasDevTools:typeof chrome<"u"&&chrome&&typeof chrome.loadTimes=="function",isNode:J,hasEnvVariables:ne,env:function(Q){return ne?r.env[Q]:void 0},global:_,getNativePromise:function(){if(typeof Promise=="function")try{var Q=new Promise(function(){});if({}.toString.call(Q)==="[object Promise]")return Promise}catch{}},domainBind:function(Q,se){return Q.bind(se)}};he.isRecentNode=he.isNode&&function(){var Q=r.versions.node.split(".").map(Number);return Q[0]===0&&Q[1]>10||Q[0]>0}(),he.isNode&&he.toFastProperties(r);try{throw new Error}catch(Q){he.lastLineError=Q}u.exports=he},{"./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 a=0,s=r.length;a<s;a++)if(r[a]==="\r"){if(r[a+1]===`
`){i.eol=`\r
`;break}if(r[a+1]){i.eol="\r";break}}else if(r[a]===`
`){i.eol=`
`;break}}return i.eol||`
`}},function(e,t,n){var r=n(65),i=n(73);e.exports=function(a,s){var u=i(a,s);return r(u)?u:void 0}},function(e,t,n){var r=n(19).Symbol;e.exports=r},function(e,t,n){var r=n(67),i=typeof self=="object"&&self&&self.Object===Object&&self,a=r||i||Function("return this")();e.exports=a},function(e,t){e.exports=function(n){var r=typeof n;return n!=null&&(r=="object"||r=="function")}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r=n(30),i=n(76);e.exports=function(a){return typeof a=="symbol"||i(a)&&r(a)=="[object Symbol]"}},function(e,t,n){(function(r,i){var a=n(6);e.exports=N;var s,u=n(37);N.ReadableState=O,n(12).EventEmitter;var d=function(M,D){return M.listeners(D).length},f=n(24),m=n(7).Buffer,p=r.Uint8Array||function(){},b=n(5);b.inherits=n(2);var _=n(41),w=void 0;w=_&&_.debuglog?_.debuglog("stream"):function(){};var x,E=n(42),A=n(25);b.inherits(N,f);var j=["error","close","destroy","pause","resume"];function O(M,D){s=s||n(1),M=M||{};var Y=D instanceof s;this.objectMode=!!M.objectMode,Y&&(this.objectMode=this.objectMode||!!M.readableObjectMode);var q=M.highWaterMark,re=M.readableHighWaterMark,ue=this.objectMode?16:16384;this.highWaterMark=q||q===0?q:Y&&(re||re===0)?re:ue,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new E,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=M.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,M.encoding&&(x||(x=n(26).StringDecoder),this.decoder=new x(M.encoding),this.encoding=M.encoding)}function N(M){if(s=s||n(1),!(this instanceof N))return new N(M);this._readableState=new O(M,this),this.readable=!0,M&&(typeof M.read=="function"&&(this._read=M.read),typeof M.destroy=="function"&&(this._destroy=M.destroy)),f.call(this)}function U(M,D,Y,q,re){var ue,ce=M._readableState;return D===null?(ce.reading=!1,function(ve,k){if(!k.ended){if(k.decoder){var F=k.decoder.end();F&&F.length&&(k.buffer.push(F),k.length+=k.objectMode?1:F.length)}k.ended=!0,oe(ve)}}(M,ce)):(re||(ue=function(ve,k){var F;return function(G){return m.isBuffer(G)||G instanceof p}(k)||typeof k=="string"||k===void 0||ve.objectMode||(F=new TypeError("Invalid non-string/buffer chunk")),F}(ce,D)),ue?M.emit("error",ue):ce.objectMode||D&&D.length>0?(typeof D=="string"||ce.objectMode||Object.getPrototypeOf(D)===m.prototype||(D=function(ve){return m.from(ve)}(D)),q?ce.endEmitted?M.emit("error",new Error("stream.unshift() after end event")):V(M,ce,D,!0):ce.ended?M.emit("error",new Error("stream.push() after EOF")):(ce.reading=!1,ce.decoder&&!Y?(D=ce.decoder.write(D),ce.objectMode||D.length!==0?V(M,ce,D,!1):J(M,ce)):V(M,ce,D,!1))):q||(ce.reading=!1)),function(ve){return!ve.ended&&(ve.needReadable||ve.length<ve.highWaterMark||ve.length===0)}(ce)}function V(M,D,Y,q){D.flowing&&D.length===0&&!D.sync?(M.emit("data",Y),M.read(0)):(D.length+=D.objectMode?1:Y.length,q?D.buffer.unshift(Y):D.buffer.push(Y),D.needReadable&&oe(M)),J(M,D)}Object.defineProperty(N.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(M){this._readableState&&(this._readableState.destroyed=M)}}),N.prototype.destroy=A.destroy,N.prototype._undestroy=A.undestroy,N.prototype._destroy=function(M,D){this.push(null),D(M)},N.prototype.push=function(M,D){var Y,q=this._readableState;return q.objectMode?Y=!0:typeof M=="string"&&((D=D||q.defaultEncoding)!==q.encoding&&(M=m.from(M,D),D=""),Y=!0),U(this,M,D,!1,Y)},N.prototype.unshift=function(M){return U(this,M,null,!0,!1)},N.prototype.isPaused=function(){return this._readableState.flowing===!1},N.prototype.setEncoding=function(M){return x||(x=n(26).StringDecoder),this._readableState.decoder=new x(M),this._readableState.encoding=M,this};var Z=8388608;function X(M,D){return M<=0||D.length===0&&D.ended?0:D.objectMode?1:M!=M?D.flowing&&D.length?D.buffer.head.data.length:D.length:(M>D.highWaterMark&&(D.highWaterMark=function(Y){return Y>=Z?Y=Z:(Y--,Y|=Y>>>1,Y|=Y>>>2,Y|=Y>>>4,Y|=Y>>>8,Y|=Y>>>16,Y++),Y}(M)),M<=D.length?M:D.ended?D.length:(D.needReadable=!0,0))}function oe(M){var D=M._readableState;D.needReadable=!1,D.emittedReadable||(w("emitReadable",D.flowing),D.emittedReadable=!0,D.sync?a.nextTick(ee,M):ee(M))}function ee(M){w("emit readable"),M.emit("readable"),se(M)}function J(M,D){D.readingMore||(D.readingMore=!0,a.nextTick(ne,M,D))}function ne(M,D){for(var Y=D.length;!D.reading&&!D.flowing&&!D.ended&&D.length<D.highWaterMark&&(w("maybeReadMore read 0"),M.read(0),Y!==D.length);)Y=D.length;D.readingMore=!1}function he(M){w("readable nexttick read 0"),M.read(0)}function Q(M,D){D.reading||(w("resume read 0"),M.read(0)),D.resumeScheduled=!1,D.awaitDrain=0,M.emit("resume"),se(M),D.flowing&&!D.reading&&M.read(0)}function se(M){var D=M._readableState;for(w("flow",D.flowing);D.flowing&&M.read()!==null;);}function W(M,D){return D.length===0?null:(D.objectMode?Y=D.buffer.shift():!M||M>=D.length?(Y=D.decoder?D.buffer.join(""):D.buffer.length===1?D.buffer.head.data:D.buffer.concat(D.length),D.buffer.clear()):Y=function(q,re,ue){var ce;return q<re.head.data.length?(ce=re.head.data.slice(0,q),re.head.data=re.head.data.slice(q)):ce=q===re.head.data.length?re.shift():ue?function(ve,k){var F=k.head,G=1,le=F.data;for(ve-=le.length;F=F.next;){var H=F.data,ae=ve>H.length?H.length:ve;if(ae===H.length?le+=H:le+=H.slice(0,ve),(ve-=ae)==0){ae===H.length?(++G,F.next?k.head=F.next:k.head=k.tail=null):(k.head=F,F.data=H.slice(ae));break}++G}return k.length-=G,le}(q,re):function(ve,k){var F=m.allocUnsafe(ve),G=k.head,le=1;for(G.data.copy(F),ve-=G.data.length;G=G.next;){var H=G.data,ae=ve>H.length?H.length:ve;if(H.copy(F,F.length-ve,0,ae),(ve-=ae)==0){ae===H.length?(++le,G.next?k.head=G.next:k.head=k.tail=null):(k.head=G,G.data=H.slice(ae));break}++le}return k.length-=le,F}(q,re),ce}(M,D.buffer,D.decoder),Y);var Y}function B(M){var D=M._readableState;if(D.length>0)throw new Error('"endReadable()" called on non-empty stream');D.endEmitted||(D.ended=!0,a.nextTick(I,D,M))}function I(M,D){M.endEmitted||M.length!==0||(M.endEmitted=!0,D.readable=!1,D.emit("end"))}function z(M,D){for(var Y=0,q=M.length;Y<q;Y++)if(M[Y]===D)return Y;return-1}N.prototype.read=function(M){w("read",M),M=parseInt(M,10);var D=this._readableState,Y=M;if(M!==0&&(D.emittedReadable=!1),M===0&&D.needReadable&&(D.length>=D.highWaterMark||D.ended))return w("read: emitReadable",D.length,D.ended),D.length===0&&D.ended?B(this):oe(this),null;if((M=X(M,D))===0&&D.ended)return D.length===0&&B(this),null;var q,re=D.needReadable;return w("need readable",re),(D.length===0||D.length-M<D.highWaterMark)&&w("length less than watermark",re=!0),D.ended||D.reading?w("reading or ended",re=!1):re&&(w("do read"),D.reading=!0,D.sync=!0,D.length===0&&(D.needReadable=!0),this._read(D.highWaterMark),D.sync=!1,D.reading||(M=X(Y,D))),(q=M>0?W(M,D):null)===null?(D.needReadable=!0,M=0):D.length-=M,D.length===0&&(D.ended||(D.needReadable=!0),Y!==M&&D.ended&&B(this)),q!==null&&this.emit("data",q),q},N.prototype._read=function(M){this.emit("error",new Error("_read() is not implemented"))},N.prototype.pipe=function(M,D){var Y=this,q=this._readableState;switch(q.pipesCount){case 0:q.pipes=M;break;case 1:q.pipes=[q.pipes,M];break;default:q.pipes.push(M)}q.pipesCount+=1,w("pipe count=%d opts=%j",q.pipesCount,D);var re=D&&D.end===!1||M===i.stdout||M===i.stderr?ae:ue;function ue(){w("onend"),M.end()}q.endEmitted?a.nextTick(re):Y.once("end",re),M.on("unpipe",function fe(ge,de){w("onunpipe"),ge===Y&&de&&de.hasUnpiped===!1&&(de.hasUnpiped=!0,w("cleanup"),M.removeListener("close",le),M.removeListener("finish",H),M.removeListener("drain",ce),M.removeListener("error",G),M.removeListener("unpipe",fe),Y.removeListener("end",ue),Y.removeListener("end",ae),Y.removeListener("data",F),ve=!0,!q.awaitDrain||M._writableState&&!M._writableState.needDrain||ce())});var ce=function(fe){return function(){var ge=fe._readableState;w("pipeOnDrain",ge.awaitDrain),ge.awaitDrain&&ge.awaitDrain--,ge.awaitDrain===0&&d(fe,"data")&&(ge.flowing=!0,se(fe))}}(Y);M.on("drain",ce);var ve=!1,k=!1;function F(fe){w("ondata"),k=!1,M.write(fe)!==!1||k||((q.pipesCount===1&&q.pipes===M||q.pipesCount>1&&z(q.pipes,M)!==-1)&&!ve&&(w("false write response, pause",Y._readableState.awaitDrain),Y._readableState.awaitDrain++,k=!0),Y.pause())}function G(fe){w("onerror",fe),ae(),M.removeListener("error",G),d(M,"error")===0&&M.emit("error",fe)}function le(){M.removeListener("finish",H),ae()}function H(){w("onfinish"),M.removeListener("close",le),ae()}function ae(){w("unpipe"),Y.unpipe(M)}return Y.on("data",F),function(fe,ge,de){if(typeof fe.prependListener=="function")return fe.prependListener(ge,de);fe._events&&fe._events[ge]?u(fe._events[ge])?fe._events[ge].unshift(de):fe._events[ge]=[de,fe._events[ge]]:fe.on(ge,de)}(M,"error",G),M.once("close",le),M.once("finish",H),M.emit("pipe",Y),q.flowing||(w("pipe resume"),Y.resume()),M},N.prototype.unpipe=function(M){var D=this._readableState,Y={hasUnpiped:!1};if(D.pipesCount===0)return this;if(D.pipesCount===1)return M&&M!==D.pipes?this:(M||(M=D.pipes),D.pipes=null,D.pipesCount=0,D.flowing=!1,M&&M.emit("unpipe",this,Y),this);if(!M){var q=D.pipes,re=D.pipesCount;D.pipes=null,D.pipesCount=0,D.flowing=!1;for(var ue=0;ue<re;ue++)q[ue].emit("unpipe",this,Y);return this}var ce=z(D.pipes,M);return ce===-1?this:(D.pipes.splice(ce,1),D.pipesCount-=1,D.pipesCount===1&&(D.pipes=D.pipes[0]),M.emit("unpipe",this,Y),this)},N.prototype.on=function(M,D){var Y=f.prototype.on.call(this,M,D);if(M==="data")this._readableState.flowing!==!1&&this.resume();else if(M==="readable"){var q=this._readableState;q.endEmitted||q.readableListening||(q.readableListening=q.needReadable=!0,q.emittedReadable=!1,q.reading?q.length&&oe(this):a.nextTick(he,this))}return Y},N.prototype.addListener=N.prototype.on,N.prototype.resume=function(){var M=this._readableState;return M.flowing||(w("resume"),M.flowing=!0,function(D,Y){Y.resumeScheduled||(Y.resumeScheduled=!0,a.nextTick(Q,D,Y))}(this,M)),this},N.prototype.pause=function(){return w("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(w("pause"),this._readableState.flowing=!1,this.emit("pause")),this},N.prototype.wrap=function(M){var D=this,Y=this._readableState,q=!1;for(var re in M.on("end",function(){if(w("wrapped end"),Y.decoder&&!Y.ended){var ce=Y.decoder.end();ce&&ce.length&&D.push(ce)}D.push(null)}),M.on("data",function(ce){w("wrapped data"),Y.decoder&&(ce=Y.decoder.write(ce)),(!Y.objectMode||ce!=null)&&(Y.objectMode||ce&&ce.length)&&(D.push(ce)||(q=!0,M.pause()))}),M)this[re]===void 0&&typeof M[re]=="function"&&(this[re]=function(ce){return function(){return M[ce].apply(M,arguments)}}(re));for(var ue=0;ue<j.length;ue++)M.on(j[ue],this.emit.bind(this,j[ue]));return this._read=function(ce){w("wrapped _read",ce),q&&(q=!1,M.resume())},this},Object.defineProperty(N.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),N._fromList=W}).call(this,n(0),n(4))},function(e,t,n){e.exports=n(12).EventEmitter},function(e,t,n){var r=n(6);function i(a,s){a.emit("error",s)}e.exports={destroy:function(a,s){var u=this,d=this._readableState&&this._readableState.destroyed,f=this._writableState&&this._writableState.destroyed;return d||f?(s?s(a):!a||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,a),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(m){!s&&m?(r.nextTick(i,u,m),u._writableState&&(u._writableState.errorEmitted=!0)):s&&s(m)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){var r=n(7).Buffer,i=r.isEncoding||function(w){switch((w=""+w)&&w.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(w){var x;switch(this.encoding=function(E){var A=function(j){if(!j)return"utf8";for(var O;;)switch(j){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return j;default:if(O)return;j=(""+j).toLowerCase(),O=!0}}(E);if(typeof A!="string"&&(r.isEncoding===i||!i(E)))throw new Error("Unknown encoding: "+E);return A||E}(w),this.encoding){case"utf16le":this.text=d,this.end=f,x=4;break;case"utf8":this.fillLast=u,x=4;break;case"base64":this.text=m,this.end=p,x=3;break;default:return this.write=b,void(this.end=_)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(x)}function s(w){return w<=127?0:w>>5==6?2:w>>4==14?3:w>>3==30?4:w>>6==2?-1:-2}function u(w){var x=this.lastTotal-this.lastNeed,E=function(A,j,O){if((192&j[0])!=128)return A.lastNeed=0,"<22>";if(A.lastNeed>1&&j.length>1){if((192&j[1])!=128)return A.lastNeed=1,"<22>";if(A.lastNeed>2&&j.length>2&&(192&j[2])!=128)return A.lastNeed=2,"<22>"}}(this,w);return E!==void 0?E:this.lastNeed<=w.length?(w.copy(this.lastChar,x,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(w.copy(this.lastChar,x,0,w.length),void(this.lastNeed-=w.length))}function d(w,x){if((w.length-x)%2==0){var E=w.toString("utf16le",x);if(E){var A=E.charCodeAt(E.length-1);if(A>=55296&&A<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1],E.slice(0,-1)}return E}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=w[w.length-1],w.toString("utf16le",x,w.length-1)}function f(w){var x=w&&w.length?this.write(w):"";if(this.lastNeed){var E=this.lastTotal-this.lastNeed;return x+this.lastChar.toString("utf16le",0,E)}return x}function m(w,x){var E=(w.length-x)%3;return E===0?w.toString("base64",x):(this.lastNeed=3-E,this.lastTotal=3,E===1?this.lastChar[0]=w[w.length-1]:(this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1]),w.toString("base64",x,w.length-E))}function p(w){var x=w&&w.length?this.write(w):"";return this.lastNeed?x+this.lastChar.toString("base64",0,3-this.lastNeed):x}function b(w){return w.toString(this.encoding)}function _(w){return w&&w.length?this.write(w):""}t.StringDecoder=a,a.prototype.write=function(w){if(w.length===0)return"";var x,E;if(this.lastNeed){if((x=this.fillLast(w))===void 0)return"";E=this.lastNeed,this.lastNeed=0}else E=0;return E<w.length?x?x+this.text(w,E):this.text(w,E):x||""},a.prototype.end=function(w){var x=w&&w.length?this.write(w):"";return this.lastNeed?x+"<22>":x},a.prototype.text=function(w,x){var E=function(j,O,N){var U=O.length-1;if(U<N)return 0;var V=s(O[U]);return V>=0?(V>0&&(j.lastNeed=V-1),V):--U<N||V===-2?0:(V=s(O[U]))>=0?(V>0&&(j.lastNeed=V-2),V):--U<N||V===-2?0:(V=s(O[U]))>=0?(V>0&&(V===2?V=0:j.lastNeed=V-3),V):0}(this,w,x);if(!this.lastNeed)return w.toString("utf8",x);this.lastTotal=E;var A=w.length-(E-this.lastNeed);return w.copy(this.lastChar,0,A),w.toString("utf8",x,A)},a.prototype.fillLast=function(w){if(this.lastNeed<=w.length)return w.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);w.copy(this.lastChar,this.lastTotal-this.lastNeed,0,w.length),this.lastNeed-=w.length}},function(e,t,n){e.exports=a;var r=n(1),i=n(5);function a(d){if(!(this instanceof a))return new a(d);r.call(this,d),this._transformState={afterTransform:(function(f,m){var p=this._transformState;p.transforming=!1;var b=p.writecb;if(!b)return this.emit("error",new Error("write callback called multiple times"));p.writechunk=null,p.writecb=null,m!=null&&this.push(m),b(f);var _=this._readableState;_.reading=!1,(_.needReadable||_.length<_.highWaterMark)&&this._read(_.highWaterMark)}).bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,d&&(typeof d.transform=="function"&&(this._transform=d.transform),typeof d.flush=="function"&&(this._flush=d.flush)),this.on("prefinish",s)}function s(){var d=this;typeof this._flush=="function"?this._flush(function(f,m){u(d,f,m)}):u(this,null,null)}function u(d,f,m){if(f)return d.emit("error",f);if(m!=null&&d.push(m),d._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(d._transformState.transforming)throw new Error("Calling transform done when still transforming");return d.push(null)}i.inherits=n(2),i.inherits(a,r),a.prototype.push=function(d,f){return this._transformState.needTransform=!1,r.prototype.push.call(this,d,f)},a.prototype._transform=function(d,f,m){throw new Error("_transform() is not implemented")},a.prototype._write=function(d,f,m){var p=this._transformState;if(p.writecb=m,p.writechunk=d,p.writeencoding=f,!p.transforming){var b=this._readableState;(p.needTransform||b.needReadable||b.length<b.highWaterMark)&&this._read(b.highWaterMark)}},a.prototype._read=function(d){var f=this._transformState;f.writechunk!==null&&f.writecb&&!f.transforming?(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform)):f.needTransform=!0},a.prototype._destroy=function(d,f){var m=this;r.prototype._destroy.call(this,d,function(p){f(p),m.emit("close")})}},function(e,t,n){(function(r){Object.defineProperty(t,"__esModule",{value:!0}),t.bufFromString=function(i){var a=r.byteLength(i),s=r.allocUnsafe?r.allocUnsafe(a):new r(a);return s.write(i),s},t.emptyBuffer=function(){return r.allocUnsafe?r.allocUnsafe(0):new r(0)},t.filterArray=function(i,a){for(var s=[],u=0;u<i.length;u++)a.indexOf(u)>-1&&s.push(i[u]);return s},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 a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,u){s.__proto__=u}||function(s,u){for(var d in u)u.hasOwnProperty(d)&&(s[d]=u[d])};return function(s,u){function d(){this.constructor=s}a(s,u),s.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(a){function s(u,d,f){var m=a.call(this,"Error: "+u+". JSON Line number: "+d+(f?" near: "+f:""))||this;return m.err=u,m.line=d,m.extra=f,m.name="CSV Parse Error",m}return r(s,a),s.column_mismatched=function(u,d){return new s("column_mismatched",u,d)},s.unclosed_quote=function(u,d){return new s("unclosed_quote",u,d)},s.fromJSON=function(u){return new s(u.err,u.line,u.extra)},s.prototype.toJSON=function(){return{err:this.err,line:this.line,extra:this.extra}},s}(Error);t.default=i},function(e,t,n){var r=n(18),i=n(68),a=n(69),s=r?r.toStringTag:void 0;e.exports=function(u){return u==null?u===void 0?"[object Undefined]":"[object Null]":s&&s in Object(u)?i(u):a(u)}},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(a,s){return new r.Converter(a,s)};i.csv=i,i.Converter=r.Converter,e.exports=i},function(e,t,n){(function(r){var i=this&&this.__extends||function(){var _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var E in x)x.hasOwnProperty(E)&&(w[E]=x[E])};return function(w,x){function E(){this.constructor=w}_(w,x),w.prototype=x===null?Object.create(x):(E.prototype=x.prototype,new E)}}(),a=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(36),u=n(50),d=n(51),f=a(n(15)),m=n(52),p=n(105),b=function(_){function w(x,E){E===void 0&&(E={});var A=_.call(this,E)||this;return A.options=E,A.params=u.mergeParams(x),A.runtime=d.initParseRuntime(A),A.result=new p.Result(A),A.processor=new m.ProcessorLocal(A),A.once("error",function(j){r(function(){A.result.processError(j),A.emit("done",j)})}),A.once("done",function(){A.processor.destroy()}),A}return i(w,_),w.prototype.preRawData=function(x){return this.runtime.preRawDataHook=x,this},w.prototype.preFileLine=function(x){return this.runtime.preFileLineHook=x,this},w.prototype.subscribe=function(x,E,A){return this.parseRuntime.subscribe={onNext:x,onError:E,onCompleted:A},this},w.prototype.fromFile=function(x,E){var A=this,j=n(!function(){var O=new Error("Cannot find module 'fs'");throw O.code="MODULE_NOT_FOUND",O}());return j.exists(x,function(O){O?j.createReadStream(x,E).pipe(A):A.emit("error",new Error("File does not exist. Check to make sure the file path to your csv is correct."))}),this},w.prototype.fromStream=function(x){return x.pipe(this),this},w.prototype.fromString=function(x){x.toString();var E=new s.Readable,A=0;return E._read=function(j){if(A>=x.length)this.push(null);else{var O=x.substr(A,j);this.push(O),A+=j}},this.fromStream(E)},w.prototype.then=function(x,E){var A=this;return new f.default(function(j,O){A.parseRuntime.then={onfulfilled:function(N){j(x?x(N):N)},onrejected:function(N){E?j(E(N)):O(N)}}})},Object.defineProperty(w.prototype,"parseParam",{get:function(){return this.params},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"parseRuntime",{get:function(){return this.runtime},enumerable:!0,configurable:!0}),w.prototype._transform=function(x,E,A){var j=this;this.processor.process(x).then(function(O){if(O.length>0)return j.runtime.started=!0,j.result.processResult(O)}).then(function(){j.emit("drained"),A()},function(O){j.runtime.hasError=!0,j.runtime.error=O,j.emit("error",O),A()})},w.prototype._flush=function(x){var E=this;this.processor.flush().then(function(A){if(A.length>0)return E.result.processResult(A)}).then(function(){E.processEnd(x)},function(A){E.emit("error",A),x()})},w.prototype.processEnd=function(x){this.result.endProcess(),this.emit("done"),x()},Object.defineProperty(w.prototype,"parsedLineNumber",{get:function(){return this.runtime.parsedLineNumber},enumerable:!0,configurable:!0}),w}(s.Transform);t.Converter=b}).call(this,n(11).setImmediate)},function(e,t,n){(function(r,i){(function(a,s){if(!a.setImmediate){var u,d=1,f={},m=!1,p=a.document,b=Object.getPrototypeOf&&Object.getPrototypeOf(a);b=b&&b.setTimeout?b:a,{}.toString.call(a.process)==="[object process]"?u=function(x){i.nextTick(function(){w(x)})}:function(){if(a.postMessage&&!a.importScripts){var x=!0,E=a.onmessage;return a.onmessage=function(){x=!1},a.postMessage("","*"),a.onmessage=E,x}}()?function(){var x="setImmediate$"+Math.random()+"$",E=function(A){A.source===a&&typeof A.data=="string"&&A.data.indexOf(x)===0&&w(+A.data.slice(x.length))};a.addEventListener?a.addEventListener("message",E,!1):a.attachEvent("onmessage",E),u=function(A){a.postMessage(x+A,"*")}}():a.MessageChannel?function(){var x=new MessageChannel;x.port1.onmessage=function(E){w(E.data)},u=function(E){x.port2.postMessage(E)}}():p&&"onreadystatechange"in p.createElement("script")?function(){var x=p.documentElement;u=function(E){var A=p.createElement("script");A.onreadystatechange=function(){w(E),A.onreadystatechange=null,x.removeChild(A),A=null},x.appendChild(A)}}():u=function(x){setTimeout(w,0,x)},b.setImmediate=function(x){typeof x!="function"&&(x=new Function(""+x));for(var E=new Array(arguments.length-1),A=0;A<E.length;A++)E[A]=arguments[A+1];var j={callback:x,args:E};return f[d]=j,u(d),d++},b.clearImmediate=_}function _(x){delete f[x]}function w(x){if(m)setTimeout(w,0,x);else{var E=f[x];if(E){m=!0;try{(function(A){var j=A.callback,O=A.args;switch(O.length){case 0:j();break;case 1:j(O[0]);break;case 2:j(O[0],O[1]);break;case 3:j(O[0],O[1],O[2]);break;default:j.apply(s,O)}})(E)}finally{_(x),m=!1}}}}})(typeof self>"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(a,s){var u=this;function d(x){a.writable&&a.write(x)===!1&&u.pause&&u.pause()}function f(){u.readable&&u.resume&&u.resume()}u.on("data",d),a.on("drain",f),a._isStdio||s&&s.end===!1||(u.on("end",p),u.on("close",b));var m=!1;function p(){m||(m=!0,a.end())}function b(){m||(m=!0,typeof a.destroy=="function"&&a.destroy())}function _(x){if(w(),r.listenerCount(this,"error")===0)throw x}function w(){u.removeListener("data",d),a.removeListener("drain",f),u.removeListener("end",p),u.removeListener("close",b),u.removeListener("error",_),a.removeListener("error",_),u.removeListener("end",w),u.removeListener("close",w),a.removeListener("close",w)}return u.on("error",_),a.on("error",_),u.on("end",w),u.on("close",w),a.on("close",w),a.emit("pipe",u),a}},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(b){var _=f(b),w=_[0],x=_[1];return 3*(w+x)/4-x},t.toByteArray=function(b){for(var _,w=f(b),x=w[0],E=w[1],A=new a(3*(x+E)/4-E),j=0,O=E>0?x-4:x,N=0;N<O;N+=4)_=i[b.charCodeAt(N)]<<18|i[b.charCodeAt(N+1)]<<12|i[b.charCodeAt(N+2)]<<6|i[b.charCodeAt(N+3)],A[j++]=_>>16&255,A[j++]=_>>8&255,A[j++]=255&_;return E===2&&(_=i[b.charCodeAt(N)]<<2|i[b.charCodeAt(N+1)]>>4,A[j++]=255&_),E===1&&(_=i[b.charCodeAt(N)]<<10|i[b.charCodeAt(N+1)]<<4|i[b.charCodeAt(N+2)]>>2,A[j++]=_>>8&255,A[j++]=255&_),A},t.fromByteArray=function(b){for(var _,w=b.length,x=w%3,E=[],A=0,j=w-x;A<j;A+=16383)E.push(p(b,A,A+16383>j?j:A+16383));return x===1?(_=b[w-1],E.push(r[_>>2]+r[_<<4&63]+"==")):x===2&&(_=(b[w-2]<<8)+b[w-1],E.push(r[_>>10]+r[_>>4&63]+r[_<<2&63]+"=")),E.join("")};for(var r=[],i=[],a=typeof Uint8Array<"u"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,d=s.length;u<d;++u)r[u]=s[u],i[s.charCodeAt(u)]=u;function f(b){var _=b.length;if(_%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var w=b.indexOf("=");return w===-1&&(w=_),[w,w===_?0:4-w%4]}function m(b){return r[b>>18&63]+r[b>>12&63]+r[b>>6&63]+r[63&b]}function p(b,_,w){for(var x,E=[],A=_;A<w;A+=3)x=(b[A]<<16&16711680)+(b[A+1]<<8&65280)+(255&b[A+2]),E.push(m(x));return E.join("")}i[45]=62,i[95]=63},function(e,t){t.read=function(n,r,i,a,s){var u,d,f=8*s-a-1,m=(1<<f)-1,p=m>>1,b=-7,_=i?s-1:0,w=i?-1:1,x=n[r+_];for(_+=w,u=x&(1<<-b)-1,x>>=-b,b+=f;b>0;u=256*u+n[r+_],_+=w,b-=8);for(d=u&(1<<-b)-1,u>>=-b,b+=a;b>0;d=256*d+n[r+_],_+=w,b-=8);if(u===0)u=1-p;else{if(u===m)return d?NaN:1/0*(x?-1:1);d+=Math.pow(2,a),u-=p}return(x?-1:1)*d*Math.pow(2,u-a)},t.write=function(n,r,i,a,s,u){var d,f,m,p=8*u-s-1,b=(1<<p)-1,_=b>>1,w=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=a?0:u-1,E=a?1:-1,A=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(f=isNaN(r)?1:0,d=b):(d=Math.floor(Math.log(r)/Math.LN2),r*(m=Math.pow(2,-d))<1&&(d--,m*=2),(r+=d+_>=1?w/m:w*Math.pow(2,1-_))*m>=2&&(d++,m/=2),d+_>=b?(f=0,d=b):d+_>=1?(f=(r*m-1)*Math.pow(2,s),d+=_):(f=r*Math.pow(2,_-1)*Math.pow(2,s),d=0));s>=8;n[i+x]=255&f,x+=E,f/=256,s-=8);for(d=d<<s|f,p+=s;p>0;n[i+x]=255&d,x+=E,d/=256,p-=8);n[i+x-E]|=128*A}},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 a(s,u,d){s.copy(u,d)}e.exports=function(){function s(){(function(u,d){if(!(u instanceof d))throw new TypeError("Cannot call a class as a function")})(this,s),this.head=null,this.tail=null,this.length=0}return s.prototype.push=function(u){var d={data:u,next:null};this.length>0?this.tail.next=d:this.head=d,this.tail=d,++this.length},s.prototype.unshift=function(u){var d={data:u,next:this.head};this.length===0&&(this.tail=d),this.head=d,++this.length},s.prototype.shift=function(){if(this.length!==0){var u=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,u}},s.prototype.clear=function(){this.head=this.tail=null,this.length=0},s.prototype.join=function(u){if(this.length===0)return"";for(var d=this.head,f=""+d.data;d=d.next;)f+=u+d.data;return f},s.prototype.concat=function(u){if(this.length===0)return r.alloc(0);if(this.length===1)return this.head.data;for(var d=r.allocUnsafe(u>>>0),f=this.head,m=0;f;)a(f.data,d,m),m+=f.data.length,f=f.next;return d},s}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var s=i.inspect({length:this.length});return this.constructor.name+" "+s})},function(e,t){},function(e,t,n){(function(r){function i(a){try{if(!r.localStorage)return!1}catch{return!1}var s=r.localStorage[a];return s!=null&&String(s).toLowerCase()==="true"}e.exports=function(a,s){if(i("noDeprecation"))return a;var u=!1;return function(){if(!u){if(i("throwDeprecation"))throw new Error(s);i("traceDeprecation")?console.trace(s):console.warn(s),u=!0}return a.apply(this,arguments)}}}).call(this,n(0))},function(e,t,n){e.exports=a;var r=n(27),i=n(5);function a(s){if(!(this instanceof a))return new a(s);r.call(this,s)}i.inherits=n(2),i.inherits(a,r),a.prototype._transform=function(s,u,d){d(null,s)}},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 a in r||(r={}),r)r.hasOwnProperty(a)&&(Array.isArray(r[a])?i[a]=[].concat(r[a]):i[a]=r[a]);return i}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.initParseRuntime=function(r){var i=r.parseParam,a={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&&(a.needProcessIgnoreColumn=!0),i.includeColumns&&(a.needProcessIncludeColumn=!0),a}},function(e,t,n){(function(r){var i=this&&this.__extends||function(){var E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,j){A.__proto__=j}||function(A,j){for(var O in j)j.hasOwnProperty(O)&&(A[O]=j[O])};return function(A,j){function O(){this.constructor=A}E(A,j),A.prototype=j===null?Object.create(j):(O.prototype=j.prototype,new O)}}(),a=this&&this.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(53),u=a(n(15)),d=n(54),f=a(n(16)),m=n(57),p=n(28),b=n(58),_=a(n(59)),w=a(n(29)),x=function(E){function A(){var j=E!==null&&E.apply(this,arguments)||this;return j.rowSplit=new b.RowSplit(j.converter),j.eolEmitted=!1,j._needEmitEol=void 0,j.headEmitted=!1,j._needEmitHead=void 0,j}return i(A,E),A.prototype.flush=function(){var j=this;if(this.runtime.csvLineBuffer&&this.runtime.csvLineBuffer.length>0){var O=this.runtime.csvLineBuffer;return this.runtime.csvLineBuffer=void 0,this.process(O,!0).then(function(N){return j.runtime.csvLineBuffer&&j.runtime.csvLineBuffer.length>0?u.default.reject(w.default.unclosed_quote(j.runtime.parsedLineNumber,j.runtime.csvLineBuffer.toString())):u.default.resolve(N)})}return u.default.resolve([])},A.prototype.destroy=function(){return u.default.resolve()},Object.defineProperty(A.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(A.prototype,"needEmitHead",{get:function(){return this._needEmitHead===void 0&&(this._needEmitHead=this.converter.listeners("header").length>0),this._needEmitHead},enumerable:!0,configurable:!0}),A.prototype.process=function(j,O){var N,U=this;return O===void 0&&(O=!1),N=O?j.toString():d.prepareData(j,this.converter.parseRuntime),u.default.resolve().then(function(){return U.runtime.preRawDataHook?U.runtime.preRawDataHook(N):N}).then(function(V){return V&&V.length>0?U.processCSV(V,O):u.default.resolve([])})},A.prototype.processCSV=function(j,O){var N=this,U=this.params,V=this.runtime;V.eol||f.default(j,V),this.needEmitEol&&!this.eolEmitted&&V.eol&&(this.converter.emit("eol",V.eol),this.eolEmitted=!0),U.ignoreEmpty&&!V.started&&(j=p.trimLeft(j));var Z=m.stringToLines(j,V);return O?(Z.lines.push(Z.partial),Z.partial=""):this.prependLeftBuf(p.bufFromString(Z.partial)),Z.lines.length>0?(V.preFileLineHook?this.runPreLineHook(Z.lines):u.default.resolve(Z.lines)).then(function(X){return V.started||N.runtime.headers?N.processCSVBody(X):N.processDataWithHead(X)}):u.default.resolve([])},A.prototype.processDataWithHead=function(j){if(this.params.noheader)this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=[];else{for(var O="",N=[];j.length;){var U=O+j.shift(),V=this.rowSplit.parse(U);if(V.closed){N=V.cells,O="";break}O=U+f.default(U,this.runtime)}if(this.prependLeftBuf(p.bufFromString(O)),N.length===0)return[];this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=N}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(j)},A.prototype.filterHeader=function(){if(this.runtime.selectedColumns=[],this.runtime.headers){for(var j=this.runtime.headers,O=0;O<j.length;O++)if(this.params.ignoreColumns)if(this.params.ignoreColumns.test(j[O])){if(!this.params.includeColumns||!this.params.includeColumns.test(j[O]))continue;this.runtime.selectedColumns.push(O)}else this.runtime.selectedColumns.push(O);else this.params.includeColumns?this.params.includeColumns.test(j[O])&&this.runtime.selectedColumns.push(O):this.runtime.selectedColumns.push(O);this.runtime.headers=p.filterArray(this.runtime.headers,this.runtime.selectedColumns)}},A.prototype.processCSVBody=function(j){if(this.params.output==="line")return j;var O=this.rowSplit.parseMultiLines(j);return this.prependLeftBuf(p.bufFromString(O.partial)),this.params.output==="csv"?O.rowsCells:_.default(O.rowsCells,this.converter)},A.prototype.prependLeftBuf=function(j){j&&(this.runtime.csvLineBuffer?this.runtime.csvLineBuffer=r.concat([j,this.runtime.csvLineBuffer]):this.runtime.csvLineBuffer=j)},A.prototype.runPreLineHook=function(j){var O=this;return new u.default(function(N,U){(function V(Z,X,oe,ee){if(oe>=Z.length)ee();else if(X.preFileLineHook){var J=Z[oe],ne=X.preFileLineHook(J,X.parsedLineNumber+oe);if(oe++,ne&&ne.then)ne.then(function(he){Z[oe-1]=he,V(Z,X,oe,ee)});else{for(Z[oe-1]=ne;oe<Z.length;)Z[oe]=X.preFileLineHook(Z[oe],X.parsedLineNumber+oe),oe++;ee()}}else ee()})(j,O.runtime,0,function(V){V?U(V):N(j)})})},A}(s.Processor);t.ProcessorLocal=x}).call(this,n(3).Buffer)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(i){this.converter=i,this.params=i.parseParam,this.runtime=i.parseRuntime};t.Processor=r},function(e,t,n){(function(r){var i=this&&this.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(n(55));t.prepareData=function(s,u){var d=function(m,p){return p.csvLineBuffer&&p.csvLineBuffer.length>0?r.concat([p.csvLineBuffer,m]):m}(s,u);u.csvLineBuffer=void 0;var f=function(m,p){var b=m.length-1;if((128&m[b])!=0){for(;(192&m[b])==128;)b--;b--}return b!=m.length-1?(p.csvLineBuffer=m.slice(b+1),m.slice(0,b+1)):m}(d,u).toString("utf8");return u.started===!1?a.default(f):f}}).call(this,n(3).Buffer)},function(e,t,n){(function(r){var i=n(56);e.exports=function(a){return typeof a=="string"&&a.charCodeAt(0)===65279?a.slice(1):r.isBuffer(a)&&i(a)&&a[0]===239&&a[1]===187&&a[2]===191?a.slice(3):a}}).call(this,n(3).Buffer)},function(e,t){e.exports=function(n){for(var r=0;r<n.length;)if(n[r]==9||n[r]==10||n[r]==13||32<=n[r]&&n[r]<=126)r+=1;else if(194<=n[r]&&n[r]<=223&&128<=n[r+1]&&n[r+1]<=191)r+=2;else if(n[r]==224&&160<=n[r+1]&&n[r+1]<=191&&128<=n[r+2]&&n[r+2]<=191||(225<=n[r]&&n[r]<=236||n[r]==238||n[r]==239)&&128<=n[r+1]&&n[r+1]<=191&&128<=n[r+2]&&n[r+2]<=191||n[r]==237&&128<=n[r+1]&&n[r+1]<=159&&128<=n[r+2]&&n[r+2]<=191)r+=3;else{if(!(n[r]==240&&144<=n[r+1]&&n[r+1]<=191&&128<=n[r+2]&&n[r+2]<=191&&128<=n[r+3]&&n[r+3]<=191||241<=n[r]&&n[r]<=243&&128<=n[r+1]&&n[r+1]<=191&&128<=n[r+2]&&n[r+2]<=191&&128<=n[r+3]&&n[r+3]<=191||n[r]==244&&128<=n[r+1]&&n[r+1]<=143&&128<=n[r+2]&&n[r+2]<=191&&128<=n[r+3]&&n[r+3]<=191))return!1;r+=4}return!0}},function(e,t,n){var r=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(16));t.stringToLines=function(a,s){var u=i.default(a,s),d=a.split(u);return{lines:d,partial:d.pop()||""}}},function(e,t,n){var r=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(16)),a=n(28),s=[",","|"," ",";",":"],u=function(){function d(f){this.conv=f,this.cachedRegExp={},this.delimiterEmitted=!1,this._needEmitDelimiter=void 0,this.quote=f.parseParam.quote,this.trim=f.parseParam.trim,this.escape=f.parseParam.escape}return Object.defineProperty(d.prototype,"needEmitDelimiter",{get:function(){return this._needEmitDelimiter===void 0&&(this._needEmitDelimiter=this.conv.listeners("delimiter").length>0),this._needEmitDelimiter},enumerable:!0,configurable:!0}),d.prototype.parse=function(f){if(f.length===0||this.conv.parseParam.ignoreEmpty&&f.trim().length===0)return{cells:[],closed:!0};var m=this.quote,p=this.trim;this.escape,(this.conv.parseRuntime.delimiter instanceof Array||this.conv.parseRuntime.delimiter.toLowerCase()==="auto")&&(this.conv.parseRuntime.delimiter=this.getDelimiter(f)),this.needEmitDelimiter&&!this.delimiterEmitted&&(this.conv.emit("delimiter",this.conv.parseRuntime.delimiter),this.delimiterEmitted=!0);var b=this.conv.parseRuntime.delimiter,_=f.split(b);if(m==="off"){if(p)for(var w=0;w<_.length;w++)_[w]=_[w].trim();return{cells:_,closed:!0}}return this.toCSVRow(_,p,m,b)},d.prototype.toCSVRow=function(f,m,p,b){for(var _=[],w=!1,x="",E=0,A=f.length;E<A;E++){var j=f[E];!w&&m&&(j=a.trimLeft(j));var O=j.length;if(w)this.isQuoteClose(j)?(w=!1,x+=b+(j=j.substr(0,O-1)),x=this.escapeQuote(x),m&&(x=a.trimRight(x)),_.push(x),x=""):x+=b+j;else{if(O===2&&j===this.quote+this.quote){_.push("");continue}if(this.isQuoteOpen(j)){if(j=j.substr(1),this.isQuoteClose(j)){j=j.substring(0,j.lastIndexOf(p)),j=this.escapeQuote(j),_.push(j);continue}if(j.indexOf(p)!==-1){for(var N=0,U="",V=0,Z=j;V<Z.length;V++){var X=Z[V];X===p&&U!==this.escape?(N++,U=""):U=X}if(N%2==1){m&&(j=a.trimRight(j)),_.push(p+j);continue}w=!0,x+=j;continue}w=!0,x+=j;continue}m&&(j=a.trimRight(j)),_.push(j)}}return{cells:_,closed:!w}},d.prototype.getDelimiter=function(f){var m;if(this.conv.parseParam.delimiter==="auto")m=s;else{if(!(this.conv.parseParam.delimiter instanceof Array))return this.conv.parseParam.delimiter;m=this.conv.parseParam.delimiter}var p=0,b=",";return m.forEach(function(_){var w=f.split(_).length;w>p&&(b=_,p=w)}),b},d.prototype.isQuoteOpen=function(f){var m=this.quote,p=this.escape;return f[0]===m&&(f[1]!==m||f[1]===p&&(f[2]===m||f.length===2))},d.prototype.isQuoteClose=function(f){var m=this.quote,p=this.escape;this.conv.parseParam.trim&&(f=a.trimRight(f));for(var b=0,_=f.length-1;f[_]===m||f[_]===p;)_--,b++;return b%2!=0},d.prototype.escapeQuote=function(f){var m="es|"+this.quote+"|"+this.escape;this.cachedRegExp[m]===void 0&&(this.cachedRegExp[m]=new RegExp("\\"+this.escape+"\\"+this.quote,"g"));var p=this.cachedRegExp[m];return f.replace(p,this.quote)},d.prototype.parseMultiLines=function(f){for(var m=[],p="";f.length;){var b=p+f.shift(),_=this.parse(b);_.cells.length===0&&this.conv.parseParam.ignoreEmpty||(_.closed||this.conv.parseParam.alwaysSplitAtEOL?(this.conv.parseRuntime.selectedColumns?m.push(a.filterArray(_.cells,this.conv.parseRuntime.selectedColumns)):m.push(_.cells),p=""):p=b+(i.default(b,this.conv.parseRuntime)||`
`))}return{rowsCells:m,partial:p}},d}();t.RowSplit=u},function(e,t,n){var r=this&&this.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(29)),a=r(n(60)),s=/^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;function u(A,j,O){if(j.parseParam.checkColumn&&j.parseRuntime.headers&&A.length!==j.parseRuntime.headers.length)throw i.default.column_mismatched(j.parseRuntime.parsedLineNumber+O);return function(N,U,V){for(var Z=!1,X={},oe=0,ee=N.length;oe<ee;oe++){var J=N[oe];if(!V.parseParam.ignoreEmpty||J!==""){Z=!0;var ne=U[oe];ne&&ne!==""||(ne=U[oe]="field"+(oe+1));var he=f(ne,oe,V);if(he){var Q=he(J,ne,X,N,oe);Q!==void 0&&m(X,ne,Q,V,oe)}else V.parseParam.checkType&&(J=_(J,ne,oe,V)(J)),J!==void 0&&m(X,ne,J,V,oe)}}return Z?X:null}(A,j.parseRuntime.headers||[],j)||null}t.default=function(A,j){for(var O=[],N=0,U=A.length;N<U;N++){var V=u(A[N],j,N);V&&O.push(V)}return O};var d={string:x,number:w,omit:function(){}};function f(A,j,O){if(O.parseRuntime.columnConv[j]!==void 0)return O.parseRuntime.columnConv[j];var N=O.parseParam.colParser[A];if(N===void 0)return O.parseRuntime.columnConv[j]=null;if(typeof N=="object"&&(N=N.cellParser||"string"),typeof N=="string"){N=N.trim().toLowerCase();var U=d[N];return O.parseRuntime.columnConv[j]=U||null}return O.parseRuntime.columnConv[j]=typeof N=="function"?N:null}function m(A,j,O,N,U){if(!N.parseRuntime.columnValueSetter[U])if(N.parseParam.flatKeys)N.parseRuntime.columnValueSetter[U]=p;else if(j.indexOf(".")>-1){for(var V=j.split("."),Z=!0;V.length>0;)if(V.shift().length===0){Z=!1;break}!Z||N.parseParam.colParser[j]&&N.parseParam.colParser[j].flat?N.parseRuntime.columnValueSetter[U]=p:N.parseRuntime.columnValueSetter[U]=b}else N.parseRuntime.columnValueSetter[U]=p;N.parseParam.nullObject===!0&&O==="null"&&(O=null),N.parseRuntime.columnValueSetter[U](A,j,O)}function p(A,j,O){A[j]=O}function b(A,j,O){a.default(A,j,O)}function _(A,j,O,N){return N.parseRuntime.headerType[O]?N.parseRuntime.headerType[O]:j.indexOf("number#!")>-1?N.parseRuntime.headerType[O]=w:j.indexOf("string#!")>-1?N.parseRuntime.headerType[O]=x:N.parseParam.checkType?N.parseRuntime.headerType[O]=E:N.parseRuntime.headerType[O]=x}function w(A){var j=parseFloat(A);return isNaN(j)?A:j}function x(A){return A.toString()}function E(A){var j=A.trim();return j===""?x(A):s.test(j)?w(A):j.length===5&&j.toLowerCase()==="false"||j.length===4&&j.toLowerCase()==="true"?function(O){var N=O.trim();return N.length!==5||N.toLowerCase()!=="false"}(A):j[0]==="{"&&j[j.length-1]==="}"||j[0]==="["&&j[j.length-1]==="]"?function(O){try{return JSON.parse(O)}catch{return O}}(A):x(A)}},function(e,t,n){var r=n(61);e.exports=function(i,a,s){return i==null?i:r(i,a,s)}},function(e,t,n){var r=n(62),i=n(74),a=n(103),s=n(20),u=n(104);e.exports=function(d,f,m,p){if(!s(d))return d;for(var b=-1,_=(f=i(f,d)).length,w=_-1,x=d;x!=null&&++b<_;){var E=u(f[b]),A=m;if(b!=w){var j=x[E];(A=p?p(j,E,x):void 0)===void 0&&(A=s(j)?j:a(f[b+1])?[]:{})}r(x,E,A),x=x[E]}return d}},function(e,t,n){var r=n(63),i=n(31),a=Object.prototype.hasOwnProperty;e.exports=function(s,u,d){var f=s[u];a.call(s,u)&&i(f,d)&&(d!==void 0||u in s)||r(s,u,d)}},function(e,t,n){var r=n(64);e.exports=function(i,a,s){a=="__proto__"&&r?r(i,a,{configurable:!0,enumerable:!0,value:s,writable:!0}):i[a]=s}},function(e,t,n){var r=n(17),i=function(){try{var a=r(Object,"defineProperty");return a({},"",{}),a}catch{}}();e.exports=i},function(e,t,n){var r=n(66),i=n(70),a=n(20),s=n(72),u=/^\[object .+?Constructor\]$/,d=Function.prototype,f=Object.prototype,m=d.toString,p=f.hasOwnProperty,b=RegExp("^"+m.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(_){return!(!a(_)||i(_))&&(r(_)?b:u).test(s(_))}},function(e,t,n){var r=n(30),i=n(20);e.exports=function(a){if(!i(a))return!1;var s=r(a);return s=="[object Function]"||s=="[object GeneratorFunction]"||s=="[object AsyncFunction]"||s=="[object Proxy]"}},function(e,t,n){(function(r){var i=typeof r=="object"&&r&&r.Object===Object&&r;e.exports=i}).call(this,n(0))},function(e,t,n){var r=n(18),i=Object.prototype,a=i.hasOwnProperty,s=i.toString,u=r?r.toStringTag:void 0;e.exports=function(d){var f=a.call(d,u),m=d[u];try{d[u]=void 0;var p=!0}catch{}var b=s.call(d);return p&&(f?d[u]=m:delete d[u]),b}},function(e,t){var n=Object.prototype.toString;e.exports=function(r){return n.call(r)}},function(e,t,n){var r=n(71),i=function(){var a=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}();e.exports=function(a){return!!i&&i in a}},function(e,t,n){var r=n(19)["__core-js_shared__"];e.exports=r},function(e,t){var n=Function.prototype.toString;e.exports=function(r){if(r!=null){try{return n.call(r)}catch{}try{return r+""}catch{}}return""}},function(e,t){e.exports=function(n,r){return n?.[r]}},function(e,t,n){var r=n(21),i=n(75),a=n(77),s=n(100);e.exports=function(u,d){return r(u)?u:i(u,d)?[u]:a(s(u))}},function(e,t,n){var r=n(21),i=n(22),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(u,d){if(r(u))return!1;var f=typeof u;return!(f!="number"&&f!="symbol"&&f!="boolean"&&u!=null&&!i(u))||s.test(u)||!a.test(u)||d!=null&&u in Object(d)}},function(e,t){e.exports=function(n){return n!=null&&typeof n=="object"}},function(e,t,n){var r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=n(78)(function(s){var u=[];return s.charCodeAt(0)===46&&u.push(""),s.replace(r,function(d,f,m,p){u.push(m?p.replace(i,"$1"):f||d)}),u});e.exports=a},function(e,t,n){var r=n(79);e.exports=function(i){var a=r(i,function(u){return s.size===500&&s.clear(),u}),s=a.cache;return a}},function(e,t,n){var r=n(80),i="Expected a function";function a(s,u){if(typeof s!="function"||u!=null&&typeof u!="function")throw new TypeError(i);var d=function(){var f=arguments,m=u?u.apply(this,f):f[0],p=d.cache;if(p.has(m))return p.get(m);var b=s.apply(this,f);return d.cache=p.set(m,b)||p,b};return d.cache=new(a.Cache||r),d}a.Cache=r,e.exports=a},function(e,t,n){var r=n(81),i=n(95),a=n(97),s=n(98),u=n(99);function d(f){var m=-1,p=f==null?0:f.length;for(this.clear();++m<p;){var b=f[m];this.set(b[0],b[1])}}d.prototype.clear=r,d.prototype.delete=i,d.prototype.get=a,d.prototype.has=s,d.prototype.set=u,e.exports=d},function(e,t,n){var r=n(82),i=n(88),a=n(94);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},function(e,t,n){var r=n(83),i=n(84),a=n(85),s=n(86),u=n(87);function d(f){var m=-1,p=f==null?0:f.length;for(this.clear();++m<p;){var b=f[m];this.set(b[0],b[1])}}d.prototype.clear=r,d.prototype.delete=i,d.prototype.get=a,d.prototype.has=s,d.prototype.set=u,e.exports=d},function(e,t,n){var r=n(8);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(n){var r=this.has(n)&&delete this.__data__[n];return this.size-=r?1:0,r}},function(e,t,n){var r=n(8),i=Object.prototype.hasOwnProperty;e.exports=function(a){var s=this.__data__;if(r){var u=s[a];return u==="__lodash_hash_undefined__"?void 0:u}return i.call(s,a)?s[a]:void 0}},function(e,t,n){var r=n(8),i=Object.prototype.hasOwnProperty;e.exports=function(a){var s=this.__data__;return r?s[a]!==void 0:i.call(s,a)}},function(e,t,n){var r=n(8);e.exports=function(i,a){var s=this.__data__;return this.size+=this.has(i)?0:1,s[i]=r&&a===void 0?"__lodash_hash_undefined__":a,this}},function(e,t,n){var r=n(89),i=n(90),a=n(91),s=n(92),u=n(93);function d(f){var m=-1,p=f==null?0:f.length;for(this.clear();++m<p;){var b=f[m];this.set(b[0],b[1])}}d.prototype.clear=r,d.prototype.delete=i,d.prototype.get=a,d.prototype.has=s,d.prototype.set=u,e.exports=d},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(9),i=Array.prototype.splice;e.exports=function(a){var s=this.__data__,u=r(s,a);return!(u<0||(u==s.length-1?s.pop():i.call(s,u,1),--this.size,0))}},function(e,t,n){var r=n(9);e.exports=function(i){var a=this.__data__,s=r(a,i);return s<0?void 0:a[s][1]}},function(e,t,n){var r=n(9);e.exports=function(i){return r(this.__data__,i)>-1}},function(e,t,n){var r=n(9);e.exports=function(i,a){var s=this.__data__,u=r(s,i);return u<0?(++this.size,s.push([i,a])):s[u][1]=a,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 a=r(this,i).delete(i);return this.size-=a?1:0,a}},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,a){var s=r(this,i),u=s.size;return s.set(i,a),this.size+=s.size==u?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),a=n(21),s=n(22),u=r?r.prototype:void 0,d=u?u.toString:void 0;e.exports=function f(m){if(typeof m=="string")return m;if(a(m))return i(m,f)+"";if(s(m))return d?d.call(m):"";var p=m+"";return p=="0"&&1/m==-1/0?"-0":p}},function(e,t){e.exports=function(n,r){for(var i=-1,a=n==null?0:n.length,s=Array(a);++i<a;)s[i]=r(n[i],i,n);return s}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(r,i){var a=typeof r;return!!(i=i??9007199254740991)&&(a=="number"||a!="symbol"&&n.test(r))&&r>-1&&r%1==0&&r<i}},function(e,t,n){var r=n(22);e.exports=function(i){if(typeof i=="string"||r(i))return i;var a=i+"";return a=="0"&&1/i==-1/0?"-0":a}},function(e,t,n){var r=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(15)),a=n(106),s=function(){function d(f){this.converter=f,this.finalResult=[]}return Object.defineProperty(d.prototype,"needEmitLine",{get:function(){return!!this.converter.parseRuntime.subscribe&&!!this.converter.parseRuntime.subscribe.onNext||this.needPushDownstream},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"needPushDownstream",{get:function(){return this._needPushDownstream===void 0&&(this._needPushDownstream=this.converter.listeners("data").length>0||this.converter.listeners("readable").length>0),this._needPushDownstream},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"needEmitAll",{get:function(){return!!this.converter.parseRuntime.then&&this.converter.parseParam.needEmitAll},enumerable:!0,configurable:!0}),d.prototype.processResult=function(f){var m=this,p=this.converter.parseRuntime.parsedLineNumber;return this.needPushDownstream&&this.converter.parseParam.downstreamFormat==="array"&&p===0&&u(this.converter,"["+a.EOL),new i.default(function(b,_){m.needEmitLine?function w(x,E,A,j,O){if(A>=x.length)O();else if(E.parseRuntime.subscribe&&E.parseRuntime.subscribe.onNext){var N=E.parseRuntime.subscribe.onNext,U=x[A],V=N(U,E.parseRuntime.parsedLineNumber+A);if(A++,V&&V.then)V.then(function(){(function(X,oe,ee,J,ne,he,Q){ne&&u(ee,Q),w(X,ee,J,ne,he)})(x,0,E,A,j,O,U)},O);else{for(j&&u(E,U);A<x.length;){var Z=x[A];N(Z,E.parseRuntime.parsedLineNumber+A),A++,j&&u(E,Z)}O()}}else{if(j)for(;A<x.length;)Z=x[A++],u(E,Z);O()}}(f,m.converter,0,m.needPushDownstream,function(w){w?_(w):(m.appendFinalResult(f),b())}):(m.appendFinalResult(f),b())})},d.prototype.appendFinalResult=function(f){this.needEmitAll&&(this.finalResult=this.finalResult.concat(f)),this.converter.parseRuntime.parsedLineNumber+=f.length},d.prototype.processError=function(f){this.converter.parseRuntime.subscribe&&this.converter.parseRuntime.subscribe.onError&&this.converter.parseRuntime.subscribe.onError(f),this.converter.parseRuntime.then&&this.converter.parseRuntime.then.onrejected&&this.converter.parseRuntime.then.onrejected(f)},d.prototype.endProcess=function(){this.converter.parseRuntime.then&&this.converter.parseRuntime.then.onfulfilled&&(this.needEmitAll?this.converter.parseRuntime.then.onfulfilled(this.finalResult):this.converter.parseRuntime.then.onfulfilled([])),this.converter.parseRuntime.subscribe&&this.converter.parseRuntime.subscribe.onCompleted&&this.converter.parseRuntime.subscribe.onCompleted(),this.needPushDownstream&&this.converter.parseParam.downstreamFormat==="array"&&u(this.converter,"]"+a.EOL)},d}();function u(d,f){if(typeof f!="object"||d.options.objectMode)d.push(f);else{var m=JSON.stringify(f);d.push(m+(d.parseParam.downstreamFormat==="array"?","+a.EOL:a.EOL),"utf8")}}t.Result=s},function(e,t){t.endianness=function(){return"LE"},t.hostname=function(){return typeof location<"u"?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return typeof navigator<"u"?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL=`
`,t.homedir=function(){return"/"}}])),nx}var Gbe=qbe();const Ybe=Pi(Gbe),Wbe=e=>new Promise(t=>{Ybe().fromString(e).then(t)}),Kbe=new SL,Zbe=e=>Kbe.parse(e),Xbe="shlink",J5=e=>`${Xbe}.${e}`;class Qbe{constructor(t){this.localStorage=t}get=t=>{const n=this.localStorage.getItem(J5(t));return n?JSON.parse(n):void 0};set=(t,n)=>this.localStorage.setItem(J5(t),JSON.stringify(n))}class Jbe{constructor(t){this.storage=t}getTagColors(){return this.storage.get("colors")??{}}storeTagColors(t){this.storage.set("colors",t)}}const e_e=e=>{e.constant("localStorage",window.localStorage),e.service("Storage",Qbe,"localStorage"),e.service("TagColorsStorage",Jbe,"Storage"),e.constant("csvToJson",Wbe),e.constant("jsonToCsv",Zbe),e.serviceFactory("useTimeoutToggle",()=>Wv)},Hu=new LR,{container:h3}=Hu,t_e=(e,t)=>(...n)=>e[t](...n),n_e=(e,t)=>({...e,[t]:t_e(h3,t)}),r_e=e=>t=>Object.fromEntries(e.map(n=>[n,t[n]])),Hy=(e,t=[])=>lR(e?r_e(e):null,t.reduce(n_e,{}));kZ(Hu,Hy);X1e(Hu,Hy);m$(Hu);Ibe(Hu,Hy);e_e(Hu);Hbe(Hu,Hy);var rx={},ug={exports:{}},eR;function i_e(){return eR||(eR=1,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 f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];return r.apply(void 0,f)}t.main=n,n.clone=a,n.isPlainObject=s,n.recursive=i;function r(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];return d(f[0]===!0,!1,f)}t.merge=r;function i(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];return d(f[0]===!0,!0,f)}t.recursive=i;function a(f){if(Array.isArray(f)){for(var m=[],p=0;p<f.length;++p)m.push(a(f[p]));return m}else if(s(f)){var m={};for(var p in f)m[p]=a(f[p]);return m}else return f}t.clone=a;function s(f){return f&&typeof f=="object"&&!Array.isArray(f)}t.isPlainObject=s;function u(f,m){if(!s(f))return m;for(var p in m)p==="__proto__"||p==="constructor"||p==="prototype"||(f[p]=s(f[p])&&s(m[p])?u(f[p],m[p]):m[p]);return f}function d(f,m,p){var b;(f||!s(b=p.shift()))&&(b={});for(var _=0;_<p.length;++_){var w=p[_];if(s(w)){for(var x in w)if(!(x==="__proto__"||x==="constructor"||x==="prototype")){var E=f?a(w[x]):w[x];b[x]=m?u(b[x],E):E}}}return b}}(ug,ug.exports)),ug.exports}var tR;function a_e(){return tR||(tR=1,function(e){var t=n(i_e());Object.defineProperty(e,"__esModule",{value:!0}),e.clear=he,e.combineLoads=ne,e.load=J,e.save=ee;function n(z){return z&&z.__esModule?z:{default:z}}function r(z,M){return d(z)||u(z,M)||a(z,M)||i()}function i(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a(z,M){if(z){if(typeof z=="string")return s(z,M);var D=Object.prototype.toString.call(z).slice(8,-1);return D==="Object"&&z.constructor&&(D=z.constructor.name),D==="Map"||D==="Set"?Array.from(z):D==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(D)?s(z,M):void 0}}function s(z,M){(M==null||M>z.length)&&(M=z.length);for(var D=0,Y=Array(M);D<M;D++)Y[D]=z[D];return Y}function u(z,M){var D=z==null?null:typeof Symbol<"u"&&z[Symbol.iterator]||z["@@iterator"];if(D!=null){var Y,q,re=[],ue=!0,ce=!1;try{for(D=D.call(z);!(ue=(Y=D.next()).done)&&(re.push(Y.value),!(M&&re.length===M));ue=!0);}catch(ve){ce=!0,q=ve}finally{try{ue||D.return==null||D.return()}finally{if(ce)throw q}}return re}}function d(z){if(Array.isArray(z))return z}function f(z){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},f(z)}function m(z,M,D){return M in z?Object.defineProperty(z,M,{value:D,enumerable:!0,configurable:!0,writable:!0}):z[M]=D,z}var p="[Redux-LocalStorage-Simple]",b="redux_localstorage_simple",_="_",w=[],x=[],E=0,A=!1,j=!1,O=new Map;function N(z){console.warn(p,z)}function U(){}var V=function(z){return z?U:N};function Z(z,M){return M===void 0?null:z.length===1?M[z[0]]:Z(z.slice(1),M[z[0]])}function X(z){function M(Y,q){return Y.length===0?q:M(Y.slice(1),m({},Y[0],q))}var D=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{};return M(z.split(".").reverse(),D)}function oe(z){this.warnFn=z||N}Object.defineProperty(oe.prototype,"length",{get:function(){try{return localStorage.length}catch(z){this.warnFn(z)}return 0},configurable:!0,enumerable:!0}),oe.prototype.key=function(z){try{return localStorage.key(z)}catch(M){this.warnFn(M)}return null},oe.prototype.setItem=function(z,M){try{localStorage.setItem(z,JSON.stringify(M))}catch(D){this.warnFn(D)}},oe.prototype.getItem=function(z){try{return JSON.parse(localStorage.getItem(z))}catch(M){this.warnFn(M)}return null},oe.prototype.removeItem=function(z){try{localStorage.removeItem(z)}catch(M){this.warnFn(M)}};function ee(){var z=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},M=z.states,D=M===void 0?w:M,Y=z.ignoreStates,q=Y===void 0?x:Y,re=z.namespace,ue=re===void 0?b:re,ce=z.namespaceSeparator,ve=ce===void 0?_:ce,k=z.debounce,F=k===void 0?E:k,G=z.disableWarnings,le=G===void 0?j:G;return function(H){return function(ae){return function(fe){function ge(Be,He){return 1<Be.split(".").length?Z(Be.split("."),He):Z([Be],He)}function de(){D.length===0?qe.setItem(ue,_e):D.forEach(function(Be){var He=ue+ve+Be,be=ge(Be,_e);be?qe.setItem(He,be):qe.removeItem(He)})}var _e,Te=V(le),Le=ae(fe);Q(D)||(console.error(p,"'states' parameter in 'save()' method was passed a non-array value. Setting default value instead. Check your 'save()' method."),D=w),Q(q)||(console.error(p,"'ignoreStates' parameter in 'save()' method was passed a non-array value. Setting default value instead. Check your 'save()' method."),q=x),0<q.length&&(q=q.filter(function(Be){return se(Be)?Be:void console.error(p,"'ignoreStates' array contains a non-string value. Ignoring this value. Check your 'ignoreStates' array.")})),se(ue)||(console.error(p,"'namespace' parameter in 'save()' method was passed a non-string value. Setting default value instead. Check your 'save()' method."),ue=b),se(ve)||(console.error(p,"'namespaceSeparator' parameter in 'save()' method was passed a non-string value. Setting default value instead. Check your 'save()' method."),ve=_),W(F)||(console.error(p,"'debounce' parameter in 'save()' method was passed a non-integer value. Setting default value instead. Check your 'save()' method."),F=E),_e=0<q.length?I(q,H.getState()):H.getState();var qe=new oe(Te);return F?(O.get(D+ue)&&clearTimeout(O.get(D+ue)),O.set(D+ue,setTimeout(function(){de()},F))):de(),Le}}}}function J(){var z=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},M=z.states,D=M===void 0?w:M,Y=z.immutablejs,q=Y===void 0?A:Y,re=z.namespace,ue=re===void 0?b:re,ce=z.namespaceSeparator,ve=ce===void 0?_:ce,k=z.preloadedState,F=k===void 0?{}:k,G=z.disableWarnings,le=G===void 0?j:G,H=V(le);Q(D)||(console.error(p,"'states' parameter in 'load()' method was passed a non-array value. Setting default value instead. Check your 'load()' method."),D=w),se(ue)||(console.error(p,"'namespace' parameter in 'load()' method was passed a non-string value. Setting default value instead. Check your 'load()' method."),ue=b),se(ve)||(console.error(p,"'namespaceSeparator' parameter in 'load()' method was passed a non-string value. Setting default value instead. Check your 'load()' method."),ve=_),q===!0&&H("Support for Immutable.js data structures has been deprecated as of version 2.0.0. Please use version 1.4.0 if you require this functionality.");var ae=new oe(H),fe=F;if(D.length===0){var ge=ae.getItem(ue);ge&&(fe=ge)}else D.forEach(function(de){var _e=ue+ve+de,Te=ae.getItem(_e);Te?fe=t.default.recursive(fe,X(de,Te)):H("Invalid load '"+_e+"' provided. Check your 'states' in 'load()'. If this is your first time running this app you may see this message. To disable it in future use the 'disableWarnings' flag, see documentation.")});return fe}function ne(){for(var z={},M=arguments.length,D=Array(M),Y=0;Y<M;Y++)D[Y]=arguments[Y];return D.forEach(function(q){for(var re in B(q)||(console.error(p,"One or more loads provided to 'combineLoads()' is not a valid object. Ignoring the invalid load/s. Check your 'combineLoads()' method."),q={}),q)z[re]=q[re]}),z}function he(){var z=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},M=z.namespace,D=M===void 0?b:M,Y=z.disableWarnings,q=Y===void 0?j:Y,re=V(q);se(D)||(console.error(p,"'namespace' parameter in 'clear()' method was passed a non-string value. Setting default value instead. Check your 'clear()' method."),D=b);for(var ue,ce=new oe(re),ve=ce.length,k=0;k<ve;k++)ue=ce.key(k),ue&&ue.slice(0,D.length)===D&&ce.removeItem(ue)}function Q(z){return Object.prototype.toString.call(z)==="[object Array]"}function se(z){return typeof z=="string"}function W(z){return typeof z=="number"&&isFinite(z)&&Math.floor(z)===z}function B(z){return z!==null&&f(z)==="object"}function I(z,M){var D=Object.entries(M).reduce(function(Y,q){var re=r(q,2),ue=re[0];return re[1],z.indexOf(ue)===-1&&(Y[ue]=M[ue]),Y},{});return D}}(rx)),rx}var q9=a_e();const o_e=e=>Xv({appUpdated:DZ,servers:_be,selectedServer:e.selectedServerReducer,settings:$be}),s_e=e=>(e.settings&&e.settings.visits&&e.settings.visits.defaultInterval==="last180days"&&(e.settings.visits.defaultInterval="last180Days"),e),G9={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},l_e=s_e(q9.load(G9)),u_e=e=>jw({devTools:!1,reducer:o_e(e),preloadedState:l_e,middleware:t=>t({immutableCheck:!1,serializableCheck:!1}).concat(q9.save(G9))}),c_e=!!(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 f_e(e){if("serviceWorker"in navigator){if(new URL(Cg.homepage,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=`${Cg.homepage}/service-worker.js`;c_e?(d_e(n,e),navigator.serviceWorker.ready.then(()=>{console.log("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")})):Y9(n,e)})}}function Y9(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 d_e(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then(n=>{const r=n.headers.get("content-type");n.status===404||r!=null&&r.indexOf("javascript")===-1?navigator.serviceWorker.ready.then(i=>{i.unregister().then(()=>{window.location.reload()})}):Y9(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}const W9=u_e(h3),{App:h_e,ScrollToTop:m_e,ErrorHandler:p_e,appUpdateAvailable:g_e}=h3;yB.createRoot(document.getElementById("root")).render(v.jsx(I2,{store:W9,children:v.jsx(xR,{basename:Cg.homepage,children:v.jsx(p_e,{children:v.jsx(m_e,{children:v.jsx(h_e,{})})})})}));f_e({onUpdate(){W9.dispatch(g_e())}});