mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-12-24 03:00:09 +00:00
613 lines
1.3 MiB
613 lines
1.3 MiB
function C$(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 o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{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 o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function Qi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ox={exports:{}},Zd={};var IO;function E$(){if(IO)return Zd;IO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var l=null;if(o!==void 0&&(l=""+o),i.key!==void 0&&(l=""+i.key),"key"in i){o={};for(var c in i)c!=="key"&&(o[c]=i[c])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:o}}return Zd.Fragment=t,Zd.jsx=n,Zd.jsxs=n,Zd}var zO;function A$(){return zO||(zO=1,ox.exports=E$()),ox.exports}var g=A$(),sx={exports:{}},Xd={},lx={exports:{}},ux={};var BO;function O$(){return BO||(BO=1,(function(e){function t(Y,I){var z=Y.length;Y.push(I);e:for(;0<z;){var H=z-1>>>1,k=Y[H];if(0<i(k,I))Y[H]=I,Y[z]=k,z=H;else break e}}function n(Y){return Y.length===0?null:Y[0]}function r(Y){if(Y.length===0)return null;var I=Y[0],z=Y.pop();if(z!==I){Y[0]=z;e:for(var H=0,k=Y.length,M=k>>>1;H<M;){var q=2*(H+1)-1,ee=Y[q],se=q+1,me=Y[se];if(0>i(ee,z))se<k&&0>i(me,ee)?(Y[H]=me,Y[se]=z,H=se):(Y[H]=ee,Y[q]=z,H=q);else if(se<k&&0>i(me,z))Y[H]=me,Y[se]=z,H=se;else break e}}return I}function i(Y,I){var z=Y.sortIndex-I.sortIndex;return z!==0?z:Y.id-I.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var f=[],h=[],m=1,y=null,x=3,b=!1,w=!1,C=!1,O=!1,T=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function F(Y){for(var I=n(h);I!==null;){if(I.callback===null)r(h);else if(I.startTime<=Y)r(h),I.sortIndex=I.expirationTime,t(f,I);else break;I=n(h)}}function B(Y){if(C=!1,F(Y),!w)if(n(f)!==null)w=!0,W||(W=!0,oe());else{var I=n(h);I!==null&&ue(B,I.startTime-Y)}}var W=!1,Q=-1,re=5,ce=-1;function ae(){return O?!0:!(e.unstable_now()-ce<re)}function J(){if(O=!1,W){var Y=e.unstable_now();ce=Y;var I=!0;try{e:{w=!1,C&&(C=!1,P(Q),Q=-1),b=!0;var z=x;try{t:{for(F(Y),y=n(f);y!==null&&!(y.expirationTime>Y&&ae());){var H=y.callback;if(typeof H=="function"){y.callback=null,x=y.priorityLevel;var k=H(y.expirationTime<=Y);if(Y=e.unstable_now(),typeof k=="function"){y.callback=k,F(Y),I=!0;break t}y===n(f)&&r(f),F(Y)}else r(f);y=n(f)}if(y!==null)I=!0;else{var M=n(h);M!==null&&ue(B,M.startTime-Y),I=!1}}break e}finally{y=null,x=z,b=!1}I=void 0}}finally{I?oe():W=!1}}}var oe;if(typeof N=="function")oe=function(){N(J)};else if(typeof MessageChannel<"u"){var ve=new MessageChannel,ie=ve.port2;ve.port1.onmessage=J,oe=function(){ie.postMessage(null)}}else oe=function(){T(J,0)};function ue(Y,I){Q=T(function(){Y(e.unstable_now())},I)}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(Y){Y.callback=null},e.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):re=0<Y?Math.floor(1e3/Y):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(Y){switch(x){case 1:case 2:case 3:var I=3;break;default:I=x}var z=x;x=I;try{return Y()}finally{x=z}},e.unstable_requestPaint=function(){O=!0},e.unstable_runWithPriority=function(Y,I){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var z=x;x=Y;try{return I()}finally{x=z}},e.unstable_scheduleCallback=function(Y,I,z){var H=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?H+z:H):z=H,Y){case 1:var k=-1;break;case 2:k=250;break;case 5:k=1073741823;break;case 4:k=1e4;break;default:k=5e3}return k=z+k,Y={id:m++,callback:I,priorityLevel:Y,startTime:z,expirationTime:k,sortIndex:-1},z>H?(Y.sortIndex=z,t(h,Y),n(f)===null&&Y===n(h)&&(C?(P(Q),Q=-1):C=!0,ue(B,z-H))):(Y.sortIndex=k,t(f,Y),w||b||(w=!0,W||(W=!0,oe()))),Y},e.unstable_shouldYield=ae,e.unstable_wrapCallback=function(Y){var I=x;return function(){var z=x;x=I;try{return Y.apply(this,arguments)}finally{x=z}}}})(ux)),ux}var UO;function T$(){return UO||(UO=1,lx.exports=O$()),lx.exports}var cx={exports:{}},st={};var $O;function j$(){if($O)return st;$O=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"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),x=Symbol.iterator;function b(M){return M===null||typeof M!="object"?null:(M=x&&M[x]||M["@@iterator"],typeof M=="function"?M:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,O={};function T(M,q,ee){this.props=M,this.context=q,this.refs=O,this.updater=ee||w}T.prototype.isReactComponent={},T.prototype.setState=function(M,q){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,q,"setState")},T.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function P(){}P.prototype=T.prototype;function N(M,q,ee){this.props=M,this.context=q,this.refs=O,this.updater=ee||w}var F=N.prototype=new P;F.constructor=N,C(F,T.prototype),F.isPureReactComponent=!0;var B=Array.isArray;function W(){}var Q={H:null,A:null,T:null,S:null},re=Object.prototype.hasOwnProperty;function ce(M,q,ee){var se=ee.ref;return{$$typeof:e,type:M,key:q,ref:se!==void 0?se:null,props:ee}}function ae(M,q){return ce(M.type,q,M.props)}function J(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function oe(M){var q={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(ee){return q[ee]})}var ve=/\/+/g;function ie(M,q){return typeof M=="object"&&M!==null&&M.key!=null?oe(""+M.key):q.toString(36)}function ue(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(W,W):(M.status="pending",M.then(function(q){M.status==="pending"&&(M.status="fulfilled",M.value=q)},function(q){M.status==="pending"&&(M.status="rejected",M.reason=q)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function Y(M,q,ee,se,me){var de=typeof M;(de==="undefined"||de==="boolean")&&(M=null);var be=!1;if(M===null)be=!0;else switch(de){case"bigint":case"string":case"number":be=!0;break;case"object":switch(M.$$typeof){case e:case t:be=!0;break;case m:return be=M._init,Y(be(M._payload),q,ee,se,me)}}if(be)return me=me(M),be=se===""?"."+ie(M,0):se,B(me)?(ee="",be!=null&&(ee=be.replace(ve,"$&/")+"/"),Y(me,q,ee,"",function(G){return G})):me!=null&&(J(me)&&(me=ae(me,ee+(me.key==null||M&&M.key===me.key?"":(""+me.key).replace(ve,"$&/")+"/")+be)),q.push(me)),1;be=0;var D=se===""?".":se+":";if(B(M))for(var R=0;R<M.length;R++)se=M[R],de=D+ie(se,R),be+=Y(se,q,ee,de,me);else if(R=b(M),typeof R=="function")for(M=R.call(M),R=0;!(se=M.next()).done;)se=se.value,de=D+ie(se,R++),be+=Y(se,q,ee,de,me);else if(de==="object"){if(typeof M.then=="function")return Y(ue(M),q,ee,se,me);throw q=String(M),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return be}function I(M,q,ee){if(M==null)return M;var se=[],me=0;return Y(M,se,"","",function(de){return q.call(ee,de,me++)}),se}function z(M){if(M._status===-1){var q=M._result;q=q(),q.then(function(ee){(M._status===0||M._status===-1)&&(M._status=1,M._result=ee)},function(ee){(M._status===0||M._status===-1)&&(M._status=2,M._result=ee)}),M._status===-1&&(M._status=0,M._result=q)}if(M._status===1)return M._result.default;throw M._result}var H=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=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(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},k={map:I,forEach:function(M,q,ee){I(M,function(){q.apply(this,arguments)},ee)},count:function(M){var q=0;return I(M,function(){q++}),q},toArray:function(M){return I(M,function(q){return q})||[]},only:function(M){if(!J(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return st.Activity=y,st.Children=k,st.Component=T,st.Fragment=n,st.Profiler=i,st.PureComponent=N,st.StrictMode=r,st.Suspense=f,st.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Q,st.__COMPILER_RUNTIME={__proto__:null,c:function(M){return Q.H.useMemoCache(M)}},st.cache=function(M){return function(){return M.apply(null,arguments)}},st.cacheSignal=function(){return null},st.cloneElement=function(M,q,ee){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var se=C({},M.props),me=M.key;if(q!=null)for(de in q.key!==void 0&&(me=""+q.key),q)!re.call(q,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&q.ref===void 0||(se[de]=q[de]);var de=arguments.length-2;if(de===1)se.children=ee;else if(1<de){for(var be=Array(de),D=0;D<de;D++)be[D]=arguments[D+2];se.children=be}return ce(M.type,me,se)},st.createContext=function(M){return M={$$typeof:l,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:o,_context:M},M},st.createElement=function(M,q,ee){var se,me={},de=null;if(q!=null)for(se in q.key!==void 0&&(de=""+q.key),q)re.call(q,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(me[se]=q[se]);var be=arguments.length-2;if(be===1)me.children=ee;else if(1<be){for(var D=Array(be),R=0;R<be;R++)D[R]=arguments[R+2];me.children=D}if(M&&M.defaultProps)for(se in be=M.defaultProps,be)me[se]===void 0&&(me[se]=be[se]);return ce(M,de,me)},st.createRef=function(){return{current:null}},st.forwardRef=function(M){return{$$typeof:c,render:M}},st.isValidElement=J,st.lazy=function(M){return{$$typeof:m,_payload:{_status:-1,_result:M},_init:z}},st.memo=function(M,q){return{$$typeof:h,type:M,compare:q===void 0?null:q}},st.startTransition=function(M){var q=Q.T,ee={};Q.T=ee;try{var se=M(),me=Q.S;me!==null&&me(ee,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(W,H)}catch(de){H(de)}finally{q!==null&&ee.types!==null&&(q.types=ee.types),Q.T=q}},st.unstable_useCacheRefresh=function(){return Q.H.useCacheRefresh()},st.use=function(M){return Q.H.use(M)},st.useActionState=function(M,q,ee){return Q.H.useActionState(M,q,ee)},st.useCallback=function(M,q){return Q.H.useCallback(M,q)},st.useContext=function(M){return Q.H.useContext(M)},st.useDebugValue=function(){},st.useDeferredValue=function(M,q){return Q.H.useDeferredValue(M,q)},st.useEffect=function(M,q){return Q.H.useEffect(M,q)},st.useEffectEvent=function(M){return Q.H.useEffectEvent(M)},st.useId=function(){return Q.H.useId()},st.useImperativeHandle=function(M,q,ee){return Q.H.useImperativeHandle(M,q,ee)},st.useInsertionEffect=function(M,q){return Q.H.useInsertionEffect(M,q)},st.useLayoutEffect=function(M,q){return Q.H.useLayoutEffect(M,q)},st.useMemo=function(M,q){return Q.H.useMemo(M,q)},st.useOptimistic=function(M,q){return Q.H.useOptimistic(M,q)},st.useReducer=function(M,q,ee){return Q.H.useReducer(M,q,ee)},st.useRef=function(M){return Q.H.useRef(M)},st.useState=function(M){return Q.H.useState(M)},st.useSyncExternalStore=function(M,q,ee){return Q.H.useSyncExternalStore(M,q,ee)},st.useTransition=function(){return Q.H.useTransition()},st.version="19.2.3",st}var FO;function Af(){return FO||(FO=1,cx.exports=j$()),cx.exports}var fx={exports:{}},Er={};var VO;function M$(){if(VO)return Er;VO=1;var e=Af();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+f+"; visit "+h+" 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 o(f,h,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:y==null?null:""+y,children:f,containerInfo:h,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Er.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Er.createPortal=function(f,h){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return o(f,h,null,m)},Er.flushSync=function(f){var h=l.T,m=r.p;try{if(l.T=null,r.p=2,f)return f()}finally{l.T=h,r.p=m,r.d.f()}},Er.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(f,h))},Er.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},Er.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var m=h.as,y=c(m,h.crossOrigin),x=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;m==="style"?r.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:x,fetchPriority:b}):m==="script"&&r.d.X(f,{crossOrigin:y,integrity:x,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Er.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=c(h.as,h.crossOrigin);r.d.M(f,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(f)},Er.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,y=c(m,h.crossOrigin);r.d.L(f,m,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Er.preloadModule=function(f,h){if(typeof f=="string")if(h){var m=c(h.as,h.crossOrigin);r.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(f)},Er.requestFormReset=function(f){r.d.r(f)},Er.unstable_batchedUpdates=function(f,h){return f(h)},Er.useFormState=function(f,h,m){return l.H.useFormState(f,h,m)},Er.useFormStatus=function(){return l.H.useHostTransitionStatus()},Er.version="19.2.3",Er}var HO;function FL(){if(HO)return fx.exports;HO=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(),fx.exports=M$(),fx.exports}var qO;function P$(){if(qO)return Xd;qO=1;var e=T$(),t=Af(),n=FL();function r(a){var s="https://react.dev/errors/"+a;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)s+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+a+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function o(a){var s=a,d=a;if(a.alternate)for(;s.return;)s=s.return;else{a=s;do s=a,(s.flags&4098)!==0&&(d=s.return),a=s.return;while(a)}return s.tag===3?d:null}function l(a){if(a.tag===13){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function c(a){if(a.tag===31){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function f(a){if(o(a)!==a)throw Error(r(188))}function h(a){var s=a.alternate;if(!s){if(s=o(a),s===null)throw Error(r(188));return s!==a?null:a}for(var d=a,v=s;;){var E=d.return;if(E===null)break;var A=E.alternate;if(A===null){if(v=E.return,v!==null){d=v;continue}break}if(E.child===A.child){for(A=E.child;A;){if(A===d)return f(E),a;if(A===v)return f(E),s;A=A.sibling}throw Error(r(188))}if(d.return!==v.return)d=E,v=A;else{for(var $=!1,Z=E.child;Z;){if(Z===d){$=!0,d=E,v=A;break}if(Z===v){$=!0,v=E,d=A;break}Z=Z.sibling}if(!$){for(Z=A.child;Z;){if(Z===d){$=!0,d=A,v=E;break}if(Z===v){$=!0,v=A,d=E;break}Z=Z.sibling}if(!$)throw Error(r(189))}}if(d.alternate!==v)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?a:s}function m(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a;for(a=a.child;a!==null;){if(s=m(a),s!==null)return s;a=a.sibling}return null}var y=Object.assign,x=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),N=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),re=Symbol.for("react.lazy"),ce=Symbol.for("react.activity"),ae=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function oe(a){return a===null||typeof a!="object"?null:(a=J&&a[J]||a["@@iterator"],typeof a=="function"?a:null)}var ve=Symbol.for("react.client.reference");function ie(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===ve?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case C:return"Fragment";case T:return"Profiler";case O:return"StrictMode";case B:return"Suspense";case W:return"SuspenseList";case ce:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case w:return"Portal";case N:return a.displayName||"Context";case P:return(a._context.displayName||"Context")+".Consumer";case F:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case Q:return s=a.displayName||null,s!==null?s:ie(a.type)||"Memo";case re:s=a._payload,a=a._init;try{return ie(a(s))}catch{}}return null}var ue=Array.isArray,Y=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z={pending:!1,data:null,method:null,action:null},H=[],k=-1;function M(a){return{current:a}}function q(a){0>k||(a.current=H[k],H[k]=null,k--)}function ee(a,s){k++,H[k]=a.current,a.current=s}var se=M(null),me=M(null),de=M(null),be=M(null);function D(a,s){switch(ee(de,s),ee(me,a),ee(se,null),s.nodeType){case 9:case 11:a=(a=s.documentElement)&&(a=a.namespaceURI)?oO(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=oO(s),a=sO(s,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}q(se),ee(se,a)}function R(){q(se),q(me),q(de)}function G(a){a.memoizedState!==null&&ee(be,a);var s=se.current,d=sO(s,a.type);s!==d&&(ee(me,a),ee(se,d))}function ne(a){me.current===a&&(q(se),q(me)),be.current===a&&(q(be),Gd._currentValue=z)}var V,X;function te(a){if(V===void 0)try{throw Error()}catch(d){var s=d.stack.trim().match(/\n( *(at )?)/);V=s&&s[1]||"",X=-1<d.stack.indexOf(`
|
||
at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||
`+V+a+X}var he=!1;function xe(a,s){if(!a||he)return"";he=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var v={DetermineComponentFrameRoot:function(){try{if(s){var Ne=function(){throw Error()};if(Object.defineProperty(Ne.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ne,[])}catch(Te){var Ee=Te}Reflect.construct(a,[],Ne)}else{try{Ne.call()}catch(Te){Ee=Te}a.call(Ne.prototype)}}else{try{throw Error()}catch(Te){Ee=Te}(Ne=a())&&typeof Ne.catch=="function"&&Ne.catch(function(){})}}catch(Te){if(Te&&Ee&&typeof Te.stack=="string")return[Te.stack,Ee.stack]}return[null,null]}};v.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var E=Object.getOwnPropertyDescriptor(v.DetermineComponentFrameRoot,"name");E&&E.configurable&&Object.defineProperty(v.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var A=v.DetermineComponentFrameRoot(),$=A[0],Z=A[1];if($&&Z){var fe=$.split(`
|
||
`),we=Z.split(`
|
||
`);for(E=v=0;v<fe.length&&!fe[v].includes("DetermineComponentFrameRoot");)v++;for(;E<we.length&&!we[E].includes("DetermineComponentFrameRoot");)E++;if(v===fe.length||E===we.length)for(v=fe.length-1,E=we.length-1;1<=v&&0<=E&&fe[v]!==we[E];)E--;for(;1<=v&&0<=E;v--,E--)if(fe[v]!==we[E]){if(v!==1||E!==1)do if(v--,E--,0>E||fe[v]!==we[E]){var je=`
|
||
`+fe[v].replace(" at new "," at ");return a.displayName&&je.includes("<anonymous>")&&(je=je.replace("<anonymous>",a.displayName)),je}while(1<=v&&0<=E);break}}}finally{he=!1,Error.prepareStackTrace=d}return(d=a?a.displayName||a.name:"")?te(d):""}function Le(a,s){switch(a.tag){case 26:case 27:case 5:return te(a.type);case 16:return te("Lazy");case 13:return a.child!==s&&s!==null?te("Suspense Fallback"):te("Suspense");case 19:return te("SuspenseList");case 0:case 15:return xe(a.type,!1);case 11:return xe(a.type.render,!1);case 1:return xe(a.type,!0);case 31:return te("Activity");default:return""}}function ke(a){try{var s="",d=null;do s+=Le(a,d),d=a,a=a.return;while(a);return s}catch(v){return`
|
||
Error generating stack: `+v.message+`
|
||
`+v.stack}}var We=Object.prototype.hasOwnProperty,Je=e.unstable_scheduleCallback,Ke=e.unstable_cancelCallback,at=e.unstable_shouldYield,zt=e.unstable_requestPaint,mt=e.unstable_now,Lt=e.unstable_getCurrentPriorityLevel,ht=e.unstable_ImmediatePriority,Qe=e.unstable_UserBlockingPriority,Rt=e.unstable_NormalPriority,vn=e.unstable_LowPriority,nt=e.unstable_IdlePriority,Hn=e.log,qn=e.unstable_setDisableYieldValue,Jt=null,Cn=null;function dr(a){if(typeof Hn=="function"&&qn(a),Cn&&typeof Cn.setStrictMode=="function")try{Cn.setStrictMode(Jt,a)}catch{}}var Gt=Math.clz32?Math.clz32:d1,Tl=Math.log,f1=Math.LN2;function d1(a){return a>>>=0,a===0?32:31-(Tl(a)/f1|0)|0}var jl=256,Ml=262144,Pl=4194304;function ro(a){var s=a&42;if(s!==0)return s;switch(a&-a){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:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function tc(a,s,d){var v=a.pendingLanes;if(v===0)return 0;var E=0,A=a.suspendedLanes,$=a.pingedLanes;a=a.warmLanes;var Z=v&134217727;return Z!==0?(v=Z&~A,v!==0?E=ro(v):($&=Z,$!==0?E=ro($):d||(d=Z&~a,d!==0&&(E=ro(d))))):(Z=v&~A,Z!==0?E=ro(Z):$!==0?E=ro($):d||(d=v&~a,d!==0&&(E=ro(d)))),E===0?0:s!==0&&s!==E&&(s&A)===0&&(A=E&-E,d=s&-s,A>=d||A===32&&(d&4194048)!==0)?s:E}function Nl(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function h1(a,s){switch(a){case 1:case 2:case 4:case 8:case 64:return s+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 s+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 Vm(){var a=Pl;return Pl<<=1,(Pl&62914560)===0&&(Pl=4194304),a}function Wf(a){for(var s=[],d=0;31>d;d++)s.push(a);return s}function io(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function m1(a,s,d,v,E,A){var $=a.pendingLanes;a.pendingLanes=d,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=d,a.entangledLanes&=d,a.errorRecoveryDisabledLanes&=d,a.shellSuspendCounter=0;var Z=a.entanglements,fe=a.expirationTimes,we=a.hiddenUpdates;for(d=$&~d;0<d;){var je=31-Gt(d),Ne=1<<je;Z[je]=0,fe[je]=-1;var Ee=we[je];if(Ee!==null)for(we[je]=null,je=0;je<Ee.length;je++){var Te=Ee[je];Te!==null&&(Te.lane&=-536870913)}d&=~Ne}v!==0&&Hm(a,v,0),A!==0&&E===0&&a.tag!==0&&(a.suspendedLanes|=A&~($&~s))}function Hm(a,s,d){a.pendingLanes|=s,a.suspendedLanes&=~s;var v=31-Gt(s);a.entangledLanes|=s,a.entanglements[v]=a.entanglements[v]|1073741824|d&261930}function qm(a,s){var d=a.entangledLanes|=s;for(a=a.entanglements;d;){var v=31-Gt(d),E=1<<v;E&s|a[v]&s&&(a[v]|=s),d&=~E}}function Gm(a,s){var d=s&-s;return d=(d&42)!==0?1:Vr(d),(d&(a.suspendedLanes|s))!==0?0:d}function Vr(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=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:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function Ge(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function Kf(){var a=I.p;return a!==0?a:(a=window.event,a===void 0?32:MO(a.type))}function Zf(a,s){var d=I.p;try{return I.p=a,s()}finally{I.p=d}}var ta=Math.random().toString(36).slice(2),Dn="__reactFiber$"+ta,ir="__reactProps$"+ta,ao="__reactContainer$"+ta,Aa="__reactEvents$"+ta,Ym="__reactListeners$"+ta,p1="__reactHandles$"+ta,Wm="__reactResources$"+ta,Ll="__reactMarker$"+ta;function Xf(a){delete a[Dn],delete a[ir],delete a[Aa],delete a[Ym],delete a[p1]}function oo(a){var s=a[Dn];if(s)return s;for(var d=a.parentNode;d;){if(s=d[ao]||d[Dn]){if(d=s.alternate,s.child!==null||d!==null&&d.child!==null)for(a=mO(a);a!==null;){if(d=a[Dn])return d;a=mO(a)}return s}a=d,d=a.parentNode}return null}function ls(a){if(a=a[Dn]||a[ao]){var s=a.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return a}return null}function Oa(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a.stateNode;throw Error(r(33))}function us(a){var s=a[Wm];return s||(s=a[Wm]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function kn(a){a[Ll]=!0}var Km=new Set,Zm={};function so(a,s){Ta(a,s),Ta(a+"Capture",s)}function Ta(a,s){for(Zm[a]=s,a=0;a<s.length;a++)Km.add(s[a])}var Rl=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]*$"),Qf={},Jf={};function Dl(a){return We.call(Jf,a)?!0:We.call(Qf,a)?!1:Rl.test(a)?Jf[a]=!0:(Qf[a]=!0,!1)}function pt(a,s,d){if(Dl(s))if(d===null)a.removeAttribute(s);else{switch(typeof d){case"undefined":case"function":case"symbol":a.removeAttribute(s);return;case"boolean":var v=s.toLowerCase().slice(0,5);if(v!=="data-"&&v!=="aria-"){a.removeAttribute(s);return}}a.setAttribute(s,""+d)}}function Ft(a,s,d){if(d===null)a.removeAttribute(s);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(s);return}a.setAttribute(s,""+d)}}function Hr(a,s,d,v){if(v===null)a.removeAttribute(d);else{switch(typeof v){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(d);return}a.setAttributeNS(s,d,""+v)}}function Gn(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function lo(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ed(a,s,d){var v=Object.getOwnPropertyDescriptor(a.constructor.prototype,s);if(!a.hasOwnProperty(s)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var E=v.get,A=v.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return E.call(this)},set:function($){d=""+$,A.call(this,$)}}),Object.defineProperty(a,s,{enumerable:v.enumerable}),{getValue:function(){return d},setValue:function($){d=""+$},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function ot(a){if(!a._valueTracker){var s=lo(a)?"checked":"value";a._valueTracker=ed(a,s,""+a[s])}}function un(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var d=s.getValue(),v="";return a&&(v=lo(a)?a.checked?"true":"false":a.value),a=v,a!==d?(s.setValue(a),!0):!1}function cs(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var nc=/[\n"\\]/g;function en(a){return a.replace(nc,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function td(a,s,d,v,E,A,$,Z){a.name="",$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"?a.type=$:a.removeAttribute("type"),s!=null?$==="number"?(s===0&&a.value===""||a.value!=s)&&(a.value=""+Gn(s)):a.value!==""+Gn(s)&&(a.value=""+Gn(s)):$!=="submit"&&$!=="reset"||a.removeAttribute("value"),s!=null?na(a,$,Gn(s)):d!=null?na(a,$,Gn(d)):v!=null&&a.removeAttribute("value"),E==null&&A!=null&&(a.defaultChecked=!!A),E!=null&&(a.checked=E&&typeof E!="function"&&typeof E!="symbol"),Z!=null&&typeof Z!="function"&&typeof Z!="symbol"&&typeof Z!="boolean"?a.name=""+Gn(Z):a.removeAttribute("name")}function kl(a,s,d,v,E,A,$,Z){if(A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(a.type=A),s!=null||d!=null){if(!(A!=="submit"&&A!=="reset"||s!=null)){ot(a);return}d=d!=null?""+Gn(d):"",s=s!=null?""+Gn(s):d,Z||s===a.value||(a.value=s),a.defaultValue=s}v=v??E,v=typeof v!="function"&&typeof v!="symbol"&&!!v,a.checked=Z?a.checked:!!v,a.defaultChecked=!!v,$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"&&(a.name=$),ot(a)}function na(a,s,d){s==="number"&&cs(a.ownerDocument)===a||a.defaultValue===""+d||(a.defaultValue=""+d)}function Yt(a,s,d,v){if(a=a.options,s){s={};for(var E=0;E<d.length;E++)s["$"+d[E]]=!0;for(d=0;d<a.length;d++)E=s.hasOwnProperty("$"+a[d].value),a[d].selected!==E&&(a[d].selected=E),E&&v&&(a[d].defaultSelected=!0)}else{for(d=""+Gn(d),s=null,E=0;E<a.length;E++){if(a[E].value===d){a[E].selected=!0,v&&(a[E].defaultSelected=!0);return}s!==null||a[E].disabled||(s=a[E])}s!==null&&(s.selected=!0)}}function ja(a,s,d){if(s!=null&&(s=""+Gn(s),s!==a.value&&(a.value=s),d==null)){a.defaultValue!==s&&(a.defaultValue=s);return}a.defaultValue=d!=null?""+Gn(d):""}function fs(a,s,d,v){if(s==null){if(v!=null){if(d!=null)throw Error(r(92));if(ue(v)){if(1<v.length)throw Error(r(93));v=v[0]}d=v}d==null&&(d=""),s=d}d=Gn(s),a.defaultValue=d,v=a.textContent,v===d&&v!==""&&v!==null&&(a.value=v),ot(a)}function Li(a,s){if(s){var d=a.firstChild;if(d&&d===a.lastChild&&d.nodeType===3){d.nodeValue=s;return}}a.textContent=s}var nd=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 ds(a,s,d){var v=s.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?v?a.setProperty(s,""):s==="float"?a.cssFloat="":a[s]="":v?a.setProperty(s,d):typeof d!="number"||d===0||nd.has(s)?s==="float"?a.cssFloat=d:a[s]=(""+d).trim():a[s]=d+"px"}function rc(a,s,d){if(s!=null&&typeof s!="object")throw Error(r(62));if(a=a.style,d!=null){for(var v in d)!d.hasOwnProperty(v)||s!=null&&s.hasOwnProperty(v)||(v.indexOf("--")===0?a.setProperty(v,""):v==="float"?a.cssFloat="":a[v]="");for(var E in s)v=s[E],s.hasOwnProperty(E)&&d[E]!==v&&ds(a,E,v)}else for(var A in s)s.hasOwnProperty(A)&&ds(a,A,s[A])}function Il(a){if(a.indexOf("-")===-1)return!1;switch(a){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 ic=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"]]),rd=/^[\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 hs(a){return rd.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function qr(){}var ac=null;function zl(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var ms=null,tt=null;function oi(a){var s=ls(a);if(s&&(a=s.stateNode)){var d=a[ir]||null;e:switch(a=s.stateNode,s.type){case"input":if(td(a,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),s=d.name,d.type==="radio"&&s!=null){for(d=a;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+en(""+s)+'"][type="radio"]'),s=0;s<d.length;s++){var v=d[s];if(v!==a&&v.form===a.form){var E=v[ir]||null;if(!E)throw Error(r(90));td(v,E.value,E.defaultValue,E.defaultValue,E.checked,E.defaultChecked,E.type,E.name)}}for(s=0;s<d.length;s++)v=d[s],v.form===a.form&&un(v)}break e;case"textarea":ja(a,d.value,d.defaultValue);break e;case"select":s=d.value,s!=null&&Yt(a,!!d.multiple,s,!1)}}}var kt=!1;function id(a,s,d){if(kt)return a(s,d);kt=!0;try{var v=a(s);return v}finally{if(kt=!1,(ms!==null||tt!==null)&&(Gp(),ms&&(s=ms,a=tt,tt=ms=null,oi(s),a)))for(s=0;s<a.length;s++)oi(a[s])}}function uo(a,s){var d=a.stateNode;if(d===null)return null;var v=d[ir]||null;if(v===null)return null;d=v[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(v=!v.disabled)||(a=a.type,v=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!v;break e;default:a=!1}if(a)return null;if(d&&typeof d!="function")throw Error(r(231,s,typeof d));return d}var si=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bl=!1;if(si)try{var li={};Object.defineProperty(li,"passive",{get:function(){Bl=!0}}),window.addEventListener("test",li,li),window.removeEventListener("test",li,li)}catch{Bl=!1}var Ri=null,co=null,En=null;function Ma(){if(En)return En;var a,s=co,d=s.length,v,E="value"in Ri?Ri.value:Ri.textContent,A=E.length;for(a=0;a<d&&s[a]===E[a];a++);var $=d-a;for(v=1;v<=$&&s[d-v]===E[A-v];v++);return En=E.slice(a,1<v?1-v:void 0)}function Ul(a){var s=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&s===13&&(a=13)):a=s,a===10&&(a=13),32<=a||a===13?a:0}function $l(){return!0}function Xm(){return!1}function hr(a){function s(d,v,E,A,$){this._reactName=d,this._targetInst=E,this.type=v,this.nativeEvent=A,this.target=$,this.currentTarget=null;for(var Z in a)a.hasOwnProperty(Z)&&(d=a[Z],this[Z]=d?d(A):A[Z]);return this.isDefaultPrevented=(A.defaultPrevented!=null?A.defaultPrevented:A.returnValue===!1)?$l:Xm,this.isPropagationStopped=Xm,this}return y(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=$l)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=$l)},persist:function(){},isPersistent:$l}),s}var ra={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},oc=hr(ra),ps=y({},ra,{view:0,detail:0}),_t=hr(ps),ad,Lr,ia,Fl=y({},ps,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fd,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==ia&&(ia&&a.type==="mousemove"?(ad=a.screenX-ia.screenX,Lr=a.screenY-ia.screenY):Lr=ad=0,ia=a),ad)},movementY:function(a){return"movementY"in a?a.movementY:Lr}}),Qm=hr(Fl),od=y({},Fl,{dataTransfer:0}),g1=hr(od),Jm=y({},ps,{relatedTarget:0}),sd=hr(Jm),v1=y({},ra,{animationName:0,elapsedTime:0,pseudoElement:0}),ld=hr(v1),y1=y({},ra,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),Di=hr(y1),b1=y({},ra,{data:0}),ud=hr(b1),Pa={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ep={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"},tp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function cd(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=tp[a])?!!s[a]:!1}function fd(){return cd}var np=y({},ps,{key:function(a){if(a.key){var s=Pa[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=Ul(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?ep[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fd,charCode:function(a){return a.type==="keypress"?Ul(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Ul(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),rp=hr(np),x1=y({},Fl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ip=hr(x1),dd=y({},ps,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fd}),_1=hr(dd),ap=y({},ra,{propertyName:0,elapsedTime:0,pseudoElement:0}),op=hr(ap),sc=y({},Fl,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),fo=hr(sc),w1=y({},ra,{newState:0,oldState:0}),Vl=hr(w1),Gr=[9,13,27,32],lc=si&&"CompositionEvent"in window,gs=null;si&&"documentMode"in document&&(gs=document.documentMode);var S1=si&&"TextEvent"in window&&!gs,uc=si&&(!lc||gs&&8<gs&&11>=gs),cc=" ",sp=!1;function lp(a,s){switch(a){case"keyup":return Gr.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hd(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var vs=!1;function ui(a,s){switch(a){case"compositionend":return hd(s);case"keypress":return s.which!==32?null:(sp=!0,cc);case"textInput":return a=s.data,a===cc&&sp?null:a;default:return null}}function ys(a,s){if(vs)return a==="compositionend"||!lc&&lp(a,s)?(a=Ma(),En=co=Ri=null,vs=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return uc&&s.locale!=="ko"?null:s.data;default:return null}}var C1={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 ki(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!C1[a.type]:s==="textarea"}function up(a,s,d,v){ms?tt?tt.push(v):tt=[v]:ms=v,s=Jp(s,"onChange"),0<s.length&&(d=new oc("onChange","change",null,d,v),a.push({event:d,listeners:s}))}var Ii=null,Hl=null;function ql(a){eO(a,0)}function Gl(a){var s=Oa(a);if(un(s))return a}function Yl(a,s){if(a==="change")return s}var cp=!1;if(si){var zi;if(si){var bs="oninput"in document;if(!bs){var fp=document.createElement("div");fp.setAttribute("oninput","return;"),bs=typeof fp.oninput=="function"}zi=bs}else zi=!1;cp=zi&&(!document.documentMode||9<document.documentMode)}function fc(){Ii&&(Ii.detachEvent("onpropertychange",dp),Hl=Ii=null)}function dp(a){if(a.propertyName==="value"&&Gl(Hl)){var s=[];up(s,Hl,a,zl(a)),id(ql,s)}}function aa(a,s,d){a==="focusin"?(fc(),Ii=s,Hl=d,Ii.attachEvent("onpropertychange",dp)):a==="focusout"&&fc()}function E1(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Gl(Hl)}function xs(a,s){if(a==="click")return Gl(s)}function A1(a,s){if(a==="input"||a==="change")return Gl(s)}function oa(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var ar=typeof Object.is=="function"?Object.is:oa;function _s(a,s){if(ar(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var d=Object.keys(a),v=Object.keys(s);if(d.length!==v.length)return!1;for(v=0;v<d.length;v++){var E=d[v];if(!We.call(s,E)||!ar(a[E],s[E]))return!1}return!0}function dc(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Wl(a,s){var d=dc(a);a=0;for(var v;d;){if(d.nodeType===3){if(v=a+d.textContent.length,a<=s&&v>=s)return{node:d,offset:s-a};a=v}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=dc(d)}}function hc(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?hc(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function Kl(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=cs(a.document);s instanceof a.HTMLIFrameElement;){try{var d=typeof s.contentWindow.location.href=="string"}catch{d=!1}if(d)a=s.contentWindow;else break;s=cs(a.document)}return s}function Na(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s&&(s==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||s==="textarea"||a.contentEditable==="true")}var mc=si&&"documentMode"in document&&11>=document.documentMode,La=null,pc=null,Zl=null,ws=!1;function hp(a,s,d){var v=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;ws||La==null||La!==cs(v)||(v=La,"selectionStart"in v&&Na(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),Zl&&_s(Zl,v)||(Zl=v,v=Jp(pc,"onSelect"),0<v.length&&(s=new oc("onSelect","select",null,s,d),a.push({event:s,listeners:v}),s.target=La)))}function Ra(a,s){var d={};return d[a.toLowerCase()]=s.toLowerCase(),d["Webkit"+a]="webkit"+s,d["Moz"+a]="moz"+s,d}var Ss={animationend:Ra("Animation","AnimationEnd"),animationiteration:Ra("Animation","AnimationIteration"),animationstart:Ra("Animation","AnimationStart"),transitionrun:Ra("Transition","TransitionRun"),transitionstart:Ra("Transition","TransitionStart"),transitioncancel:Ra("Transition","TransitionCancel"),transitionend:Ra("Transition","TransitionEnd")},gc={},mp={};si&&(mp=document.createElement("div").style,"AnimationEvent"in window||(delete Ss.animationend.animation,delete Ss.animationiteration.animation,delete Ss.animationstart.animation),"TransitionEvent"in window||delete Ss.transitionend.transition);function or(a){if(gc[a])return gc[a];if(!Ss[a])return a;var s=Ss[a],d;for(d in s)if(s.hasOwnProperty(d)&&d in mp)return gc[a]=s[d];return a}var Xl=or("animationend"),pp=or("animationiteration"),Ql=or("animationstart"),O1=or("transitionrun"),gp=or("transitionstart"),T1=or("transitioncancel"),Cs=or("transitionend"),vp=new Map,Da="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(" ");Da.push("scrollEnd");function Yr(a,s){vp.set(a,s),so(s,[a])}var Jl=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},Wr=[],Sr=0,vc=0;function eu(){for(var a=Sr,s=vc=Sr=0;s<a;){var d=Wr[s];Wr[s++]=null;var v=Wr[s];Wr[s++]=null;var E=Wr[s];Wr[s++]=null;var A=Wr[s];if(Wr[s++]=null,v!==null&&E!==null){var $=v.pending;$===null?E.next=E:(E.next=$.next,$.next=E),v.pending=E}A!==0&&Es(d,E,A)}}function ka(a,s,d,v){Wr[Sr++]=a,Wr[Sr++]=s,Wr[Sr++]=d,Wr[Sr++]=v,vc|=v,a.lanes|=v,a=a.alternate,a!==null&&(a.lanes|=v)}function md(a,s,d,v){return ka(a,s,d,v),tu(a)}function Bi(a,s){return ka(a,null,null,s),tu(a)}function Es(a,s,d){a.lanes|=d;var v=a.alternate;v!==null&&(v.lanes|=d);for(var E=!1,A=a.return;A!==null;)A.childLanes|=d,v=A.alternate,v!==null&&(v.childLanes|=d),A.tag===22&&(a=A.stateNode,a===null||a._visibility&1||(E=!0)),a=A,A=A.return;return a.tag===3?(A=a.stateNode,E&&s!==null&&(E=31-Gt(d),a=A.hiddenUpdates,v=a[E],v===null?a[E]=[s]:v.push(s),s.lane=d|536870912),A):null}function tu(a){if(50<Bd)throw Bd=0,Mb=null,Error(r(185));for(var s=a.return;s!==null;)a=s,s=a.return;return a.tag===3?a.stateNode:null}var ho={};function j1(a,s,d,v){this.tag=a,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Cr(a,s,d,v){return new j1(a,s,d,v)}function yc(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Ui(a,s){var d=a.alternate;return d===null?(d=Cr(a.tag,s,a.key,a.mode),d.elementType=a.elementType,d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=s,d.type=a.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=a.flags&65011712,d.childLanes=a.childLanes,d.lanes=a.lanes,d.child=a.child,d.memoizedProps=a.memoizedProps,d.memoizedState=a.memoizedState,d.updateQueue=a.updateQueue,s=a.dependencies,d.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},d.sibling=a.sibling,d.index=a.index,d.ref=a.ref,d.refCleanup=a.refCleanup,d}function pd(a,s){a.flags&=65011714;var d=a.alternate;return d===null?(a.childLanes=0,a.lanes=s,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=d.childLanes,a.lanes=d.lanes,a.child=d.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=d.memoizedProps,a.memoizedState=d.memoizedState,a.updateQueue=d.updateQueue,a.type=d.type,s=d.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),a}function nu(a,s,d,v,E,A){var $=0;if(v=a,typeof a=="function")yc(a)&&($=1);else if(typeof a=="string")$=d$(a,d,se.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case ce:return a=Cr(31,d,s,E),a.elementType=ce,a.lanes=A,a;case C:return mo(d.children,E,A,s);case O:$=8,E|=24;break;case T:return a=Cr(12,d,s,E|2),a.elementType=T,a.lanes=A,a;case B:return a=Cr(13,d,s,E),a.elementType=B,a.lanes=A,a;case W:return a=Cr(19,d,s,E),a.elementType=W,a.lanes=A,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case N:$=10;break e;case P:$=9;break e;case F:$=11;break e;case Q:$=14;break e;case re:$=16,v=null;break e}$=29,d=Error(r(130,a===null?"null":typeof a,"")),v=null}return s=Cr($,d,s,E),s.elementType=a,s.type=v,s.lanes=A,s}function mo(a,s,d,v){return a=Cr(7,a,v,s),a.lanes=d,a}function bc(a,s,d){return a=Cr(6,a,null,s),a.lanes=d,a}function gd(a){var s=Cr(18,null,null,0);return s.stateNode=a,s}function vd(a,s,d){return s=Cr(4,a.children!==null?a.children:[],a.key,s),s.lanes=d,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}var u=new WeakMap;function p(a,s){if(typeof a=="object"&&a!==null){var d=u.get(a);return d!==void 0?d:(s={value:a,source:s,stack:ke(s)},u.set(a,s),s)}return{value:a,source:s,stack:ke(s)}}var S=[],j=0,U=null,K=0,le=[],ye=0,Ce=null,Pe=1,Be="";function Ye(a,s){S[j++]=K,S[j++]=U,U=a,K=s}function ct(a,s,d){le[ye++]=Pe,le[ye++]=Be,le[ye++]=Ce,Ce=a;var v=Pe;a=Be;var E=32-Gt(v)-1;v&=~(1<<E),d+=1;var A=32-Gt(s)+E;if(30<A){var $=E-E%5;A=(v&(1<<$)-1).toString(32),v>>=$,E-=$,Pe=1<<32-Gt(s)+E|d<<E|v,Be=A+a}else Pe=1<<A|d<<E|v,Be=a}function Yn(a){a.return!==null&&(Ye(a,1),ct(a,1,0))}function An(a){for(;a===U;)U=S[--j],S[j]=null,K=S[--j],S[j]=null;for(;a===Ce;)Ce=le[--ye],le[ye]=null,Be=le[--ye],le[ye]=null,Pe=le[--ye],le[ye]=null}function Rr(a,s){le[ye++]=Pe,le[ye++]=Be,le[ye++]=Ce,Pe=s.id,Be=s.overflow,Ce=a}var Tt=null,jt=null,gt=!1,Ia=null,Kr=!1,xc=Error(r(519));function za(a){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ru(p(s,a)),xc}function yd(a){var s=a.stateNode,d=a.type,v=a.memoizedProps;switch(s[Dn]=a,s[ir]=v,d){case"dialog":yt("cancel",s),yt("close",s);break;case"iframe":case"object":case"embed":yt("load",s);break;case"video":case"audio":for(d=0;d<$d.length;d++)yt($d[d],s);break;case"source":yt("error",s);break;case"img":case"image":case"link":yt("error",s),yt("load",s);break;case"details":yt("toggle",s);break;case"input":yt("invalid",s),kl(s,v.value,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name,!0);break;case"select":yt("invalid",s);break;case"textarea":yt("invalid",s),fs(s,v.value,v.defaultValue,v.children)}d=v.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||s.textContent===""+d||v.suppressHydrationWarning===!0||iO(s.textContent,d)?(v.popover!=null&&(yt("beforetoggle",s),yt("toggle",s)),v.onScroll!=null&&yt("scroll",s),v.onScrollEnd!=null&&yt("scrollend",s),v.onClick!=null&&(s.onclick=qr),s=!0):s=!1,s||za(a,!0)}function yn(a){for(Tt=a.return;Tt;)switch(Tt.tag){case 5:case 31:case 13:Kr=!1;return;case 27:case 3:Kr=!0;return;default:Tt=Tt.return}}function sa(a){if(a!==Tt)return!1;if(!gt)return yn(a),gt=!0,!1;var s=a.tag,d;if((d=s!==3&&s!==27)&&((d=s===5)&&(d=a.type,d=!(d!=="form"&&d!=="button")||qb(a.type,a.memoizedProps)),d=!d),d&&jt&&za(a),yn(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));jt=hO(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));jt=hO(a)}else s===27?(s=jt,Bs(a.type)?(a=Zb,Zb=null,jt=a):jt=s):jt=Tt?Fi(a.stateNode.nextSibling):null;return!0}function po(){jt=Tt=null,gt=!1}function bd(){var a=Ia;return a!==null&&(Jr===null?Jr=a:Jr.push.apply(Jr,a),Ia=null),a}function ru(a){Ia===null?Ia=[a]:Ia.push(a)}var iu=M(null),Ba=null,la=null;function As(a,s,d){ee(iu,s._currentValue),s._currentValue=d}function go(a){a._currentValue=iu.current,q(iu)}function M1(a,s,d){for(;a!==null;){var v=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,v!==null&&(v.childLanes|=s)):v!==null&&(v.childLanes&s)!==s&&(v.childLanes|=s),a===d)break;a=a.return}}function P1(a,s,d,v){var E=a.child;for(E!==null&&(E.return=a);E!==null;){var A=E.dependencies;if(A!==null){var $=E.child;A=A.firstContext;e:for(;A!==null;){var Z=A;A=E;for(var fe=0;fe<s.length;fe++)if(Z.context===s[fe]){A.lanes|=d,Z=A.alternate,Z!==null&&(Z.lanes|=d),M1(A.return,d,a),v||($=null);break e}A=Z.next}}else if(E.tag===18){if($=E.return,$===null)throw Error(r(341));$.lanes|=d,A=$.alternate,A!==null&&(A.lanes|=d),M1($,d,a),$=null}else $=E.child;if($!==null)$.return=E;else for($=E;$!==null;){if($===a){$=null;break}if(E=$.sibling,E!==null){E.return=$.return,$=E;break}$=$.return}E=$}}function _c(a,s,d,v){a=null;for(var E=s,A=!1;E!==null;){if(!A){if((E.flags&524288)!==0)A=!0;else if((E.flags&262144)!==0)break}if(E.tag===10){var $=E.alternate;if($===null)throw Error(r(387));if($=$.memoizedProps,$!==null){var Z=E.type;ar(E.pendingProps.value,$.value)||(a!==null?a.push(Z):a=[Z])}}else if(E===be.current){if($=E.alternate,$===null)throw Error(r(387));$.memoizedState.memoizedState!==E.memoizedState.memoizedState&&(a!==null?a.push(Gd):a=[Gd])}E=E.return}a!==null&&P1(s,a,d,v),s.flags|=262144}function yp(a){for(a=a.firstContext;a!==null;){if(!ar(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function au(a){Ba=a,la=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function mr(a){return V4(Ba,a)}function bp(a,s){return Ba===null&&au(a),V4(a,s)}function V4(a,s){var d=s._currentValue;if(s={context:s,memoizedValue:d,next:null},la===null){if(a===null)throw Error(r(308));la=s,a.dependencies={lanes:0,firstContext:s},a.flags|=524288}else la=la.next=s;return d}var lU=typeof AbortController<"u"?AbortController:function(){var a=[],s=this.signal={aborted:!1,addEventListener:function(d,v){a.push(v)}};this.abort=function(){s.aborted=!0,a.forEach(function(d){return d()})}},uU=e.unstable_scheduleCallback,cU=e.unstable_NormalPriority,In={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function N1(){return{controller:new lU,data:new Map,refCount:0}}function xd(a){a.refCount--,a.refCount===0&&uU(cU,function(){a.controller.abort()})}var _d=null,L1=0,wc=0,Sc=null;function fU(a,s){if(_d===null){var d=_d=[];L1=0,wc=kb(),Sc={status:"pending",value:void 0,then:function(v){d.push(v)}}}return L1++,s.then(H4,H4),s}function H4(){if(--L1===0&&_d!==null){Sc!==null&&(Sc.status="fulfilled");var a=_d;_d=null,wc=0,Sc=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function dU(a,s){var d=[],v={status:"pending",value:null,reason:null,then:function(E){d.push(E)}};return a.then(function(){v.status="fulfilled",v.value=s;for(var E=0;E<d.length;E++)(0,d[E])(s)},function(E){for(v.status="rejected",v.reason=E,E=0;E<d.length;E++)(0,d[E])(void 0)}),v}var q4=Y.S;Y.S=function(a,s){TA=mt(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&fU(a,s),q4!==null&&q4(a,s)};var ou=M(null);function R1(){var a=ou.current;return a!==null?a:Wt.pooledCache}function xp(a,s){s===null?ee(ou,ou.current):ee(ou,s.pool)}function G4(){var a=R1();return a===null?null:{parent:In._currentValue,pool:a}}var Cc=Error(r(460)),D1=Error(r(474)),_p=Error(r(542)),wp={then:function(){}};function Y4(a){return a=a.status,a==="fulfilled"||a==="rejected"}function W4(a,s,d){switch(d=a[d],d===void 0?a.push(s):d!==s&&(s.then(qr,qr),s=d),s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,Z4(a),a;default:if(typeof s.status=="string")s.then(qr,qr);else{if(a=Wt,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=s,a.status="pending",a.then(function(v){if(s.status==="pending"){var E=s;E.status="fulfilled",E.value=v}},function(v){if(s.status==="pending"){var E=s;E.status="rejected",E.reason=v}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,Z4(a),a}throw lu=s,Cc}}function su(a){try{var s=a._init;return s(a._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(lu=d,Cc):d}}var lu=null;function K4(){if(lu===null)throw Error(r(459));var a=lu;return lu=null,a}function Z4(a){if(a===Cc||a===_p)throw Error(r(483))}var Ec=null,wd=0;function Sp(a){var s=wd;return wd+=1,Ec===null&&(Ec=[]),W4(Ec,a,s)}function Sd(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function Cp(a,s){throw s.$$typeof===x?Error(r(525)):(a=Object.prototype.toString.call(s),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a)))}function X4(a){function s(ge,pe){if(a){var _e=ge.deletions;_e===null?(ge.deletions=[pe],ge.flags|=16):_e.push(pe)}}function d(ge,pe){if(!a)return null;for(;pe!==null;)s(ge,pe),pe=pe.sibling;return null}function v(ge){for(var pe=new Map;ge!==null;)ge.key!==null?pe.set(ge.key,ge):pe.set(ge.index,ge),ge=ge.sibling;return pe}function E(ge,pe){return ge=Ui(ge,pe),ge.index=0,ge.sibling=null,ge}function A(ge,pe,_e){return ge.index=_e,a?(_e=ge.alternate,_e!==null?(_e=_e.index,_e<pe?(ge.flags|=67108866,pe):_e):(ge.flags|=67108866,pe)):(ge.flags|=1048576,pe)}function $(ge){return a&&ge.alternate===null&&(ge.flags|=67108866),ge}function Z(ge,pe,_e,Me){return pe===null||pe.tag!==6?(pe=bc(_e,ge.mode,Me),pe.return=ge,pe):(pe=E(pe,_e),pe.return=ge,pe)}function fe(ge,pe,_e,Me){var Ze=_e.type;return Ze===C?je(ge,pe,_e.props.children,Me,_e.key):pe!==null&&(pe.elementType===Ze||typeof Ze=="object"&&Ze!==null&&Ze.$$typeof===re&&su(Ze)===pe.type)?(pe=E(pe,_e.props),Sd(pe,_e),pe.return=ge,pe):(pe=nu(_e.type,_e.key,_e.props,null,ge.mode,Me),Sd(pe,_e),pe.return=ge,pe)}function we(ge,pe,_e,Me){return pe===null||pe.tag!==4||pe.stateNode.containerInfo!==_e.containerInfo||pe.stateNode.implementation!==_e.implementation?(pe=vd(_e,ge.mode,Me),pe.return=ge,pe):(pe=E(pe,_e.children||[]),pe.return=ge,pe)}function je(ge,pe,_e,Me,Ze){return pe===null||pe.tag!==7?(pe=mo(_e,ge.mode,Me,Ze),pe.return=ge,pe):(pe=E(pe,_e),pe.return=ge,pe)}function Ne(ge,pe,_e){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return pe=bc(""+pe,ge.mode,_e),pe.return=ge,pe;if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case b:return _e=nu(pe.type,pe.key,pe.props,null,ge.mode,_e),Sd(_e,pe),_e.return=ge,_e;case w:return pe=vd(pe,ge.mode,_e),pe.return=ge,pe;case re:return pe=su(pe),Ne(ge,pe,_e)}if(ue(pe)||oe(pe))return pe=mo(pe,ge.mode,_e,null),pe.return=ge,pe;if(typeof pe.then=="function")return Ne(ge,Sp(pe),_e);if(pe.$$typeof===N)return Ne(ge,bp(ge,pe),_e);Cp(ge,pe)}return null}function Ee(ge,pe,_e,Me){var Ze=pe!==null?pe.key:null;if(typeof _e=="string"&&_e!==""||typeof _e=="number"||typeof _e=="bigint")return Ze!==null?null:Z(ge,pe,""+_e,Me);if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case b:return _e.key===Ze?fe(ge,pe,_e,Me):null;case w:return _e.key===Ze?we(ge,pe,_e,Me):null;case re:return _e=su(_e),Ee(ge,pe,_e,Me)}if(ue(_e)||oe(_e))return Ze!==null?null:je(ge,pe,_e,Me,null);if(typeof _e.then=="function")return Ee(ge,pe,Sp(_e),Me);if(_e.$$typeof===N)return Ee(ge,pe,bp(ge,_e),Me);Cp(ge,_e)}return null}function Te(ge,pe,_e,Me,Ze){if(typeof Me=="string"&&Me!==""||typeof Me=="number"||typeof Me=="bigint")return ge=ge.get(_e)||null,Z(pe,ge,""+Me,Ze);if(typeof Me=="object"&&Me!==null){switch(Me.$$typeof){case b:return ge=ge.get(Me.key===null?_e:Me.key)||null,fe(pe,ge,Me,Ze);case w:return ge=ge.get(Me.key===null?_e:Me.key)||null,we(pe,ge,Me,Ze);case re:return Me=su(Me),Te(ge,pe,_e,Me,Ze)}if(ue(Me)||oe(Me))return ge=ge.get(_e)||null,je(pe,ge,Me,Ze,null);if(typeof Me.then=="function")return Te(ge,pe,_e,Sp(Me),Ze);if(Me.$$typeof===N)return Te(ge,pe,_e,bp(pe,Me),Ze);Cp(pe,Me)}return null}function Fe(ge,pe,_e,Me){for(var Ze=null,Mt=null,qe=pe,ft=pe=0,St=null;qe!==null&&ft<_e.length;ft++){qe.index>ft?(St=qe,qe=null):St=qe.sibling;var Pt=Ee(ge,qe,_e[ft],Me);if(Pt===null){qe===null&&(qe=St);break}a&&qe&&Pt.alternate===null&&s(ge,qe),pe=A(Pt,pe,ft),Mt===null?Ze=Pt:Mt.sibling=Pt,Mt=Pt,qe=St}if(ft===_e.length)return d(ge,qe),gt&&Ye(ge,ft),Ze;if(qe===null){for(;ft<_e.length;ft++)qe=Ne(ge,_e[ft],Me),qe!==null&&(pe=A(qe,pe,ft),Mt===null?Ze=qe:Mt.sibling=qe,Mt=qe);return gt&&Ye(ge,ft),Ze}for(qe=v(qe);ft<_e.length;ft++)St=Te(qe,ge,ft,_e[ft],Me),St!==null&&(a&&St.alternate!==null&&qe.delete(St.key===null?ft:St.key),pe=A(St,pe,ft),Mt===null?Ze=St:Mt.sibling=St,Mt=St);return a&&qe.forEach(function(Hs){return s(ge,Hs)}),gt&&Ye(ge,ft),Ze}function et(ge,pe,_e,Me){if(_e==null)throw Error(r(151));for(var Ze=null,Mt=null,qe=pe,ft=pe=0,St=null,Pt=_e.next();qe!==null&&!Pt.done;ft++,Pt=_e.next()){qe.index>ft?(St=qe,qe=null):St=qe.sibling;var Hs=Ee(ge,qe,Pt.value,Me);if(Hs===null){qe===null&&(qe=St);break}a&&qe&&Hs.alternate===null&&s(ge,qe),pe=A(Hs,pe,ft),Mt===null?Ze=Hs:Mt.sibling=Hs,Mt=Hs,qe=St}if(Pt.done)return d(ge,qe),gt&&Ye(ge,ft),Ze;if(qe===null){for(;!Pt.done;ft++,Pt=_e.next())Pt=Ne(ge,Pt.value,Me),Pt!==null&&(pe=A(Pt,pe,ft),Mt===null?Ze=Pt:Mt.sibling=Pt,Mt=Pt);return gt&&Ye(ge,ft),Ze}for(qe=v(qe);!Pt.done;ft++,Pt=_e.next())Pt=Te(qe,ge,ft,Pt.value,Me),Pt!==null&&(a&&Pt.alternate!==null&&qe.delete(Pt.key===null?ft:Pt.key),pe=A(Pt,pe,ft),Mt===null?Ze=Pt:Mt.sibling=Pt,Mt=Pt);return a&&qe.forEach(function(S$){return s(ge,S$)}),gt&&Ye(ge,ft),Ze}function qt(ge,pe,_e,Me){if(typeof _e=="object"&&_e!==null&&_e.type===C&&_e.key===null&&(_e=_e.props.children),typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case b:e:{for(var Ze=_e.key;pe!==null;){if(pe.key===Ze){if(Ze=_e.type,Ze===C){if(pe.tag===7){d(ge,pe.sibling),Me=E(pe,_e.props.children),Me.return=ge,ge=Me;break e}}else if(pe.elementType===Ze||typeof Ze=="object"&&Ze!==null&&Ze.$$typeof===re&&su(Ze)===pe.type){d(ge,pe.sibling),Me=E(pe,_e.props),Sd(Me,_e),Me.return=ge,ge=Me;break e}d(ge,pe);break}else s(ge,pe);pe=pe.sibling}_e.type===C?(Me=mo(_e.props.children,ge.mode,Me,_e.key),Me.return=ge,ge=Me):(Me=nu(_e.type,_e.key,_e.props,null,ge.mode,Me),Sd(Me,_e),Me.return=ge,ge=Me)}return $(ge);case w:e:{for(Ze=_e.key;pe!==null;){if(pe.key===Ze)if(pe.tag===4&&pe.stateNode.containerInfo===_e.containerInfo&&pe.stateNode.implementation===_e.implementation){d(ge,pe.sibling),Me=E(pe,_e.children||[]),Me.return=ge,ge=Me;break e}else{d(ge,pe);break}else s(ge,pe);pe=pe.sibling}Me=vd(_e,ge.mode,Me),Me.return=ge,ge=Me}return $(ge);case re:return _e=su(_e),qt(ge,pe,_e,Me)}if(ue(_e))return Fe(ge,pe,_e,Me);if(oe(_e)){if(Ze=oe(_e),typeof Ze!="function")throw Error(r(150));return _e=Ze.call(_e),et(ge,pe,_e,Me)}if(typeof _e.then=="function")return qt(ge,pe,Sp(_e),Me);if(_e.$$typeof===N)return qt(ge,pe,bp(ge,_e),Me);Cp(ge,_e)}return typeof _e=="string"&&_e!==""||typeof _e=="number"||typeof _e=="bigint"?(_e=""+_e,pe!==null&&pe.tag===6?(d(ge,pe.sibling),Me=E(pe,_e),Me.return=ge,ge=Me):(d(ge,pe),Me=bc(_e,ge.mode,Me),Me.return=ge,ge=Me),$(ge)):d(ge,pe)}return function(ge,pe,_e,Me){try{wd=0;var Ze=qt(ge,pe,_e,Me);return Ec=null,Ze}catch(qe){if(qe===Cc||qe===_p)throw qe;var Mt=Cr(29,qe,null,ge.mode);return Mt.lanes=Me,Mt.return=ge,Mt}}}var uu=X4(!0),Q4=X4(!1),Os=!1;function k1(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function I1(a,s){a=a.updateQueue,s.updateQueue===a&&(s.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Ts(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function js(a,s,d){var v=a.updateQueue;if(v===null)return null;if(v=v.shared,(Dt&2)!==0){var E=v.pending;return E===null?s.next=s:(s.next=E.next,E.next=s),v.pending=s,s=tu(a),Es(a,null,d),s}return ka(a,v,s,d),tu(a)}function Cd(a,s,d){if(s=s.updateQueue,s!==null&&(s=s.shared,(d&4194048)!==0)){var v=s.lanes;v&=a.pendingLanes,d|=v,s.lanes=d,qm(a,d)}}function z1(a,s){var d=a.updateQueue,v=a.alternate;if(v!==null&&(v=v.updateQueue,d===v)){var E=null,A=null;if(d=d.firstBaseUpdate,d!==null){do{var $={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};A===null?E=A=$:A=A.next=$,d=d.next}while(d!==null);A===null?E=A=s:A=A.next=s}else E=A=s;d={baseState:v.baseState,firstBaseUpdate:E,lastBaseUpdate:A,shared:v.shared,callbacks:v.callbacks},a.updateQueue=d;return}a=d.lastBaseUpdate,a===null?d.firstBaseUpdate=s:a.next=s,d.lastBaseUpdate=s}var B1=!1;function Ed(){if(B1){var a=Sc;if(a!==null)throw a}}function Ad(a,s,d,v){B1=!1;var E=a.updateQueue;Os=!1;var A=E.firstBaseUpdate,$=E.lastBaseUpdate,Z=E.shared.pending;if(Z!==null){E.shared.pending=null;var fe=Z,we=fe.next;fe.next=null,$===null?A=we:$.next=we,$=fe;var je=a.alternate;je!==null&&(je=je.updateQueue,Z=je.lastBaseUpdate,Z!==$&&(Z===null?je.firstBaseUpdate=we:Z.next=we,je.lastBaseUpdate=fe))}if(A!==null){var Ne=E.baseState;$=0,je=we=fe=null,Z=A;do{var Ee=Z.lane&-536870913,Te=Ee!==Z.lane;if(Te?(wt&Ee)===Ee:(v&Ee)===Ee){Ee!==0&&Ee===wc&&(B1=!0),je!==null&&(je=je.next={lane:0,tag:Z.tag,payload:Z.payload,callback:null,next:null});e:{var Fe=a,et=Z;Ee=s;var qt=d;switch(et.tag){case 1:if(Fe=et.payload,typeof Fe=="function"){Ne=Fe.call(qt,Ne,Ee);break e}Ne=Fe;break e;case 3:Fe.flags=Fe.flags&-65537|128;case 0:if(Fe=et.payload,Ee=typeof Fe=="function"?Fe.call(qt,Ne,Ee):Fe,Ee==null)break e;Ne=y({},Ne,Ee);break e;case 2:Os=!0}}Ee=Z.callback,Ee!==null&&(a.flags|=64,Te&&(a.flags|=8192),Te=E.callbacks,Te===null?E.callbacks=[Ee]:Te.push(Ee))}else Te={lane:Ee,tag:Z.tag,payload:Z.payload,callback:Z.callback,next:null},je===null?(we=je=Te,fe=Ne):je=je.next=Te,$|=Ee;if(Z=Z.next,Z===null){if(Z=E.shared.pending,Z===null)break;Te=Z,Z=Te.next,Te.next=null,E.lastBaseUpdate=Te,E.shared.pending=null}}while(!0);je===null&&(fe=Ne),E.baseState=fe,E.firstBaseUpdate=we,E.lastBaseUpdate=je,A===null&&(E.shared.lanes=0),Rs|=$,a.lanes=$,a.memoizedState=Ne}}function J4(a,s){if(typeof a!="function")throw Error(r(191,a));a.call(s)}function eE(a,s){var d=a.callbacks;if(d!==null)for(a.callbacks=null,a=0;a<d.length;a++)J4(d[a],s)}var Ac=M(null),Ep=M(0);function tE(a,s){a=Eo,ee(Ep,a),ee(Ac,s),Eo=a|s.baseLanes}function U1(){ee(Ep,Eo),ee(Ac,Ac.current)}function $1(){Eo=Ep.current,q(Ac),q(Ep)}var ci=M(null),$i=null;function Ms(a){var s=a.alternate;ee(Mn,Mn.current&1),ee(ci,a),$i===null&&(s===null||Ac.current!==null||s.memoizedState!==null)&&($i=a)}function F1(a){ee(Mn,Mn.current),ee(ci,a),$i===null&&($i=a)}function nE(a){a.tag===22?(ee(Mn,Mn.current),ee(ci,a),$i===null&&($i=a)):Ps()}function Ps(){ee(Mn,Mn.current),ee(ci,ci.current)}function fi(a){q(ci),$i===a&&($i=null),q(Mn)}var Mn=M(0);function Ap(a){for(var s=a;s!==null;){if(s.tag===13){var d=s.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||Wb(d)||Kb(d)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var vo=0,ut=null,Vt=null,zn=null,Op=!1,Oc=!1,cu=!1,Tp=0,Od=0,Tc=null,hU=0;function On(){throw Error(r(321))}function V1(a,s){if(s===null)return!1;for(var d=0;d<s.length&&d<a.length;d++)if(!ar(a[d],s[d]))return!1;return!0}function H1(a,s,d,v,E,A){return vo=A,ut=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Y.H=a===null||a.memoizedState===null?BE:ab,cu=!1,A=d(v,E),cu=!1,Oc&&(A=iE(s,d,v,E)),rE(a),A}function rE(a){Y.H=Md;var s=Vt!==null&&Vt.next!==null;if(vo=0,zn=Vt=ut=null,Op=!1,Od=0,Tc=null,s)throw Error(r(300));a===null||Bn||(a=a.dependencies,a!==null&&yp(a)&&(Bn=!0))}function iE(a,s,d,v){ut=a;var E=0;do{if(Oc&&(Tc=null),Od=0,Oc=!1,25<=E)throw Error(r(301));if(E+=1,zn=Vt=null,a.updateQueue!=null){var A=a.updateQueue;A.lastEffect=null,A.events=null,A.stores=null,A.memoCache!=null&&(A.memoCache.index=0)}Y.H=UE,A=s(d,v)}while(Oc);return A}function mU(){var a=Y.H,s=a.useState()[0];return s=typeof s.then=="function"?Td(s):s,a=a.useState()[0],(Vt!==null?Vt.memoizedState:null)!==a&&(ut.flags|=1024),s}function q1(){var a=Tp!==0;return Tp=0,a}function G1(a,s,d){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~d}function Y1(a){if(Op){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}Op=!1}vo=0,zn=Vt=ut=null,Oc=!1,Od=Tp=0,Tc=null}function Dr(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zn===null?ut.memoizedState=zn=a:zn=zn.next=a,zn}function Pn(){if(Vt===null){var a=ut.alternate;a=a!==null?a.memoizedState:null}else a=Vt.next;var s=zn===null?ut.memoizedState:zn.next;if(s!==null)zn=s,Vt=a;else{if(a===null)throw ut.alternate===null?Error(r(467)):Error(r(310));Vt=a,a={memoizedState:Vt.memoizedState,baseState:Vt.baseState,baseQueue:Vt.baseQueue,queue:Vt.queue,next:null},zn===null?ut.memoizedState=zn=a:zn=zn.next=a}return zn}function jp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Td(a){var s=Od;return Od+=1,Tc===null&&(Tc=[]),a=W4(Tc,a,s),s=ut,(zn===null?s.memoizedState:zn.next)===null&&(s=s.alternate,Y.H=s===null||s.memoizedState===null?BE:ab),a}function Mp(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return Td(a);if(a.$$typeof===N)return mr(a)}throw Error(r(438,String(a)))}function W1(a){var s=null,d=ut.updateQueue;if(d!==null&&(s=d.memoCache),s==null){var v=ut.alternate;v!==null&&(v=v.updateQueue,v!==null&&(v=v.memoCache,v!=null&&(s={data:v.data.map(function(E){return E.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),d===null&&(d=jp(),ut.updateQueue=d),d.memoCache=s,d=s.data[s.index],d===void 0)for(d=s.data[s.index]=Array(a),v=0;v<a;v++)d[v]=ae;return s.index++,d}function yo(a,s){return typeof s=="function"?s(a):s}function Pp(a){var s=Pn();return K1(s,Vt,a)}function K1(a,s,d){var v=a.queue;if(v===null)throw Error(r(311));v.lastRenderedReducer=d;var E=a.baseQueue,A=v.pending;if(A!==null){if(E!==null){var $=E.next;E.next=A.next,A.next=$}s.baseQueue=E=A,v.pending=null}if(A=a.baseState,E===null)a.memoizedState=A;else{s=E.next;var Z=$=null,fe=null,we=s,je=!1;do{var Ne=we.lane&-536870913;if(Ne!==we.lane?(wt&Ne)===Ne:(vo&Ne)===Ne){var Ee=we.revertLane;if(Ee===0)fe!==null&&(fe=fe.next={lane:0,revertLane:0,gesture:null,action:we.action,hasEagerState:we.hasEagerState,eagerState:we.eagerState,next:null}),Ne===wc&&(je=!0);else if((vo&Ee)===Ee){we=we.next,Ee===wc&&(je=!0);continue}else Ne={lane:0,revertLane:we.revertLane,gesture:null,action:we.action,hasEagerState:we.hasEagerState,eagerState:we.eagerState,next:null},fe===null?(Z=fe=Ne,$=A):fe=fe.next=Ne,ut.lanes|=Ee,Rs|=Ee;Ne=we.action,cu&&d(A,Ne),A=we.hasEagerState?we.eagerState:d(A,Ne)}else Ee={lane:Ne,revertLane:we.revertLane,gesture:we.gesture,action:we.action,hasEagerState:we.hasEagerState,eagerState:we.eagerState,next:null},fe===null?(Z=fe=Ee,$=A):fe=fe.next=Ee,ut.lanes|=Ne,Rs|=Ne;we=we.next}while(we!==null&&we!==s);if(fe===null?$=A:fe.next=Z,!ar(A,a.memoizedState)&&(Bn=!0,je&&(d=Sc,d!==null)))throw d;a.memoizedState=A,a.baseState=$,a.baseQueue=fe,v.lastRenderedState=A}return E===null&&(v.lanes=0),[a.memoizedState,v.dispatch]}function Z1(a){var s=Pn(),d=s.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=a;var v=d.dispatch,E=d.pending,A=s.memoizedState;if(E!==null){d.pending=null;var $=E=E.next;do A=a(A,$.action),$=$.next;while($!==E);ar(A,s.memoizedState)||(Bn=!0),s.memoizedState=A,s.baseQueue===null&&(s.baseState=A),d.lastRenderedState=A}return[A,v]}function aE(a,s,d){var v=ut,E=Pn(),A=gt;if(A){if(d===void 0)throw Error(r(407));d=d()}else d=s();var $=!ar((Vt||E).memoizedState,d);if($&&(E.memoizedState=d,Bn=!0),E=E.queue,J1(lE.bind(null,v,E,a),[a]),E.getSnapshot!==s||$||zn!==null&&zn.memoizedState.tag&1){if(v.flags|=2048,jc(9,{destroy:void 0},sE.bind(null,v,E,d,s),null),Wt===null)throw Error(r(349));A||(vo&127)!==0||oE(v,s,d)}return d}function oE(a,s,d){a.flags|=16384,a={getSnapshot:s,value:d},s=ut.updateQueue,s===null?(s=jp(),ut.updateQueue=s,s.stores=[a]):(d=s.stores,d===null?s.stores=[a]:d.push(a))}function sE(a,s,d,v){s.value=d,s.getSnapshot=v,uE(s)&&cE(a)}function lE(a,s,d){return d(function(){uE(s)&&cE(a)})}function uE(a){var s=a.getSnapshot;a=a.value;try{var d=s();return!ar(a,d)}catch{return!0}}function cE(a){var s=Bi(a,2);s!==null&&ei(s,a,2)}function X1(a){var s=Dr();if(typeof a=="function"){var d=a;if(a=d(),cu){dr(!0);try{d()}finally{dr(!1)}}}return s.memoizedState=s.baseState=a,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yo,lastRenderedState:a},s}function fE(a,s,d,v){return a.baseState=d,K1(a,Vt,typeof v=="function"?v:yo)}function pU(a,s,d,v,E){if(Rp(a))throw Error(r(485));if(a=s.action,a!==null){var A={payload:E,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function($){A.listeners.push($)}};Y.T!==null?d(!0):A.isTransition=!1,v(A),d=s.pending,d===null?(A.next=s.pending=A,dE(s,A)):(A.next=d.next,s.pending=d.next=A)}}function dE(a,s){var d=s.action,v=s.payload,E=a.state;if(s.isTransition){var A=Y.T,$={};Y.T=$;try{var Z=d(E,v),fe=Y.S;fe!==null&&fe($,Z),hE(a,s,Z)}catch(we){Q1(a,s,we)}finally{A!==null&&$.types!==null&&(A.types=$.types),Y.T=A}}else try{A=d(E,v),hE(a,s,A)}catch(we){Q1(a,s,we)}}function hE(a,s,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(v){mE(a,s,v)},function(v){return Q1(a,s,v)}):mE(a,s,d)}function mE(a,s,d){s.status="fulfilled",s.value=d,pE(s),a.state=d,s=a.pending,s!==null&&(d=s.next,d===s?a.pending=null:(d=d.next,s.next=d,dE(a,d)))}function Q1(a,s,d){var v=a.pending;if(a.pending=null,v!==null){v=v.next;do s.status="rejected",s.reason=d,pE(s),s=s.next;while(s!==v)}a.action=null}function pE(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function gE(a,s){return s}function vE(a,s){if(gt){var d=Wt.formState;if(d!==null){e:{var v=ut;if(gt){if(jt){t:{for(var E=jt,A=Kr;E.nodeType!==8;){if(!A){E=null;break t}if(E=Fi(E.nextSibling),E===null){E=null;break t}}A=E.data,E=A==="F!"||A==="F"?E:null}if(E){jt=Fi(E.nextSibling),v=E.data==="F!";break e}}za(v)}v=!1}v&&(s=d[0])}}return d=Dr(),d.memoizedState=d.baseState=s,v={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gE,lastRenderedState:s},d.queue=v,d=kE.bind(null,ut,v),v.dispatch=d,v=X1(!1),A=ib.bind(null,ut,!1,v.queue),v=Dr(),E={state:s,dispatch:null,action:a,pending:null},v.queue=E,d=pU.bind(null,ut,E,A,d),E.dispatch=d,v.memoizedState=a,[s,d,!1]}function yE(a){var s=Pn();return bE(s,Vt,a)}function bE(a,s,d){if(s=K1(a,s,gE)[0],a=Pp(yo)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var v=Td(s)}catch($){throw $===Cc?_p:$}else v=s;s=Pn();var E=s.queue,A=E.dispatch;return d!==s.memoizedState&&(ut.flags|=2048,jc(9,{destroy:void 0},gU.bind(null,E,d),null)),[v,A,a]}function gU(a,s){a.action=s}function xE(a){var s=Pn(),d=Vt;if(d!==null)return bE(s,d,a);Pn(),s=s.memoizedState,d=Pn();var v=d.queue.dispatch;return d.memoizedState=a,[s,v,!1]}function jc(a,s,d,v){return a={tag:a,create:d,deps:v,inst:s,next:null},s=ut.updateQueue,s===null&&(s=jp(),ut.updateQueue=s),d=s.lastEffect,d===null?s.lastEffect=a.next=a:(v=d.next,d.next=a,a.next=v,s.lastEffect=a),a}function _E(){return Pn().memoizedState}function Np(a,s,d,v){var E=Dr();ut.flags|=a,E.memoizedState=jc(1|s,{destroy:void 0},d,v===void 0?null:v)}function Lp(a,s,d,v){var E=Pn();v=v===void 0?null:v;var A=E.memoizedState.inst;Vt!==null&&v!==null&&V1(v,Vt.memoizedState.deps)?E.memoizedState=jc(s,A,d,v):(ut.flags|=a,E.memoizedState=jc(1|s,A,d,v))}function wE(a,s){Np(8390656,8,a,s)}function J1(a,s){Lp(2048,8,a,s)}function vU(a){ut.flags|=4;var s=ut.updateQueue;if(s===null)s=jp(),ut.updateQueue=s,s.events=[a];else{var d=s.events;d===null?s.events=[a]:d.push(a)}}function SE(a){var s=Pn().memoizedState;return vU({ref:s,nextImpl:a}),function(){if((Dt&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function CE(a,s){return Lp(4,2,a,s)}function EE(a,s){return Lp(4,4,a,s)}function AE(a,s){if(typeof s=="function"){a=a();var d=s(a);return function(){typeof d=="function"?d():s(null)}}if(s!=null)return a=a(),s.current=a,function(){s.current=null}}function OE(a,s,d){d=d!=null?d.concat([a]):null,Lp(4,4,AE.bind(null,s,a),d)}function eb(){}function TE(a,s){var d=Pn();s=s===void 0?null:s;var v=d.memoizedState;return s!==null&&V1(s,v[1])?v[0]:(d.memoizedState=[a,s],a)}function jE(a,s){var d=Pn();s=s===void 0?null:s;var v=d.memoizedState;if(s!==null&&V1(s,v[1]))return v[0];if(v=a(),cu){dr(!0);try{a()}finally{dr(!1)}}return d.memoizedState=[v,s],v}function tb(a,s,d){return d===void 0||(vo&1073741824)!==0&&(wt&261930)===0?a.memoizedState=s:(a.memoizedState=d,a=MA(),ut.lanes|=a,Rs|=a,d)}function ME(a,s,d,v){return ar(d,s)?d:Ac.current!==null?(a=tb(a,d,v),ar(a,s)||(Bn=!0),a):(vo&42)===0||(vo&1073741824)!==0&&(wt&261930)===0?(Bn=!0,a.memoizedState=d):(a=MA(),ut.lanes|=a,Rs|=a,s)}function PE(a,s,d,v,E){var A=I.p;I.p=A!==0&&8>A?A:8;var $=Y.T,Z={};Y.T=Z,ib(a,!1,s,d);try{var fe=E(),we=Y.S;if(we!==null&&we(Z,fe),fe!==null&&typeof fe=="object"&&typeof fe.then=="function"){var je=dU(fe,v);jd(a,s,je,mi(a))}else jd(a,s,v,mi(a))}catch(Ne){jd(a,s,{then:function(){},status:"rejected",reason:Ne},mi())}finally{I.p=A,$!==null&&Z.types!==null&&($.types=Z.types),Y.T=$}}function yU(){}function nb(a,s,d,v){if(a.tag!==5)throw Error(r(476));var E=NE(a).queue;PE(a,E,s,z,d===null?yU:function(){return LE(a),d(v)})}function NE(a){var s=a.memoizedState;if(s!==null)return s;s={memoizedState:z,baseState:z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yo,lastRenderedState:z},next:null};var d={};return s.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yo,lastRenderedState:d},next:null},a.memoizedState=s,a=a.alternate,a!==null&&(a.memoizedState=s),s}function LE(a){var s=NE(a);s.next===null&&(s=a.alternate.memoizedState),jd(a,s.next.queue,{},mi())}function rb(){return mr(Gd)}function RE(){return Pn().memoizedState}function DE(){return Pn().memoizedState}function bU(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var d=mi();a=Ts(d);var v=js(s,a,d);v!==null&&(ei(v,s,d),Cd(v,s,d)),s={cache:N1()},a.payload=s;return}s=s.return}}function xU(a,s,d){var v=mi();d={lane:v,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Rp(a)?IE(s,d):(d=md(a,s,d,v),d!==null&&(ei(d,a,v),zE(d,s,v)))}function kE(a,s,d){var v=mi();jd(a,s,d,v)}function jd(a,s,d,v){var E={lane:v,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(Rp(a))IE(s,E);else{var A=a.alternate;if(a.lanes===0&&(A===null||A.lanes===0)&&(A=s.lastRenderedReducer,A!==null))try{var $=s.lastRenderedState,Z=A($,d);if(E.hasEagerState=!0,E.eagerState=Z,ar(Z,$))return ka(a,s,E,0),Wt===null&&eu(),!1}catch{}if(d=md(a,s,E,v),d!==null)return ei(d,a,v),zE(d,s,v),!0}return!1}function ib(a,s,d,v){if(v={lane:2,revertLane:kb(),gesture:null,action:v,hasEagerState:!1,eagerState:null,next:null},Rp(a)){if(s)throw Error(r(479))}else s=md(a,d,v,2),s!==null&&ei(s,a,2)}function Rp(a){var s=a.alternate;return a===ut||s!==null&&s===ut}function IE(a,s){Oc=Op=!0;var d=a.pending;d===null?s.next=s:(s.next=d.next,d.next=s),a.pending=s}function zE(a,s,d){if((d&4194048)!==0){var v=s.lanes;v&=a.pendingLanes,d|=v,s.lanes=d,qm(a,d)}}var Md={readContext:mr,use:Mp,useCallback:On,useContext:On,useEffect:On,useImperativeHandle:On,useLayoutEffect:On,useInsertionEffect:On,useMemo:On,useReducer:On,useRef:On,useState:On,useDebugValue:On,useDeferredValue:On,useTransition:On,useSyncExternalStore:On,useId:On,useHostTransitionStatus:On,useFormState:On,useActionState:On,useOptimistic:On,useMemoCache:On,useCacheRefresh:On};Md.useEffectEvent=On;var BE={readContext:mr,use:Mp,useCallback:function(a,s){return Dr().memoizedState=[a,s===void 0?null:s],a},useContext:mr,useEffect:wE,useImperativeHandle:function(a,s,d){d=d!=null?d.concat([a]):null,Np(4194308,4,AE.bind(null,s,a),d)},useLayoutEffect:function(a,s){return Np(4194308,4,a,s)},useInsertionEffect:function(a,s){Np(4,2,a,s)},useMemo:function(a,s){var d=Dr();s=s===void 0?null:s;var v=a();if(cu){dr(!0);try{a()}finally{dr(!1)}}return d.memoizedState=[v,s],v},useReducer:function(a,s,d){var v=Dr();if(d!==void 0){var E=d(s);if(cu){dr(!0);try{d(s)}finally{dr(!1)}}}else E=s;return v.memoizedState=v.baseState=E,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:E},v.queue=a,a=a.dispatch=xU.bind(null,ut,a),[v.memoizedState,a]},useRef:function(a){var s=Dr();return a={current:a},s.memoizedState=a},useState:function(a){a=X1(a);var s=a.queue,d=kE.bind(null,ut,s);return s.dispatch=d,[a.memoizedState,d]},useDebugValue:eb,useDeferredValue:function(a,s){var d=Dr();return tb(d,a,s)},useTransition:function(){var a=X1(!1);return a=PE.bind(null,ut,a.queue,!0,!1),Dr().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,d){var v=ut,E=Dr();if(gt){if(d===void 0)throw Error(r(407));d=d()}else{if(d=s(),Wt===null)throw Error(r(349));(wt&127)!==0||oE(v,s,d)}E.memoizedState=d;var A={value:d,getSnapshot:s};return E.queue=A,wE(lE.bind(null,v,A,a),[a]),v.flags|=2048,jc(9,{destroy:void 0},sE.bind(null,v,A,d,s),null),d},useId:function(){var a=Dr(),s=Wt.identifierPrefix;if(gt){var d=Be,v=Pe;d=(v&~(1<<32-Gt(v)-1)).toString(32)+d,s="_"+s+"R_"+d,d=Tp++,0<d&&(s+="H"+d.toString(32)),s+="_"}else d=hU++,s="_"+s+"r_"+d.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:rb,useFormState:vE,useActionState:vE,useOptimistic:function(a){var s=Dr();s.memoizedState=s.baseState=a;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=d,s=ib.bind(null,ut,!0,d),d.dispatch=s,[a,s]},useMemoCache:W1,useCacheRefresh:function(){return Dr().memoizedState=bU.bind(null,ut)},useEffectEvent:function(a){var s=Dr(),d={impl:a};return s.memoizedState=d,function(){if((Dt&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},ab={readContext:mr,use:Mp,useCallback:TE,useContext:mr,useEffect:J1,useImperativeHandle:OE,useInsertionEffect:CE,useLayoutEffect:EE,useMemo:jE,useReducer:Pp,useRef:_E,useState:function(){return Pp(yo)},useDebugValue:eb,useDeferredValue:function(a,s){var d=Pn();return ME(d,Vt.memoizedState,a,s)},useTransition:function(){var a=Pp(yo)[0],s=Pn().memoizedState;return[typeof a=="boolean"?a:Td(a),s]},useSyncExternalStore:aE,useId:RE,useHostTransitionStatus:rb,useFormState:yE,useActionState:yE,useOptimistic:function(a,s){var d=Pn();return fE(d,Vt,a,s)},useMemoCache:W1,useCacheRefresh:DE};ab.useEffectEvent=SE;var UE={readContext:mr,use:Mp,useCallback:TE,useContext:mr,useEffect:J1,useImperativeHandle:OE,useInsertionEffect:CE,useLayoutEffect:EE,useMemo:jE,useReducer:Z1,useRef:_E,useState:function(){return Z1(yo)},useDebugValue:eb,useDeferredValue:function(a,s){var d=Pn();return Vt===null?tb(d,a,s):ME(d,Vt.memoizedState,a,s)},useTransition:function(){var a=Z1(yo)[0],s=Pn().memoizedState;return[typeof a=="boolean"?a:Td(a),s]},useSyncExternalStore:aE,useId:RE,useHostTransitionStatus:rb,useFormState:xE,useActionState:xE,useOptimistic:function(a,s){var d=Pn();return Vt!==null?fE(d,Vt,a,s):(d.baseState=a,[a,d.queue.dispatch])},useMemoCache:W1,useCacheRefresh:DE};UE.useEffectEvent=SE;function ob(a,s,d,v){s=a.memoizedState,d=d(v,s),d=d==null?s:y({},s,d),a.memoizedState=d,a.lanes===0&&(a.updateQueue.baseState=d)}var sb={enqueueSetState:function(a,s,d){a=a._reactInternals;var v=mi(),E=Ts(v);E.payload=s,d!=null&&(E.callback=d),s=js(a,E,v),s!==null&&(ei(s,a,v),Cd(s,a,v))},enqueueReplaceState:function(a,s,d){a=a._reactInternals;var v=mi(),E=Ts(v);E.tag=1,E.payload=s,d!=null&&(E.callback=d),s=js(a,E,v),s!==null&&(ei(s,a,v),Cd(s,a,v))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var d=mi(),v=Ts(d);v.tag=2,s!=null&&(v.callback=s),s=js(a,v,d),s!==null&&(ei(s,a,d),Cd(s,a,d))}};function $E(a,s,d,v,E,A,$){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(v,A,$):s.prototype&&s.prototype.isPureReactComponent?!_s(d,v)||!_s(E,A):!0}function FE(a,s,d,v){a=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(d,v),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(d,v),s.state!==a&&sb.enqueueReplaceState(s,s.state,null)}function fu(a,s){var d=s;if("ref"in s){d={};for(var v in s)v!=="ref"&&(d[v]=s[v])}if(a=a.defaultProps){d===s&&(d=y({},d));for(var E in a)d[E]===void 0&&(d[E]=a[E])}return d}function VE(a){Jl(a)}function HE(a){console.error(a)}function qE(a){Jl(a)}function Dp(a,s){try{var d=a.onUncaughtError;d(s.value,{componentStack:s.stack})}catch(v){setTimeout(function(){throw v})}}function GE(a,s,d){try{var v=a.onCaughtError;v(d.value,{componentStack:d.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(E){setTimeout(function(){throw E})}}function lb(a,s,d){return d=Ts(d),d.tag=3,d.payload={element:null},d.callback=function(){Dp(a,s)},d}function YE(a){return a=Ts(a),a.tag=3,a}function WE(a,s,d,v){var E=d.type.getDerivedStateFromError;if(typeof E=="function"){var A=v.value;a.payload=function(){return E(A)},a.callback=function(){GE(s,d,v)}}var $=d.stateNode;$!==null&&typeof $.componentDidCatch=="function"&&(a.callback=function(){GE(s,d,v),typeof E!="function"&&(Ds===null?Ds=new Set([this]):Ds.add(this));var Z=v.stack;this.componentDidCatch(v.value,{componentStack:Z!==null?Z:""})})}function _U(a,s,d,v,E){if(d.flags|=32768,v!==null&&typeof v=="object"&&typeof v.then=="function"){if(s=d.alternate,s!==null&&_c(s,d,E,!0),d=ci.current,d!==null){switch(d.tag){case 31:case 13:return $i===null?Yp():d.alternate===null&&Tn===0&&(Tn=3),d.flags&=-257,d.flags|=65536,d.lanes=E,v===wp?d.flags|=16384:(s=d.updateQueue,s===null?d.updateQueue=new Set([v]):s.add(v),Lb(a,v,E)),!1;case 22:return d.flags|=65536,v===wp?d.flags|=16384:(s=d.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([v])},d.updateQueue=s):(d=s.retryQueue,d===null?s.retryQueue=new Set([v]):d.add(v)),Lb(a,v,E)),!1}throw Error(r(435,d.tag))}return Lb(a,v,E),Yp(),!1}if(gt)return s=ci.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=E,v!==xc&&(a=Error(r(422),{cause:v}),ru(p(a,d)))):(v!==xc&&(s=Error(r(423),{cause:v}),ru(p(s,d))),a=a.current.alternate,a.flags|=65536,E&=-E,a.lanes|=E,v=p(v,d),E=lb(a.stateNode,v,E),z1(a,E),Tn!==4&&(Tn=2)),!1;var A=Error(r(520),{cause:v});if(A=p(A,d),zd===null?zd=[A]:zd.push(A),Tn!==4&&(Tn=2),s===null)return!0;v=p(v,d),d=s;do{switch(d.tag){case 3:return d.flags|=65536,a=E&-E,d.lanes|=a,a=lb(d.stateNode,v,a),z1(d,a),!1;case 1:if(s=d.type,A=d.stateNode,(d.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||A!==null&&typeof A.componentDidCatch=="function"&&(Ds===null||!Ds.has(A))))return d.flags|=65536,E&=-E,d.lanes|=E,E=YE(E),WE(E,a,d,v),z1(d,E),!1}d=d.return}while(d!==null);return!1}var ub=Error(r(461)),Bn=!1;function pr(a,s,d,v){s.child=a===null?Q4(s,null,d,v):uu(s,a.child,d,v)}function KE(a,s,d,v,E){d=d.render;var A=s.ref;if("ref"in v){var $={};for(var Z in v)Z!=="ref"&&($[Z]=v[Z])}else $=v;return au(s),v=H1(a,s,d,$,A,E),Z=q1(),a!==null&&!Bn?(G1(a,s,E),bo(a,s,E)):(gt&&Z&&Yn(s),s.flags|=1,pr(a,s,v,E),s.child)}function ZE(a,s,d,v,E){if(a===null){var A=d.type;return typeof A=="function"&&!yc(A)&&A.defaultProps===void 0&&d.compare===null?(s.tag=15,s.type=A,XE(a,s,A,v,E)):(a=nu(d.type,null,v,s,s.mode,E),a.ref=s.ref,a.return=s,s.child=a)}if(A=a.child,!vb(a,E)){var $=A.memoizedProps;if(d=d.compare,d=d!==null?d:_s,d($,v)&&a.ref===s.ref)return bo(a,s,E)}return s.flags|=1,a=Ui(A,v),a.ref=s.ref,a.return=s,s.child=a}function XE(a,s,d,v,E){if(a!==null){var A=a.memoizedProps;if(_s(A,v)&&a.ref===s.ref)if(Bn=!1,s.pendingProps=v=A,vb(a,E))(a.flags&131072)!==0&&(Bn=!0);else return s.lanes=a.lanes,bo(a,s,E)}return cb(a,s,d,v,E)}function QE(a,s,d,v){var E=v.children,A=a!==null?a.memoizedState:null;if(a===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),v.mode==="hidden"){if((s.flags&128)!==0){if(A=A!==null?A.baseLanes|d:d,a!==null){for(v=s.child=a.child,E=0;v!==null;)E=E|v.lanes|v.childLanes,v=v.sibling;v=E&~A}else v=0,s.child=null;return JE(a,s,A,d,v)}if((d&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&xp(s,A!==null?A.cachePool:null),A!==null?tE(s,A):U1(),nE(s);else return v=s.lanes=536870912,JE(a,s,A!==null?A.baseLanes|d:d,d,v)}else A!==null?(xp(s,A.cachePool),tE(s,A),Ps(),s.memoizedState=null):(a!==null&&xp(s,null),U1(),Ps());return pr(a,s,E,d),s.child}function Pd(a,s){return a!==null&&a.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function JE(a,s,d,v,E){var A=R1();return A=A===null?null:{parent:In._currentValue,pool:A},s.memoizedState={baseLanes:d,cachePool:A},a!==null&&xp(s,null),U1(),nE(s),a!==null&&_c(a,s,v,!0),s.childLanes=E,null}function kp(a,s){return s=zp({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function eA(a,s,d){return uu(s,a.child,null,d),a=kp(s,s.pendingProps),a.flags|=2,fi(s),s.memoizedState=null,a}function wU(a,s,d){var v=s.pendingProps,E=(s.flags&128)!==0;if(s.flags&=-129,a===null){if(gt){if(v.mode==="hidden")return a=kp(s,v),s.lanes=536870912,Pd(null,a);if(F1(s),(a=jt)?(a=dO(a,Kr),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:Ce!==null?{id:Pe,overflow:Be}:null,retryLane:536870912,hydrationErrors:null},d=gd(a),d.return=s,s.child=d,Tt=s,jt=null)):a=null,a===null)throw za(s);return s.lanes=536870912,null}return kp(s,v)}var A=a.memoizedState;if(A!==null){var $=A.dehydrated;if(F1(s),E)if(s.flags&256)s.flags&=-257,s=eA(a,s,d);else if(s.memoizedState!==null)s.child=a.child,s.flags|=128,s=null;else throw Error(r(558));else if(Bn||_c(a,s,d,!1),E=(d&a.childLanes)!==0,Bn||E){if(v=Wt,v!==null&&($=Gm(v,d),$!==0&&$!==A.retryLane))throw A.retryLane=$,Bi(a,$),ei(v,a,$),ub;Yp(),s=eA(a,s,d)}else a=A.treeContext,jt=Fi($.nextSibling),Tt=s,gt=!0,Ia=null,Kr=!1,a!==null&&Rr(s,a),s=kp(s,v),s.flags|=4096;return s}return a=Ui(a.child,{mode:v.mode,children:v.children}),a.ref=s.ref,s.child=a,a.return=s,a}function Ip(a,s){var d=s.ref;if(d===null)a!==null&&a.ref!==null&&(s.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(r(284));(a===null||a.ref!==d)&&(s.flags|=4194816)}}function cb(a,s,d,v,E){return au(s),d=H1(a,s,d,v,void 0,E),v=q1(),a!==null&&!Bn?(G1(a,s,E),bo(a,s,E)):(gt&&v&&Yn(s),s.flags|=1,pr(a,s,d,E),s.child)}function tA(a,s,d,v,E,A){return au(s),s.updateQueue=null,d=iE(s,v,d,E),rE(a),v=q1(),a!==null&&!Bn?(G1(a,s,A),bo(a,s,A)):(gt&&v&&Yn(s),s.flags|=1,pr(a,s,d,A),s.child)}function nA(a,s,d,v,E){if(au(s),s.stateNode===null){var A=ho,$=d.contextType;typeof $=="object"&&$!==null&&(A=mr($)),A=new d(v,A),s.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,A.updater=sb,s.stateNode=A,A._reactInternals=s,A=s.stateNode,A.props=v,A.state=s.memoizedState,A.refs={},k1(s),$=d.contextType,A.context=typeof $=="object"&&$!==null?mr($):ho,A.state=s.memoizedState,$=d.getDerivedStateFromProps,typeof $=="function"&&(ob(s,d,$,v),A.state=s.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof A.getSnapshotBeforeUpdate=="function"||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||($=A.state,typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount(),$!==A.state&&sb.enqueueReplaceState(A,A.state,null),Ad(s,v,A,E),Ed(),A.state=s.memoizedState),typeof A.componentDidMount=="function"&&(s.flags|=4194308),v=!0}else if(a===null){A=s.stateNode;var Z=s.memoizedProps,fe=fu(d,Z);A.props=fe;var we=A.context,je=d.contextType;$=ho,typeof je=="object"&&je!==null&&($=mr(je));var Ne=d.getDerivedStateFromProps;je=typeof Ne=="function"||typeof A.getSnapshotBeforeUpdate=="function",Z=s.pendingProps!==Z,je||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(Z||we!==$)&&FE(s,A,v,$),Os=!1;var Ee=s.memoizedState;A.state=Ee,Ad(s,v,A,E),Ed(),we=s.memoizedState,Z||Ee!==we||Os?(typeof Ne=="function"&&(ob(s,d,Ne,v),we=s.memoizedState),(fe=Os||$E(s,d,fe,v,Ee,we,$))?(je||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount()),typeof A.componentDidMount=="function"&&(s.flags|=4194308)):(typeof A.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=v,s.memoizedState=we),A.props=v,A.state=we,A.context=$,v=fe):(typeof A.componentDidMount=="function"&&(s.flags|=4194308),v=!1)}else{A=s.stateNode,I1(a,s),$=s.memoizedProps,je=fu(d,$),A.props=je,Ne=s.pendingProps,Ee=A.context,we=d.contextType,fe=ho,typeof we=="object"&&we!==null&&(fe=mr(we)),Z=d.getDerivedStateFromProps,(we=typeof Z=="function"||typeof A.getSnapshotBeforeUpdate=="function")||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||($!==Ne||Ee!==fe)&&FE(s,A,v,fe),Os=!1,Ee=s.memoizedState,A.state=Ee,Ad(s,v,A,E),Ed();var Te=s.memoizedState;$!==Ne||Ee!==Te||Os||a!==null&&a.dependencies!==null&&yp(a.dependencies)?(typeof Z=="function"&&(ob(s,d,Z,v),Te=s.memoizedState),(je=Os||$E(s,d,je,v,Ee,Te,fe)||a!==null&&a.dependencies!==null&&yp(a.dependencies))?(we||typeof A.UNSAFE_componentWillUpdate!="function"&&typeof A.componentWillUpdate!="function"||(typeof A.componentWillUpdate=="function"&&A.componentWillUpdate(v,Te,fe),typeof A.UNSAFE_componentWillUpdate=="function"&&A.UNSAFE_componentWillUpdate(v,Te,fe)),typeof A.componentDidUpdate=="function"&&(s.flags|=4),typeof A.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof A.componentDidUpdate!="function"||$===a.memoizedProps&&Ee===a.memoizedState||(s.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||$===a.memoizedProps&&Ee===a.memoizedState||(s.flags|=1024),s.memoizedProps=v,s.memoizedState=Te),A.props=v,A.state=Te,A.context=fe,v=je):(typeof A.componentDidUpdate!="function"||$===a.memoizedProps&&Ee===a.memoizedState||(s.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||$===a.memoizedProps&&Ee===a.memoizedState||(s.flags|=1024),v=!1)}return A=v,Ip(a,s),v=(s.flags&128)!==0,A||v?(A=s.stateNode,d=v&&typeof d.getDerivedStateFromError!="function"?null:A.render(),s.flags|=1,a!==null&&v?(s.child=uu(s,a.child,null,E),s.child=uu(s,null,d,E)):pr(a,s,d,E),s.memoizedState=A.state,a=s.child):a=bo(a,s,E),a}function rA(a,s,d,v){return po(),s.flags|=256,pr(a,s,d,v),s.child}var fb={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function db(a){return{baseLanes:a,cachePool:G4()}}function hb(a,s,d){return a=a!==null?a.childLanes&~d:0,s&&(a|=hi),a}function iA(a,s,d){var v=s.pendingProps,E=!1,A=(s.flags&128)!==0,$;if(($=A)||($=a!==null&&a.memoizedState===null?!1:(Mn.current&2)!==0),$&&(E=!0,s.flags&=-129),$=(s.flags&32)!==0,s.flags&=-33,a===null){if(gt){if(E?Ms(s):Ps(),(a=jt)?(a=dO(a,Kr),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:Ce!==null?{id:Pe,overflow:Be}:null,retryLane:536870912,hydrationErrors:null},d=gd(a),d.return=s,s.child=d,Tt=s,jt=null)):a=null,a===null)throw za(s);return Kb(a)?s.lanes=32:s.lanes=536870912,null}var Z=v.children;return v=v.fallback,E?(Ps(),E=s.mode,Z=zp({mode:"hidden",children:Z},E),v=mo(v,E,d,null),Z.return=s,v.return=s,Z.sibling=v,s.child=Z,v=s.child,v.memoizedState=db(d),v.childLanes=hb(a,$,d),s.memoizedState=fb,Pd(null,v)):(Ms(s),mb(s,Z))}var fe=a.memoizedState;if(fe!==null&&(Z=fe.dehydrated,Z!==null)){if(A)s.flags&256?(Ms(s),s.flags&=-257,s=pb(a,s,d)):s.memoizedState!==null?(Ps(),s.child=a.child,s.flags|=128,s=null):(Ps(),Z=v.fallback,E=s.mode,v=zp({mode:"visible",children:v.children},E),Z=mo(Z,E,d,null),Z.flags|=2,v.return=s,Z.return=s,v.sibling=Z,s.child=v,uu(s,a.child,null,d),v=s.child,v.memoizedState=db(d),v.childLanes=hb(a,$,d),s.memoizedState=fb,s=Pd(null,v));else if(Ms(s),Kb(Z)){if($=Z.nextSibling&&Z.nextSibling.dataset,$)var we=$.dgst;$=we,v=Error(r(419)),v.stack="",v.digest=$,ru({value:v,source:null,stack:null}),s=pb(a,s,d)}else if(Bn||_c(a,s,d,!1),$=(d&a.childLanes)!==0,Bn||$){if($=Wt,$!==null&&(v=Gm($,d),v!==0&&v!==fe.retryLane))throw fe.retryLane=v,Bi(a,v),ei($,a,v),ub;Wb(Z)||Yp(),s=pb(a,s,d)}else Wb(Z)?(s.flags|=192,s.child=a.child,s=null):(a=fe.treeContext,jt=Fi(Z.nextSibling),Tt=s,gt=!0,Ia=null,Kr=!1,a!==null&&Rr(s,a),s=mb(s,v.children),s.flags|=4096);return s}return E?(Ps(),Z=v.fallback,E=s.mode,fe=a.child,we=fe.sibling,v=Ui(fe,{mode:"hidden",children:v.children}),v.subtreeFlags=fe.subtreeFlags&65011712,we!==null?Z=Ui(we,Z):(Z=mo(Z,E,d,null),Z.flags|=2),Z.return=s,v.return=s,v.sibling=Z,s.child=v,Pd(null,v),v=s.child,Z=a.child.memoizedState,Z===null?Z=db(d):(E=Z.cachePool,E!==null?(fe=In._currentValue,E=E.parent!==fe?{parent:fe,pool:fe}:E):E=G4(),Z={baseLanes:Z.baseLanes|d,cachePool:E}),v.memoizedState=Z,v.childLanes=hb(a,$,d),s.memoizedState=fb,Pd(a.child,v)):(Ms(s),d=a.child,a=d.sibling,d=Ui(d,{mode:"visible",children:v.children}),d.return=s,d.sibling=null,a!==null&&($=s.deletions,$===null?(s.deletions=[a],s.flags|=16):$.push(a)),s.child=d,s.memoizedState=null,d)}function mb(a,s){return s=zp({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function zp(a,s){return a=Cr(22,a,null,s),a.lanes=0,a}function pb(a,s,d){return uu(s,a.child,null,d),a=mb(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function aA(a,s,d){a.lanes|=s;var v=a.alternate;v!==null&&(v.lanes|=s),M1(a.return,s,d)}function gb(a,s,d,v,E,A){var $=a.memoizedState;$===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:v,tail:d,tailMode:E,treeForkCount:A}:($.isBackwards=s,$.rendering=null,$.renderingStartTime=0,$.last=v,$.tail=d,$.tailMode=E,$.treeForkCount=A)}function oA(a,s,d){var v=s.pendingProps,E=v.revealOrder,A=v.tail;v=v.children;var $=Mn.current,Z=($&2)!==0;if(Z?($=$&1|2,s.flags|=128):$&=1,ee(Mn,$),pr(a,s,v,d),v=gt?K:0,!Z&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&aA(a,d,s);else if(a.tag===19)aA(a,d,s);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(E){case"forwards":for(d=s.child,E=null;d!==null;)a=d.alternate,a!==null&&Ap(a)===null&&(E=d),d=d.sibling;d=E,d===null?(E=s.child,s.child=null):(E=d.sibling,d.sibling=null),gb(s,!1,E,d,A,v);break;case"backwards":case"unstable_legacy-backwards":for(d=null,E=s.child,s.child=null;E!==null;){if(a=E.alternate,a!==null&&Ap(a)===null){s.child=E;break}a=E.sibling,E.sibling=d,d=E,E=a}gb(s,!0,d,null,A,v);break;case"together":gb(s,!1,null,null,void 0,v);break;default:s.memoizedState=null}return s.child}function bo(a,s,d){if(a!==null&&(s.dependencies=a.dependencies),Rs|=s.lanes,(d&s.childLanes)===0)if(a!==null){if(_c(a,s,d,!1),(d&s.childLanes)===0)return null}else return null;if(a!==null&&s.child!==a.child)throw Error(r(153));if(s.child!==null){for(a=s.child,d=Ui(a,a.pendingProps),s.child=d,d.return=s;a.sibling!==null;)a=a.sibling,d=d.sibling=Ui(a,a.pendingProps),d.return=s;d.sibling=null}return s.child}function vb(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&yp(a)))}function SU(a,s,d){switch(s.tag){case 3:D(s,s.stateNode.containerInfo),As(s,In,a.memoizedState.cache),po();break;case 27:case 5:G(s);break;case 4:D(s,s.stateNode.containerInfo);break;case 10:As(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,F1(s),null;break;case 13:var v=s.memoizedState;if(v!==null)return v.dehydrated!==null?(Ms(s),s.flags|=128,null):(d&s.child.childLanes)!==0?iA(a,s,d):(Ms(s),a=bo(a,s,d),a!==null?a.sibling:null);Ms(s);break;case 19:var E=(a.flags&128)!==0;if(v=(d&s.childLanes)!==0,v||(_c(a,s,d,!1),v=(d&s.childLanes)!==0),E){if(v)return oA(a,s,d);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),ee(Mn,Mn.current),v)break;return null;case 22:return s.lanes=0,QE(a,s,d,s.pendingProps);case 24:As(s,In,a.memoizedState.cache)}return bo(a,s,d)}function sA(a,s,d){if(a!==null)if(a.memoizedProps!==s.pendingProps)Bn=!0;else{if(!vb(a,d)&&(s.flags&128)===0)return Bn=!1,SU(a,s,d);Bn=(a.flags&131072)!==0}else Bn=!1,gt&&(s.flags&1048576)!==0&&ct(s,K,s.index);switch(s.lanes=0,s.tag){case 16:e:{var v=s.pendingProps;if(a=su(s.elementType),s.type=a,typeof a=="function")yc(a)?(v=fu(a,v),s.tag=1,s=nA(null,s,a,v,d)):(s.tag=0,s=cb(null,s,a,v,d));else{if(a!=null){var E=a.$$typeof;if(E===F){s.tag=11,s=KE(null,s,a,v,d);break e}else if(E===Q){s.tag=14,s=ZE(null,s,a,v,d);break e}}throw s=ie(a)||a,Error(r(306,s,""))}}return s;case 0:return cb(a,s,s.type,s.pendingProps,d);case 1:return v=s.type,E=fu(v,s.pendingProps),nA(a,s,v,E,d);case 3:e:{if(D(s,s.stateNode.containerInfo),a===null)throw Error(r(387));v=s.pendingProps;var A=s.memoizedState;E=A.element,I1(a,s),Ad(s,v,null,d);var $=s.memoizedState;if(v=$.cache,As(s,In,v),v!==A.cache&&P1(s,[In],d,!0),Ed(),v=$.element,A.isDehydrated)if(A={element:v,isDehydrated:!1,cache:$.cache},s.updateQueue.baseState=A,s.memoizedState=A,s.flags&256){s=rA(a,s,v,d);break e}else if(v!==E){E=p(Error(r(424)),s),ru(E),s=rA(a,s,v,d);break e}else for(a=s.stateNode.containerInfo,a.nodeType===9?a=a.body:a=a.nodeName==="HTML"?a.ownerDocument.body:a,jt=Fi(a.firstChild),Tt=s,gt=!0,Ia=null,Kr=!0,d=Q4(s,null,v,d),s.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(po(),v===E){s=bo(a,s,d);break e}pr(a,s,v,d)}s=s.child}return s;case 26:return Ip(a,s),a===null?(d=yO(s.type,null,s.pendingProps,null))?s.memoizedState=d:gt||(d=s.type,a=s.pendingProps,v=eg(de.current).createElement(d),v[Dn]=s,v[ir]=a,gr(v,d,a),kn(v),s.stateNode=v):s.memoizedState=yO(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return G(s),a===null&>&&(v=s.stateNode=pO(s.type,s.pendingProps,de.current),Tt=s,Kr=!0,E=jt,Bs(s.type)?(Zb=E,jt=Fi(v.firstChild)):jt=E),pr(a,s,s.pendingProps.children,d),Ip(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&>&&((E=v=jt)&&(v=JU(v,s.type,s.pendingProps,Kr),v!==null?(s.stateNode=v,Tt=s,jt=Fi(v.firstChild),Kr=!1,E=!0):E=!1),E||za(s)),G(s),E=s.type,A=s.pendingProps,$=a!==null?a.memoizedProps:null,v=A.children,qb(E,A)?v=null:$!==null&&qb(E,$)&&(s.flags|=32),s.memoizedState!==null&&(E=H1(a,s,mU,null,null,d),Gd._currentValue=E),Ip(a,s),pr(a,s,v,d),s.child;case 6:return a===null&>&&((a=d=jt)&&(d=e$(d,s.pendingProps,Kr),d!==null?(s.stateNode=d,Tt=s,jt=null,a=!0):a=!1),a||za(s)),null;case 13:return iA(a,s,d);case 4:return D(s,s.stateNode.containerInfo),v=s.pendingProps,a===null?s.child=uu(s,null,v,d):pr(a,s,v,d),s.child;case 11:return KE(a,s,s.type,s.pendingProps,d);case 7:return pr(a,s,s.pendingProps,d),s.child;case 8:return pr(a,s,s.pendingProps.children,d),s.child;case 12:return pr(a,s,s.pendingProps.children,d),s.child;case 10:return v=s.pendingProps,As(s,s.type,v.value),pr(a,s,v.children,d),s.child;case 9:return E=s.type._context,v=s.pendingProps.children,au(s),E=mr(E),v=v(E),s.flags|=1,pr(a,s,v,d),s.child;case 14:return ZE(a,s,s.type,s.pendingProps,d);case 15:return XE(a,s,s.type,s.pendingProps,d);case 19:return oA(a,s,d);case 31:return wU(a,s,d);case 22:return QE(a,s,d,s.pendingProps);case 24:return au(s),v=mr(In),a===null?(E=R1(),E===null&&(E=Wt,A=N1(),E.pooledCache=A,A.refCount++,A!==null&&(E.pooledCacheLanes|=d),E=A),s.memoizedState={parent:v,cache:E},k1(s),As(s,In,E)):((a.lanes&d)!==0&&(I1(a,s),Ad(s,null,null,d),Ed()),E=a.memoizedState,A=s.memoizedState,E.parent!==v?(E={parent:v,cache:v},s.memoizedState=E,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=E),As(s,In,v)):(v=A.cache,As(s,In,v),v!==E.cache&&P1(s,[In],d,!0))),pr(a,s,s.pendingProps.children,d),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function xo(a){a.flags|=4}function yb(a,s,d,v,E){if((s=(a.mode&32)!==0)&&(s=!1),s){if(a.flags|=16777216,(E&335544128)===E)if(a.stateNode.complete)a.flags|=8192;else if(RA())a.flags|=8192;else throw lu=wp,D1}else a.flags&=-16777217}function lA(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!SO(s))if(RA())a.flags|=8192;else throw lu=wp,D1}function Bp(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?Vm():536870912,a.lanes|=s,Lc|=s)}function Nd(a,s){if(!gt)switch(a.tailMode){case"hidden":s=a.tail;for(var d=null;s!==null;)s.alternate!==null&&(d=s),s=s.sibling;d===null?a.tail=null:d.sibling=null;break;case"collapsed":d=a.tail;for(var v=null;d!==null;)d.alternate!==null&&(v=d),d=d.sibling;v===null?s||a.tail===null?a.tail=null:a.tail.sibling=null:v.sibling=null}}function tn(a){var s=a.alternate!==null&&a.alternate.child===a.child,d=0,v=0;if(s)for(var E=a.child;E!==null;)d|=E.lanes|E.childLanes,v|=E.subtreeFlags&65011712,v|=E.flags&65011712,E.return=a,E=E.sibling;else for(E=a.child;E!==null;)d|=E.lanes|E.childLanes,v|=E.subtreeFlags,v|=E.flags,E.return=a,E=E.sibling;return a.subtreeFlags|=v,a.childLanes=d,s}function CU(a,s,d){var v=s.pendingProps;switch(An(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tn(s),null;case 1:return tn(s),null;case 3:return d=s.stateNode,v=null,a!==null&&(v=a.memoizedState.cache),s.memoizedState.cache!==v&&(s.flags|=2048),go(In),R(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(a===null||a.child===null)&&(sa(s)?xo(s):a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,bd())),tn(s),null;case 26:var E=s.type,A=s.memoizedState;return a===null?(xo(s),A!==null?(tn(s),lA(s,A)):(tn(s),yb(s,E,null,v,d))):A?A!==a.memoizedState?(xo(s),tn(s),lA(s,A)):(tn(s),s.flags&=-16777217):(a=a.memoizedProps,a!==v&&xo(s),tn(s),yb(s,E,a,v,d)),null;case 27:if(ne(s),d=de.current,E=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==v&&xo(s);else{if(!v){if(s.stateNode===null)throw Error(r(166));return tn(s),null}a=se.current,sa(s)?yd(s):(a=pO(E,v,d),s.stateNode=a,xo(s))}return tn(s),null;case 5:if(ne(s),E=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==v&&xo(s);else{if(!v){if(s.stateNode===null)throw Error(r(166));return tn(s),null}if(A=se.current,sa(s))yd(s);else{var $=eg(de.current);switch(A){case 1:A=$.createElementNS("http://www.w3.org/2000/svg",E);break;case 2:A=$.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;default:switch(E){case"svg":A=$.createElementNS("http://www.w3.org/2000/svg",E);break;case"math":A=$.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;case"script":A=$.createElement("div"),A.innerHTML="<script><\/script>",A=A.removeChild(A.firstChild);break;case"select":A=typeof v.is=="string"?$.createElement("select",{is:v.is}):$.createElement("select"),v.multiple?A.multiple=!0:v.size&&(A.size=v.size);break;default:A=typeof v.is=="string"?$.createElement(E,{is:v.is}):$.createElement(E)}}A[Dn]=s,A[ir]=v;e:for($=s.child;$!==null;){if($.tag===5||$.tag===6)A.appendChild($.stateNode);else if($.tag!==4&&$.tag!==27&&$.child!==null){$.child.return=$,$=$.child;continue}if($===s)break e;for(;$.sibling===null;){if($.return===null||$.return===s)break e;$=$.return}$.sibling.return=$.return,$=$.sibling}s.stateNode=A;e:switch(gr(A,E,v),E){case"button":case"input":case"select":case"textarea":v=!!v.autoFocus;break e;case"img":v=!0;break e;default:v=!1}v&&xo(s)}}return tn(s),yb(s,s.type,a===null?null:a.memoizedProps,s.pendingProps,d),null;case 6:if(a&&s.stateNode!=null)a.memoizedProps!==v&&xo(s);else{if(typeof v!="string"&&s.stateNode===null)throw Error(r(166));if(a=de.current,sa(s)){if(a=s.stateNode,d=s.memoizedProps,v=null,E=Tt,E!==null)switch(E.tag){case 27:case 5:v=E.memoizedProps}a[Dn]=s,a=!!(a.nodeValue===d||v!==null&&v.suppressHydrationWarning===!0||iO(a.nodeValue,d)),a||za(s,!0)}else a=eg(a).createTextNode(v),a[Dn]=s,s.stateNode=a}return tn(s),null;case 31:if(d=s.memoizedState,a===null||a.memoizedState!==null){if(v=sa(s),d!==null){if(a===null){if(!v)throw Error(r(318));if(a=s.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[Dn]=s}else po(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;tn(s),a=!1}else d=bd(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=d),a=!0;if(!a)return s.flags&256?(fi(s),s):(fi(s),null);if((s.flags&128)!==0)throw Error(r(558))}return tn(s),null;case 13:if(v=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(E=sa(s),v!==null&&v.dehydrated!==null){if(a===null){if(!E)throw Error(r(318));if(E=s.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(r(317));E[Dn]=s}else po(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;tn(s),E=!1}else E=bd(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=E),E=!0;if(!E)return s.flags&256?(fi(s),s):(fi(s),null)}return fi(s),(s.flags&128)!==0?(s.lanes=d,s):(d=v!==null,a=a!==null&&a.memoizedState!==null,d&&(v=s.child,E=null,v.alternate!==null&&v.alternate.memoizedState!==null&&v.alternate.memoizedState.cachePool!==null&&(E=v.alternate.memoizedState.cachePool.pool),A=null,v.memoizedState!==null&&v.memoizedState.cachePool!==null&&(A=v.memoizedState.cachePool.pool),A!==E&&(v.flags|=2048)),d!==a&&d&&(s.child.flags|=8192),Bp(s,s.updateQueue),tn(s),null);case 4:return R(),a===null&&Ub(s.stateNode.containerInfo),tn(s),null;case 10:return go(s.type),tn(s),null;case 19:if(q(Mn),v=s.memoizedState,v===null)return tn(s),null;if(E=(s.flags&128)!==0,A=v.rendering,A===null)if(E)Nd(v,!1);else{if(Tn!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(A=Ap(a),A!==null){for(s.flags|=128,Nd(v,!1),a=A.updateQueue,s.updateQueue=a,Bp(s,a),s.subtreeFlags=0,a=d,d=s.child;d!==null;)pd(d,a),d=d.sibling;return ee(Mn,Mn.current&1|2),gt&&Ye(s,v.treeForkCount),s.child}a=a.sibling}v.tail!==null&&mt()>Hp&&(s.flags|=128,E=!0,Nd(v,!1),s.lanes=4194304)}else{if(!E)if(a=Ap(A),a!==null){if(s.flags|=128,E=!0,a=a.updateQueue,s.updateQueue=a,Bp(s,a),Nd(v,!0),v.tail===null&&v.tailMode==="hidden"&&!A.alternate&&!gt)return tn(s),null}else 2*mt()-v.renderingStartTime>Hp&&d!==536870912&&(s.flags|=128,E=!0,Nd(v,!1),s.lanes=4194304);v.isBackwards?(A.sibling=s.child,s.child=A):(a=v.last,a!==null?a.sibling=A:s.child=A,v.last=A)}return v.tail!==null?(a=v.tail,v.rendering=a,v.tail=a.sibling,v.renderingStartTime=mt(),a.sibling=null,d=Mn.current,ee(Mn,E?d&1|2:d&1),gt&&Ye(s,v.treeForkCount),a):(tn(s),null);case 22:case 23:return fi(s),$1(),v=s.memoizedState!==null,a!==null?a.memoizedState!==null!==v&&(s.flags|=8192):v&&(s.flags|=8192),v?(d&536870912)!==0&&(s.flags&128)===0&&(tn(s),s.subtreeFlags&6&&(s.flags|=8192)):tn(s),d=s.updateQueue,d!==null&&Bp(s,d.retryQueue),d=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(d=a.memoizedState.cachePool.pool),v=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(v=s.memoizedState.cachePool.pool),v!==d&&(s.flags|=2048),a!==null&&q(ou),null;case 24:return d=null,a!==null&&(d=a.memoizedState.cache),s.memoizedState.cache!==d&&(s.flags|=2048),go(In),tn(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function EU(a,s){switch(An(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return go(In),R(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 26:case 27:case 5:return ne(s),null;case 31:if(s.memoizedState!==null){if(fi(s),s.alternate===null)throw Error(r(340));po()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 13:if(fi(s),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(r(340));po()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return q(Mn),null;case 4:return R(),null;case 10:return go(s.type),null;case 22:case 23:return fi(s),$1(),a!==null&&q(ou),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return go(In),null;case 25:return null;default:return null}}function uA(a,s){switch(An(s),s.tag){case 3:go(In),R();break;case 26:case 27:case 5:ne(s);break;case 4:R();break;case 31:s.memoizedState!==null&&fi(s);break;case 13:fi(s);break;case 19:q(Mn);break;case 10:go(s.type);break;case 22:case 23:fi(s),$1(),a!==null&&q(ou);break;case 24:go(In)}}function Ld(a,s){try{var d=s.updateQueue,v=d!==null?d.lastEffect:null;if(v!==null){var E=v.next;d=E;do{if((d.tag&a)===a){v=void 0;var A=d.create,$=d.inst;v=A(),$.destroy=v}d=d.next}while(d!==E)}}catch(Z){Ut(s,s.return,Z)}}function Ns(a,s,d){try{var v=s.updateQueue,E=v!==null?v.lastEffect:null;if(E!==null){var A=E.next;v=A;do{if((v.tag&a)===a){var $=v.inst,Z=$.destroy;if(Z!==void 0){$.destroy=void 0,E=s;var fe=d,we=Z;try{we()}catch(je){Ut(E,fe,je)}}}v=v.next}while(v!==A)}}catch(je){Ut(s,s.return,je)}}function cA(a){var s=a.updateQueue;if(s!==null){var d=a.stateNode;try{eE(s,d)}catch(v){Ut(a,a.return,v)}}}function fA(a,s,d){d.props=fu(a.type,a.memoizedProps),d.state=a.memoizedState;try{d.componentWillUnmount()}catch(v){Ut(a,s,v)}}function Rd(a,s){try{var d=a.ref;if(d!==null){switch(a.tag){case 26:case 27:case 5:var v=a.stateNode;break;case 30:v=a.stateNode;break;default:v=a.stateNode}typeof d=="function"?a.refCleanup=d(v):d.current=v}}catch(E){Ut(a,s,E)}}function Ua(a,s){var d=a.ref,v=a.refCleanup;if(d!==null)if(typeof v=="function")try{v()}catch(E){Ut(a,s,E)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(E){Ut(a,s,E)}else d.current=null}function dA(a){var s=a.type,d=a.memoizedProps,v=a.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":d.autoFocus&&v.focus();break e;case"img":d.src?v.src=d.src:d.srcSet&&(v.srcset=d.srcSet)}}catch(E){Ut(a,a.return,E)}}function bb(a,s,d){try{var v=a.stateNode;YU(v,a.type,d,s),v[ir]=s}catch(E){Ut(a,a.return,E)}}function hA(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Bs(a.type)||a.tag===4}function xb(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||hA(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&Bs(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function _b(a,s,d){var v=a.tag;if(v===5||v===6)a=a.stateNode,s?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(a,s):(s=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,s.appendChild(a),d=d._reactRootContainer,d!=null||s.onclick!==null||(s.onclick=qr));else if(v!==4&&(v===27&&Bs(a.type)&&(d=a.stateNode,s=null),a=a.child,a!==null))for(_b(a,s,d),a=a.sibling;a!==null;)_b(a,s,d),a=a.sibling}function Up(a,s,d){var v=a.tag;if(v===5||v===6)a=a.stateNode,s?d.insertBefore(a,s):d.appendChild(a);else if(v!==4&&(v===27&&Bs(a.type)&&(d=a.stateNode),a=a.child,a!==null))for(Up(a,s,d),a=a.sibling;a!==null;)Up(a,s,d),a=a.sibling}function mA(a){var s=a.stateNode,d=a.memoizedProps;try{for(var v=a.type,E=s.attributes;E.length;)s.removeAttributeNode(E[0]);gr(s,v,d),s[Dn]=a,s[ir]=d}catch(A){Ut(a,a.return,A)}}var _o=!1,Un=!1,wb=!1,pA=typeof WeakSet=="function"?WeakSet:Set,sr=null;function AU(a,s){if(a=a.containerInfo,Vb=sg,a=Kl(a),Na(a)){if("selectionStart"in a)var d={start:a.selectionStart,end:a.selectionEnd};else e:{d=(d=a.ownerDocument)&&d.defaultView||window;var v=d.getSelection&&d.getSelection();if(v&&v.rangeCount!==0){d=v.anchorNode;var E=v.anchorOffset,A=v.focusNode;v=v.focusOffset;try{d.nodeType,A.nodeType}catch{d=null;break e}var $=0,Z=-1,fe=-1,we=0,je=0,Ne=a,Ee=null;t:for(;;){for(var Te;Ne!==d||E!==0&&Ne.nodeType!==3||(Z=$+E),Ne!==A||v!==0&&Ne.nodeType!==3||(fe=$+v),Ne.nodeType===3&&($+=Ne.nodeValue.length),(Te=Ne.firstChild)!==null;)Ee=Ne,Ne=Te;for(;;){if(Ne===a)break t;if(Ee===d&&++we===E&&(Z=$),Ee===A&&++je===v&&(fe=$),(Te=Ne.nextSibling)!==null)break;Ne=Ee,Ee=Ne.parentNode}Ne=Te}d=Z===-1||fe===-1?null:{start:Z,end:fe}}else d=null}d=d||{start:0,end:0}}else d=null;for(Hb={focusedElem:a,selectionRange:d},sg=!1,sr=s;sr!==null;)if(s=sr,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,sr=a;else for(;sr!==null;){switch(s=sr,A=s.alternate,a=s.flags,s.tag){case 0:if((a&4)!==0&&(a=s.updateQueue,a=a!==null?a.events:null,a!==null))for(d=0;d<a.length;d++)E=a[d],E.ref.impl=E.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&A!==null){a=void 0,d=s,E=A.memoizedProps,A=A.memoizedState,v=d.stateNode;try{var Fe=fu(d.type,E);a=v.getSnapshotBeforeUpdate(Fe,A),v.__reactInternalSnapshotBeforeUpdate=a}catch(et){Ut(d,d.return,et)}}break;case 3:if((a&1024)!==0){if(a=s.stateNode.containerInfo,d=a.nodeType,d===9)Yb(a);else if(d===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Yb(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=s.sibling,a!==null){a.return=s.return,sr=a;break}sr=s.return}}function gA(a,s,d){var v=d.flags;switch(d.tag){case 0:case 11:case 15:So(a,d),v&4&&Ld(5,d);break;case 1:if(So(a,d),v&4)if(a=d.stateNode,s===null)try{a.componentDidMount()}catch($){Ut(d,d.return,$)}else{var E=fu(d.type,s.memoizedProps);s=s.memoizedState;try{a.componentDidUpdate(E,s,a.__reactInternalSnapshotBeforeUpdate)}catch($){Ut(d,d.return,$)}}v&64&&cA(d),v&512&&Rd(d,d.return);break;case 3:if(So(a,d),v&64&&(a=d.updateQueue,a!==null)){if(s=null,d.child!==null)switch(d.child.tag){case 27:case 5:s=d.child.stateNode;break;case 1:s=d.child.stateNode}try{eE(a,s)}catch($){Ut(d,d.return,$)}}break;case 27:s===null&&v&4&&mA(d);case 26:case 5:So(a,d),s===null&&v&4&&dA(d),v&512&&Rd(d,d.return);break;case 12:So(a,d);break;case 31:So(a,d),v&4&&bA(a,d);break;case 13:So(a,d),v&4&&xA(a,d),v&64&&(a=d.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(d=DU.bind(null,d),t$(a,d))));break;case 22:if(v=d.memoizedState!==null||_o,!v){s=s!==null&&s.memoizedState!==null||Un,E=_o;var A=Un;_o=v,(Un=s)&&!A?Co(a,d,(d.subtreeFlags&8772)!==0):So(a,d),_o=E,Un=A}break;case 30:break;default:So(a,d)}}function vA(a){var s=a.alternate;s!==null&&(a.alternate=null,vA(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&Xf(s)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var cn=null,Zr=!1;function wo(a,s,d){for(d=d.child;d!==null;)yA(a,s,d),d=d.sibling}function yA(a,s,d){if(Cn&&typeof Cn.onCommitFiberUnmount=="function")try{Cn.onCommitFiberUnmount(Jt,d)}catch{}switch(d.tag){case 26:Un||Ua(d,s),wo(a,s,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:Un||Ua(d,s);var v=cn,E=Zr;Bs(d.type)&&(cn=d.stateNode,Zr=!1),wo(a,s,d),Vd(d.stateNode),cn=v,Zr=E;break;case 5:Un||Ua(d,s);case 6:if(v=cn,E=Zr,cn=null,wo(a,s,d),cn=v,Zr=E,cn!==null)if(Zr)try{(cn.nodeType===9?cn.body:cn.nodeName==="HTML"?cn.ownerDocument.body:cn).removeChild(d.stateNode)}catch(A){Ut(d,s,A)}else try{cn.removeChild(d.stateNode)}catch(A){Ut(d,s,A)}break;case 18:cn!==null&&(Zr?(a=cn,cO(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,d.stateNode),$c(a)):cO(cn,d.stateNode));break;case 4:v=cn,E=Zr,cn=d.stateNode.containerInfo,Zr=!0,wo(a,s,d),cn=v,Zr=E;break;case 0:case 11:case 14:case 15:Ns(2,d,s),Un||Ns(4,d,s),wo(a,s,d);break;case 1:Un||(Ua(d,s),v=d.stateNode,typeof v.componentWillUnmount=="function"&&fA(d,s,v)),wo(a,s,d);break;case 21:wo(a,s,d);break;case 22:Un=(v=Un)||d.memoizedState!==null,wo(a,s,d),Un=v;break;default:wo(a,s,d)}}function bA(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{$c(a)}catch(d){Ut(s,s.return,d)}}}function xA(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{$c(a)}catch(d){Ut(s,s.return,d)}}function OU(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new pA),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new pA),s;default:throw Error(r(435,a.tag))}}function $p(a,s){var d=OU(a);s.forEach(function(v){if(!d.has(v)){d.add(v);var E=kU.bind(null,a,v);v.then(E,E)}})}function Xr(a,s){var d=s.deletions;if(d!==null)for(var v=0;v<d.length;v++){var E=d[v],A=a,$=s,Z=$;e:for(;Z!==null;){switch(Z.tag){case 27:if(Bs(Z.type)){cn=Z.stateNode,Zr=!1;break e}break;case 5:cn=Z.stateNode,Zr=!1;break e;case 3:case 4:cn=Z.stateNode.containerInfo,Zr=!0;break e}Z=Z.return}if(cn===null)throw Error(r(160));yA(A,$,E),cn=null,Zr=!1,A=E.alternate,A!==null&&(A.return=null),E.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)_A(s,a),s=s.sibling}var ua=null;function _A(a,s){var d=a.alternate,v=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Xr(s,a),Qr(a),v&4&&(Ns(3,a,a.return),Ld(3,a),Ns(5,a,a.return));break;case 1:Xr(s,a),Qr(a),v&512&&(Un||d===null||Ua(d,d.return)),v&64&&_o&&(a=a.updateQueue,a!==null&&(v=a.callbacks,v!==null&&(d=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=d===null?v:d.concat(v))));break;case 26:var E=ua;if(Xr(s,a),Qr(a),v&512&&(Un||d===null||Ua(d,d.return)),v&4){var A=d!==null?d.memoizedState:null;if(v=a.memoizedState,d===null)if(v===null)if(a.stateNode===null){e:{v=a.type,d=a.memoizedProps,E=E.ownerDocument||E;t:switch(v){case"title":A=E.getElementsByTagName("title")[0],(!A||A[Ll]||A[Dn]||A.namespaceURI==="http://www.w3.org/2000/svg"||A.hasAttribute("itemprop"))&&(A=E.createElement(v),E.head.insertBefore(A,E.querySelector("head > title"))),gr(A,v,d),A[Dn]=a,kn(A),v=A;break e;case"link":var $=_O("link","href",E).get(v+(d.href||""));if($){for(var Z=0;Z<$.length;Z++)if(A=$[Z],A.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&A.getAttribute("rel")===(d.rel==null?null:d.rel)&&A.getAttribute("title")===(d.title==null?null:d.title)&&A.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){$.splice(Z,1);break t}}A=E.createElement(v),gr(A,v,d),E.head.appendChild(A);break;case"meta":if($=_O("meta","content",E).get(v+(d.content||""))){for(Z=0;Z<$.length;Z++)if(A=$[Z],A.getAttribute("content")===(d.content==null?null:""+d.content)&&A.getAttribute("name")===(d.name==null?null:d.name)&&A.getAttribute("property")===(d.property==null?null:d.property)&&A.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&A.getAttribute("charset")===(d.charSet==null?null:d.charSet)){$.splice(Z,1);break t}}A=E.createElement(v),gr(A,v,d),E.head.appendChild(A);break;default:throw Error(r(468,v))}A[Dn]=a,kn(A),v=A}a.stateNode=v}else wO(E,a.type,a.stateNode);else a.stateNode=xO(E,v,a.memoizedProps);else A!==v?(A===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):A.count--,v===null?wO(E,a.type,a.stateNode):xO(E,v,a.memoizedProps)):v===null&&a.stateNode!==null&&bb(a,a.memoizedProps,d.memoizedProps)}break;case 27:Xr(s,a),Qr(a),v&512&&(Un||d===null||Ua(d,d.return)),d!==null&&v&4&&bb(a,a.memoizedProps,d.memoizedProps);break;case 5:if(Xr(s,a),Qr(a),v&512&&(Un||d===null||Ua(d,d.return)),a.flags&32){E=a.stateNode;try{Li(E,"")}catch(Fe){Ut(a,a.return,Fe)}}v&4&&a.stateNode!=null&&(E=a.memoizedProps,bb(a,E,d!==null?d.memoizedProps:E)),v&1024&&(wb=!0);break;case 6:if(Xr(s,a),Qr(a),v&4){if(a.stateNode===null)throw Error(r(162));v=a.memoizedProps,d=a.stateNode;try{d.nodeValue=v}catch(Fe){Ut(a,a.return,Fe)}}break;case 3:if(rg=null,E=ua,ua=tg(s.containerInfo),Xr(s,a),ua=E,Qr(a),v&4&&d!==null&&d.memoizedState.isDehydrated)try{$c(s.containerInfo)}catch(Fe){Ut(a,a.return,Fe)}wb&&(wb=!1,wA(a));break;case 4:v=ua,ua=tg(a.stateNode.containerInfo),Xr(s,a),Qr(a),ua=v;break;case 12:Xr(s,a),Qr(a);break;case 31:Xr(s,a),Qr(a),v&4&&(v=a.updateQueue,v!==null&&(a.updateQueue=null,$p(a,v)));break;case 13:Xr(s,a),Qr(a),a.child.flags&8192&&a.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Vp=mt()),v&4&&(v=a.updateQueue,v!==null&&(a.updateQueue=null,$p(a,v)));break;case 22:E=a.memoizedState!==null;var fe=d!==null&&d.memoizedState!==null,we=_o,je=Un;if(_o=we||E,Un=je||fe,Xr(s,a),Un=je,_o=we,Qr(a),v&8192)e:for(s=a.stateNode,s._visibility=E?s._visibility&-2:s._visibility|1,E&&(d===null||fe||_o||Un||du(a)),d=null,s=a;;){if(s.tag===5||s.tag===26){if(d===null){fe=d=s;try{if(A=fe.stateNode,E)$=A.style,typeof $.setProperty=="function"?$.setProperty("display","none","important"):$.display="none";else{Z=fe.stateNode;var Ne=fe.memoizedProps.style,Ee=Ne!=null&&Ne.hasOwnProperty("display")?Ne.display:null;Z.style.display=Ee==null||typeof Ee=="boolean"?"":(""+Ee).trim()}}catch(Fe){Ut(fe,fe.return,Fe)}}}else if(s.tag===6){if(d===null){fe=s;try{fe.stateNode.nodeValue=E?"":fe.memoizedProps}catch(Fe){Ut(fe,fe.return,Fe)}}}else if(s.tag===18){if(d===null){fe=s;try{var Te=fe.stateNode;E?fO(Te,!0):fO(fe.stateNode,!1)}catch(Fe){Ut(fe,fe.return,Fe)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===a)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;d===s&&(d=null),s=s.return}d===s&&(d=null),s.sibling.return=s.return,s=s.sibling}v&4&&(v=a.updateQueue,v!==null&&(d=v.retryQueue,d!==null&&(v.retryQueue=null,$p(a,d))));break;case 19:Xr(s,a),Qr(a),v&4&&(v=a.updateQueue,v!==null&&(a.updateQueue=null,$p(a,v)));break;case 30:break;case 21:break;default:Xr(s,a),Qr(a)}}function Qr(a){var s=a.flags;if(s&2){try{for(var d,v=a.return;v!==null;){if(hA(v)){d=v;break}v=v.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var E=d.stateNode,A=xb(a);Up(a,A,E);break;case 5:var $=d.stateNode;d.flags&32&&(Li($,""),d.flags&=-33);var Z=xb(a);Up(a,Z,$);break;case 3:case 4:var fe=d.stateNode.containerInfo,we=xb(a);_b(a,we,fe);break;default:throw Error(r(161))}}catch(je){Ut(a,a.return,je)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function wA(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;wA(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),a=a.sibling}}function So(a,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)gA(a,s.alternate,s),s=s.sibling}function du(a){for(a=a.child;a!==null;){var s=a;switch(s.tag){case 0:case 11:case 14:case 15:Ns(4,s,s.return),du(s);break;case 1:Ua(s,s.return);var d=s.stateNode;typeof d.componentWillUnmount=="function"&&fA(s,s.return,d),du(s);break;case 27:Vd(s.stateNode);case 26:case 5:Ua(s,s.return),du(s);break;case 22:s.memoizedState===null&&du(s);break;case 30:du(s);break;default:du(s)}a=a.sibling}}function Co(a,s,d){for(d=d&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var v=s.alternate,E=a,A=s,$=A.flags;switch(A.tag){case 0:case 11:case 15:Co(E,A,d),Ld(4,A);break;case 1:if(Co(E,A,d),v=A,E=v.stateNode,typeof E.componentDidMount=="function")try{E.componentDidMount()}catch(we){Ut(v,v.return,we)}if(v=A,E=v.updateQueue,E!==null){var Z=v.stateNode;try{var fe=E.shared.hiddenCallbacks;if(fe!==null)for(E.shared.hiddenCallbacks=null,E=0;E<fe.length;E++)J4(fe[E],Z)}catch(we){Ut(v,v.return,we)}}d&&$&64&&cA(A),Rd(A,A.return);break;case 27:mA(A);case 26:case 5:Co(E,A,d),d&&v===null&&$&4&&dA(A),Rd(A,A.return);break;case 12:Co(E,A,d);break;case 31:Co(E,A,d),d&&$&4&&bA(E,A);break;case 13:Co(E,A,d),d&&$&4&&xA(E,A);break;case 22:A.memoizedState===null&&Co(E,A,d),Rd(A,A.return);break;case 30:break;default:Co(E,A,d)}s=s.sibling}}function Sb(a,s){var d=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(d=a.memoizedState.cachePool.pool),a=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),a!==d&&(a!=null&&a.refCount++,d!=null&&xd(d))}function Cb(a,s){a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&xd(a))}function ca(a,s,d,v){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)SA(a,s,d,v),s=s.sibling}function SA(a,s,d,v){var E=s.flags;switch(s.tag){case 0:case 11:case 15:ca(a,s,d,v),E&2048&&Ld(9,s);break;case 1:ca(a,s,d,v);break;case 3:ca(a,s,d,v),E&2048&&(a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&xd(a)));break;case 12:if(E&2048){ca(a,s,d,v),a=s.stateNode;try{var A=s.memoizedProps,$=A.id,Z=A.onPostCommit;typeof Z=="function"&&Z($,s.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(fe){Ut(s,s.return,fe)}}else ca(a,s,d,v);break;case 31:ca(a,s,d,v);break;case 13:ca(a,s,d,v);break;case 23:break;case 22:A=s.stateNode,$=s.alternate,s.memoizedState!==null?A._visibility&2?ca(a,s,d,v):Dd(a,s):A._visibility&2?ca(a,s,d,v):(A._visibility|=2,Mc(a,s,d,v,(s.subtreeFlags&10256)!==0||!1)),E&2048&&Sb($,s);break;case 24:ca(a,s,d,v),E&2048&&Cb(s.alternate,s);break;default:ca(a,s,d,v)}}function Mc(a,s,d,v,E){for(E=E&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var A=a,$=s,Z=d,fe=v,we=$.flags;switch($.tag){case 0:case 11:case 15:Mc(A,$,Z,fe,E),Ld(8,$);break;case 23:break;case 22:var je=$.stateNode;$.memoizedState!==null?je._visibility&2?Mc(A,$,Z,fe,E):Dd(A,$):(je._visibility|=2,Mc(A,$,Z,fe,E)),E&&we&2048&&Sb($.alternate,$);break;case 24:Mc(A,$,Z,fe,E),E&&we&2048&&Cb($.alternate,$);break;default:Mc(A,$,Z,fe,E)}s=s.sibling}}function Dd(a,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var d=a,v=s,E=v.flags;switch(v.tag){case 22:Dd(d,v),E&2048&&Sb(v.alternate,v);break;case 24:Dd(d,v),E&2048&&Cb(v.alternate,v);break;default:Dd(d,v)}s=s.sibling}}var kd=8192;function Pc(a,s,d){if(a.subtreeFlags&kd)for(a=a.child;a!==null;)CA(a,s,d),a=a.sibling}function CA(a,s,d){switch(a.tag){case 26:Pc(a,s,d),a.flags&kd&&a.memoizedState!==null&&h$(d,ua,a.memoizedState,a.memoizedProps);break;case 5:Pc(a,s,d);break;case 3:case 4:var v=ua;ua=tg(a.stateNode.containerInfo),Pc(a,s,d),ua=v;break;case 22:a.memoizedState===null&&(v=a.alternate,v!==null&&v.memoizedState!==null?(v=kd,kd=16777216,Pc(a,s,d),kd=v):Pc(a,s,d));break;default:Pc(a,s,d)}}function EA(a){var s=a.alternate;if(s!==null&&(a=s.child,a!==null)){s.child=null;do s=a.sibling,a.sibling=null,a=s;while(a!==null)}}function Id(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var d=0;d<s.length;d++){var v=s[d];sr=v,OA(v,a)}EA(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)AA(a),a=a.sibling}function AA(a){switch(a.tag){case 0:case 11:case 15:Id(a),a.flags&2048&&Ns(9,a,a.return);break;case 3:Id(a);break;case 12:Id(a);break;case 22:var s=a.stateNode;a.memoizedState!==null&&s._visibility&2&&(a.return===null||a.return.tag!==13)?(s._visibility&=-3,Fp(a)):Id(a);break;default:Id(a)}}function Fp(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var d=0;d<s.length;d++){var v=s[d];sr=v,OA(v,a)}EA(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:Ns(8,s,s.return),Fp(s);break;case 22:d=s.stateNode,d._visibility&2&&(d._visibility&=-3,Fp(s));break;default:Fp(s)}a=a.sibling}}function OA(a,s){for(;sr!==null;){var d=sr;switch(d.tag){case 0:case 11:case 15:Ns(8,d,s);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var v=d.memoizedState.cachePool.pool;v!=null&&v.refCount++}break;case 24:xd(d.memoizedState.cache)}if(v=d.child,v!==null)v.return=d,sr=v;else e:for(d=a;sr!==null;){v=sr;var E=v.sibling,A=v.return;if(vA(v),v===d){sr=null;break e}if(E!==null){E.return=A,sr=E;break e}sr=A}}}var TU={getCacheForType:function(a){var s=mr(In),d=s.data.get(a);return d===void 0&&(d=a(),s.data.set(a,d)),d},cacheSignal:function(){return mr(In).controller.signal}},jU=typeof WeakMap=="function"?WeakMap:Map,Dt=0,Wt=null,vt=null,wt=0,Bt=0,di=null,Ls=!1,Nc=!1,Eb=!1,Eo=0,Tn=0,Rs=0,hu=0,Ab=0,hi=0,Lc=0,zd=null,Jr=null,Ob=!1,Vp=0,TA=0,Hp=1/0,qp=null,Ds=null,Wn=0,ks=null,Rc=null,Ao=0,Tb=0,jb=null,jA=null,Bd=0,Mb=null;function mi(){return(Dt&2)!==0&&wt!==0?wt&-wt:Y.T!==null?kb():Kf()}function MA(){if(hi===0)if((wt&536870912)===0||gt){var a=Ml;Ml<<=1,(Ml&3932160)===0&&(Ml=262144),hi=a}else hi=536870912;return a=ci.current,a!==null&&(a.flags|=32),hi}function ei(a,s,d){(a===Wt&&(Bt===2||Bt===9)||a.cancelPendingCommit!==null)&&(Dc(a,0),Is(a,wt,hi,!1)),io(a,d),((Dt&2)===0||a!==Wt)&&(a===Wt&&((Dt&2)===0&&(hu|=d),Tn===4&&Is(a,wt,hi,!1)),$a(a))}function PA(a,s,d){if((Dt&6)!==0)throw Error(r(327));var v=!d&&(s&127)===0&&(s&a.expiredLanes)===0||Nl(a,s),E=v?NU(a,s):Nb(a,s,!0),A=v;do{if(E===0){Nc&&!v&&Is(a,s,0,!1);break}else{if(d=a.current.alternate,A&&!MU(d)){E=Nb(a,s,!1),A=!1;continue}if(E===2){if(A=s,a.errorRecoveryDisabledLanes&A)var $=0;else $=a.pendingLanes&-536870913,$=$!==0?$:$&536870912?536870912:0;if($!==0){s=$;e:{var Z=a;E=zd;var fe=Z.current.memoizedState.isDehydrated;if(fe&&(Dc(Z,$).flags|=256),$=Nb(Z,$,!1),$!==2){if(Eb&&!fe){Z.errorRecoveryDisabledLanes|=A,hu|=A,E=4;break e}A=Jr,Jr=E,A!==null&&(Jr===null?Jr=A:Jr.push.apply(Jr,A))}E=$}if(A=!1,E!==2)continue}}if(E===1){Dc(a,0),Is(a,s,0,!0);break}e:{switch(v=a,A=E,A){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:Is(v,s,hi,!Ls);break e;case 2:Jr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(E=Vp+300-mt(),10<E)){if(Is(v,s,hi,!Ls),tc(v,0,!0)!==0)break e;Ao=s,v.timeoutHandle=lO(NA.bind(null,v,d,Jr,qp,Ob,s,hi,hu,Lc,Ls,A,"Throttled",-0,0),E);break e}NA(v,d,Jr,qp,Ob,s,hi,hu,Lc,Ls,A,null,-0,0)}}break}while(!0);$a(a)}function NA(a,s,d,v,E,A,$,Z,fe,we,je,Ne,Ee,Te){if(a.timeoutHandle=-1,Ne=s.subtreeFlags,Ne&8192||(Ne&16785408)===16785408){Ne={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:qr},CA(s,A,Ne);var Fe=(A&62914560)===A?Vp-mt():(A&4194048)===A?TA-mt():0;if(Fe=m$(Ne,Fe),Fe!==null){Ao=A,a.cancelPendingCommit=Fe(UA.bind(null,a,s,A,d,v,E,$,Z,fe,je,Ne,null,Ee,Te)),Is(a,A,$,!we);return}}UA(a,s,A,d,v,E,$,Z,fe)}function MU(a){for(var s=a;;){var d=s.tag;if((d===0||d===11||d===15)&&s.flags&16384&&(d=s.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var v=0;v<d.length;v++){var E=d[v],A=E.getSnapshot;E=E.value;try{if(!ar(A(),E))return!1}catch{return!1}}if(d=s.child,s.subtreeFlags&16384&&d!==null)d.return=s,s=d;else{if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Is(a,s,d,v){s&=~Ab,s&=~hu,a.suspendedLanes|=s,a.pingedLanes&=~s,v&&(a.warmLanes|=s),v=a.expirationTimes;for(var E=s;0<E;){var A=31-Gt(E),$=1<<A;v[A]=-1,E&=~$}d!==0&&Hm(a,d,s)}function Gp(){return(Dt&6)===0?(Ud(0),!1):!0}function Pb(){if(vt!==null){if(Bt===0)var a=vt.return;else a=vt,la=Ba=null,Y1(a),Ec=null,wd=0,a=vt;for(;a!==null;)uA(a.alternate,a),a=a.return;vt=null}}function Dc(a,s){var d=a.timeoutHandle;d!==-1&&(a.timeoutHandle=-1,ZU(d)),d=a.cancelPendingCommit,d!==null&&(a.cancelPendingCommit=null,d()),Ao=0,Pb(),Wt=a,vt=d=Ui(a.current,null),wt=s,Bt=0,di=null,Ls=!1,Nc=Nl(a,s),Eb=!1,Lc=hi=Ab=hu=Rs=Tn=0,Jr=zd=null,Ob=!1,(s&8)!==0&&(s|=s&32);var v=a.entangledLanes;if(v!==0)for(a=a.entanglements,v&=s;0<v;){var E=31-Gt(v),A=1<<E;s|=a[E],v&=~A}return Eo=s,eu(),d}function LA(a,s){ut=null,Y.H=Md,s===Cc||s===_p?(s=K4(),Bt=3):s===D1?(s=K4(),Bt=4):Bt=s===ub?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,di=s,vt===null&&(Tn=1,Dp(a,p(s,a.current)))}function RA(){var a=ci.current;return a===null?!0:(wt&4194048)===wt?$i===null:(wt&62914560)===wt||(wt&536870912)!==0?a===$i:!1}function DA(){var a=Y.H;return Y.H=Md,a===null?Md:a}function kA(){var a=Y.A;return Y.A=TU,a}function Yp(){Tn=4,Ls||(wt&4194048)!==wt&&ci.current!==null||(Nc=!0),(Rs&134217727)===0&&(hu&134217727)===0||Wt===null||Is(Wt,wt,hi,!1)}function Nb(a,s,d){var v=Dt;Dt|=2;var E=DA(),A=kA();(Wt!==a||wt!==s)&&(qp=null,Dc(a,s)),s=!1;var $=Tn;e:do try{if(Bt!==0&&vt!==null){var Z=vt,fe=di;switch(Bt){case 8:Pb(),$=6;break e;case 3:case 2:case 9:case 6:ci.current===null&&(s=!0);var we=Bt;if(Bt=0,di=null,kc(a,Z,fe,we),d&&Nc){$=0;break e}break;default:we=Bt,Bt=0,di=null,kc(a,Z,fe,we)}}PU(),$=Tn;break}catch(je){LA(a,je)}while(!0);return s&&a.shellSuspendCounter++,la=Ba=null,Dt=v,Y.H=E,Y.A=A,vt===null&&(Wt=null,wt=0,eu()),$}function PU(){for(;vt!==null;)IA(vt)}function NU(a,s){var d=Dt;Dt|=2;var v=DA(),E=kA();Wt!==a||wt!==s?(qp=null,Hp=mt()+500,Dc(a,s)):Nc=Nl(a,s);e:do try{if(Bt!==0&&vt!==null){s=vt;var A=di;t:switch(Bt){case 1:Bt=0,di=null,kc(a,s,A,1);break;case 2:case 9:if(Y4(A)){Bt=0,di=null,zA(s);break}s=function(){Bt!==2&&Bt!==9||Wt!==a||(Bt=7),$a(a)},A.then(s,s);break e;case 3:Bt=7;break e;case 4:Bt=5;break e;case 7:Y4(A)?(Bt=0,di=null,zA(s)):(Bt=0,di=null,kc(a,s,A,7));break;case 5:var $=null;switch(vt.tag){case 26:$=vt.memoizedState;case 5:case 27:var Z=vt;if($?SO($):Z.stateNode.complete){Bt=0,di=null;var fe=Z.sibling;if(fe!==null)vt=fe;else{var we=Z.return;we!==null?(vt=we,Wp(we)):vt=null}break t}}Bt=0,di=null,kc(a,s,A,5);break;case 6:Bt=0,di=null,kc(a,s,A,6);break;case 8:Pb(),Tn=6;break e;default:throw Error(r(462))}}LU();break}catch(je){LA(a,je)}while(!0);return la=Ba=null,Y.H=v,Y.A=E,Dt=d,vt!==null?0:(Wt=null,wt=0,eu(),Tn)}function LU(){for(;vt!==null&&!at();)IA(vt)}function IA(a){var s=sA(a.alternate,a,Eo);a.memoizedProps=a.pendingProps,s===null?Wp(a):vt=s}function zA(a){var s=a,d=s.alternate;switch(s.tag){case 15:case 0:s=tA(d,s,s.pendingProps,s.type,void 0,wt);break;case 11:s=tA(d,s,s.pendingProps,s.type.render,s.ref,wt);break;case 5:Y1(s);default:uA(d,s),s=vt=pd(s,Eo),s=sA(d,s,Eo)}a.memoizedProps=a.pendingProps,s===null?Wp(a):vt=s}function kc(a,s,d,v){la=Ba=null,Y1(s),Ec=null,wd=0;var E=s.return;try{if(_U(a,E,s,d,wt)){Tn=1,Dp(a,p(d,a.current)),vt=null;return}}catch(A){if(E!==null)throw vt=E,A;Tn=1,Dp(a,p(d,a.current)),vt=null;return}s.flags&32768?(gt||v===1?a=!0:Nc||(wt&536870912)!==0?a=!1:(Ls=a=!0,(v===2||v===9||v===3||v===6)&&(v=ci.current,v!==null&&v.tag===13&&(v.flags|=16384))),BA(s,a)):Wp(s)}function Wp(a){var s=a;do{if((s.flags&32768)!==0){BA(s,Ls);return}a=s.return;var d=CU(s.alternate,s,Eo);if(d!==null){vt=d;return}if(s=s.sibling,s!==null){vt=s;return}vt=s=a}while(s!==null);Tn===0&&(Tn=5)}function BA(a,s){do{var d=EU(a.alternate,a);if(d!==null){d.flags&=32767,vt=d;return}if(d=a.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!s&&(a=a.sibling,a!==null)){vt=a;return}vt=a=d}while(a!==null);Tn=6,vt=null}function UA(a,s,d,v,E,A,$,Z,fe){a.cancelPendingCommit=null;do Kp();while(Wn!==0);if((Dt&6)!==0)throw Error(r(327));if(s!==null){if(s===a.current)throw Error(r(177));if(A=s.lanes|s.childLanes,A|=vc,m1(a,d,A,$,Z,fe),a===Wt&&(vt=Wt=null,wt=0),Rc=s,ks=a,Ao=d,Tb=A,jb=E,jA=v,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,IU(Rt,function(){return qA(),null})):(a.callbackNode=null,a.callbackPriority=0),v=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||v){v=Y.T,Y.T=null,E=I.p,I.p=2,$=Dt,Dt|=4;try{AU(a,s,d)}finally{Dt=$,I.p=E,Y.T=v}}Wn=1,$A(),FA(),VA()}}function $A(){if(Wn===1){Wn=0;var a=ks,s=Rc,d=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||d){d=Y.T,Y.T=null;var v=I.p;I.p=2;var E=Dt;Dt|=4;try{_A(s,a);var A=Hb,$=Kl(a.containerInfo),Z=A.focusedElem,fe=A.selectionRange;if($!==Z&&Z&&Z.ownerDocument&&hc(Z.ownerDocument.documentElement,Z)){if(fe!==null&&Na(Z)){var we=fe.start,je=fe.end;if(je===void 0&&(je=we),"selectionStart"in Z)Z.selectionStart=we,Z.selectionEnd=Math.min(je,Z.value.length);else{var Ne=Z.ownerDocument||document,Ee=Ne&&Ne.defaultView||window;if(Ee.getSelection){var Te=Ee.getSelection(),Fe=Z.textContent.length,et=Math.min(fe.start,Fe),qt=fe.end===void 0?et:Math.min(fe.end,Fe);!Te.extend&&et>qt&&($=qt,qt=et,et=$);var ge=Wl(Z,et),pe=Wl(Z,qt);if(ge&&pe&&(Te.rangeCount!==1||Te.anchorNode!==ge.node||Te.anchorOffset!==ge.offset||Te.focusNode!==pe.node||Te.focusOffset!==pe.offset)){var _e=Ne.createRange();_e.setStart(ge.node,ge.offset),Te.removeAllRanges(),et>qt?(Te.addRange(_e),Te.extend(pe.node,pe.offset)):(_e.setEnd(pe.node,pe.offset),Te.addRange(_e))}}}}for(Ne=[],Te=Z;Te=Te.parentNode;)Te.nodeType===1&&Ne.push({element:Te,left:Te.scrollLeft,top:Te.scrollTop});for(typeof Z.focus=="function"&&Z.focus(),Z=0;Z<Ne.length;Z++){var Me=Ne[Z];Me.element.scrollLeft=Me.left,Me.element.scrollTop=Me.top}}sg=!!Vb,Hb=Vb=null}finally{Dt=E,I.p=v,Y.T=d}}a.current=s,Wn=2}}function FA(){if(Wn===2){Wn=0;var a=ks,s=Rc,d=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||d){d=Y.T,Y.T=null;var v=I.p;I.p=2;var E=Dt;Dt|=4;try{gA(a,s.alternate,s)}finally{Dt=E,I.p=v,Y.T=d}}Wn=3}}function VA(){if(Wn===4||Wn===3){Wn=0,zt();var a=ks,s=Rc,d=Ao,v=jA;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Wn=5:(Wn=0,Rc=ks=null,HA(a,a.pendingLanes));var E=a.pendingLanes;if(E===0&&(Ds=null),Ge(d),s=s.stateNode,Cn&&typeof Cn.onCommitFiberRoot=="function")try{Cn.onCommitFiberRoot(Jt,s,void 0,(s.current.flags&128)===128)}catch{}if(v!==null){s=Y.T,E=I.p,I.p=2,Y.T=null;try{for(var A=a.onRecoverableError,$=0;$<v.length;$++){var Z=v[$];A(Z.value,{componentStack:Z.stack})}}finally{Y.T=s,I.p=E}}(Ao&3)!==0&&Kp(),$a(a),E=a.pendingLanes,(d&261930)!==0&&(E&42)!==0?a===Mb?Bd++:(Bd=0,Mb=a):Bd=0,Ud(0)}}function HA(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,xd(s)))}function Kp(){return $A(),FA(),VA(),qA()}function qA(){if(Wn!==5)return!1;var a=ks,s=Tb;Tb=0;var d=Ge(Ao),v=Y.T,E=I.p;try{I.p=32>d?32:d,Y.T=null,d=jb,jb=null;var A=ks,$=Ao;if(Wn=0,Rc=ks=null,Ao=0,(Dt&6)!==0)throw Error(r(331));var Z=Dt;if(Dt|=4,AA(A.current),SA(A,A.current,$,d),Dt=Z,Ud(0,!1),Cn&&typeof Cn.onPostCommitFiberRoot=="function")try{Cn.onPostCommitFiberRoot(Jt,A)}catch{}return!0}finally{I.p=E,Y.T=v,HA(a,s)}}function GA(a,s,d){s=p(d,s),s=lb(a.stateNode,s,2),a=js(a,s,2),a!==null&&(io(a,2),$a(a))}function Ut(a,s,d){if(a.tag===3)GA(a,a,d);else for(;s!==null;){if(s.tag===3){GA(s,a,d);break}else if(s.tag===1){var v=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(Ds===null||!Ds.has(v))){a=p(d,a),d=YE(2),v=js(s,d,2),v!==null&&(WE(d,v,s,a),io(v,2),$a(v));break}}s=s.return}}function Lb(a,s,d){var v=a.pingCache;if(v===null){v=a.pingCache=new jU;var E=new Set;v.set(s,E)}else E=v.get(s),E===void 0&&(E=new Set,v.set(s,E));E.has(d)||(Eb=!0,E.add(d),a=RU.bind(null,a,s,d),s.then(a,a))}function RU(a,s,d){var v=a.pingCache;v!==null&&v.delete(s),a.pingedLanes|=a.suspendedLanes&d,a.warmLanes&=~d,Wt===a&&(wt&d)===d&&(Tn===4||Tn===3&&(wt&62914560)===wt&&300>mt()-Vp?(Dt&2)===0&&Dc(a,0):Ab|=d,Lc===wt&&(Lc=0)),$a(a)}function YA(a,s){s===0&&(s=Vm()),a=Bi(a,s),a!==null&&(io(a,s),$a(a))}function DU(a){var s=a.memoizedState,d=0;s!==null&&(d=s.retryLane),YA(a,d)}function kU(a,s){var d=0;switch(a.tag){case 31:case 13:var v=a.stateNode,E=a.memoizedState;E!==null&&(d=E.retryLane);break;case 19:v=a.stateNode;break;case 22:v=a.stateNode._retryCache;break;default:throw Error(r(314))}v!==null&&v.delete(s),YA(a,d)}function IU(a,s){return Je(a,s)}var Zp=null,Ic=null,Rb=!1,Xp=!1,Db=!1,zs=0;function $a(a){a!==Ic&&a.next===null&&(Ic===null?Zp=Ic=a:Ic=Ic.next=a),Xp=!0,Rb||(Rb=!0,BU())}function Ud(a,s){if(!Db&&Xp){Db=!0;do for(var d=!1,v=Zp;v!==null;){if(a!==0){var E=v.pendingLanes;if(E===0)var A=0;else{var $=v.suspendedLanes,Z=v.pingedLanes;A=(1<<31-Gt(42|a)+1)-1,A&=E&~($&~Z),A=A&201326741?A&201326741|1:A?A|2:0}A!==0&&(d=!0,XA(v,A))}else A=wt,A=tc(v,v===Wt?A:0,v.cancelPendingCommit!==null||v.timeoutHandle!==-1),(A&3)===0||Nl(v,A)||(d=!0,XA(v,A));v=v.next}while(d);Db=!1}}function zU(){WA()}function WA(){Xp=Rb=!1;var a=0;zs!==0&&KU()&&(a=zs);for(var s=mt(),d=null,v=Zp;v!==null;){var E=v.next,A=KA(v,s);A===0?(v.next=null,d===null?Zp=E:d.next=E,E===null&&(Ic=d)):(d=v,(a!==0||(A&3)!==0)&&(Xp=!0)),v=E}Wn!==0&&Wn!==5||Ud(a),zs!==0&&(zs=0)}function KA(a,s){for(var d=a.suspendedLanes,v=a.pingedLanes,E=a.expirationTimes,A=a.pendingLanes&-62914561;0<A;){var $=31-Gt(A),Z=1<<$,fe=E[$];fe===-1?((Z&d)===0||(Z&v)!==0)&&(E[$]=h1(Z,s)):fe<=s&&(a.expiredLanes|=Z),A&=~Z}if(s=Wt,d=wt,d=tc(a,a===s?d:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),v=a.callbackNode,d===0||a===s&&(Bt===2||Bt===9)||a.cancelPendingCommit!==null)return v!==null&&v!==null&&Ke(v),a.callbackNode=null,a.callbackPriority=0;if((d&3)===0||Nl(a,d)){if(s=d&-d,s===a.callbackPriority)return s;switch(v!==null&&Ke(v),Ge(d)){case 2:case 8:d=Qe;break;case 32:d=Rt;break;case 268435456:d=nt;break;default:d=Rt}return v=ZA.bind(null,a),d=Je(d,v),a.callbackPriority=s,a.callbackNode=d,s}return v!==null&&v!==null&&Ke(v),a.callbackPriority=2,a.callbackNode=null,2}function ZA(a,s){if(Wn!==0&&Wn!==5)return a.callbackNode=null,a.callbackPriority=0,null;var d=a.callbackNode;if(Kp()&&a.callbackNode!==d)return null;var v=wt;return v=tc(a,a===Wt?v:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),v===0?null:(PA(a,v,s),KA(a,mt()),a.callbackNode!=null&&a.callbackNode===d?ZA.bind(null,a):null)}function XA(a,s){if(Kp())return null;PA(a,s,!0)}function BU(){XU(function(){(Dt&6)!==0?Je(ht,zU):WA()})}function kb(){if(zs===0){var a=wc;a===0&&(a=jl,jl<<=1,(jl&261888)===0&&(jl=256)),zs=a}return zs}function QA(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:hs(""+a)}function JA(a,s){var d=s.ownerDocument.createElement("input");return d.name=s.name,d.value=s.value,a.id&&d.setAttribute("form",a.id),s.parentNode.insertBefore(d,s),a=new FormData(a),d.parentNode.removeChild(d),a}function UU(a,s,d,v,E){if(s==="submit"&&d&&d.stateNode===E){var A=QA((E[ir]||null).action),$=v.submitter;$&&(s=(s=$[ir]||null)?QA(s.formAction):$.getAttribute("formAction"),s!==null&&(A=s,$=null));var Z=new oc("action","action",null,v,E);a.push({event:Z,listeners:[{instance:null,listener:function(){if(v.defaultPrevented){if(zs!==0){var fe=$?JA(E,$):new FormData(E);nb(d,{pending:!0,data:fe,method:E.method,action:A},null,fe)}}else typeof A=="function"&&(Z.preventDefault(),fe=$?JA(E,$):new FormData(E),nb(d,{pending:!0,data:fe,method:E.method,action:A},A,fe))},currentTarget:E}]})}}for(var Ib=0;Ib<Da.length;Ib++){var zb=Da[Ib],$U=zb.toLowerCase(),FU=zb[0].toUpperCase()+zb.slice(1);Yr($U,"on"+FU)}Yr(Xl,"onAnimationEnd"),Yr(pp,"onAnimationIteration"),Yr(Ql,"onAnimationStart"),Yr("dblclick","onDoubleClick"),Yr("focusin","onFocus"),Yr("focusout","onBlur"),Yr(O1,"onTransitionRun"),Yr(gp,"onTransitionStart"),Yr(T1,"onTransitionCancel"),Yr(Cs,"onTransitionEnd"),Ta("onMouseEnter",["mouseout","mouseover"]),Ta("onMouseLeave",["mouseout","mouseover"]),Ta("onPointerEnter",["pointerout","pointerover"]),Ta("onPointerLeave",["pointerout","pointerover"]),so("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),so("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),so("onBeforeInput",["compositionend","keypress","textInput","paste"]),so("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),so("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),so("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $d="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(" "),VU=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat($d));function eO(a,s){s=(s&4)!==0;for(var d=0;d<a.length;d++){var v=a[d],E=v.event;v=v.listeners;e:{var A=void 0;if(s)for(var $=v.length-1;0<=$;$--){var Z=v[$],fe=Z.instance,we=Z.currentTarget;if(Z=Z.listener,fe!==A&&E.isPropagationStopped())break e;A=Z,E.currentTarget=we;try{A(E)}catch(je){Jl(je)}E.currentTarget=null,A=fe}else for($=0;$<v.length;$++){if(Z=v[$],fe=Z.instance,we=Z.currentTarget,Z=Z.listener,fe!==A&&E.isPropagationStopped())break e;A=Z,E.currentTarget=we;try{A(E)}catch(je){Jl(je)}E.currentTarget=null,A=fe}}}}function yt(a,s){var d=s[Aa];d===void 0&&(d=s[Aa]=new Set);var v=a+"__bubble";d.has(v)||(tO(s,a,2,!1),d.add(v))}function Bb(a,s,d){var v=0;s&&(v|=4),tO(d,a,v,s)}var Qp="_reactListening"+Math.random().toString(36).slice(2);function Ub(a){if(!a[Qp]){a[Qp]=!0,Km.forEach(function(d){d!=="selectionchange"&&(VU.has(d)||Bb(d,!1,a),Bb(d,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[Qp]||(s[Qp]=!0,Bb("selectionchange",!1,s))}}function tO(a,s,d,v){switch(MO(s)){case 2:var E=v$;break;case 8:E=y$;break;default:E=tx}d=E.bind(null,s,d,a),E=void 0,!Bl||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(E=!0),v?E!==void 0?a.addEventListener(s,d,{capture:!0,passive:E}):a.addEventListener(s,d,!0):E!==void 0?a.addEventListener(s,d,{passive:E}):a.addEventListener(s,d,!1)}function $b(a,s,d,v,E){var A=v;if((s&1)===0&&(s&2)===0&&v!==null)e:for(;;){if(v===null)return;var $=v.tag;if($===3||$===4){var Z=v.stateNode.containerInfo;if(Z===E)break;if($===4)for($=v.return;$!==null;){var fe=$.tag;if((fe===3||fe===4)&&$.stateNode.containerInfo===E)return;$=$.return}for(;Z!==null;){if($=oo(Z),$===null)return;if(fe=$.tag,fe===5||fe===6||fe===26||fe===27){v=A=$;continue e}Z=Z.parentNode}}v=v.return}id(function(){var we=A,je=zl(d),Ne=[];e:{var Ee=vp.get(a);if(Ee!==void 0){var Te=oc,Fe=a;switch(a){case"keypress":if(Ul(d)===0)break e;case"keydown":case"keyup":Te=rp;break;case"focusin":Fe="focus",Te=sd;break;case"focusout":Fe="blur",Te=sd;break;case"beforeblur":case"afterblur":Te=sd;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Te=Qm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Te=g1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Te=_1;break;case Xl:case pp:case Ql:Te=ld;break;case Cs:Te=op;break;case"scroll":case"scrollend":Te=_t;break;case"wheel":Te=fo;break;case"copy":case"cut":case"paste":Te=Di;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Te=ip;break;case"toggle":case"beforetoggle":Te=Vl}var et=(s&4)!==0,qt=!et&&(a==="scroll"||a==="scrollend"),ge=et?Ee!==null?Ee+"Capture":null:Ee;et=[];for(var pe=we,_e;pe!==null;){var Me=pe;if(_e=Me.stateNode,Me=Me.tag,Me!==5&&Me!==26&&Me!==27||_e===null||ge===null||(Me=uo(pe,ge),Me!=null&&et.push(Fd(pe,Me,_e))),qt)break;pe=pe.return}0<et.length&&(Ee=new Te(Ee,Fe,null,d,je),Ne.push({event:Ee,listeners:et}))}}if((s&7)===0){e:{if(Ee=a==="mouseover"||a==="pointerover",Te=a==="mouseout"||a==="pointerout",Ee&&d!==ac&&(Fe=d.relatedTarget||d.fromElement)&&(oo(Fe)||Fe[ao]))break e;if((Te||Ee)&&(Ee=je.window===je?je:(Ee=je.ownerDocument)?Ee.defaultView||Ee.parentWindow:window,Te?(Fe=d.relatedTarget||d.toElement,Te=we,Fe=Fe?oo(Fe):null,Fe!==null&&(qt=o(Fe),et=Fe.tag,Fe!==qt||et!==5&&et!==27&&et!==6)&&(Fe=null)):(Te=null,Fe=we),Te!==Fe)){if(et=Qm,Me="onMouseLeave",ge="onMouseEnter",pe="mouse",(a==="pointerout"||a==="pointerover")&&(et=ip,Me="onPointerLeave",ge="onPointerEnter",pe="pointer"),qt=Te==null?Ee:Oa(Te),_e=Fe==null?Ee:Oa(Fe),Ee=new et(Me,pe+"leave",Te,d,je),Ee.target=qt,Ee.relatedTarget=_e,Me=null,oo(je)===we&&(et=new et(ge,pe+"enter",Fe,d,je),et.target=_e,et.relatedTarget=qt,Me=et),qt=Me,Te&&Fe)t:{for(et=HU,ge=Te,pe=Fe,_e=0,Me=ge;Me;Me=et(Me))_e++;Me=0;for(var Ze=pe;Ze;Ze=et(Ze))Me++;for(;0<_e-Me;)ge=et(ge),_e--;for(;0<Me-_e;)pe=et(pe),Me--;for(;_e--;){if(ge===pe||pe!==null&&ge===pe.alternate){et=ge;break t}ge=et(ge),pe=et(pe)}et=null}else et=null;Te!==null&&nO(Ne,Ee,Te,et,!1),Fe!==null&&qt!==null&&nO(Ne,qt,Fe,et,!0)}}e:{if(Ee=we?Oa(we):window,Te=Ee.nodeName&&Ee.nodeName.toLowerCase(),Te==="select"||Te==="input"&&Ee.type==="file")var Mt=Yl;else if(ki(Ee))if(cp)Mt=A1;else{Mt=E1;var qe=aa}else Te=Ee.nodeName,!Te||Te.toLowerCase()!=="input"||Ee.type!=="checkbox"&&Ee.type!=="radio"?we&&Il(we.elementType)&&(Mt=Yl):Mt=xs;if(Mt&&(Mt=Mt(a,we))){up(Ne,Mt,d,je);break e}qe&&qe(a,Ee,we),a==="focusout"&&we&&Ee.type==="number"&&we.memoizedProps.value!=null&&na(Ee,"number",Ee.value)}switch(qe=we?Oa(we):window,a){case"focusin":(ki(qe)||qe.contentEditable==="true")&&(La=qe,pc=we,Zl=null);break;case"focusout":Zl=pc=La=null;break;case"mousedown":ws=!0;break;case"contextmenu":case"mouseup":case"dragend":ws=!1,hp(Ne,d,je);break;case"selectionchange":if(mc)break;case"keydown":case"keyup":hp(Ne,d,je)}var ft;if(lc)e:{switch(a){case"compositionstart":var St="onCompositionStart";break e;case"compositionend":St="onCompositionEnd";break e;case"compositionupdate":St="onCompositionUpdate";break e}St=void 0}else vs?lp(a,d)&&(St="onCompositionEnd"):a==="keydown"&&d.keyCode===229&&(St="onCompositionStart");St&&(uc&&d.locale!=="ko"&&(vs||St!=="onCompositionStart"?St==="onCompositionEnd"&&vs&&(ft=Ma()):(Ri=je,co="value"in Ri?Ri.value:Ri.textContent,vs=!0)),qe=Jp(we,St),0<qe.length&&(St=new ud(St,a,null,d,je),Ne.push({event:St,listeners:qe}),ft?St.data=ft:(ft=hd(d),ft!==null&&(St.data=ft)))),(ft=S1?ui(a,d):ys(a,d))&&(St=Jp(we,"onBeforeInput"),0<St.length&&(qe=new ud("onBeforeInput","beforeinput",null,d,je),Ne.push({event:qe,listeners:St}),qe.data=ft)),UU(Ne,a,we,d,je)}eO(Ne,s)})}function Fd(a,s,d){return{instance:a,listener:s,currentTarget:d}}function Jp(a,s){for(var d=s+"Capture",v=[];a!==null;){var E=a,A=E.stateNode;if(E=E.tag,E!==5&&E!==26&&E!==27||A===null||(E=uo(a,d),E!=null&&v.unshift(Fd(a,E,A)),E=uo(a,s),E!=null&&v.push(Fd(a,E,A))),a.tag===3)return v;a=a.return}return[]}function HU(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function nO(a,s,d,v,E){for(var A=s._reactName,$=[];d!==null&&d!==v;){var Z=d,fe=Z.alternate,we=Z.stateNode;if(Z=Z.tag,fe!==null&&fe===v)break;Z!==5&&Z!==26&&Z!==27||we===null||(fe=we,E?(we=uo(d,A),we!=null&&$.unshift(Fd(d,we,fe))):E||(we=uo(d,A),we!=null&&$.push(Fd(d,we,fe)))),d=d.return}$.length!==0&&a.push({event:s,listeners:$})}var qU=/\r\n?/g,GU=/\u0000|\uFFFD/g;function rO(a){return(typeof a=="string"?a:""+a).replace(qU,`
|
||
`).replace(GU,"")}function iO(a,s){return s=rO(s),rO(a)===s}function Ht(a,s,d,v,E,A){switch(d){case"children":typeof v=="string"?s==="body"||s==="textarea"&&v===""||Li(a,v):(typeof v=="number"||typeof v=="bigint")&&s!=="body"&&Li(a,""+v);break;case"className":Ft(a,"class",v);break;case"tabIndex":Ft(a,"tabindex",v);break;case"dir":case"role":case"viewBox":case"width":case"height":Ft(a,d,v);break;case"style":rc(a,v,A);break;case"data":if(s!=="object"){Ft(a,"data",v);break}case"src":case"href":if(v===""&&(s!=="a"||d!=="href")){a.removeAttribute(d);break}if(v==null||typeof v=="function"||typeof v=="symbol"||typeof v=="boolean"){a.removeAttribute(d);break}v=hs(""+v),a.setAttribute(d,v);break;case"action":case"formAction":if(typeof v=="function"){a.setAttribute(d,"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 A=="function"&&(d==="formAction"?(s!=="input"&&Ht(a,s,"name",E.name,E,null),Ht(a,s,"formEncType",E.formEncType,E,null),Ht(a,s,"formMethod",E.formMethod,E,null),Ht(a,s,"formTarget",E.formTarget,E,null)):(Ht(a,s,"encType",E.encType,E,null),Ht(a,s,"method",E.method,E,null),Ht(a,s,"target",E.target,E,null)));if(v==null||typeof v=="symbol"||typeof v=="boolean"){a.removeAttribute(d);break}v=hs(""+v),a.setAttribute(d,v);break;case"onClick":v!=null&&(a.onclick=qr);break;case"onScroll":v!=null&&yt("scroll",a);break;case"onScrollEnd":v!=null&&yt("scrollend",a);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(d=v.__html,d!=null){if(E.children!=null)throw Error(r(60));a.innerHTML=d}}break;case"multiple":a.multiple=v&&typeof v!="function"&&typeof v!="symbol";break;case"muted":a.muted=v&&typeof v!="function"&&typeof v!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(v==null||typeof v=="function"||typeof v=="boolean"||typeof v=="symbol"){a.removeAttribute("xlink:href");break}d=hs(""+v),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":v!=null&&typeof v!="function"&&typeof v!="symbol"?a.setAttribute(d,""+v):a.removeAttribute(d);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":v&&typeof v!="function"&&typeof v!="symbol"?a.setAttribute(d,""):a.removeAttribute(d);break;case"capture":case"download":v===!0?a.setAttribute(d,""):v!==!1&&v!=null&&typeof v!="function"&&typeof v!="symbol"?a.setAttribute(d,v):a.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":v!=null&&typeof v!="function"&&typeof v!="symbol"&&!isNaN(v)&&1<=v?a.setAttribute(d,v):a.removeAttribute(d);break;case"rowSpan":case"start":v==null||typeof v=="function"||typeof v=="symbol"||isNaN(v)?a.removeAttribute(d):a.setAttribute(d,v);break;case"popover":yt("beforetoggle",a),yt("toggle",a),pt(a,"popover",v);break;case"xlinkActuate":Hr(a,"http://www.w3.org/1999/xlink","xlink:actuate",v);break;case"xlinkArcrole":Hr(a,"http://www.w3.org/1999/xlink","xlink:arcrole",v);break;case"xlinkRole":Hr(a,"http://www.w3.org/1999/xlink","xlink:role",v);break;case"xlinkShow":Hr(a,"http://www.w3.org/1999/xlink","xlink:show",v);break;case"xlinkTitle":Hr(a,"http://www.w3.org/1999/xlink","xlink:title",v);break;case"xlinkType":Hr(a,"http://www.w3.org/1999/xlink","xlink:type",v);break;case"xmlBase":Hr(a,"http://www.w3.org/XML/1998/namespace","xml:base",v);break;case"xmlLang":Hr(a,"http://www.w3.org/XML/1998/namespace","xml:lang",v);break;case"xmlSpace":Hr(a,"http://www.w3.org/XML/1998/namespace","xml:space",v);break;case"is":pt(a,"is",v);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=ic.get(d)||d,pt(a,d,v))}}function Fb(a,s,d,v,E,A){switch(d){case"style":rc(a,v,A);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(d=v.__html,d!=null){if(E.children!=null)throw Error(r(60));a.innerHTML=d}}break;case"children":typeof v=="string"?Li(a,v):(typeof v=="number"||typeof v=="bigint")&&Li(a,""+v);break;case"onScroll":v!=null&&yt("scroll",a);break;case"onScrollEnd":v!=null&&yt("scrollend",a);break;case"onClick":v!=null&&(a.onclick=qr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Zm.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(E=d.endsWith("Capture"),s=d.slice(2,E?d.length-7:void 0),A=a[ir]||null,A=A!=null?A[d]:null,typeof A=="function"&&a.removeEventListener(s,A,E),typeof v=="function")){typeof A!="function"&&A!==null&&(d in a?a[d]=null:a.hasAttribute(d)&&a.removeAttribute(d)),a.addEventListener(s,v,E);break e}d in a?a[d]=v:v===!0?a.setAttribute(d,""):pt(a,d,v)}}}function gr(a,s,d){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":yt("error",a),yt("load",a);var v=!1,E=!1,A;for(A in d)if(d.hasOwnProperty(A)){var $=d[A];if($!=null)switch(A){case"src":v=!0;break;case"srcSet":E=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Ht(a,s,A,$,d,null)}}E&&Ht(a,s,"srcSet",d.srcSet,d,null),v&&Ht(a,s,"src",d.src,d,null);return;case"input":yt("invalid",a);var Z=A=$=E=null,fe=null,we=null;for(v in d)if(d.hasOwnProperty(v)){var je=d[v];if(je!=null)switch(v){case"name":E=je;break;case"type":$=je;break;case"checked":fe=je;break;case"defaultChecked":we=je;break;case"value":A=je;break;case"defaultValue":Z=je;break;case"children":case"dangerouslySetInnerHTML":if(je!=null)throw Error(r(137,s));break;default:Ht(a,s,v,je,d,null)}}kl(a,A,Z,fe,we,$,E,!1);return;case"select":yt("invalid",a),v=$=A=null;for(E in d)if(d.hasOwnProperty(E)&&(Z=d[E],Z!=null))switch(E){case"value":A=Z;break;case"defaultValue":$=Z;break;case"multiple":v=Z;default:Ht(a,s,E,Z,d,null)}s=A,d=$,a.multiple=!!v,s!=null?Yt(a,!!v,s,!1):d!=null&&Yt(a,!!v,d,!0);return;case"textarea":yt("invalid",a),A=E=v=null;for($ in d)if(d.hasOwnProperty($)&&(Z=d[$],Z!=null))switch($){case"value":v=Z;break;case"defaultValue":E=Z;break;case"children":A=Z;break;case"dangerouslySetInnerHTML":if(Z!=null)throw Error(r(91));break;default:Ht(a,s,$,Z,d,null)}fs(a,v,E,A);return;case"option":for(fe in d)d.hasOwnProperty(fe)&&(v=d[fe],v!=null)&&(fe==="selected"?a.selected=v&&typeof v!="function"&&typeof v!="symbol":Ht(a,s,fe,v,d,null));return;case"dialog":yt("beforetoggle",a),yt("toggle",a),yt("cancel",a),yt("close",a);break;case"iframe":case"object":yt("load",a);break;case"video":case"audio":for(v=0;v<$d.length;v++)yt($d[v],a);break;case"image":yt("error",a),yt("load",a);break;case"details":yt("toggle",a);break;case"embed":case"source":case"link":yt("error",a),yt("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(we in d)if(d.hasOwnProperty(we)&&(v=d[we],v!=null))switch(we){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Ht(a,s,we,v,d,null)}return;default:if(Il(s)){for(je in d)d.hasOwnProperty(je)&&(v=d[je],v!==void 0&&Fb(a,s,je,v,d,void 0));return}}for(Z in d)d.hasOwnProperty(Z)&&(v=d[Z],v!=null&&Ht(a,s,Z,v,d,null))}function YU(a,s,d,v){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var E=null,A=null,$=null,Z=null,fe=null,we=null,je=null;for(Te in d){var Ne=d[Te];if(d.hasOwnProperty(Te)&&Ne!=null)switch(Te){case"checked":break;case"value":break;case"defaultValue":fe=Ne;default:v.hasOwnProperty(Te)||Ht(a,s,Te,null,v,Ne)}}for(var Ee in v){var Te=v[Ee];if(Ne=d[Ee],v.hasOwnProperty(Ee)&&(Te!=null||Ne!=null))switch(Ee){case"type":A=Te;break;case"name":E=Te;break;case"checked":we=Te;break;case"defaultChecked":je=Te;break;case"value":$=Te;break;case"defaultValue":Z=Te;break;case"children":case"dangerouslySetInnerHTML":if(Te!=null)throw Error(r(137,s));break;default:Te!==Ne&&Ht(a,s,Ee,Te,v,Ne)}}td(a,$,Z,fe,we,je,A,E);return;case"select":Te=$=Z=Ee=null;for(A in d)if(fe=d[A],d.hasOwnProperty(A)&&fe!=null)switch(A){case"value":break;case"multiple":Te=fe;default:v.hasOwnProperty(A)||Ht(a,s,A,null,v,fe)}for(E in v)if(A=v[E],fe=d[E],v.hasOwnProperty(E)&&(A!=null||fe!=null))switch(E){case"value":Ee=A;break;case"defaultValue":Z=A;break;case"multiple":$=A;default:A!==fe&&Ht(a,s,E,A,v,fe)}s=Z,d=$,v=Te,Ee!=null?Yt(a,!!d,Ee,!1):!!v!=!!d&&(s!=null?Yt(a,!!d,s,!0):Yt(a,!!d,d?[]:"",!1));return;case"textarea":Te=Ee=null;for(Z in d)if(E=d[Z],d.hasOwnProperty(Z)&&E!=null&&!v.hasOwnProperty(Z))switch(Z){case"value":break;case"children":break;default:Ht(a,s,Z,null,v,E)}for($ in v)if(E=v[$],A=d[$],v.hasOwnProperty($)&&(E!=null||A!=null))switch($){case"value":Ee=E;break;case"defaultValue":Te=E;break;case"children":break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(r(91));break;default:E!==A&&Ht(a,s,$,E,v,A)}ja(a,Ee,Te);return;case"option":for(var Fe in d)Ee=d[Fe],d.hasOwnProperty(Fe)&&Ee!=null&&!v.hasOwnProperty(Fe)&&(Fe==="selected"?a.selected=!1:Ht(a,s,Fe,null,v,Ee));for(fe in v)Ee=v[fe],Te=d[fe],v.hasOwnProperty(fe)&&Ee!==Te&&(Ee!=null||Te!=null)&&(fe==="selected"?a.selected=Ee&&typeof Ee!="function"&&typeof Ee!="symbol":Ht(a,s,fe,Ee,v,Te));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 et in d)Ee=d[et],d.hasOwnProperty(et)&&Ee!=null&&!v.hasOwnProperty(et)&&Ht(a,s,et,null,v,Ee);for(we in v)if(Ee=v[we],Te=d[we],v.hasOwnProperty(we)&&Ee!==Te&&(Ee!=null||Te!=null))switch(we){case"children":case"dangerouslySetInnerHTML":if(Ee!=null)throw Error(r(137,s));break;default:Ht(a,s,we,Ee,v,Te)}return;default:if(Il(s)){for(var qt in d)Ee=d[qt],d.hasOwnProperty(qt)&&Ee!==void 0&&!v.hasOwnProperty(qt)&&Fb(a,s,qt,void 0,v,Ee);for(je in v)Ee=v[je],Te=d[je],!v.hasOwnProperty(je)||Ee===Te||Ee===void 0&&Te===void 0||Fb(a,s,je,Ee,v,Te);return}}for(var ge in d)Ee=d[ge],d.hasOwnProperty(ge)&&Ee!=null&&!v.hasOwnProperty(ge)&&Ht(a,s,ge,null,v,Ee);for(Ne in v)Ee=v[Ne],Te=d[Ne],!v.hasOwnProperty(Ne)||Ee===Te||Ee==null&&Te==null||Ht(a,s,Ne,Ee,v,Te)}function aO(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function WU(){if(typeof performance.getEntriesByType=="function"){for(var a=0,s=0,d=performance.getEntriesByType("resource"),v=0;v<d.length;v++){var E=d[v],A=E.transferSize,$=E.initiatorType,Z=E.duration;if(A&&Z&&aO($)){for($=0,Z=E.responseEnd,v+=1;v<d.length;v++){var fe=d[v],we=fe.startTime;if(we>Z)break;var je=fe.transferSize,Ne=fe.initiatorType;je&&aO(Ne)&&(fe=fe.responseEnd,$+=je*(fe<Z?1:(Z-we)/(fe-we)))}if(--v,s+=8*(A+$)/(E.duration/1e3),a++,10<a)break}}if(0<a)return s/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Vb=null,Hb=null;function eg(a){return a.nodeType===9?a:a.ownerDocument}function oO(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function sO(a,s){if(a===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&s==="foreignObject"?0:a}function qb(a,s){return a==="textarea"||a==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Gb=null;function KU(){var a=window.event;return a&&a.type==="popstate"?a===Gb?!1:(Gb=a,!0):(Gb=null,!1)}var lO=typeof setTimeout=="function"?setTimeout:void 0,ZU=typeof clearTimeout=="function"?clearTimeout:void 0,uO=typeof Promise=="function"?Promise:void 0,XU=typeof queueMicrotask=="function"?queueMicrotask:typeof uO<"u"?function(a){return uO.resolve(null).then(a).catch(QU)}:lO;function QU(a){setTimeout(function(){throw a})}function Bs(a){return a==="head"}function cO(a,s){var d=s,v=0;do{var E=d.nextSibling;if(a.removeChild(d),E&&E.nodeType===8)if(d=E.data,d==="/$"||d==="/&"){if(v===0){a.removeChild(E),$c(s);return}v--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")v++;else if(d==="html")Vd(a.ownerDocument.documentElement);else if(d==="head"){d=a.ownerDocument.head,Vd(d);for(var A=d.firstChild;A;){var $=A.nextSibling,Z=A.nodeName;A[Ll]||Z==="SCRIPT"||Z==="STYLE"||Z==="LINK"&&A.rel.toLowerCase()==="stylesheet"||d.removeChild(A),A=$}}else d==="body"&&Vd(a.ownerDocument.body);d=E}while(d);$c(s)}function fO(a,s){var d=a;a=0;do{var v=d.nextSibling;if(d.nodeType===1?s?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(s?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),v&&v.nodeType===8)if(d=v.data,d==="/$"){if(a===0)break;a--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||a++;d=v}while(d)}function Yb(a){var s=a.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var d=s;switch(s=s.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":Yb(d),Xf(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}a.removeChild(d)}}function JU(a,s,d,v){for(;a.nodeType===1;){var E=d;if(a.nodeName.toLowerCase()!==s.toLowerCase()){if(!v&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(v){if(!a[Ll])switch(s){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(A=a.getAttribute("rel"),A==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(A!==E.rel||a.getAttribute("href")!==(E.href==null||E.href===""?null:E.href)||a.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin)||a.getAttribute("title")!==(E.title==null?null:E.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(A=a.getAttribute("src"),(A!==(E.src==null?null:E.src)||a.getAttribute("type")!==(E.type==null?null:E.type)||a.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin))&&A&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(s==="input"&&a.type==="hidden"){var A=E.name==null?null:""+E.name;if(E.type==="hidden"&&a.getAttribute("name")===A)return a}else return a;if(a=Fi(a.nextSibling),a===null)break}return null}function e$(a,s,d){if(s==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!d||(a=Fi(a.nextSibling),a===null))return null;return a}function dO(a,s){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!s||(a=Fi(a.nextSibling),a===null))return null;return a}function Wb(a){return a.data==="$?"||a.data==="$~"}function Kb(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function t$(a,s){var d=a.ownerDocument;if(a.data==="$~")a._reactRetry=s;else if(a.data!=="$?"||d.readyState!=="loading")s();else{var v=function(){s(),d.removeEventListener("DOMContentLoaded",v)};d.addEventListener("DOMContentLoaded",v),a._reactRetry=v}}function Fi(a){for(;a!=null;a=a.nextSibling){var s=a.nodeType;if(s===1||s===3)break;if(s===8){if(s=a.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return a}var Zb=null;function hO(a){a=a.nextSibling;for(var s=0;a;){if(a.nodeType===8){var d=a.data;if(d==="/$"||d==="/&"){if(s===0)return Fi(a.nextSibling);s--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||s++}a=a.nextSibling}return null}function mO(a){a=a.previousSibling;for(var s=0;a;){if(a.nodeType===8){var d=a.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(s===0)return a;s--}else d!=="/$"&&d!=="/&"||s++}a=a.previousSibling}return null}function pO(a,s,d){switch(s=eg(d),a){case"html":if(a=s.documentElement,!a)throw Error(r(452));return a;case"head":if(a=s.head,!a)throw Error(r(453));return a;case"body":if(a=s.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function Vd(a){for(var s=a.attributes;s.length;)a.removeAttributeNode(s[0]);Xf(a)}var Vi=new Map,gO=new Set;function tg(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Oo=I.d;I.d={f:n$,r:r$,D:i$,C:a$,L:o$,m:s$,X:u$,S:l$,M:c$};function n$(){var a=Oo.f(),s=Gp();return a||s}function r$(a){var s=ls(a);s!==null&&s.tag===5&&s.type==="form"?LE(s):Oo.r(a)}var zc=typeof document>"u"?null:document;function vO(a,s,d){var v=zc;if(v&&typeof s=="string"&&s){var E=en(s);E='link[rel="'+a+'"][href="'+E+'"]',typeof d=="string"&&(E+='[crossorigin="'+d+'"]'),gO.has(E)||(gO.add(E),a={rel:a,crossOrigin:d,href:s},v.querySelector(E)===null&&(s=v.createElement("link"),gr(s,"link",a),kn(s),v.head.appendChild(s)))}}function i$(a){Oo.D(a),vO("dns-prefetch",a,null)}function a$(a,s){Oo.C(a,s),vO("preconnect",a,s)}function o$(a,s,d){Oo.L(a,s,d);var v=zc;if(v&&a&&s){var E='link[rel="preload"][as="'+en(s)+'"]';s==="image"&&d&&d.imageSrcSet?(E+='[imagesrcset="'+en(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(E+='[imagesizes="'+en(d.imageSizes)+'"]')):E+='[href="'+en(a)+'"]';var A=E;switch(s){case"style":A=Bc(a);break;case"script":A=Uc(a)}Vi.has(A)||(a=y({rel:"preload",href:s==="image"&&d&&d.imageSrcSet?void 0:a,as:s},d),Vi.set(A,a),v.querySelector(E)!==null||s==="style"&&v.querySelector(Hd(A))||s==="script"&&v.querySelector(qd(A))||(s=v.createElement("link"),gr(s,"link",a),kn(s),v.head.appendChild(s)))}}function s$(a,s){Oo.m(a,s);var d=zc;if(d&&a){var v=s&&typeof s.as=="string"?s.as:"script",E='link[rel="modulepreload"][as="'+en(v)+'"][href="'+en(a)+'"]',A=E;switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":A=Uc(a)}if(!Vi.has(A)&&(a=y({rel:"modulepreload",href:a},s),Vi.set(A,a),d.querySelector(E)===null)){switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(qd(A)))return}v=d.createElement("link"),gr(v,"link",a),kn(v),d.head.appendChild(v)}}}function l$(a,s,d){Oo.S(a,s,d);var v=zc;if(v&&a){var E=us(v).hoistableStyles,A=Bc(a);s=s||"default";var $=E.get(A);if(!$){var Z={loading:0,preload:null};if($=v.querySelector(Hd(A)))Z.loading=5;else{a=y({rel:"stylesheet",href:a,"data-precedence":s},d),(d=Vi.get(A))&&Xb(a,d);var fe=$=v.createElement("link");kn(fe),gr(fe,"link",a),fe._p=new Promise(function(we,je){fe.onload=we,fe.onerror=je}),fe.addEventListener("load",function(){Z.loading|=1}),fe.addEventListener("error",function(){Z.loading|=2}),Z.loading|=4,ng($,s,v)}$={type:"stylesheet",instance:$,count:1,state:Z},E.set(A,$)}}}function u$(a,s){Oo.X(a,s);var d=zc;if(d&&a){var v=us(d).hoistableScripts,E=Uc(a),A=v.get(E);A||(A=d.querySelector(qd(E)),A||(a=y({src:a,async:!0},s),(s=Vi.get(E))&&Qb(a,s),A=d.createElement("script"),kn(A),gr(A,"link",a),d.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},v.set(E,A))}}function c$(a,s){Oo.M(a,s);var d=zc;if(d&&a){var v=us(d).hoistableScripts,E=Uc(a),A=v.get(E);A||(A=d.querySelector(qd(E)),A||(a=y({src:a,async:!0,type:"module"},s),(s=Vi.get(E))&&Qb(a,s),A=d.createElement("script"),kn(A),gr(A,"link",a),d.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},v.set(E,A))}}function yO(a,s,d,v){var E=(E=de.current)?tg(E):null;if(!E)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(s=Bc(d.href),d=us(E).hoistableStyles,v=d.get(s),v||(v={type:"style",instance:null,count:0,state:null},d.set(s,v)),v):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){a=Bc(d.href);var A=us(E).hoistableStyles,$=A.get(a);if($||(E=E.ownerDocument||E,$={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},A.set(a,$),(A=E.querySelector(Hd(a)))&&!A._p&&($.instance=A,$.state.loading=5),Vi.has(a)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},Vi.set(a,d),A||f$(E,a,d,$.state))),s&&v===null)throw Error(r(528,""));return $}if(s&&v!==null)throw Error(r(529,""));return null;case"script":return s=d.async,d=d.src,typeof d=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Uc(d),d=us(E).hoistableScripts,v=d.get(s),v||(v={type:"script",instance:null,count:0,state:null},d.set(s,v)),v):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function Bc(a){return'href="'+en(a)+'"'}function Hd(a){return'link[rel="stylesheet"]['+a+"]"}function bO(a){return y({},a,{"data-precedence":a.precedence,precedence:null})}function f$(a,s,d,v){a.querySelector('link[rel="preload"][as="style"]['+s+"]")?v.loading=1:(s=a.createElement("link"),v.preload=s,s.addEventListener("load",function(){return v.loading|=1}),s.addEventListener("error",function(){return v.loading|=2}),gr(s,"link",d),kn(s),a.head.appendChild(s))}function Uc(a){return'[src="'+en(a)+'"]'}function qd(a){return"script[async]"+a}function xO(a,s,d){if(s.count++,s.instance===null)switch(s.type){case"style":var v=a.querySelector('style[data-href~="'+en(d.href)+'"]');if(v)return s.instance=v,kn(v),v;var E=y({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return v=(a.ownerDocument||a).createElement("style"),kn(v),gr(v,"style",E),ng(v,d.precedence,a),s.instance=v;case"stylesheet":E=Bc(d.href);var A=a.querySelector(Hd(E));if(A)return s.state.loading|=4,s.instance=A,kn(A),A;v=bO(d),(E=Vi.get(E))&&Xb(v,E),A=(a.ownerDocument||a).createElement("link"),kn(A);var $=A;return $._p=new Promise(function(Z,fe){$.onload=Z,$.onerror=fe}),gr(A,"link",v),s.state.loading|=4,ng(A,d.precedence,a),s.instance=A;case"script":return A=Uc(d.src),(E=a.querySelector(qd(A)))?(s.instance=E,kn(E),E):(v=d,(E=Vi.get(A))&&(v=y({},d),Qb(v,E)),a=a.ownerDocument||a,E=a.createElement("script"),kn(E),gr(E,"link",v),a.head.appendChild(E),s.instance=E);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(v=s.instance,s.state.loading|=4,ng(v,d.precedence,a));return s.instance}function ng(a,s,d){for(var v=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),E=v.length?v[v.length-1]:null,A=E,$=0;$<v.length;$++){var Z=v[$];if(Z.dataset.precedence===s)A=Z;else if(A!==E)break}A?A.parentNode.insertBefore(a,A.nextSibling):(s=d.nodeType===9?d.head:d,s.insertBefore(a,s.firstChild))}function Xb(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function Qb(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var rg=null;function _O(a,s,d){if(rg===null){var v=new Map,E=rg=new Map;E.set(d,v)}else E=rg,v=E.get(d),v||(v=new Map,E.set(d,v));if(v.has(a))return v;for(v.set(a,null),d=d.getElementsByTagName(a),E=0;E<d.length;E++){var A=d[E];if(!(A[Ll]||A[Dn]||a==="link"&&A.getAttribute("rel")==="stylesheet")&&A.namespaceURI!=="http://www.w3.org/2000/svg"){var $=A.getAttribute(s)||"";$=a+$;var Z=v.get($);Z?Z.push(A):v.set($,[A])}}return v}function wO(a,s,d){a=a.ownerDocument||a,a.head.insertBefore(d,s==="title"?a.querySelector("head > title"):null)}function d$(a,s,d){if(d===1||s.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(a=s.disabled,typeof s.precedence=="string"&&a==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function SO(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function h$(a,s,d,v){if(d.type==="stylesheet"&&(typeof v.media!="string"||matchMedia(v.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var E=Bc(v.href),A=s.querySelector(Hd(E));if(A){s=A._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(a.count++,a=ig.bind(a),s.then(a,a)),d.state.loading|=4,d.instance=A,kn(A);return}A=s.ownerDocument||s,v=bO(v),(E=Vi.get(E))&&Xb(v,E),A=A.createElement("link"),kn(A);var $=A;$._p=new Promise(function(Z,fe){$.onload=Z,$.onerror=fe}),gr(A,"link",v),d.instance=A}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(d,s),(s=d.state.preload)&&(d.state.loading&3)===0&&(a.count++,d=ig.bind(a),s.addEventListener("load",d),s.addEventListener("error",d))}}var Jb=0;function m$(a,s){return a.stylesheets&&a.count===0&&og(a,a.stylesheets),0<a.count||0<a.imgCount?function(d){var v=setTimeout(function(){if(a.stylesheets&&og(a,a.stylesheets),a.unsuspend){var A=a.unsuspend;a.unsuspend=null,A()}},6e4+s);0<a.imgBytes&&Jb===0&&(Jb=62500*WU());var E=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&og(a,a.stylesheets),a.unsuspend)){var A=a.unsuspend;a.unsuspend=null,A()}},(a.imgBytes>Jb?50:800)+s);return a.unsuspend=d,function(){a.unsuspend=null,clearTimeout(v),clearTimeout(E)}}:null}function ig(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)og(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var ag=null;function og(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,ag=new Map,s.forEach(p$,a),ag=null,ig.call(a))}function p$(a,s){if(!(s.state.loading&4)){var d=ag.get(a);if(d)var v=d.get(null);else{d=new Map,ag.set(a,d);for(var E=a.querySelectorAll("link[data-precedence],style[data-precedence]"),A=0;A<E.length;A++){var $=E[A];($.nodeName==="LINK"||$.getAttribute("media")!=="not all")&&(d.set($.dataset.precedence,$),v=$)}v&&d.set(null,v)}E=s.instance,$=E.getAttribute("data-precedence"),A=d.get($)||v,A===v&&d.set(null,E),d.set($,E),this.count++,v=ig.bind(this),E.addEventListener("load",v),E.addEventListener("error",v),A?A.parentNode.insertBefore(E,A.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(E,a.firstChild)),s.state.loading|=4}}var Gd={$$typeof:N,Provider:null,Consumer:null,_currentValue:z,_currentValue2:z,_threadCount:0};function g$(a,s,d,v,E,A,$,Z,fe){this.tag=1,this.containerInfo=a,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=Wf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wf(0),this.hiddenUpdates=Wf(null),this.identifierPrefix=v,this.onUncaughtError=E,this.onCaughtError=A,this.onRecoverableError=$,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=fe,this.incompleteTransitions=new Map}function CO(a,s,d,v,E,A,$,Z,fe,we,je,Ne){return a=new g$(a,s,d,$,fe,we,je,Ne,Z),s=1,A===!0&&(s|=24),A=Cr(3,null,null,s),a.current=A,A.stateNode=a,s=N1(),s.refCount++,a.pooledCache=s,s.refCount++,A.memoizedState={element:v,isDehydrated:d,cache:s},k1(A),a}function EO(a){return a?(a=ho,a):ho}function AO(a,s,d,v,E,A){E=EO(E),v.context===null?v.context=E:v.pendingContext=E,v=Ts(s),v.payload={element:d},A=A===void 0?null:A,A!==null&&(v.callback=A),d=js(a,v,s),d!==null&&(ei(d,a,s),Cd(d,a,s))}function OO(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var d=a.retryLane;a.retryLane=d!==0&&d<s?d:s}}function ex(a,s){OO(a,s),(a=a.alternate)&&OO(a,s)}function TO(a){if(a.tag===13||a.tag===31){var s=Bi(a,67108864);s!==null&&ei(s,a,67108864),ex(a,67108864)}}function jO(a){if(a.tag===13||a.tag===31){var s=mi();s=Vr(s);var d=Bi(a,s);d!==null&&ei(d,a,s),ex(a,s)}}var sg=!0;function v$(a,s,d,v){var E=Y.T;Y.T=null;var A=I.p;try{I.p=2,tx(a,s,d,v)}finally{I.p=A,Y.T=E}}function y$(a,s,d,v){var E=Y.T;Y.T=null;var A=I.p;try{I.p=8,tx(a,s,d,v)}finally{I.p=A,Y.T=E}}function tx(a,s,d,v){if(sg){var E=nx(v);if(E===null)$b(a,s,v,lg,d),PO(a,v);else if(x$(E,a,s,d,v))v.stopPropagation();else if(PO(a,v),s&4&&-1<b$.indexOf(a)){for(;E!==null;){var A=ls(E);if(A!==null)switch(A.tag){case 3:if(A=A.stateNode,A.current.memoizedState.isDehydrated){var $=ro(A.pendingLanes);if($!==0){var Z=A;for(Z.pendingLanes|=2,Z.entangledLanes|=2;$;){var fe=1<<31-Gt($);Z.entanglements[1]|=fe,$&=~fe}$a(A),(Dt&6)===0&&(Hp=mt()+500,Ud(0))}}break;case 31:case 13:Z=Bi(A,2),Z!==null&&ei(Z,A,2),Gp(),ex(A,2)}if(A=nx(v),A===null&&$b(a,s,v,lg,d),A===E)break;E=A}E!==null&&v.stopPropagation()}else $b(a,s,v,null,d)}}function nx(a){return a=zl(a),rx(a)}var lg=null;function rx(a){if(lg=null,a=oo(a),a!==null){var s=o(a);if(s===null)a=null;else{var d=s.tag;if(d===13){if(a=l(s),a!==null)return a;a=null}else if(d===31){if(a=c(s),a!==null)return a;a=null}else if(d===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;a=null}else s!==a&&(a=null)}}return lg=a,null}function MO(a){switch(a){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(Lt()){case ht:return 2;case Qe:return 8;case Rt:case vn:return 32;case nt:return 268435456;default:return 32}default:return 32}}var ix=!1,Us=null,$s=null,Fs=null,Yd=new Map,Wd=new Map,Vs=[],b$="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 PO(a,s){switch(a){case"focusin":case"focusout":Us=null;break;case"dragenter":case"dragleave":$s=null;break;case"mouseover":case"mouseout":Fs=null;break;case"pointerover":case"pointerout":Yd.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wd.delete(s.pointerId)}}function Kd(a,s,d,v,E,A){return a===null||a.nativeEvent!==A?(a={blockedOn:s,domEventName:d,eventSystemFlags:v,nativeEvent:A,targetContainers:[E]},s!==null&&(s=ls(s),s!==null&&TO(s)),a):(a.eventSystemFlags|=v,s=a.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),a)}function x$(a,s,d,v,E){switch(s){case"focusin":return Us=Kd(Us,a,s,d,v,E),!0;case"dragenter":return $s=Kd($s,a,s,d,v,E),!0;case"mouseover":return Fs=Kd(Fs,a,s,d,v,E),!0;case"pointerover":var A=E.pointerId;return Yd.set(A,Kd(Yd.get(A)||null,a,s,d,v,E)),!0;case"gotpointercapture":return A=E.pointerId,Wd.set(A,Kd(Wd.get(A)||null,a,s,d,v,E)),!0}return!1}function NO(a){var s=oo(a.target);if(s!==null){var d=o(s);if(d!==null){if(s=d.tag,s===13){if(s=l(d),s!==null){a.blockedOn=s,Zf(a.priority,function(){jO(d)});return}}else if(s===31){if(s=c(d),s!==null){a.blockedOn=s,Zf(a.priority,function(){jO(d)});return}}else if(s===3&&d.stateNode.current.memoizedState.isDehydrated){a.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}a.blockedOn=null}function ug(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var d=nx(a.nativeEvent);if(d===null){d=a.nativeEvent;var v=new d.constructor(d.type,d);ac=v,d.target.dispatchEvent(v),ac=null}else return s=ls(d),s!==null&&TO(s),a.blockedOn=d,!1;s.shift()}return!0}function LO(a,s,d){ug(a)&&d.delete(s)}function _$(){ix=!1,Us!==null&&ug(Us)&&(Us=null),$s!==null&&ug($s)&&($s=null),Fs!==null&&ug(Fs)&&(Fs=null),Yd.forEach(LO),Wd.forEach(LO)}function cg(a,s){a.blockedOn===s&&(a.blockedOn=null,ix||(ix=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,_$)))}var fg=null;function RO(a){fg!==a&&(fg=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){fg===a&&(fg=null);for(var s=0;s<a.length;s+=3){var d=a[s],v=a[s+1],E=a[s+2];if(typeof v!="function"){if(rx(v||d)===null)continue;break}var A=ls(d);A!==null&&(a.splice(s,3),s-=3,nb(A,{pending:!0,data:E,method:d.method,action:v},v,E))}}))}function $c(a){function s(fe){return cg(fe,a)}Us!==null&&cg(Us,a),$s!==null&&cg($s,a),Fs!==null&&cg(Fs,a),Yd.forEach(s),Wd.forEach(s);for(var d=0;d<Vs.length;d++){var v=Vs[d];v.blockedOn===a&&(v.blockedOn=null)}for(;0<Vs.length&&(d=Vs[0],d.blockedOn===null);)NO(d),d.blockedOn===null&&Vs.shift();if(d=(a.ownerDocument||a).$$reactFormReplay,d!=null)for(v=0;v<d.length;v+=3){var E=d[v],A=d[v+1],$=E[ir]||null;if(typeof A=="function")$||RO(d);else if($){var Z=null;if(A&&A.hasAttribute("formAction")){if(E=A,$=A[ir]||null)Z=$.formAction;else if(rx(E)!==null)continue}else Z=$.action;typeof Z=="function"?d[v+1]=Z:(d.splice(v,3),v-=3),RO(d)}}}function DO(){function a(A){A.canIntercept&&A.info==="react-transition"&&A.intercept({handler:function(){return new Promise(function($){return E=$})},focusReset:"manual",scroll:"manual"})}function s(){E!==null&&(E(),E=null),v||setTimeout(d,20)}function d(){if(!v&&!navigation.transition){var A=navigation.currentEntry;A&&A.url!=null&&navigation.navigate(A.url,{state:A.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var v=!1,E=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(d,100),function(){v=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),E!==null&&(E(),E=null)}}}function ax(a){this._internalRoot=a}dg.prototype.render=ax.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(r(409));var d=s.current,v=mi();AO(d,v,a,s,null,null)},dg.prototype.unmount=ax.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;AO(a.current,2,null,a,null,null),Gp(),s[ao]=null}};function dg(a){this._internalRoot=a}dg.prototype.unstable_scheduleHydration=function(a){if(a){var s=Kf();a={blockedOn:null,target:a,priority:s};for(var d=0;d<Vs.length&&s!==0&&s<Vs[d].priority;d++);Vs.splice(d,0,a),d===0&&NO(a)}};var kO=t.version;if(kO!=="19.2.3")throw Error(r(527,kO,"19.2.3"));I.findDOMNode=function(a){var s=a._reactInternals;if(s===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=h(s),a=a!==null?m(a):null,a=a===null?null:a.stateNode,a};var w$={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:Y,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hg.isDisabled&&hg.supportsFiber)try{Jt=hg.inject(w$),Cn=hg}catch{}}return Xd.createRoot=function(a,s){if(!i(a))throw Error(r(299));var d=!1,v="",E=VE,A=HE,$=qE;return s!=null&&(s.unstable_strictMode===!0&&(d=!0),s.identifierPrefix!==void 0&&(v=s.identifierPrefix),s.onUncaughtError!==void 0&&(E=s.onUncaughtError),s.onCaughtError!==void 0&&(A=s.onCaughtError),s.onRecoverableError!==void 0&&($=s.onRecoverableError)),s=CO(a,1,!1,null,null,d,v,null,E,A,$,DO),a[ao]=s.current,Ub(a),new ax(s)},Xd.hydrateRoot=function(a,s,d){if(!i(a))throw Error(r(299));var v=!1,E="",A=VE,$=HE,Z=qE,fe=null;return d!=null&&(d.unstable_strictMode===!0&&(v=!0),d.identifierPrefix!==void 0&&(E=d.identifierPrefix),d.onUncaughtError!==void 0&&(A=d.onUncaughtError),d.onCaughtError!==void 0&&($=d.onCaughtError),d.onRecoverableError!==void 0&&(Z=d.onRecoverableError),d.formState!==void 0&&(fe=d.formState)),s=CO(a,1,!0,s,d??null,v,E,fe,A,$,Z,DO),s.context=EO(null),d=s.current,v=mi(),v=Vr(v),E=Ts(v),E.callback=null,js(d,E,v),d=v,s.current.lanes=d,io(s,d),$a(s),a[ao]=s.current,Ub(a),new dg(s)},Xd.version="19.2.3",Xd}var GO;function N$(){if(GO)return sx.exports;GO=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(),sx.exports=P$(),sx.exports}var L$=N$(),_=Af();const cf=Qi(_),oS=C$({__proto__:null,default:cf},[_]);var dx={exports:{}},hx={};var YO;function R$(){if(YO)return hx;YO=1;var e=Af();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,l=e.useMemo,c=e.useDebugValue;return hx.useSyncExternalStoreWithSelector=function(f,h,m,y,x){var b=i(null);if(b.current===null){var w={hasValue:!1,value:null};b.current=w}else w=b.current;b=l(function(){function O(B){if(!T){if(T=!0,P=B,B=y(B),x!==void 0&&w.hasValue){var W=w.value;if(x(W,B))return N=W}return N=B}if(W=N,n(P,B))return W;var Q=y(B);return x!==void 0&&x(W,Q)?(P=B,W):(P=B,N=Q)}var T=!1,P,N,F=m===void 0?null:m;return[function(){return O(h())},F===null?void 0:function(){return O(F())}]},[h,m,y,x]);var C=r(f,b[0],b[1]);return o(function(){w.hasValue=!0,w.value=C},[C]),c(C),C},hx}var WO;function D$(){return WO||(WO=1,dx.exports=R$()),dx.exports}var k$=D$();function I$(e){e()}function z$(){let e=null,t=null;return{clear(){e=null,t=null},notify(){I$(()=>{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 KO={notify(){},get:()=>[]};function B$(e,t){let n,r=KO,i=0,o=!1;function l(C){m();const O=r.subscribe(C);let T=!1;return()=>{T||(T=!0,O(),y())}}function c(){r.notify()}function f(){w.onStateChange&&w.onStateChange()}function h(){return o}function m(){i++,n||(n=e.subscribe(f),r=z$())}function y(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=KO)}function x(){o||(o=!0,m())}function b(){o&&(o=!1,y())}const w={addNestedSub:l,notifyNestedSubs:c,handleChangeWrapper:f,isSubscribed:h,trySubscribe:x,tryUnsubscribe:b,getListeners:()=>r};return w}var U$=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$$=U$(),F$=()=>typeof navigator<"u"&&navigator.product==="ReactNative",V$=F$(),H$=()=>$$||V$?_.useLayoutEffect:_.useEffect,q$=H$(),G$=Symbol.for("react-redux-context"),Y$=typeof globalThis<"u"?globalThis:{};function W$(){if(!_.createContext)return{};const e=Y$[G$]??=new Map;let t=e.get(_.createContext);return t||(t=_.createContext(null),e.set(_.createContext,t)),t}var al=W$();function K$(e){const{children:t,context:n,serverState:r,store:i}=e,o=_.useMemo(()=>{const f=B$(i);return{store:i,subscription:f,getServerState:r?()=>r:void 0}},[i,r]),l=_.useMemo(()=>i.getState(),[i]);q$(()=>{const{subscription:f}=o;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),l!==i.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[o,l]);const c=n||al;return _.createElement(c.Provider,{value:o},t)}var sS=K$;function lS(e=al){return function(){return _.useContext(e)}}var VL=lS();function HL(e=al){const t=e===al?VL:lS(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var Z$=HL();function X$(e=al){const t=e===al?Z$:HL(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var qL=X$(),Q$=(e,t)=>e===t;function J$(e=al){const t=e===al?VL:lS(e),n=(r,i={})=>{const{equalityFn:o=Q$}=typeof i=="function"?{equalityFn:i}:i,l=t(),{store:c,subscription:f,getServerState:h}=l;_.useRef(!0);const m=_.useCallback({[r.name](x){return r(x)}}[r.name],[r]),y=k$.useSyncExternalStoreWithSelector(f.addNestedSub,c.getState,h||c.getState,m,o);return _.useDebugValue(y),y};return Object.assign(n,{withTypes:()=>n}),n}var GL=J$();var ZO="popstate";function eF(e={}){function t(r,i){let{pathname:o,search:l,hash:c}=r.location;return C_("",{pathname:o,search:l,hash:c},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Ph(i)}return nF(t,n,null,e)}function mn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ki(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function tF(){return Math.random().toString(36).substring(2,10)}function XO(e,t){return{usr:e.state,key:e.key,idx:t}}function C_(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Of(t):t,state:n,key:t&&t.key||r||tF()}}function Ph({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 Of(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 nF(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:o=!1}=r,l=i.history,c="POP",f=null,h=m();h==null&&(h=0,l.replaceState({...l.state,idx:h},""));function m(){return(l.state||{idx:null}).idx}function y(){c="POP";let O=m(),T=O==null?null:O-h;h=O,f&&f({action:c,location:C.location,delta:T})}function x(O,T){c="PUSH";let P=C_(C.location,O,T);h=m()+1;let N=XO(P,h),F=C.createHref(P);try{l.pushState(N,"",F)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;i.location.assign(F)}o&&f&&f({action:c,location:C.location,delta:1})}function b(O,T){c="REPLACE";let P=C_(C.location,O,T);h=m();let N=XO(P,h),F=C.createHref(P);l.replaceState(N,"",F),o&&f&&f({action:c,location:C.location,delta:0})}function w(O){return rF(O)}let C={get action(){return c},get location(){return e(i,l)},listen(O){if(f)throw new Error("A history only accepts one active listener");return i.addEventListener(ZO,y),f=O,()=>{i.removeEventListener(ZO,y),f=null}},createHref(O){return t(i,O)},createURL:w,encodeLocation(O){let T=w(O);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:x,replace:b,go(O){return l.go(O)}};return C}function rF(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),mn(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Ph(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function YL(e,t,n="/"){return iF(e,t,n,!1)}function iF(e,t,n,r){let i=typeof t=="string"?Of(t):t,o=zo(i.pathname||"/",n);if(o==null)return null;let l=WL(e);aF(l);let c=null;for(let f=0;c==null&&f<l.length;++f){let h=gF(o);c=mF(l[f],h,r)}return c}function WL(e,t=[],n=[],r="",i=!1){let o=(l,c,f=i,h)=>{let m={relativePath:h===void 0?l.path||"":h,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(r)&&f)return;mn(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 y=Do([r,m.relativePath]),x=n.concat(m);l.children&&l.children.length>0&&(mn(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),WL(l.children,t,x,y,f)),!(l.path==null&&!l.index)&&t.push({path:y,score:dF(y,l.index),routesMeta:x})};return e.forEach((l,c)=>{if(l.path===""||!l.path?.includes("?"))o(l,c);else for(let f of KL(l.path))o(l,c,!0,f)}),t}function KL(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let l=KL(r.join("/")),c=[];return c.push(...l.map(f=>f===""?o:[o,f].join("/"))),i&&c.push(...l),c.map(f=>e.startsWith("/")&&f===""?"/":f)}function aF(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:hF(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var oF=/^:[\w-]+$/,sF=3,lF=2,uF=1,cF=10,fF=-2,QO=e=>e==="*";function dF(e,t){let n=e.split("/"),r=n.length;return n.some(QO)&&(r+=fF),t&&(r+=lF),n.filter(i=>!QO(i)).reduce((i,o)=>i+(oF.test(o)?sF:o===""?uF:cF),r)}function hF(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 mF(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",l=[];for(let c=0;c<r.length;++c){let f=r[c],h=c===r.length-1,m=o==="/"?t:t.slice(o.length)||"/",y=yv({path:f.relativePath,caseSensitive:f.caseSensitive,end:h},m),x=f.route;if(!y&&h&&n&&!r[r.length-1].route.index&&(y=yv({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},m)),!y)return null;Object.assign(i,y.params),l.push({params:i,pathname:Do([o,y.pathname]),pathnameBase:xF(Do([o,y.pathnameBase])),route:x}),y.pathnameBase!=="/"&&(o=Do([o,y.pathnameBase]))}return l}function yv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=pF(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],l=o.replace(/(.)\/+$/,"$1"),c=i.slice(1);return{params:r.reduce((h,{paramName:m,isOptional:y},x)=>{if(m==="*"){let w=c[x]||"";l=o.slice(0,o.length-w.length).replace(/(.)\/+$/,"$1")}const b=c[x];return y&&!b?h[m]=void 0:h[m]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:l,pattern:e}}function pF(e,t=!1,n=!0){Ki(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,(l,c,f)=>(r.push({paramName:c,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)")).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 gF(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ki(!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)||"/"}var ZL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,vF=e=>ZL.test(e);function yF(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Of(e):e,o;if(n)if(vF(n))o=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),Ki(!1,`Pathnames cannot have embedded double slashes - normalizing ${l} -> ${n}`)}n.startsWith("/")?o=JO(n.substring(1),"/"):o=JO(n,t)}else o=t;return{pathname:o,search:_F(r),hash:wF(i)}}function JO(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 mx(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 bF(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function uS(e){let t=bF(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function cS(e,t,n,r=!1){let i;typeof e=="string"?i=Of(e):(i={...e},mn(!i.pathname||!i.pathname.includes("?"),mx("?","pathname","search",i)),mn(!i.pathname||!i.pathname.includes("#"),mx("#","pathname","hash",i)),mn(!i.search||!i.search.includes("#"),mx("#","search","hash",i)));let o=e===""||i.pathname==="",l=o?"/":i.pathname,c;if(l==null)c=n;else{let y=t.length-1;if(!r&&l.startsWith("..")){let x=l.split("/");for(;x[0]==="..";)x.shift(),y-=1;i.pathname=x.join("/")}c=y>=0?t[y]:"/"}let f=yF(i,c),h=l&&l!=="/"&&l.endsWith("/"),m=(o||l===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(h||m)&&(f.pathname+="/"),f}var Do=e=>e.join("/").replace(/\/\/+/g,"/"),xF=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_F=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,wF=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,SF=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function CF(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function EF(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var XL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function QL(e,t){let n=e;if(typeof n!="string"||!ZL.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(XL)try{let o=new URL(window.location.href),l=n.startsWith("//")?new URL(o.protocol+n):new URL(n),c=zo(l.pathname,t);l.origin===o.origin&&c!=null?n=c+l.search+l.hash:i=!0}catch{Ki(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var JL=["POST","PUT","PATCH","DELETE"];new Set(JL);var AF=["GET",...JL];new Set(AF);var Tf=_.createContext(null);Tf.displayName="DataRouter";var Iy=_.createContext(null);Iy.displayName="DataRouterState";var OF=_.createContext(!1),e6=_.createContext({isTransitioning:!1});e6.displayName="ViewTransition";var TF=_.createContext(new Map);TF.displayName="Fetchers";var jF=_.createContext(null);jF.displayName="Await";var Mi=_.createContext(null);Mi.displayName="Navigation";var nm=_.createContext(null);nm.displayName="Location";var wa=_.createContext({outlet:null,matches:[],isDataRoute:!1});wa.displayName="Route";var fS=_.createContext(null);fS.displayName="RouteError";var t6="REACT_ROUTER_ERROR",MF="REDIRECT",PF="ROUTE_ERROR_RESPONSE";function NF(e){if(e.startsWith(`${t6}:${MF}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function LF(e){if(e.startsWith(`${t6}:${PF}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new SF(t.status,t.statusText,t.data)}catch{}}function RF(e,{relative:t}={}){mn(Gu(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=_.useContext(Mi),{hash:i,pathname:o,search:l}=rm(e,{relative:t}),c=o;return n!=="/"&&(c=o==="/"?n:Do([n,o])),r.createHref({pathname:c,search:l,hash:i})}function Gu(){return _.useContext(nm)!=null}function _r(){return mn(Gu(),"useLocation() may be used only in the context of a <Router> component."),_.useContext(nm).location}var n6="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function r6(e){_.useContext(Mi).static||_.useLayoutEffect(e)}function Ja(){let{isDataRoute:e}=_.useContext(wa);return e?YF():DF()}function DF(){mn(Gu(),"useNavigate() may be used only in the context of a <Router> component.");let e=_.useContext(Tf),{basename:t,navigator:n}=_.useContext(Mi),{matches:r}=_.useContext(wa),{pathname:i}=_r(),o=JSON.stringify(uS(r)),l=_.useRef(!1);return r6(()=>{l.current=!0}),_.useCallback((f,h={})=>{if(Ki(l.current,n6),!l.current)return;if(typeof f=="number"){n.go(f);return}let m=cS(f,JSON.parse(o),i,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Do([t,m.pathname])),(h.replace?n.replace:n.push)(m,h.state,h)},[t,n,o,i,e])}_.createContext(null);function Yu(){let{matches:e}=_.useContext(wa),t=e[e.length-1];return t?t.params:{}}function rm(e,{relative:t}={}){let{matches:n}=_.useContext(wa),{pathname:r}=_r(),i=JSON.stringify(uS(n));return _.useMemo(()=>cS(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function kF(e,t){return i6(e,t)}function i6(e,t,n,r,i){mn(Gu(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=_.useContext(Mi),{matches:l}=_.useContext(wa),c=l[l.length-1],f=c?c.params:{},h=c?c.pathname:"/",m=c?c.pathnameBase:"/",y=c&&c.route;{let P=y&&y.path||"";o6(h,!y||P.endsWith("*")||P.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${P}">) 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="${P}"> to <Route path="${P==="/"?"*":`${P}/*`}">.`)}let x=_r(),b;if(t){let P=typeof t=="string"?Of(t):t;mn(m==="/"||P.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 "${P.pathname}" was given in the \`location\` prop.`),b=P}else b=x;let w=b.pathname||"/",C=w;if(m!=="/"){let P=m.replace(/^\//,"").split("/");C="/"+w.replace(/^\//,"").split("/").slice(P.length).join("/")}let O=YL(e,{pathname:C});Ki(y||O!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),Ki(O==null||O[O.length-1].route.element!==void 0||O[O.length-1].route.Component!==void 0||O[O.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.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 T=$F(O&&O.map(P=>Object.assign({},P,{params:Object.assign({},f,P.params),pathname:Do([m,o.encodeLocation?o.encodeLocation(P.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?m:Do([m,o.encodeLocation?o.encodeLocation(P.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathnameBase])})),l,n,r,i);return t&&T?_.createElement(nm.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},T):T}function IF(){let e=GF(),t=CF(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},o={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=_.createElement(_.Fragment,null,_.createElement("p",null,"💿 Hey developer 👋"),_.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",_.createElement("code",{style:o},"ErrorBoundary")," or"," ",_.createElement("code",{style:o},"errorElement")," prop on your route.")),_.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),n?_.createElement("pre",{style:i},n):null,l)}var zF=_.createElement(IF,null),a6=class extends _.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.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=LF(e.digest);n&&(e=n)}let t=e!==void 0?_.createElement(wa.Provider,{value:this.props.routeContext},_.createElement(fS.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?_.createElement(BF,{error:e},t):t}};a6.contextType=OF;var px=new WeakMap;function BF({children:e,error:t}){let{basename:n}=_.useContext(Mi);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=NF(t.digest);if(r){let i=px.get(t);if(i)throw i;let o=QL(r.location,n);if(XL&&!px.get(t))if(o.isExternal||r.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:r.replace}));throw px.set(t,l),l}return _.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function UF({routeContext:e,match:t,children:n}){let r=_.useContext(Tf);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(wa.Provider,{value:e},n)}function $F(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 o=e,l=n?.errors;if(l!=null){let m=o.findIndex(y=>y.route.id&&l?.[y.route.id]!==void 0);mn(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),o=o.slice(0,Math.min(o.length,m+1))}let c=!1,f=-1;if(n)for(let m=0;m<o.length;m++){let y=o[m];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(f=m),y.route.id){let{loaderData:x,errors:b}=n,w=y.route.loader&&!x.hasOwnProperty(y.route.id)&&(!b||b[y.route.id]===void 0);if(y.route.lazy||w){c=!0,f>=0?o=o.slice(0,f+1):o=[o[0]];break}}}let h=n&&r?(m,y)=>{r(m,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:EF(n.matches),errorInfo:y})}:void 0;return o.reduceRight((m,y,x)=>{let b,w=!1,C=null,O=null;n&&(b=l&&y.route.id?l[y.route.id]:void 0,C=y.route.errorElement||zF,c&&(f<0&&x===0?(o6("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,O=null):f===x&&(w=!0,O=y.route.hydrateFallbackElement||null)));let T=t.concat(o.slice(0,x+1)),P=()=>{let N;return b?N=C:w?N=O:y.route.Component?N=_.createElement(y.route.Component,null):y.route.element?N=y.route.element:N=m,_.createElement(UF,{match:y,routeContext:{outlet:m,matches:T,isDataRoute:n!=null},children:N})};return n&&(y.route.ErrorBoundary||y.route.errorElement||x===0)?_.createElement(a6,{location:n.location,revalidation:n.revalidation,component:C,error:b,children:P(),routeContext:{outlet:null,matches:T,isDataRoute:!0},onError:h}):P()},null)}function dS(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function FF(e){let t=_.useContext(Tf);return mn(t,dS(e)),t}function VF(e){let t=_.useContext(Iy);return mn(t,dS(e)),t}function HF(e){let t=_.useContext(wa);return mn(t,dS(e)),t}function hS(e){let t=HF(e),n=t.matches[t.matches.length-1];return mn(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function qF(){return hS("useRouteId")}function GF(){let e=_.useContext(fS),t=VF("useRouteError"),n=hS("useRouteError");return e!==void 0?e:t.errors?.[n]}function YF(){let{router:e}=FF("useNavigate"),t=hS("useNavigate"),n=_.useRef(!1);return r6(()=>{n.current=!0}),_.useCallback(async(i,o={})=>{Ki(n.current,n6),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...o}))},[e,t])}var eT={};function o6(e,t,n){!t&&!eT[e]&&(eT[e]=!0,Ki(!1,n))}_.memo(WF);function WF({routes:e,future:t,state:n,onError:r}){return i6(e,void 0,n,r,t)}function mS({to:e,replace:t,state:n,relative:r}){mn(Gu(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=_.useContext(Mi);Ki(!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:o}=_.useContext(wa),{pathname:l}=_r(),c=Ja(),f=cS(e,uS(o),l,r==="path"),h=JSON.stringify(f);return _.useEffect(()=>{c(JSON.parse(h),{replace:t,state:n,relative:r})},[c,h,r,t,n]),null}function lt(e){mn(!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 KF({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:o=!1,unstable_useTransitions:l}){mn(!Gu(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),f=_.useMemo(()=>({basename:c,navigator:i,static:o,unstable_useTransitions:l,future:{}}),[c,i,o,l]);typeof n=="string"&&(n=Of(n));let{pathname:h="/",search:m="",hash:y="",state:x=null,key:b="default"}=n,w=_.useMemo(()=>{let C=zo(h,c);return C==null?null:{location:{pathname:C,search:m,hash:y,state:x,key:b},navigationType:r}},[c,h,m,y,x,b,r]);return Ki(w!=null,`<Router basename="${c}"> is not able to match the URL "${h}${m}${y}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:_.createElement(Mi.Provider,{value:f},_.createElement(nm.Provider,{children:t,value:w}))}function zy({children:e,location:t}){return kF(E_(e),t)}function E_(e,t=[]){let n=[];return _.Children.forEach(e,(r,i)=>{if(!_.isValidElement(r))return;let o=[...t,i];if(r.type===_.Fragment){n.push.apply(n,E_(r.props.children,o));return}mn(r.type===lt,`[${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>`),mn(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,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&&(l.children=E_(r.props.children,o)),n.push(l)}),n}var qg="get",Gg="application/x-www-form-urlencoded";function By(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function ZF(e){return By(e)&&e.tagName.toLowerCase()==="button"}function XF(e){return By(e)&&e.tagName.toLowerCase()==="form"}function QF(e){return By(e)&&e.tagName.toLowerCase()==="input"}function JF(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function eV(e,t){return e.button===0&&(!t||t==="_self")&&!JF(e)}var mg=null;function tV(){if(mg===null)try{new FormData(document.createElement("form"),0),mg=!1}catch{mg=!0}return mg}var nV=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function gx(e){return e!=null&&!nV.has(e)?(Ki(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Gg}"`),null):e}function rV(e,t){let n,r,i,o,l;if(XF(e)){let c=e.getAttribute("action");r=c?zo(c,t):null,n=e.getAttribute("method")||qg,i=gx(e.getAttribute("enctype"))||Gg,o=new FormData(e)}else if(ZF(e)||QF(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||c.getAttribute("action");if(r=f?zo(f,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||qg,i=gx(e.getAttribute("formenctype"))||gx(c.getAttribute("enctype"))||Gg,o=new FormData(c,e),!tV()){let{name:h,type:m,value:y}=e;if(m==="image"){let x=h?`${h}.`:"";o.append(`${x}x`,"0"),o.append(`${x}y`,"0")}else h&&o.append(h,y)}}else{if(By(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=qg,r=null,i=Gg,l=e}return o&&i==="text/plain"&&(l=o,o=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:o,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function pS(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function iV(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 aV(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 oV(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 sV(e,t,n){let r=await Promise.all(e.map(async i=>{let o=t.routes[i.route.id];if(o){let l=await aV(o,n);return l.links?l.links():[]}return[]}));return fV(r.flat(1).filter(oV).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function tT(e,t,n,r,i,o){let l=(f,h)=>n[h]?f.route.id!==n[h].route.id:!0,c=(f,h)=>n[h].pathname!==f.pathname||n[h].route.path?.endsWith("*")&&n[h].params["*"]!==f.params["*"];return o==="assets"?t.filter((f,h)=>l(f,h)||c(f,h)):o==="data"?t.filter((f,h)=>{let m=r.routes[f.route.id];if(!m||!m.hasLoader)return!1;if(l(f,h)||c(f,h))return!0;if(f.route.shouldRevalidate){let y=f.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function lV(e,t,{includeHydrateFallback:n}={}){return uV(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let o=[i.module];return i.clientActionModule&&(o=o.concat(i.clientActionModule)),i.clientLoaderModule&&(o=o.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(o=o.concat(i.hydrateFallbackModule)),i.imports&&(o=o.concat(i.imports)),o}).flat(1))}function uV(e){return[...new Set(e)]}function cV(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function fV(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let o=JSON.stringify(cV(i));return n.has(o)||(n.add(o),r.push({key:o,link:i})),r},[])}function s6(){let e=_.useContext(Tf);return pS(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function dV(){let e=_.useContext(Iy);return pS(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var gS=_.createContext(void 0);gS.displayName="FrameworkContext";function l6(){let e=_.useContext(gS);return pS(e,"You must render this element inside a <HydratedRouter> element"),e}function hV(e,t){let n=_.useContext(gS),[r,i]=_.useState(!1),[o,l]=_.useState(!1),{onFocus:c,onBlur:f,onMouseEnter:h,onMouseLeave:m,onTouchStart:y}=t,x=_.useRef(null);_.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let C=T=>{T.forEach(P=>{l(P.isIntersecting)})},O=new IntersectionObserver(C,{threshold:.5});return x.current&&O.observe(x.current),()=>{O.disconnect()}}},[e]),_.useEffect(()=>{if(r){let C=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(C)}}},[r]);let b=()=>{i(!0)},w=()=>{i(!1),l(!1)};return n?e!=="intent"?[o,x,{}]:[o,x,{onFocus:Qd(c,b),onBlur:Qd(f,w),onMouseEnter:Qd(h,b),onMouseLeave:Qd(m,w),onTouchStart:Qd(y,b)}]:[!1,x,{}]}function Qd(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function mV({page:e,...t}){let{router:n}=s6(),r=_.useMemo(()=>YL(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?_.createElement(gV,{page:e,matches:r,...t}):null}function pV(e){let{manifest:t,routeModules:n}=l6(),[r,i]=_.useState([]);return _.useEffect(()=>{let o=!1;return sV(e,t,n).then(l=>{o||i(l)}),()=>{o=!0}},[e,t,n]),r}function gV({page:e,matches:t,...n}){let r=_r(),{manifest:i,routeModules:o}=l6(),{basename:l}=s6(),{loaderData:c,matches:f}=dV(),h=_.useMemo(()=>tT(e,t,f,i,r,"data"),[e,t,f,i,r]),m=_.useMemo(()=>tT(e,t,f,i,r,"assets"),[e,t,f,i,r]),y=_.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let w=new Set,C=!1;if(t.forEach(T=>{let P=i.routes[T.route.id];!P||!P.hasLoader||(!h.some(N=>N.route.id===T.route.id)&&T.route.id in c&&o[T.route.id]?.shouldRevalidate||P.hasClientLoader?C=!0:w.add(T.route.id))}),w.size===0)return[];let O=iV(e,l,"data");return C&&w.size>0&&O.searchParams.set("_routes",t.filter(T=>w.has(T.route.id)).map(T=>T.route.id).join(",")),[O.pathname+O.search]},[l,c,r,i,h,t,e,o]),x=_.useMemo(()=>lV(m,i),[m,i]),b=pV(m);return _.createElement(_.Fragment,null,y.map(w=>_.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),x.map(w=>_.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),b.map(({key:w,link:C})=>_.createElement("link",{key:w,nonce:n.nonce,...C})))}function vV(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var yV=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{yV&&(window.__reactRouterVersion="7.11.0")}catch{}function u6({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=_.useRef();i.current==null&&(i.current=eF({window:r,v5Compat:!0}));let o=i.current,[l,c]=_.useState({action:o.action,location:o.location}),f=_.useCallback(h=>{n===!1?c(h):_.startTransition(()=>c(h))},[n]);return _.useLayoutEffect(()=>o.listen(f),[o,f]),_.createElement(KF,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,unstable_useTransitions:n})}var c6=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pr=_.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:o,replace:l,state:c,target:f,to:h,preventScrollReset:m,viewTransition:y,unstable_defaultShouldRevalidate:x,...b},w){let{basename:C,unstable_useTransitions:O}=_.useContext(Mi),T=typeof h=="string"&&c6.test(h),P=QL(h,C);h=P.to;let N=RF(h,{relative:i}),[F,B,W]=hV(r,b),Q=_V(h,{replace:l,state:c,target:f,preventScrollReset:m,relative:i,viewTransition:y,unstable_defaultShouldRevalidate:x,unstable_useTransitions:O});function re(ae){t&&t(ae),ae.defaultPrevented||Q(ae)}let ce=_.createElement("a",{...b,...W,href:P.absoluteURL||N,onClick:P.isExternal||o?t:re,ref:vV(w,B),target:f,"data-discover":!T&&n==="render"?"true":void 0});return F&&!T?_.createElement(_.Fragment,null,ce,_.createElement(mV,{page:N})):ce});Pr.displayName="Link";var vS=_.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:o,to:l,viewTransition:c,children:f,...h},m){let y=rm(l,{relative:h.relative}),x=_r(),b=_.useContext(Iy),{navigator:w,basename:C}=_.useContext(Mi),O=b!=null&&AV(y)&&c===!0,T=w.encodeLocation?w.encodeLocation(y).pathname:y.pathname,P=x.pathname,N=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(P=P.toLowerCase(),N=N?N.toLowerCase():null,T=T.toLowerCase()),N&&C&&(N=zo(N,C)||N);const F=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let B=P===T||!i&&P.startsWith(T)&&P.charAt(F)==="/",W=N!=null&&(N===T||!i&&N.startsWith(T)&&N.charAt(T.length)==="/"),Q={isActive:B,isPending:W,isTransitioning:O},re=B?t:void 0,ce;typeof r=="function"?ce=r(Q):ce=[r,B?"active":null,W?"pending":null,O?"transitioning":null].filter(Boolean).join(" ");let ae=typeof o=="function"?o(Q):o;return _.createElement(Pr,{...h,"aria-current":re,className:ce,ref:m,style:ae,to:l,viewTransition:c},typeof f=="function"?f(Q):f)});vS.displayName="NavLink";var bV=_.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:o,method:l=qg,action:c,onSubmit:f,relative:h,preventScrollReset:m,viewTransition:y,unstable_defaultShouldRevalidate:x,...b},w)=>{let{unstable_useTransitions:C}=_.useContext(Mi),O=CV(),T=EV(c,{relative:h}),P=l.toLowerCase()==="get"?"get":"post",N=typeof c=="string"&&c6.test(c),F=B=>{if(f&&f(B),B.defaultPrevented)return;B.preventDefault();let W=B.nativeEvent.submitter,Q=W?.getAttribute("formmethod")||l,re=()=>O(W||B.currentTarget,{fetcherKey:t,method:Q,navigate:n,replace:i,state:o,relative:h,preventScrollReset:m,viewTransition:y,unstable_defaultShouldRevalidate:x});C&&n!==!1?_.startTransition(()=>re()):re()};return _.createElement("form",{ref:w,method:P,action:T,onSubmit:r?f:F,...b,"data-discover":!N&&e==="render"?"true":void 0})});bV.displayName="Form";function xV(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function f6(e){let t=_.useContext(Tf);return mn(t,xV(e)),t}function _V(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:o,viewTransition:l,unstable_defaultShouldRevalidate:c,unstable_useTransitions:f}={}){let h=Ja(),m=_r(),y=rm(e,{relative:o});return _.useCallback(x=>{if(eV(x,t)){x.preventDefault();let b=n!==void 0?n:Ph(m)===Ph(y),w=()=>h(e,{replace:b,state:r,preventScrollReset:i,relative:o,viewTransition:l,unstable_defaultShouldRevalidate:c});f?_.startTransition(()=>w()):w()}},[m,h,y,n,r,t,e,i,o,l,c,f])}var wV=0,SV=()=>`__${String(++wV)}__`;function CV(){let{router:e}=f6("useSubmit"),{basename:t}=_.useContext(Mi),n=qF(),r=e.fetch,i=e.navigate;return _.useCallback(async(o,l={})=>{let{action:c,method:f,encType:h,formData:m,body:y}=rV(o,t);if(l.navigate===!1){let x=l.fetcherKey||SV();await r(x,n,l.action||c,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:y,formMethod:l.method||f,formEncType:l.encType||h,flushSync:l.flushSync})}else await i(l.action||c,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:y,formMethod:l.method||f,formEncType:l.encType||h,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,i,t,n])}function EV(e,{relative:t}={}){let{basename:n}=_.useContext(Mi),r=_.useContext(wa);mn(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),o={...rm(e||".",{relative:t})},l=_r();if(e==null){o.search=l.search;let c=new URLSearchParams(o.search),f=c.getAll("index");if(f.some(m=>m==="")){c.delete("index"),f.filter(y=>y).forEach(y=>c.append("index",y));let m=c.toString();o.search=m?`?${m}`:""}}return(!e||e===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:Do([n,o.pathname])),Ph(o)}function AV(e,{relative:t}={}){let n=_.useContext(e6);mn(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=f6("useViewTransitionState"),i=rm(e,{relative:t});if(!n.isTransitioning)return!1;let o=zo(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=zo(n.nextLocation.pathname,r)||n.nextLocation.pathname;return yv(i.pathname,l)!=null||yv(i.pathname,o)!=null}const OV="/shlink-web-client/dependabot/npm_and_yarn/eslint-95987f47c2",bv={homepage:OV};function d6(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=d6(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Oe(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=d6(e))&&(r&&(r+=" "),r+=t);return r}var TV={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"]},jV=TV,h6={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"]},MV=h6,PV={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"]},m6=PV,NV={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"]},LV=NV,RV={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"]},DV=RV,kV={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"]},A_=kV,IV={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"]},zV=IV,BV={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"]},UV={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"]},$V={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"]},FV={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"]},VV={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"]},yS={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"]},HV={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"]},qV=HV,GV={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"]},YV=GV,WV={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"]},bS=WV,xv={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"]},p6={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"]},KV={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"]},ZV=KV,XV={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"]},QV={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"]},g6=QV,JV={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"]},Uy={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"]},eH={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"]},tH={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"]},nH={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"]},Pu={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"]},rH={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"]},iH=rH,nT={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"]},rT={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"]},$y={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"]},Fy=$y,aH=$y,v6={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"]},oH={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"]},xS={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"]},sH={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"]},lH={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"]},_S={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"]},uH={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"]},iT={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"]},cH={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"]},fH={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"]},dH=fH,hH={prefix:"fas",iconName:"caret-up",icon:[320,512,[],"f0d8","M140.3 135.2c12.6-10.3 31.1-9.5 42.8 2.2l128 128c9.2 9.2 11.9 22.9 6.9 34.9S301.4 320 288.5 320l-256 0c-12.9 0-24.6-7.8-29.6-19.8S.7 274.5 9.9 265.4l128-128 2.4-2.2z"]},mH={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"]},pH={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"]},gH={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"]},y6={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"]},im={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"]},vH={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"]},yH={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"]},bH=yH,b6={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M140.3 376.8c12.6 10.2 31.1 9.5 42.8-2.2l128-128c9.2-9.2 11.9-22.9 6.9-34.9S301.4 192 288.5 192l-256 0c-12.9 0-24.6 7.8-29.6 19.8S.7 237.5 9.9 246.6l128 128 2.4 2.2z"]},xH={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"]},_H={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"]},wH=_H,SH={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"]},CH={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"]},EH={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"]},AH={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"]},OH=AH,TH={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"]},jH={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"]},x6=jH,MH={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"]},Vy=MH;function O_(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 PH(e){if(Array.isArray(e))return e}function NH(e){if(Array.isArray(e))return O_(e)}function LH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RH(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,_6(r.key),r)}}function DH(e,t,n){return t&&RH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yg(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=wS(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(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,l=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var f=n.next();return l=f.done,f},e:function(f){c=!0,o=f},f:function(){try{l||n.return==null||n.return()}finally{if(c)throw o}}}}function dt(e,t,n){return(t=_6(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function IH(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,c=[],f=!0,h=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(m){h=!0,i=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return c}}function zH(){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 BH(){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 aT(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 Ie(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aT(Object(n),!0).forEach(function(r){dt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hy(e,t){return PH(e)||IH(e,t)||wS(e,t)||zH()}function va(e){return NH(e)||kH(e)||wS(e)||BH()}function UH(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 _6(e){var t=UH(e,"string");return typeof t=="symbol"?t:t+""}function _v(e){"@babel/helpers - typeof";return _v=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},_v(e)}function wS(e,t){if(e){if(typeof e=="string")return O_(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)?O_(e,t):void 0}}var oT=function(){},SS={},w6={},S6=null,C6={mark:oT,measure:oT};try{typeof window<"u"&&(SS=window),typeof document<"u"&&(w6=document),typeof MutationObserver<"u"&&(S6=MutationObserver),typeof performance<"u"&&(C6=performance)}catch{}var $H=SS.navigator||{},sT=$H.userAgent,lT=sT===void 0?"":sT,ol=SS,rn=w6,uT=S6,pg=C6;ol.document;var Zo=!!rn.documentElement&&!!rn.head&&typeof rn.addEventListener=="function"&&typeof rn.createElement=="function",E6=~lT.indexOf("MSIE")||~lT.indexOf("Trident/"),vx,FH=/fa(k|kd|s|r|l|t|d|dr|dl|dt|b|slr|slpr|wsb|tl|ns|nds|es|jr|jfr|jdr|usb|ufsb|udsb|cr|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,VH=/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|Utility|Utility Fill|Utility Duo|Slab Press|Slab|Whiteboard)?.*/i,A6={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"},utility:{"fa-semibold":"semibold",fausb:"semibold"},"utility-duo":{"fa-semibold":"semibold",faudsb:"semibold"},"utility-fill":{"fa-semibold":"semibold",faufsb:"semibold"}},HH={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},O6=["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","fa-utility","fa-utility-duo","fa-utility-fill"],br="classic",am="duotone",T6="sharp",j6="sharp-duotone",M6="chisel",P6="etch",N6="jelly",L6="jelly-duo",R6="jelly-fill",D6="notdog",k6="notdog-duo",I6="slab",z6="slab-press",B6="thumbprint",U6="utility",$6="utility-duo",F6="utility-fill",V6="whiteboard",qH="Classic",GH="Duotone",YH="Sharp",WH="Sharp Duotone",KH="Chisel",ZH="Etch",XH="Jelly",QH="Jelly Duo",JH="Jelly Fill",eq="Notdog",tq="Notdog Duo",nq="Slab",rq="Slab Press",iq="Thumbprint",aq="Utility",oq="Utility Duo",sq="Utility Fill",lq="Whiteboard",H6=[br,am,T6,j6,M6,P6,N6,L6,R6,D6,k6,I6,z6,B6,U6,$6,F6,V6];vx={},dt(dt(dt(dt(dt(dt(dt(dt(dt(dt(vx,br,qH),am,GH),T6,YH),j6,WH),M6,KH),P6,ZH),N6,XH),L6,QH),R6,JH),D6,eq),dt(dt(dt(dt(dt(dt(dt(dt(vx,k6,tq),I6,nq),z6,rq),B6,iq),U6,aq),$6,oq),F6,sq),V6,lq);var uq={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"},utility:{600:"fausb"},"utility-duo":{600:"faudsb"},"utility-fill":{600:"faufsb"}},cq={"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"},"Font Awesome 7 Utility":{600:"fausb",normal:"fausb"},"Font Awesome 7 Utility Duo":{600:"faudsb",normal:"faudsb"},"Font Awesome 7 Utility Fill":{600:"faufsb",normal:"faufsb"}},fq=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}],["utility",{defaultShortPrefixId:"fausb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-duo",{defaultShortPrefixId:"faudsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-fill",{defaultShortPrefixId:"faufsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["whiteboard",{defaultShortPrefixId:"fawsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}]]),dq={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"},utility:{semibold:"fausb"},"utility-duo":{semibold:"faudsb"},"utility-fill":{semibold:"faufsb"},whiteboard:{semibold:"fawsb"}},q6=["fak","fa-kit","fakd","fa-kit-duotone"],cT={kit:{fak:"kit","fa-kit":"kit"},"kit-duotone":{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"}},hq=["kit"],mq="kit",pq="kit-duotone",gq="Kit",vq="Kit Duotone";dt(dt({},mq,gq),pq,vq);var yq={kit:{"fa-kit":"fak"}},bq={"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},xq={kit:{fak:"fa-kit"}},fT={kit:{kit:"fak"},"kit-duotone":{"kit-duotone":"fakd"}},yx,gg={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},_q=["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","fa-utility","fa-utility-duo","fa-utility-fill"],wq="classic",Sq="duotone",Cq="sharp",Eq="sharp-duotone",Aq="chisel",Oq="etch",Tq="jelly",jq="jelly-duo",Mq="jelly-fill",Pq="notdog",Nq="notdog-duo",Lq="slab",Rq="slab-press",Dq="thumbprint",kq="utility",Iq="utility-duo",zq="utility-fill",Bq="whiteboard",Uq="Classic",$q="Duotone",Fq="Sharp",Vq="Sharp Duotone",Hq="Chisel",qq="Etch",Gq="Jelly",Yq="Jelly Duo",Wq="Jelly Fill",Kq="Notdog",Zq="Notdog Duo",Xq="Slab",Qq="Slab Press",Jq="Thumbprint",eG="Utility",tG="Utility Duo",nG="Utility Fill",rG="Whiteboard";yx={},dt(dt(dt(dt(dt(dt(dt(dt(dt(dt(yx,wq,Uq),Sq,$q),Cq,Fq),Eq,Vq),Aq,Hq),Oq,qq),Tq,Gq),jq,Yq),Mq,Wq),Pq,Kq),dt(dt(dt(dt(dt(dt(dt(dt(yx,Nq,Zq),Lq,Xq),Rq,Qq),Dq,Jq),kq,eG),Iq,tG),zq,nG),Bq,rG);var iG="kit",aG="kit-duotone",oG="Kit",sG="Kit Duotone";dt(dt({},iG,oG),aG,sG);var lG={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"},utility:{"fa-semibold":"fausb"},"utility-duo":{"fa-semibold":"faudsb"},"utility-fill":{"fa-semibold":"faufsb"}},uG={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"],utility:["fausb"],"utility-duo":["faudsb"],"utility-fill":["faufsb"]},T_={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"},utility:{fausb:"fa-semibold"},"utility-duo":{faudsb:"fa-semibold"},"utility-fill":{faufsb:"fa-semibold"}},cG=["fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands","fa-semibold"],G6=["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","fausb","faudsb","faufsb"].concat(_q,cG),fG=["solid","regular","light","thin","duotone","brands","semibold"],Y6=[1,2,3,4,5,6,7,8,9,10],dG=Y6.concat([11,12,13,14,15,16,17,18,19,20]),hG=["aw","fw","pull-left","pull-right"],mG=[].concat(va(Object.keys(uG)),fG,hG,["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",gg.GROUP,gg.SWAP_OPACITY,gg.PRIMARY,gg.SECONDARY]).concat(Y6.map(function(e){return"".concat(e,"x")})).concat(dG.map(function(e){return"w-".concat(e)})),pG={"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"}},Bo="___FONT_AWESOME___",j_=16,W6="fa",K6="svg-inline--fa",Nu="data-fa-i2svg",M_="data-fa-pseudo-element",gG="data-fa-pseudo-element-pending",CS="data-prefix",ES="data-icon",dT="fontawesome-i2svg",vG="async",yG=["HTML","HEAD","STYLE","SCRIPT"],Z6=["::before","::after",":before",":after"],X6=(function(){try{return!0}catch{return!1}})();function om(e){return new Proxy(e,{get:function(n,r){return r in n?n[r]:n[br]}})}var Q6=Ie({},A6);Q6[br]=Ie(Ie(Ie(Ie({},{"fa-duotone":"duotone"}),A6[br]),cT.kit),cT["kit-duotone"]);var bG=om(Q6),P_=Ie({},dq);P_[br]=Ie(Ie(Ie(Ie({},{duotone:"fad"}),P_[br]),fT.kit),fT["kit-duotone"]);var hT=om(P_),N_=Ie({},T_);N_[br]=Ie(Ie({},N_[br]),xq.kit);var AS=om(N_),L_=Ie({},lG);L_[br]=Ie(Ie({},L_[br]),yq.kit);om(L_);var xG=FH,J6="fa-layers-text",_G=VH,wG=Ie({},uq);om(wG);var SG=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],bx=HH,CG=[].concat(va(hq),va(mG)),xh=ol.FontAwesomeConfig||{};function EG(e){var t=rn.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function AG(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}if(rn&&typeof rn.querySelector=="function"){var OG=[["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"]];OG.forEach(function(e){var t=Hy(e,2),n=t[0],r=t[1],i=AG(EG(n));i!=null&&(xh[r]=i)})}var eR={styleDefault:"solid",familyDefault:br,cssPrefix:W6,replacementClass:K6,autoReplaceSvg:!0,autoAddCss:!0,searchPseudoElements:!1,searchPseudoElementsWarnings:!0,searchPseudoElementsFullScan:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};xh.familyPrefix&&(xh.cssPrefix=xh.familyPrefix);var ff=Ie(Ie({},eR),xh);ff.autoReplaceSvg||(ff.observeMutations=!1);var Xe={};Object.keys(eR).forEach(function(e){Object.defineProperty(Xe,e,{enumerable:!0,set:function(n){ff[e]=n,_h.forEach(function(r){return r(Xe)})},get:function(){return ff[e]}})});Object.defineProperty(Xe,"familyPrefix",{enumerable:!0,set:function(t){ff.cssPrefix=t,_h.forEach(function(n){return n(Xe)})},get:function(){return ff.cssPrefix}});ol.FontAwesomeConfig=Xe;var _h=[];function TG(e){return _h.push(e),function(){_h.splice(_h.indexOf(e),1)}}var Fc=j_,Va={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function jG(e){if(!(!e||!Zo)){var t=rn.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=rn.head.childNodes,r=null,i=n.length-1;i>-1;i--){var o=n[i],l=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(l)>-1&&(r=o)}return rn.head.insertBefore(t,r),e}}var MG="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function mT(){for(var e=12,t="";e-- >0;)t+=MG[Math.random()*62|0];return t}function jf(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function OS(e){return e.classList?jf(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function tR(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function PG(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(tR(e[n]),'" ')},"").trim()}function qy(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function TS(e){return e.size!==Va.size||e.x!==Va.x||e.y!==Va.y||e.rotate!==Va.rotate||e.flipX||e.flipY}function NG(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,i={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(t.x*32,", ").concat(t.y*32,") "),l="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),c="rotate(".concat(t.rotate," 0 0)"),f={transform:"".concat(o," ").concat(l," ").concat(c)},h={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:f,path:h}}function LG(e){var t=e.transform,n=e.width,r=n===void 0?j_:n,i=e.height,o=i===void 0?j_:i,l="";return E6?l+="translate(".concat(t.x/Fc-r/2,"em, ").concat(t.y/Fc-o/2,"em) "):l+="translate(calc(-50% + ".concat(t.x/Fc,"em), calc(-50% + ").concat(t.y/Fc,"em)) "),l+="scale(".concat(t.size/Fc*(t.flipX?-1:1),", ").concat(t.size/Fc*(t.flipY?-1:1),") "),l+="rotate(".concat(t.rotate,"deg) "),l}var RG=`: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";
|
||
--fa-font-utility-semibold: normal 600 1em/1 "Font Awesome 7 Utility";
|
||
--fa-font-utility-duo-semibold: normal 600 1em/1 "Font Awesome 7 Utility Duo";
|
||
--fa-font-utility-fill-semibold: normal 600 1em/1 "Font Awesome 7 Utility Fill";
|
||
}
|
||
|
||
.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 nR(){var e=W6,t=K6,n=Xe.cssPrefix,r=Xe.replacementClass,i=RG;if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),l=new RegExp("\\--".concat(e,"\\-"),"g"),c=new RegExp("\\.".concat(t),"g");i=i.replace(o,".".concat(n,"-")).replace(l,"--".concat(n,"-")).replace(c,".".concat(r))}return i}var pT=!1;function xx(){Xe.autoAddCss&&!pT&&(jG(nR()),pT=!0)}var DG={mixout:function(){return{dom:{css:nR,insertCss:xx}}},hooks:function(){return{beforeDOMElementCreation:function(){xx()},beforeI2svg:function(){xx()}}}},Uo=ol||{};Uo[Bo]||(Uo[Bo]={});Uo[Bo].styles||(Uo[Bo].styles={});Uo[Bo].hooks||(Uo[Bo].hooks={});Uo[Bo].shims||(Uo[Bo].shims=[]);var ga=Uo[Bo],rR=[],iR=function(){rn.removeEventListener("DOMContentLoaded",iR),wv=1,rR.map(function(t){return t()})},wv=!1;Zo&&(wv=(rn.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(rn.readyState),wv||rn.addEventListener("DOMContentLoaded",iR));function kG(e){Zo&&(wv?setTimeout(e,0):rR.push(e))}function sm(e){var t=e.tag,n=e.attributes,r=n===void 0?{}:n,i=e.children,o=i===void 0?[]:i;return typeof e=="string"?tR(e):"<".concat(t," ").concat(PG(r),">").concat(o.map(sm).join(""),"</").concat(t,">")}function gT(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var _x=function(t,n,r,i){var o=Object.keys(t),l=o.length,c=n,f,h,m;for(r===void 0?(f=1,m=t[o[0]]):(f=0,m=r);f<l;f++)h=o[f],m=c(m,t[h],h,t);return m};function aR(e){return va(e).length!==1?null:e.codePointAt(0).toString(16)}function vT(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 R_(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,o=vT(t);typeof ga.hooks.addPack=="function"&&!i?ga.hooks.addPack(e,vT(t)):ga.styles[e]=Ie(Ie({},ga.styles[e]||{}),o),e==="fas"&&R_("fa",t)}var Nh=ga.styles,IG=ga.shims,oR=Object.keys(AS),zG=oR.reduce(function(e,t){return e[t]=Object.keys(AS[t]),e},{}),jS=null,sR={},lR={},uR={},cR={},fR={};function BG(e){return~CG.indexOf(e)}function UG(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!BG(i)?i:null}var dR=function(){var t=function(o){return _x(Nh,function(l,c,f){return l[f]=_x(c,o,{}),l},{})};sR=t(function(i,o,l){if(o[3]&&(i[o[3]]=l),o[2]){var c=o[2].filter(function(f){return typeof f=="number"});c.forEach(function(f){i[f.toString(16)]=l})}return i}),lR=t(function(i,o,l){if(i[l]=l,o[2]){var c=o[2].filter(function(f){return typeof f=="string"});c.forEach(function(f){i[f]=l})}return i}),fR=t(function(i,o,l){var c=o[2];return i[l]=l,c.forEach(function(f){i[f]=l}),i});var n="far"in Nh||Xe.autoFetchSvg,r=_x(IG,function(i,o){var l=o[0],c=o[1],f=o[2];return c==="far"&&!n&&(c="fas"),typeof l=="string"&&(i.names[l]={prefix:c,iconName:f}),typeof l=="number"&&(i.unicodes[l.toString(16)]={prefix:c,iconName:f}),i},{names:{},unicodes:{}});uR=r.names,cR=r.unicodes,jS=Gy(Xe.styleDefault,{family:Xe.familyDefault})};TG(function(e){jS=Gy(e.styleDefault,{family:Xe.familyDefault})});dR();function MS(e,t){return(sR[e]||{})[t]}function $G(e,t){return(lR[e]||{})[t]}function _u(e,t){return(fR[e]||{})[t]}function hR(e){return uR[e]||{prefix:null,iconName:null}}function FG(e){var t=cR[e],n=MS("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function sl(){return jS}var mR=function(){return{prefix:null,iconName:null,rest:[]}};function VG(e){var t=br,n=oR.reduce(function(r,i){return r[i]="".concat(Xe.cssPrefix,"-").concat(i),r},{});return H6.forEach(function(r){(e.includes(n[r])||e.some(function(i){return zG[r].includes(i)}))&&(t=r)}),t}function Gy(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?br:n,i=bG[r][e];if(r===am&&!e)return"fad";var o=hT[r][e]||hT[r][i],l=e in ga.styles?e:null,c=o||l||null;return c}function HG(e){var t=[],n=null;return e.forEach(function(r){var i=UG(Xe.cssPrefix,r);i?n=i:r&&t.push(r)}),{iconName:n,rest:t}}function yT(e){return e.sort().filter(function(t,n,r){return r.indexOf(t)===n})}var bT=G6.concat(q6);function Yy(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.skipLookups,r=n===void 0?!1:n,i=null,o=yT(e.filter(function(b){return bT.includes(b)})),l=yT(e.filter(function(b){return!bT.includes(b)})),c=o.filter(function(b){return i=b,!O6.includes(b)}),f=Hy(c,1),h=f[0],m=h===void 0?null:h,y=VG(o),x=Ie(Ie({},HG(l)),{},{prefix:Gy(m,{family:y})});return Ie(Ie(Ie({},x),WG({values:e,family:y,styles:Nh,config:Xe,canonical:x,givenPrefix:i})),qG(r,i,x))}function qG(e,t,n){var r=n.prefix,i=n.iconName;if(e||!r||!i)return{prefix:r,iconName:i};var o=t==="fa"?hR(i):{},l=_u(r,i);return i=o.iconName||l||i,r=o.prefix||r,r==="far"&&!Nh.far&&Nh.fas&&!Xe.autoFetchSvg&&(r="fas"),{prefix:r,iconName:i}}var GG=H6.filter(function(e){return e!==br||e!==am}),YG=Object.keys(T_).filter(function(e){return e!==br}).map(function(e){return Object.keys(T_[e])}).flat();function WG(e){var t=e.values,n=e.family,r=e.canonical,i=e.givenPrefix,o=i===void 0?"":i,l=e.styles,c=l===void 0?{}:l,f=e.config,h=f===void 0?{}:f,m=n===am,y=t.includes("fa-duotone")||t.includes("fad"),x=h.familyDefault==="duotone",b=r.prefix==="fad"||r.prefix==="fa-duotone";if(!m&&(y||x||b)&&(r.prefix="fad"),(t.includes("fa-brands")||t.includes("fab"))&&(r.prefix="fab"),!r.prefix&&GG.includes(n)){var w=Object.keys(c).find(function(O){return YG.includes(O)});if(w||h.autoFetchSvg){var C=fq.get(n).defaultShortPrefixId;r.prefix=C,r.iconName=_u(r.prefix,r.iconName)||r.iconName}}return(r.prefix==="fa"||o==="fa")&&(r.prefix=sl()||"fas"),r}var KG=(function(){function e(){LH(this,e),this.definitions={}}return DH(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var l=i.reduce(this._pullDefinitions,{});Object.keys(l).forEach(function(c){n.definitions[c]=Ie(Ie({},n.definitions[c]||{}),l[c]),R_(c,l[c]);var f=AS[br][c];f&&R_(f,l[c]),dR()})}},{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(o){var l=i[o],c=l.prefix,f=l.iconName,h=l.icon,m=h[2];n[c]||(n[c]={}),m.length>0&&m.forEach(function(y){typeof y=="string"&&(n[c][y]=h)}),n[c][f]=h}),n}}])})(),xT=[],Qc={},nf={},ZG=Object.keys(nf);function XG(e,t){var n=t.mixoutsTo;return xT=e,Qc={},Object.keys(nf).forEach(function(r){ZG.indexOf(r)===-1&&delete nf[r]}),xT.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(l){typeof i[l]=="function"&&(n[l]=i[l]),_v(i[l])==="object"&&Object.keys(i[l]).forEach(function(c){n[l]||(n[l]={}),n[l][c]=i[l][c]})}),r.hooks){var o=r.hooks();Object.keys(o).forEach(function(l){Qc[l]||(Qc[l]=[]),Qc[l].push(o[l])})}r.provides&&r.provides(nf)}),n}function D_(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 o=Qc[e]||[];return o.forEach(function(l){t=l.apply(null,[t].concat(r))}),t}function Lu(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=Qc[e]||[];i.forEach(function(o){o.apply(null,n)})}function ll(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return nf[e]?nf[e].apply(null,t):void 0}function k_(e){e.prefix==="fa"&&(e.prefix="fas");var t=e.iconName,n=e.prefix||sl();if(t)return t=_u(n,t)||t,gT(pR.definitions,n,t)||gT(ga.styles,n,t)}var pR=new KG,QG=function(){Xe.autoReplaceSvg=!1,Xe.observeMutations=!1,Lu("noAuto")},JG={i2svg:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Zo?(Lu("beforeI2svg",t),ll("pseudoElements2svg",t),ll("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;Xe.autoReplaceSvg===!1&&(Xe.autoReplaceSvg=!0),Xe.observeMutations=!0,kG(function(){tY({autoReplaceSvgRoot:n}),Lu("watch",t)})}},eY={icon:function(t){if(t===null)return null;if(_v(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:_u(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=Gy(t[0]);return{prefix:r,iconName:_u(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(Xe.cssPrefix,"-"))>-1||t.match(xG))){var i=Yy(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||sl(),iconName:_u(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var o=sl();return{prefix:o,iconName:_u(o,t)||t}}}},Pi={noAuto:QG,config:Xe,dom:JG,parse:eY,library:pR,findIconDefinition:k_,toHtml:sm},tY=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?rn:n;(Object.keys(ga.styles).length>0||Xe.autoFetchSvg)&&Zo&&Xe.autoReplaceSvg&&Pi.dom.i2svg({node:r})};function Wy(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return sm(r)})}}),Object.defineProperty(e,"node",{get:function(){if(Zo){var r=rn.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function nY(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,o=e.styles,l=e.transform;if(TS(l)&&n.found&&!r.found){var c=n.width,f=n.height,h={x:c/f/2,y:.5};i.style=qy(Ie(Ie({},o),{},{"transform-origin":"".concat(h.x+l.x/16,"em ").concat(h.y+l.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function rY(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,o=e.symbol,l=o===!0?"".concat(t,"-").concat(Xe.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:Ie(Ie({},i),{},{id:l}),children:r}]}]}function iY(e){var t=["aria-label","aria-labelledby","title","role"];return t.some(function(n){return n in e})}function PS(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,o=e.iconName,l=e.transform,c=e.symbol,f=e.maskId,h=e.extra,m=e.watchable,y=m===void 0?!1:m,x=r.found?r:n,b=x.width,w=x.height,C=[Xe.replacementClass,o?"".concat(Xe.cssPrefix,"-").concat(o):""].filter(function(B){return h.classes.indexOf(B)===-1}).filter(function(B){return B!==""||!!B}).concat(h.classes).join(" "),O={children:[],attributes:Ie(Ie({},h.attributes),{},{"data-prefix":i,"data-icon":o,class:C,role:h.attributes.role||"img",viewBox:"0 0 ".concat(b," ").concat(w)})};!iY(h.attributes)&&!h.attributes["aria-hidden"]&&(O.attributes["aria-hidden"]="true"),y&&(O.attributes[Nu]="");var T=Ie(Ie({},O),{},{prefix:i,iconName:o,main:n,mask:r,maskId:f,transform:l,symbol:c,styles:Ie({},h.styles)}),P=r.found&&n.found?ll("generateAbstractMask",T)||{children:[],attributes:{}}:ll("generateAbstractIcon",T)||{children:[],attributes:{}},N=P.children,F=P.attributes;return T.children=N,T.attributes=F,c?rY(T):nY(T)}function _T(e){var t=e.content,n=e.width,r=e.height,i=e.transform,o=e.extra,l=e.watchable,c=l===void 0?!1:l,f=Ie(Ie({},o.attributes),{},{class:o.classes.join(" ")});c&&(f[Nu]="");var h=Ie({},o.styles);TS(i)&&(h.transform=LG({transform:i,width:n,height:r}),h["-webkit-transform"]=h.transform);var m=qy(h);m.length>0&&(f.style=m);var y=[];return y.push({tag:"span",attributes:f,children:[t]}),y}function aY(e){var t=e.content,n=e.extra,r=Ie(Ie({},n.attributes),{},{class:n.classes.join(" ")}),i=qy(n.styles);i.length>0&&(r.style=i);var o=[];return o.push({tag:"span",attributes:r,children:[t]}),o}var wx=ga.styles;function I_(e){var t=e[0],n=e[1],r=e.slice(4),i=Hy(r,1),o=i[0],l=null;return Array.isArray(o)?l={tag:"g",attributes:{class:"".concat(Xe.cssPrefix,"-").concat(bx.GROUP)},children:[{tag:"path",attributes:{class:"".concat(Xe.cssPrefix,"-").concat(bx.SECONDARY),fill:"currentColor",d:o[0]}},{tag:"path",attributes:{class:"".concat(Xe.cssPrefix,"-").concat(bx.PRIMARY),fill:"currentColor",d:o[1]}}]}:l={tag:"path",attributes:{fill:"currentColor",d:o}},{found:!0,width:t,height:n,icon:l}}var oY={found:!1,width:512,height:512};function sY(e,t){!X6&&!Xe.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function z_(e,t){var n=t;return t==="fa"&&Xe.styleDefault!==null&&(t=sl()),new Promise(function(r,i){if(n==="fa"){var o=hR(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&wx[t]&&wx[t][e]){var l=wx[t][e];return r(I_(l))}sY(e,t),r(Ie(Ie({},oY),{},{icon:Xe.showMissingIcons&&e?ll("missingIconAbstract")||{}:{}}))})}var wT=function(){},B_=Xe.measurePerformance&&pg&&pg.mark&&pg.measure?pg:{mark:wT,measure:wT},dh='FA "7.1.0"',lY=function(t){return B_.mark("".concat(dh," ").concat(t," begins")),function(){return gR(t)}},gR=function(t){B_.mark("".concat(dh," ").concat(t," ends")),B_.measure("".concat(dh," ").concat(t),"".concat(dh," ").concat(t," begins"),"".concat(dh," ").concat(t," ends"))},NS={begin:lY,end:gR},Wg=function(){};function ST(e){var t=e.getAttribute?e.getAttribute(Nu):null;return typeof t=="string"}function uY(e){var t=e.getAttribute?e.getAttribute(CS):null,n=e.getAttribute?e.getAttribute(ES):null;return t&&n}function cY(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(Xe.replacementClass)}function fY(){if(Xe.autoReplaceSvg===!0)return Kg.replace;var e=Kg[Xe.autoReplaceSvg];return e||Kg.replace}function dY(e){return rn.createElementNS("http://www.w3.org/2000/svg",e)}function hY(e){return rn.createElement(e)}function vR(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?dY:hY:n;if(typeof e=="string")return rn.createTextNode(e);var i=r(e.tag);Object.keys(e.attributes||[]).forEach(function(l){i.setAttribute(l,e.attributes[l])});var o=e.children||[];return o.forEach(function(l){i.appendChild(vR(l,{ceFn:r}))}),i}function mY(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var Kg={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(vR(i),n)}),n.getAttribute(Nu)===null&&Xe.keepOriginalSource){var r=rn.createComment(mY(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~OS(n).indexOf(Xe.replacementClass))return Kg.replace(t);var i=new RegExp("".concat(Xe.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var o=r[0].attributes.class.split(" ").reduce(function(c,f){return f===Xe.replacementClass||f.match(i)?c.toSvg.push(f):c.toNode.push(f),c},{toNode:[],toSvg:[]});r[0].attributes.class=o.toSvg.join(" "),o.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",o.toNode.join(" "))}var l=r.map(function(c){return sm(c)}).join(`
|
||
`);n.setAttribute(Nu,""),n.innerHTML=l}};function CT(e){e()}function yR(e,t){var n=typeof t=="function"?t:Wg;if(e.length===0)n();else{var r=CT;Xe.mutateApproach===vG&&(r=ol.requestAnimationFrame||CT),r(function(){var i=fY(),o=NS.begin("mutate");e.map(i),o(),n()})}}var LS=!1;function bR(){LS=!0}function U_(){LS=!1}var Sv=null;function ET(e){if(uT&&Xe.observeMutations){var t=e.treeCallback,n=t===void 0?Wg:t,r=e.nodeCallback,i=r===void 0?Wg:r,o=e.pseudoElementsCallback,l=o===void 0?Wg:o,c=e.observeMutationsRoot,f=c===void 0?rn:c;Sv=new uT(function(h){if(!LS){var m=sl();jf(h).forEach(function(y){if(y.type==="childList"&&y.addedNodes.length>0&&!ST(y.addedNodes[0])&&(Xe.searchPseudoElements&&l(y.target),n(y.target)),y.type==="attributes"&&y.target.parentNode&&Xe.searchPseudoElements&&l([y.target],!0),y.type==="attributes"&&ST(y.target)&&~SG.indexOf(y.attributeName))if(y.attributeName==="class"&&uY(y.target)){var x=Yy(OS(y.target)),b=x.prefix,w=x.iconName;y.target.setAttribute(CS,b||m),w&&y.target.setAttribute(ES,w)}else cY(y.target)&&i(y.target)})}}),Zo&&Sv.observe(f,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function pY(){Sv&&Sv.disconnect()}function gY(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,i){var o=i.split(":"),l=o[0],c=o.slice(1);return l&&c.length>0&&(r[l]=c.join(":").trim()),r},{})),n}function vY(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=Yy(OS(e));return i.prefix||(i.prefix=sl()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=$G(i.prefix,e.innerText)||MS(i.prefix,aR(e.innerText))),!i.iconName&&Xe.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function yY(e){var t=jf(e.attributes).reduce(function(n,r){return n.name!=="class"&&n.name!=="style"&&(n[r.name]=r.value),n},{});return t}function bY(){return{iconName:null,prefix:null,transform:Va,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function AT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=vY(e),r=n.iconName,i=n.prefix,o=n.rest,l=yY(e),c=D_("parseNodeAttributes",{},e),f=t.styleParser?gY(e):[];return Ie({iconName:r,prefix:i,transform:Va,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:f,attributes:l}},c)}var xY=ga.styles;function xR(e){var t=Xe.autoReplaceSvg==="nest"?AT(e,{styleParser:!1}):AT(e);return~t.extra.classes.indexOf(J6)?ll("generateLayersText",e,t):ll("generateSvgReplacementMutation",e,t)}function _Y(){return[].concat(va(q6),va(G6))}function OT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!Zo)return Promise.resolve();var n=rn.documentElement.classList,r=function(y){return n.add("".concat(dT,"-").concat(y))},i=function(y){return n.remove("".concat(dT,"-").concat(y))},o=Xe.autoFetchSvg?_Y():O6.concat(Object.keys(xY));o.includes("fa")||o.push("fa");var l=[".".concat(J6,":not([").concat(Nu,"])")].concat(o.map(function(m){return".".concat(m,":not([").concat(Nu,"])")})).join(", ");if(l.length===0)return Promise.resolve();var c=[];try{c=jf(e.querySelectorAll(l))}catch{}if(c.length>0)r("pending"),i("complete");else return Promise.resolve();var f=NS.begin("onTree"),h=c.reduce(function(m,y){try{var x=xR(y);x&&m.push(x)}catch(b){X6||b.name==="MissingIcon"&&console.error(b)}return m},[]);return new Promise(function(m,y){Promise.all(h).then(function(x){yR(x,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),f(),m()})}).catch(function(x){f(),y(x)})})}function wY(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;xR(e).then(function(n){n&&yR([n],t)})}function SY(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:k_(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:k_(i||{})),e(r,Ie(Ie({},n),{},{mask:i}))}}var CY=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?Va:r,o=n.symbol,l=o===void 0?!1:o,c=n.mask,f=c===void 0?null:c,h=n.maskId,m=h===void 0?null:h,y=n.classes,x=y===void 0?[]:y,b=n.attributes,w=b===void 0?{}:b,C=n.styles,O=C===void 0?{}:C;if(t){var T=t.prefix,P=t.iconName,N=t.icon;return Wy(Ie({type:"icon"},t),function(){return Lu("beforeDOMElementCreation",{iconDefinition:t,params:n}),PS({icons:{main:I_(N),mask:f?I_(f.icon):{found:!1,width:null,height:null,icon:{}}},prefix:T,iconName:P,transform:Ie(Ie({},Va),i),symbol:l,maskId:m,extra:{attributes:w,styles:O,classes:x}})})}},EY={mixout:function(){return{icon:SY(CY)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=OT,n.nodeCallback=wY,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?rn:r,o=n.callback,l=o===void 0?function(){}:o;return OT(i,l)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,o=r.prefix,l=r.transform,c=r.symbol,f=r.mask,h=r.maskId,m=r.extra;return new Promise(function(y,x){Promise.all([z_(i,o),f.iconName?z_(f.iconName,f.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(b){var w=Hy(b,2),C=w[0],O=w[1];y([n,PS({icons:{main:C,mask:O},prefix:o,iconName:i,transform:l,symbol:c,maskId:h,extra:m,watchable:!0})])}).catch(x)})},t.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,o=n.main,l=n.transform,c=n.styles,f=qy(c);f.length>0&&(i.style=f);var h;return TS(l)&&(h=ll("generateAbstractTransformGrouping",{main:o,transform:l,containerWidth:o.width,iconWidth:o.width})),r.push(h||o.icon),{children:r,attributes:i}}}},AY={mixout:function(){return{layer:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.classes,o=i===void 0?[]:i;return Wy({type:"layer"},function(){Lu("beforeDOMElementCreation",{assembler:n,params:r});var l=[];return n(function(c){Array.isArray(c)?c.map(function(f){l=l.concat(f.abstract)}):l=l.concat(c.abstract)}),[{tag:"span",attributes:{class:["".concat(Xe.cssPrefix,"-layers")].concat(va(o)).join(" ")},children:l}]})}}}},OY={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};r.title;var i=r.classes,o=i===void 0?[]:i,l=r.attributes,c=l===void 0?{}:l,f=r.styles,h=f===void 0?{}:f;return Wy({type:"counter",content:n},function(){return Lu("beforeDOMElementCreation",{content:n,params:r}),aY({content:n.toString(),extra:{attributes:c,styles:h,classes:["".concat(Xe.cssPrefix,"-layers-counter")].concat(va(o))}})})}}}},TY={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,o=i===void 0?Va:i,l=r.classes,c=l===void 0?[]:l,f=r.attributes,h=f===void 0?{}:f,m=r.styles,y=m===void 0?{}:m;return Wy({type:"text",content:n},function(){return Lu("beforeDOMElementCreation",{content:n,params:r}),_T({content:n,transform:Ie(Ie({},Va),o),extra:{attributes:h,styles:y,classes:["".concat(Xe.cssPrefix,"-layers-text")].concat(va(c))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.transform,o=r.extra,l=null,c=null;if(E6){var f=parseInt(getComputedStyle(n).fontSize,10),h=n.getBoundingClientRect();l=h.width/f,c=h.height/f}return Promise.resolve([n,_T({content:n.innerHTML,width:l,height:c,transform:i,extra:o,watchable:!0})])}}},_R=new RegExp('"',"ug"),TT=[1105920,1112319],jT=Ie(Ie(Ie(Ie({},{FontAwesome:{normal:"fas",400:"fas"}}),cq),pG),bq),$_=Object.keys(jT).reduce(function(e,t){return e[t.toLowerCase()]=jT[t],e},{}),jY=Object.keys($_).reduce(function(e,t){var n=$_[t];return e[t]=n[900]||va(Object.entries(n))[0][1],e},{});function MY(e){var t=e.replace(_R,"");return aR(va(t)[0]||"")}function PY(e){var t=e.getPropertyValue("font-feature-settings").includes("ss01"),n=e.getPropertyValue("content"),r=n.replace(_R,""),i=r.codePointAt(0),o=i>=TT[0]&&i<=TT[1],l=r.length===2?r[0]===r[1]:!1;return o||l||t}function NY(e,t){var n=e.replace(/^['"]|['"]$/g,"").toLowerCase(),r=parseInt(t),i=isNaN(r)?"normal":r;return($_[n]||{})[i]||jY[n]}function MT(e,t){var n="".concat(gG).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var o=jf(e.children),l=o.filter(function(W){return W.getAttribute(M_)===t})[0],c=ol.getComputedStyle(e,t),f=c.getPropertyValue("font-family"),h=f.match(_G),m=c.getPropertyValue("font-weight"),y=c.getPropertyValue("content");if(l&&!h)return e.removeChild(l),r();if(h&&y!=="none"&&y!==""){var x=c.getPropertyValue("content"),b=NY(f,m),w=MY(x),C=h[0].startsWith("FontAwesome"),O=PY(c),T=MS(b,w),P=T;if(C){var N=FG(w);N.iconName&&N.prefix&&(T=N.iconName,b=N.prefix)}if(T&&!O&&(!l||l.getAttribute(CS)!==b||l.getAttribute(ES)!==P)){e.setAttribute(n,P),l&&e.removeChild(l);var F=bY(),B=F.extra;B.attributes[M_]=t,z_(T,b).then(function(W){var Q=PS(Ie(Ie({},F),{},{icons:{main:W,mask:mR()},prefix:b,iconName:P,extra:B,watchable:!0})),re=rn.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(re,e.firstChild):e.appendChild(re),re.outerHTML=Q.map(function(ce){return sm(ce)}).join(`
|
||
`),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function LY(e){return Promise.all([MT(e,"::before"),MT(e,"::after")])}function RY(e){return e.parentNode!==document.head&&!~yG.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(M_)&&(!e.parentNode||e.parentNode.tagName!=="svg")}var DY=function(t){return!!t&&Z6.some(function(n){return t.includes(n)})},kY=function(t){if(!t)return[];var n=new Set,r=t.split(/,(?![^()]*\))/).map(function(f){return f.trim()});r=r.flatMap(function(f){return f.includes("(")?f:f.split(",").map(function(h){return h.trim()})});var i=Yg(r),o;try{for(i.s();!(o=i.n()).done;){var l=o.value;if(DY(l)){var c=Z6.reduce(function(f,h){return f.replace(h,"")},l);c!==""&&c!=="*"&&n.add(c)}}}catch(f){i.e(f)}finally{i.f()}return n};function PT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Zo){var n;if(t)n=e;else if(Xe.searchPseudoElementsFullScan)n=e.querySelectorAll("*");else{var r=new Set,i=Yg(document.styleSheets),o;try{for(i.s();!(o=i.n()).done;){var l=o.value;try{var c=Yg(l.cssRules),f;try{for(c.s();!(f=c.n()).done;){var h=f.value,m=kY(h.selectorText),y=Yg(m),x;try{for(y.s();!(x=y.n()).done;){var b=x.value;r.add(b)}}catch(C){y.e(C)}finally{y.f()}}}catch(C){c.e(C)}finally{c.f()}}catch(C){Xe.searchPseudoElementsWarnings&&console.warn("Font Awesome: cannot parse stylesheet: ".concat(l.href," (").concat(C.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(C){i.e(C)}finally{i.f()}if(!r.size)return;var w=Array.from(r).join(", ");try{n=e.querySelectorAll(w)}catch{}}return new Promise(function(C,O){var T=jf(n).filter(RY).map(LY),P=NS.begin("searchPseudoElements");bR(),Promise.all(T).then(function(){P(),U_(),C()}).catch(function(){P(),U_(),O()})})}}var IY={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=PT,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?rn:r;Xe.searchPseudoElements&&PT(i)}}},NT=!1,zY={mixout:function(){return{dom:{unwatch:function(){bR(),NT=!0}}}},hooks:function(){return{bootstrap:function(){ET(D_("mutationObserverCallbacks",{}))},noAuto:function(){pY()},watch:function(n){var r=n.observeMutationsRoot;NT?U_():ET(D_("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},LT=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,i){var o=i.toLowerCase().split("-"),l=o[0],c=o.slice(1).join("-");if(l&&c==="h")return r.flipX=!0,r;if(l&&c==="v")return r.flipY=!0,r;if(c=parseFloat(c),isNaN(c))return r;switch(l){case"grow":r.size=r.size+c;break;case"shrink":r.size=r.size-c;break;case"left":r.x=r.x-c;break;case"right":r.x=r.x+c;break;case"up":r.y=r.y-c;break;case"down":r.y=r.y+c;break;case"rotate":r.rotate=r.rotate+c;break}return r},n)},BY={mixout:function(){return{parse:{transform:function(n){return LT(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=LT(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,o=n.containerWidth,l=n.iconWidth,c={transform:"translate(".concat(o/2," 256)")},f="translate(".concat(i.x*32,", ").concat(i.y*32,") "),h="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),m="rotate(".concat(i.rotate," 0 0)"),y={transform:"".concat(f," ").concat(h," ").concat(m)},x={transform:"translate(".concat(l/2*-1," -256)")},b={outer:c,inner:y,path:x};return{tag:"g",attributes:Ie({},b.outer),children:[{tag:"g",attributes:Ie({},b.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:Ie(Ie({},r.icon.attributes),b.path)}]}]}}}},Sx={x:0,y:0,width:"100%",height:"100%"};function RT(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 UY(e){return e.tag==="g"?e.children:[e]}var $Y={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),o=i?Yy(i.split(" ").map(function(l){return l.trim()})):mR();return o.prefix||(o.prefix=sl()),n.mask=o,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,i=n.attributes,o=n.main,l=n.mask,c=n.maskId,f=n.transform,h=o.width,m=o.icon,y=l.width,x=l.icon,b=NG({transform:f,containerWidth:y,iconWidth:h}),w={tag:"rect",attributes:Ie(Ie({},Sx),{},{fill:"white"})},C=m.children?{children:m.children.map(RT)}:{},O={tag:"g",attributes:Ie({},b.inner),children:[RT(Ie({tag:m.tag,attributes:Ie(Ie({},m.attributes),b.path)},C))]},T={tag:"g",attributes:Ie({},b.outer),children:[O]},P="mask-".concat(c||mT()),N="clip-".concat(c||mT()),F={tag:"mask",attributes:Ie(Ie({},Sx),{},{id:P,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[w,T]},B={tag:"defs",children:[{tag:"clipPath",attributes:{id:N},children:UY(x)},F]};return r.push(B,{tag:"rect",attributes:Ie({fill:"currentColor","clip-path":"url(#".concat(N,")"),mask:"url(#".concat(P,")")},Sx)}),{children:r,attributes:i}}}},FY={provides:function(t){var n=!1;ol.matchMedia&&(n=ol.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],i={fill:"currentColor"},o={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:Ie(Ie({},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 l=Ie(Ie({},o),{},{attributeName:"opacity"}),c={tag:"circle",attributes:Ie(Ie({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||c.children.push({tag:"animate",attributes:Ie(Ie({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Ie(Ie({},l),{},{values:"1;0;1;1;0;1;"})}),r.push(c),r.push({tag:"path",attributes:Ie(Ie({},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:Ie(Ie({},l),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:Ie(Ie({},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:Ie(Ie({},l),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},VY={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-symbol"),o=i===null?!1:i===""?!0:i;return n.symbol=o,n}}}},HY=[DG,EY,AY,OY,TY,IY,zY,BY,$Y,FY,VY];XG(HY,{mixoutsTo:Pi});Pi.noAuto;var Lh=Pi.config;Pi.library;Pi.dom;var wR=Pi.parse;Pi.findIconDefinition;Pi.toHtml;var qY=Pi.icon;Pi.layer;Pi.text;Pi.counter;function GY(e){return e=e-0,e===e}function SR(e){return GY(e)?e:(e=e.replace(/[_-]+(.)?/g,(t,n)=>n?n.toUpperCase():""),e.charAt(0).toLowerCase()+e.slice(1))}function YY(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Vc=new Map,WY=1e3;function KY(e){if(Vc.has(e))return Vc.get(e);const t={};let n=0;const r=e.length;for(;n<r;){const i=e.indexOf(";",n),o=i===-1?r:i,l=e.slice(n,o).trim();if(l){const c=l.indexOf(":");if(c>0){const f=l.slice(0,c).trim(),h=l.slice(c+1).trim();if(f&&h){const m=SR(f);t[m.startsWith("webkit")?YY(m):m]=h}}}n=o+1}if(Vc.size===WY){const i=Vc.keys().next().value;i&&Vc.delete(i)}return Vc.set(e,t),t}function CR(e,t,n={}){if(typeof t=="string")return t;const r=(t.children||[]).map(m=>CR(e,m)),i=t.attributes||{},o={};for(const[m,y]of Object.entries(i))switch(!0){case m==="class":{o.className=y;break}case m==="style":{o.style=KY(String(y));break}case m.startsWith("aria-"):case m.startsWith("data-"):{o[m.toLowerCase()]=y;break}default:o[SR(m)]=y}const{style:l,role:c,"aria-label":f,...h}=n;return l&&(o.style=o.style?{...o.style,...l}:l),c&&(o.role=c),f&&(o["aria-label"]=f,o["aria-hidden"]="false"),e(t.tag,{...h,...o},...r)}var ZY=CR.bind(null,cf.createElement),DT=(e,t)=>{const n=_.useId();return e||(t?n:void 0)},XY=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)}},QY="searchPseudoElementsFullScan"in Lh?"7.0.0":"6.0.0",JY=Number.parseInt(QY)>=7,wh="fa",To={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"},eW={left:"fa-pull-left",right:"fa-pull-right"},tW={90:"fa-rotate-90",180:"fa-rotate-180",270:"fa-rotate-270"},nW={"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"},jo={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 rW(e){const t=Lh.cssPrefix||Lh.familyPrefix||wh;return t===wh?e:e.replace(new RegExp(String.raw`(?<=^|\s)${wh}-`,"g"),`${t}-`)}function iW(e){const{beat:t,fade:n,beatFade:r,bounce:i,shake:o,spin:l,spinPulse:c,spinReverse:f,pulse:h,fixedWidth:m,inverse:y,border:x,flip:b,size:w,rotation:C,pull:O,swapOpacity:T,rotateBy:P,widthAuto:N,className:F}=e,B=[];return F&&B.push(...F.split(" ")),t&&B.push(To.beat),n&&B.push(To.fade),r&&B.push(To.beatFade),i&&B.push(To.bounce),o&&B.push(To.shake),l&&B.push(To.spin),f&&B.push(To.spinReverse),c&&B.push(To.spinPulse),h&&B.push(To.pulse),m&&B.push(jo.fixedWidth),y&&B.push(jo.inverse),x&&B.push(jo.border),b===!0&&B.push(jo.flip),(b==="horizontal"||b==="both")&&B.push(jo.flipHorizontal),(b==="vertical"||b==="both")&&B.push(jo.flipVertical),w!=null&&B.push(nW[w]),C!=null&&C!==0&&B.push(tW[C]),O!=null&&B.push(eW[O]),T&&B.push(jo.swapOpacity),JY?(P&&B.push(jo.rotateBy),N&&B.push(jo.widthAuto),(Lh.cssPrefix||Lh.familyPrefix||wh)===wh?B:B.map(rW)):B}var aW=e=>typeof e=="object"&&"icon"in e&&!!e.icon;function kT(e){if(e)return aW(e)?e:wR.icon(e)}function oW(e){return Object.keys(e)}var IT=new XY("FontAwesomeIcon"),ER={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},sW=new Set(Object.keys(ER)),De=cf.forwardRef((e,t)=>{const n={...ER,...e},{icon:r,mask:i,symbol:o,title:l,titleId:c,maskId:f,transform:h}=n,m=DT(f,!!i),y=DT(c,!!l),x=kT(r);if(!x)return IT.error("Icon lookup is undefined",r),null;const b=iW(n),w=typeof h=="string"?wR.transform(h):h,C=kT(i),O=qY(x,{...b.length>0&&{classes:b},...w&&{transform:w},...C&&{mask:C},symbol:o,title:l,titleId:y,maskId:m});if(!O)return IT.error("Could not find icon",x),null;const{abstract:T}=O,P={ref:t};for(const N of oW(n))sW.has(N)||(P[N]=n[N]);return ZY(T[0],P)});De.displayName="FontAwesomeIcon";function Ky(){return typeof window<"u"}function Mf(e){return AR(e)?(e.nodeName||"").toLowerCase():"#document"}function Si(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Xo(e){var t;return(t=(AR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function AR(e){return Ky()?e instanceof Node||e instanceof Si(e).Node:!1}function yr(e){return Ky()?e instanceof Element||e instanceof Si(e).Element:!1}function Ai(e){return Ky()?e instanceof HTMLElement||e instanceof Si(e).HTMLElement:!1}function F_(e){return!Ky()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Si(e).ShadowRoot}const lW=new Set(["inline","contents"]);function lm(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ya(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!lW.has(i)}const uW=new Set(["table","td","th"]);function cW(e){return uW.has(Mf(e))}const fW=[":popover-open",":modal"];function Zy(e){return fW.some(t=>{try{return e.matches(t)}catch{return!1}})}const dW=["transform","translate","scale","rotate","perspective"],hW=["transform","translate","scale","rotate","perspective","filter"],mW=["paint","layout","strict","content"];function RS(e){const t=DS(),n=yr(e)?ya(e):e;return dW.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)||hW.some(r=>(n.willChange||"").includes(r))||mW.some(r=>(n.contain||"").includes(r))}function pW(e){let t=ul(e);for(;Ai(t)&&!df(t);){if(RS(t))return t;if(Zy(t))return null;t=ul(t)}return null}function DS(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const gW=new Set(["html","body","#document"]);function df(e){return gW.has(Mf(e))}function ya(e){return Si(e).getComputedStyle(e)}function Xy(e){return yr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ul(e){if(Mf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||F_(e)&&e.host||Xo(e);return F_(t)?t.host:t}function OR(e){const t=ul(e);return df(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ai(t)&&lm(t)?t:OR(t)}function TR(e,t,n){var r;t===void 0&&(t=[]);const i=OR(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),l=Si(i);return o?(V_(l),t.concat(l,l.visualViewport||[],lm(i)?i:[],[])):t.concat(i,TR(i,[]))}function V_(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const vW=["top","right","bottom","left"],zT=["start","end"],BT=vW.reduce((e,t)=>e.concat(t,t+"-"+zT[0],t+"-"+zT[1]),[]),Rh=Math.min,rf=Math.max,Cv=Math.round,qa=e=>({x:e,y:e}),yW={left:"right",right:"left",bottom:"top",top:"bottom"},bW={start:"end",end:"start"};function xW(e,t,n){return rf(e,Rh(t,n))}function um(e,t){return typeof e=="function"?e(t):e}function cl(e){return e.split("-")[0]}function Ga(e){return e.split("-")[1]}function _W(e){return e==="x"?"y":"x"}function kS(e){return e==="y"?"height":"width"}const wW=new Set(["top","bottom"]);function wu(e){return wW.has(cl(e))?"y":"x"}function IS(e){return _W(wu(e))}function jR(e,t,n){n===void 0&&(n=!1);const r=Ga(e),i=IS(e),o=kS(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=Av(l)),[l,Av(l)]}function SW(e){const t=Av(e);return[Ev(e),t,Ev(t)]}function Ev(e){return e.replace(/start|end/g,t=>bW[t])}const UT=["left","right"],$T=["right","left"],CW=["top","bottom"],EW=["bottom","top"];function AW(e,t,n){switch(e){case"top":case"bottom":return n?t?$T:UT:t?UT:$T;case"left":case"right":return t?CW:EW;default:return[]}}function OW(e,t,n,r){const i=Ga(e);let o=AW(cl(e),n==="start",r);return i&&(o=o.map(l=>l+"-"+i),t&&(o=o.concat(o.map(Ev)))),o}function Av(e){return e.replace(/left|right|bottom|top/g,t=>yW[t])}function TW(e){return{top:0,right:0,bottom:0,left:0,...e}}function MR(e){return typeof e!="number"?TW(e):{top:e,right:e,bottom:e,left:e}}function Ov(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 jW="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function MW(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&F_(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function vg(e){return e?.ownerDocument||document}function PW(e){return Ai(e)&&e.matches(jW)}function Dh(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var NW=typeof document<"u",LW=function(){},fl=NW?_.useLayoutEffect:LW;const RW={...oS};function Qs(e){const t=_.useRef(e);return fl(()=>{t.current=e}),t}const DW=RW.useInsertionEffect,kW=DW||(e=>e());function hh(e){const t=_.useRef(()=>{});return kW(()=>{t.current=e}),_.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)},[])}var Pf=FL();function FT(e,t,n){let{reference:r,floating:i}=e;const o=wu(t),l=IS(t),c=kS(l),f=cl(t),h=o==="y",m=r.x+r.width/2-i.width/2,y=r.y+r.height/2-i.height/2,x=r[c]/2-i[c]/2;let b;switch(f){case"top":b={x:m,y:r.y-i.height};break;case"bottom":b={x:m,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y};break;case"left":b={x:r.x-i.width,y};break;default:b={x:r.x,y:r.y}}switch(Ga(t)){case"start":b[l]-=x*(n&&h?-1:1);break;case"end":b[l]+=x*(n&&h?-1:1);break}return b}const IW=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,c=o.filter(Boolean),f=await(l.isRTL==null?void 0:l.isRTL(t));let h=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:m,y}=FT(h,r,f),x=r,b={},w=0;for(let C=0;C<c.length;C++){const{name:O,fn:T}=c[C],{x:P,y:N,data:F,reset:B}=await T({x:m,y,initialPlacement:r,placement:x,strategy:i,middlewareData:b,rects:h,platform:l,elements:{reference:e,floating:t}});m=P??m,y=N??y,b={...b,[O]:{...b[O],...F}},B&&w<=50&&(w++,typeof B=="object"&&(B.placement&&(x=B.placement),B.rects&&(h=B.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):B.rects),{x:m,y}=FT(h,x,f)),C=-1)}return{x:m,y,placement:x,strategy:i,middlewareData:b}};async function PR(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:l,elements:c,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:y="floating",altBoundary:x=!1,padding:b=0}=um(t,e),w=MR(b),O=c[x?y==="floating"?"reference":"floating":y],T=Ov(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(O)))==null||n?O:O.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:h,rootBoundary:m,strategy:f})),P=y==="floating"?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,N=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),F=await(o.isElement==null?void 0:o.isElement(N))?await(o.getScale==null?void 0:o.getScale(N))||{x:1,y:1}:{x:1,y:1},B=Ov(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:P,offsetParent:N,strategy:f}):P);return{top:(T.top-B.top+w.top)/F.y,bottom:(B.bottom-T.bottom+w.bottom)/F.y,left:(T.left-B.left+w.left)/F.x,right:(B.right-T.right+w.right)/F.x}}const zW=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:l,elements:c,middlewareData:f}=t,{element:h,padding:m=0}=um(e,t)||{};if(h==null)return{};const y=MR(m),x={x:n,y:r},b=IS(i),w=kS(b),C=await l.getDimensions(h),O=b==="y",T=O?"top":"left",P=O?"bottom":"right",N=O?"clientHeight":"clientWidth",F=o.reference[w]+o.reference[b]-x[b]-o.floating[w],B=x[b]-o.reference[b],W=await(l.getOffsetParent==null?void 0:l.getOffsetParent(h));let Q=W?W[N]:0;(!Q||!await(l.isElement==null?void 0:l.isElement(W)))&&(Q=c.floating[N]||o.floating[w]);const re=F/2-B/2,ce=Q/2-C[w]/2-1,ae=Rh(y[T],ce),J=Rh(y[P],ce),oe=ae,ve=Q-C[w]-J,ie=Q/2-C[w]/2+re,ue=xW(oe,ie,ve),Y=!f.arrow&&Ga(i)!=null&&ie!==ue&&o.reference[w]/2-(ie<oe?ae:J)-C[w]/2<0,I=Y?ie<oe?ie-oe:ie-ve:0;return{[b]:x[b]+I,data:{[b]:ue,centerOffset:ie-ue-I,...Y&&{alignmentOffset:I}},reset:Y}}});function BW(e,t,n){return(e?[...n.filter(i=>Ga(i)===e),...n.filter(i=>Ga(i)!==e)]:n.filter(i=>cl(i)===i)).filter(i=>e?Ga(i)===e||(t?Ev(i)!==i:!1):!0)}const UW=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,i;const{rects:o,middlewareData:l,placement:c,platform:f,elements:h}=t,{crossAxis:m=!1,alignment:y,allowedPlacements:x=BT,autoAlignment:b=!0,...w}=um(e,t),C=y!==void 0||x===BT?BW(y||null,b,x):x,O=await PR(t,w),T=((n=l.autoPlacement)==null?void 0:n.index)||0,P=C[T];if(P==null)return{};const N=jR(P,o,await(f.isRTL==null?void 0:f.isRTL(h.floating)));if(c!==P)return{reset:{placement:C[0]}};const F=[O[cl(P)],O[N[0]],O[N[1]]],B=[...((r=l.autoPlacement)==null?void 0:r.overflows)||[],{placement:P,overflows:F}],W=C[T+1];if(W)return{data:{index:T+1,overflows:B},reset:{placement:W}};const Q=B.map(ae=>{const J=Ga(ae.placement);return[ae.placement,J&&m?ae.overflows.slice(0,2).reduce((oe,ve)=>oe+ve,0):ae.overflows[0],ae.overflows]}).sort((ae,J)=>ae[1]-J[1]),ce=((i=Q.filter(ae=>ae[2].slice(0,Ga(ae[0])?2:3).every(J=>J<=0))[0])==null?void 0:i[0])||Q[0][0];return ce!==c?{data:{index:T+1,overflows:B},reset:{placement:ce}}:{}}}},$W=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:l,initialPlacement:c,platform:f,elements:h}=t,{mainAxis:m=!0,crossAxis:y=!0,fallbackPlacements:x,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:C=!0,...O}=um(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const T=cl(i),P=wu(c),N=cl(c)===c,F=await(f.isRTL==null?void 0:f.isRTL(h.floating)),B=x||(N||!C?[Av(c)]:SW(c)),W=w!=="none";!x&&W&&B.push(...OW(c,C,w,F));const Q=[c,...B],re=await PR(t,O),ce=[];let ae=((r=o.flip)==null?void 0:r.overflows)||[];if(m&&ce.push(re[T]),y){const ie=jR(i,l,F);ce.push(re[ie[0]],re[ie[1]])}if(ae=[...ae,{placement:i,overflows:ce}],!ce.every(ie=>ie<=0)){var J,oe;const ie=(((J=o.flip)==null?void 0:J.index)||0)+1,ue=Q[ie];if(ue&&(!(y==="alignment"?P!==wu(ue):!1)||ae.every(z=>wu(z.placement)===P?z.overflows[0]>0:!0)))return{data:{index:ie,overflows:ae},reset:{placement:ue}};let Y=(oe=ae.filter(I=>I.overflows[0]<=0).sort((I,z)=>I.overflows[1]-z.overflows[1])[0])==null?void 0:oe.placement;if(!Y)switch(b){case"bestFit":{var ve;const I=(ve=ae.filter(z=>{if(W){const H=wu(z.placement);return H===P||H==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(H=>H>0).reduce((H,k)=>H+k,0)]).sort((z,H)=>z[1]-H[1])[0])==null?void 0:ve[0];I&&(Y=I);break}case"initialPlacement":Y=c;break}if(i!==Y)return{reset:{placement:Y}}}return{}}}},FW=new Set(["left","top"]);async function VW(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=cl(n),c=Ga(n),f=wu(n)==="y",h=FW.has(l)?-1:1,m=o&&f?-1:1,y=um(t,e);let{mainAxis:x,crossAxis:b,alignmentAxis:w}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return c&&typeof w=="number"&&(b=c==="end"?w*-1:w),f?{x:b*m,y:x*h}:{x:x*h,y:b*m}}const HW=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:l,middlewareData:c}=t,f=await VW(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:i+f.x,y:o+f.y,data:{...f,placement:l}}}}};function NR(e){const t=ya(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ai(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,c=Cv(n)!==o||Cv(r)!==l;return c&&(n=o,r=l),{width:n,height:r,$:c}}function LR(e){return yr(e)?e:e.contextElement}function af(e){const t=LR(e);if(!Ai(t))return qa(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=NR(t);let l=(o?Cv(n.width):n.width)/r,c=(o?Cv(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const qW=qa(0);function RR(e){const t=Si(e);return!DS()||!t.visualViewport?qW:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function GW(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Si(e)?!1:t}function kh(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=LR(e);let l=qa(1);t&&(r?yr(r)&&(l=af(r)):l=af(e));const c=GW(o,n,r)?RR(o):qa(0);let f=(i.left+c.x)/l.x,h=(i.top+c.y)/l.y,m=i.width/l.x,y=i.height/l.y;if(o){const x=Si(o),b=r&&yr(r)?Si(r):r;let w=x,C=V_(w);for(;C&&r&&b!==w;){const O=af(C),T=C.getBoundingClientRect(),P=ya(C),N=T.left+(C.clientLeft+parseFloat(P.paddingLeft))*O.x,F=T.top+(C.clientTop+parseFloat(P.paddingTop))*O.y;f*=O.x,h*=O.y,m*=O.x,y*=O.y,f+=N,h+=F,w=Si(C),C=V_(w)}}return Ov({width:m,height:y,x:f,y:h})}function Qy(e,t){const n=Xy(e).scrollLeft;return t?t.left+n:kh(Xo(e)).left+n}function DR(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Qy(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function YW(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",l=Xo(r),c=t?Zy(t.floating):!1;if(r===l||c&&o)return n;let f={scrollLeft:0,scrollTop:0},h=qa(1);const m=qa(0),y=Ai(r);if((y||!y&&!o)&&((Mf(r)!=="body"||lm(l))&&(f=Xy(r)),Ai(r))){const b=kh(r);h=af(r),m.x=b.x+r.clientLeft,m.y=b.y+r.clientTop}const x=l&&!y&&!o?DR(l,f):qa(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+m.x+x.x,y:n.y*h.y-f.scrollTop*h.y+m.y+x.y}}function WW(e){return Array.from(e.getClientRects())}function KW(e){const t=Xo(e),n=Xy(e),r=e.ownerDocument.body,i=rf(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=rf(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Qy(e);const c=-n.scrollTop;return ya(r).direction==="rtl"&&(l+=rf(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:c}}const VT=25;function ZW(e,t){const n=Si(e),r=Xo(e),i=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,c=0,f=0;if(i){o=i.width,l=i.height;const m=DS();(!m||m&&t==="fixed")&&(c=i.offsetLeft,f=i.offsetTop)}const h=Qy(r);if(h<=0){const m=r.ownerDocument,y=m.body,x=getComputedStyle(y),b=m.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,w=Math.abs(r.clientWidth-y.clientWidth-b);w<=VT&&(o-=w)}else h<=VT&&(o+=h);return{width:o,height:l,x:c,y:f}}const XW=new Set(["absolute","fixed"]);function QW(e,t){const n=kh(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ai(e)?af(e):qa(1),l=e.clientWidth*o.x,c=e.clientHeight*o.y,f=i*o.x,h=r*o.y;return{width:l,height:c,x:f,y:h}}function HT(e,t,n){let r;if(t==="viewport")r=ZW(e,n);else if(t==="document")r=KW(Xo(e));else if(yr(t))r=QW(t,n);else{const i=RR(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Ov(r)}function kR(e,t){const n=ul(e);return n===t||!yr(n)||df(n)?!1:ya(n).position==="fixed"||kR(n,t)}function JW(e,t){const n=t.get(e);if(n)return n;let r=TR(e,[]).filter(c=>yr(c)&&Mf(c)!=="body"),i=null;const o=ya(e).position==="fixed";let l=o?ul(e):e;for(;yr(l)&&!df(l);){const c=ya(l),f=RS(l);!f&&c.position==="fixed"&&(i=null),(o?!f&&!i:!f&&c.position==="static"&&!!i&&XW.has(i.position)||lm(l)&&!f&&kR(e,l))?r=r.filter(m=>m!==l):i=c,l=ul(l)}return t.set(e,r),r}function eK(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?Zy(t)?[]:JW(t,this._c):[].concat(n),r],c=l[0],f=l.reduce((h,m)=>{const y=HT(t,m,i);return h.top=rf(y.top,h.top),h.right=Rh(y.right,h.right),h.bottom=Rh(y.bottom,h.bottom),h.left=rf(y.left,h.left),h},HT(t,c,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function tK(e){const{width:t,height:n}=NR(e);return{width:t,height:n}}function nK(e,t,n){const r=Ai(t),i=Xo(t),o=n==="fixed",l=kh(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const f=qa(0);function h(){f.x=Qy(i)}if(r||!r&&!o)if((Mf(t)!=="body"||lm(i))&&(c=Xy(t)),r){const b=kh(t,!0,o,t);f.x=b.x+t.clientLeft,f.y=b.y+t.clientTop}else i&&h();o&&!r&&i&&h();const m=i&&!r&&!o?DR(i,c):qa(0),y=l.left+c.scrollLeft-f.x-m.x,x=l.top+c.scrollTop-f.y-m.y;return{x:y,y:x,width:l.width,height:l.height}}function Cx(e){return ya(e).position==="static"}function qT(e,t){if(!Ai(e)||ya(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Xo(e)===n&&(n=n.ownerDocument.body),n}function IR(e,t){const n=Si(e);if(Zy(e))return n;if(!Ai(e)){let i=ul(e);for(;i&&!df(i);){if(yr(i)&&!Cx(i))return i;i=ul(i)}return n}let r=qT(e,t);for(;r&&cW(r)&&Cx(r);)r=qT(r,t);return r&&df(r)&&Cx(r)&&!RS(r)?n:r||pW(e)||n}const rK=async function(e){const t=this.getOffsetParent||IR,n=this.getDimensions,r=await n(e.floating);return{reference:nK(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function iK(e){return ya(e).direction==="rtl"}const aK={convertOffsetParentRelativeRectToViewportRelativeRect:YW,getDocumentElement:Xo,getClippingRect:eK,getOffsetParent:IR,getElementRects:rK,getClientRects:WW,getDimensions:tK,getScale:af,isElement:yr,isRTL:iK},oK=HW,sK=UW,lK=$W,GT=zW,uK=(e,t,n)=>{const r=new Map,i={platform:aK,...n},o={...i.platform,_c:r};return IW(e,t,{...i,platform:o})};var cK=typeof document<"u",fK=function(){},Zg=cK?_.useLayoutEffect:fK;function Tv(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(!Tv(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 o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Tv(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function zR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function YT(e,t){const n=zR(e);return Math.round(t*n)/n}function Ex(e){const t=_.useRef(e);return Zg(()=>{t.current=e}),t}function dK(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:c=!0,whileElementsMounted:f,open:h}=e,[m,y]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[x,b]=_.useState(r);Tv(x,r)||b(r);const[w,C]=_.useState(null),[O,T]=_.useState(null),P=_.useCallback(z=>{z!==W.current&&(W.current=z,C(z))},[]),N=_.useCallback(z=>{z!==Q.current&&(Q.current=z,T(z))},[]),F=o||w,B=l||O,W=_.useRef(null),Q=_.useRef(null),re=_.useRef(m),ce=f!=null,ae=Ex(f),J=Ex(i),oe=Ex(h),ve=_.useCallback(()=>{if(!W.current||!Q.current)return;const z={placement:t,strategy:n,middleware:x};J.current&&(z.platform=J.current),uK(W.current,Q.current,z).then(H=>{const k={...H,isPositioned:oe.current!==!1};ie.current&&!Tv(re.current,k)&&(re.current=k,Pf.flushSync(()=>{y(k)}))})},[x,t,n,J,oe]);Zg(()=>{h===!1&&re.current.isPositioned&&(re.current.isPositioned=!1,y(z=>({...z,isPositioned:!1})))},[h]);const ie=_.useRef(!1);Zg(()=>(ie.current=!0,()=>{ie.current=!1}),[]),Zg(()=>{if(F&&(W.current=F),B&&(Q.current=B),F&&B){if(ae.current)return ae.current(F,B,ve);ve()}},[F,B,ve,ae,ce]);const ue=_.useMemo(()=>({reference:W,floating:Q,setReference:P,setFloating:N}),[P,N]),Y=_.useMemo(()=>({reference:F,floating:B}),[F,B]),I=_.useMemo(()=>{const z={position:n,left:0,top:0};if(!Y.floating)return z;const H=YT(Y.floating,m.x),k=YT(Y.floating,m.y);return c?{...z,transform:"translate("+H+"px, "+k+"px)",...zR(Y.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:k}},[n,c,Y.floating,m.x,m.y]);return _.useMemo(()=>({...m,update:ve,refs:ue,elements:Y,floatingStyles:I}),[m,ve,ue,Y,I])}const hK=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?GT({element:r.current,padding:i}).fn(n):{}:r?GT({element:r,padding:i}).fn(n):{}}}},mK=(e,t)=>({...oK(e),options:[e,t]}),pK=(e,t)=>({...lK(e),options:[e,t]}),gK=(e,t)=>({...sK(e),options:[e,t]}),vK=(e,t)=>({...hK(e),options:[e,t]}),yK="data-floating-ui-focusable",WT="active",KT="selected",bK={...oS};let ZT=!1,xK=0;const XT=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+xK++;function _K(){const[e,t]=_.useState(()=>ZT?XT():void 0);return fl(()=>{e==null&&t(XT())},[]),_.useEffect(()=>{ZT=!0},[]),e}const wK=bK.useId,SK=wK||_K;function CK(){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 EK=_.createContext(null),AK=_.createContext(null),BR=()=>{var e;return((e=_.useContext(EK))==null?void 0:e.id)||null},UR=()=>_.useContext(AK);function OK(e){return"data-floating-ui-"+e}function fa(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const QT=OK("safe-polygon");function Ax(e,t,n){if(n&&!Dh(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 Ox(e){return typeof e=="function"?e():e}function TK(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,events:o,elements:l}=e,{enabled:c=!0,delay:f=0,handleClose:h=null,mouseOnly:m=!1,restMs:y=0,move:x=!0}=t,b=UR(),w=BR(),C=Qs(h),O=Qs(f),T=Qs(n),P=Qs(y),N=_.useRef(),F=_.useRef(-1),B=_.useRef(),W=_.useRef(-1),Q=_.useRef(!0),re=_.useRef(!1),ce=_.useRef(()=>{}),ae=_.useRef(!1),J=hh(()=>{var I;const z=(I=i.current.openEvent)==null?void 0:I.type;return z?.includes("mouse")&&z!=="mousedown"});_.useEffect(()=>{if(!c)return;function I(z){let{open:H}=z;H||(fa(F),fa(W),Q.current=!0,ae.current=!1)}return o.on("openchange",I),()=>{o.off("openchange",I)}},[c,o]),_.useEffect(()=>{if(!c||!C.current||!n)return;function I(H){J()&&r(!1,H,"hover")}const z=vg(l.floating).documentElement;return z.addEventListener("mouseleave",I),()=>{z.removeEventListener("mouseleave",I)}},[l.floating,n,r,c,C,J]);const oe=_.useCallback(function(I,z,H){z===void 0&&(z=!0),H===void 0&&(H="hover");const k=Ax(O.current,"close",N.current);k&&!B.current?(fa(F),F.current=window.setTimeout(()=>r(!1,I,H),k)):z&&(fa(F),r(!1,I,H))},[O,r]),ve=hh(()=>{ce.current(),B.current=void 0}),ie=hh(()=>{if(re.current){const I=vg(l.floating).body;I.style.pointerEvents="",I.removeAttribute(QT),re.current=!1}}),ue=hh(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);_.useEffect(()=>{if(!c)return;function I(q){if(fa(F),Q.current=!1,m&&!Dh(N.current)||Ox(P.current)>0&&!Ax(O.current,"open"))return;const ee=Ax(O.current,"open",N.current);ee?F.current=window.setTimeout(()=>{T.current||r(!0,q,"hover")},ee):n||r(!0,q,"hover")}function z(q){if(ue()){ie();return}ce.current();const ee=vg(l.floating);if(fa(W),ae.current=!1,C.current&&i.current.floatingContext){n||fa(F),B.current=C.current({...i.current.floatingContext,tree:b,x:q.clientX,y:q.clientY,onClose(){ie(),ve(),ue()||oe(q,!0,"safe-polygon")}});const me=B.current;ee.addEventListener("mousemove",me),ce.current=()=>{ee.removeEventListener("mousemove",me)};return}(N.current!=="touch"||!MW(l.floating,q.relatedTarget))&&oe(q)}function H(q){ue()||i.current.floatingContext&&(C.current==null||C.current({...i.current.floatingContext,tree:b,x:q.clientX,y:q.clientY,onClose(){ie(),ve(),ue()||oe(q)}})(q))}function k(){fa(F)}function M(q){ue()||oe(q,!1)}if(yr(l.domReference)){const q=l.domReference,ee=l.floating;return n&&q.addEventListener("mouseleave",H),x&&q.addEventListener("mousemove",I,{once:!0}),q.addEventListener("mouseenter",I),q.addEventListener("mouseleave",z),ee&&(ee.addEventListener("mouseleave",H),ee.addEventListener("mouseenter",k),ee.addEventListener("mouseleave",M)),()=>{n&&q.removeEventListener("mouseleave",H),x&&q.removeEventListener("mousemove",I),q.removeEventListener("mouseenter",I),q.removeEventListener("mouseleave",z),ee&&(ee.removeEventListener("mouseleave",H),ee.removeEventListener("mouseenter",k),ee.removeEventListener("mouseleave",M))}}},[l,c,e,m,x,oe,ve,ie,r,n,T,b,O,C,i,ue,P]),fl(()=>{var I;if(c&&n&&(I=C.current)!=null&&(I=I.__options)!=null&&I.blockPointerEvents&&J()){re.current=!0;const H=l.floating;if(yr(l.domReference)&&H){var z;const k=vg(l.floating).body;k.setAttribute(QT,"");const M=l.domReference,q=b==null||(z=b.nodesRef.current.find(ee=>ee.id===w))==null||(z=z.context)==null?void 0:z.elements.floating;return q&&(q.style.pointerEvents=""),k.style.pointerEvents="none",M.style.pointerEvents="auto",H.style.pointerEvents="auto",()=>{k.style.pointerEvents="",M.style.pointerEvents="",H.style.pointerEvents=""}}}},[c,n,w,l,b,C,J]),fl(()=>{n||(N.current=void 0,ae.current=!1,ve(),ie())},[n,ve,ie]),_.useEffect(()=>()=>{ve(),fa(F),fa(W),ie()},[c,l.domReference,ve,ie]);const Y=_.useMemo(()=>{function I(z){N.current=z.pointerType}return{onPointerDown:I,onPointerEnter:I,onMouseMove(z){const{nativeEvent:H}=z;function k(){!Q.current&&!T.current&&r(!0,H,"hover")}m&&!Dh(N.current)||n||Ox(P.current)===0||ae.current&&z.movementX**2+z.movementY**2<2||(fa(W),N.current==="touch"?k():(ae.current=!0,W.current=window.setTimeout(k,Ox(P.current))))}}},[m,r,n,T,P]);return _.useMemo(()=>c?{reference:Y}:{},[c,Y])}function JT(e){return Ai(e.target)&&e.target.tagName==="BUTTON"}function jK(e){return Ai(e.target)&&e.target.tagName==="A"}function ej(e){return PW(e)}function MK(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:o}}=e,{enabled:l=!0,event:c="click",toggle:f=!0,ignoreMouse:h=!1,keyboardHandlers:m=!0,stickIfOpen:y=!0}=t,x=_.useRef(),b=_.useRef(!1),w=_.useMemo(()=>({onPointerDown(C){x.current=C.pointerType},onMouseDown(C){const O=x.current;C.button===0&&c!=="click"&&(Dh(O,!0)&&h||(n&&f&&(!(i.current.openEvent&&y)||i.current.openEvent.type==="mousedown")?r(!1,C.nativeEvent,"click"):(C.preventDefault(),r(!0,C.nativeEvent,"click"))))},onClick(C){const O=x.current;if(c==="mousedown"&&x.current){x.current=void 0;return}Dh(O,!0)&&h||(n&&f&&(!(i.current.openEvent&&y)||i.current.openEvent.type==="click")?r(!1,C.nativeEvent,"click"):r(!0,C.nativeEvent,"click"))},onKeyDown(C){x.current=void 0,!(C.defaultPrevented||!m||JT(C))&&(C.key===" "&&!ej(o)&&(C.preventDefault(),b.current=!0),!jK(C)&&C.key==="Enter"&&r(!(n&&f),C.nativeEvent,"click"))},onKeyUp(C){C.defaultPrevented||!m||JT(C)||ej(o)||C.key===" "&&b.current&&(b.current=!1,r(!(n&&f),C.nativeEvent,"click"))}}),[i,o,c,h,m,r,n,y,f]);return _.useMemo(()=>l?{reference:w}:{},[l,w])}function PK(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=SK(),o=_.useRef({}),[l]=_.useState(()=>CK()),c=BR()!=null,[f,h]=_.useState(r.reference),m=hh((b,w,C)=>{o.current.openEvent=b?w:void 0,l.emit("openchange",{open:b,event:w,reason:C,nested:c}),n?.(b,w,C)}),y=_.useMemo(()=>({setPositionReference:h}),[]),x=_.useMemo(()=>({reference:f||r.reference||null,floating:r.floating||null,domReference:r.reference}),[f,r.reference,r.floating]);return _.useMemo(()=>({dataRef:o,open:t,onOpenChange:m,elements:x,events:l,floatingId:i,refs:y}),[t,m,x,l,i,y])}function $R(e){e===void 0&&(e={});const{nodeId:t}=e,n=PK({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,l]=_.useState(null),[c,f]=_.useState(null),m=i?.domReference||o,y=_.useRef(null),x=UR();fl(()=>{m&&(y.current=m)},[m]);const b=dK({...e,elements:{...i,...c&&{reference:c}}}),w=_.useCallback(N=>{const F=yr(N)?{getBoundingClientRect:()=>N.getBoundingClientRect(),getClientRects:()=>N.getClientRects(),contextElement:N}:N;f(F),b.refs.setReference(F)},[b.refs]),C=_.useCallback(N=>{(yr(N)||N===null)&&(y.current=N,l(N)),(yr(b.refs.reference.current)||b.refs.reference.current===null||N!==null&&!yr(N))&&b.refs.setReference(N)},[b.refs]),O=_.useMemo(()=>({...b.refs,setReference:C,setPositionReference:w,domReference:y}),[b.refs,C,w]),T=_.useMemo(()=>({...b.elements,domReference:m}),[b.elements,m]),P=_.useMemo(()=>({...b,...r,refs:O,elements:T,nodeId:t}),[b,O,T,t,r]);return fl(()=>{r.dataRef.current.floatingContext=P;const N=x?.nodesRef.current.find(F=>F.id===t);N&&(N.context=P)}),_.useMemo(()=>({...b,context:P,refs:O,elements:T}),[b,O,T,P])}function Tx(e,t,n){const r=new Map,i=n==="item";let o=e;if(i&&e){const{[WT]:l,[KT]:c,...f}=e;o=f}return{...n==="floating"&&{tabIndex:-1,[yK]:""},...o,...t.map(l=>{const c=l?l[n]:null;return typeof c=="function"?e?c(e):null:c}).concat(e).reduce((l,c)=>(c&&Object.entries(c).forEach(f=>{let[h,m]=f;if(!(i&&[WT,KT].includes(h)))if(h.indexOf("on")===0){if(r.has(h)||r.set(h,[]),typeof m=="function"){var y;(y=r.get(h))==null||y.push(m),l[h]=function(){for(var x,b=arguments.length,w=new Array(b),C=0;C<b;C++)w[C]=arguments[C];return(x=r.get(h))==null?void 0:x.map(O=>O(...w)).find(O=>O!==void 0)}}}else l[h]=m}),l),{})}}function FR(e){e===void 0&&(e=[]);const t=e.map(c=>c?.reference),n=e.map(c=>c?.floating),r=e.map(c=>c?.item),i=_.useCallback(c=>Tx(c,e,"reference"),t),o=_.useCallback(c=>Tx(c,e,"floating"),n),l=_.useCallback(c=>Tx(c,e,"item"),r);return _.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:l}),[i,o,l])}const tj=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Hc(e,t){return typeof e=="function"?e(t):e}function NK(e,t){const[n,r]=_.useState(e);return e&&!n&&r(!0),_.useEffect(()=>{if(!e&&n){const i=setTimeout(()=>r(!1),t);return()=>clearTimeout(i)}},[e,n,t]),n}function LK(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:i=250}=t,l=(typeof i=="number"?i:i.close)||0,[c,f]=_.useState("unmounted"),h=NK(n,l);return!h&&c==="close"&&f("unmounted"),fl(()=>{if(r){if(n){f("initial");const m=requestAnimationFrame(()=>{Pf.flushSync(()=>{f("open")})});return()=>{cancelAnimationFrame(m)}}f("close")}},[n,r]),{isMounted:h,status:c}}function RK(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:i,common:o,duration:l=250}=t,c=e.placement,f=c.split("-")[0],h=_.useMemo(()=>({side:f,placement:c}),[f,c]),m=typeof l=="number",y=(m?l:l.open)||0,x=(m?l:l.close)||0,[b,w]=_.useState(()=>({...Hc(o,h),...Hc(n,h)})),{isMounted:C,status:O}=LK(e,{duration:l}),T=Qs(n),P=Qs(r),N=Qs(i),F=Qs(o);return fl(()=>{const B=Hc(T.current,h),W=Hc(N.current,h),Q=Hc(F.current,h),re=Hc(P.current,h)||Object.keys(B).reduce((ce,ae)=>(ce[ae]="",ce),{});if(O==="initial"&&w(ce=>({transitionProperty:ce.transitionProperty,...Q,...B})),O==="open"&&w({transitionProperty:Object.keys(re).map(tj).join(","),transitionDuration:y+"ms",...Q,...re}),O==="close"){const ce=W||B;w({transitionProperty:Object.keys(ce).map(tj).join(","),transitionDuration:x+"ms",...Q,...ce})}},[x,N,T,P,F,y,O,h]),{isMounted:C,styles:b}}var VR={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"]},DK={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"]},kK={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"]},IK={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"]},zK=IK;const BK=({children:e,summary:t,summaryClasses:n,...r})=>{const i=_.useRef(null),[o,l]=_.useState(!1);return _.useEffect(()=>{const c=i.current,f=()=>l(!!c?.open);return c?.addEventListener("toggle",f),()=>c?.removeEventListener("toggle",f)},[]),g.jsxs("details",{ref:i,...r,children:[g.jsx("summary",{className:Oe("focus-ring px-1 -mx-1 rounded-sm",n),children:t}),o&&g.jsx("div",{className:"mt-3 flex flex-col gap-y-3",children:e})]})},UK=({className:e,...t})=>g.jsx("div",{className:Oe("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}),$K=({className:e,...t})=>g.jsx("div",{className:Oe("p-4 bg-lm-primary dark:bg-dm-primary first:rounded-t-md","first:rounded-t-md last:rounded-b-md",e),...t}),FK=({className:e,...t})=>g.jsx("div",{className:Oe("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}),VK=({className:e,...t})=>g.jsx("div",{className:Oe("group/card rounded-md shadow-md","border border-lm-border dark:border-dm-border bg-lm-primary dark:bg-dm-primary",e),...t}),an=Object.assign(VK,{Body:$K,Header:UK,Footer:FK}),Ot=({bodyClassName:e,children:t,...n})=>{const{title:r,titleSize:i="md",...o}="title"in n?n:{...n,title:void 0,titleSize:void 0};return g.jsxs(an,{...o,children:[r&&g.jsxs(an.Header,{children:[i==="lg"&&g.jsx("h4",{children:r}),i==="md"&&g.jsx("h5",{children:r}),i==="sm"&&g.jsx("h6",{children:r})]}),g.jsx(an.Body,{className:e,children:t})]})};function HK({id:e,items:t,onSelectItem:n,onActiveItemChange:r,renderItem:i,className:o,noItemsMessage:l="No items",anchor:c,"aria-label":f="Items",...h}){const[m,y]=_.useState(0),x=_.useCallback(b=>{if(y(b),r){const[w,C]=[...t.entries()][b];r(w,C)}},[t,r]);return _.useEffect(()=>{const b=c?.current;if(!b)return;const w=C=>{["Enter","ArrowUp","ArrowDown"].includes(C.key)&&C.preventDefault(),C.key==="ArrowDown"?x(Math.min(m+1,t.size-1)):C.key==="ArrowUp"?x(Math.max(m-1,0)):C.key==="Enter"&&n([...t.values()][m])};return b.addEventListener("keydown",w),()=>b.removeEventListener("keydown",w)},[m,c,x,t,n]),g.jsxs(an,{id:e,className:Oe("py-1 flex flex-col",o),role:"listbox","aria-orientation":"vertical","aria-label":f,...h,children:[t.size===0&&g.jsx("i",{role:"option","aria-disabled":!0,"aria-selected":!1,"data-testid":"no-items",className:"px-2 py-1",children:l}),[...t.entries()].map(([b,w],C)=>g.jsx("button",{id:`${e}_${b}`,type:"button",role:"option","aria-selected":C===m,className:Oe("px-2 py-1 text-left truncate",{"bg-lm-secondary dark:bg-dm-secondary":C===m}),tabIndex:-1,onClick:()=>n(w),onMouseOver:()=>x(C),children:i(w)},b))]})}const cm=_.createContext(void 0),Nf=_.createContext({responsive:!0,size:"md"}),qK=({children:e,className:t})=>{const{responsive:n}=_.useContext(Nf);return g.jsx(cm.Provider,{value:{section:"head"},children:g.jsx("thead",{className:Oe({"hidden lg:table-header-group":n},t),children:e})})},GK=({children:e,className:t})=>{const{responsive:n}=_.useContext(Nf);return g.jsx(cm.Provider,{value:{section:"body"},children:g.jsx("tbody",{className:Oe({"lg:table-row-group flex flex-col gap-y-3":n},t),children:e})})},YK=({children:e,className:t})=>{const{responsive:n}=_.useContext(Nf);return g.jsx(cm.Provider,{value:{section:"footer"},children:g.jsx("tfoot",{className:Oe({"lg:table-row-group flex flex-col gap-y-3 mt-4":n},t),children:e})})},WK=({children:e,className:t,...n})=>{const r=_.useContext(cm)?.section==="body",{responsive:i}=_.useContext(Nf);return g.jsx("tr",{className:Oe("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})},KK=({children:e,className:t,columnName:n,type:r,...i})=>{const o=_.useContext(cm),l=r??(o?.section!=="body"?"th":"td"),{responsive:c,size:f}=_.useContext(Nf);return g.jsx(l,{"data-column":c?n:void 0,className:Oe("border-lm-border dark:border-dm-border",{"p-1":f==="sm","p-2":f==="md","p-3":f==="lg","border-b-1":!c,"block lg:table-cell not-last:border-b-1 lg:border-b-1":c,"text-left":l==="th","before:lg:hidden before:content-[attr(data-column)] before:font-bold before:mr-1":c&&l==="td"},t),...i,children:e})},ZK=({header:e,footer:t,children:n,responsive:r=!0,size:i="md",...o})=>g.jsx(Nf.Provider,{value:{responsive:r,size:i},children:g.jsxs("table",{className:"w-full",...o,children:[g.jsx(qK,{children:e}),g.jsx(GK,{children:n}),t&&g.jsx(YK,{children:t})]})}),ze=Object.assign(ZK,{Row:WK,Cell:KK}),Ct=({className:e,disabled:t,variant:n="primary",size:r="md",inline:i=!1,solid:o=!1,type:l="button",ref:c,...f})=>{const h="to"in f&&typeof f.to=="string",m=h?Pr:"button",y=h?void 0:l;return g.jsx(m,{ref:c,className:Oe({"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"&&!o,"border-zinc-500":n==="secondary","text-zinc-500":n==="secondary"&&!o,"border-danger":n==="danger","text-danger":n==="danger"&&!o},o&&{"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":!o,"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:h?void 0:t,"aria-disabled":h?t:void 0,type:y,...f})},HR=({className:e,onChange:t,ref:n,...r})=>{const i=_.useCallback(o=>t?.(o.target.checked,o),[t]);return g.jsx("input",{ref:n,type:"checkbox",className:Oe("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,...r})},zS=({className:e,...t})=>g.jsx(HR,{className:Oe("rounded-sm min-w-4 w-4 h-4 checked:bg-(image:--tick) bg-center",e),...t}),Ru=({onClick:e,className:t,label:n="Close",size:r="lg",solid:i,ref:o})=>g.jsx("button",{ref:o,type:"button",onClick:e,className:Oe("rounded-md focus-ring cursor-pointer",{"opacity-50 highlight:opacity-80 transition-opacity":!i},t),"aria-label":n,children:g.jsx(De,{icon:Fy,size:r==="lg"?"xl":r==="md"?"lg":void 0})}),bi=({borderless:e=!1,size:t="md",feedback:n,variant:r="default",className:i,disabled:o,ref:l,...c})=>g.jsx("input",{ref:l,className:Oe("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":o,"bg-lm-primary dark:bg-dm-primary":!o,"group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":!o}],i),disabled:o,...c}),Sa=({required:e,children:t,className:n,...r})=>g.jsxs("label",{className:Oe("cursor-pointer",n),...r,children:[t,e&&g.jsx("span",{className:"text-danger ml-1","data-testid":"required-indicator",children:"*"})]}),BS=({children:e,helpText:t,error:n,"data-testid":r})=>g.jsxs("div",{className:"flex flex-col gap-1","data-testid":r,children:[e,t&&g.jsx("small",{"data-testid":r?`${r}-help-text`:"help-text",className:"text-gray-500 dark:text-gray-400",children:t}),n&&g.jsx("span",{"data-testid":r?`${r}-error`:"error",className:"text-danger",children:n})]}),ii=({label:e,inputClassName:t,required:n,hiddenRequired:r,error:i,helpText:o,"data-testid":l,...c})=>{const f=_.useId();return g.jsxs(BS,{error:i,helpText:o,"data-testid":l,children:[g.jsx(Sa,{htmlFor:f,required:n,children:e}),g.jsx(bi,{id:f,className:t,required:n||r,feedback:i?"error":void 0,...c})]})},XK=({containerClassName:e,className:t,size:n,...r})=>{const{flag:i,toggle:o,setToFalse:l}=xn(),c=_.useRef(null),f=_.useCallback(({relatedTarget:h})=>{c.current?.contains(h)||l()},[c,l]);return g.jsxs("div",{className:Oe("group relative",e),ref:c,onBlurCapture:f,children:[g.jsx(bi,{type:i?"text":"password",className:Oe({"pr-10":n!=="sm","pr-8":n==="sm"},t),size:n,"data-testid":"input",...r}),g.jsx("button",{type:"button",onClick:o,title:i?"Hide password":"Show password","aria-label":i?"Hide password":"Show password",className:Oe("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:g.jsx(De,{icon:i?xH:$V})})]})},QK=({label:e,inputClassName:t,required:n,hiddenRequired:r,error:i,helpText:o,"data-testid":l,...c})=>{const f=_.useId();return g.jsxs(BS,{error:i,helpText:o,"data-testid":l,children:[g.jsx(Sa,{htmlFor:f,required:n,children:e}),g.jsx(XK,{id:f,className:t,required:n||r,feedback:i?"error":void 0,...c})]})},JK=({className:e,size:t="md",feedback:n,disabled:r,...i})=>g.jsx("select",{className:Oe("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}),US=({selectClassName:e,label:t,error:n,helpText:r,required:i,hiddenRequired:o,"data-testid":l,...c})=>{const f=_.useId();return g.jsxs(BS,{error:n,helpText:r,"data-testid":l,children:[g.jsx(Sa,{htmlFor:f,required:i,children:t}),g.jsx(JK,{id:f,className:e,required:i||o,feedback:n?"error":void 0,...c})]})},Lf=({onChange:e,containerClassName:t,inputClassName:n,size:r="lg",loading:i=!1,variant:o="default",immediate:l=!1,...c})=>{const{setTimeout:f,clearCurrentTimeout:h}=ZR(500),m=_.useCallback(y=>{!y||l?(h(),e(y)):f(()=>e(y))},[h,l,e,f]);return g.jsxs("div",{className:Oe("group relative focus-within:z-10",t),children:[o==="default"&&g.jsx(De,{icon:i?yS:zV,spin:i,className:Oe("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"})}),g.jsx(bi,{variant:o,type:"search",className:Oe(o==="default"&&{"pl-9":r!=="sm","pl-7":r==="sm"},n),placeholder:"Search...",onChange:y=>m(y.target.value),size:r,...c})]})};function qR({searchResults:e,onSearch:t,onSelectSearchResult:n,renderSearchResult:r,size:i="md",listboxSpan:o="full",onFocus:l,containerClassName:c,listboxClassName:f,ref:h,...m}){const y=_.useId(),[x,b]=_.useState(),w=_.useRef(null);_.useImperativeHandle(h,()=>w.current);const C=_.useMemo(()=>e?x??[...e.keys()][0]:void 0,[x,e]),O=_.useCallback(T=>{n(T),t(""),w.current.value=""},[t,n,w]);return g.jsxs("div",{className:Oe("relative",c),onBlur:T=>{T.currentTarget.contains(T.relatedTarget)||t("")},children:[g.jsx(Lf,{onChange:t,size:i,ref:w,role:"combobox","aria-autocomplete":"list","aria-expanded":!!e,"aria-controls":y,"aria-activedescendant":C?`${y}_${C}`:void 0,autoComplete:"off",autoCorrect:"off",onFocus:T=>{l?.(T),t(T.target.value)},...m}),e&&g.jsx(HK,{id:y,items:e,anchor:w,onSelectItem:O,onActiveItemChange:b,renderItem:r,className:Oe("absolute top-full mt-1 z-10",{"min-w-60":o==="auto","w-full":o==="full"},f),"aria-label":"Matching items",noItemsMessage:"No results found matching search"})]})}const eZ=({name:e,color:t})=>g.jsxs("div",{className:"inline-flex items-center gap-2",children:[g.jsx("div",{"aria-hidden":!0,className:"w-4 h-4 rounded-full",style:{backgroundColor:t}}),e]}),tZ=({tag:e,color:t,size:n,onRemove:r})=>g.jsxs("li",{className:Oe("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:$S(t)?"#000":"#fff"},onClick:i=>i.stopPropagation(),children:[e,g.jsx(Ru,{label:`Remove ${e}`,solid:!0,size:"sm",onClick:()=>r(e)})]}),nj="#99a1af",nZ=({tags:e,selectedTags:t=[],onTagsChange:n,getColorForTag:r,searchMode:i="startsWith",immutable:o=!1,size:l="md",disabled:c,containerClassName:f,...h})=>{const{searchResults:m,onSearch:y}=KR({tags:e,selectedTags:t,searchMode:i,allowAdding:!o}),x=_.useCallback(C=>{const O=(C.match(/Add\s+"([^"]+)"\s+tag/)?.[1]??C).split(",").map(VS);n?.([...new Set([...t,...O])])},[n,t]),b=_.useCallback(C=>n?.(t.filter(O=>O!==C)),[n,t]),w=_.useRef(null);return g.jsxs("div",{className:Oe("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":l==="sm","p-1.25":l==="md","p-2":l==="lg","bg-lm-disabled-input dark:bg-dm-disabled-input":c,"bg-lm-primary dark:bg-dm-primary":!c,"group-[&]/card:bg-lm-input group-[&]/card:dark:bg-dm-input":!c},f),onClick:C=>{C.target!==w.current&&w.current?.focus()},children:[g.jsx("ul",{className:"m-0 p-0 flex flex-wrap gap-1",children:t.map((C,O)=>{const T=r?.(C)??nj;return g.jsx(tZ,{tag:C,color:T,onRemove:b,size:l},`${C}${O}`)})}),g.jsx(qR,{variant:"unstyled",listboxSpan:"auto",containerClassName:"flex items-center",listboxClassName:"whitespace-nowrap",inputClassName:Oe("no-clear-button",{"px-1 text-sm":l==="sm","px-2 h-[26px]":l==="md","px-3 text-xl":l==="lg"}),searchResults:m,onSearch:y,onSelectSearchResult:x,renderSearchResult:C=>C.match(/Add\s+"([^"]+)"\s+tag/)?C:g.jsx(eZ,{name:C,color:r?.(C)??nj}),onKeyDown:C=>{C.key==="Backspace"&&!m&&b(t[t.length-1])},size:l,disabled:c,ref:w,immediate:!0,...h})]})},rZ=({className:e,...t})=>g.jsx(HR,{className:Oe("rounded-full min-w-8 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 GR(e,{elementsSelector:t,focusFirstItem:n=!1,vertical:r=!0,horizontal:i=!0}){const o=_.useMemo(()=>{const f=[];return r&&f.push("ArrowDown"),i&&f.push("ArrowRight"),f},[i,r]),l=_.useMemo(()=>{const f=[];return r&&f.push("ArrowUp"),i&&f.push("ArrowLeft"),f},[i,r]),c=_.useMemo(()=>[...o,...l],[o,l]);_.useEffect(()=>{const f=e.current;if(!f)return()=>{};const h=new AbortController,m=()=>[...f.querySelectorAll(t)],y=m(),x=Math.max(y.findIndex(b=>b.dataset.selected==="true"),0);return y.forEach((b,w)=>{b.tabIndex=w===x?0:-1,n&&w===x&&b.focus()}),f.addEventListener("keydown",b=>{if(!c.includes(b.key))return;b.preventDefault();const w=m(),C=w.findIndex(T=>T.tabIndex===0),O=o.includes(b.key)?w[C+1]??w[0]:w[C-1]??w[w.length-1];w.forEach(T=>{T.tabIndex=-1}),O.tabIndex=0,O.focus()},{signal:h.signal}),()=>h.abort()},[c,e,t,n,o])}const iZ=()=>{const e=Ja();return _.useCallback(()=>e(-1),[e])},aZ=128;function $S(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))>=aZ}const YR=({text:e,className:t,size:n="lg",initialCopied:r=!1,navigator_:i=globalThis.navigator,...o})=>{const[l,c]=Jy({initialValue:r}),f=_.useCallback(()=>i.clipboard.writeText(e).then(c),[i.clipboard,e,c]);return g.jsx("button",{type:"button",className:Oe("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:f,...o,children:g.jsx(De,{icon:l?Pu:VR})})},WR=e=>{const t=new URLSearchParams(e),n={};return t.forEach((r,i)=>{if(i.endsWith("[]")){const o=i.slice(0,-2);n[o]??=[],n[o].push(r)}else n[i]=r}),n},FS=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()},Wu=()=>{const{search:e}=_r();return _.useMemo(()=>WR(e),[e])},oZ=/\s+/g,VS=e=>e.trim().toLowerCase().replace(oZ,"-"),sZ=new Intl.NumberFormat("en-US"),bn=e=>sZ.format(Number(e)),rj=10,lZ=e=>Math.ceil(e/rj)*rj,qc=2,jv="...",uZ=(e,t)=>Array.from({length:t-e},(n,r)=>e+r),cZ=(e,t)=>{const n=uZ(Math.max(qc,e-qc),Math.min(t-1,e+qc)+1);return e-qc>qc&&n.unshift(jv),e+qc<t-1&&n.push(jv),n.unshift(1),n.push(t),n},Sh=e=>e===jv,fZ=e=>Sh(e)?e:bn(e),dZ=(e,t)=>Sh(e)?`${e}_${t}`:`${e}`;function KR({tags:e,selectedTags:t,searchMode:n,searchLimit:r=5,allowAdding:i=!1}){const[o,l]=_.useState(),c=_.useCallback(f=>{const h=f.toLowerCase().trim();if(!h){l(void 0);return}const m=e.filter(y=>t.includes(y)?!1:y.toLowerCase()[n](h)).slice(0,r);i&&m.push(`Add "${h.split(",").map(VS).join(",")}" tag`),l(new Map(m.map(y=>[y,y])))},[i,r,n,t,e]);return{searchResults:o,onSearch:c}}function ZR(e,t=globalThis.setTimeout,n=globalThis.clearTimeout){const r=_.useRef(null),i=_.useCallback(()=>{r.current&&n(r.current)},[n]),o=_.useCallback((l,c)=>{i(),r.current=t(()=>{l(),r.current=null},c??e)},[i,e,t]);return _.useEffect(()=>i,[i]),_.useMemo(()=>({setTimeout:o,clearCurrentTimeout:i}),[i,o])}const hZ=2e3,Jy=({initialValue:e=!1,delay:t=hZ}={},n=globalThis.setTimeout,r=globalThis.clearTimeout)=>{const{setTimeout:i}=ZR(t,n,r),[o,l]=_.useState(e),c=_.useRef(e),f=_.useCallback(()=>{l(!c.current),i(()=>l(c.current))},[i]);return[o,f]};function xn(e=!1){const[t,n]=_.useState(e),r=_.useCallback(()=>n(l=>!l),[]),i=_.useCallback(()=>n(!0),[]),o=_.useCallback(()=>n(!1),[]);return{flag:t,toggle:r,setToTrue:i,setToFalse:o}}const XR=_.createContext({}),mZ=({className:e,selected:t,disabled:n,onClick:r,...i})=>{const o="to"in i&&typeof i.to=="string",l=o?Pr:"button",{onItemClick:c}=_.useContext(XR);return g.jsx(l,{role:"menuitem","data-selected":t,className:Oe("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:o?void 0:n,"aria-disabled":o?n:void 0,type:o?void 0:"button",onClick:f=>{r?.(f),c?.()},...i})},pZ=()=>g.jsx("div",{role:"separator","aria-hidden":!0,className:"border-b border-lm-border dark:border-dm-border my-2"}),gZ=({children:e})=>g.jsx("div",{role:"heading","aria-level":6,"aria-hidden":!0,className:Oe("flex items-center w-full px-3 py-1.5","text-gray-500 text-sm font-semibold"),onClick:t=>t.stopPropagation(),children:e}),vZ=({className:e,...t})=>g.jsx("div",{className:Oe("px-3 py-1.5",e),...t}),yZ=({children:e,className:t,focusableElementsSelector:n='[role="menuitem"]:not([disabled]):not([aria-disabled])',focusFirstItem:r=!1,onItemClick:i,...o})=>{const l=_.useRef(null);return GR(l,{elementsSelector:n,focusFirstItem:r}),g.jsx(an,{ref:l,role:"menu",className:Oe("py-2 whitespace-nowrap",t),...o,children:g.jsx(XR.Provider,{value:{onItemClick:i},children:e})})},mh=Object.assign(yZ,{Item:mZ,Separator:pZ,Title:gZ,Misc:vZ}),bZ=({children:e,menuAlignment:t="left",buttonVariant:n="button",buttonContent:r,buttonClassName:i,buttonSize:o="md",buttonDisabled:l=!1,containerClassName:c,menuClassName:f,caretless:h,buttonLabel:m,menuOffset:y=3})=>{const[x,b]=_.useState(!1),w=_.useRef(null),C=_.useCallback(({focusButton:re=!0}={})=>{b(!1),re&&w.current?.focus()},[]),{refs:O,floatingStyles:T,context:P}=$R({open:x,onOpenChange:b,placement:t==="right"?"bottom-end":"bottom-start",middleware:[pK(),mK(y)],elements:{reference:w.current}}),N=MK(P),{getReferenceProps:F,getFloatingProps:B}=FR([N]),W=_.useId(),Q=_.useRef(null);return _.useEffect(()=>{const re=Q.current;if(!re||!x)return()=>{};const ce=new AbortController;return document.body.addEventListener("click",ae=>{ae.composedPath().includes(re)||C()},{signal:ce.signal}),()=>ce.abort()},[C,x]),g.jsxs("div",{ref:Q,className:Oe("relative inline-block",c),onKeyDown:re=>{re.key==="Escape"&&C()},onBlur:re=>{re.relatedTarget&&!Q.current.contains(re.relatedTarget)&&C({focusButton:!1})},children:[g.jsxs("button",{ref:w,...F(),type:"button","aria-haspopup":!0,"aria-expanded":x,"aria-controls":W,"aria-label":m,disabled:l,className:Oe("flex items-center rounded-md focus-ring",{"justify-between":!h,"cursor-pointer":!l,"pointer-events-none opacity-50":l,"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"&&o==="sm","px-3 py-1.5":n!=="text"&&o==="md","px-4 py-2 text-lg":n!=="text"&&o==="lg","gap-x-1.5":o==="sm","gap-x-2":o!=="sm"},i),onKeyDown:re=>{re.key==="ArrowDown"&&(re.preventDefault(),b(!0))},children:[r,!h&&g.jsx(De,{icon:b6,size:"xs",widthAuto:!0})]}),x&&g.jsx("div",{ref:O.setFloating,style:T,className:"min-w-full z-500",...B(),children:g.jsx(mh,{className:f,id:W,focusableElementsSelector:'[role="menuitem"]:not([disabled]):not([aria-disabled]),input:not([disabled]),select:not([disabled])',focusFirstItem:!0,onItemClick:C,children:e})})]})},Ue=Object.assign(bZ,{Item:mh.Item,Separator:mh.Separator,Title:mh.Title,Misc:mh.Misc}),e0=({className:e,disabled:t,size:n="md",type:r="button",...i})=>g.jsx("button",{className:Oe("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}),xZ=({className:e,active:t,...n})=>g.jsx("li",{role:"menuitem",className:"w-full flex","data-active":t,children:g.jsx(Pr,{className:Oe("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})}),_Z=({containerClassName:e,buttonClassName:t,menuClassName:n,active:r,...i})=>g.jsx("li",{role:"menuitem","aria-haspopup":!0,className:"w-full flex","data-active":r,children:g.jsx(Ue,{containerClassName:Oe("max-md:w-full",e),buttonVariant:"text",buttonClassName:Oe("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:Oe("mx-2",n),...i})}),wZ=({className:e,brand:t,children:n})=>{const{flag:r,toggle:i,setToFalse:o}=xn(),l=_.useId(),c=_.useId(),{pathname:f}=_r();return _.useEffect(()=>o(),[f,o]),g.jsxs("nav",{className:Oe("w-full relative","bg-lm-main dark:bg-dm-main","flex max-md:flex-col items-center justify-between",e),children:[g.jsxs("div",{className:"w-full relative",children:[g.jsx("h4",{className:Oe("text-white px-4 py-3","max-md:w-full max-md:flex max-md:flex-col items-center"),children:t}),g.jsx(Ct,{id:c,variant:"secondary",className:Oe("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":l,children:g.jsx(De,{icon:r?VV:sH})})]}),g.jsx("ul",{id:l,"aria-labelledby":c,role:"menu",className:Oe("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})]})},H_=Object.assign(wZ,{MenuItem:xZ,Dropdown:_Z}),QR=_.createContext(null),SZ=({className:e,to:t,...n})=>{const r=_.useContext(QR);return g.jsx(vS,{role:"menuitem",to:t,className:({isActive:i})=>Oe("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})},CZ=({children:e,className:t,fill:n})=>g.jsx(QR.Provider,{value:{fill:n},children:g.jsx(an,{role:"menubar",className:Oe("flex overflow-hidden",t),children:e})}),Ws=Object.assign(CZ,{Pill:SZ}),JR=["border border-r-0 last:border-r border-lm-border dark:border-dm-border","rounded-none first:rounded-l last:rounded-r"],eD=(e=!1)=>Oe(JR,"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"),q_=({children:e})=>g.jsx("span",{"aria-hidden":!0,className:Oe(JR,"px-3 py-2 text-gray-400"),children:e}),tD=()=>g.jsx(q_,{children:jv});function EZ({children:e,active:t,isEllipsis:n,href:r,...i}){const o=_.useMemo(()=>eD(t),[t]);return n?g.jsx(tD,{}):g.jsx(Pr,{className:o,to:r,...i,"data-active":t,children:e})}function AZ({children:e,active:t,isEllipsis:n,...r}){const i=_.useMemo(()=>eD(t),[t]);return n?g.jsx(tD,{}):g.jsx("button",{type:"button",className:i,...r,"data-active":t,children:e})}const t0=({currentPage:e,pagesCount:t,...n})=>{const r="urlForPage"in n,i=r?EZ:AZ,o=_.useCallback(c=>r?{href:Sh(c)?void 0:n.urlForPage(c)}:{onClick:()=>!Sh(c)&&n.onPageChange(c)},[r,n]),l=_.useRef(null);return GR(l,{elementsSelector:"button,a",vertical:!1}),t<2?null:g.jsxs("div",{className:"select-none flex","data-testid":"paginator",ref:l,children:[e===1?g.jsx(q_,{children:g.jsx(De,{size:"xs",icon:iT})}):g.jsx(i,{...o(Math.max(1,e-1)),"aria-label":"Previous",children:g.jsx(De,{size:"xs",icon:iT})}),cZ(e,t).map((c,f)=>g.jsx(i,{active:c===e,isEllipsis:Sh(c),...o(c),children:fZ(c)},dZ(c,f))),e===t?g.jsx(q_,{children:g.jsx(De,{size:"xs",icon:xv})}):g.jsx(i,{...o(Math.min(t,e+1)),"aria-label":"Next",children:g.jsx(De,{size:"xs",icon:xv})})]})},OZ=({buttonLabel:e="Options",buttonSize:t="md",...n})=>g.jsx(Ue,{buttonContent:g.jsx(De,{icon:qV,widthAuto:!0,className:Oe({"px-1":t==="sm"})}),caretless:!0,buttonLabel:e,buttonSize:t,...n}),Xt=Object.assign(OZ,{Item:Ue.Item,Separator:Ue.Separator,Title:Ue.Title,Misc:Ue.Misc}),TZ=({open:e,children:t,className:n,onClose:r,...i})=>{const o=_.useRef(null);return _.useEffect(()=>{const l=document.body,c=l.style.overflow,f=l.style.paddingRight;if(e){const h=window.outerWidth-l.clientWidth,m=l.scrollHeight>l.clientHeight;l.style.overflow="hidden",m&&(l.style.paddingRight=`${h}px`),o.current?.showModal()}else o.current?.close();return()=>{l.style.overflow=c,l.style.paddingRight=f}},[e]),Pf.createPortal(g.jsx("dialog",{ref:o,className:Oe("bg-transparent backdrop:bg-black/50",n),onCancel:l=>{l.preventDefault(),r()},...i,children:e&&t}),document.body)},eo=({open:e,onClose:t,variant:n="default",title:r,children:i,className:o,...l})=>{const{size:c="md",confirmText:f="Confirm",cancelText:h="Cancel",confirmDisabled:m,onConfirm:y,onClosed:x,...b}="onConfirm"in l?l:{...l},[w,C]=_.useState(e),O=_.useRef(null),T=_.useRef("cancel"),P=_.useCallback(N=>{N.preventDefault(),N.stopPropagation(),T.current="confirm",y?.()},[y]);return _.useEffect(()=>{if(e){T.current="cancel",C(!0);return}const N=O.current;if(N){delete O.current.dataset.open;let F=!1;const B=W=>{F||W.target!==N||(F=!0,C(!1),x?.(T.current))};return N.addEventListener("transitionend",B),()=>{N.removeEventListener("transitionend",B)}}},[x,e]),_.useEffect(()=>{const N=O.current;w&&N&&(N.dataset.open="")},[w]),g.jsx(TZ,{open:w,onClose:t,className:Oe({"flex w-screen h-screen max-w-screen max-h-screen":w,"overflow-hidden":n==="cover"},o),...b,children:g.jsx("form",{"data-testid":"transition-container",ref:O,className:Oe("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":c==="sm","md:w-lg":c==="md","md:w-4xl":c==="lg","md:w-6xl":c==="xl"},{"h-full":n==="cover"}),onSubmit:P,children:g.jsx(an,{className:Oe("w-full",{"h-full relative overflow-auto":n==="cover"}),children:n==="cover"?g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:Oe("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:[g.jsx("h5",{children:r}),g.jsx(Ru,{onClick:t,label:"Close dialog"})]}),i]}):g.jsxs(g.Fragment,{children:[g.jsxs(an.Header,{className:Oe("sticky top-0","flex items-center justify-between gap-x-2"),children:[g.jsx("h5",{className:Oe({"text-danger":n==="danger"}),children:r}),g.jsx(Ru,{onClick:t,label:"Close dialog"})]}),g.jsx(an.Body,{children:i}),y&&g.jsxs(an.Footer,{"data-testid":"footer",className:Oe("flex justify-end items-center gap-x-2","[&]:px-3 sticky bottom-0"),children:[g.jsx(e0,{onClick:t,children:h}),g.jsx(Ct,{solid:!0,variant:n==="danger"?"danger":"primary",disabled:m,type:"submit",children:f})]})]})})})})},$o=({className:e,children:t,loading:n=!1,variant:r="default"})=>g.jsx(Ot,{className:Oe({"[&]:border-danger":r==="error"},e),children:g.jsxs("h3",{className:Oe("text-center",{"text-gray-500 dark:text-gray-400":r==="default","text-danger":r==="error"}),children:[n&&g.jsxs(g.Fragment,{children:[g.jsx(De,{icon:yS,spin:!0}),g.jsx("span",{className:"ml-2",children:t??"Loading..."})]}),!n&&t]})}),zr=({variant:e,className:t,size:n="md",children:r})=>g.jsx("div",{className:Oe("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}),Qo=({placement:e="auto"}={})=>{const t=_.useRef(null),n=(()=>{const C=[];return e==="auto"&&C.push(gK()),C.push(vK({element:t})),C})(),[r,i]=_.useState(!1),{refs:o,floatingStyles:l,context:c,middlewareData:f}=$R({placement:e==="auto"?void 0:e,open:r,onOpenChange:i,middleware:n}),h=TK(c,{delay:{open:300},move:!0}),{getFloatingProps:m,getReferenceProps:y}=FR([h]),{isMounted:x,styles:b}=RK(c,{duration:200}),w=_.useMemo(()=>{const C=c.placement.split("-")[0];return{top:"bottom",right:"left",bottom:"top",left:"right"}[C]??""},[c.placement]);return{anchor:{...y(),ref:o.setReference},tooltip:{...m(),refSetter:o.setFloating,isMounted:x,styles:{...l,...b},arrowPos:f.arrow,arrowRef:t,arrowSide:w}}},Jo=({children:e,isMounted:t,styles:n,refSetter:r,arrowRef:i,arrowPos:o,arrowSide:l,...c})=>t&&g.jsx("div",{role:"tooltip","aria-live":"polite",className:Oe("z-500 max-w-64",{"pt-2.5":l==="top","pb-2.5":l==="bottom","pr-2.5":l==="right","pl-2.5":l==="left"}),ref:r,style:n,...c,children:g.jsxs("div",{className:"relative px-1.5 py-1 rounded bg-black/90 text-white text-center",children:[g.jsx("span",{className:"sr-only",children:"Tooltip: "}),e,g.jsx("div",{ref:i,className:Oe("absolute","border-l-6 border-r-6 border-b-6 border-l-transparent border-r-transparent border-b-black/90",{"rotate-180":l==="bottom","rotate-90 mr-[-3px]":l==="right","rotate-270 ml-[-3px]":l==="left"}),style:{left:o?.x,top:o?.y,[l]:`${-(i.current?.offsetWidth??0)/2}px`},"data-testid":"arrow"})]})});function nD(e){if(e.currentField!==e.newField)return"ASC";const t={ASC:"DESC",DESC:void 0};return e.currentOrderDir?t[e.currentOrderDir]:"ASC"}function HS(e){const t=nD(e);return{field:t?e.newField:void 0,dir:t}}const rD=(e,{field:t,dir:n})=>!t||!n?e:e.sort((r,i)=>{const o=n==="ASC"?1:-1,l=n==="ASC"?-1:1;return r[t]>i[t]?o:l}),jZ=e=>e.dir?`${e.field}-${e.dir}`:void 0,MZ=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};function fm({items:e,order:t,onChange:n,prefixed:r=!0,buttonVariant:i="button",...o}){const l=_.useCallback(f=>{const h=HS({currentOrderDir:t.dir,currentField:t.field,newField:f});n(h)},[n,t.dir,t.field]),c=i==="button";return g.jsxs(Ue,{buttonContent:g.jsxs(g.Fragment,{children:[!c&&"Order by",c&&!t.field&&g.jsx("i",{children:"Order by..."}),c&&t.field&&g.jsxs(g.Fragment,{children:[r&&"Order by: ",e[t.field]," - ",t.dir??"DESC"]})]}),buttonVariant:i,...o,children:[Object.entries(e).map(([f,h])=>g.jsxs(Ue.Item,{selected:t.field===f,onClick:()=>l(f),className:"flex items-center justify-between gap-2",children:[h,t.field===f&&g.jsx(De,{icon:t.dir==="ASC"?ZV:bH})]},f)),g.jsx(Ue.Separator,{}),g.jsx(Ue.Item,{disabled:!t.field,onClick:()=>n({}),children:g.jsx("i",{children:"Clear selection"})})]})}const PZ="#4696e5",NZ="rgba(70, 150, 229, 0.4)",LZ="#2078CF",RZ="rgba(32, 120, 207, 0.4)",Ih=()=>es()?PZ:LZ,DZ=()=>es()?NZ:RZ,G_="#f77f28",kZ="rgba(247, 127, 40, 0.4)",IZ="white",zZ="#161b22",BZ=e=>document.querySelector("html")?.setAttribute("data-theme",e),es=()=>document.querySelector("html")?.getAttribute("data-theme")==="dark",qS=(e=window.matchMedia.bind(window))=>e("(prefers-color-scheme: dark)").matches?"dark":"light",UZ=({isOpen:e,onClose:t,forceUpdate:n})=>{const{flag:r,setToTrue:i}=xn(),o=_.useCallback(()=>{i(),n()},[n,i]);return e?g.jsxs(an,{role:"alert",className:Oe("w-[700px] max-w-[calc(100%-30px)]","fixed top-[35px] left-[50%] translate-x-[-50%] z-[1040]"),children:[g.jsxs(an.Header,{className:"flex items-center justify-between",children:[g.jsx("h5",{children:"This app has just been updated!"}),g.jsx(Ru,{onClick:t})]}),g.jsxs(an.Body,{className:"flex gap-4 items-center justify-between max-md:flex-col",children:["Restart it to enjoy the new features.",g.jsxs(Ct,{disabled:r,variant:"secondary",solid:!0,onClick:o,children:[!r&&g.jsxs(g.Fragment,{children:["Restart now ",g.jsx(De,{icon:jV})]}),r&&g.jsx(g.Fragment,{children:"Restarting..."})]})]})]}):null},Ci=({href:e,children:t,rel:n,...r})=>g.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e});function vr(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 $Z=typeof Symbol=="function"&&Symbol.observable||"@@observable",ij=$Z,jx=()=>Math.random().toString(36).substring(7).split("").join("."),FZ={INIT:`@@redux/INIT${jx()}`,REPLACE:`@@redux/REPLACE${jx()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${jx()}`},Mv=FZ;function GS(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 iD(e,t,n){if(typeof e!="function")throw new Error(vr(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(vr(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(vr(1));return n(iD)(e,t)}let r=e,i=t,o=new Map,l=o,c=0,f=!1;function h(){l===o&&(l=new Map,o.forEach((O,T)=>{l.set(T,O)}))}function m(){if(f)throw new Error(vr(3));return i}function y(O){if(typeof O!="function")throw new Error(vr(4));if(f)throw new Error(vr(5));let T=!0;h();const P=c++;return l.set(P,O),function(){if(T){if(f)throw new Error(vr(6));T=!1,h(),l.delete(P),o=null}}}function x(O){if(!GS(O))throw new Error(vr(7));if(typeof O.type>"u")throw new Error(vr(8));if(typeof O.type!="string")throw new Error(vr(17));if(f)throw new Error(vr(9));try{f=!0,i=r(i,O)}finally{f=!1}return(o=l).forEach(P=>{P()}),O}function b(O){if(typeof O!="function")throw new Error(vr(10));r=O,x({type:Mv.REPLACE})}function w(){const O=y;return{subscribe(T){if(typeof T!="object"||T===null)throw new Error(vr(11));function P(){const F=T;F.next&&F.next(m())}return P(),{unsubscribe:O(P)}},[ij](){return this}}}return x({type:Mv.INIT}),{dispatch:x,subscribe:y,getState:m,replaceReducer:b,[ij]:w}}function VZ(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Mv.INIT})>"u")throw new Error(vr(12));if(typeof n(void 0,{type:Mv.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(vr(13))})}function n0(e){const t=Object.keys(e),n={};for(let o=0;o<t.length;o++){const l=t[o];typeof e[l]=="function"&&(n[l]=e[l])}const r=Object.keys(n);let i;try{VZ(n)}catch(o){i=o}return function(l={},c){if(i)throw i;let f=!1;const h={};for(let m=0;m<r.length;m++){const y=r[m],x=n[y],b=l[y],w=x(b,c);if(typeof w>"u")throw c&&c.type,new Error(vr(14));h[y]=w,f=f||w!==b}return f=f||r.length!==Object.keys(l).length,f?h:l}}function Pv(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function HZ(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(vr(15))};const l={getState:i.getState,dispatch:(f,...h)=>o(f,...h)},c=e.map(f=>f(l));return o=Pv(...c)(i.dispatch),{...i,dispatch:o}}}function aD(e){return GS(e)&&"type"in e&&typeof e.type=="string"}var oD=Symbol.for("immer-nothing"),aj=Symbol.for("immer-draftable"),Br=Symbol.for("immer-state");function ha(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var _i=Object,hf=_i.getPrototypeOf,Nv="constructor",r0="prototype",Y_="configurable",Lv="enumerable",Xg="writable",zh="value",Fo=e=>!!e&&!!e[Br];function ba(e){return e?sD(e)||i0(e)||!!e[aj]||!!e[Nv]?.[aj]||a0(e)||o0(e):!1}var qZ=_i[r0][Nv].toString(),oj=new WeakMap;function sD(e){if(!e||!YS(e))return!1;const t=hf(e);if(t===null||t===_i[r0])return!0;const n=_i.hasOwnProperty.call(t,Nv)&&t[Nv];if(n===Object)return!0;if(!Xc(n))return!1;let r=oj.get(n);return r===void 0&&(r=Function.toString.call(n),oj.set(n,r)),r===qZ}function dm(e,t,n=!0){hm(e)===0?(n?Reflect.ownKeys(e):_i.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function hm(e){const t=e[Br];return t?t.type_:i0(e)?1:a0(e)?2:o0(e)?3:0}var sj=(e,t,n=hm(e))=>n===2?e.has(t):_i[r0].hasOwnProperty.call(e,t),W_=(e,t,n=hm(e))=>n===2?e.get(t):e[t],Rv=(e,t,n,r=hm(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function GZ(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var i0=Array.isArray,a0=e=>e instanceof Map,o0=e=>e instanceof Set,YS=e=>typeof e=="object",Xc=e=>typeof e=="function",Mx=e=>typeof e=="boolean",Mo=e=>e.copy_||e.base_,WS=e=>e.modified_?e.copy_:e.base_;function K_(e,t){if(a0(e))return new Map(e);if(o0(e))return new Set(e);if(i0(e))return Array[r0].slice.call(e);const n=sD(e);if(t===!0||t==="class_only"&&!n){const r=_i.getOwnPropertyDescriptors(e);delete r[Br];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const l=i[o],c=r[l];c[Xg]===!1&&(c[Xg]=!0,c[Y_]=!0),(c.get||c.set)&&(r[l]={[Y_]:!0,[Xg]:!0,[Lv]:c[Lv],[zh]:e[l]})}return _i.create(hf(e),r)}else{const r=hf(e);if(r!==null&&n)return{...e};const i=_i.create(r);return _i.assign(i,e)}}function KS(e,t=!1){return s0(e)||Fo(e)||!ba(e)||(hm(e)>1&&_i.defineProperties(e,{set:yg,add:yg,clear:yg,delete:yg}),_i.freeze(e),t&&dm(e,(n,r)=>{KS(r,!0)},!1)),e}function YZ(){ha(2)}var yg={[zh]:YZ};function s0(e){return e===null||!YS(e)?!0:_i.isFrozen(e)}var Dv="MapSet",Z_="Patches",lD={};function mf(e){const t=lD[e];return t||ha(0,e),t}var WZ=e=>!!lD[e],Bh,uD=()=>Bh,KZ=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:WZ(Dv)?mf(Dv):void 0});function lj(e,t){t&&(e.patchPlugin_=mf(Z_),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function X_(e){Q_(e),e.drafts_.forEach(ZZ),e.drafts_=null}function Q_(e){e===Bh&&(Bh=e.parent_)}var uj=e=>Bh=KZ(Bh,e);function ZZ(e){const t=e[Br];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function cj(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[Br].modified_&&(X_(t),ha(4)),ba(e)&&(e=fj(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(n[Br].base_,e,t)}else e=fj(t,n);return XZ(t,e,!0),X_(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==oD?e:void 0}function fj(e,t){if(s0(t))return t;const n=t[Br];if(!n)return ZS(t,e.handledSet_,e);if(!l0(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);dD(n,e)}return n.copy_}function XZ(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&KS(t,n)}function cD(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var l0=(e,t)=>e.scope_===t,QZ=[];function fD(e,t,n,r){const i=Mo(e),o=e.type_;if(r!==void 0&&W_(i,r,o)===t){Rv(i,r,n,o);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;dm(i,(f,h)=>{if(Fo(h)){const m=c.get(h)||[];m.push(f),c.set(h,m)}})}const l=e.draftLocations_.get(t)??QZ;for(const c of l)Rv(i,c,n,o)}function JZ(e,t,n){e.callbacks_.push(function(i){const o=t;if(!o||!l0(o,i))return;i.mapSetPlugin_?.fixSetContents(o);const l=WS(o);fD(e,o.draft_??o,l,n),dD(o,i)})}function dD(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||(e.assigned_?.size??0)>0)){const{patchPlugin_:r}=t;if(r){const i=r.getPath(e);i&&r.generatePatches_(e,i,t)}cD(e)}}function eX(e,t,n){const{scope_:r}=e;if(Fo(n)){const i=n[Br];l0(i,r)&&i.callbacks_.push(function(){Qg(e);const l=WS(i);fD(e,n,l,t)})}else ba(n)&&e.callbacks_.push(function(){const o=Mo(e);W_(o,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ZS(W_(e.copy_,t,e.type_),r.handledSet_,r)})}function ZS(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Fo(e)||t.has(e)||!ba(e)||s0(e)||(t.add(e),dm(e,(r,i)=>{if(Fo(i)){const o=i[Br];if(l0(o,n)){const l=WS(o);Rv(e,r,l,e.type_),cD(o)}}else ba(i)&&ZS(i,t,n)})),e}function tX(e,t){const n=i0(e),r={type_:n?1:0,scope_:t?t.scope_:uD(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,o=XS;n&&(i=[r],o=Uh);const{revoke:l,proxy:c}=Proxy.revocable(i,o);return r.draft_=c,r.revoke_=l,[c,r]}var XS={get(e,t){if(t===Br)return e;const n=Mo(e);if(!sj(n,t,e.type_))return nX(e,n,t);const r=n[t];if(e.finalized_||!ba(r))return r;if(r===Px(e.base_,t)){Qg(e);const i=e.type_===1?+t:t,o=ew(e.scope_,r,e,i);return e.copy_[i]=o}return r},has(e,t){return t in Mo(e)},ownKeys(e){return Reflect.ownKeys(Mo(e))},set(e,t,n){const r=hD(Mo(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Px(Mo(e),t),o=i?.[Br];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(GZ(n,i)&&(n!==void 0||sj(e.base_,t,e.type_)))return!0;Qg(e),J_(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_.set(t,!0),eX(e,t,n)),!0},deleteProperty(e,t){return Qg(e),Px(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),J_(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Mo(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Xg]:!0,[Y_]:e.type_!==1||t!=="length",[Lv]:r[Lv],[zh]:n[t]}},defineProperty(){ha(11)},getPrototypeOf(e){return hf(e.base_)},setPrototypeOf(){ha(12)}},Uh={};dm(XS,(e,t)=>{Uh[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}});Uh.deleteProperty=function(e,t){return Uh.set.call(this,e,t,void 0)};Uh.set=function(e,t,n){return XS.set.call(this,e[0],t,n,e[0])};function Px(e,t){const n=e[Br];return(n?Mo(n):e)[t]}function nX(e,t,n){const r=hD(t,n);return r?zh in r?r[zh]:r.get?.call(e.draft_):void 0}function hD(e,t){if(!(t in e))return;let n=hf(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=hf(n)}}function J_(e){e.modified_||(e.modified_=!0,e.parent_&&J_(e.parent_))}function Qg(e){e.copy_||(e.assigned_=new Map,e.copy_=K_(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var rX=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,i)=>{if(Xc(n)&&!Xc(r)){const l=r;r=n;const c=this;return function(h=l,...m){return c.produce(h,y=>r.call(this,y,...m))}}Xc(r)||ha(6),i!==void 0&&!Xc(i)&&ha(7);let o;if(ba(n)){const l=uj(this),c=ew(l,n,void 0);let f=!0;try{o=r(c),f=!1}finally{f?X_(l):Q_(l)}return lj(l,i),cj(o,l)}else if(!n||!YS(n)){if(o=r(n),o===void 0&&(o=n),o===oD&&(o=void 0),this.autoFreeze_&&KS(o,!0),i){const l=[],c=[];mf(Z_).generateReplacementPatches_(n,o,{patches_:l,inversePatches_:c}),i(l,c)}return o}else ha(1,n)},this.produceWithPatches=(n,r)=>{if(Xc(n))return(c,...f)=>this.produceWithPatches(c,h=>n(h,...f));let i,o;return[this.produce(n,r,(c,f)=>{i=c,o=f}),i,o]},Mx(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Mx(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Mx(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){ba(t)||ha(8),Fo(t)&&(t=ko(t));const n=uj(this),r=ew(n,t,void 0);return r[Br].isManual_=!0,Q_(n),r}finishDraft(t,n){const r=t&&t[Br];(!r||!r.isManual_)&&ha(9);const{scope_:i}=r;return lj(i,n),cj(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,n){let r;for(r=n.length-1;r>=0;r--){const o=n[r];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}r>-1&&(n=n.slice(r+1));const i=mf(Z_).applyPatches_;return Fo(t)?i(t,n):this.produce(t,o=>i(o,n))}};function ew(e,t,n,r){const[i,o]=a0(t)?mf(Dv).proxyMap_(t,n):o0(t)?mf(Dv).proxySet_(t,n):tX(t,n);return(n?.scope_??uD()).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&r!==void 0?JZ(n,o,r):o.callbacks_.push(function(f){f.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:h}=f;o.modified_&&h&&h.generatePatches_(o,[],f)}),i}function ko(e){return Fo(e)||ha(10,e),mD(e)}function mD(e){if(!ba(e)||s0(e))return e;const t=e[Br];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=K_(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=K_(e,!0);return dm(n,(i,o)=>{Rv(n,i,mD(o))},r),t&&(t.finalized_=!1),n}var iX=new rX,pD=iX.produce;function aX(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function oX(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function sX(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 dj=e=>Array.isArray(e)?e:[e];function lX(e){const t=Array.isArray(e[0])?e[0]:e;return sX(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function uX(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var cX=class{constructor(e){this.value=e}deref(){return this.value}},fX=typeof WeakRef<"u"?WeakRef:cX,dX=0,hj=1;function bg(){return{s:dX,v:void 0,o:null,p:null}}function gD(e,t={}){let n=bg();const{resultEqualityCheck:r}=t;let i,o=0;function l(){let c=n;const{length:f}=arguments;for(let y=0,x=f;y<x;y++){const b=arguments[y];if(typeof b=="function"||typeof b=="object"&&b!==null){let w=c.o;w===null&&(c.o=w=new WeakMap);const C=w.get(b);C===void 0?(c=bg(),w.set(b,c)):c=C}else{let w=c.p;w===null&&(c.p=w=new Map);const C=w.get(b);C===void 0?(c=bg(),w.set(b,c)):c=C}}const h=c;let m;if(c.s===hj)m=c.v;else if(m=e.apply(null,arguments),o++,r){const y=i?.deref?.()??i;y!=null&&r(y,m)&&(m=y,o!==0&&o--),i=typeof m=="object"&&m!==null||typeof m=="function"?new fX(m):m}return h.s=hj,h.v=m,m}return l.clearCache=()=>{n=bg(),l.resetResultsCount()},l.resultsCount=()=>o,l.resetResultsCount=()=>{o=0},l}function hX(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,l=0,c,f={},h=i.pop();typeof h=="object"&&(f=h,h=i.pop()),aX(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const m={...n,...f},{memoize:y,memoizeOptions:x=[],argsMemoize:b=gD,argsMemoizeOptions:w=[]}=m,C=dj(x),O=dj(w),T=lX(i),P=y(function(){return o++,h.apply(null,arguments)},...C),N=b(function(){l++;const B=uX(T,arguments);return c=P.apply(null,B),c},...O);return Object.assign(N,{resultFunc:h,memoizedResultFunc:P,dependencies:T,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>c,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:y,argsMemoize:b})};return Object.assign(r,{withTypes:()=>r}),r}var Se=hX(gD),mX=Object.assign((e,t=Se)=>{oX(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(o=>e[o]);return t(r,(...o)=>o.reduce((l,c,f)=>(l[n[f]]=c,l),{}))},{withTypes:()=>mX});function vD(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var pX=vD(),gX=vD,vX=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Pv:Pv.apply(null,arguments)},yX=e=>e&&typeof e.match=="function";function on(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(Ei(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=>aD(r)&&r.type===e,n}var yD=class ph extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ph.prototype)}static get[Symbol.species](){return ph}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ph(...t[0].concat(this)):new ph(...t.concat(this))}};function mj(e){return ba(e)?pD(e,()=>{}):e}function xg(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function bX(e){return typeof e=="boolean"}var xX=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let l=new yD;return n&&(bX(n)?l.push(pX):l.push(gX(n.extraArgument))),l},bD="RTK_autoBatch",Zn=()=>e=>({payload:e,meta:{[bD]:!0}}),pj=e=>t=>{setTimeout(t,e)},xD=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,l=!1;const c=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:pj(10):e.type==="callback"?e.queueNotification:pj(e.timeout),h=()=>{l=!1,o&&(o=!1,c.forEach(m=>m()))};return Object.assign({},r,{subscribe(m){const y=()=>i&&m(),x=r.subscribe(y);return c.add(m),()=>{x(),c.delete(m)}},dispatch(m){try{return i=!m?.meta?.[bD],o=!i,o&&(l||(l=!0,f(h))),r.dispatch(m)}finally{i=!0}}})},_X=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new yD(e);return r&&i.push(xD(typeof r=="object"?r:void 0)),i};function QS(e){const t=xX(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:o=!0,preloadedState:l=void 0,enhancers:c=void 0}=e||{};let f;if(typeof n=="function")f=n;else if(GS(n))f=n0(n);else throw new Error(Ei(1));let h;typeof r=="function"?h=r(t):h=t();let m=Pv;i&&(m=vX({trace:!1,...typeof i=="object"&&i}));const y=HZ(...h),x=_X(y);let b=typeof c=="function"?c(x):x();const w=m(...b);return iD(f,l,w)}function _D(e){const t={},n=[];let r;const i={addCase(o,l){const c=typeof o=="string"?o:o.type;if(!c)throw new Error(Ei(28));if(c in t)throw new Error(Ei(29));return t[c]=l,i},addAsyncThunk(o,l){return l.pending&&(t[o.pending.type]=l.pending),l.rejected&&(t[o.rejected.type]=l.rejected),l.fulfilled&&(t[o.fulfilled.type]=l.fulfilled),l.settled&&n.push({matcher:o.settled,reducer:l.settled}),i},addMatcher(o,l){return n.push({matcher:o,reducer:l}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function wX(e){return typeof e=="function"}function SX(e,t){let[n,r,i]=_D(t),o;if(wX(e))o=()=>mj(e());else{const c=mj(e);o=()=>c}function l(c=o(),f){let h=[n[f.type],...r.filter(({matcher:m})=>m(f)).map(({reducer:m})=>m)];return h.filter(m=>!!m).length===0&&(h=[i]),h.reduce((m,y)=>{if(y)if(Fo(m)){const b=y(m,f);return b===void 0?m:b}else{if(ba(m))return pD(m,x=>y(x,f));{const x=y(m,f);if(x===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return x}}return m},c)}return l.getInitialState=o,l}var CX=(e,t)=>yX(e)?e.match(t):e(t);function EX(...e){return t=>e.some(n=>CX(n,t))}var AX="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",wD=(e=21)=>{let t="",n=e;for(;n--;)t+=AX[Math.random()*64|0];return t},OX=["name","message","stack","code"],Nx=class{constructor(e,t){this.payload=e,this.meta=t}_type},gj=class{constructor(e,t){this.payload=e,this.meta=t}_type},TX=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of OX)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},vj="External signal was aborted",SD=(()=>{function e(t,n,r){const i=on(t+"/fulfilled",(f,h,m,y)=>({payload:f,meta:{...y||{},arg:m,requestId:h,requestStatus:"fulfilled"}})),o=on(t+"/pending",(f,h,m)=>({payload:void 0,meta:{...m||{},arg:h,requestId:f,requestStatus:"pending"}})),l=on(t+"/rejected",(f,h,m,y,x)=>({payload:y,error:(r&&r.serializeError||TX)(f||"Rejected"),meta:{...x||{},arg:m,requestId:h,rejectedWithValue:!!y,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function c(f,{signal:h}={}){return(m,y,x)=>{const b=r?.idGenerator?r.idGenerator(f):wD(),w=new AbortController;let C,O;function T(N){O=N,w.abort()}h&&(h.aborted?T(vj):h.addEventListener("abort",()=>T(vj),{once:!0}));const P=(async function(){let N;try{let B=r?.condition?.(f,{getState:y,extra:x});if(MX(B)&&(B=await B),B===!1||w.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const W=new Promise((Q,re)=>{C=()=>{re({name:"AbortError",message:O||"Aborted"})},w.signal.addEventListener("abort",C,{once:!0})});m(o(b,f,r?.getPendingMeta?.({requestId:b,arg:f},{getState:y,extra:x}))),N=await Promise.race([W,Promise.resolve(n(f,{dispatch:m,getState:y,extra:x,requestId:b,signal:w.signal,abort:T,rejectWithValue:(Q,re)=>new Nx(Q,re),fulfillWithValue:(Q,re)=>new gj(Q,re)})).then(Q=>{if(Q instanceof Nx)throw Q;return Q instanceof gj?i(Q.payload,b,f,Q.meta):i(Q,b,f)})])}catch(B){N=B instanceof Nx?l(null,b,f,B.payload,B.meta):l(B,b,f)}finally{C&&w.signal.removeEventListener("abort",C)}return r&&!r.dispatchConditionRejection&&l.match(N)&&N.meta.condition||m(N),N})();return Object.assign(P,{abort:T,requestId:b,arg:f,unwrap(){return P.then(jX)}})}}return Object.assign(c,{pending:o,rejected:l,fulfilled:i,settled:EX(l,i),typePrefix:t})}return e.withTypes=()=>e,e})();function jX(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function MX(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var PX=Symbol.for("rtk-slice-createasyncthunk");function NX(e,t){return`${e}/${t}`}function LX({creators:e}={}){const t=e?.asyncThunk?.[PX];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(Ei(11));const l=(typeof r.reducers=="function"?r.reducers(DX()):r.reducers)||{},c=Object.keys(l),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},h={addCase(N,F){const B=typeof N=="string"?N:N.type;if(!B)throw new Error(Ei(12));if(B in f.sliceCaseReducersByType)throw new Error(Ei(13));return f.sliceCaseReducersByType[B]=F,h},addMatcher(N,F){return f.sliceMatchers.push({matcher:N,reducer:F}),h},exposeAction(N,F){return f.actionCreators[N]=F,h},exposeCaseReducer(N,F){return f.sliceCaseReducersByName[N]=F,h}};c.forEach(N=>{const F=l[N],B={reducerName:N,type:NX(i,N),createNotation:typeof r.reducers=="function"};IX(F)?BX(B,F,h,t):kX(B,F,h)});function m(){const[N={},F=[],B=void 0]=typeof r.extraReducers=="function"?_D(r.extraReducers):[r.extraReducers],W={...N,...f.sliceCaseReducersByType};return SX(r.initialState,Q=>{for(let re in W)Q.addCase(re,W[re]);for(let re of f.sliceMatchers)Q.addMatcher(re.matcher,re.reducer);for(let re of F)Q.addMatcher(re.matcher,re.reducer);B&&Q.addDefaultCase(B)})}const y=N=>N,x=new Map,b=new WeakMap;let w;function C(N,F){return w||(w=m()),w(N,F)}function O(){return w||(w=m()),w.getInitialState()}function T(N,F=!1){function B(Q){let re=Q[N];return typeof re>"u"&&F&&(re=xg(b,B,O)),re}function W(Q=y){const re=xg(x,F,()=>new WeakMap);return xg(re,Q,()=>{const ce={};for(const[ae,J]of Object.entries(r.selectors??{}))ce[ae]=RX(J,Q,()=>xg(b,Q,O),F);return ce})}return{reducerPath:N,getSelectors:W,get selectors(){return W(B)},selectSlice:B}}const P={name:i,reducer:C,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:O,...T(o),injectInto(N,{reducerPath:F,...B}={}){const W=F??o;return N.inject({reducerPath:W,reducer:C},B),{...P,...T(W,!0)}}};return P}}function RX(e,t,n,r){function i(o,...l){let c=t(o);return typeof c>"u"&&r&&(c=n()),e(c,...l)}return i.unwrapped=e,i}var Et=LX();function DX(){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 kX({type:e,reducerName:t,createNotation:n},r,i){let o,l;if("reducer"in r){if(n&&!zX(r))throw new Error(Ei(17));o=r.reducer,l=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,l?on(e,l):on(e))}function IX(e){return e._reducerDefinitionType==="asyncThunk"}function zX(e){return e._reducerDefinitionType==="reducerWithPrepare"}function BX({type:e,reducerName:t},n,r,i){if(!i)throw new Error(Ei(18));const{payloadCreator:o,fulfilled:l,pending:c,rejected:f,settled:h,options:m}=n,y=i(e,o,m);r.exposeAction(t,y),l&&r.addCase(y.fulfilled,l),c&&r.addCase(y.pending,c),f&&r.addCase(y.rejected,f),h&&r.addMatcher(y.settled,h),r.exposeCaseReducer(t,{fulfilled:l||_g,pending:c||_g,rejected:f||_g,settled:h||_g})}function _g(){}var UX="task",CD="listener",ED="completed",JS="cancelled",$X=`task-${JS}`,FX=`task-${ED}`,tw=`${CD}-${JS}`,VX=`${CD}-${ED}`,u0=class{constructor(e){this.code=e,this.message=`${UX} ${JS} (reason: ${e})`}name="TaskAbortError";message},eC=(e,t)=>{if(typeof e!="function")throw new TypeError(Ei(32))},kv=()=>{},AD=(e,t=kv)=>(e.catch(t),e),OD=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Au=e=>{if(e.aborted)throw new u0(e.reason)};function TD(e,t){let n=kv;return new Promise((r,i)=>{const o=()=>i(new u0(e.reason));if(e.aborted){o();return}n=OD(e,o),t.finally(()=>n()).then(r,i)}).finally(()=>{n=kv})}var HX=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof u0?"cancelled":"rejected",error:n}}finally{t?.()}},Iv=e=>t=>AD(TD(e,t).then(n=>(Au(e),n))),jD=e=>{const t=Iv(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:of}=Object,yj={},c0="listenerMiddleware",qX=(e,t)=>{const n=r=>OD(e,()=>r.abort(e.reason));return(r,i)=>{eC(r);const o=new AbortController;n(o);const l=HX(async()=>{Au(e),Au(o.signal);const c=await r({pause:Iv(o.signal),delay:jD(o.signal),signal:o.signal});return Au(o.signal),c},()=>o.abort(FX));return i?.autoJoin&&t.push(l.catch(kv)),{result:Iv(e)(l),cancel(){o.abort($X)}}}},GX=(e,t)=>{const n=async(r,i)=>{Au(t);let o=()=>{};const c=[new Promise((f,h)=>{let m=e({predicate:r,effect:(y,x)=>{x.unsubscribe(),f([y,x.getState(),x.getOriginalState()])}});o=()=>{m(),h()}})];i!=null&&c.push(new Promise(f=>setTimeout(f,i,null)));try{const f=await TD(t,Promise.race(c));return Au(t),f}finally{o()}};return(r,i)=>AD(n(r,i))},MD=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:o}=e;if(t)i=on(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(Ei(21));return eC(o),{predicate:i,type:t,effect:o}},PD=of(e=>{const{type:t,predicate:n,effect:r}=MD(e);return{id:wD(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Ei(22))}}},{withTypes:()=>PD}),bj=(e,t)=>{const{type:n,effect:r,predicate:i}=MD(t);return Array.from(e.values()).find(o=>(typeof n=="string"?o.type===n:o.predicate===i)&&o.effect===r)},nw=e=>{e.pending.forEach(t=>{t.abort(tw)})},YX=(e,t)=>()=>{for(const n of t.keys())nw(n);e.clear()},xj=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},ND=of(on(`${c0}/add`),{withTypes:()=>ND}),WX=on(`${c0}/removeAll`),LD=of(on(`${c0}/remove`),{withTypes:()=>LD}),KX=(...e)=>{console.error(`${c0}/error`,...e)},mm=(e={})=>{const t=new Map,n=new Map,r=b=>{const w=n.get(b)??0;n.set(b,w+1)},i=b=>{const w=n.get(b)??1;w===1?n.delete(b):n.set(b,w-1)},{extra:o,onError:l=KX}=e;eC(l);const c=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),w=>{b.unsubscribe(),w?.cancelActive&&nw(b)}),f=b=>{const w=bj(t,b)??PD(b);return c(w)};of(f,{withTypes:()=>f});const h=b=>{const w=bj(t,b);return w&&(w.unsubscribe(),b.cancelActive&&nw(w)),!!w};of(h,{withTypes:()=>h});const m=async(b,w,C,O)=>{const T=new AbortController,P=GX(f,T.signal),N=[];try{b.pending.add(T),r(b),await Promise.resolve(b.effect(w,of({},C,{getOriginalState:O,condition:(F,B)=>P(F,B).then(Boolean),take:P,delay:jD(T.signal),pause:Iv(T.signal),extra:o,signal:T.signal,fork:qX(T.signal,N),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((F,B,W)=>{F!==T&&(F.abort(tw),W.delete(F))})},cancel:()=>{T.abort(tw),b.pending.delete(T)},throwIfCancelled:()=>{Au(T.signal)}})))}catch(F){F instanceof u0||xj(l,F,{raisedBy:"effect"})}finally{await Promise.all(N),T.abort(VX),i(b),b.pending.delete(T)}},y=YX(t,n);return{middleware:b=>w=>C=>{if(!aD(C))return w(C);if(ND.match(C))return f(C.payload);if(WX.match(C)){y();return}if(LD.match(C))return h(C.payload);let O=b.getState();const T=()=>{if(O===yj)throw new Error(Ei(23));return O};let P;try{if(P=w(C),t.size>0){const N=b.getState(),F=Array.from(t.values());for(const B of F){let W=!1;try{W=B.predicate(C,N,O)}catch(Q){W=!1,xj(l,Q,{raisedBy:"predicate"})}W&&m(B,C,b,T)}}}finally{O=yj}return P},startListening:f,stopListening:h,clearListeners:y}};function Ei(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 RD=(e,t)=>e.reduce((n,r)=>{const i=t(r);return n[i]=(n[i]||0)+1,n},{}),DD=(e,t)=>e.reduce((n,r)=>{const i=t(r);return(n[i]=n[i]||[]).push(r),n},{}),Lx=e=>Object.prototype.toString.call(e)==="[object Object]",kD=(e,t)=>{const n={};return((...r)=>{const i=e(...r);if(n[i])return n[i];const o=t(...r);return n[i]=o,o})},Rf=(e,t)=>{const n={...e};return!Lx(e)||!Lx(t)||Object.keys(t).forEach(r=>{Lx(t[r])?n[r]=r in e&&e[r]!==void 0?Rf(e[r],t[r]):{...t[r]}:n[r]=t[r]}),n},ID=(e,t)=>Array.from({length:t-e},(n,r)=>e+r),ZX=(e,t)=>[...e].sort((n,r)=>{const i=t(n),o=t(r);return i===o?0:i<o?-1:1}),sf=(e,t)=>{const n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n},_j=(e,t)=>Object.fromEntries(e.map((n,r)=>[n,t[r]])),tC=_.createContext(null),XX=tC.Provider,QX=e=>{const t=_.useContext(tC);if(!t)throw new Error(`You cannot use "${e}" outside of a ContainerProvider`);return t},zD=(...e)=>{const t=QX("useDependencies");return e.map(n=>{const r=t[n];if(!r)throw new Error(`Dependency with name "${n}" not found in container`);return r})};function f0(e,t){function n(r){const i=_.useContext(tC),o={};for(const c of t)c in r||(o[c]=i?.[c]);const l={...o,...r};return g.jsx(e,{...l})}return n}var Rx={},wg={exports:{}},wj;function JX(){return wj||(wj=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 h=[],m=0;m<arguments.length;m++)h[m]=arguments[m];return r.apply(void 0,h)}t.main=n,n.clone=o,n.isPlainObject=l,n.recursive=i;function r(){for(var h=[],m=0;m<arguments.length;m++)h[m]=arguments[m];return f(h[0]===!0,!1,h)}t.merge=r;function i(){for(var h=[],m=0;m<arguments.length;m++)h[m]=arguments[m];return f(h[0]===!0,!0,h)}t.recursive=i;function o(h){if(Array.isArray(h)){for(var m=[],y=0;y<h.length;++y)m.push(o(h[y]));return m}else if(l(h)){var m={};for(var y in h)m[y]=o(h[y]);return m}else return h}t.clone=o;function l(h){return h&&typeof h=="object"&&!Array.isArray(h)}t.isPlainObject=l;function c(h,m){if(!l(h))return m;for(var y in m)y==="__proto__"||y==="constructor"||y==="prototype"||(h[y]=l(h[y])&&l(m[y])?c(h[y],m[y]):m[y]);return h}function f(h,m,y){var x;(h||!l(x=y.shift()))&&(x={});for(var b=0;b<y.length;++b){var w=y[b];if(l(w)){for(var C in w)if(!(C==="__proto__"||C==="constructor"||C==="prototype")){var O=h?o(w[C]):w[C];x[C]=m?c(x[C],O):O}}}return x}})(wg,wg.exports)),wg.exports}var Sj;function eQ(){return Sj||(Sj=1,(function(e){var t=n(JX());Object.defineProperty(e,"__esModule",{value:!0}),e.clear=ve,e.combineLoads=oe,e.load=J,e.save=ae;function n(H){return H&&H.__esModule?H:{default:H}}function r(H,k){return f(H)||c(H,k)||o(H,k)||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 o(H,k){if(H){if(typeof H=="string")return l(H,k);var M=Object.prototype.toString.call(H).slice(8,-1);return M==="Object"&&H.constructor&&(M=H.constructor.name),M==="Map"||M==="Set"?Array.from(H):M==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(M)?l(H,k):void 0}}function l(H,k){(k==null||k>H.length)&&(k=H.length);for(var M=0,q=Array(k);M<k;M++)q[M]=H[M];return q}function c(H,k){var M=H==null?null:typeof Symbol<"u"&&H[Symbol.iterator]||H["@@iterator"];if(M!=null){var q,ee,se=[],me=!0,de=!1;try{for(M=M.call(H);!(me=(q=M.next()).done)&&(se.push(q.value),!(k&&se.length===k));me=!0);}catch(be){de=!0,ee=be}finally{try{me||M.return==null||M.return()}finally{if(de)throw ee}}return se}}function f(H){if(Array.isArray(H))return H}function h(H){"@babel/helpers - typeof";return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(k){return typeof k}:function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},h(H)}function m(H,k,M){return k in H?Object.defineProperty(H,k,{value:M,enumerable:!0,configurable:!0,writable:!0}):H[k]=M,H}var y="[Redux-LocalStorage-Simple]",x="redux_localstorage_simple",b="_",w=[],C=[],O=0,T=!1,P=!1,N=new Map;function F(H){console.warn(y,H)}function B(){}var W=function(H){return H?B:F};function Q(H,k){return k===void 0?null:H.length===1?k[H[0]]:Q(H.slice(1),k[H[0]])}function re(H){function k(q,ee){return q.length===0?ee:k(q.slice(1),m({},q[0],ee))}var M=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{};return k(H.split(".").reverse(),M)}function ce(H){this.warnFn=H||F}Object.defineProperty(ce.prototype,"length",{get:function(){try{return localStorage.length}catch(H){this.warnFn(H)}return 0},configurable:!0,enumerable:!0}),ce.prototype.key=function(H){try{return localStorage.key(H)}catch(k){this.warnFn(k)}return null},ce.prototype.setItem=function(H,k){try{localStorage.setItem(H,JSON.stringify(k))}catch(M){this.warnFn(M)}},ce.prototype.getItem=function(H){try{return JSON.parse(localStorage.getItem(H))}catch(k){this.warnFn(k)}return null},ce.prototype.removeItem=function(H){try{localStorage.removeItem(H)}catch(k){this.warnFn(k)}};function ae(){var H=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},k=H.states,M=k===void 0?w:k,q=H.ignoreStates,ee=q===void 0?C:q,se=H.namespace,me=se===void 0?x:se,de=H.namespaceSeparator,be=de===void 0?b:de,D=H.debounce,R=D===void 0?O:D,G=H.disableWarnings,ne=G===void 0?P:G;return function(V){return function(X){return function(te){function he(Ke,at){return 1<Ke.split(".").length?Q(Ke.split("."),at):Q([Ke],at)}function xe(){M.length===0?Je.setItem(me,Le):M.forEach(function(Ke){var at=me+be+Ke,zt=he(Ke,Le);zt?Je.setItem(at,zt):Je.removeItem(at)})}var Le,ke=W(ne),We=X(te);ie(M)||(console.error(y,"'states' parameter in 'save()' method was passed a non-array value. Setting default value instead. Check your 'save()' method."),M=w),ie(ee)||(console.error(y,"'ignoreStates' parameter in 'save()' method was passed a non-array value. Setting default value instead. Check your 'save()' method."),ee=C),0<ee.length&&(ee=ee.filter(function(Ke){return ue(Ke)?Ke:void console.error(y,"'ignoreStates' array contains a non-string value. Ignoring this value. Check your 'ignoreStates' array.")})),ue(me)||(console.error(y,"'namespace' parameter in 'save()' method was passed a non-string value. Setting default value instead. Check your 'save()' method."),me=x),ue(be)||(console.error(y,"'namespaceSeparator' parameter in 'save()' method was passed a non-string value. Setting default value instead. Check your 'save()' method."),be=b),Y(R)||(console.error(y,"'debounce' parameter in 'save()' method was passed a non-integer value. Setting default value instead. Check your 'save()' method."),R=O),Le=0<ee.length?z(ee,V.getState()):V.getState();var Je=new ce(ke);return R?(N.get(M+me)&&clearTimeout(N.get(M+me)),N.set(M+me,setTimeout(function(){xe()},R))):xe(),We}}}}function J(){var H=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},k=H.states,M=k===void 0?w:k,q=H.immutablejs,ee=q===void 0?T:q,se=H.namespace,me=se===void 0?x:se,de=H.namespaceSeparator,be=de===void 0?b:de,D=H.preloadedState,R=D===void 0?{}:D,G=H.disableWarnings,ne=G===void 0?P:G,V=W(ne);ie(M)||(console.error(y,"'states' parameter in 'load()' method was passed a non-array value. Setting default value instead. Check your 'load()' method."),M=w),ue(me)||(console.error(y,"'namespace' parameter in 'load()' method was passed a non-string value. Setting default value instead. Check your 'load()' method."),me=x),ue(be)||(console.error(y,"'namespaceSeparator' parameter in 'load()' method was passed a non-string value. Setting default value instead. Check your 'load()' method."),be=b),ee===!0&&V("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 X=new ce(V),te=R;if(M.length===0){var he=X.getItem(me);he&&(te=he)}else M.forEach(function(xe){var Le=me+be+xe,ke=X.getItem(Le);ke?te=t.default.recursive(te,re(xe,ke)):V("Invalid load '"+Le+"' 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 te}function oe(){for(var H={},k=arguments.length,M=Array(k),q=0;q<k;q++)M[q]=arguments[q];return M.forEach(function(ee){for(var se in I(ee)||(console.error(y,"One or more loads provided to 'combineLoads()' is not a valid object. Ignoring the invalid load/s. Check your 'combineLoads()' method."),ee={}),ee)H[se]=ee[se]}),H}function ve(){var H=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},k=H.namespace,M=k===void 0?x:k,q=H.disableWarnings,ee=q===void 0?P:q,se=W(ee);ue(M)||(console.error(y,"'namespace' parameter in 'clear()' method was passed a non-string value. Setting default value instead. Check your 'clear()' method."),M=x);for(var me,de=new ce(se),be=de.length,D=0;D<be;D++)me=de.key(D),me&&me.slice(0,M.length)===M&&de.removeItem(me)}function ie(H){return Object.prototype.toString.call(H)==="[object Array]"}function ue(H){return typeof H=="string"}function Y(H){return typeof H=="number"&&isFinite(H)&&Math.floor(H)===H}function I(H){return H!==null&&h(H)==="object"}function z(H,k){var M=Object.entries(k).reduce(function(q,ee){var se=r(ee,2),me=se[0];return se[1],H.indexOf(me)===-1&&(q[me]=k[me]),q},{});return M}})(Rx)),Rx}var BD=eQ();const tQ=e=>(e.settings?.visits?.defaultInterval==="last180days"&&(e.settings.visits.defaultInterval="last180Days"),e),{actions:rw,reducer:nQ}=Et({name:"shlink/appUpdates",initialState:!1,reducers:{appUpdateAvailable:()=>!0,resetAppUpdate:()=>!1}}),{appUpdateAvailable:rQ,resetAppUpdate:Gwe}=rw,iQ=nQ,aQ=()=>{const e=pm(),t=_.useCallback(()=>e(rw.appUpdateAvailable()),[e]),n=_.useCallback(()=>e(rw.resetAppUpdate()),[e]);return{appUpdated:d0(i=>i.appUpdated),appUpdateAvailable:t,resetAppUpdate:n}};function oQ(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 sQ(e){const t={};return e.forEach(n=>{t[n.id]=n}),t}const lQ=(e,{url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n);function uQ(e,t){const n=Object.values(e),{duplicatedServers:r=[],newServers:i=[]}=DD(t,o=>lQ(n,o)?"duplicatedServers":"newServers");return{duplicatedServers:r,newServers:i}}function zv(e,t){const n=new Set(Object.keys(e)),r=[];return t.forEach(i=>{const o=oQ(i);let l=o,c=1;for(;n.has(l);)l=`${o}-${c}`,c++;r.push({...i,id:l}),n.add(l)}),r}const cQ={},{actions:gh,reducer:fQ}=Et({name:"shlink/servers",initialState:cQ,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,o])=>[i,{...o,autoConnect:i===n}])):{...e,[n]:{...e[n],autoConnect:r}}:e}},createServers:{prepare:e=>({payload:sQ(e)}),reducer:(e,{payload:t})=>({...e,...t})}}}),{editServer:Ywe,deleteServer:Wwe,setAutoConnect:Kwe,createServers:dQ}=gh,to=()=>{const e=pm(),t=d0(l=>l.servers),n=_.useCallback((l,c)=>e(gh.editServer(l,c)),[e]),r=_.useCallback(l=>e(gh.deleteServer(l)),[e]),i=_.useCallback((l,c)=>e(gh.setAutoConnect(l,c)),[e]),o=_.useCallback(l=>e(gh.createServers(l)),[e]);return{servers:t,editServer:n,deleteServer:r,setAutoConnect:i,createServers:o}},UD={field:"dateCreated",dir:"DESC"},hQ={realTimeUpdates:{enabled:!0},shortUrlCreation:{},ui:{theme:qS()},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:UD}},{reducer:mQ,actions:$D}=Et({name:"shlink/settings",initialState:hQ,reducers:{setSettings:(e,{payload:t})=>Rf(e,t)}}),{setSettings:Zwe}=$D,pQ=mQ,nC=()=>{const e=pm(),t=_.useCallback(r=>e($D.setSettings(r)),[e]);return{settings:d0(r=>r.settings),setSettings:t}},gQ=()=>n0({appUpdated:iQ,servers:fQ,selectedServer:jQ,settings:pQ}),FD={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},vQ=()=>tQ(BD.load(FD)),yQ=(e=vQ())=>QS({devTools:!1,reducer:gQ(),preloadedState:e,middleware:t=>t().concat(BD.save(FD))}),pm=qL.withTypes(),d0=GL.withTypes(),VD=(e,t)=>SD(e,t,{serializeError:n=>n}),bQ=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Cj=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(bQ);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Ej=e=>e==="*"||e==="x"||e==="X",Aj=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},xQ=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],_Q=(e,t)=>{if(Ej(e)||Ej(t))return 0;const[n,r]=xQ(Aj(e),Aj(t));return n>r?1:n<r?-1:0},Oj=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){const r=_Q(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0},wQ=(e,t)=>{const n=Cj(e),r=Cj(t),i=n.pop(),o=r.pop(),l=Oj(n,r);return l!==0?l:i&&o?Oj(i.split("."),o.split(".")):i||o?i?-1:1:0},iw=(e,t,n)=>{SQ(n);const r=wQ(e,t);return HD[n].includes(r)},HD={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Tj=Object.keys(HD),SQ=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(Tj.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${Tj.join("|")}`)},qD=kD(e=>e,e=>{try{return iw(e,e,"=")}catch{return!1}}),GD=e=>qD(e)?`v${e}`:e,YD=(e,t="latest")=>qD(e)?e:t,rC="shlink/selectedServer",CQ="1.0.0",EQ="999.999.999",AQ="latest",OQ=e=>YD(e===AQ?EQ:e,CQ),TQ=kD(e=>`${e.id}_${e.url}_${e.apiKey}`,async(e,t)=>t().then(({version:n})=>({version:OQ(n),printableVersion:GD(n)}))),jj=null,iC=on(`${rC}/resetSelectedServer`),WD=VD(`${rC}/selectServer`,async({serverId:e,buildShlinkApiClient:t},{dispatch:n,getState:r})=>{n(iC());const{servers:i}=r(),o=i[e];if(!o)return{serverNotFound:!0};try{const l=t(o),{version:c,printableVersion:f}=await TQ(o,()=>l.health());return{...o,version:c,printableVersion:f}}catch{return{...o,serverNotReachable:!0}}}),{reducer:jQ}=Et({name:rC,initialState:jj,reducers:{},extraReducers:e=>{e.addCase(iC,()=>jj),e.addCase(WD.fulfilled,(t,{payload:n})=>n)}}),Ku=()=>{const e=pm(),[t]=zD("buildShlinkApiClient"),n=_.useCallback(()=>e(iC()),[e]),r=_.useCallback(o=>e(WD({serverId:o,buildShlinkApiClient:t})),[t,e]);return{selectedServer:d0(({selectedServer:o})=>o),resetSelectedServer:n,selectServer:r}};function aC(e){return t=>{const{resetSelectedServer:n}=Ku();return _.useEffect(()=>{n()},[n]),g.jsx(e,{...t})}}const MQ=({id:e,name:t})=>g.jsxs(Pr,{to:`/server/${e}`,className:Oe("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:[g.jsx("span",{className:"truncate",children:t}),g.jsx(De,{icon:xv})]}),KD=({servers:e,borderless:t})=>e.length>0&&g.jsx("div",{"data-testid":"list",className:Oe("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})=>g.jsx(MQ,{id:n,name:r},n))}),ZD=({color:e=Ih(),className:t})=>g.jsx("svg",{className:t,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:g.jsxs("g",{fill:e,children:[g.jsx("path",{d:" M 23.71 85.08 C 17.22 49.81 49.44 14.86 85.08 18.12 C 118.83 19.21 145.72 53.33 139.45 86.37 C 155.64 102.30 171.32 118.83 187.87 134.36 C 198.32 111.73 208.84 89.12 219.57 66.62 C 226.05 53.84 243.47 48.74 255.73 56.27 C 263.76 62.10 270.34 69.69 277.25 76.75 C 286.28 86.61 285.72 102.89 276.31 112.31 C 223.38 165.37 170.38 218.37 117.35 271.34 C 107.72 280.99 91.01 281.25 81.11 271.86 C 74.39 264.94 66.82 258.69 61.24 250.77 C 53.72 238.52 58.85 221.07 71.64 214.62 C 94.11 203.87 116.72 193.38 139.33 182.91 C 123.81 166.36 107.30 150.68 91.37 134.49 C 60.20 140.28 27.37 116.78 23.71 85.08 Z"}),g.jsx("path",{d:" M 205.21 201.23 C 225.32 181.36 260.88 181.11 281.14 200.86 C 299.25 218.75 317.37 236.65 335.10 254.93 C 356.73 278.01 352.01 318.70 326.03 336.56 C 320.07 330.47 313.73 324.65 308.12 318.28 C 323.86 309.39 328.76 286.18 316.63 272.39 C 301.73 256.95 286.30 242.03 271.24 226.75 C 264.49 219.65 256.80 212.00 246.37 211.52 C 224.65 208.64 205.52 233.36 214.49 253.58 C 221.09 266.81 234.22 275.12 243.62 286.24 C 240.43 295.96 238.09 306.13 238.29 316.46 C 225.55 304.29 213.16 291.73 200.89 279.09 C 180.97 257.57 183.10 220.45 205.21 201.23 Z"}),g.jsx("path",{d:" M 273.90 352.07 C 252.28 328.99 256.98 288.31 282.96 270.46 C 288.93 276.54 295.26 282.36 300.88 288.72 C 285.14 297.62 280.23 320.82 292.38 334.61 C 307.27 350.05 322.70 364.96 337.75 380.25 C 344.51 387.35 352.20 395.00 362.64 395.48 C 384.35 398.37 403.49 373.64 394.51 353.42 C 387.92 340.18 374.78 331.88 365.38 320.76 C 368.56 311.04 370.91 300.86 370.71 290.54 C 383.45 302.70 395.84 315.27 408.11 327.91 C 428.03 349.43 425.90 386.55 403.78 405.77 C 383.68 425.64 348.13 425.89 327.86 406.14 C 309.75 388.25 291.60 370.37 273.90 352.07 Z"}),g.jsx("path",{d:" M 422.11 403.83 C 431.96 394.07 441.60 384.06 451.66 374.51 C 460.90 383.74 471.89 392.70 474.89 406.11 C 480.16 429.97 484.08 454.13 488.76 478.12 C 490.00 483.41 484.47 488.29 479.35 486.63 C 454.66 481.52 429.55 478.12 405.14 471.84 C 393.17 467.97 385.20 457.75 376.55 449.27 C 386.39 439.49 396.13 429.60 406.06 419.91 C 416.37 433.45 435.74 414.00 422.11 403.83 Z"})]})}),PQ=aC(()=>{const e=Ja(),{servers:t}=to(),n=Object.values(t),r=n.length>0;return _.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&e(`/server/${i.id}`)},[n,e]),g.jsx("div",{className:"px-3 w-full",children:g.jsx(an,{className:"mx-auto max-w-[720px] overflow-hidden",children:g.jsxs("div",{className:"flex flex-col md:flex-row",children:[g.jsx("div",{className:"p-6 hidden md:flex items-center w-[40%]",children:g.jsx("div",{className:"w-full",children:g.jsx(ZD,{})})}),g.jsxs("div",{className:"md:border-l border-lm-border dark:border-dm-border flex-grow",children:[g.jsx("h1",{className:Oe("p-4 text-center border-lm-border dark:border-dm-border",{"border-b":!r}),children:"Welcome!"}),r?g.jsx(KD,{servers:n}):g.jsxs("div",{className:"p-6 text-center flex flex-col gap-12 text-xl",children:[g.jsx("p",{children:"This application will help you manage your Shlink servers."}),g.jsx("p",{children:g.jsxs(Ct,{to:"/server/create",size:"lg",inline:!0,children:[g.jsx(De,{icon:im,widthAuto:!0})," Add a server"]})}),g.jsx("p",{children:g.jsx(Ci,{href:"https://shlink.io/documentation",children:g.jsxs("small",{children:[g.jsx("span",{className:"mr-2",children:"Learn more about Shlink"}),g.jsx(De,{icon:DV})]})})})]})]})]})})})}),XD=e=>!!e?.url&&!!e?.apiKey,Ch=e=>!!e?.id,oC=e=>!!e?.version,NQ=e=>!!e?.serverNotFound,LQ=e=>Ch(e)?e.id:"",RQ=({name:e,url:t,apiKey:n,forwardCredentials:r})=>({name:e,url:t,apiKey:n,forwardCredentials:r?"true":"false"}),DQ=e=>typeof e.url=="string"&&typeof e.apiKey=="string"&&typeof e.name=="string",kQ=e=>{const{forwardCredentials:t,...n}=e;if(!DQ(n))throw new Error('Server is missing required "url", "apiKey" and/or "name" properties');return{...n,forwardCredentials:t==="true"}},IQ=()=>{const{servers:e}=to(),t=Object.values(e),{selectedServer:n}=Ku();return g.jsx(H_.Dropdown,{buttonContent:g.jsxs("span",{className:"flex items-center gap-1.5",children:[g.jsx(De,{icon:nT})," Servers"]}),children:t.length===0?g.jsxs(Ue.Item,{to:"/server/create",children:[g.jsx(De,{icon:im})," Add a server"]}):g.jsxs(g.Fragment,{children:[t.map(({name:r,id:i})=>g.jsx(Ue.Item,{to:`/server/${i}`,selected:LQ(n)===i,children:r},i)),g.jsx(Ue.Separator,{}),g.jsxs(Ue.Item,{to:"/manage-servers",children:[g.jsx(De,{icon:nT})," Manage servers"]})]})})},zQ=()=>{const{pathname:e}=_r(),t="/settings";return g.jsxs(H_,{className:"[&]:fixed top-0 z-900",brand:g.jsxs(Pr,{to:"/",className:"[&]:text-white no-underline flex items-center gap-2",children:[g.jsx(ZD,{className:"w-7",color:"white"})," ",g.jsx("small",{className:"font-normal",children:"Shlink"})]}),children:[g.jsxs(H_.MenuItem,{to:t,active:e.startsWith(t),className:"flex items-center gap-1.5",children:[g.jsx(De,{icon:MV})," Settings"]}),g.jsx(IQ,{})]})},QD=({children:e,title:t})=>g.jsx("div",{className:"pt-4",children:g.jsxs(Ot,{className:"p-4 w-full lg:w-[65%] m-auto",children:[g.jsx("h2",{children:t}),e]})}),JD=({to:e="/",children:t="Home"})=>g.jsxs(QD,{title:"Oops! We could not find requested route.",children:[g.jsx("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),g.jsx("br",{}),g.jsx(Ct,{inline:!0,to:e,size:"lg",children:t})]}),BQ="%_VERSION_%",UQ=e=>GD(YD(e)),Mj=({project:e,version:t})=>g.jsx(Ci,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-gray-500",children:g.jsx("b",{children:t})}),$Q=({selectedServer:e,clientVersion:t=BQ})=>{const n=UQ(t);return g.jsxs("small",{className:"text-gray-500",children:[oC(e)&&g.jsxs(g.Fragment,{children:["Server: ",g.jsx(Mj,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",g.jsx(Mj,{project:"shlink-web-client",version:n})]})},FQ=()=>{const{selectedServer:e}=Ku();return g.jsx("div",{className:Oe("text-center",{"md:ml-(--aside-menu-width)":oC(e)}),children:g.jsx($Q,{selectedServer:e})})};var xa,Wa=".",ek="function",tk="string",nk="__global__",sC="Provider",VQ=0,lC=Array.prototype.slice,HQ=function(t,n){var r=t[n];if(r===void 0&&xa.config.strict)throw new Error("Bottle was unable to resolve a service. `"+n+"` is undefined.");return r},h0=function(t){var n;return this.nested[t]||(n=xa.pop(),this.nested[t]=n,this.factory(t,function(){return n.container})),this.nested[t]},rk=function(t){return t.split(Wa).reduce(HQ,this)},qQ=function(t,n,r,i){var o={configurable:!0,enumerable:!0};return t.length?o.get=function(){var c=0,f=function(m){if(m)throw m;t[c]&&t[c++](r,f)};return f(),r}:(o.value=r,o.writable=!0),Object.defineProperty(i,n,o),i[n]},GQ=function(t,n){var r,i;return typeof t===ek&&(n=t,t=nk),r=t.split(Wa),i=r.shift(),r.length?h0.call(this,i).middleware(r.join(Wa),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},YQ=function(t,n){return n(t)},Pj=function(t,n){return(t[n]||[]).concat(t.__global__||[])},WQ=function(t,n){var r,i,o,l,c;return this.id,o=this.container,l=this.decorators,c=this.middlewares,r=t+sC,i=Object.create(null),i[r]={configurable:!0,enumerable:!0,get:function(){var h=new n;return delete o[r],o[r]=h,h}},i[t]={configurable:!0,enumerable:!0,get:function(){var h=o[r],m;return h&&(m=Pj(l,t).reduce(YQ,h.$get(o)),delete o[r],delete o[t]),m===void 0?m:qQ(Pj(c,t),t,m,o)}},Object.defineProperties(o,i),this},ik=function(t,n){var r,i;return r=t.split(Wa),this.providerMap[t]&&r.length===1&&!this.container[t+sC]?console.error(t+" provider already instantiated."):(this.originalProviders[t]=n,this.providerMap[t]=!0,i=r.shift(),r.length?(h0.call(this,i).provider(r.join(Wa),n),this):WQ.call(this,i,n))},uC=function(t,n){return ik.call(this,t,function(){this.$get=n})},ak=function(t,n,r){var i=arguments.length>3?lC.call(arguments,3):[],o=this;return uC.call(this,t,function(){var c=n,f=i.map(rk,o.container);return r?new(n.bind.apply(n,[null].concat(f))):c.apply(null,f)})},KQ=function(t,n){return ak.apply(this,[t,n,!0].concat(lC.call(arguments,2)))},ZQ=function(t,n){return ak.apply(this,[t,n,!1].concat(lC.call(arguments,2)))},ok=function(t,n){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},sk=function(t,n){var r=t[n];return r||(r={},ok.call(t,n,r)),r},XQ=function(t,n){var r;return r=t.split(Wa),t=r.pop(),ok.call(r.reduce(sk,this.container),t,n),this},QQ=function(t,n){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:n,writable:!1})},JQ=function(t,n){var r=t.split(Wa);return t=r.pop(),QQ.call(r.reduce(sk,this.container),t,n),this},lk=function(t,n){var r,i;return typeof t===ek&&(n=t,t=nk),r=t.split(Wa),i=r.shift(),r.length?h0.call(this,i).decorator(r.join(Wa),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},eJ=function(t){return this.deferred.push(t),this},tJ=function(t){return(t||[]).map(rk,this.container)},nJ=function(t,n){return uC.call(this,t,function(i){return{instance:n.bind(n,i)}})},rJ=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},cC=function(t){return Object.keys(t||this.container||{}).filter(rJ)},Bv={},iJ=function(t){var n;return typeof t===tk?(n=Bv[t],n||(Bv[t]=n=new xa,n.constant("BOTTLE_NAME",t)),n):new xa},aJ=function(t){typeof t===tk?delete Bv[t]:Bv={}},uk=function(t){var n=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,n].concat(t.$inject||[]))},Nj=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+sC]},oJ=function(t){var n=this.originalProviders,r=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(o){if(!(r&&t.indexOf(o)===-1)){var l=o.split(Wa);l.length>1&&l.forEach(Nj,h0.call(this,l[0])),Nj.call(this,o),this.provider(o,n[o])}},this)},sJ=function(t){return this.deferred.forEach(function(r){r(t)}),this};xa=function e(t){if(!(this instanceof e))return e.pop(t);this.id=VQ++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:lk.bind(this),$register:uk.bind(this),$list:cC.bind(this)}};xa.prototype={constant:JQ,decorator:lk,defer:eJ,digest:tJ,factory:uC,instanceFactory:nJ,list:cC,middleware:GQ,provider:ik,resetProviders:oJ,register:uk,resolve:sJ,service:KQ,serviceFactory:ZQ,value:XQ};xa.pop=iJ;xa.clear=aJ;xa.list=cC;xa.config={strict:!1};const ck=xa;function Dx(e){return e==null?"":`${e}`}function lJ(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 fC(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 uJ(e={stringFormatter:fC()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function cJ(e={stringFormatter:fC()}){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 fJ=RegExp(`[^.[\\]]+|\\[(?:([^"'][^[]*)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))`,"g");function dJ(e){var t,n,r;const i=[];let o;for(;o=fJ.exec(e);)i.push((r=(t=o[3])!==null&&t!==void 0?t:(n=o[1])===null||n===void 0?void 0:n.trim())!==null&&r!==void 0?r:o[0]);return i}function Lj(e,t,n){if(t in e){const o=e[t];return o===void 0?n:o}const r=Array.isArray(t)?t:dJ(t);let i=e;for(const o of r)if(i=i?.[o],i===void 0)return n;return i}function fk(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function aw(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}var Rj;(function(e){e.header="header",e.undefined="undefined",e.boolean="boolean",e.number="number",e.bigint="bigint",e.string="string",e.symbol="symbol",e.function="function",e.object="object"})(Rj||(Rj={}));class hJ{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||fC(),i=cJ({stringFormatter:r}),o={header:r,undefined:Dx,boolean:Dx,number:lJ(),bigint:Dx,string:r,symbol:uJ({stringFormatter:r}),function:i,object:i};return n.formatters=Object.assign(Object.assign({},o),n.formatters),n.delimiter=n.delimiter||",",n.eol=n.eol||`
|
||
`,n.header=n.header!==!1,n.includeEmptyRows=n.includeEmptyRows||!1,n.withBOM=n.withBOM||!1,n}preprocessFieldsInfo(t,n){return t.map(r=>{if(typeof r=="string")return{label:r,value:i=>Lj(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string"){const o=r.value;return{label:r.label||r.value,value:l=>Lj(l,o,i)}}if(typeof r.value=="function"){const o=r.label||r.value.name||"",l={label:o,default:i},c=r.value;return{label:o,value(f){const h=c(f,l);return h===void 0?i:h}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return aw(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(fk,[]),[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 aw(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 dk extends hJ{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((l,c)=>(Object.keys(c).forEach(f=>{l.includes(f)||l.push(f)}),l),[]),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(fk,[])}processData(t){return aw(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var lr;(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"})(lr||(lr={}));lr.QUOTATION_MARK+"",lr.QUOTATION_MARK,lr.REVERSE_SOLIDUS+"",lr.REVERSE_SOLIDUS,lr.SOLIDUS+"",lr.SOLIDUS,lr.LATIN_SMALL_LETTER_B+"",lr.BACKSPACE,lr.LATIN_SMALL_LETTER_F+"",lr.FORM_FEED,lr.LATIN_SMALL_LETTER_N+"",lr.NEWLINE,lr.LATIN_SMALL_LETTER_R+"",lr.CARRIAGE_RETURN,lr.LATIN_SMALL_LETTER_T+"",lr.TAB;var Dj;(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"})(Dj||(Dj={}));var kj;(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"})(kj||(kj={}));var Ij;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(Ij||(Ij={}));var zj;(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"})(zj||(zj={}));const dC=(e,t,n=1)=>ID(n,e+1).map(t),mJ=e=>Array.isArray(e)&&e.length===0||typeof e=="string"&&e===""||typeof e=="object"&&Object.keys(e).length===0,xu=e=>e!=null&&!mJ(e),kx=e=>e||null,ow=e=>e?"true":"false",Ix=e=>e===void 0?void 0:ow(e),pJ=e=>{if(e.length<2)return e[0]??"";const[t,...n]=e.reverse();return`${n.reverse().join(", ")} and ${t}`},Bj="[&]:p-0 [&]:md:w-1/4 [&]:rounded-none",gJ=({onChange:e,className:t})=>{const n=jn("qrCodes",Df),{color:r,bgColor:i}=n;return g.jsxs(Ot,{title:"Colors",className:t,bodyClassName:"flex flex-col gap-4",children:[g.jsx(ii,{label:"Default color:",helpText:g.jsxs(g.Fragment,{children:["QR codes will initially use ",g.jsx("b",{"data-testid":"color",children:r})," color."]}),type:"color",value:r,onChange:o=>e({...n,color:o.target.value}),inputClassName:Bj}),g.jsx(ii,{label:"Default background color:",helpText:g.jsxs(g.Fragment,{children:["QR codes will initially use ",g.jsx("b",{"data-testid":"bg-color",children:i})," background color."]}),type:"color",value:i,onChange:o=>e({...n,bgColor:o.target.value}),inputClassName:Bj})]})},hk=({errorCorrection:e,onChange:t})=>g.jsxs(Ue,{buttonContent:e?`Error correction (${e})`:g.jsx("i",{children:"Default error correction"}),buttonClassName:"w-full",children:[g.jsxs(Ue.Item,{selected:e==="L",onClick:()=>t("L"),children:[g.jsx("b",{children:"L"}),"ow"]}),g.jsxs(Ue.Item,{selected:e==="M",onClick:()=>t("M"),children:[g.jsx("b",{children:"M"}),"edium"]}),g.jsxs(Ue.Item,{selected:e==="Q",onClick:()=>t("Q"),children:[g.jsx("b",{children:"Q"}),"uartile"]}),g.jsxs(Ue.Item,{selected:e==="H",onClick:()=>t("H"),children:[g.jsx("b",{children:"H"}),"igh"]})]}),vJ=["png","svg","webp","jpeg"],mk=({format:e,onChange:t})=>g.jsx(Ue,{buttonContent:`Format (${e})`,buttonClassName:"w-full",children:vJ.map(n=>g.jsx(Ue.Item,{selected:e===n,onClick:()=>t(n),children:n},n))}),Vo=({className:e,size:t,...n})=>g.jsx("span",{className:Oe("text-gray-500 dark:text-gray-400",{"text-sm":t==="sm","text-lg":t==="lg"},e),...n}),yJ=({onChange:e})=>{const t=jn("qrCodes",Df),{format:n,errorCorrection:r}=t;return g.jsxs(Ot,{title:"Format",className:"card",bodyClassName:"flex flex-col gap-4",children:[g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx(mk,{format:n,onChange:i=>e({...t,format:i})}),g.jsxs(Vo,{size:"sm",children:["When downloading a QR code, it will use ",g.jsx("b",{"data-testid":"format",children:n})," format by default."]})]}),g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx(hk,{errorCorrection:r,onChange:i=>e({...t,errorCorrection:i})}),g.jsxs(Vo,{size:"sm",children:["QR codes will initially have a ",g.jsx("b",{"data-testid":"error-correction",children:r})," error correction."]})]})]})},bJ=({onChange:e,className:t})=>{const n=jn("qrCodes",Df),{size:r,margin:i}=n;return g.jsxs(Ot,{title:"Size",className:t,bodyClassName:"flex flex-col gap-4",children:[g.jsx(ii,{label:"Default dimensions:",helpText:g.jsxs(g.Fragment,{children:["QR codes will be initially generated with ",g.jsxs("b",{"data-testid":"size",children:[r,"x",r,"px"]}),"."]}),type:"range",value:r,step:10,min:50,max:1e3,onChange:o=>e({...n,size:Number(o.target.value)}),inputClassName:"[&]:p-0"}),g.jsx(ii,{label:"Default margin:",helpText:g.jsxs(g.Fragment,{children:["QR codes will be initially generated with a ",g.jsxs("b",{"data-testid":"margin",children:[i,"px"]})," margin."]}),type:"range",value:i,step:1,min:0,max:100,onChange:o=>e({...n,margin:Number(o.target.value)}),inputClassName:"[&]:p-0"})]})},dl=({children:e,helpText:t,"data-testid":n,...r})=>g.jsxs("div",{"data-testid":n,children:[g.jsxs(Sa,{className:"flex items-center gap-x-2",children:[g.jsx(rZ,{...r}),e]}),t&&g.jsx(Vo,{size:"sm","data-testid":n?`${n}-help-text`:"help-text",className:"pl-10",children:t})]}),xJ=({toggleRealTimeUpdates:e,onIntervalChange:t})=>{const{enabled:n,interval:r}=jn("realTimeUpdates",{enabled:!0});return g.jsxs(Ot,{title:"Real-time updates",className:"h-full",bodyClassName:"flex flex-col gap-y-4",children:[g.jsx(dl,{checked:n,onChange:e,helpText:g.jsxs(g.Fragment,{children:["Real-time updates are currently being ",g.jsx("b",{children:n?"processed":"ignored"}),"."]}),children:"Enable or disable real-time updates."}),g.jsxs("div",{children:[g.jsx(ii,{label:g.jsx("span",{className:Oe({"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&&g.jsx(Vo,{size:"sm",children:r?g.jsxs("span",{children:["Updates will be reflected in the UI every ",g.jsx("b",{children:r})," minute",r>1&&"s","."]}):"Updates will be reflected in the UI as soon as they happen."})]})]})},zx=e=>e==="includes"?"Suggest tags including input":"Suggest tags starting with input",_J=e=>e==="includes"?g.jsxs(g.Fragment,{children:["The list of suggested tags will contain those ",g.jsx("b",{children:"including"})," provided input."]}):g.jsxs(g.Fragment,{children:["The list of suggested tags will contain those ",g.jsx("b",{children:"starting with"})," provided input."]}),wJ=({onChange:e})=>{const t=jn("shortUrlCreation"),n=r=>()=>e({...t,tagFilteringMode:r});return g.jsxs(Ot,{title:"Short URLs form",className:"card",bodyClassName:"flex flex-col gap-4",children:[g.jsx(dl,{"data-testid":"forward-query",checked:t?.forwardQuery??!0,onChange:r=>e({...t,forwardQuery:r}),helpText:g.jsxs(g.Fragment,{children:["The initial state of the ",g.jsx("b",{children:"Forward query params on redirect"})," checkbox will be ",g.jsx("b",{children:t?.forwardQuery??!0?"checked":"unchecked"}),"."]}),children:"Make all new short URLs forward their query params to the long URL."}),g.jsxs("div",{className:"flex flex-col",children:[g.jsx(Sa,{className:"mb-1.5",children:"Tag suggestions search mode:"}),g.jsxs(Ue,{buttonContent:zx(t?.tagFilteringMode),buttonClassName:"w-full",children:[g.jsx(Ue.Item,{selected:!t?.tagFilteringMode||t.tagFilteringMode==="startsWith",onClick:n("startsWith"),children:zx("startsWith")}),g.jsx(Ue.Item,{selected:t?.tagFilteringMode==="includes",onClick:n("includes"),children:zx("includes")})]}),g.jsx(Vo,{size:"sm",className:"mt-0.5",children:_J(t?.tagFilteringMode)})]})]})},SJ={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},CJ=({onChange:e,defaultOrdering:t})=>{const n=jn("shortUrlsList"),r=n?.confirmDeletions??!0;return g.jsxs(Ot,{title:"Short URLs list",className:"card",bodyClassName:"flex flex-col gap-4",children:[g.jsx(dl,{checked:r,onChange:i=>e({...n,confirmDeletions:i}),helpText:g.jsxs(g.Fragment,{children:["When deleting a short URL, confirmation ",g.jsx("b",{children:r?"will":"won't"})," be required."]}),children:"Request confirmation before deleting a short URL."}),g.jsxs("div",{className:"flex flex-col gap-1.5",children:[g.jsx(Sa,{children:"Default ordering for short URLs list:"}),g.jsx(fm,{buttonClassName:"w-full",items:SJ,order:n?.defaultOrdering??t,onChange:i=>e({defaultOrdering:!i.dir&&!i.field?void 0:i})})]})]})},EJ={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},AJ=({onChange:e})=>{const t=jn("tags",{});return g.jsx(Ot,{title:"Tags",className:"card",children:g.jsxs("div",{className:"flex flex-col gap-1.5",children:[g.jsx(Sa,{children:"Default ordering for tags list:"}),g.jsx(fm,{buttonClassName:"w-full",items:EJ,order:t.defaultOrdering??{},onChange:n=>e({...t,defaultOrdering:!n.field&&!n.dir?void 0:n})})]})})},OJ=({onChange:e,_matchMedia:t})=>{const n=jn("ui"),r=_.useMemo(()=>n?.theme??qS(t),[n?.theme,t]);return g.jsxs(Ot,{title:"User interface",bodyClassName:"flex justify-between items-center",children:[g.jsx(dl,{checked:r==="dark",onChange:i=>e({...n,theme:i?"dark":"light"}),children:"Use dark theme."}),g.jsx(De,{icon:r==="dark"?oH:XV})]})},Uj={potentialBot:"Potential bot",date:"Date",country:"Country",region:"Region",city:"City",browser:"Browser",os:"OS",userAgent:"User agent",referer:"Referrer",visitedUrl:"Visited URL"},Jg={browser:["userAgent"],os:["userAgent"],userAgent:["browser","os"]};Object.freeze(Jg);const TJ=({onChange:e})=>{const t=jn("visitsList"),n=_.useMemo(()=>Rf(m0,t?.columns??{}),[t?.columns]),r=_.useCallback((i,o)=>{const l={...n,[i]:o};o&&Jg[i]?.forEach(c=>{l[c]=!1}),e({columns:l})},[n,e]);return g.jsxs(Ot,{title:"Visits list",children:[g.jsx("p",{className:"mb-2",children:"Columns to show in visits table:"}),g.jsx("ul",{className:"flex flex-col gap-y-1",children:Object.entries(Uj).map(([i,o])=>g.jsx("li",{children:g.jsx(dl,{checked:n[i],onChange:l=>r(i,l),children:g.jsxs("span",{className:"inline-flex gap-2",children:[o,Jg[i]&&g.jsxs(Vo,{children:["(excludes ",pJ(Jg[i].map(l=>Uj[l])),")"]})]})})},i))})]})},pk={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days"},jJ=(e,t)=>!e||e==="all"?t:pk[e],MJ=({onChange:e,active:t,allText:n})=>g.jsxs(Ue,{buttonContent:jJ(t,n),buttonClassName:"w-full",children:[g.jsx(Ue.Item,{selected:t==="all",onClick:()=>e("all"),children:n}),g.jsx(Ue.Separator,{}),Object.entries(pk).map(([r,i])=>g.jsx(Ue.Item,{selected:t===r,onClick:()=>e(r),children:i},r))]}),$j=e=>e?.defaultInterval??"last30Days",PJ=({onChange:e})=>{const t=jn("visits"),n=_.useCallback(({defaultInterval:r,...i})=>e({defaultInterval:r??$j(t),...i}),[e,t]);return g.jsxs(Ot,{title:"Visits",className:"card",bodyClassName:"flex flex-col gap-4",children:[g.jsx(dl,{"data-testid":"exclude-bots",checked:!!t?.excludeBots,onChange:r=>n({excludeBots:r}),helpText:g.jsxs(g.Fragment,{children:["The visits coming from potential bots will be ",g.jsx("b",{children:t?.excludeBots?"excluded":"included"}),"."]}),children:"Exclude bots wherever possible (this option‘s effect might depend on Shlink server‘s version)."}),g.jsx(dl,{"data-testid":"compare-visits",checked:!!t?.loadPrevInterval,onChange:r=>n({loadPrevInterval:r}),helpText:g.jsxs(g.Fragment,{children:["When loading visits, previous period ",g.jsx("b",{children:t?.loadPrevInterval?"will":"won't"})," be loaded by default."]}),children:"Compare visits with previous period."}),g.jsxs("div",{className:"flex flex-col",children:[g.jsx(Sa,{className:"mb-1.5",children:"Default interval to load on visits sections:"}),g.jsx(MJ,{allText:"All visits",active:$j(t),onChange:r=>n({defaultInterval:r})})]})]})},Jd=({children:e,className:t})=>g.jsx("div",{className:Oe("flex flex-col gap-4",t),children:e}),NJ=({settings:e,onUpdateSettings:t,defaultShortUrlsListOrdering:n})=>{const r=_.useCallback(f=>t?.(Rf(e,f)),[e,t]),i=_.useCallback(f=>r({realTimeUpdates:{enabled:f}}),[r]),o=_.useCallback(f=>r({realTimeUpdates:{interval:f}}),[r]),l=_.useCallback((f,h)=>r({[f]:h}),[r]),c=_.useCallback(f=>l("qrCodes",f),[l]);return g.jsxs(yk,{value:e,children:[g.jsxs(Ws,{className:"mb-4 sticky top-(--header-height) z-2",children:[g.jsx(Ws.Pill,{to:"../general",children:"General"}),g.jsx(Ws.Pill,{to:"../short-urls",children:"Short URLs"}),g.jsx(Ws.Pill,{to:"../visits",children:"Visits"}),g.jsx(Ws.Pill,{to:"../tags",children:"Tags"}),g.jsx(Ws.Pill,{to:"../qr-codes",children:"QR codes"})]}),g.jsxs(zy,{children:[g.jsx(lt,{path:"general",element:g.jsxs(Jd,{children:[g.jsx(OJ,{onChange:f=>l("ui",f)}),g.jsx(xJ,{toggleRealTimeUpdates:i,onIntervalChange:o})]})}),g.jsx(lt,{path:"short-urls",element:g.jsxs(Jd,{children:[g.jsx(wJ,{onChange:f=>l("shortUrlCreation",f)}),g.jsx(CJ,{defaultOrdering:n,onChange:f=>l("shortUrlsList",f)})]})}),g.jsx(lt,{path:"visits",element:g.jsxs(Jd,{children:[g.jsx(PJ,{onChange:f=>l("visits",f)}),g.jsx(TJ,{onChange:f=>l("visitsList",f)})]})}),g.jsx(lt,{path:"tags",element:g.jsx(Jd,{children:g.jsx(AJ,{onChange:f=>l("tags",f)})})}),g.jsx(lt,{path:"qr-codes",element:g.jsxs(Jd,{children:[g.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[g.jsx(bJ,{onChange:c,className:"w-full"}),g.jsx(gJ,{onChange:c,className:"w-full"})]}),g.jsx(yJ,{onChange:c})]})}),g.jsx(lt,{path:"*",element:g.jsx(mS,{replace:!0,to:"../general"})})]})]})},Df={size:300,margin:0,color:"#000000",bgColor:"#ffffff",errorCorrection:"L",format:"png"};Object.freeze(Df);const m0={potentialBot:!0,date:!0,country:!0,region:!1,city:!0,browser:!0,os:!0,userAgent:!1,referer:!0,visitedUrl:!0};Object.freeze(m0);const gk={realTimeUpdates:{enabled:!0},shortUrlCreation:{},visits:{defaultInterval:"last30Days"},visitsList:{columns:m0},shortUrlsList:{defaultOrdering:{field:"dateCreated",dir:"DESC"}},qrCodes:Df},vk=_.createContext(gk),{Provider:yk}=vk,hC=()=>_.useContext(vk)??gk;function jn(e,t){return hC()[e]??t}const mC=6048e5,LJ=864e5,bk=6e4,pC=36e5,Sg=43200,Fj=1440,Vj=Symbol.for("constructDateFrom");function xr(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Vj in e?e[Vj](t):e instanceof Date?new e.constructor(t):new Date(t)}function xt(e,t){return xr(t||e,e)}function gC(e,t,n){const r=xt(e,n?.in);return isNaN(t)?xr(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function RJ(e,t,n){const r=xt(e,n?.in);if(isNaN(t))return xr(e,NaN);if(!t)return r;const i=r.getDate(),o=xr(e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const l=o.getDate();return i>=l?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}function DJ(e,t,n){const{years:r=0,months:i=0,weeks:o=0,days:l=0,hours:c=0,minutes:f=0,seconds:h=0}=t,m=xt(e,n?.in),y=i||r?RJ(m,i+r*12):m,x=l||o?gC(y,l+o*7):y,b=f+c*60,C=(h+b*60)*1e3;return xr(e,+x+C)}let kJ={};function gm(){return kJ}function Du(e,t){const n=gm(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=xt(e,t?.in),o=i.getDay(),l=(o<r?7:0)+o-r;return i.setDate(i.getDate()-l),i.setHours(0,0,0,0),i}function $h(e,t){return Du(e,{...t,weekStartsOn:1})}function xk(e,t){const n=xt(e,t?.in),r=n.getFullYear(),i=xr(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const o=$h(i),l=xr(n,0);l.setFullYear(r,0,4),l.setHours(0,0,0,0);const c=$h(l);return n.getTime()>=o.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function pf(e){const t=xt(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 Zu(e,...t){const n=xr.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function ku(e,t){const n=xt(e,t?.in);return n.setHours(0,0,0,0),n}function p0(e,t,n){const[r,i]=Zu(n?.in,e,t),o=ku(r),l=ku(i),c=+o-pf(o),f=+l-pf(l);return Math.round((c-f)/LJ)}function IJ(e,t){const n=xk(e,t),r=xr(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),$h(r)}function _k(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=xr.bind(null,i));const o=xt(i,r);(!n||n<o||isNaN(+o))&&(n=o)}),xr(r,n||NaN)}function zJ(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=xr.bind(null,i));const o=xt(i,r);(!n||n>o||isNaN(+o))&&(n=o)}),xr(r,n||NaN)}function ev(e,t){const n=+xt(e)-+xt(t);return n<0?-1:n>0?1:n}function BJ(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function UJ(e){return!(!BJ(e)&&typeof e!="number"||isNaN(+xt(e)))}function Uv(e,t,n){const[r,i]=Zu(n?.in,e,t),o=r.getFullYear()-i.getFullYear(),l=r.getMonth()-i.getMonth();return o*12+l}function $J(e,t,n){const[r,i]=Zu(n?.in,e,t),o=Du(r,n),l=Du(i,n),c=+o-pf(o),f=+l-pf(l);return Math.round((c-f)/mC)}function wk(e,t,n){const[r,i]=Zu(n?.in,e,t),o=Hj(r,i),l=Math.abs(p0(r,i));r.setDate(r.getDate()-o*l);const c=+(Hj(r,i)===-o),f=o*(l-c);return f===0?0:f}function Hj(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 Sk(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function FJ(e,t,n){const[r,i]=Zu(n?.in,e,t),o=(+r-+i)/pC;return Sk(n?.roundingMethod)(o)}function VJ(e,t){return+xt(e)-+xt(t)}function gf(e,t){const n=xt(e,t?.in);return n.setHours(23,59,59,999),n}function HJ(e,t){const n=xt(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function qJ(e,t){const n=xt(e,t?.in);return+gf(n,t)==+HJ(n,t)}function GJ(e,t,n){const[r,i,o]=Zu(n?.in,e,e,t),l=ev(i,o),c=Math.abs(Uv(i,o));if(c<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-l*c);let f=ev(i,o)===-l;qJ(r)&&c===1&&ev(r,o)===1&&(f=!1);const h=l*(c-+f);return h===0?0:h}function YJ(e,t,n){const r=VJ(e,t)/1e3;return Sk(n?.roundingMethod)(r)}function WJ(e,t){const n=xt(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function KJ(e,t){const n=t?.weekStartsOn,r=xt(e,t?.in),i=r.getDay(),o=(i<n?-7:0)+6-(i-n);return r.setDate(r.getDate()+o),r.setHours(23,59,59,999),r}function ZJ(e,t){return KJ(e,{...t,weekStartsOn:1})}const XJ={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"}},QJ=(e,t,n)=>{let r;const i=XJ[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 Bx(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const JJ={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},eee={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},tee={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},nee={date:Bx({formats:JJ,defaultWidth:"full"}),time:Bx({formats:eee,defaultWidth:"full"}),dateTime:Bx({formats:tee,defaultWidth:"full"})},ree={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},iee=(e,t,n,r)=>ree[e];function eh(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,c=n?.width?String(n.width):l;i=e.formattingValues[c]||e.formattingValues[l]}else{const l=e.defaultWidth,c=n?.width?String(n.width):e.defaultWidth;i=e.values[c]||e.values[l]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const aee={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},oee={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},see={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"]},lee={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"]},uee={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"}},cee={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"}},fee=(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"},dee={ordinalNumber:fee,era:eh({values:aee,defaultWidth:"wide"}),quarter:eh({values:oee,defaultWidth:"wide",argumentCallback:e=>e-1}),month:eh({values:see,defaultWidth:"wide"}),day:eh({values:lee,defaultWidth:"wide"}),dayPeriod:eh({values:uee,defaultWidth:"wide",formattingValues:cee,defaultFormattingWidth:"wide"})};function th(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const l=o[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(c)?mee(c,y=>y.test(l)):hee(c,y=>y.test(l));let h;h=e.valueCallback?e.valueCallback(f):f,h=n.valueCallback?n.valueCallback(h):h;const m=t.slice(l.length);return{value:h,rest:m}}}function hee(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function mee(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function pee(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let l=e.valueCallback?e.valueCallback(o[0]):o[0];l=n.valueCallback?n.valueCallback(l):l;const c=t.slice(i.length);return{value:l,rest:c}}}const gee=/^(\d+)(th|st|nd|rd)?/i,vee=/\d+/i,yee={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},bee={any:[/^b/i,/^(a|c)/i]},xee={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},_ee={any:[/1/i,/2/i,/3/i,/4/i]},wee={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},See={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]},Cee={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},Eee={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]},Aee={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},Oee={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}},Tee={ordinalNumber:pee({matchPattern:gee,parsePattern:vee,valueCallback:e=>parseInt(e,10)}),era:th({matchPatterns:yee,defaultMatchWidth:"wide",parsePatterns:bee,defaultParseWidth:"any"}),quarter:th({matchPatterns:xee,defaultMatchWidth:"wide",parsePatterns:_ee,defaultParseWidth:"any",valueCallback:e=>e+1}),month:th({matchPatterns:wee,defaultMatchWidth:"wide",parsePatterns:See,defaultParseWidth:"any"}),day:th({matchPatterns:Cee,defaultMatchWidth:"wide",parsePatterns:Eee,defaultParseWidth:"any"}),dayPeriod:th({matchPatterns:Aee,defaultMatchWidth:"any",parsePatterns:Oee,defaultParseWidth:"any"})},Ck={code:"en-US",formatDistance:QJ,formatLong:nee,formatRelative:iee,localize:dee,match:Tee,options:{weekStartsOn:0,firstWeekContainsDate:1}};function jee(e,t){const n=xt(e,t?.in);return p0(n,WJ(n))+1}function Mee(e,t){const n=xt(e,t?.in),r=+$h(n)-+IJ(n);return Math.round(r/mC)+1}function Ek(e,t){const n=xt(e,t?.in),r=n.getFullYear(),i=gm(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=xr(t?.in||e,0);l.setFullYear(r+1,0,o),l.setHours(0,0,0,0);const c=Du(l,t),f=xr(t?.in||e,0);f.setFullYear(r,0,o),f.setHours(0,0,0,0);const h=Du(f,t);return+n>=+c?r+1:+n>=+h?r:r-1}function Pee(e,t){const n=gm(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Ek(e,t),o=xr(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),Du(o,t)}function Nee(e,t){const n=xt(e,t?.in),r=+Du(n,t)-+Pee(n,t);return Math.round(r/mC)+1}function bt(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 bt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):bt(n+1,2)},d(e,t){return bt(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];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return bt(e.getHours()%12||12,t.length)},H(e,t){return bt(e.getHours(),t.length)},m(e,t){return bt(e.getMinutes(),t.length)},s(e,t){return bt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return bt(i,t.length)}},Gc={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},qj={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"});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=Ek(e,r),o=i>0?i:1-i;if(t==="YY"){const l=o%100;return bt(l,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):bt(o,t.length)},R:function(e,t){const n=xk(e);return bt(n,t.length)},u:function(e,t){const n=e.getFullYear();return bt(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 bt(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"});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 bt(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"});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"});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 bt(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"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=Nee(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):bt(i,t.length)},I:function(e,t,n){const r=Mee(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):bt(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=jee(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):bt(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"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return bt(o,2);case"eo":return n.ordinalNumber(o,{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"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return bt(o,t.length);case"co":return n.ordinalNumber(o,{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"});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 bt(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"});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"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Gc.noon:r===0?i=Gc.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"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Gc.evening:r>=12?i=Gc.afternoon:r>=4?i=Gc.morning:i=Gc.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"});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"}):bt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):bt(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 Yj(r);case"XXXX":case"XX":return gu(r);default:return gu(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Yj(r);case"xxxx":case"xx":return gu(r);default:return gu(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Gj(r,":");default:return"GMT"+gu(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Gj(r,":");default:return"GMT"+gu(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return bt(r,t.length)},T:function(e,t,n){return bt(+e,t.length)}};function Gj(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+bt(o,2)}function Yj(e,t){return e%60===0?(e>0?"-":"+")+bt(Math.abs(e)/60,2):gu(e,t)}function gu(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=bt(Math.trunc(r/60),2),o=bt(r%60,2);return n+i+t+o}const Wj=(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"});default:return t.date({width:"full"})}},Ak=(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"});default:return t.time({width:"full"})}},Lee=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Wj(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Wj(r,t)).replace("{{time}}",Ak(i,t))},Ree={p:Ak,P:Lee},Dee=/^D+$/,kee=/^Y+$/,Iee=["D","DD","YY","YYYY"];function zee(e){return Dee.test(e)}function Bee(e){return kee.test(e)}function Uee(e,t,n){const r=$ee(e,t,n);if(console.warn(r),Iee.includes(e))throw new RangeError(r)}function $ee(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 Fee=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Vee=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Hee=/^'([^]*?)'?$/,qee=/''/g,Gee=/[a-zA-Z]/;function $v(e,t,n){const r=gm(),i=r.locale??Ck,o=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,l=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,c=xt(e,n?.in);if(!UJ(c))throw new RangeError("Invalid time value");let f=t.match(Vee).map(m=>{const y=m[0];if(y==="p"||y==="P"){const x=Ree[y];return x(m,i.formatLong)}return m}).join("").match(Fee).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const y=m[0];if(y==="'")return{isToken:!1,value:Yee(m)};if(qj[y])return{isToken:!0,value:m};if(y.match(Gee))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:m}});i.localize.preprocessor&&(f=i.localize.preprocessor(c,f));const h={firstWeekContainsDate:o,weekStartsOn:l,locale:i};return f.map(m=>{if(!m.isToken)return m.value;const y=m.value;(Bee(y)||zee(y))&&Uee(y,t,String(e));const x=qj[y[0]];return x(c,y,i.localize,h)}).join("")}function Yee(e){const t=e.match(Hee);return t?t[1].replace(qee,"'"):e}function Wee(e,t,n){const r=gm(),i=n?.locale??r.locale??Ck,o=2520,l=ev(e,t);if(isNaN(l))throw new RangeError("Invalid time value");const c=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:l}),[f,h]=Zu(n?.in,...l>0?[t,e]:[e,t]),m=YJ(h,f),y=(pf(h)-pf(f))/1e3,x=Math.round((m-y)/60);let b;if(x<2)return x===0?i.formatDistance("lessThanXMinutes",1,c):i.formatDistance("xMinutes",x,c);if(x<45)return i.formatDistance("xMinutes",x,c);if(x<90)return i.formatDistance("aboutXHours",1,c);if(x<Fj){const w=Math.round(x/60);return i.formatDistance("aboutXHours",w,c)}else{if(x<o)return i.formatDistance("xDays",1,c);if(x<Sg){const w=Math.round(x/Fj);return i.formatDistance("xDays",w,c)}else if(x<Sg*2)return b=Math.round(x/Sg),i.formatDistance("aboutXMonths",b,c)}if(b=GJ(h,f),b<12){const w=Math.round(x/Sg);return i.formatDistance("xMonths",w,c)}else{const w=b%12,C=Math.trunc(b/12);return w<3?i.formatDistance("aboutXYears",C,c):w<9?i.formatDistance("overXYears",C,c):i.formatDistance("almostXYears",C+1,c)}}function Kee(e,t){const n=xt(e,t?.in);if(isNaN(+n))throw new RangeError("Invalid time value");let r="",i="";const o="-",l=":";{const c=bt(n.getDate(),2),f=bt(n.getMonth()+1,2);r=`${bt(n.getFullYear(),4)}${o}${f}${o}${c}`}{const c=n.getTimezoneOffset();if(c!==0){const b=Math.abs(c),w=bt(Math.trunc(b/60),2),C=bt(b%60,2);i=`${c<0?"+":"-"}${w}:${C}`}else i="Z";const f=bt(n.getHours(),2),h=bt(n.getMinutes(),2),m=bt(n.getSeconds(),2),y=r===""?"":"T",x=[f,h,m].join(l);r=`${r}${y}${x}${i}`}return r}function Zee(e){return Math.trunc(+xt(e)/1e3)}function Xee(e,t){return+xt(e)>+xt(t)}function Fv(e,t){return+xt(e)<+xt(t)}function sw(e,t){return+xt(e)==+xt(t)}function Qee(e,t,n){const r=+xt(e,n?.in),[i,o]=[+xt(t.start,n?.in),+xt(t.end,n?.in)].sort((l,c)=>l-c);return r>=i&&r<=o}function Vv(e,t,n){return gC(e,-t,n)}function hl(e,t){const n=()=>xr(t?.in,NaN),i=nte(e);let o;if(i.date){const h=rte(i.date,2);o=ite(h.restDateString,h.year)}if(!o||isNaN(+o))return n();const l=+o;let c=0,f;if(i.time&&(c=ate(i.time),isNaN(c)))return n();if(i.timezone){if(f=ote(i.timezone),isNaN(f))return n()}else{const h=new Date(l+c),m=xt(0,t?.in);return m.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),m.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),m}return xt(l+c+f,t?.in)}const Cg={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Jee=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ete=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,tte=/^([+-])(\d{2})(?::?(\d{2}))?$/;function nte(e){const t={},n=e.split(Cg.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Cg.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Cg.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const i=Cg.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function rte(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,o=r[2]?parseInt(r[2]):null;return{year:o===null?i:o*100,restDateString:e.slice((r[1]||r[2]).length)}}function ite(e,t){if(t===null)return new Date(NaN);const n=e.match(Jee);if(!n)return new Date(NaN);const r=!!n[4],i=nh(n[1]),o=nh(n[2])-1,l=nh(n[3]),c=nh(n[4]),f=nh(n[5])-1;if(r)return fte(t,c,f)?ste(t,c,f):new Date(NaN);{const h=new Date(0);return!ute(t,o,l)||!cte(t,i)?new Date(NaN):(h.setUTCFullYear(t,o,Math.max(i,l)),h)}}function nh(e){return e?parseInt(e):1}function ate(e){const t=e.match(ete);if(!t)return NaN;const n=Ux(t[1]),r=Ux(t[2]),i=Ux(t[3]);return dte(n,r,i)?n*pC+r*bk+i*1e3:NaN}function Ux(e){return e&&parseFloat(e.replace(",","."))||0}function ote(e){if(e==="Z")return 0;const t=e.match(tte);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return hte(r,i)?n*(r*pC+i*bk):NaN}function ste(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const i=r.getUTCDay()||7,o=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}const lte=[31,null,31,30,31,30,31,31,30,31,30,31];function Ok(e){return e%400===0||e%4===0&&e%100!==0}function ute(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(lte[t]||(Ok(e)?29:28))}function cte(e,t){return t>=1&&t<=(Ok(e)?366:365)}function fte(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function dte(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function hte(e,t){return t>=0&&t<=59}const mte={AmazonBot:"amazonbot","Amazon Silk":"amazon_silk","Android Browser":"android",BaiduSpider:"baiduspider",Bada:"bada",BingCrawler:"bingcrawler",BlackBerry:"blackberry","ChatGPT-User":"chatgpt_user",Chrome:"chrome",ClaudeBot:"claudebot",Chromium:"chromium",Diffbot:"diffbot",DuckDuckBot:"duckduckbot",Electron:"electron",Epiphany:"epiphany",FacebookExternalHit:"facebookexternalhit",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot",GPTBot:"gptbot","Internet Explorer":"ie",InternetArchiveCrawler:"internetarchivecrawler","K-Meleon":"k_meleon",LibreWolf:"librewolf",Maxthon:"maxthon","Meta-ExternalAds":"meta_externalads","Meta-ExternalAgent":"meta_externalagent","Meta-ExternalFetcher":"meta_externalfetcher","Meta-WebIndexer":"meta_webindexer","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver","OAI-SearchBot":"oai_searchbot",Omgilibot:"omgilibot",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PerplexityBot:"perplexitybot","Perplexity-User":"perplexity_user",PhantomJS:"phantomjs",PingdomBot:"pingdombot",Puffin:"puffin",QQ:"qq",QQLite:"qqlite",QupZilla:"qupzilla",Roku:"roku",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir","Sogou Browser":"sogou",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat",YahooSlurp:"yahooslurp","Yandex Browser":"yandex",YandexBot:"yandexbot",YouBot:"youbot"},Tk={amazonbot:"AmazonBot",amazon_silk:"Amazon Silk",android:"Android Browser",baiduspider:"BaiduSpider",bada:"Bada",bingcrawler:"BingCrawler",blackberry:"BlackBerry",chatgpt_user:"ChatGPT-User",chrome:"Chrome",claudebot:"ClaudeBot",chromium:"Chromium",diffbot:"Diffbot",duckduckbot:"DuckDuckBot",edge:"Microsoft Edge",electron:"Electron",epiphany:"Epiphany",facebookexternalhit:"FacebookExternalHit",firefox:"Firefox",focus:"Focus",generic:"Generic",google_search:"Google Search",googlebot:"Googlebot",gptbot:"GPTBot",ie:"Internet Explorer",internetarchivecrawler:"InternetArchiveCrawler",k_meleon:"K-Meleon",librewolf:"LibreWolf",maxthon:"Maxthon",meta_externalads:"Meta-ExternalAds",meta_externalagent:"Meta-ExternalAgent",meta_externalfetcher:"Meta-ExternalFetcher",meta_webindexer:"Meta-WebIndexer",mz:"MZ Browser",naver:"NAVER Whale Browser",oai_searchbot:"OAI-SearchBot",omgilibot:"Omgilibot",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",perplexitybot:"PerplexityBot",perplexity_user:"Perplexity-User",phantomjs:"PhantomJS",pingdombot:"PingdomBot",puffin:"Puffin",qq:"QQ Browser",qqlite:"QQ Browser Lite",qupzilla:"QupZilla",roku:"Roku",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",sogou:"Sogou Browser",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yahooslurp:"YahooSlurp",yandex:"Yandex Browser",yandexbot:"YandexBot",youbot:"YouBot"},it={bot:"bot",desktop:"desktop",mobile:"mobile",tablet:"tablet",tv:"tv"},Ar={Android:"Android",Bada:"Bada",BlackBerry:"BlackBerry",ChromeOS:"Chrome OS",HarmonyOS:"HarmonyOS",iOS:"iOS",Linux:"Linux",MacOS:"macOS",PlayStation4:"PlayStation 4",Roku:"Roku",Tizen:"Tizen",WebOS:"WebOS",Windows:"Windows",WindowsPhone:"Windows Phone"},Gs={Blink:"Blink",EdgeHTML:"EdgeHTML",Gecko:"Gecko",Presto:"Presto",Trident:"Trident",WebKit:"WebKit"};class Ae{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(o=>parseInt(o,10)||0);n.push(0);const r=n[0],i=n[1];if(r===10)switch(i){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}switch(r){case 11:return"Big Sur";case 12:return"Monterey";case 13:return"Ventura";case 14:return"Sonoma";case 15:return"Sequoia";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=Ae.getVersionPrecision(t),o=Ae.getVersionPrecision(n);let l=Math.max(i,o),c=0;const f=Ae.map([t,n],h=>{const m=l-Ae.getVersionPrecision(h),y=h+new Array(m+1).join(".0");return Ae.map(y.split("."),x=>new Array(20-x.length).join("0")+x).reverse()});for(r&&(c=l-Math.min(i,o)),l-=1;l>=c;){if(f[0][l]>f[1][l])return 1;if(f[0][l]===f[1][l]){if(l===c)return 0;l-=1}else if(f[0][l]<f[1][l])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 o=t[r];if(n(o,r))return o}}static assign(t,...n){const r=t;let i,o;if(Object.assign)return Object.assign(t,...n);for(i=0,o=n.length;i<o;i+=1){const l=n[i];typeof l=="object"&&l!==null&&Object.keys(l).forEach(f=>{r[f]=l[f]})}return t}static getBrowserAlias(t){return mte[t]}static getBrowserTypeByAlias(t){return Tk[t]||""}}const rt=/version\/(\d+(\.?_?\d+)+)/i,pte=[{test:[/gptbot/i],describe(e){const t={name:"GPTBot"},n=Ae.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/chatgpt-user/i],describe(e){const t={name:"ChatGPT-User"},n=Ae.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/oai-searchbot/i],describe(e){const t={name:"OAI-SearchBot"},n=Ae.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe(e){const t={name:"ClaudeBot"},n=Ae.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/omgilibot/i,/webzio-extended/i],describe(e){const t={name:"Omgilibot"},n=Ae.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/diffbot/i],describe(e){const t={name:"Diffbot"},n=Ae.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/perplexitybot/i],describe(e){const t={name:"PerplexityBot"},n=Ae.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/perplexity-user/i],describe(e){const t={name:"Perplexity-User"},n=Ae.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/youbot/i],describe(e){const t={name:"YouBot"},n=Ae.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/meta-webindexer/i],describe(e){const t={name:"Meta-WebIndexer"},n=Ae.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/meta-externalads/i],describe(e){const t={name:"Meta-ExternalAds"},n=Ae.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/meta-externalagent/i],describe(e){const t={name:"Meta-ExternalAgent"},n=Ae.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/meta-externalfetcher/i],describe(e){const t={name:"Meta-ExternalFetcher"},n=Ae.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=Ae.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/amazonbot/i],describe(e){const t={name:"AmazonBot"},n=Ae.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/bingbot/i],describe(e){const t={name:"BingCrawler"},n=Ae.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/baiduspider/i],describe(e){const t={name:"BaiduSpider"},n=Ae.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/duckduckbot/i],describe(e){const t={name:"DuckDuckBot"},n=Ae.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/ia_archiver/i],describe(e){const t={name:"InternetArchiveCrawler"},n=Ae.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe(){return{name:"FacebookExternalHit"}}},{test:[/yahoo!?[\s/]*slurp/i],describe(){return{name:"YahooSlurp"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe(){return{name:"YandexBot"}}},{test:[/pingdom/i],describe(){return{name:"PingdomBot"}}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=Ae.getFirstMatch(rt,e)||Ae.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=Ae.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=Ae.getFirstMatch(rt,e)||Ae.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=Ae.getFirstMatch(rt,e)||Ae.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe(e){const t={name:"Pale Moon"},n=Ae.getFirstMatch(rt,e)||Ae.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=Ae.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=Ae.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=Ae.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=Ae.getFirstMatch(rt,e)||Ae.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=Ae.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=Ae.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=Ae.getFirstMatch(rt,e)||Ae.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=Ae.getFirstMatch(rt,e)||Ae.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=Ae.getFirstMatch(rt,e)||Ae.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=Ae.getFirstMatch(rt,e)||Ae.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=Ae.getFirstMatch(rt,e)||Ae.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=Ae.getFirstMatch(rt,e)||Ae.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=Ae.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||Ae.getFirstMatch(rt,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=Ae.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=Ae.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=Ae.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=Ae.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=Ae.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=Ae.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=Ae.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=Ae.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=Ae.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=Ae.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=Ae.getFirstMatch(rt,e)||Ae.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=Ae.getFirstMatch(rt,e)||Ae.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=Ae.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=Ae.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=Ae.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/librewolf/i],describe(e){const t={name:"LibreWolf"},n=Ae.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=Ae.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=Ae.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe(e){const t={name:"Sogou Browser"},n=Ae.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),r=Ae.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),i=Ae.getFirstMatch(/se ([\d.]+)x/i,e),o=n||r||i;return o&&(t.version=o),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=Ae.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=Ae.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=Ae.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=Ae.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=Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=Ae.getFirstMatch(rt,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,i=e.search("\\(")!==-1?n:t;return{name:Ae.getFirstMatch(i,e),version:Ae.getSecondMatch(i,e)}}}],gte=[{test:[/Roku\/DVP/],describe(e){const t=Ae.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Ar.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=Ae.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Ar.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=Ae.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=Ae.getWindowsVersionName(t);return{name:Ar.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:Ar.iOS},n=Ae.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=Ae.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=Ae.getMacOSVersionName(t),r={name:Ar.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=Ae.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:Ar.iOS,version:t}}},{test:[/OpenHarmony/i],describe(e){const t=Ae.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,e);return{name:Ar.HarmonyOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=Ae.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=Ae.getAndroidVersionName(t),r={name:Ar.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=Ae.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:Ar.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=Ae.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||Ae.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||Ae.getFirstMatch(/\bbb(\d+)/i,e);return{name:Ar.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=Ae.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Ar.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=Ae.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:Ar.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:Ar.Linux}}},{test:[/CrOS/],describe(){return{name:Ar.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=Ae.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:Ar.PlayStation4,version:t}}}],vte=[{test:[/googlebot/i],describe(){return{type:it.bot,vendor:"Google"}}},{test:[/amazonbot/i],describe(){return{type:it.bot,vendor:"Amazon"}}},{test:[/gptbot/i],describe(){return{type:it.bot,vendor:"OpenAI"}}},{test:[/chatgpt-user/i],describe(){return{type:it.bot,vendor:"OpenAI"}}},{test:[/oai-searchbot/i],describe(){return{type:it.bot,vendor:"OpenAI"}}},{test:[/baiduspider/i],describe(){return{type:it.bot,vendor:"Baidu"}}},{test:[/bingbot/i],describe(){return{type:it.bot,vendor:"Bing"}}},{test:[/duckduckbot/i],describe(){return{type:it.bot,vendor:"DuckDuckGo"}}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe(){return{type:it.bot,vendor:"Anthropic"}}},{test:[/omgilibot/i,/webzio-extended/i],describe(){return{type:it.bot,vendor:"Webz.io"}}},{test:[/diffbot/i],describe(){return{type:it.bot,vendor:"Diffbot"}}},{test:[/perplexitybot/i],describe(){return{type:it.bot,vendor:"Perplexity AI"}}},{test:[/perplexity-user/i],describe(){return{type:it.bot,vendor:"Perplexity AI"}}},{test:[/youbot/i],describe(){return{type:it.bot,vendor:"You.com"}}},{test:[/ia_archiver/i],describe(){return{type:it.bot,vendor:"Internet Archive"}}},{test:[/meta-webindexer/i],describe(){return{type:it.bot,vendor:"Meta"}}},{test:[/meta-externalads/i],describe(){return{type:it.bot,vendor:"Meta"}}},{test:[/meta-externalagent/i],describe(){return{type:it.bot,vendor:"Meta"}}},{test:[/meta-externalfetcher/i],describe(){return{type:it.bot,vendor:"Meta"}}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe(){return{type:it.bot,vendor:"Meta"}}},{test:[/yahoo/i],describe(){return{type:it.bot,vendor:"Yahoo"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe(){return{type:it.bot,vendor:"Yandex"}}},{test:[/pingdom/i],describe(){return{type:it.bot,vendor:"Pingdom"}}},{test:[/huawei/i],describe(e){const t=Ae.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:it.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:it.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:it.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:it.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:it.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:it.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:it.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=Ae.getFirstMatch(/(ipod|iphone)/i,e);return{type:it.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:it.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe(e){const t=Ae.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:it.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe(){return{type:it.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:it.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:it.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:it.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:it.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:it.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:it.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:it.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:it.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:it.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:it.tv}}}],yte=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:Gs.Blink};const n=Ae.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Gs.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:Gs.Trident},n=Ae.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:Gs.Presto},n=Ae.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:Gs.Gecko},n=Ae.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Gs.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:Gs.WebKit},n=Ae.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class Kj{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=Ae.find(pte,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=Ae.find(gte,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=Ae.find(vte,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=Ae.find(yte,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 Ae.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach(c=>{const f=t[c];typeof f=="string"?(i[c]=f,o+=1):typeof f=="object"&&(n[c]=f,r+=1)}),r>0){const c=Object.keys(n),f=Ae.find(c,m=>this.isOS(m));if(f){const m=this.satisfies(n[f]);if(m!==void 0)return m}const h=Ae.find(c,m=>this.isPlatform(m));if(h){const m=this.satisfies(n[h]);if(m!==void 0)return m}}if(o>0){const c=Object.keys(i),f=Ae.find(c,h=>this.isBrowser(h,!0));if(f!==void 0)return this.compareVersion(i[f])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=Ae.getBrowserTypeByAlias(i);return n&&o&&(i=o.toLowerCase()),i===r}compareVersion(t){let n=[0],r=t,i=!1;const o=this.getBrowserVersion();if(typeof o=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(i=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(i=!0,r=t.substr(1)),n.indexOf(Ae.compareVersions(o,r,i))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(n=>this.is(n))}}class bte{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new Kj(t,n)}static parse(t){return new Kj(t).getResult()}static get BROWSER_MAP(){return Tk}static get ENGINE_MAP(){return Gs}static get OS_MAP(){return Ar}static get PLATFORMS_MAP(){return it}}const vC={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(vC);var tv={exports:{}},xte=tv.exports,Zj;function _te(){return Zj||(Zj=1,(function(e,t){(function(n,r){e.exports=r()})(xte,(()=>(()=>{var n={873:(l,c)=>{var f,h,m=(function(){var y=function(ie,ue){var Y=ie,I=T[ue],z=null,H=0,k=null,M=[],q={},ee=function(V,X){z=(function(te){for(var he=new Array(te),xe=0;xe<te;xe+=1){he[xe]=new Array(te);for(var Le=0;Le<te;Le+=1)he[xe][Le]=null}return he})(H=4*Y+17),se(0,0),se(H-7,0),se(0,H-7),de(),me(),D(V,X),Y>=7&&be(V),k==null&&(k=G(Y,I,M)),R(k,X)},se=function(V,X){for(var te=-1;te<=7;te+=1)if(!(V+te<=-1||H<=V+te))for(var he=-1;he<=7;he+=1)X+he<=-1||H<=X+he||(z[V+te][X+he]=0<=te&&te<=6&&(he==0||he==6)||0<=he&&he<=6&&(te==0||te==6)||2<=te&&te<=4&&2<=he&&he<=4)},me=function(){for(var V=8;V<H-8;V+=1)z[V][6]==null&&(z[V][6]=V%2==0);for(var X=8;X<H-8;X+=1)z[6][X]==null&&(z[6][X]=X%2==0)},de=function(){for(var V=P.getPatternPosition(Y),X=0;X<V.length;X+=1)for(var te=0;te<V.length;te+=1){var he=V[X],xe=V[te];if(z[he][xe]==null)for(var Le=-2;Le<=2;Le+=1)for(var ke=-2;ke<=2;ke+=1)z[he+Le][xe+ke]=Le==-2||Le==2||ke==-2||ke==2||Le==0&&ke==0}},be=function(V){for(var X=P.getBCHTypeNumber(Y),te=0;te<18;te+=1){var he=!V&&(X>>te&1)==1;z[Math.floor(te/3)][te%3+H-8-3]=he}for(te=0;te<18;te+=1)he=!V&&(X>>te&1)==1,z[te%3+H-8-3][Math.floor(te/3)]=he},D=function(V,X){for(var te=I<<3|X,he=P.getBCHTypeInfo(te),xe=0;xe<15;xe+=1){var Le=!V&&(he>>xe&1)==1;xe<6?z[xe][8]=Le:xe<8?z[xe+1][8]=Le:z[H-15+xe][8]=Le}for(xe=0;xe<15;xe+=1)Le=!V&&(he>>xe&1)==1,xe<8?z[8][H-xe-1]=Le:xe<9?z[8][15-xe-1+1]=Le:z[8][15-xe-1]=Le;z[H-8][8]=!V},R=function(V,X){for(var te=-1,he=H-1,xe=7,Le=0,ke=P.getMaskFunction(X),We=H-1;We>0;We-=2)for(We==6&&(We-=1);;){for(var Je=0;Je<2;Je+=1)if(z[he][We-Je]==null){var Ke=!1;Le<V.length&&(Ke=(V[Le]>>>xe&1)==1),ke(he,We-Je)&&(Ke=!Ke),z[he][We-Je]=Ke,(xe-=1)==-1&&(Le+=1,xe=7)}if((he+=te)<0||H<=he){he-=te,te=-te;break}}},G=function(V,X,te){for(var he=B.getRSBlocks(V,X),xe=W(),Le=0;Le<te.length;Le+=1){var ke=te[Le];xe.put(ke.getMode(),4),xe.put(ke.getLength(),P.getLengthInBits(ke.getMode(),V)),ke.write(xe)}var We=0;for(Le=0;Le<he.length;Le+=1)We+=he[Le].dataCount;if(xe.getLengthInBits()>8*We)throw"code length overflow. ("+xe.getLengthInBits()+">"+8*We+")";for(xe.getLengthInBits()+4<=8*We&&xe.put(0,4);xe.getLengthInBits()%8!=0;)xe.putBit(!1);for(;!(xe.getLengthInBits()>=8*We||(xe.put(236,8),xe.getLengthInBits()>=8*We));)xe.put(17,8);return(function(Je,Ke){for(var at=0,zt=0,mt=0,Lt=new Array(Ke.length),ht=new Array(Ke.length),Qe=0;Qe<Ke.length;Qe+=1){var Rt=Ke[Qe].dataCount,vn=Ke[Qe].totalCount-Rt;zt=Math.max(zt,Rt),mt=Math.max(mt,vn),Lt[Qe]=new Array(Rt);for(var nt=0;nt<Lt[Qe].length;nt+=1)Lt[Qe][nt]=255&Je.getBuffer()[nt+at];at+=Rt;var Hn=P.getErrorCorrectPolynomial(vn),qn=F(Lt[Qe],Hn.getLength()-1).mod(Hn);for(ht[Qe]=new Array(Hn.getLength()-1),nt=0;nt<ht[Qe].length;nt+=1){var Jt=nt+qn.getLength()-ht[Qe].length;ht[Qe][nt]=Jt>=0?qn.getAt(Jt):0}}var Cn=0;for(nt=0;nt<Ke.length;nt+=1)Cn+=Ke[nt].totalCount;var dr=new Array(Cn),Gt=0;for(nt=0;nt<zt;nt+=1)for(Qe=0;Qe<Ke.length;Qe+=1)nt<Lt[Qe].length&&(dr[Gt]=Lt[Qe][nt],Gt+=1);for(nt=0;nt<mt;nt+=1)for(Qe=0;Qe<Ke.length;Qe+=1)nt<ht[Qe].length&&(dr[Gt]=ht[Qe][nt],Gt+=1);return dr})(xe,he)};q.addData=function(V,X){var te=null;switch(X=X||"Byte"){case"Numeric":te=Q(V);break;case"Alphanumeric":te=re(V);break;case"Byte":te=ce(V);break;case"Kanji":te=ae(V);break;default:throw"mode:"+X}M.push(te),k=null},q.isDark=function(V,X){if(V<0||H<=V||X<0||H<=X)throw V+","+X;return z[V][X]},q.getModuleCount=function(){return H},q.make=function(){if(Y<1){for(var V=1;V<40;V++){for(var X=B.getRSBlocks(V,I),te=W(),he=0;he<M.length;he++){var xe=M[he];te.put(xe.getMode(),4),te.put(xe.getLength(),P.getLengthInBits(xe.getMode(),V)),xe.write(te)}var Le=0;for(he=0;he<X.length;he++)Le+=X[he].dataCount;if(te.getLengthInBits()<=8*Le)break}Y=V}ee(!1,(function(){for(var ke=0,We=0,Je=0;Je<8;Je+=1){ee(!0,Je);var Ke=P.getLostPoint(q);(Je==0||ke>Ke)&&(ke=Ke,We=Je)}return We})())},q.createTableTag=function(V,X){V=V||2;var te="";te+='<table style="',te+=" border-width: 0px; border-style: none;",te+=" border-collapse: collapse;",te+=" padding: 0px; margin: "+(X=X===void 0?4*V:X)+"px;",te+='">',te+="<tbody>";for(var he=0;he<q.getModuleCount();he+=1){te+="<tr>";for(var xe=0;xe<q.getModuleCount();xe+=1)te+='<td style="',te+=" border-width: 0px; border-style: none;",te+=" border-collapse: collapse;",te+=" padding: 0px; margin: 0px;",te+=" width: "+V+"px;",te+=" height: "+V+"px;",te+=" background-color: ",te+=q.isDark(he,xe)?"#000000":"#ffffff",te+=";",te+='"/>';te+="</tr>"}return(te+="</tbody>")+"</table>"},q.createSvgTag=function(V,X,te,he){var xe={};typeof arguments[0]=="object"&&(V=(xe=arguments[0]).cellSize,X=xe.margin,te=xe.alt,he=xe.title),V=V||2,X=X===void 0?4*V:X,(te=typeof te=="string"?{text:te}:te||{}).text=te.text||null,te.id=te.text?te.id||"qrcode-description":null,(he=typeof he=="string"?{text:he}:he||{}).text=he.text||null,he.id=he.text?he.id||"qrcode-title":null;var Le,ke,We,Je,Ke=q.getModuleCount()*V+2*X,at="";for(Je="l"+V+",0 0,"+V+" -"+V+",0 0,-"+V+"z ",at+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',at+=xe.scalable?"":' width="'+Ke+'px" height="'+Ke+'px"',at+=' viewBox="0 0 '+Ke+" "+Ke+'" ',at+=' preserveAspectRatio="xMinYMin meet"',at+=he.text||te.text?' role="img" aria-labelledby="'+ne([he.id,te.id].join(" ").trim())+'"':"",at+=">",at+=he.text?'<title id="'+ne(he.id)+'">'+ne(he.text)+"</title>":"",at+=te.text?'<description id="'+ne(te.id)+'">'+ne(te.text)+"</description>":"",at+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',at+='<path d="',ke=0;ke<q.getModuleCount();ke+=1)for(We=ke*V+X,Le=0;Le<q.getModuleCount();Le+=1)q.isDark(ke,Le)&&(at+="M"+(Le*V+X)+","+We+Je);return(at+='" stroke="transparent" fill="black"/>')+"</svg>"},q.createDataURL=function(V,X){V=V||2,X=X===void 0?4*V:X;var te=q.getModuleCount()*V+2*X,he=X,xe=te-X;return ve(te,te,(function(Le,ke){if(he<=Le&&Le<xe&&he<=ke&&ke<xe){var We=Math.floor((Le-he)/V),Je=Math.floor((ke-he)/V);return q.isDark(Je,We)?0:1}return 1}))},q.createImgTag=function(V,X,te){V=V||2,X=X===void 0?4*V:X;var he=q.getModuleCount()*V+2*X,xe="";return xe+="<img",xe+=' src="',xe+=q.createDataURL(V,X),xe+='"',xe+=' width="',xe+=he,xe+='"',xe+=' height="',xe+=he,xe+='"',te&&(xe+=' alt="',xe+=ne(te),xe+='"'),xe+"/>"};var ne=function(V){for(var X="",te=0;te<V.length;te+=1){var he=V.charAt(te);switch(he){case"<":X+="<";break;case">":X+=">";break;case"&":X+="&";break;case'"':X+=""";break;default:X+=he}}return X};return q.createASCII=function(V,X){if((V=V||1)<2)return(function(Lt){Lt=Lt===void 0?2:Lt;var ht,Qe,Rt,vn,nt,Hn=1*q.getModuleCount()+2*Lt,qn=Lt,Jt=Hn-Lt,Cn={"██":"█","█ ":"▀"," █":"▄"," ":" "},dr={"██":"▀","█ ":"▀"," █":" "," ":" "},Gt="";for(ht=0;ht<Hn;ht+=2){for(Rt=Math.floor((ht-qn)/1),vn=Math.floor((ht+1-qn)/1),Qe=0;Qe<Hn;Qe+=1)nt="█",qn<=Qe&&Qe<Jt&&qn<=ht&&ht<Jt&&q.isDark(Rt,Math.floor((Qe-qn)/1))&&(nt=" "),qn<=Qe&&Qe<Jt&&qn<=ht+1&&ht+1<Jt&&q.isDark(vn,Math.floor((Qe-qn)/1))?nt+=" ":nt+="█",Gt+=Lt<1&&ht+1>=Jt?dr[nt]:Cn[nt];Gt+=`
|
||
`}return Hn%2&&Lt>0?Gt.substring(0,Gt.length-Hn-1)+Array(Hn+1).join("▀"):Gt.substring(0,Gt.length-1)})(X);V-=1,X=X===void 0?2*V:X;var te,he,xe,Le,ke=q.getModuleCount()*V+2*X,We=X,Je=ke-X,Ke=Array(V+1).join("██"),at=Array(V+1).join(" "),zt="",mt="";for(te=0;te<ke;te+=1){for(xe=Math.floor((te-We)/V),mt="",he=0;he<ke;he+=1)Le=1,We<=he&&he<Je&&We<=te&&te<Je&&q.isDark(xe,Math.floor((he-We)/V))&&(Le=0),mt+=Le?Ke:at;for(xe=0;xe<V;xe+=1)zt+=mt+`
|
||
`}return zt.substring(0,zt.length-1)},q.renderTo2dContext=function(V,X){X=X||2;for(var te=q.getModuleCount(),he=0;he<te;he++)for(var xe=0;xe<te;xe++)V.fillStyle=q.isDark(he,xe)?"black":"white",V.fillRect(he*X,xe*X,X,X)},q};y.stringToBytes=(y.stringToBytesFuncs={default:function(ie){for(var ue=[],Y=0;Y<ie.length;Y+=1){var I=ie.charCodeAt(Y);ue.push(255&I)}return ue}}).default,y.createStringToBytes=function(ie,ue){var Y=(function(){for(var z=oe(ie),H=function(){var me=z.read();if(me==-1)throw"eof";return me},k=0,M={};;){var q=z.read();if(q==-1)break;var ee=H(),se=H()<<8|H();M[String.fromCharCode(q<<8|ee)]=se,k+=1}if(k!=ue)throw k+" != "+ue;return M})(),I=63;return function(z){for(var H=[],k=0;k<z.length;k+=1){var M=z.charCodeAt(k);if(M<128)H.push(M);else{var q=Y[z.charAt(k)];typeof q=="number"?(255&q)==q?H.push(q):(H.push(q>>>8),H.push(255&q)):H.push(I)}}return H}};var x,b,w,C,O,T={L:1,M:0,Q:3,H:2},P=(x=[[],[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]],b=1335,w=7973,O=function(ie){for(var ue=0;ie!=0;)ue+=1,ie>>>=1;return ue},(C={}).getBCHTypeInfo=function(ie){for(var ue=ie<<10;O(ue)-O(b)>=0;)ue^=b<<O(ue)-O(b);return 21522^(ie<<10|ue)},C.getBCHTypeNumber=function(ie){for(var ue=ie<<12;O(ue)-O(w)>=0;)ue^=w<<O(ue)-O(w);return ie<<12|ue},C.getPatternPosition=function(ie){return x[ie-1]},C.getMaskFunction=function(ie){switch(ie){case 0:return function(ue,Y){return(ue+Y)%2==0};case 1:return function(ue,Y){return ue%2==0};case 2:return function(ue,Y){return Y%3==0};case 3:return function(ue,Y){return(ue+Y)%3==0};case 4:return function(ue,Y){return(Math.floor(ue/2)+Math.floor(Y/3))%2==0};case 5:return function(ue,Y){return ue*Y%2+ue*Y%3==0};case 6:return function(ue,Y){return(ue*Y%2+ue*Y%3)%2==0};case 7:return function(ue,Y){return(ue*Y%3+(ue+Y)%2)%2==0};default:throw"bad maskPattern:"+ie}},C.getErrorCorrectPolynomial=function(ie){for(var ue=F([1],0),Y=0;Y<ie;Y+=1)ue=ue.multiply(F([1,N.gexp(Y)],0));return ue},C.getLengthInBits=function(ie,ue){if(1<=ue&&ue<10)switch(ie){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+ie}else if(ue<27)switch(ie){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+ie}else{if(!(ue<41))throw"type:"+ue;switch(ie){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+ie}}},C.getLostPoint=function(ie){for(var ue=ie.getModuleCount(),Y=0,I=0;I<ue;I+=1)for(var z=0;z<ue;z+=1){for(var H=0,k=ie.isDark(I,z),M=-1;M<=1;M+=1)if(!(I+M<0||ue<=I+M))for(var q=-1;q<=1;q+=1)z+q<0||ue<=z+q||M==0&&q==0||k==ie.isDark(I+M,z+q)&&(H+=1);H>5&&(Y+=3+H-5)}for(I=0;I<ue-1;I+=1)for(z=0;z<ue-1;z+=1){var ee=0;ie.isDark(I,z)&&(ee+=1),ie.isDark(I+1,z)&&(ee+=1),ie.isDark(I,z+1)&&(ee+=1),ie.isDark(I+1,z+1)&&(ee+=1),ee!=0&&ee!=4||(Y+=3)}for(I=0;I<ue;I+=1)for(z=0;z<ue-6;z+=1)ie.isDark(I,z)&&!ie.isDark(I,z+1)&&ie.isDark(I,z+2)&&ie.isDark(I,z+3)&&ie.isDark(I,z+4)&&!ie.isDark(I,z+5)&&ie.isDark(I,z+6)&&(Y+=40);for(z=0;z<ue;z+=1)for(I=0;I<ue-6;I+=1)ie.isDark(I,z)&&!ie.isDark(I+1,z)&&ie.isDark(I+2,z)&&ie.isDark(I+3,z)&&ie.isDark(I+4,z)&&!ie.isDark(I+5,z)&&ie.isDark(I+6,z)&&(Y+=40);var se=0;for(z=0;z<ue;z+=1)for(I=0;I<ue;I+=1)ie.isDark(I,z)&&(se+=1);return Y+Math.abs(100*se/ue/ue-50)/5*10},C),N=(function(){for(var ie=new Array(256),ue=new Array(256),Y=0;Y<8;Y+=1)ie[Y]=1<<Y;for(Y=8;Y<256;Y+=1)ie[Y]=ie[Y-4]^ie[Y-5]^ie[Y-6]^ie[Y-8];for(Y=0;Y<255;Y+=1)ue[ie[Y]]=Y;return{glog:function(I){if(I<1)throw"glog("+I+")";return ue[I]},gexp:function(I){for(;I<0;)I+=255;for(;I>=256;)I-=255;return ie[I]}}})();function F(ie,ue){if(ie.length===void 0)throw ie.length+"/"+ue;var Y=(function(){for(var z=0;z<ie.length&&ie[z]==0;)z+=1;for(var H=new Array(ie.length-z+ue),k=0;k<ie.length-z;k+=1)H[k]=ie[k+z];return H})(),I={getAt:function(z){return Y[z]},getLength:function(){return Y.length},multiply:function(z){for(var H=new Array(I.getLength()+z.getLength()-1),k=0;k<I.getLength();k+=1)for(var M=0;M<z.getLength();M+=1)H[k+M]^=N.gexp(N.glog(I.getAt(k))+N.glog(z.getAt(M)));return F(H,0)},mod:function(z){if(I.getLength()-z.getLength()<0)return I;for(var H=N.glog(I.getAt(0))-N.glog(z.getAt(0)),k=new Array(I.getLength()),M=0;M<I.getLength();M+=1)k[M]=I.getAt(M);for(M=0;M<z.getLength();M+=1)k[M]^=N.gexp(N.glog(z.getAt(M))+H);return F(k,0).mod(z)}};return I}var B=(function(){var ie=[[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]],ue=function(I,z){var H={};return H.totalCount=I,H.dataCount=z,H},Y={getRSBlocks:function(I,z){var H=(function(be,D){switch(D){case T.L:return ie[4*(be-1)+0];case T.M:return ie[4*(be-1)+1];case T.Q:return ie[4*(be-1)+2];case T.H:return ie[4*(be-1)+3];default:return}})(I,z);if(H===void 0)throw"bad rs block @ typeNumber:"+I+"/errorCorrectionLevel:"+z;for(var k=H.length/3,M=[],q=0;q<k;q+=1)for(var ee=H[3*q+0],se=H[3*q+1],me=H[3*q+2],de=0;de<ee;de+=1)M.push(ue(se,me));return M}};return Y})(),W=function(){var ie=[],ue=0,Y={getBuffer:function(){return ie},getAt:function(I){var z=Math.floor(I/8);return(ie[z]>>>7-I%8&1)==1},put:function(I,z){for(var H=0;H<z;H+=1)Y.putBit((I>>>z-H-1&1)==1)},getLengthInBits:function(){return ue},putBit:function(I){var z=Math.floor(ue/8);ie.length<=z&&ie.push(0),I&&(ie[z]|=128>>>ue%8),ue+=1}};return Y},Q=function(ie){var ue=ie,Y={getMode:function(){return 1},getLength:function(H){return ue.length},write:function(H){for(var k=ue,M=0;M+2<k.length;)H.put(I(k.substring(M,M+3)),10),M+=3;M<k.length&&(k.length-M==1?H.put(I(k.substring(M,M+1)),4):k.length-M==2&&H.put(I(k.substring(M,M+2)),7))}},I=function(H){for(var k=0,M=0;M<H.length;M+=1)k=10*k+z(H.charAt(M));return k},z=function(H){if("0"<=H&&H<="9")return H.charCodeAt(0)-48;throw"illegal char :"+H};return Y},re=function(ie){var ue=ie,Y={getMode:function(){return 2},getLength:function(z){return ue.length},write:function(z){for(var H=ue,k=0;k+1<H.length;)z.put(45*I(H.charAt(k))+I(H.charAt(k+1)),11),k+=2;k<H.length&&z.put(I(H.charAt(k)),6)}},I=function(z){if("0"<=z&&z<="9")return z.charCodeAt(0)-48;if("A"<=z&&z<="Z")return z.charCodeAt(0)-65+10;switch(z){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 :"+z}};return Y},ce=function(ie){var ue=y.stringToBytes(ie);return{getMode:function(){return 4},getLength:function(Y){return ue.length},write:function(Y){for(var I=0;I<ue.length;I+=1)Y.put(ue[I],8)}}},ae=function(ie){var ue=y.stringToBytesFuncs.SJIS;if(!ue)throw"sjis not supported.";(function(){var z=ue("友");if(z.length!=2||(z[0]<<8|z[1])!=38726)throw"sjis not supported."})();var Y=ue(ie),I={getMode:function(){return 8},getLength:function(z){return~~(Y.length/2)},write:function(z){for(var H=Y,k=0;k+1<H.length;){var M=(255&H[k])<<8|255&H[k+1];if(33088<=M&&M<=40956)M-=33088;else{if(!(57408<=M&&M<=60351))throw"illegal char at "+(k+1)+"/"+M;M-=49472}M=192*(M>>>8&255)+(255&M),z.put(M,13),k+=2}if(k<H.length)throw"illegal char at "+(k+1)}};return I},J=function(){var ie=[],ue={writeByte:function(Y){ie.push(255&Y)},writeShort:function(Y){ue.writeByte(Y),ue.writeByte(Y>>>8)},writeBytes:function(Y,I,z){I=I||0,z=z||Y.length;for(var H=0;H<z;H+=1)ue.writeByte(Y[H+I])},writeString:function(Y){for(var I=0;I<Y.length;I+=1)ue.writeByte(Y.charCodeAt(I))},toByteArray:function(){return ie},toString:function(){var Y="";Y+="[";for(var I=0;I<ie.length;I+=1)I>0&&(Y+=","),Y+=ie[I];return Y+"]"}};return ue},oe=function(ie){var ue=ie,Y=0,I=0,z=0,H={read:function(){for(;z<8;){if(Y>=ue.length){if(z==0)return-1;throw"unexpected end of file./"+z}var M=ue.charAt(Y);if(Y+=1,M=="=")return z=0,-1;M.match(/^\s$/)||(I=I<<6|k(M.charCodeAt(0)),z+=6)}var q=I>>>z-8&255;return z-=8,q}},k=function(M){if(65<=M&&M<=90)return M-65;if(97<=M&&M<=122)return M-97+26;if(48<=M&&M<=57)return M-48+52;if(M==43)return 62;if(M==47)return 63;throw"c:"+M};return H},ve=function(ie,ue,Y){for(var I=(function(se,me){var de=se,be=me,D=new Array(se*me),R={setPixel:function(V,X,te){D[X*de+V]=te},write:function(V){V.writeString("GIF87a"),V.writeShort(de),V.writeShort(be),V.writeByte(128),V.writeByte(0),V.writeByte(0),V.writeByte(0),V.writeByte(0),V.writeByte(0),V.writeByte(255),V.writeByte(255),V.writeByte(255),V.writeString(","),V.writeShort(0),V.writeShort(0),V.writeShort(de),V.writeShort(be),V.writeByte(0);var X=G(2);V.writeByte(2);for(var te=0;X.length-te>255;)V.writeByte(255),V.writeBytes(X,te,255),te+=255;V.writeByte(X.length-te),V.writeBytes(X,te,X.length-te),V.writeByte(0),V.writeString(";")}},G=function(V){for(var X=1<<V,te=1+(1<<V),he=V+1,xe=ne(),Le=0;Le<X;Le+=1)xe.add(String.fromCharCode(Le));xe.add(String.fromCharCode(X)),xe.add(String.fromCharCode(te));var ke,We,Je,Ke=J(),at=(ke=Ke,We=0,Je=0,{write:function(ht,Qe){if(ht>>>Qe)throw"length over";for(;We+Qe>=8;)ke.writeByte(255&(ht<<We|Je)),Qe-=8-We,ht>>>=8-We,Je=0,We=0;Je|=ht<<We,We+=Qe},flush:function(){We>0&&ke.writeByte(Je)}});at.write(X,he);var zt=0,mt=String.fromCharCode(D[zt]);for(zt+=1;zt<D.length;){var Lt=String.fromCharCode(D[zt]);zt+=1,xe.contains(mt+Lt)?mt+=Lt:(at.write(xe.indexOf(mt),he),xe.size()<4095&&(xe.size()==1<<he&&(he+=1),xe.add(mt+Lt)),mt=Lt)}return at.write(xe.indexOf(mt),he),at.write(te,he),at.flush(),Ke.toByteArray()},ne=function(){var V={},X=0,te={add:function(he){if(te.contains(he))throw"dup key:"+he;V[he]=X,X+=1},size:function(){return X},indexOf:function(he){return V[he]},contains:function(he){return V[he]!==void 0}};return te};return R})(ie,ue),z=0;z<ue;z+=1)for(var H=0;H<ie;H+=1)I.setPixel(H,z,Y(H,z));var k=J();I.write(k);for(var M=(function(){var se=0,me=0,de=0,be="",D={},R=function(ne){be+=String.fromCharCode(G(63&ne))},G=function(ne){if(!(ne<0)){if(ne<26)return 65+ne;if(ne<52)return ne-26+97;if(ne<62)return ne-52+48;if(ne==62)return 43;if(ne==63)return 47}throw"n:"+ne};return D.writeByte=function(ne){for(se=se<<8|255&ne,me+=8,de+=1;me>=6;)R(se>>>me-6),me-=6},D.flush=function(){if(me>0&&(R(se<<6-me),se=0,me=0),de%3!=0)for(var ne=3-de%3,V=0;V<ne;V+=1)be+="="},D.toString=function(){return be},D})(),q=k.toByteArray(),ee=0;ee<q.length;ee+=1)M.writeByte(q[ee]);return M.flush(),"data:image/gif;base64,"+M};return y})();m.stringToBytesFuncs["UTF-8"]=function(y){return(function(x){for(var b=[],w=0;w<x.length;w++){var C=x.charCodeAt(w);C<128?b.push(C):C<2048?b.push(192|C>>6,128|63&C):C<55296||C>=57344?b.push(224|C>>12,128|C>>6&63,128|63&C):(w++,C=65536+((1023&C)<<10|1023&x.charCodeAt(w)),b.push(240|C>>18,128|C>>12&63,128|C>>6&63,128|63&C))}return b})(y)},(h=typeof(f=function(){return m})=="function"?f.apply(c,[]):f)===void 0||(l.exports=h)}},r={};function i(l){var c=r[l];if(c!==void 0)return c.exports;var f=r[l]={exports:{}};return n[l](f,f.exports,i),f.exports}i.n=l=>{var c=l&&l.__esModule?()=>l.default:()=>l;return i.d(c,{a:c}),c},i.d=(l,c)=>{for(var f in c)i.o(c,f)&&!i.o(l,f)&&Object.defineProperty(l,f,{enumerable:!0,get:c[f]})},i.o=(l,c)=>Object.prototype.hasOwnProperty.call(l,c);var o={};return(()=>{i.d(o,{default:()=>ue});const l=Y=>!!Y&&typeof Y=="object"&&!Array.isArray(Y);function c(Y,...I){if(!I.length)return Y;const z=I.shift();return z!==void 0&&l(Y)&&l(z)?(Y=Object.assign({},Y),Object.keys(z).forEach((H=>{const k=Y[H],M=z[H];Array.isArray(k)&&Array.isArray(M)?Y[H]=M:l(k)&&l(M)?Y[H]=c(Object.assign({},k),M):Y[H]=M})),c(Y,...I)):Y}function f(Y,I){const z=document.createElement("a");z.download=I,z.href=Y,document.body.appendChild(z),z.click(),document.body.removeChild(z)}const h={L:.07,M:.15,Q:.25,H:.3};class m{constructor({svg:I,type:z,window:H}){this._svg=I,this._type=z,this._window=H}draw(I,z,H,k){let M;switch(this._type){case"dots":M=this._drawDot;break;case"classy":M=this._drawClassy;break;case"classy-rounded":M=this._drawClassyRounded;break;case"rounded":M=this._drawRounded;break;case"extra-rounded":M=this._drawExtraRounded;break;default:M=this._drawSquare}M.call(this,{x:I,y:z,size:H,getNeighbor:k})}_rotateFigure({x:I,y:z,size:H,rotation:k=0,draw:M}){var q;const ee=I+H/2,se=z+H/2;M(),(q=this._element)===null||q===void 0||q.setAttribute("transform",`rotate(${180*k/Math.PI},${ee},${se})`)}_basicDot(I){const{size:z,x:H,y:k}=I;this._rotateFigure(Object.assign(Object.assign({},I),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(H+z/2)),this._element.setAttribute("cy",String(k+z/2)),this._element.setAttribute("r",String(z/2))}}))}_basicSquare(I){const{size:z,x:H,y:k}=I;this._rotateFigure(Object.assign(Object.assign({},I),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(H)),this._element.setAttribute("y",String(k)),this._element.setAttribute("width",String(z)),this._element.setAttribute("height",String(z))}}))}_basicSideRounded(I){const{size:z,x:H,y:k}=I;this._rotateFigure(Object.assign(Object.assign({},I),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${H} ${k}v ${z}h `+z/2+`a ${z/2} ${z/2}, 0, 0, 0, 0 ${-z}`)}}))}_basicCornerRounded(I){const{size:z,x:H,y:k}=I;this._rotateFigure(Object.assign(Object.assign({},I),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${H} ${k}v ${z}h ${z}v `+-z/2+`a ${z/2} ${z/2}, 0, 0, 0, ${-z/2} ${-z/2}`)}}))}_basicCornerExtraRounded(I){const{size:z,x:H,y:k}=I;this._rotateFigure(Object.assign(Object.assign({},I),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${H} ${k}v ${z}h ${z}a ${z} ${z}, 0, 0, 0, ${-z} ${-z}`)}}))}_basicCornersRounded(I){const{size:z,x:H,y:k}=I;this._rotateFigure(Object.assign(Object.assign({},I),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${H} ${k}v `+z/2+`a ${z/2} ${z/2}, 0, 0, 0, ${z/2} ${z/2}h `+z/2+"v "+-z/2+`a ${z/2} ${z/2}, 0, 0, 0, ${-z/2} ${-z/2}`)}}))}_drawDot({x:I,y:z,size:H}){this._basicDot({x:I,y:z,size:H,rotation:0})}_drawSquare({x:I,y:z,size:H}){this._basicSquare({x:I,y:z,size:H,rotation:0})}_drawRounded({x:I,y:z,size:H,getNeighbor:k}){const M=k?+k(-1,0):0,q=k?+k(1,0):0,ee=k?+k(0,-1):0,se=k?+k(0,1):0,me=M+q+ee+se;if(me!==0)if(me>2||M&&q||ee&&se)this._basicSquare({x:I,y:z,size:H,rotation:0});else{if(me===2){let de=0;return M&&ee?de=Math.PI/2:ee&&q?de=Math.PI:q&&se&&(de=-Math.PI/2),void this._basicCornerRounded({x:I,y:z,size:H,rotation:de})}if(me===1){let de=0;return ee?de=Math.PI/2:q?de=Math.PI:se&&(de=-Math.PI/2),void this._basicSideRounded({x:I,y:z,size:H,rotation:de})}}else this._basicDot({x:I,y:z,size:H,rotation:0})}_drawExtraRounded({x:I,y:z,size:H,getNeighbor:k}){const M=k?+k(-1,0):0,q=k?+k(1,0):0,ee=k?+k(0,-1):0,se=k?+k(0,1):0,me=M+q+ee+se;if(me!==0)if(me>2||M&&q||ee&&se)this._basicSquare({x:I,y:z,size:H,rotation:0});else{if(me===2){let de=0;return M&&ee?de=Math.PI/2:ee&&q?de=Math.PI:q&&se&&(de=-Math.PI/2),void this._basicCornerExtraRounded({x:I,y:z,size:H,rotation:de})}if(me===1){let de=0;return ee?de=Math.PI/2:q?de=Math.PI:se&&(de=-Math.PI/2),void this._basicSideRounded({x:I,y:z,size:H,rotation:de})}}else this._basicDot({x:I,y:z,size:H,rotation:0})}_drawClassy({x:I,y:z,size:H,getNeighbor:k}){const M=k?+k(-1,0):0,q=k?+k(1,0):0,ee=k?+k(0,-1):0,se=k?+k(0,1):0;M+q+ee+se!==0?M||ee?q||se?this._basicSquare({x:I,y:z,size:H,rotation:0}):this._basicCornerRounded({x:I,y:z,size:H,rotation:Math.PI/2}):this._basicCornerRounded({x:I,y:z,size:H,rotation:-Math.PI/2}):this._basicCornersRounded({x:I,y:z,size:H,rotation:Math.PI/2})}_drawClassyRounded({x:I,y:z,size:H,getNeighbor:k}){const M=k?+k(-1,0):0,q=k?+k(1,0):0,ee=k?+k(0,-1):0,se=k?+k(0,1):0;M+q+ee+se!==0?M||ee?q||se?this._basicSquare({x:I,y:z,size:H,rotation:0}):this._basicCornerExtraRounded({x:I,y:z,size:H,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:I,y:z,size:H,rotation:-Math.PI/2}):this._basicCornersRounded({x:I,y:z,size:H,rotation:Math.PI/2})}}const y={dot:"dot",square:"square",extraRounded:"extra-rounded"},x=Object.values(y);class b{constructor({svg:I,type:z,window:H}){this._svg=I,this._type=z,this._window=H}draw(I,z,H,k){let M;switch(this._type){case y.square:M=this._drawSquare;break;case y.extraRounded:M=this._drawExtraRounded;break;default:M=this._drawDot}M.call(this,{x:I,y:z,size:H,rotation:k})}_rotateFigure({x:I,y:z,size:H,rotation:k=0,draw:M}){var q;const ee=I+H/2,se=z+H/2;M(),(q=this._element)===null||q===void 0||q.setAttribute("transform",`rotate(${180*k/Math.PI},${ee},${se})`)}_basicDot(I){const{size:z,x:H,y:k}=I,M=z/7;this._rotateFigure(Object.assign(Object.assign({},I),{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 ${H+z/2} ${k}a ${z/2} ${z/2} 0 1 0 0.1 0zm 0 ${M}a ${z/2-M} ${z/2-M} 0 1 1 -0.1 0Z`)}}))}_basicSquare(I){const{size:z,x:H,y:k}=I,M=z/7;this._rotateFigure(Object.assign(Object.assign({},I),{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 ${H} ${k}v ${z}h ${z}v `+-z+`zM ${H+M} ${k+M}h `+(z-2*M)+"v "+(z-2*M)+"h "+(2*M-z)+"z")}}))}_basicExtraRounded(I){const{size:z,x:H,y:k}=I,M=z/7;this._rotateFigure(Object.assign(Object.assign({},I),{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 ${H} ${k+2.5*M}v `+2*M+`a ${2.5*M} ${2.5*M}, 0, 0, 0, ${2.5*M} ${2.5*M}h `+2*M+`a ${2.5*M} ${2.5*M}, 0, 0, 0, ${2.5*M} ${2.5*-M}v `+-2*M+`a ${2.5*M} ${2.5*M}, 0, 0, 0, ${2.5*-M} ${2.5*-M}h `+-2*M+`a ${2.5*M} ${2.5*M}, 0, 0, 0, ${2.5*-M} ${2.5*M}M ${H+2.5*M} ${k+M}h `+2*M+`a ${1.5*M} ${1.5*M}, 0, 0, 1, ${1.5*M} ${1.5*M}v `+2*M+`a ${1.5*M} ${1.5*M}, 0, 0, 1, ${1.5*-M} ${1.5*M}h `+-2*M+`a ${1.5*M} ${1.5*M}, 0, 0, 1, ${1.5*-M} ${1.5*-M}v `+-2*M+`a ${1.5*M} ${1.5*M}, 0, 0, 1, ${1.5*M} ${1.5*-M}`)}}))}_drawDot({x:I,y:z,size:H,rotation:k}){this._basicDot({x:I,y:z,size:H,rotation:k})}_drawSquare({x:I,y:z,size:H,rotation:k}){this._basicSquare({x:I,y:z,size:H,rotation:k})}_drawExtraRounded({x:I,y:z,size:H,rotation:k}){this._basicExtraRounded({x:I,y:z,size:H,rotation:k})}}const w={dot:"dot",square:"square"},C=Object.values(w);class O{constructor({svg:I,type:z,window:H}){this._svg=I,this._type=z,this._window=H}draw(I,z,H,k){let M;M=this._type===w.square?this._drawSquare:this._drawDot,M.call(this,{x:I,y:z,size:H,rotation:k})}_rotateFigure({x:I,y:z,size:H,rotation:k=0,draw:M}){var q;const ee=I+H/2,se=z+H/2;M(),(q=this._element)===null||q===void 0||q.setAttribute("transform",`rotate(${180*k/Math.PI},${ee},${se})`)}_basicDot(I){const{size:z,x:H,y:k}=I;this._rotateFigure(Object.assign(Object.assign({},I),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(H+z/2)),this._element.setAttribute("cy",String(k+z/2)),this._element.setAttribute("r",String(z/2))}}))}_basicSquare(I){const{size:z,x:H,y:k}=I;this._rotateFigure(Object.assign(Object.assign({},I),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(H)),this._element.setAttribute("y",String(k)),this._element.setAttribute("width",String(z)),this._element.setAttribute("height",String(z))}}))}_drawDot({x:I,y:z,size:H,rotation:k}){this._basicDot({x:I,y:z,size:H,rotation:k})}_drawSquare({x:I,y:z,size:H,rotation:k}){this._basicSquare({x:I,y:z,size:H,rotation:k})}}const T="circle",P=[[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]],N=[[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 F{constructor(I,z){this._roundSize=H=>this._options.dotsOptions.roundSize?Math.floor(H):H,this._window=z,this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(I.width)),this._element.setAttribute("height",String(I.height)),this._element.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),I.dotsOptions.roundSize||this._element.setAttribute("shape-rendering","crispEdges"),this._element.setAttribute("viewBox",`0 0 ${I.width} ${I.height}`),this._defs=this._window.document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._imageUri=I.image,this._instanceId=F.instanceCount++,this._options=I}get width(){return this._options.width}get height(){return this._options.height}getElement(){return this._element}async drawQR(I){const z=I.getModuleCount(),H=Math.min(this._options.width,this._options.height)-2*this._options.margin,k=this._options.shape===T?H/Math.sqrt(2):H,M=this._roundSize(k/z);let q={hideXDots:0,hideYDots:0,width:0,height:0};if(this._qr=I,this._options.image){if(await this.loadImage(),!this._image)return;const{imageOptions:ee,qrOptions:se}=this._options,me=ee.imageSize*h[se.errorCorrectionLevel],de=Math.floor(me*z*z);q=(function({originalHeight:be,originalWidth:D,maxHiddenDots:R,maxHiddenAxisDots:G,dotSize:ne}){const V={x:0,y:0},X={x:0,y:0};if(be<=0||D<=0||R<=0||ne<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};const te=be/D;return V.x=Math.floor(Math.sqrt(R/te)),V.x<=0&&(V.x=1),G&&G<V.x&&(V.x=G),V.x%2==0&&V.x--,X.x=V.x*ne,V.y=1+2*Math.ceil((V.x*te-1)/2),X.y=Math.round(X.x*te),(V.y*V.x>R||G&&G<V.y)&&(G&&G<V.y?(V.y=G,V.y%2==0&&V.x--):V.y-=2,X.y=V.y*ne,V.x=1+2*Math.ceil((V.y/te-1)/2),X.x=Math.round(X.y/te)),{height:X.y,width:X.x,hideYDots:V.y,hideXDots:V.x}})({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:de,maxHiddenAxisDots:z-14,dotSize:M})}this.drawBackground(),this.drawDots(((ee,se)=>{var me,de,be,D,R,G;return!(this._options.imageOptions.hideBackgroundDots&&ee>=(z-q.hideYDots)/2&&ee<(z+q.hideYDots)/2&&se>=(z-q.hideXDots)/2&&se<(z+q.hideXDots)/2||!((me=P[ee])===null||me===void 0)&&me[se]||!((de=P[ee-z+7])===null||de===void 0)&&de[se]||!((be=P[ee])===null||be===void 0)&&be[se-z+7]||!((D=N[ee])===null||D===void 0)&&D[se]||!((R=N[ee-z+7])===null||R===void 0)&&R[se]||!((G=N[ee])===null||G===void 0)&&G[se-z+7])})),this.drawCorners(),this._options.image&&await this.drawImage({width:q.width,height:q.height,count:z,dotSize:M})}drawBackground(){var I,z,H;const k=this._element,M=this._options;if(k){const q=(I=M.backgroundOptions)===null||I===void 0?void 0:I.gradient,ee=(z=M.backgroundOptions)===null||z===void 0?void 0:z.color;let se=M.height,me=M.width;if(q||ee){const de=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),!((H=M.backgroundOptions)===null||H===void 0)&&H.round&&(se=me=Math.min(M.width,M.height),de.setAttribute("rx",String(se/2*M.backgroundOptions.round))),de.setAttribute("x",String(this._roundSize((M.width-me)/2))),de.setAttribute("y",String(this._roundSize((M.height-se)/2))),de.setAttribute("width",String(me)),de.setAttribute("height",String(se)),this._backgroundClipPath.appendChild(de),this._createColor({options:q,color:ee,additionalRotation:0,x:0,y:0,height:M.height,width:M.width,name:`background-color-${this._instanceId}`})}}}drawDots(I){var z,H;if(!this._qr)throw"QR code is not defined";const k=this._options,M=this._qr.getModuleCount();if(M>k.width||M>k.height)throw"The canvas is too small.";const q=Math.min(k.width,k.height)-2*k.margin,ee=k.shape===T?q/Math.sqrt(2):q,se=this._roundSize(ee/M),me=this._roundSize((k.width-M*se)/2),de=this._roundSize((k.height-M*se)/2),be=new m({svg:this._element,type:k.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:(z=k.dotsOptions)===null||z===void 0?void 0:z.gradient,color:k.dotsOptions.color,additionalRotation:0,x:0,y:0,height:k.height,width:k.width,name:`dot-color-${this._instanceId}`});for(let D=0;D<M;D++)for(let R=0;R<M;R++)I&&!I(D,R)||!((H=this._qr)===null||H===void 0)&&H.isDark(D,R)&&(be.draw(me+R*se,de+D*se,se,((G,ne)=>!(R+G<0||D+ne<0||R+G>=M||D+ne>=M)&&!(I&&!I(D+ne,R+G))&&!!this._qr&&this._qr.isDark(D+ne,R+G))),be._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(be._element));if(k.shape===T){const D=this._roundSize((q/se-M)/2),R=M+2*D,G=me-D*se,ne=de-D*se,V=[],X=this._roundSize(R/2);for(let te=0;te<R;te++){V[te]=[];for(let he=0;he<R;he++)te>=D-1&&te<=R-D&&he>=D-1&&he<=R-D||Math.sqrt((te-X)*(te-X)+(he-X)*(he-X))>X?V[te][he]=0:V[te][he]=this._qr.isDark(he-2*D<0?he:he>=M?he-2*D:he-D,te-2*D<0?te:te>=M?te-2*D:te-D)?1:0}for(let te=0;te<R;te++)for(let he=0;he<R;he++)V[te][he]&&(be.draw(G+he*se,ne+te*se,se,((xe,Le)=>{var ke;return!!(!((ke=V[te+Le])===null||ke===void 0)&&ke[he+xe])})),be._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(be._element))}}drawCorners(){if(!this._qr)throw"QR code is not defined";const I=this._element,z=this._options;if(!I)throw"Element code is not defined";const H=this._qr.getModuleCount(),k=Math.min(z.width,z.height)-2*z.margin,M=z.shape===T?k/Math.sqrt(2):k,q=this._roundSize(M/H),ee=7*q,se=3*q,me=this._roundSize((z.width-H*q)/2),de=this._roundSize((z.height-H*q)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach((([be,D,R])=>{var G,ne,V,X,te,he,xe,Le,ke,We,Je,Ke,at,zt;const mt=me+be*q*(H-7),Lt=de+D*q*(H-7);let ht=this._dotsClipPath,Qe=this._dotsClipPath;if((!((G=z.cornersSquareOptions)===null||G===void 0)&&G.gradient||!((ne=z.cornersSquareOptions)===null||ne===void 0)&&ne.color)&&(ht=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),ht.setAttribute("id",`clip-path-corners-square-color-${be}-${D}-${this._instanceId}`),this._defs.appendChild(ht),this._cornersSquareClipPath=this._cornersDotClipPath=Qe=ht,this._createColor({options:(V=z.cornersSquareOptions)===null||V===void 0?void 0:V.gradient,color:(X=z.cornersSquareOptions)===null||X===void 0?void 0:X.color,additionalRotation:R,x:mt,y:Lt,height:ee,width:ee,name:`corners-square-color-${be}-${D}-${this._instanceId}`})),((te=z.cornersSquareOptions)===null||te===void 0?void 0:te.type)&&x.includes(z.cornersSquareOptions.type)){const Rt=new b({svg:this._element,type:z.cornersSquareOptions.type,window:this._window});Rt.draw(mt,Lt,ee,R),Rt._element&&ht&&ht.appendChild(Rt._element)}else{const Rt=new m({svg:this._element,type:((he=z.cornersSquareOptions)===null||he===void 0?void 0:he.type)||z.dotsOptions.type,window:this._window});for(let vn=0;vn<P.length;vn++)for(let nt=0;nt<P[vn].length;nt++)!((xe=P[vn])===null||xe===void 0)&&xe[nt]&&(Rt.draw(mt+nt*q,Lt+vn*q,q,((Hn,qn)=>{var Jt;return!!(!((Jt=P[vn+qn])===null||Jt===void 0)&&Jt[nt+Hn])})),Rt._element&&ht&&ht.appendChild(Rt._element))}if((!((Le=z.cornersDotOptions)===null||Le===void 0)&&Le.gradient||!((ke=z.cornersDotOptions)===null||ke===void 0)&&ke.color)&&(Qe=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),Qe.setAttribute("id",`clip-path-corners-dot-color-${be}-${D}-${this._instanceId}`),this._defs.appendChild(Qe),this._cornersDotClipPath=Qe,this._createColor({options:(We=z.cornersDotOptions)===null||We===void 0?void 0:We.gradient,color:(Je=z.cornersDotOptions)===null||Je===void 0?void 0:Je.color,additionalRotation:R,x:mt+2*q,y:Lt+2*q,height:se,width:se,name:`corners-dot-color-${be}-${D}-${this._instanceId}`})),((Ke=z.cornersDotOptions)===null||Ke===void 0?void 0:Ke.type)&&C.includes(z.cornersDotOptions.type)){const Rt=new O({svg:this._element,type:z.cornersDotOptions.type,window:this._window});Rt.draw(mt+2*q,Lt+2*q,se,R),Rt._element&&Qe&&Qe.appendChild(Rt._element)}else{const Rt=new m({svg:this._element,type:((at=z.cornersDotOptions)===null||at===void 0?void 0:at.type)||z.dotsOptions.type,window:this._window});for(let vn=0;vn<N.length;vn++)for(let nt=0;nt<N[vn].length;nt++)!((zt=N[vn])===null||zt===void 0)&&zt[nt]&&(Rt.draw(mt+nt*q,Lt+vn*q,q,((Hn,qn)=>{var Jt;return!!(!((Jt=N[vn+qn])===null||Jt===void 0)&&Jt[nt+Hn])})),Rt._element&&Qe&&Qe.appendChild(Rt._element))}}))}loadImage(){return new Promise(((I,z)=>{var H;const k=this._options;if(!k.image)return z("Image is not defined");if(!((H=k.nodeCanvas)===null||H===void 0)&&H.loadImage)k.nodeCanvas.loadImage(k.image).then((M=>{var q,ee;if(this._image=M,this._options.imageOptions.saveAsBlob){const se=(q=k.nodeCanvas)===null||q===void 0?void 0:q.createCanvas(this._image.width,this._image.height);(ee=se?.getContext("2d"))===null||ee===void 0||ee.drawImage(M,0,0),this._imageUri=se?.toDataURL()}I()})).catch(z);else{const M=new this._window.Image;typeof k.imageOptions.crossOrigin=="string"&&(M.crossOrigin=k.imageOptions.crossOrigin),this._image=M,M.onload=async()=>{this._options.imageOptions.saveAsBlob&&(this._imageUri=await(async function(q,ee){return new Promise((se=>{const me=new ee.XMLHttpRequest;me.onload=function(){const de=new ee.FileReader;de.onloadend=function(){se(de.result)},de.readAsDataURL(me.response)},me.open("GET",q),me.responseType="blob",me.send()}))})(k.image||"",this._window)),I()},M.src=k.image}}))}async drawImage({width:I,height:z,count:H,dotSize:k}){const M=this._options,q=this._roundSize((M.width-H*k)/2),ee=this._roundSize((M.height-H*k)/2),se=q+this._roundSize(M.imageOptions.margin+(H*k-I)/2),me=ee+this._roundSize(M.imageOptions.margin+(H*k-z)/2),de=I-2*M.imageOptions.margin,be=z-2*M.imageOptions.margin,D=this._window.document.createElementNS("http://www.w3.org/2000/svg","image");D.setAttribute("href",this._imageUri||""),D.setAttribute("xlink:href",this._imageUri||""),D.setAttribute("x",String(se)),D.setAttribute("y",String(me)),D.setAttribute("width",`${de}px`),D.setAttribute("height",`${be}px`),this._element.appendChild(D)}_createColor({options:I,color:z,additionalRotation:H,x:k,y:M,height:q,width:ee,name:se}){const me=ee>q?ee:q,de=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");if(de.setAttribute("x",String(k)),de.setAttribute("y",String(M)),de.setAttribute("height",String(q)),de.setAttribute("width",String(ee)),de.setAttribute("clip-path",`url('#clip-path-${se}')`),I){let be;if(I.type==="radial")be=this._window.document.createElementNS("http://www.w3.org/2000/svg","radialGradient"),be.setAttribute("id",se),be.setAttribute("gradientUnits","userSpaceOnUse"),be.setAttribute("fx",String(k+ee/2)),be.setAttribute("fy",String(M+q/2)),be.setAttribute("cx",String(k+ee/2)),be.setAttribute("cy",String(M+q/2)),be.setAttribute("r",String(me/2));else{const D=((I.rotation||0)+H)%(2*Math.PI),R=(D+2*Math.PI)%(2*Math.PI);let G=k+ee/2,ne=M+q/2,V=k+ee/2,X=M+q/2;R>=0&&R<=.25*Math.PI||R>1.75*Math.PI&&R<=2*Math.PI?(G-=ee/2,ne-=q/2*Math.tan(D),V+=ee/2,X+=q/2*Math.tan(D)):R>.25*Math.PI&&R<=.75*Math.PI?(ne-=q/2,G-=ee/2/Math.tan(D),X+=q/2,V+=ee/2/Math.tan(D)):R>.75*Math.PI&&R<=1.25*Math.PI?(G+=ee/2,ne+=q/2*Math.tan(D),V-=ee/2,X-=q/2*Math.tan(D)):R>1.25*Math.PI&&R<=1.75*Math.PI&&(ne+=q/2,G+=ee/2/Math.tan(D),X-=q/2,V-=ee/2/Math.tan(D)),be=this._window.document.createElementNS("http://www.w3.org/2000/svg","linearGradient"),be.setAttribute("id",se),be.setAttribute("gradientUnits","userSpaceOnUse"),be.setAttribute("x1",String(Math.round(G))),be.setAttribute("y1",String(Math.round(ne))),be.setAttribute("x2",String(Math.round(V))),be.setAttribute("y2",String(Math.round(X)))}I.colorStops.forEach((({offset:D,color:R})=>{const G=this._window.document.createElementNS("http://www.w3.org/2000/svg","stop");G.setAttribute("offset",100*D+"%"),G.setAttribute("stop-color",R),be.appendChild(G)})),de.setAttribute("fill",`url('#${se}')`),this._defs.appendChild(be)}else z&&de.setAttribute("fill",z);this._element.appendChild(de)}}F.instanceCount=0;const B=F,W="canvas",Q={};for(let Y=0;Y<=40;Y++)Q[Y]=Y;const re={type:W,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:Q[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 ce(Y){const I=Object.assign({},Y);if(!I.colorStops||!I.colorStops.length)throw"Field 'colorStops' is required in gradient";return I.rotation?I.rotation=Number(I.rotation):I.rotation=0,I.colorStops=I.colorStops.map((z=>Object.assign(Object.assign({},z),{offset:Number(z.offset)}))),I}function ae(Y){const I=Object.assign({},Y);return I.width=Number(I.width),I.height=Number(I.height),I.margin=Number(I.margin),I.imageOptions=Object.assign(Object.assign({},I.imageOptions),{hideBackgroundDots:!!I.imageOptions.hideBackgroundDots,imageSize:Number(I.imageOptions.imageSize),margin:Number(I.imageOptions.margin)}),I.margin>Math.min(I.width,I.height)&&(I.margin=Math.min(I.width,I.height)),I.dotsOptions=Object.assign({},I.dotsOptions),I.dotsOptions.gradient&&(I.dotsOptions.gradient=ce(I.dotsOptions.gradient)),I.cornersSquareOptions&&(I.cornersSquareOptions=Object.assign({},I.cornersSquareOptions),I.cornersSquareOptions.gradient&&(I.cornersSquareOptions.gradient=ce(I.cornersSquareOptions.gradient))),I.cornersDotOptions&&(I.cornersDotOptions=Object.assign({},I.cornersDotOptions),I.cornersDotOptions.gradient&&(I.cornersDotOptions.gradient=ce(I.cornersDotOptions.gradient))),I.backgroundOptions&&(I.backgroundOptions=Object.assign({},I.backgroundOptions),I.backgroundOptions.gradient&&(I.backgroundOptions.gradient=ce(I.backgroundOptions.gradient))),I}var J=i(873),oe=i.n(J);function ve(Y){if(!Y)throw new Error("Extension must be defined");Y[0]==="."&&(Y=Y.substring(1));const I={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"}[Y.toLowerCase()];if(!I)throw new Error(`Extension "${Y}" is not supported`);return I}class ie{constructor(I){I?.jsdom?this._window=new I.jsdom("",{resources:"usable"}).window:this._window=window,this._options=I?ae(c(re,I)):re,this.update()}static _clearContainer(I){I&&(I.innerHTML="")}_setupSvg(){if(!this._qr)return;const I=new B(this._options,this._window);this._svg=I.getElement(),this._svgDrawingPromise=I.drawQR(this._qr).then((()=>{var z;this._svg&&((z=this._extension)===null||z===void 0||z.call(this,I.getElement(),this._options))}))}_setupCanvas(){var I,z;this._qr&&(!((I=this._options.nodeCanvas)===null||I===void 0)&&I.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=(z=this._svgDrawingPromise)===null||z===void 0?void 0:z.then((()=>{var H;if(!this._svg)return;const k=this._svg,M=new this._window.XMLSerializer().serializeToString(k),q=btoa(M),ee=`data:${ve("svg")};base64,${q}`;if(!((H=this._options.nodeCanvas)===null||H===void 0)&&H.loadImage)return this._options.nodeCanvas.loadImage(ee).then((se=>{var me,de;se.width=this._options.width,se.height=this._options.height,(de=(me=this._nodeCanvas)===null||me===void 0?void 0:me.getContext("2d"))===null||de===void 0||de.drawImage(se,0,0)}));{const se=new this._window.Image;return new Promise((me=>{se.onload=()=>{var de,be;(be=(de=this._domCanvas)===null||de===void 0?void 0:de.getContext("2d"))===null||be===void 0||be.drawImage(se,0,0),me()},se.src=ee}))}})))}async _getElement(I="png"){if(!this._qr)throw"QR code is empty";return I.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(I){ie._clearContainer(this._container),this._options=I?ae(c(this._options,I)):this._options,this._options.data&&(this._qr=oe()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||(function(z){switch(!0){case/^[0-9]*$/.test(z):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(z):return"Alphanumeric";default:return"Byte"}})(this._options.data)),this._qr.make(),this._options.type===W?this._setupCanvas():this._setupSvg(),this.append(this._container))}append(I){if(I){if(typeof I.appendChild!="function")throw"Container should be a single DOM node";this._options.type===W?this._domCanvas&&I.appendChild(this._domCanvas):this._svg&&I.appendChild(this._svg),this._container=I}}applyExtension(I){if(!I)throw"Extension function should be defined.";this._extension=I,this.update()}deleteExtension(){this._extension=void 0,this.update()}async getRawData(I="png"){if(!this._qr)throw"QR code is empty";const z=await this._getElement(I),H=ve(I);if(!z)return null;if(I.toLowerCase()==="svg"){const k=`<?xml version="1.0" standalone="no"?>\r
|
||
${new this._window.XMLSerializer().serializeToString(z)}`;return typeof Blob>"u"||this._options.jsdom?Buffer.from(k):new Blob([k],{type:H})}return new Promise((k=>{const M=z;if("toBuffer"in M)if(H==="image/png")k(M.toBuffer(H));else if(H==="image/jpeg")k(M.toBuffer(H));else{if(H!=="application/pdf")throw Error("Unsupported extension");k(M.toBuffer(H))}else"toBlob"in M&&M.toBlob(k,H,1)}))}async download(I){if(!this._qr)throw"QR code is empty";if(typeof Blob>"u")throw"Cannot download in Node.js, call getRawData instead.";let z="png",H="qr";typeof I=="string"?(z=I,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):typeof I=="object"&&I!==null&&(I.name&&(H=I.name),I.extension&&(z=I.extension));const k=await this._getElement(z);if(k)if(z.toLowerCase()==="svg"){let M=new XMLSerializer().serializeToString(k);M=`<?xml version="1.0" standalone="no"?>\r
|
||
`+M,f(`data:${ve(z)};charset=utf-8,${encodeURIComponent(M)}`,`${H}.svg`)}else f(k.toDataURL(ve(z)),`${H}.${z}`)}}const ue=ie})(),o.default})()))})(tv)),tv.exports}var wte=_te();const Ste=Qi(wte),Cte="Left",Ete="Right",Ate="Up",Ote="Down",Jc={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},lw={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},Xj="mousemove",Qj="mouseup",Tte="touchend",jte="touchmove",Mte="touchstart";function Pte(e,t,n,r){return e>t?n>0?Ete:Cte:r>0?Ote:Ate}function Jj(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 Nte(e,t){const n=m=>{const y="touches"in m;y&&m.touches.length>1||e((x,b)=>{b.trackMouse&&!y&&(document.addEventListener(Xj,r),document.addEventListener(Qj,l));const{clientX:w,clientY:C}=y?m.touches[0]:m,O=Jj([w,C],b.rotationAngle);return b.onTouchStartOrOnMouseDown&&b.onTouchStartOrOnMouseDown({event:m}),Object.assign(Object.assign(Object.assign({},x),lw),{initial:O.slice(),xy:O,start:m.timeStamp||0})})},r=m=>{e((y,x)=>{const b="touches"in m;if(b&&m.touches.length>1)return y;if(m.timeStamp-y.start>x.swipeDuration)return y.swiping?Object.assign(Object.assign({},y),{swiping:!1}):y;const{clientX:w,clientY:C}=b?m.touches[0]:m,[O,T]=Jj([w,C],x.rotationAngle),P=O-y.xy[0],N=T-y.xy[1],F=Math.abs(P),B=Math.abs(N),W=(m.timeStamp||0)-y.start,Q=Math.sqrt(F*F+B*B)/(W||1),re=[P/(W||1),N/(W||1)],ce=Pte(F,B,P,N),ae=typeof x.delta=="number"?x.delta:x.delta[ce.toLowerCase()]||Jc.delta;if(F<ae&&B<ae&&!y.swiping)return y;const J={absX:F,absY:B,deltaX:P,deltaY:N,dir:ce,event:m,first:y.first,initial:y.initial,velocity:Q,vxvy:re};J.first&&x.onSwipeStart&&x.onSwipeStart(J),x.onSwiping&&x.onSwiping(J);let oe=!1;return(x.onSwiping||x.onSwiped||x[`onSwiped${ce}`])&&(oe=!0),oe&&x.preventScrollOnSwipe&&x.trackTouch&&m.cancelable&&m.preventDefault(),Object.assign(Object.assign({},y),{first:!1,eventData:J,swiping:!0})})},i=m=>{e((y,x)=>{let b;if(y.swiping&&y.eventData){if(m.timeStamp-y.start<x.swipeDuration){b=Object.assign(Object.assign({},y.eventData),{event:m}),x.onSwiped&&x.onSwiped(b);const w=x[`onSwiped${b.dir}`];w&&w(b)}}else x.onTap&&x.onTap({event:m});return x.onTouchEndOrOnMouseUp&&x.onTouchEndOrOnMouseUp({event:m}),Object.assign(Object.assign(Object.assign({},y),lw),{eventData:b})})},o=()=>{document.removeEventListener(Xj,r),document.removeEventListener(Qj,l)},l=m=>{o(),i(m)},c=(m,y)=>{let x=()=>{};if(m&&m.addEventListener){const b=Object.assign(Object.assign({},Jc.touchEventOptions),y.touchEventOptions),w=[[Mte,n,b],[jte,r,Object.assign(Object.assign({},b),y.preventScrollOnSwipe?{passive:!1}:{})],[Tte,i,b]];w.forEach(([C,O,T])=>m.addEventListener(C,O,T)),x=()=>w.forEach(([C,O])=>m.removeEventListener(C,O))}return x},h={ref:m=>{m!==null&&e((y,x)=>{if(y.el===m)return y;const b={};return y.el&&y.el!==m&&y.cleanUpTouch&&(y.cleanUpTouch(),b.cleanUpTouch=void 0),x.trackTouch&&m&&(b.cleanUpTouch=c(m,x)),Object.assign(Object.assign(Object.assign({},y),{el:m}),b)})}};return t.trackMouse&&(h.onMouseDown=n),[h,c]}function Lte(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 Rte(e){const{trackMouse:t}=e,n=_.useRef(Object.assign({},lw)),r=_.useRef(Object.assign({},Jc)),i=_.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},Jc),e);let o;for(o in Jc)r.current[o]===void 0&&(r.current[o]=Jc[o]);const[l,c]=_.useMemo(()=>Nte(f=>n.current=f(n.current,r.current),{trackMouse:t}),[t]);return n.current=Lte(n.current,r.current,i.current,c),l}var Dte=["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 yC(e){if(typeof e!="string")return!1;var t=Dte;return t.includes(e)}var kte=["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 jk(e){if(typeof e!="string")return!1;var t=kte;return t.includes(e)}function Mk(e){return typeof e=="string"&&e.startsWith("data-")}function Oi(e){var t=Object.entries(e).filter(n=>{var[r]=n;return jk(r)||Mk(r)});return Object.fromEntries(t)}function Iu(e){if(e==null)return null;if(_.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Oi(t)}return typeof e=="object"&&!Array.isArray(e)?Oi(e):null}function Nr(e){var t=Object.entries(e).filter(n=>{var[r]=n;return jk(r)||Mk(r)||yC(r)});return Object.fromEntries(t)}function Ite(e){return e==null?null:_.isValidElement(e)?Nr(e.props):typeof e=="object"&&!Array.isArray(e)?Nr(e):null}var zte=["children","width","height","viewBox","className","style","title","desc"];function uw(){return uw=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},uw.apply(null,arguments)}function Bte(e,t){if(e==null)return{};var n,r,i=Ute(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ute(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 Pk=_.forwardRef((e,t)=>{var{children:n,width:r,height:i,viewBox:o,className:l,style:c,title:f,desc:h}=e,m=Bte(e,zte),y=o||{width:r,height:i,x:0,y:0},x=Oe("recharts-surface",l);return _.createElement("svg",uw({},Nr(m),{className:x,width:r,height:i,style:c,viewBox:"".concat(y.x," ").concat(y.y," ").concat(y.width," ").concat(y.height),ref:t}),_.createElement("title",null,f),_.createElement("desc",null,h),n)}),$te=["children","className"];function cw(){return cw=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},cw.apply(null,arguments)}function Fte(e,t){if(e==null)return{};var n,r,i=Vte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Vte(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 Xn=_.forwardRef((e,t)=>{var{children:n,className:r}=e,i=Fte(e,$te),o=Oe("recharts-layer",r);return _.createElement("g",cw({className:o},Nr(i),{ref:t}),n)}),Hte=_.createContext(null);function Zt(e){return function(){return e}}const Nk=Math.cos,Hv=Math.sin,Ca=Math.sqrt,qv=Math.PI,g0=2*qv,fw=Math.PI,dw=2*fw,vu=1e-6,qte=dw-vu;function Lk(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Gte(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Lk;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class Yte{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Lk:Gte(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,o,l){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+l}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let l=this._x1,c=this._y1,f=r-t,h=i-n,m=l-t,y=c-n,x=m*m+y*y;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(x>vu)if(!(Math.abs(y*f-h*m)>vu)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let b=r-l,w=i-c,C=f*f+h*h,O=b*b+w*w,T=Math.sqrt(C),P=Math.sqrt(x),N=o*Math.tan((fw-Math.acos((C+x-O)/(2*T*P)))/2),F=N/P,B=N/T;Math.abs(F-1)>vu&&this._append`L${t+F*m},${n+F*y}`,this._append`A${o},${o},0,0,${+(y*b>m*w)},${this._x1=t+B*f},${this._y1=n+B*h}`}}arc(t,n,r,i,o,l){if(t=+t,n=+n,r=+r,l=!!l,r<0)throw new Error(`negative radius: ${r}`);let c=r*Math.cos(i),f=r*Math.sin(i),h=t+c,m=n+f,y=1^l,x=l?i-o:o-i;this._x1===null?this._append`M${h},${m}`:(Math.abs(this._x1-h)>vu||Math.abs(this._y1-m)>vu)&&this._append`L${h},${m}`,r&&(x<0&&(x=x%dw+dw),x>qte?this._append`A${r},${r},0,1,${y},${t-c},${n-f}A${r},${r},0,1,${y},${this._x1=h},${this._y1=m}`:x>vu&&this._append`A${r},${r},0,${+(x>=fw)},${y},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}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 bC(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 Yte(t)}function xC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Rk(e){this._context=e}Rk.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 v0(e){return new Rk(e)}function Dk(e){return e[0]}function kk(e){return e[1]}function Ik(e,t){var n=Zt(!0),r=null,i=v0,o=null,l=bC(c);e=typeof e=="function"?e:e===void 0?Dk:Zt(e),t=typeof t=="function"?t:t===void 0?kk:Zt(t);function c(f){var h,m=(f=xC(f)).length,y,x=!1,b;for(r==null&&(o=i(b=l())),h=0;h<=m;++h)!(h<m&&n(y=f[h],h,f))===x&&((x=!x)?o.lineStart():o.lineEnd()),x&&o.point(+e(y,h,f),+t(y,h,f));if(b)return o=null,b+""||null}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:Zt(+f),c):e},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:Zt(+f),c):t},c.defined=function(f){return arguments.length?(n=typeof f=="function"?f:Zt(!!f),c):n},c.curve=function(f){return arguments.length?(i=f,r!=null&&(o=i(r)),c):i},c.context=function(f){return arguments.length?(f==null?r=o=null:o=i(r=f),c):r},c}function Eg(e,t,n){var r=null,i=Zt(!0),o=null,l=v0,c=null,f=bC(h);e=typeof e=="function"?e:e===void 0?Dk:Zt(+e),t=typeof t=="function"?t:Zt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?kk:Zt(+n);function h(y){var x,b,w,C=(y=xC(y)).length,O,T=!1,P,N=new Array(C),F=new Array(C);for(o==null&&(c=l(P=f())),x=0;x<=C;++x){if(!(x<C&&i(O=y[x],x,y))===T)if(T=!T)b=x,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),w=x-1;w>=b;--w)c.point(N[w],F[w]);c.lineEnd(),c.areaEnd()}T&&(N[x]=+e(O,x,y),F[x]=+t(O,x,y),c.point(r?+r(O,x,y):N[x],n?+n(O,x,y):F[x]))}if(P)return c=null,P+""||null}function m(){return Ik().defined(i).curve(l).context(o)}return h.x=function(y){return arguments.length?(e=typeof y=="function"?y:Zt(+y),r=null,h):e},h.x0=function(y){return arguments.length?(e=typeof y=="function"?y:Zt(+y),h):e},h.x1=function(y){return arguments.length?(r=y==null?null:typeof y=="function"?y:Zt(+y),h):r},h.y=function(y){return arguments.length?(t=typeof y=="function"?y:Zt(+y),n=null,h):t},h.y0=function(y){return arguments.length?(t=typeof y=="function"?y:Zt(+y),h):t},h.y1=function(y){return arguments.length?(n=y==null?null:typeof y=="function"?y:Zt(+y),h):n},h.lineX0=h.lineY0=function(){return m().x(e).y(t)},h.lineY1=function(){return m().x(e).y(n)},h.lineX1=function(){return m().x(r).y(t)},h.defined=function(y){return arguments.length?(i=typeof y=="function"?y:Zt(!!y),h):i},h.curve=function(y){return arguments.length?(l=y,o!=null&&(c=l(o)),h):l},h.context=function(y){return arguments.length?(y==null?o=c=null:c=l(o=y),h):o},h}class zk{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 Wte(e){return new zk(e,!0)}function Kte(e){return new zk(e,!1)}const _C={draw(e,t){const n=Ca(t/qv);e.moveTo(n,0),e.arc(0,0,n,0,g0)}},Zte={draw(e,t){const n=Ca(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()}},Bk=Ca(1/3),Xte=Bk*2,Qte={draw(e,t){const n=Ca(t/Xte),r=n*Bk;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Jte={draw(e,t){const n=Ca(t),r=-n/2;e.rect(r,r,n,n)}},ene=.8908130915292852,Uk=Hv(qv/10)/Hv(7*qv/10),tne=Hv(g0/10)*Uk,nne=-Nk(g0/10)*Uk,rne={draw(e,t){const n=Ca(t*ene),r=tne*n,i=nne*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const l=g0*o/5,c=Nk(l),f=Hv(l);e.lineTo(f*n,-c*n),e.lineTo(c*r-f*i,f*r+c*i)}e.closePath()}},$x=Ca(3),ine={draw(e,t){const n=-Ca(t/($x*3));e.moveTo(0,n*2),e.lineTo(-$x*n,-n),e.lineTo($x*n,-n),e.closePath()}},Hi=-.5,qi=Ca(3)/2,hw=1/Ca(12),ane=(hw/2+1)*3,one={draw(e,t){const n=Ca(t/ane),r=n/2,i=n*hw,o=r,l=n*hw+n,c=-o,f=l;e.moveTo(r,i),e.lineTo(o,l),e.lineTo(c,f),e.lineTo(Hi*r-qi*i,qi*r+Hi*i),e.lineTo(Hi*o-qi*l,qi*o+Hi*l),e.lineTo(Hi*c-qi*f,qi*c+Hi*f),e.lineTo(Hi*r+qi*i,Hi*i-qi*r),e.lineTo(Hi*o+qi*l,Hi*l-qi*o),e.lineTo(Hi*c+qi*f,Hi*f-qi*c),e.closePath()}};function sne(e,t){let n=null,r=bC(i);e=typeof e=="function"?e:Zt(e||_C),t=typeof t=="function"?t:Zt(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:Zt(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:Zt(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Gv(){}function Yv(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 $k(e){this._context=e}$k.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:Yv(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:Yv(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lne(e){return new $k(e)}function Fk(e){this._context=e}Fk.prototype={areaStart:Gv,areaEnd:Gv,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:Yv(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function une(e){return new Fk(e)}function Vk(e){this._context=e}Vk.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:Yv(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function cne(e){return new Vk(e)}function Hk(e){this._context=e}Hk.prototype={areaStart:Gv,areaEnd:Gv,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 fne(e){return new Hk(e)}function eM(e){return e<0?-1:1}function tM(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),l=(n-e._y1)/(i||r<0&&-0),c=(o*i+l*r)/(r+i);return(eM(o)+eM(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(c))||0}function nM(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Fx(e,t,n){var r=e._x0,i=e._y0,o=e._x1,l=e._y1,c=(o-r)/3;e._context.bezierCurveTo(r+c,i+c*t,o-c,l-c*n,o,l)}function Wv(e){this._context=e}Wv.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:Fx(this,this._t0,nM(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,Fx(this,nM(this,n=tM(this,e,t)),n);break;default:Fx(this,this._t0,n=tM(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function qk(e){this._context=new Gk(e)}(qk.prototype=Object.create(Wv.prototype)).point=function(e,t){Wv.prototype.point.call(this,t,e)};function Gk(e){this._context=e}Gk.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,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function dne(e){return new Wv(e)}function hne(e){return new qk(e)}function Yk(e){this._context=e}Yk.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=rM(e),i=rM(t),o=0,l=1;l<n;++o,++l)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[l],t[l]);(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 rM(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),l=new Array(n);for(i[0]=0,o[0]=2,l[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,l[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,l[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,l[t]-=r*l[t-1];for(i[n-1]=l[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(l[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function mne(e){return new Yk(e)}function y0(e,t){this._context=e,this._t=t}y0.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 pne(e){return new y0(e,.5)}function gne(e){return new y0(e,0)}function vne(e){return new y0(e,1)}function vf(e,t){if((l=e.length)>1)for(var n=1,r,i,o=e[t[0]],l,c=o.length;n<l;++n)for(i=o,o=e[t[n]],r=0;r<c;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function mw(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function yne(e,t){return e[t]}function bne(e){const t=[];return t.key=e,t}function xne(){var e=Zt([]),t=mw,n=vf,r=yne;function i(o){var l=Array.from(e.apply(this,arguments),bne),c,f=l.length,h=-1,m;for(const y of o)for(c=0,++h;c<f;++c)(l[c][h]=[0,+r(y,l[c].key,h,o)]).data=y;for(c=0,m=xC(t(l));c<f;++c)l[m[c]].index=c;return n(l,m),l}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:Zt(Array.from(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:Zt(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?mw:typeof o=="function"?o:Zt(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??vf,i):n},i}function _ne(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,l;i<o;++i){for(l=n=0;n<r;++n)l+=e[n][i][1]||0;if(l)for(n=0;n<r;++n)e[n][i][1]/=l}vf(e,t)}}function wne(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var l=0,c=0;l<i;++l)c+=e[l][n][1]||0;r[n][1]+=r[n][0]=-c/2}vf(e,t)}}function Sne(e,t){if(!(!((l=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,l;r<o;++r){for(var c=0,f=0,h=0;c<l;++c){for(var m=e[t[c]],y=m[r][1]||0,x=m[r-1][1]||0,b=(y-x)/2,w=0;w<c;++w){var C=e[t[w]],O=C[r][1]||0,T=C[r-1][1]||0;b+=O-T}f+=y,h+=b*y}i[r-1][1]+=i[r-1][0]=n,f&&(n-=h/f)}i[r-1][1]+=i[r-1][0]=n,vf(e,t)}}var Vx={},Hx={},iM;function Cne(){return iM||(iM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(Hx)),Hx}var qx={},aM;function Wk(){return aM||(aM=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})(qx)),qx}var Gx={},oM;function wC(){return oM||(oM=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})(Gx)),Gx}var Yx={},Wx={},sM;function Ene(){return sM||(sM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(n==null)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(t).join(",");const r=String(n);return r==="0"&&Object.is(Number(n),-0)?"-0":r}e.toString=t})(Wx)),Wx}var lM;function SC(){return lM||(lM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ene(),n=wC();function r(i){if(Array.isArray(i))return i.map(n.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const o=[],l=i.length;if(l===0)return o;let c=0,f="",h="",m=!1;for(i.charCodeAt(0)===46&&(o.push(""),c++);c<l;){const y=i[c];h?y==="\\"&&c+1<l?(c++,f+=i[c]):y===h?h="":f+=y:m?y==='"'||y==="'"?h=y:y==="]"?(m=!1,o.push(f),f=""):f+=y:y==="["?(m=!0,f&&(o.push(f),f="")):y==="."?f&&(o.push(f),f=""):f+=y,c++}return f&&o.push(f),o}e.toPath=r})(Yx)),Yx}var uM;function CC(){return uM||(uM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Cne(),n=Wk(),r=wC(),i=SC();function o(c,f,h){if(c==null)return h;switch(typeof f){case"string":{if(t.isUnsafeProperty(f))return h;const m=c[f];return m===void 0?n.isDeepKey(f)?o(c,i.toPath(f),h):h:m}case"number":case"symbol":{typeof f=="number"&&(f=r.toKey(f));const m=c[f];return m===void 0?h:m}default:{if(Array.isArray(f))return l(c,f,h);if(Object.is(f?.valueOf(),-0)?f="-0":f=String(f),t.isUnsafeProperty(f))return h;const m=c[f];return m===void 0?h:m}}}function l(c,f,h){if(f.length===0)return h;let m=c;for(let y=0;y<f.length;y++){if(m==null||t.isUnsafeProperty(f[y]))return h;m=m[f[y]]}return m===void 0?h:m}e.get=o})(Vx)),Vx}var Kx,cM;function Ane(){return cM||(cM=1,Kx=CC().get),Kx}var One=Ane();const zu=Qi(One);var cr=e=>e===0?0:e>0?1:-1,_a=e=>typeof e=="number"&&e!=+e,Ho=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,He=e=>(typeof e=="number"||e instanceof Number)&&!_a(e),ni=e=>He(e)||typeof e=="string",Tne=0,Fh=e=>{var t=++Tne;return"".concat(e||"").concat(t)},Mr=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(!He(t)&&typeof t!="string")return r;var o;if(Ho(t)){if(n==null)return r;var l=t.indexOf("%");o=n*parseFloat(t.slice(0,l))/100}else o=+t;return _a(o)&&(o=r),i&&n!=null&&o>n&&(o=n),o},Kk=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};function fn(e,t,n){return He(e)&&He(t)?e+n*(t-e):t}function Zk(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):zu(r,t))===n)}var pn=e=>e===null||typeof e>"u",vm=e=>pn(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function jne(e){return e!=null}function Xu(){}var Mne=["type","size","sizeType"];function pw(){return pw=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},pw.apply(null,arguments)}function fM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function dM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fM(Object(n),!0).forEach(function(r){Pne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pne(e,t,n){return(t=Nne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nne(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 Rne(e,t){if(e==null)return{};var n,r,i=Dne(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Dne(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 Xk={symbolCircle:_C,symbolCross:Zte,symbolDiamond:Qte,symbolSquare:Jte,symbolStar:rne,symbolTriangle:ine,symbolWye:one},kne=Math.PI/180,Ine=e=>{var t="symbol".concat(vm(e));return Xk[t]||_C},zne=(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*kne;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}},Bne=(e,t)=>{Xk["symbol".concat(vm(e))]=t},Qk=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,i=Rne(e,Mne),o=dM(dM({},i),{},{type:t,size:n,sizeType:r}),l="circle";typeof t=="string"&&(l=t);var c=()=>{var x=Ine(l),b=sne().type(x).size(zne(n,r,l)),w=b();if(w!==null)return w},{className:f,cx:h,cy:m}=o,y=Nr(o);return He(h)&&He(m)&&He(n)?_.createElement("path",pw({},y,{className:Oe("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(m,")"),d:c()})):null};Qk.registerSymbol=Bne;var Jk=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,EC=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(_.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(i=>{yC(i)&&(r[i]=(o=>n[i](n,o)))}),r},Une=(e,t,n)=>r=>(e(t,n,r),null),b0=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var r=null;return Object.keys(e).forEach(i=>{var o=e[i];yC(i)&&typeof o=="function"&&(r||(r={}),r[i]=Une(o,t,n))}),r};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 $ne(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){Fne(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 Fne(e,t,n){return(t=Vne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vne(e){var t=Hne(e,"string");return typeof t=="symbol"?t:t+""}function Hne(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 Qn(e,t){var n=$ne({},e),r=t,i=Object.keys(t),o=i.reduce((l,c)=>(l[c]===void 0&&r[c]!==void 0&&(l[c]=r[c]),l),n);return o}var Zx={},Xx={},mM;function qne(){return mM||(mM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const i=new Map;for(let o=0;o<n.length;o++){const l=n[o],c=r(l);i.has(c)||i.set(c,l)}return Array.from(i.values())}e.uniqBy=t})(Xx)),Xx}var Qx={},pM;function e8(){return pM||(pM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t})(Qx)),Qx}var Jx={},e2={},t2={},gM;function Gne(){return gM||(gM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=t})(t2)),t2}var vM;function AC(){return vM||(vM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Gne();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(e2)),e2}var n2={},yM;function Yne(){return yM||(yM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t})(n2)),n2}var bM;function Wne(){return bM||(bM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=AC(),n=Yne();function r(i){return n.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=r})(Jx)),Jx}var r2={},i2={},xM;function Kne(){return xM||(xM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=CC();function n(r){return function(i){return t.get(i,r)}}e.property=n})(i2)),i2}var a2={},o2={},s2={},l2={},_M;function t8(){return _M||(_M=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})(l2)),l2}var u2={},wM;function n8(){return wM||(wM=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})(u2)),u2}var c2={},SM;function r8(){return SM||(SM=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})(c2)),c2}var CM;function Zne(){return CM||(CM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=t8(),n=n8(),r=r8();function i(m,y,x){return typeof x!="function"?i(m,y,()=>{}):o(m,y,function b(w,C,O,T,P,N){const F=x(w,C,O,T,P,N);return F!==void 0?!!F:o(w,C,b,N)},new Map)}function o(m,y,x,b){if(y===m)return!0;switch(typeof y){case"object":return l(m,y,x,b);case"function":return Object.keys(y).length>0?o(m,{...y},x,b):r.eq(m,y);default:return t.isObject(m)?typeof y=="string"?y==="":!0:r.eq(m,y)}}function l(m,y,x,b){if(y==null)return!0;if(Array.isArray(y))return f(m,y,x,b);if(y instanceof Map)return c(m,y,x,b);if(y instanceof Set)return h(m,y,x,b);const w=Object.keys(y);if(m==null)return w.length===0;if(w.length===0)return!0;if(b?.has(y))return b.get(y)===m;b?.set(y,m);try{for(let C=0;C<w.length;C++){const O=w[C];if(!n.isPrimitive(m)&&!(O in m)||y[O]===void 0&&m[O]!==void 0||y[O]===null&&m[O]!==null||!x(m[O],y[O],O,m,y,b))return!1}return!0}finally{b?.delete(y)}}function c(m,y,x,b){if(y.size===0)return!0;if(!(m instanceof Map))return!1;for(const[w,C]of y.entries()){const O=m.get(w);if(x(O,C,w,m,y,b)===!1)return!1}return!0}function f(m,y,x,b){if(y.length===0)return!0;if(!Array.isArray(m))return!1;const w=new Set;for(let C=0;C<y.length;C++){const O=y[C];let T=!1;for(let P=0;P<m.length;P++){if(w.has(P))continue;const N=m[P];let F=!1;if(x(N,O,C,m,y,b)&&(F=!0),F){w.add(P),T=!0;break}}if(!T)return!1}return!0}function h(m,y,x,b){return y.size===0?!0:m instanceof Set?f([...m],[...y],x,b):!1}e.isMatchWith=i,e.isSetMatch=h})(s2)),s2}var EM;function i8(){return EM||(EM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Zne();function n(r,i){return t.isMatchWith(r,i,()=>{})}e.isMatch=n})(o2)),o2}var f2={},d2={},h2={},AM;function Xne(){return AM||(AM=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})(h2)),h2}var m2={},OM;function a8(){return OM||(OM=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})(m2)),m2}var p2={},TM;function o8(){return TM||(TM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",r="[object Number]",i="[object Boolean]",o="[object Arguments]",l="[object Symbol]",c="[object Date]",f="[object Map]",h="[object Set]",m="[object Array]",y="[object Function]",x="[object ArrayBuffer]",b="[object Object]",w="[object Error]",C="[object DataView]",O="[object Uint8Array]",T="[object Uint8ClampedArray]",P="[object Uint16Array]",N="[object Uint32Array]",F="[object BigUint64Array]",B="[object Int8Array]",W="[object Int16Array]",Q="[object Int32Array]",re="[object BigInt64Array]",ce="[object Float32Array]",ae="[object Float64Array]";e.argumentsTag=o,e.arrayBufferTag=x,e.arrayTag=m,e.bigInt64ArrayTag=re,e.bigUint64ArrayTag=F,e.booleanTag=i,e.dataViewTag=C,e.dateTag=c,e.errorTag=w,e.float32ArrayTag=ce,e.float64ArrayTag=ae,e.functionTag=y,e.int16ArrayTag=W,e.int32ArrayTag=Q,e.int8ArrayTag=B,e.mapTag=f,e.numberTag=r,e.objectTag=b,e.regexpTag=t,e.setTag=h,e.stringTag=n,e.symbolTag=l,e.uint16ArrayTag=P,e.uint32ArrayTag=N,e.uint8ArrayTag=O,e.uint8ClampedArrayTag=T})(p2)),p2}var g2={},jM;function Qne(){return jM||(jM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t})(g2)),g2}var MM;function s8(){return MM||(MM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Xne(),n=a8(),r=o8(),i=n8(),o=Qne();function l(m,y){return c(m,void 0,m,new Map,y)}function c(m,y,x,b=new Map,w=void 0){const C=w?.(m,y,x,b);if(C!==void 0)return C;if(i.isPrimitive(m))return m;if(b.has(m))return b.get(m);if(Array.isArray(m)){const O=new Array(m.length);b.set(m,O);for(let T=0;T<m.length;T++)O[T]=c(m[T],T,x,b,w);return Object.hasOwn(m,"index")&&(O.index=m.index),Object.hasOwn(m,"input")&&(O.input=m.input),O}if(m instanceof Date)return new Date(m.getTime());if(m instanceof RegExp){const O=new RegExp(m.source,m.flags);return O.lastIndex=m.lastIndex,O}if(m instanceof Map){const O=new Map;b.set(m,O);for(const[T,P]of m)O.set(T,c(P,T,x,b,w));return O}if(m instanceof Set){const O=new Set;b.set(m,O);for(const T of m)O.add(c(T,void 0,x,b,w));return O}if(typeof Buffer<"u"&&Buffer.isBuffer(m))return m.subarray();if(o.isTypedArray(m)){const O=new(Object.getPrototypeOf(m)).constructor(m.length);b.set(m,O);for(let T=0;T<m.length;T++)O[T]=c(m[T],T,x,b,w);return O}if(m instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&m instanceof SharedArrayBuffer)return m.slice(0);if(m instanceof DataView){const O=new DataView(m.buffer.slice(0),m.byteOffset,m.byteLength);return b.set(m,O),f(O,m,x,b,w),O}if(typeof File<"u"&&m instanceof File){const O=new File([m],m.name,{type:m.type});return b.set(m,O),f(O,m,x,b,w),O}if(typeof Blob<"u"&&m instanceof Blob){const O=new Blob([m],{type:m.type});return b.set(m,O),f(O,m,x,b,w),O}if(m instanceof Error){const O=new m.constructor;return b.set(m,O),O.message=m.message,O.name=m.name,O.stack=m.stack,O.cause=m.cause,f(O,m,x,b,w),O}if(m instanceof Boolean){const O=new Boolean(m.valueOf());return b.set(m,O),f(O,m,x,b,w),O}if(m instanceof Number){const O=new Number(m.valueOf());return b.set(m,O),f(O,m,x,b,w),O}if(m instanceof String){const O=new String(m.valueOf());return b.set(m,O),f(O,m,x,b,w),O}if(typeof m=="object"&&h(m)){const O=Object.create(Object.getPrototypeOf(m));return b.set(m,O),f(O,m,x,b,w),O}return m}function f(m,y,x=m,b,w){const C=[...Object.keys(y),...t.getSymbols(y)];for(let O=0;O<C.length;O++){const T=C[O],P=Object.getOwnPropertyDescriptor(m,T);(P==null||P.writable)&&(m[T]=c(y[T],T,x,b,w))}}function h(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=l,e.cloneDeepWithImpl=c,e.copyProperties=f})(d2)),d2}var PM;function Jne(){return PM||(PM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=s8();function n(r){return t.cloneDeepWithImpl(r,void 0,r,new Map,void 0)}e.cloneDeep=n})(f2)),f2}var NM;function ere(){return NM||(NM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=i8(),n=Jne();function r(i){return i=n.cloneDeep(i),o=>t.isMatch(o,i)}e.matches=r})(a2)),a2}var v2={},y2={},b2={},LM;function tre(){return LM||(LM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=s8(),n=o8();function r(i,o){return t.cloneDeepWith(i,(l,c,f,h)=>{const m=o?.(l,c,f,h);if(m!==void 0)return m;if(typeof i=="object")switch(Object.prototype.toString.call(i)){case n.numberTag:case n.stringTag:case n.booleanTag:{const y=new i.constructor(i?.valueOf());return t.copyProperties(y,i),y}case n.argumentsTag:{const y={};return t.copyProperties(y,i),y.length=i.length,y[Symbol.iterator]=i[Symbol.iterator],y}default:return}})}e.cloneDeepWith=r})(b2)),b2}var RM;function nre(){return RM||(RM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tre();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(y2)),y2}var x2={},_2={},DM;function l8(){return DM||(DM=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})(_2)),_2}var w2={},kM;function rre(){return kM||(kM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=a8();function n(r){return r!==null&&typeof r=="object"&&t.getTag(r)==="[object Arguments]"}e.isArguments=n})(w2)),w2}var IM;function ire(){return IM||(IM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Wk(),n=l8(),r=rre(),i=SC();function o(l,c){let f;if(Array.isArray(c)?f=c:typeof c=="string"&&t.isDeepKey(c)&&l?.[c]==null?f=i.toPath(c):f=[c],f.length===0)return!1;let h=l;for(let m=0;m<f.length;m++){const y=f[m];if((h==null||!Object.hasOwn(h,y))&&!((Array.isArray(h)||r.isArguments(h))&&n.isIndex(y)&&y<h.length))return!1;h=h[y]}return!0}e.has=o})(x2)),x2}var zM;function are(){return zM||(zM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=i8(),n=wC(),r=nre(),i=CC(),o=ire();function l(c,f){switch(typeof c){case"object":{Object.is(c?.valueOf(),-0)&&(c="-0");break}case"number":{c=n.toKey(c);break}}return f=r.cloneDeep(f),function(h){const m=i.get(h,c);return m===void 0?o.has(h,c):f===void 0?m===void 0:t.isMatch(m,f)}}e.matchesProperty=l})(v2)),v2}var BM;function ore(){return BM||(BM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=e8(),n=Kne(),r=ere(),i=are();function o(l){if(l==null)return t.identity;switch(typeof l){case"function":return l;case"object":return Array.isArray(l)&&l.length===2?i.matchesProperty(l[0],l[1]):r.matches(l);case"string":case"symbol":case"number":return n.property(l)}}e.iteratee=o})(r2)),r2}var UM;function sre(){return UM||(UM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qne(),n=e8(),r=Wne(),i=ore();function o(l,c=n.identity){return r.isArrayLikeObject(l)?t.uniqBy(Array.from(l),i.iteratee(c)):[]}e.uniqBy=o})(Zx)),Zx}var S2,$M;function lre(){return $M||($M=1,S2=sre().uniqBy),S2}var ure=lre();const FM=Qi(ure);function cre(e,t,n){return t===!0?FM(e,n):typeof t=="function"?FM(e,t):e}var C2={exports:{}},E2={},A2={exports:{}},O2={};var VM;function fre(){if(VM)return O2;VM=1;var e=Af();function t(y,x){return y===x&&(y!==0||1/y===1/x)||y!==y&&x!==x}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function c(y,x){var b=x(),w=r({inst:{value:b,getSnapshot:x}}),C=w[0].inst,O=w[1];return o(function(){C.value=b,C.getSnapshot=x,f(C)&&O({inst:C})},[y,b,x]),i(function(){return f(C)&&O({inst:C}),y(function(){f(C)&&O({inst:C})})},[y]),l(b),b}function f(y){var x=y.getSnapshot;y=y.value;try{var b=x();return!n(y,b)}catch{return!0}}function h(y,x){return x()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return O2.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,O2}var HM;function dre(){return HM||(HM=1,A2.exports=fre()),A2.exports}var qM;function hre(){if(qM)return E2;qM=1;var e=Af(),t=dre();function n(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,c=e.useMemo,f=e.useDebugValue;return E2.useSyncExternalStoreWithSelector=function(h,m,y,x,b){var w=o(null);if(w.current===null){var C={hasValue:!1,value:null};w.current=C}else C=w.current;w=c(function(){function T(W){if(!P){if(P=!0,N=W,W=x(W),b!==void 0&&C.hasValue){var Q=C.value;if(b(Q,W))return F=Q}return F=W}if(Q=F,r(N,W))return Q;var re=x(W);return b!==void 0&&b(Q,re)?(N=W,Q):(N=W,F=re)}var P=!1,N,F,B=y===void 0?null:y;return[function(){return T(m())},B===null?void 0:function(){return T(B())}]},[m,y,x,b]);var O=i(h,w[0],w[1]);return l(function(){C.hasValue=!0,C.value=O},[O]),f(O),O},E2}var GM;function mre(){return GM||(GM=1,C2.exports=hre()),C2.exports}var pre=mre(),OC=_.createContext(null),gre=e=>e,sn=()=>{var e=_.useContext(OC);return e?e.store.dispatch:gre},nv=()=>{},vre=()=>nv,yre=(e,t)=>e===t;function Ve(e){var t=_.useContext(OC);return pre.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:vre,t?t.store.getState:nv,t?t.store.getState:nv,t?e:nv,yre)}var T2={},j2={},M2={},YM;function bre(){return YM||(YM=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,o)=>{if(r!==i){const l=t(r),c=t(i);if(l===c&&l===0){if(r<i)return o==="desc"?1:-1;if(r>i)return o==="desc"?-1:1}return o==="desc"?c-l:l-c}return 0};e.compareValues=n})(M2)),M2}var P2={},N2={},WM;function u8(){return WM||(WM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=t})(N2)),N2}var KM;function xre(){return KM||(KM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=u8(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(o,l){return Array.isArray(o)?!1:typeof o=="number"||typeof o=="boolean"||o==null||t.isSymbol(o)?!0:typeof o=="string"&&(r.test(o)||!n.test(o))||l!=null&&Object.hasOwn(l,o)}e.isKey=i})(P2)),P2}var ZM;function _re(){return ZM||(ZM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bre(),n=xre(),r=SC();function i(o,l,c,f){if(o==null)return[];c=f?void 0:c,Array.isArray(o)||(o=Object.values(o)),Array.isArray(l)||(l=l==null?[null]:[l]),l.length===0&&(l=[null]),Array.isArray(c)||(c=c==null?[]:[c]),c=c.map(b=>String(b));const h=(b,w)=>{let C=b;for(let O=0;O<w.length&&C!=null;++O)C=C[w[O]];return C},m=(b,w)=>w==null||b==null?w:typeof b=="object"&&"key"in b?Object.hasOwn(w,b.key)?w[b.key]:h(w,b.path):typeof b=="function"?b(w):Array.isArray(b)?h(w,b):typeof w=="object"?w[b]:w,y=l.map(b=>(Array.isArray(b)&&b.length===1&&(b=b[0]),b==null||typeof b=="function"||Array.isArray(b)||n.isKey(b)?b:{key:b,path:r.toPath(b)}));return o.map(b=>({original:b,criteria:y.map(w=>m(w,b))})).slice().sort((b,w)=>{for(let C=0;C<y.length;C++){const O=t.compareValues(b.criteria[C],w.criteria[C],c[C]);if(O!==0)return O}return 0}).map(b=>b.original)}e.orderBy=i})(j2)),j2}var L2={},XM;function wre(){return XM||(XM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r=1){const i=[],o=Math.floor(r),l=(c,f)=>{for(let h=0;h<c.length;h++){const m=c[h];Array.isArray(m)&&f<o?l(m,f+1):i.push(m)}};return l(n,0),i}e.flatten=t})(L2)),L2}var R2={},QM;function c8(){return QM||(QM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=l8(),n=AC(),r=t8(),i=r8();function o(l,c,f){return r.isObject(f)&&(typeof c=="number"&&n.isArrayLike(f)&&t.isIndex(c)&&c<f.length||typeof c=="string"&&c in f)?i.eq(f[c],l):!1}e.isIterateeCall=o})(R2)),R2}var JM;function Sre(){return JM||(JM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_re(),n=wre(),r=c8();function i(o,...l){const c=l.length;return c>1&&r.isIterateeCall(o,l[0],l[1])?l=[]:c>2&&r.isIterateeCall(l[0],l[1],l[2])&&(l=[l[0]]),t.orderBy(o,n.flatten(l),["asc"])}e.sortBy=i})(T2)),T2}var D2,eP;function Cre(){return eP||(eP=1,D2=Sre().sortBy),D2}var Ere=Cre();const x0=Qi(Ere);var f8=e=>e.legend.settings,Are=e=>e.legend.size,Ore=e=>e.legend.payload;Se([Ore,f8],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?x0(r,n):r});var Ag=1;function Tre(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=_.useState({height:0,left:0,top:0,width:0}),r=_.useCallback(i=>{if(i!=null){var o=i.getBoundingClientRect(),l={height:o.height,left:o.left,top:o.top,width:o.width};(Math.abs(l.height-t.height)>Ag||Math.abs(l.left-t.left)>Ag||Math.abs(l.top-t.top)>Ag||Math.abs(l.width-t.width)>Ag)&&n({height:l.height,left:l.left,top:l.top,width:l.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}var jre={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},d8=Et({name:"chartLayout",initialState:jre,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,i,o;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:Mre,setLayout:Pre,setChartSize:Nre,setScale:Lre}=d8.actions,Rre=d8.reducer;function h8(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function tP(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 ef(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tP(Object(n),!0).forEach(function(r){Dre(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dre(e,t,n){return(t=kre(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kre(e){var t=Ire(e,"string");return typeof t=="symbol"?t:t+""}function Ire(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 Qt(e,t,n){return pn(e)||pn(t)?n:ni(t)?zu(e,t,n):typeof t=="function"?t(e):n}var zre=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:o,verticalAlign:l,layout:c}=t;if((c==="vertical"||c==="horizontal"&&l==="middle")&&o!=="center"&&He(e[o]))return ef(ef({},e),{},{[o]:e[o]+(r||0)});if((c==="horizontal"||c==="vertical"&&o==="center")&&l!=="middle"&&He(e[l]))return ef(ef({},e),{},{[l]:e[l]+(i||0)})}return e},wl=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",m8=(e,t,n,r)=>{if(r)return e.map(c=>c.coordinate);var i,o,l=e.map(c=>(c.coordinate===t&&(i=!0),c.coordinate===n&&(o=!0),c.coordinate));return i||l.push(t),o||l.push(n),l},p8=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:i,range:o,scale:l,realScaleType:c,isCategorical:f,categoricalDomain:h,tickCount:m,ticks:y,niceTicks:x,axisType:b}=e;if(!l)return null;var w=c==="scaleBand"&&l.bandwidth?l.bandwidth()/2:2,C=i==="category"&&l.bandwidth?l.bandwidth()/w:0;if(C=b==="angleAxis"&&o&&o.length>=2?cr(o[0]-o[1])*2*C:C,y||x){var O=(y||x||[]).map((T,P)=>{var N=r?r.indexOf(T):T;return{coordinate:l(N)+C,value:T,offset:C,index:P}});return O.filter(T=>!_a(T.coordinate))}return f&&h?h.map((T,P)=>({coordinate:l(T)+C,value:T,index:P,offset:C})):l.ticks&&m!=null?l.ticks(m).map((T,P)=>({coordinate:l(T)+C,value:T,offset:C,index:P})):l.domain().map((T,P)=>({coordinate:l(T)+C,value:r?r[T]:T,index:P,offset:C}))},nP=1e-4,Bre=e=>{var t=e.domain();if(!(!t||t.length<=2)){var n=t.length,r=e.range(),i=Math.min(r[0],r[1])-nP,o=Math.max(r[0],r[1])+nP,l=e(t[0]),c=e(t[n-1]);(l<i||l>o||c<i||c>o)&&e.domain([t[0],t[n-1]])}},Ure=(e,t)=>{if(!t||t.length!==2||!He(t[0])||!He(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(!He(e[0])||e[0]<n)&&(i[0]=n),(!He(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},$re=e=>{var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,o=0,l=0;l<t;++l){var c=_a(e[l][n][1])?e[l][n][0]:e[l][n][1];c>=0?(e[l][n][0]=i,e[l][n][1]=i+c,i=e[l][n][1]):(e[l][n][0]=o,e[l][n][1]=o+c,o=e[l][n][1])}},Fre=e=>{var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,o=0;o<t;++o){var l=_a(e[o][n][1])?e[o][n][0]:e[o][n][1];l>=0?(e[o][n][0]=i,e[o][n][1]=i+l,i=e[o][n][1]):(e[o][n][0]=0,e[o][n][1]=0)}},Vre={sign:$re,expand:_ne,none:vf,silhouette:wne,wiggle:Sne,positive:Fre},Hre=(e,t,n)=>{var r=Vre[n],i=xne().keys(t).value((o,l)=>Number(Qt(o,l,0))).order(mw).offset(r);return i(e)};function qre(e){return e==null?void 0:String(e)}function rP(e){var{axis:t,ticks:n,bandSize:r,entry:i,index:o,dataKey:l}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!pn(i[t.dataKey])){var c=Zk(n,"value",i[t.dataKey]);if(c)return c.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var f=Qt(i,pn(l)?t.dataKey:l);return pn(f)?null:t.scale(f)}var iP=e=>{var{axis:t,ticks:n,offset:r,bandSize:i,entry:o,index:l}=e;if(t.type==="category")return n[l]?n[l].coordinate+r:null;var c=Qt(o,t.dataKey,t.scale.domain()[l]);return pn(c)?null:t.scale(c)-i/2+r},Gre=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]},Yre=e=>{var t=e.flat(2).filter(He);return[Math.min(...t),Math.max(...t)]},Wre=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],Kre=(e,t,n)=>{if(e!=null)return Wre(Object.keys(e).reduce((r,i)=>{var o=e[i],{stackedData:l}=o,c=l.reduce((f,h)=>{var m=h8(h,t,n),y=Yre(m);return[Math.min(f[0],y[0]),Math.max(f[1],y[1])]},[1/0,-1/0]);return[Math.min(c[0],r[0]),Math.max(c[1],r[1])]},[1/0,-1/0]))},aP=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,oP=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,yf=(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=x0(t,m=>m.coordinate),o=1/0,l=1,c=i.length;l<c;l++){var f=i[l],h=i[l-1];o=Math.min((f.coordinate||0)-(h.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0};function sP(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:o}=e;return ef(ef({},t),{},{dataKey:n,payload:r,value:i,name:o})}function kf(e,t){if(e)return String(e);if(typeof t=="string")return t}var Zre=(e,t)=>{if(t==="horizontal")return e.chartX;if(t==="vertical")return e.chartY},Xre=(e,t)=>t==="centric"?e.angle:e.radius,ts=e=>e.layout.width,ns=e=>e.layout.height,Qre=e=>e.layout.scale,g8=e=>e.layout.margin,_0=Se(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),w0=Se(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),v8="data-recharts-item-index",y8="data-recharts-item-data-key",ym=60;function lP(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 Og(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lP(Object(n),!0).forEach(function(r){Jre(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jre(e,t,n){return(t=eie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eie(e){var t=tie(e,"string");return typeof t=="symbol"?t:t+""}function tie(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 nie=e=>e.brush.height;function rie(e){var t=w0(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:ym;return n+i}return n},0)}function iie(e){var t=w0(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:ym;return n+i}return n},0)}function aie(e){var t=_0(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function oie(e){var t=_0(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var Jn=Se([ts,ns,g8,nie,rie,iie,aie,oie,f8,Are],(e,t,n,r,i,o,l,c,f,h)=>{var m={left:(n.left||0)+i,right:(n.right||0)+o},y={top:(n.top||0)+l,bottom:(n.bottom||0)+c},x=Og(Og({},y),m),b=x.bottom;x.bottom+=r,x=zre(x,f,h);var w=e-x.left-x.right,C=t-x.top-x.bottom;return Og(Og({brushBottom:b},x),{},{width:Math.max(w,0),height:Math.max(C,0)})}),sie=Se(Jn,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),TC=Se(ts,ns,(e,t)=>({x:0,y:0,width:e,height:t})),lie=_.createContext(null),wr=()=>_.useContext(lie)!=null,S0=e=>e.brush,C0=Se([S0,Jn,g8],(e,t,n)=>({height:e.height,x:He(e.x)?e.x:t.left,y:He(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:He(e.width)?e.width:t.width})),k2={},I2={},z2={},uP;function uie(){return uP||(uP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:i,edges:o}={}){let l,c=null;const f=o!=null&&o.includes("leading"),h=o==null||o.includes("trailing"),m=()=>{c!==null&&(n.apply(l,c),l=void 0,c=null)},y=()=>{h&&m(),C()};let x=null;const b=()=>{x!=null&&clearTimeout(x),x=setTimeout(()=>{x=null,y()},r)},w=()=>{x!==null&&(clearTimeout(x),x=null)},C=()=>{w(),l=void 0,c=null},O=()=>{m()},T=function(...P){if(i?.aborted)return;l=this,c=P;const N=x==null;b(),f&&N&&m()};return T.schedule=b,T.cancel=C,T.flush=O,i?.addEventListener("abort",C,{once:!0}),T}e.debounce=t})(z2)),z2}var cP;function cie(){return cP||(cP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=uie();function n(r,i=0,o={}){typeof o!="object"&&(o={});const{leading:l=!1,trailing:c=!0,maxWait:f}=o,h=Array(2);l&&(h[0]="leading"),c&&(h[1]="trailing");let m,y=null;const x=t.debounce(function(...C){m=r.apply(this,C),y=null},i,{edges:h}),b=function(...C){return f!=null&&(y===null&&(y=Date.now()),Date.now()-y>=f)?(m=r.apply(this,C),y=Date.now(),x.cancel(),x.schedule(),m):(x.apply(this,C),m)},w=()=>(x.flush(),m);return b.cancel=x.cancel,b.flush=w,b}e.debounce=n})(I2)),I2}var fP;function fie(){return fP||(fP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cie();function n(r,i=0,o={}){const{leading:l=!0,trailing:c=!0}=o;return t.debounce(r,i,{leading:l,maxWait:i,trailing:c})}e.throttle=n})(k2)),k2}var B2,dP;function die(){return dP||(dP=1,B2=fie().throttle),B2}var hie=die();const mie=Qi(hie);var Kv=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o]},b8=(e,t,n)=>{var{width:r="100%",height:i="100%",aspect:o,maxHeight:l}=n,c=Ho(r)?e:Number(r),f=Ho(i)?t:Number(i);return o&&o>0&&(c?f=c/o:f&&(c=f*o),l&&f!=null&&f>l&&(f=l)),{calculatedWidth:c,calculatedHeight:f}},pie={width:0,height:0,overflow:"visible"},gie={width:0,overflowX:"visible"},vie={height:0,overflowY:"visible"},yie={},bie=e=>{var{width:t,height:n}=e,r=Ho(t),i=Ho(n);return r&&i?pie:r?gie:i?vie:yie};function xie(e){var{width:t,height:n,aspect:r}=e,i=t,o=n;return i===void 0&&o===void 0?(i="100%",o="100%"):i===void 0?i=r&&r>0?void 0:"100%":o===void 0&&(o=r&&r>0?void 0:"100%"),{width:i,height:o}}function Rn(e){return Number.isFinite(e)}function Ka(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function gw(){return gw=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},gw.apply(null,arguments)}function hP(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 mP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hP(Object(n),!0).forEach(function(r){_ie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _ie(e,t,n){return(t=wie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wie(e){var t=Sie(e,"string");return typeof t=="symbol"?t:t+""}function Sie(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 x8=_.createContext({width:-1,height:-1});function Cie(e){return Ka(e.width)&&Ka(e.height)}function _8(e){var{children:t,width:n,height:r}=e,i=_.useMemo(()=>({width:n,height:r}),[n,r]);return Cie(i)?_.createElement(x8.Provider,{value:i},t):null}var jC=()=>_.useContext(x8),Eie=_.forwardRef((e,t)=>{var{aspect:n,initialDimension:r={width:-1,height:-1},width:i,height:o,minWidth:l=0,minHeight:c,maxHeight:f,children:h,debounce:m=0,id:y,className:x,onResize:b,style:w={}}=e,C=_.useRef(null),O=_.useRef();O.current=b,_.useImperativeHandle(t,()=>C.current);var[T,P]=_.useState({containerWidth:r.width,containerHeight:r.height}),N=_.useCallback((re,ce)=>{P(ae=>{var J=Math.round(re),oe=Math.round(ce);return ae.containerWidth===J&&ae.containerHeight===oe?ae:{containerWidth:J,containerHeight:oe}})},[]);_.useEffect(()=>{if(C.current==null||typeof ResizeObserver>"u")return Xu;var re=oe=>{var ve,{width:ie,height:ue}=oe[0].contentRect;N(ie,ue),(ve=O.current)===null||ve===void 0||ve.call(O,ie,ue)};m>0&&(re=mie(re,m,{trailing:!0,leading:!1}));var ce=new ResizeObserver(re),{width:ae,height:J}=C.current.getBoundingClientRect();return N(ae,J),ce.observe(C.current),()=>{ce.disconnect()}},[N,m]);var{containerWidth:F,containerHeight:B}=T;Kv(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:W,calculatedHeight:Q}=b8(F,B,{width:i,height:o,aspect:n,maxHeight:f});return Kv(W!=null&&W>0||Q!=null&&Q>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.`,W,Q,i,o,l,c,n),_.createElement("div",{id:y?"".concat(y):void 0,className:Oe("recharts-responsive-container",x),style:mP(mP({},w),{},{width:i,height:o,minWidth:l,minHeight:c,maxHeight:f}),ref:C},_.createElement("div",{style:bie({width:i,height:o})},_.createElement(_8,{width:W,height:Q},h)))}),Aie=_.forwardRef((e,t)=>{var n=jC();if(Ka(n.width)&&Ka(n.height))return e.children;var{width:r,height:i}=xie({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:o,calculatedHeight:l}=b8(void 0,void 0,{width:r,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return He(o)&&He(l)?_.createElement(_8,{width:o,height:l},e.children):_.createElement(Eie,gw({},e,{width:r,height:i,ref:t}))});function w8(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var E0=()=>{var e,t=wr(),n=Ve(sie),r=Ve(C0),i=(e=Ve(S0))===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}},Oie={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},S8=()=>{var e;return(e=Ve(Jn))!==null&&e!==void 0?e:Oie},C8=()=>Ve(ts),E8=()=>Ve(ns),At=e=>e.layout.layoutType,bm=()=>Ve(At),Tie=()=>{var e=bm();return e!==void 0},A0=e=>{var t=sn(),n=wr(),{width:r,height:i}=e,o=jC(),l=r,c=i;return o&&(l=o.width>0?o.width:r,c=o.height>0?o.height:i),_.useEffect(()=>{!n&&Ka(l)&&Ka(c)&&t(Nre({width:l,height:c}))},[t,n,l,c]),null},A8=Symbol.for("immer-nothing"),pP=Symbol.for("immer-draftable"),Ti=Symbol.for("immer-state");function ma(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Vh=Object.getPrototypeOf;function bf(e){return!!e&&!!e[Ti]}function Bu(e){return e?O8(e)||Array.isArray(e)||!!e[pP]||!!e.constructor?.[pP]||xm(e)||T0(e):!1}var jie=Object.prototype.constructor.toString(),gP=new WeakMap;function O8(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=gP.get(n);return r===void 0&&(r=Function.toString.call(n),gP.set(n,r)),r===jie}function Zv(e,t,n=!0){O0(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function O0(e){const t=e[Ti];return t?t.type_:Array.isArray(e)?1:xm(e)?2:T0(e)?3:0}function vw(e,t){return O0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function T8(e,t,n){const r=O0(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Mie(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function xm(e){return e instanceof Map}function T0(e){return e instanceof Set}function yu(e){return e.copy_||e.base_}function yw(e,t){if(xm(e))return new Map(e);if(T0(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=O8(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Ti];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const l=i[o],c=r[l];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[l]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[l]})}return Object.create(Vh(e),r)}else{const r=Vh(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function MC(e,t=!1){return j0(e)||bf(e)||!Bu(e)||(O0(e)>1&&Object.defineProperties(e,{set:Tg,add:Tg,clear:Tg,delete:Tg}),Object.freeze(e),t&&Object.values(e).forEach(n=>MC(n,!0))),e}function Pie(){ma(2)}var Tg={value:Pie};function j0(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var Nie={};function Uu(e){const t=Nie[e];return t||ma(0,e),t}var Hh;function j8(){return Hh}function Lie(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function vP(e,t){t&&(Uu("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function bw(e){xw(e),e.drafts_.forEach(Rie),e.drafts_=null}function xw(e){e===Hh&&(Hh=e.parent_)}function yP(e){return Hh=Lie(Hh,e)}function Rie(e){const t=e[Ti];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function bP(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ti].modified_&&(bw(t),ma(4)),Bu(e)&&(e=Xv(t,e),t.parent_||Qv(t,e)),t.patches_&&Uu("Patches").generateReplacementPatches_(n[Ti].base_,e,t.patches_,t.inversePatches_)):e=Xv(t,n,[]),bw(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==A8?e:void 0}function Xv(e,t,n){if(j0(t))return t;const r=e.immer_.shouldUseStrictIteration(),i=t[Ti];if(!i)return Zv(t,(o,l)=>xP(e,i,t,o,l,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return Qv(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let l=o,c=!1;i.type_===3&&(l=new Set(o),o.clear(),c=!0),Zv(l,(f,h)=>xP(e,i,o,f,h,n,c),r),Qv(e,o,!1),n&&e.patches_&&Uu("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function xP(e,t,n,r,i,o,l){if(i==null||typeof i!="object"&&!l)return;const c=j0(i);if(!(c&&!l)){if(bf(i)){const f=o&&t&&t.type_!==3&&!vw(t.assigned_,r)?o.concat(r):void 0,h=Xv(e,i,f);if(T8(n,r,h),bf(h))e.canAutoFreeze_=!1;else return}else l&&n.add(i);if(Bu(i)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===i&&c)return;Xv(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(xm(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&Qv(e,i)}}}function Qv(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&MC(t,n)}function Die(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:j8(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=PC;n&&(i=[r],o=qh);const{revoke:l,proxy:c}=Proxy.revocable(i,o);return r.draft_=c,r.revoke_=l,c}var PC={get(e,t){if(t===Ti)return e;const n=yu(e);if(!vw(n,t))return kie(e,n,t);const r=n[t];return e.finalized_||!Bu(r)?r:r===U2(e.base_,t)?($2(e),e.copy_[t]=ww(r,e)):r},has(e,t){return t in yu(e)},ownKeys(e){return Reflect.ownKeys(yu(e))},set(e,t,n){const r=M8(yu(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=U2(yu(e),t),o=i?.[Ti];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Mie(n,i)&&(n!==void 0||vw(e.base_,t)))return!0;$2(e),_w(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 U2(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,$2(e),_w(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=yu(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){ma(11)},getPrototypeOf(e){return Vh(e.base_)},setPrototypeOf(){ma(12)}},qh={};Zv(PC,(e,t)=>{qh[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});qh.deleteProperty=function(e,t){return qh.set.call(this,e,t,void 0)};qh.set=function(e,t,n){return PC.set.call(this,e[0],t,n,e[0])};function U2(e,t){const n=e[Ti];return(n?yu(n):e)[t]}function kie(e,t,n){const r=M8(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function M8(e,t){if(!(t in e))return;let n=Vh(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Vh(n)}}function _w(e){e.modified_||(e.modified_=!0,e.parent_&&_w(e.parent_))}function $2(e){e.copy_||(e.copy_=yw(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Iie=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const l=this;return function(f=o,...h){return l.produce(f,m=>n.call(this,m,...h))}}typeof n!="function"&&ma(6),r!==void 0&&typeof r!="function"&&ma(7);let i;if(Bu(t)){const o=yP(this),l=ww(t,void 0);let c=!0;try{i=n(l),c=!1}finally{c?bw(o):xw(o)}return vP(o,r),bP(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===A8&&(i=void 0),this.autoFreeze_&&MC(i,!0),r){const o=[],l=[];Uu("Patches").generateReplacementPatches_(t,i,o,l),r(o,l)}return i}else ma(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(l,...c)=>this.produceWithPatches(l,f=>t(f,...c));let r,i;return[this.produce(t,n,(l,c)=>{r=l,i=c}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Bu(e)||ma(8),bf(e)&&(e=zie(e));const t=yP(this),n=ww(e,void 0);return n[Ti].isManual_=!0,xw(t),n}finishDraft(e,t){const n=e&&e[Ti];(!n||!n.isManual_)&&ma(9);const{scope_:r}=n;return vP(r,t),bP(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}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=Uu("Patches").applyPatches_;return bf(e)?r(e,t):this.produce(e,i=>r(i,t))}};function ww(e,t){const n=xm(e)?Uu("MapSet").proxyMap_(e,t):T0(e)?Uu("MapSet").proxySet_(e,t):Die(e,t);return(t?t.scope_:j8()).drafts_.push(n),n}function zie(e){return bf(e)||ma(10,e),P8(e)}function P8(e){if(!Bu(e)||j0(e))return e;const t=e[Ti];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=yw(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=yw(e,!0);return Zv(n,(i,o)=>{T8(n,i,P8(o))},r),t&&(t.finalized_=!1),n}var Bie=new Iie;Bie.produce;var Uie={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},N8=Et({name:"legend",initialState:Uie,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:{reducer(e,t){e.payload.push(t.payload)},prepare:Zn()},removeLegendPayload:{reducer(e,t){var n=ko(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:Zn()}}}),{setLegendSize:Xwe,setLegendSettings:Qwe,addLegendPayload:L8,removeLegendPayload:R8}=N8.actions,$ie=N8.reducer;function Sw(){return Sw=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},Sw.apply(null,arguments)}function _P(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 F2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_P(Object(n),!0).forEach(function(r){Fie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_P(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fie(e,t,n){return(t=Vie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vie(e){var t=Hie(e,"string");return typeof t=="symbol"?t:t+""}function Hie(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 qie(e){return Array.isArray(e)&&ni(e[0])&&ni(e[1])?e.join(" ~ "):e}var Gie=e=>{var{separator:t=" : ",contentStyle:n={},itemStyle:r={},labelStyle:i={},payload:o,formatter:l,itemSorter:c,wrapperClassName:f,labelClassName:h,label:m,labelFormatter:y,accessibilityLayer:x=!1}=e,b=()=>{if(o&&o.length){var B={padding:0,margin:0},W=(c?x0(o,c):o).map((Q,re)=>{if(Q.type==="none")return null;var ce=Q.formatter||l||qie,{value:ae,name:J}=Q,oe=ae,ve=J;if(ce){var ie=ce(ae,J,Q,re,o);if(Array.isArray(ie))[oe,ve]=ie;else if(ie!=null)oe=ie;else return null}var ue=F2({display:"block",paddingTop:4,paddingBottom:4,color:Q.color||"#000"},r);return _.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(re),style:ue},ni(ve)?_.createElement("span",{className:"recharts-tooltip-item-name"},ve):null,ni(ve)?_.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,_.createElement("span",{className:"recharts-tooltip-item-value"},oe),_.createElement("span",{className:"recharts-tooltip-item-unit"},Q.unit||""))});return _.createElement("ul",{className:"recharts-tooltip-item-list",style:B},W)}return null},w=F2({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},n),C=F2({margin:0},i),O=!pn(m),T=O?m:"",P=Oe("recharts-default-tooltip",f),N=Oe("recharts-tooltip-label",h);O&&y&&o!==void 0&&o!==null&&(T=y(m,o));var F=x?{role:"status","aria-live":"assertive"}:{};return _.createElement("div",Sw({className:P,style:w},F),_.createElement("p",{className:N,style:C},_.isValidElement(T)?T:"".concat(T)),b())},rh="recharts-tooltip-wrapper",Yie={visibility:"hidden"};function Wie(e){var{coordinate:t,translateX:n,translateY:r}=e;return Oe(rh,{["".concat(rh,"-right")]:He(n)&&t&&He(t.x)&&n>=t.x,["".concat(rh,"-left")]:He(n)&&t&&He(t.x)&&n<t.x,["".concat(rh,"-bottom")]:He(r)&&t&&He(t.y)&&r>=t.y,["".concat(rh,"-top")]:He(r)&&t&&He(t.y)&&r<t.y})}function wP(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offsetTopLeft:i,position:o,reverseDirection:l,tooltipDimension:c,viewBox:f,viewBoxDimension:h}=e;if(o&&He(o[r]))return o[r];var m=n[r]-c-(i>0?i:0),y=n[r]+i;if(t[r])return l[r]?m:y;var x=f[r];if(x==null)return 0;if(l[r]){var b=m,w=x;return b<w?Math.max(y,x):Math.max(m,x)}if(h==null)return 0;var C=y+c,O=x+h;return C>O?Math.max(m,x):Math.max(y,x)}function Kie(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 Zie(e){var{allowEscapeViewBox:t,coordinate:n,offsetTopLeft:r,position:i,reverseDirection:o,tooltipBox:l,useTranslate3d:c,viewBox:f}=e,h,m,y;return l.height>0&&l.width>0&&n?(m=wP({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:l.width,viewBox:f,viewBoxDimension:f.width}),y=wP({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:l.height,viewBox:f,viewBoxDimension:f.height}),h=Kie({translateX:m,translateY:y,useTranslate3d:c})):h=Yie,{cssProperties:h,cssClasses:Wie({translateX:m,translateY:y,coordinate:n})}}function SP(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 jg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SP(Object(n),!0).forEach(function(r){Cw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cw(e,t,n){return(t=Xie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xie(e){var t=Qie(e,"string");return typeof t=="symbol"?t:t+""}function Qie(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 Jie extends _.PureComponent{constructor(){super(...arguments),Cw(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Cw(this,"handleKeyDown",t=>{if(t.key==="Escape"){var n,r,i,o;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=(o=this.props.coordinate)===null||o===void 0?void 0:o.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:o,coordinate:l,hasPayload:c,isAnimationActive:f,offset:h,position:m,reverseDirection:y,useTranslate3d:x,viewBox:b,wrapperStyle:w,lastBoundingBox:C,innerRef:O,hasPortalFromProps:T}=this.props,{cssClasses:P,cssProperties:N}=Zie({allowEscapeViewBox:n,coordinate:l,offsetTopLeft:h,position:m,reverseDirection:y,tooltipBox:{height:C.height,width:C.width},useTranslate3d:x,viewBox:b}),F=T?{}:jg(jg({transition:f&&t?"transform ".concat(r,"ms ").concat(i):void 0},N),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&c?"visible":"hidden",position:"absolute",top:0,left:0}),B=jg(jg({},F),{},{visibility:!this.state.dismissed&&t&&c?"visible":"hidden"},w);return _.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:P,style:B,ref:O},o)}}var eae=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Sl={devToolsEnabled:!1,isSsr:eae()},D8=()=>{var e;return(e=Ve(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Ew(){return Ew=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},Ew.apply(null,arguments)}function CP(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 EP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CP(Object(n),!0).forEach(function(r){tae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tae(e,t,n){return(t=nae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nae(e){var t=rae(e,"string");return typeof t=="symbol"?t:t+""}function rae(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 AP={curveBasisClosed:une,curveBasisOpen:cne,curveBasis:lne,curveBumpX:Wte,curveBumpY:Kte,curveLinearClosed:fne,curveLinear:v0,curveMonotoneX:dne,curveMonotoneY:hne,curveNatural:mne,curveStep:pne,curveStepAfter:vne,curveStepBefore:gne},Jv=e=>Rn(e.x)&&Rn(e.y),OP=e=>e.base!=null&&Jv(e.base)&&Jv(e),ih=e=>e.x,ah=e=>e.y,iae=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(vm(e));return(n==="curveMonotone"||n==="curveBump")&&t?AP["".concat(n).concat(t==="vertical"?"Y":"X")]:AP[n]||v0},aae=e=>{var{type:t="linear",points:n=[],baseLine:r,layout:i,connectNulls:o=!1}=e,l=iae(t,i),c=o?n.filter(Jv):n,f;if(Array.isArray(r)){var h=n.map((b,w)=>EP(EP({},b),{},{base:r[w]}));i==="vertical"?f=Eg().y(ah).x1(ih).x0(b=>b.base.x):f=Eg().x(ih).y1(ah).y0(b=>b.base.y);var m=f.defined(OP).curve(l),y=o?h.filter(OP):h;return m(y)}i==="vertical"&&He(r)?f=Eg().y(ah).x1(ih).x0(r):He(r)?f=Eg().x(ih).y1(ah).y0(r):f=Ik().x(ih).y(ah);var x=f.defined(Jv).curve(l);return x(c)},NC=e=>{var{className:t,points:n,path:r,pathRef:i}=e;if((!n||!n.length)&&!r)return null;var o=n&&n.length?aae(e):r;return _.createElement("path",Ew({},Oi(e),EC(e),{className:Oe("recharts-curve",t),d:o===null?void 0:o,ref:i}))},oae=["x","y","top","left","width","height","className"];function Aw(){return Aw=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},Aw.apply(null,arguments)}function TP(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 sae(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TP(Object(n),!0).forEach(function(r){lae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lae(e,t,n){return(t=uae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uae(e){var t=cae(e,"string");return typeof t=="symbol"?t:t+""}function cae(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 fae(e,t){if(e==null)return{};var n,r,i=dae(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function dae(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 hae=(e,t,n,r,i,o)=>"M".concat(e,",").concat(i,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(n),mae=e=>{var{x:t=0,y:n=0,top:r=0,left:i=0,width:o=0,height:l=0,className:c}=e,f=fae(e,oae),h=sae({x:t,y:n,top:r,left:i,width:o,height:l},f);return!He(t)||!He(n)||!He(o)||!He(l)||!He(r)||!He(i)?null:_.createElement("path",Aw({},Nr(h),{className:Oe("recharts-cross",c),d:hae(t,n,o,l,r,i)}))};function pae(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 jP(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 MP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jP(Object(n),!0).forEach(function(r){gae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gae(e,t,n){return(t=vae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vae(e){var t=yae(e,"string");return typeof t=="symbol"?t:t+""}function yae(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 bae=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),k8=(e,t,n)=>e.map(r=>"".concat(bae(r)," ").concat(t,"ms ").concat(n)).join(","),xae=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(i=>r.includes(i))),Gh=(e,t)=>Object.keys(t).reduce((n,r)=>MP(MP({},n),{},{[r]:e(r,t[r])}),{});function PP(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 Kn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PP(Object(n),!0).forEach(function(r){_ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _ae(e,t,n){return(t=wae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wae(e){var t=Sae(e,"string");return typeof t=="symbol"?t:t+""}function Sae(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 ey=(e,t,n)=>e+(t-e)*n,Ow=e=>{var{from:t,to:n}=e;return t!==n},I8=(e,t,n)=>{var r=Gh((i,o)=>{if(Ow(o)){var[l,c]=e(o.from,o.to,o.velocity);return Kn(Kn({},o),{},{from:l,velocity:c})}return o},t);return n<1?Gh((i,o)=>Ow(o)?Kn(Kn({},o),{},{velocity:ey(o.velocity,r[i].velocity,n),from:ey(o.from,r[i].from,n)}):o,t):I8(e,r,n-1)};function Cae(e,t,n,r,i,o){var l,c=r.reduce((x,b)=>Kn(Kn({},x),{},{[b]:{from:e[b],velocity:0,to:t[b]}}),{}),f=()=>Gh((x,b)=>b.from,c),h=()=>!Object.values(c).filter(Ow).length,m=null,y=x=>{l||(l=x);var b=x-l,w=b/n.dt;c=I8(n,c,w),i(Kn(Kn(Kn({},e),t),f())),l=x,h()||(m=o.setTimeout(y))};return()=>(m=o.setTimeout(y),()=>{var x;(x=m)===null||x===void 0||x()})}function Eae(e,t,n,r,i,o,l){var c=null,f=i.reduce((y,x)=>Kn(Kn({},y),{},{[x]:[e[x],t[x]]}),{}),h,m=y=>{h||(h=y);var x=(y-h)/r,b=Gh((C,O)=>ey(...O,n(x)),f);if(o(Kn(Kn(Kn({},e),t),b)),x<1)c=l.setTimeout(m);else{var w=Gh((C,O)=>ey(...O,n(1)),f);o(Kn(Kn(Kn({},e),t),w))}};return()=>(c=l.setTimeout(m),()=>{var y;(y=c)===null||y===void 0||y()})}const Aae=(e,t,n,r,i,o)=>{var l=xae(e,t);return n==null?()=>(i(Kn(Kn({},e),t)),()=>{}):n.isStepper===!0?Cae(e,t,n,l,i,o):Eae(e,t,n,r,l,i,o)};var ty=1e-4,z8=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],B8=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),NP=(e,t)=>n=>{var r=z8(e,t);return B8(r,n)},Oae=(e,t)=>n=>{var r=z8(e,t),i=[...r.map((o,l)=>o*l).slice(1),0];return B8(i,n)},Tae=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(n.length===1)switch(n[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var i,o=n[0].split("(");if(o[0]==="cubic-bezier"&&((i=o[1])===null||i===void 0?void 0:i.split(")")[0].split(",").length)===4){var l=o[1].split(")")[0].split(",").map(c=>parseFloat(c));return[l[0],l[1],l[2],l[3]]}}}return n.length===4?n:[0,0,1,1]},jae=(e,t,n,r)=>{var i=NP(e,n),o=NP(t,r),l=Oae(e,n),c=h=>h>1?1:h<0?0:h,f=h=>{for(var m=h>1?1:h,y=m,x=0;x<8;++x){var b=i(y)-m,w=l(y);if(Math.abs(b-m)<ty||w<ty)return o(y);y=c(y-b/w)}return o(y)};return f.isStepper=!1,f},LP=function(){return jae(...Tae(...arguments))},Mae=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:i=17}=t,o=(l,c,f)=>{var h=-(l-c)*n,m=f*r,y=f+(h-m)*i/1e3,x=f*i/1e3+l;return Math.abs(x-c)<ty&&Math.abs(y)<ty?[c,0]:[x,y]};return o.isStepper=!0,o.dt=i,o},Pae=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return LP(e);case"spring":return Mae();default:if(e.split("(")[0]==="cubic-bezier")return LP(e)}return typeof e=="function"?e:null};function Nae(e){var t,n=()=>null,r=!1,i=null,o=l=>{if(!r){if(Array.isArray(l)){if(!l.length)return;var c=l,[f,...h]=c;if(typeof f=="number"){i=e.setTimeout(o.bind(null,h),f);return}o(f),i=e.setTimeout(o.bind(null,h));return}typeof l=="string"&&(t=l,n(t)),typeof l=="object"&&(t=l,n(t)),typeof l=="function"&&l()}};return{stop:()=>{r=!0},start:l=>{r=!1,i&&(i(),i=null),o(l)},subscribe:l=>(n=l,()=>{n=()=>null}),getTimeoutController:()=>e}}class Lae{setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),i=null,o=l=>{l-r>=n?t(l):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(o))};return i=requestAnimationFrame(o),()=>{i!=null&&cancelAnimationFrame(i)}}}function Rae(){return Nae(new Lae)}var Dae=_.createContext(Rae);function kae(e,t){var n=_.useContext(Dae);return _.useMemo(()=>t??n(e),[e,t,n])}var Iae={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},RP={t:0},V2={t:1};function _m(e){var t=Qn(e,Iae),{isActive:n,canBegin:r,duration:i,easing:o,begin:l,onAnimationEnd:c,onAnimationStart:f,children:h}=t,m=kae(t.animationId,t.animationManager),[y,x]=_.useState(n?RP:V2),b=_.useRef(null);return _.useEffect(()=>{n||x(V2)},[n]),_.useEffect(()=>{if(!n||!r)return Xu;var w=Aae(RP,V2,Pae(o),i,x,m.getTimeoutController()),C=()=>{b.current=w()};return m.start([f,l,C,i,c]),()=>{m.stop(),b.current&&b.current(),c()}},[n,r,i,o,l,f,c,m]),h(y.t)}function wm(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=_.useRef(Fh(t)),r=_.useRef(e);return r.current!==e&&(n.current=Fh(t),r.current=e),n.current}var zae=["radius"],Bae=["radius"];function DP(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 kP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DP(Object(n),!0).forEach(function(r){Uae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uae(e,t,n){return(t=$ae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $ae(e){var t=Fae(e,"string");return typeof t=="symbol"?t:t+""}function Fae(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 ny(){return ny=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},ny.apply(null,arguments)}function IP(e,t){if(e==null)return{};var n,r,i=Vae(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Vae(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 zP=(e,t,n,r,i)=>{var o=Math.min(Math.abs(n)/2,Math.abs(r)/2),l=r>=0?1:-1,c=n>=0?1:-1,f=r>=0&&n>=0||r<0&&n<0?1:0,h;if(o>0&&i instanceof Array){for(var m=[0,0,0,0],y=0,x=4;y<x;y++)m[y]=i[y]>o?o:i[y];h="M".concat(e,",").concat(t+l*m[0]),m[0]>0&&(h+="A ".concat(m[0],",").concat(m[0],",0,0,").concat(f,",").concat(e+c*m[0],",").concat(t)),h+="L ".concat(e+n-c*m[1],",").concat(t),m[1]>0&&(h+="A ".concat(m[1],",").concat(m[1],",0,0,").concat(f,`,
|
||
`).concat(e+n,",").concat(t+l*m[1])),h+="L ".concat(e+n,",").concat(t+r-l*m[2]),m[2]>0&&(h+="A ".concat(m[2],",").concat(m[2],",0,0,").concat(f,`,
|
||
`).concat(e+n-c*m[2],",").concat(t+r)),h+="L ".concat(e+c*m[3],",").concat(t+r),m[3]>0&&(h+="A ".concat(m[3],",").concat(m[3],",0,0,").concat(f,`,
|
||
`).concat(e,",").concat(t+r-l*m[3])),h+="Z"}else if(o>0&&i===+i&&i>0){var b=Math.min(o,i);h="M ".concat(e,",").concat(t+l*b,`
|
||
A `).concat(b,",").concat(b,",0,0,").concat(f,",").concat(e+c*b,",").concat(t,`
|
||
L `).concat(e+n-c*b,",").concat(t,`
|
||
A `).concat(b,",").concat(b,",0,0,").concat(f,",").concat(e+n,",").concat(t+l*b,`
|
||
L `).concat(e+n,",").concat(t+r-l*b,`
|
||
A `).concat(b,",").concat(b,",0,0,").concat(f,",").concat(e+n-c*b,",").concat(t+r,`
|
||
L `).concat(e+c*b,",").concat(t+r,`
|
||
A `).concat(b,",").concat(b,",0,0,").concat(f,",").concat(e,",").concat(t+r-l*b," Z")}else h="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return h},BP={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},LC=e=>{var t=Qn(e,BP),n=_.useRef(null),[r,i]=_.useState(-1);_.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var I=n.current.getTotalLength();I&&i(I)}catch{}},[]);var{x:o,y:l,width:c,height:f,radius:h,className:m}=t,{animationEasing:y,animationDuration:x,animationBegin:b,isAnimationActive:w,isUpdateAnimationActive:C}=t,O=_.useRef(c),T=_.useRef(f),P=_.useRef(o),N=_.useRef(l),F=_.useMemo(()=>({x:o,y:l,width:c,height:f,radius:h}),[o,l,c,f,h]),B=wm(F,"rectangle-");if(o!==+o||l!==+l||c!==+c||f!==+f||c===0||f===0)return null;var W=Oe("recharts-rectangle",m);if(!C){var Q=Nr(t),{radius:re}=Q,ce=IP(Q,zae);return _.createElement("path",ny({},ce,{radius:typeof h=="number"?h:void 0,className:W,d:zP(o,l,c,f,h)}))}var ae=O.current,J=T.current,oe=P.current,ve=N.current,ie="0px ".concat(r===-1?1:r,"px"),ue="".concat(r,"px 0px"),Y=k8(["strokeDasharray"],x,typeof y=="string"?y:BP.animationEasing);return _.createElement(_m,{animationId:B,key:B,canBegin:r>0,duration:x,easing:y,isActive:C,begin:b},I=>{var z=fn(ae,c,I),H=fn(J,f,I),k=fn(oe,o,I),M=fn(ve,l,I);n.current&&(O.current=z,T.current=H,P.current=k,N.current=M);var q;w?I>0?q={transition:Y,strokeDasharray:ue}:q={strokeDasharray:ie}:q={strokeDasharray:ue};var ee=Nr(t),{radius:se}=ee,me=IP(ee,Bae);return _.createElement("path",ny({},me,{radius:typeof h=="number"?h:void 0,className:W,d:zP(k,M,z,H,h),ref:n,style:kP(kP({},q),t.style)}))})};function UP(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 $P(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UP(Object(n),!0).forEach(function(r){Hae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hae(e,t,n){return(t=qae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qae(e){var t=Gae(e,"string");return typeof t=="symbol"?t:t+""}function Gae(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 ry=Math.PI/180,Yae=e=>e*180/Math.PI,Fn=(e,t,n,r)=>({x:e+Math.cos(-ry*r)*n,y:t+Math.sin(-ry*r)*n}),U8=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},Wae=(e,t)=>{var{x:n,y:r}=e,{x:i,y:o}=t;return Math.sqrt((n-i)**2+(r-o)**2)},Kae=(e,t)=>{var{x:n,y:r}=e,{cx:i,cy:o}=t,l=Wae({x:n,y:r},{x:i,y:o});if(l<=0)return{radius:l,angle:0};var c=(n-i)/l,f=Math.acos(c);return r>o&&(f=2*Math.PI-f),{radius:l,angle:Yae(f),angleInRadian:f}},Zae=e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),i=Math.floor(n/360),o=Math.min(r,i);return{startAngle:t-o*360,endAngle:n-o*360}},Xae=(e,t)=>{var{startAngle:n,endAngle:r}=t,i=Math.floor(n/360),o=Math.floor(r/360),l=Math.min(i,o);return e+l*360},Qae=(e,t)=>{var{chartX:n,chartY:r}=e,{radius:i,angle:o}=Kae({x:n,y:r},t),{innerRadius:l,outerRadius:c}=t;if(i<l||i>c||i===0)return null;var{startAngle:f,endAngle:h}=Zae(t),m=o,y;if(f<=h){for(;m>h;)m-=360;for(;m<f;)m+=360;y=m>=f&&m<=h}else{for(;m>f;)m-=360;for(;m<h;)m+=360;y=m>=h&&m<=f}return y?$P($P({},t),{},{radius:i,angle:Xae(m,t)}):null};function $8(e){var{cx:t,cy:n,radius:r,startAngle:i,endAngle:o}=e,l=Fn(t,n,r,i),c=Fn(t,n,r,o);return{points:[l,c],cx:t,cy:n,radius:r,startAngle:i,endAngle:o}}function Tw(){return Tw=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},Tw.apply(null,arguments)}var Jae=(e,t)=>{var n=cr(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},Mg=e=>{var{cx:t,cy:n,radius:r,angle:i,sign:o,isExternal:l,cornerRadius:c,cornerIsExternal:f}=e,h=c*(l?1:-1)+r,m=Math.asin(c/h)/ry,y=f?i:i+o*m,x=Fn(t,n,h,y),b=Fn(t,n,r,y),w=f?i-o*m:i,C=Fn(t,n,h*Math.cos(m*ry),w);return{center:x,circleTangency:b,lineTangency:C,theta:m}},F8=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:o,endAngle:l}=e,c=Jae(o,l),f=o+c,h=Fn(t,n,i,o),m=Fn(t,n,i,f),y="M ".concat(h.x,",").concat(h.y,`
|
||
A `).concat(i,",").concat(i,`,0,
|
||
`).concat(+(Math.abs(c)>180),",").concat(+(o>f),`,
|
||
`).concat(m.x,",").concat(m.y,`
|
||
`);if(r>0){var x=Fn(t,n,r,o),b=Fn(t,n,r,f);y+="L ".concat(b.x,",").concat(b.y,`
|
||
A `).concat(r,",").concat(r,`,0,
|
||
`).concat(+(Math.abs(c)>180),",").concat(+(o<=f),`,
|
||
`).concat(x.x,",").concat(x.y," Z")}else y+="L ".concat(t,",").concat(n," Z");return y},eoe=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,cornerRadius:o,forceCornerRadius:l,cornerIsExternal:c,startAngle:f,endAngle:h}=e,m=cr(h-f),{circleTangency:y,lineTangency:x,theta:b}=Mg({cx:t,cy:n,radius:i,angle:f,sign:m,cornerRadius:o,cornerIsExternal:c}),{circleTangency:w,lineTangency:C,theta:O}=Mg({cx:t,cy:n,radius:i,angle:h,sign:-m,cornerRadius:o,cornerIsExternal:c}),T=c?Math.abs(f-h):Math.abs(f-h)-b-O;if(T<0)return l?"M ".concat(x.x,",").concat(x.y,`
|
||
a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
|
||
a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
|
||
`):F8({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:f,endAngle:h});var P="M ".concat(x.x,",").concat(x.y,`
|
||
A`).concat(o,",").concat(o,",0,0,").concat(+(m<0),",").concat(y.x,",").concat(y.y,`
|
||
A`).concat(i,",").concat(i,",0,").concat(+(T>180),",").concat(+(m<0),",").concat(w.x,",").concat(w.y,`
|
||
A`).concat(o,",").concat(o,",0,0,").concat(+(m<0),",").concat(C.x,",").concat(C.y,`
|
||
`);if(r>0){var{circleTangency:N,lineTangency:F,theta:B}=Mg({cx:t,cy:n,radius:r,angle:f,sign:m,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),{circleTangency:W,lineTangency:Q,theta:re}=Mg({cx:t,cy:n,radius:r,angle:h,sign:-m,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),ce=c?Math.abs(f-h):Math.abs(f-h)-B-re;if(ce<0&&o===0)return"".concat(P,"L").concat(t,",").concat(n,"Z");P+="L".concat(Q.x,",").concat(Q.y,`
|
||
A`).concat(o,",").concat(o,",0,0,").concat(+(m<0),",").concat(W.x,",").concat(W.y,`
|
||
A`).concat(r,",").concat(r,",0,").concat(+(ce>180),",").concat(+(m>0),",").concat(N.x,",").concat(N.y,`
|
||
A`).concat(o,",").concat(o,",0,0,").concat(+(m<0),",").concat(F.x,",").concat(F.y,"Z")}else P+="L".concat(t,",").concat(n,"Z");return P},toe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},V8=e=>{var t=Qn(e,toe),{cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:l,forceCornerRadius:c,cornerIsExternal:f,startAngle:h,endAngle:m,className:y}=t;if(o<i||h===m)return null;var x=Oe("recharts-sector",y),b=o-i,w=Mr(l,b,0,!0),C;return w>0&&Math.abs(h-m)<360?C=eoe({cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:Math.min(w,b/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:h,endAngle:m}):C=F8({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:h,endAngle:m}),_.createElement("path",Tw({},Nr(t),{className:x,d:C}))};function noe(e,t,n){if(e==="horizontal")return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e==="vertical")return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(Jk(t)){if(e==="centric"){var{cx:r,cy:i,innerRadius:o,outerRadius:l,angle:c}=t,f=Fn(r,i,o,c),h=Fn(r,i,l,c);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return $8(t)}}var H2={},q2={},G2={},FP;function roe(){return FP||(FP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=u8();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(G2)),G2}var VP;function ioe(){return VP||(VP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=roe();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})(q2)),q2}var HP;function aoe(){return HP||(HP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=c8(),n=ioe();function r(i,o,l){l&&typeof l!="number"&&t.isIterateeCall(i,o,l)&&(o=l=void 0),i=n.toFinite(i),o===void 0?(o=i,i=0):o=n.toFinite(o),l=l===void 0?i<o?1:-1:n.toFinite(l);const c=Math.max(Math.ceil((o-i)/(l||1)),0),f=new Array(c);for(let h=0;h<c;h++)f[h]=i,i+=l;return f}e.range=r})(H2)),H2}var Y2,qP;function ooe(){return qP||(qP=1,Y2=aoe().range),Y2}var soe=ooe();const H8=Qi(soe);function el(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function loe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function RC(e){let t,n,r;e.length!==2?(t=el,n=(c,f)=>el(e(c),f),r=(c,f)=>e(c)-f):(t=e===el||e===loe?e:uoe,n=e,r=e);function i(c,f,h=0,m=c.length){if(h<m){if(t(f,f)!==0)return m;do{const y=h+m>>>1;n(c[y],f)<0?h=y+1:m=y}while(h<m)}return h}function o(c,f,h=0,m=c.length){if(h<m){if(t(f,f)!==0)return m;do{const y=h+m>>>1;n(c[y],f)<=0?h=y+1:m=y}while(h<m)}return h}function l(c,f,h=0,m=c.length){const y=i(c,f,h,m-1);return y>h&&r(c[y-1],f)>-r(c[y],f)?y-1:y}return{left:i,center:l,right:o}}function uoe(){return 0}function q8(e){return e===null?NaN:+e}function*coe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const foe=RC(el),Sm=foe.right;RC(q8).center;class GP extends Map{constructor(t,n=moe){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(YP(this,t))}has(t){return super.has(YP(this,t))}set(t,n){return super.set(doe(this,t),n)}delete(t){return super.delete(hoe(this,t))}}function YP({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function doe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function hoe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function moe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function poe(e=el){if(e===el)return G8;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 G8(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const goe=Math.sqrt(50),voe=Math.sqrt(10),yoe=Math.sqrt(2);function iy(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),l=o>=goe?10:o>=voe?5:o>=yoe?2:1;let c,f,h;return i<0?(h=Math.pow(10,-i)/l,c=Math.round(e*h),f=Math.round(t*h),c/h<e&&++c,f/h>t&&--f,h=-h):(h=Math.pow(10,i)*l,c=Math.round(e/h),f=Math.round(t/h),c*h<e&&++c,f*h>t&&--f),f<c&&.5<=n&&n<2?iy(e,t,n*2):[c,f,h]}function jw(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,l]=r?iy(t,e,n):iy(e,t,n);if(!(o>=i))return[];const c=o-i+1,f=new Array(c);if(r)if(l<0)for(let h=0;h<c;++h)f[h]=(o-h)/-l;else for(let h=0;h<c;++h)f[h]=(o-h)*l;else if(l<0)for(let h=0;h<c;++h)f[h]=(i+h)/-l;else for(let h=0;h<c;++h)f[h]=(i+h)*l;return f}function Mw(e,t,n){return t=+t,e=+e,n=+n,iy(e,t,n)[2]}function Pw(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Mw(t,e,n):Mw(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function WP(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function KP(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function Y8(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?G8:poe(i);r>n;){if(r-n>600){const f=r-n+1,h=t-n+1,m=Math.log(f),y=.5*Math.exp(2*m/3),x=.5*Math.sqrt(m*y*(f-y)/f)*(h-f/2<0?-1:1),b=Math.max(n,Math.floor(t-h*y/f+x)),w=Math.min(r,Math.floor(t+(f-h)*y/f+x));Y8(e,t,b,w,i)}const o=e[t];let l=n,c=r;for(oh(e,n,t),i(e[r],o)>0&&oh(e,n,r);l<c;){for(oh(e,l,c),++l,--c;i(e[l],o)<0;)++l;for(;i(e[c],o)>0;)--c}i(e[n],o)===0?oh(e,n,c):(++c,oh(e,c,r)),c<=t&&(n=c+1),t<=c&&(r=c-1)}return e}function oh(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function boe(e,t,n){if(e=Float64Array.from(coe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return KP(e);if(t>=1)return WP(e);var r,i=(r-1)*t,o=Math.floor(i),l=WP(Y8(e,o).subarray(0,o+1)),c=KP(e.subarray(o+1));return l+(c-l)*(i-o)}}function xoe(e,t,n=q8){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,o=Math.floor(i),l=+n(e[o],o,e),c=+n(e[o+1],o+1,e);return l+(c-l)*(i-o)}}function _oe(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,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function Ji(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function rs(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 Nw=Symbol("implicit");function DC(){var e=new GP,t=[],n=[],r=Nw;function i(o){let l=e.get(o);if(l===void 0){if(r!==Nw)return r;e.set(o,l=t.push(o)-1)}return n[l%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new GP;for(const l of o)e.has(l)||e.set(l,t.push(l)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return DC(t,n).unknown(r)},Ji.apply(i,arguments),i}function kC(){var e=DC().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,l,c=!1,f=0,h=0,m=.5;delete e.unknown;function y(){var x=t().length,b=i<r,w=b?i:r,C=b?r:i;o=(C-w)/Math.max(1,x-f+h*2),c&&(o=Math.floor(o)),w+=(C-w-o*(x-f))*m,l=o*(1-f),c&&(w=Math.round(w),l=Math.round(l));var O=_oe(x).map(function(T){return w+o*T});return n(b?O.reverse():O)}return e.domain=function(x){return arguments.length?(t(x),y()):t()},e.range=function(x){return arguments.length?([r,i]=x,r=+r,i=+i,y()):[r,i]},e.rangeRound=function(x){return[r,i]=x,r=+r,i=+i,c=!0,y()},e.bandwidth=function(){return l},e.step=function(){return o},e.round=function(x){return arguments.length?(c=!!x,y()):c},e.padding=function(x){return arguments.length?(f=Math.min(1,h=+x),y()):f},e.paddingInner=function(x){return arguments.length?(f=Math.min(1,x),y()):f},e.paddingOuter=function(x){return arguments.length?(h=+x,y()):h},e.align=function(x){return arguments.length?(m=Math.max(0,Math.min(1,x)),y()):m},e.copy=function(){return kC(t(),[r,i]).round(c).paddingInner(f).paddingOuter(h).align(m)},Ji.apply(y(),arguments)}function W8(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return W8(t())},e}function woe(){return W8(kC.apply(null,arguments).paddingInner(1))}function IC(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function K8(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Cm(){}var Yh=.7,ay=1/Yh,lf="\\s*([+-]?\\d+)\\s*",Wh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ya="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Soe=/^#([0-9a-f]{3,8})$/,Coe=new RegExp(`^rgb\\(${lf},${lf},${lf}\\)$`),Eoe=new RegExp(`^rgb\\(${Ya},${Ya},${Ya}\\)$`),Aoe=new RegExp(`^rgba\\(${lf},${lf},${lf},${Wh}\\)$`),Ooe=new RegExp(`^rgba\\(${Ya},${Ya},${Ya},${Wh}\\)$`),Toe=new RegExp(`^hsl\\(${Wh},${Ya},${Ya}\\)$`),joe=new RegExp(`^hsla\\(${Wh},${Ya},${Ya},${Wh}\\)$`),ZP={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};IC(Cm,Kh,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:XP,formatHex:XP,formatHex8:Moe,formatHsl:Poe,formatRgb:QP,toString:QP});function XP(){return this.rgb().formatHex()}function Moe(){return this.rgb().formatHex8()}function Poe(){return Z8(this).formatHsl()}function QP(){return this.rgb().formatRgb()}function Kh(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Soe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?JP(t):n===3?new ri(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Pg(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Pg(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=Coe.exec(e))?new ri(t[1],t[2],t[3],1):(t=Eoe.exec(e))?new ri(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Aoe.exec(e))?Pg(t[1],t[2],t[3],t[4]):(t=Ooe.exec(e))?Pg(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Toe.exec(e))?n5(t[1],t[2]/100,t[3]/100,1):(t=joe.exec(e))?n5(t[1],t[2]/100,t[3]/100,t[4]):ZP.hasOwnProperty(e)?JP(ZP[e]):e==="transparent"?new ri(NaN,NaN,NaN,0):null}function JP(e){return new ri(e>>16&255,e>>8&255,e&255,1)}function Pg(e,t,n,r){return r<=0&&(e=t=n=NaN),new ri(e,t,n,r)}function Noe(e){return e instanceof Cm||(e=Kh(e)),e?(e=e.rgb(),new ri(e.r,e.g,e.b,e.opacity)):new ri}function Lw(e,t,n,r){return arguments.length===1?Noe(e):new ri(e,t,n,r??1)}function ri(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}IC(ri,Lw,K8(Cm,{brighter(e){return e=e==null?ay:Math.pow(ay,e),new ri(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Yh:Math.pow(Yh,e),new ri(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ri(Ou(this.r),Ou(this.g),Ou(this.b),oy(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:e5,formatHex:e5,formatHex8:Loe,formatRgb:t5,toString:t5}));function e5(){return`#${Su(this.r)}${Su(this.g)}${Su(this.b)}`}function Loe(){return`#${Su(this.r)}${Su(this.g)}${Su(this.b)}${Su((isNaN(this.opacity)?1:this.opacity)*255)}`}function t5(){const e=oy(this.opacity);return`${e===1?"rgb(":"rgba("}${Ou(this.r)}, ${Ou(this.g)}, ${Ou(this.b)}${e===1?")":`, ${e})`}`}function oy(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ou(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Su(e){return e=Ou(e),(e<16?"0":"")+e.toString(16)}function n5(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new pa(e,t,n,r)}function Z8(e){if(e instanceof pa)return new pa(e.h,e.s,e.l,e.opacity);if(e instanceof Cm||(e=Kh(e)),!e)return new pa;if(e instanceof pa)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),l=NaN,c=o-i,f=(o+i)/2;return c?(t===o?l=(n-r)/c+(n<r)*6:n===o?l=(r-t)/c+2:l=(t-n)/c+4,c/=f<.5?o+i:2-o-i,l*=60):c=f>0&&f<1?0:l,new pa(l,c,f,e.opacity)}function Roe(e,t,n,r){return arguments.length===1?Z8(e):new pa(e,t,n,r??1)}function pa(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}IC(pa,Roe,K8(Cm,{brighter(e){return e=e==null?ay:Math.pow(ay,e),new pa(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Yh:Math.pow(Yh,e),new pa(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 ri(W2(e>=240?e-240:e+120,i,r),W2(e,i,r),W2(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new pa(r5(this.h),Ng(this.s),Ng(this.l),oy(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=oy(this.opacity);return`${e===1?"hsl(":"hsla("}${r5(this.h)}, ${Ng(this.s)*100}%, ${Ng(this.l)*100}%${e===1?")":`, ${e})`}`}}));function r5(e){return e=(e||0)%360,e<0?e+360:e}function Ng(e){return Math.max(0,Math.min(1,e||0))}function W2(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 zC=e=>()=>e;function Doe(e,t){return function(n){return e+n*t}}function koe(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 Ioe(e){return(e=+e)==1?X8:function(t,n){return n-t?koe(t,n,e):zC(isNaN(t)?n:t)}}function X8(e,t){var n=t-e;return n?Doe(e,n):zC(isNaN(e)?t:e)}const i5=(function e(t){var n=Ioe(t);function r(i,o){var l=n((i=Lw(i)).r,(o=Lw(o)).r),c=n(i.g,o.g),f=n(i.b,o.b),h=X8(i.opacity,o.opacity);return function(m){return i.r=l(m),i.g=c(m),i.b=f(m),i.opacity=h(m),i+""}}return r.gamma=e,r})(1);function zoe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function Boe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Uoe(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),l;for(l=0;l<r;++l)i[l]=If(e[l],t[l]);for(;l<n;++l)o[l]=t[l];return function(c){for(l=0;l<r;++l)o[l]=i[l](c);return o}}function $oe(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function sy(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Foe(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]=If(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Rw=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,K2=new RegExp(Rw.source,"g");function Voe(e){return function(){return e}}function Hoe(e){return function(t){return e(t)+""}}function qoe(e,t){var n=Rw.lastIndex=K2.lastIndex=0,r,i,o,l=-1,c=[],f=[];for(e=e+"",t=t+"";(r=Rw.exec(e))&&(i=K2.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),c[l]?c[l]+=o:c[++l]=o),(r=r[0])===(i=i[0])?c[l]?c[l]+=i:c[++l]=i:(c[++l]=null,f.push({i:l,x:sy(r,i)})),n=K2.lastIndex;return n<t.length&&(o=t.slice(n),c[l]?c[l]+=o:c[++l]=o),c.length<2?f[0]?Hoe(f[0].x):Voe(t):(t=f.length,function(h){for(var m=0,y;m<t;++m)c[(y=f[m]).i]=y.x(h);return c.join("")})}function If(e,t){var n=typeof t,r;return t==null||n==="boolean"?zC(t):(n==="number"?sy:n==="string"?(r=Kh(t))?(t=r,i5):qoe:t instanceof Kh?i5:t instanceof Date?$oe:Boe(t)?zoe:Array.isArray(t)?Uoe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Foe:sy)(e,t)}function BC(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Goe(e,t){t===void 0&&(t=e,e=If);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(l){var c=Math.max(0,Math.min(r-1,Math.floor(l*=r)));return o[c](l-c)}}function Yoe(e){return function(){return e}}function ly(e){return+e}var a5=[0,1];function Ir(e){return e}function Dw(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Yoe(isNaN(t)?NaN:.5)}function Woe(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Koe(e,t,n){var r=e[0],i=e[1],o=t[0],l=t[1];return i<r?(r=Dw(i,r),o=n(l,o)):(r=Dw(r,i),o=n(o,l)),function(c){return o(r(c))}}function Zoe(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),l=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<r;)i[l]=Dw(e[l],e[l+1]),o[l]=n(t[l],t[l+1]);return function(c){var f=Sm(e,c,1,r)-1;return o[f](i[f](c))}}function Em(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function M0(){var e=a5,t=a5,n=If,r,i,o,l=Ir,c,f,h;function m(){var x=Math.min(e.length,t.length);return l!==Ir&&(l=Woe(e[0],e[x-1])),c=x>2?Zoe:Koe,f=h=null,y}function y(x){return x==null||isNaN(x=+x)?o:(f||(f=c(e.map(r),t,n)))(r(l(x)))}return y.invert=function(x){return l(i((h||(h=c(t,e.map(r),sy)))(x)))},y.domain=function(x){return arguments.length?(e=Array.from(x,ly),m()):e.slice()},y.range=function(x){return arguments.length?(t=Array.from(x),m()):t.slice()},y.rangeRound=function(x){return t=Array.from(x),n=BC,m()},y.clamp=function(x){return arguments.length?(l=x?!0:Ir,m()):l!==Ir},y.interpolate=function(x){return arguments.length?(n=x,m()):n},y.unknown=function(x){return arguments.length?(o=x,y):o},function(x,b){return r=x,i=b,m()}}function UC(){return M0()(Ir,Ir)}function Xoe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function uy(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 xf(e){return e=uy(Math.abs(e)),e?e[1]:NaN}function Qoe(e,t){return function(n,r){for(var i=n.length,o=[],l=0,c=e[0],f=0;i>0&&c>0&&(f+c+1>r&&(c=Math.max(1,r-f)),o.push(n.substring(i-=c,i+c)),!((f+=c+1)>r));)c=e[l=(l+1)%e.length];return o.reverse().join(t)}}function Joe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var ese=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Zh(e){if(!(t=ese.exec(e)))throw new Error("invalid format: "+e);var t;return new $C({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]})}Zh.prototype=$C.prototype;function $C(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+""}$C.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 tse(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 Q8;function nse(e,t){var n=uy(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(Q8=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,l=r.length;return o===l?r:o>l?r+new Array(o-l+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+uy(e,Math.max(0,t+o-1))[0]}function o5(e,t){var n=uy(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 s5={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Xoe,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)=>o5(e*100,t),r:o5,s:nse,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function l5(e){return e}var u5=Array.prototype.map,c5=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function rse(e){var t=e.grouping===void 0||e.thousands===void 0?l5:Qoe(u5.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+"",o=e.numerals===void 0?l5:Joe(u5.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(y){y=Zh(y);var x=y.fill,b=y.align,w=y.sign,C=y.symbol,O=y.zero,T=y.width,P=y.comma,N=y.precision,F=y.trim,B=y.type;B==="n"?(P=!0,B="g"):s5[B]||(N===void 0&&(N=12),F=!0,B="g"),(O||x==="0"&&b==="=")&&(O=!0,x="0",b="=");var W=C==="$"?n:C==="#"&&/[boxX]/.test(B)?"0"+B.toLowerCase():"",Q=C==="$"?r:/[%p]/.test(B)?l:"",re=s5[B],ce=/[defgprs%]/.test(B);N=N===void 0?6:/[gprs]/.test(B)?Math.max(1,Math.min(21,N)):Math.max(0,Math.min(20,N));function ae(J){var oe=W,ve=Q,ie,ue,Y;if(B==="c")ve=re(J)+ve,J="";else{J=+J;var I=J<0||1/J<0;if(J=isNaN(J)?f:re(Math.abs(J),N),F&&(J=tse(J)),I&&+J==0&&w!=="+"&&(I=!1),oe=(I?w==="("?w:c:w==="-"||w==="("?"":w)+oe,ve=(B==="s"?c5[8+Q8/3]:"")+ve+(I&&w==="("?")":""),ce){for(ie=-1,ue=J.length;++ie<ue;)if(Y=J.charCodeAt(ie),48>Y||Y>57){ve=(Y===46?i+J.slice(ie+1):J.slice(ie))+ve,J=J.slice(0,ie);break}}}P&&!O&&(J=t(J,1/0));var z=oe.length+J.length+ve.length,H=z<T?new Array(T-z+1).join(x):"";switch(P&&O&&(J=t(H+J,H.length?T-ve.length:1/0),H=""),b){case"<":J=oe+J+ve+H;break;case"=":J=oe+H+J+ve;break;case"^":J=H.slice(0,z=H.length>>1)+oe+J+ve+H.slice(z);break;default:J=H+oe+J+ve;break}return o(J)}return ae.toString=function(){return y+""},ae}function m(y,x){var b=h((y=Zh(y),y.type="f",y)),w=Math.max(-8,Math.min(8,Math.floor(xf(x)/3)))*3,C=Math.pow(10,-w),O=c5[8+w/3];return function(T){return b(C*T)+O}}return{format:h,formatPrefix:m}}var Lg,FC,J8;ise({thousands:",",grouping:[3],currency:["$",""]});function ise(e){return Lg=rse(e),FC=Lg.format,J8=Lg.formatPrefix,Lg}function ase(e){return Math.max(0,-xf(Math.abs(e)))}function ose(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(xf(t)/3)))*3-xf(Math.abs(e)))}function sse(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,xf(t)-xf(e))+1}function eI(e,t,n,r){var i=Pw(e,t,n),o;switch(r=Zh(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=ose(i,l))&&(r.precision=o),J8(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=sse(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=ase(i))&&(r.precision=o-(r.type==="%")*2);break}}return FC(r)}function Cl(e){var t=e.domain;return e.ticks=function(n){var r=t();return jw(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return eI(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,l=r[i],c=r[o],f,h,m=10;for(c<l&&(h=l,l=c,c=h,h=i,i=o,o=h);m-- >0;){if(h=Mw(l,c,n),h===f)return r[i]=l,r[o]=c,t(r);if(h>0)l=Math.floor(l/h)*h,c=Math.ceil(c/h)*h;else if(h<0)l=Math.ceil(l*h)/h,c=Math.floor(c*h)/h;else break;f=h}return e},e}function tI(){var e=UC();return e.copy=function(){return Em(e,tI())},Ji.apply(e,arguments),Cl(e)}function nI(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,ly),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return nI(e).unknown(t)},e=arguments.length?Array.from(e,ly):[0,1],Cl(n)}function rI(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],l;return o<i&&(l=n,n=r,r=l,l=i,i=o,o=l),e[n]=t.floor(i),e[r]=t.ceil(o),e}function f5(e){return Math.log(e)}function d5(e){return Math.exp(e)}function lse(e){return-Math.log(-e)}function use(e){return-Math.exp(-e)}function cse(e){return isFinite(e)?+("1e"+e):e<0?0:e}function fse(e){return e===10?cse:e===Math.E?Math.exp:t=>Math.pow(e,t)}function dse(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 h5(e){return(t,n)=>-e(-t,n)}function VC(e){const t=e(f5,d5),n=t.domain;let r=10,i,o;function l(){return i=dse(r),o=fse(r),n()[0]<0?(i=h5(i),o=h5(o),e(lse,use)):e(f5,d5),t}return t.base=function(c){return arguments.length?(r=+c,l()):r},t.domain=function(c){return arguments.length?(n(c),l()):n()},t.ticks=c=>{const f=n();let h=f[0],m=f[f.length-1];const y=m<h;y&&([h,m]=[m,h]);let x=i(h),b=i(m),w,C;const O=c==null?10:+c;let T=[];if(!(r%1)&&b-x<O){if(x=Math.floor(x),b=Math.ceil(b),h>0){for(;x<=b;++x)for(w=1;w<r;++w)if(C=x<0?w/o(-x):w*o(x),!(C<h)){if(C>m)break;T.push(C)}}else for(;x<=b;++x)for(w=r-1;w>=1;--w)if(C=x>0?w/o(-x):w*o(x),!(C<h)){if(C>m)break;T.push(C)}T.length*2<O&&(T=jw(h,m,O))}else T=jw(x,b,Math.min(b-x,O)).map(o);return y?T.reverse():T},t.tickFormat=(c,f)=>{if(c==null&&(c=10),f==null&&(f=r===10?"s":","),typeof f!="function"&&(!(r%1)&&(f=Zh(f)).precision==null&&(f.trim=!0),f=FC(f)),c===1/0)return f;const h=Math.max(1,r*c/t.ticks().length);return m=>{let y=m/o(Math.round(i(m)));return y*r<r-.5&&(y*=r),y<=h?f(m):""}},t.nice=()=>n(rI(n(),{floor:c=>o(Math.floor(i(c))),ceil:c=>o(Math.ceil(i(c)))})),t}function iI(){const e=VC(M0()).domain([1,10]);return e.copy=()=>Em(e,iI()).base(e.base()),Ji.apply(e,arguments),e}function m5(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function p5(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function HC(e){var t=1,n=e(m5(t),p5(t));return n.constant=function(r){return arguments.length?e(m5(t=+r),p5(t)):t},Cl(n)}function aI(){var e=HC(M0());return e.copy=function(){return Em(e,aI()).constant(e.constant())},Ji.apply(e,arguments)}function g5(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function hse(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function mse(e){return e<0?-e*e:e*e}function qC(e){var t=e(Ir,Ir),n=1;function r(){return n===1?e(Ir,Ir):n===.5?e(hse,mse):e(g5(n),g5(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Cl(t)}function GC(){var e=qC(M0());return e.copy=function(){return Em(e,GC()).exponent(e.exponent())},Ji.apply(e,arguments),e}function pse(){return GC.apply(null,arguments).exponent(.5)}function v5(e){return Math.sign(e)*e*e}function gse(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function oI(){var e=UC(),t=[0,1],n=!1,r;function i(o){var l=gse(e(o));return isNaN(l)?r:n?Math.round(l):l}return i.invert=function(o){return e.invert(v5(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,ly)).map(v5)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return oI(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Ji.apply(i,arguments),Cl(i)}function sI(){var e=[],t=[],n=[],r;function i(){var l=0,c=Math.max(1,t.length);for(n=new Array(c-1);++l<c;)n[l-1]=xoe(e,l/c);return o}function o(l){return l==null||isNaN(l=+l)?r:t[Sm(n,l)]}return o.invertExtent=function(l){var c=t.indexOf(l);return c<0?[NaN,NaN]:[c>0?n[c-1]:e[0],c<n.length?n[c]:e[e.length-1]]},o.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let c of l)c!=null&&!isNaN(c=+c)&&e.push(c);return e.sort(el),i()},o.range=function(l){return arguments.length?(t=Array.from(l),i()):t.slice()},o.unknown=function(l){return arguments.length?(r=l,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return sI().domain(e).range(t).unknown(r)},Ji.apply(o,arguments)}function lI(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function l(f){return f!=null&&f<=f?i[Sm(r,f,0,n)]:o}function c(){var f=-1;for(r=new Array(n);++f<n;)r[f]=((f+1)*t-(f-n)*e)/(n+1);return l}return l.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,c()):[e,t]},l.range=function(f){return arguments.length?(n=(i=Array.from(f)).length-1,c()):i.slice()},l.invertExtent=function(f){var h=i.indexOf(f);return h<0?[NaN,NaN]:h<1?[e,r[0]]:h>=n?[r[n-1],t]:[r[h-1],r[h]]},l.unknown=function(f){return arguments.length&&(o=f),l},l.thresholds=function(){return r.slice()},l.copy=function(){return lI().domain([e,t]).range(i).unknown(o)},Ji.apply(Cl(l),arguments)}function uI(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Sm(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var l=t.indexOf(o);return[e[l-1],e[l]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return uI().domain(e).range(t).unknown(n)},Ji.apply(i,arguments)}const Z2=new Date,X2=new Date;function er(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const l=i(o),c=i.ceil(o);return o-l<c-o?l:c},i.offset=(o,l)=>(t(o=new Date(+o),l==null?1:Math.floor(l)),o),i.range=(o,l,c)=>{const f=[];if(o=i.ceil(o),c=c==null?1:Math.floor(c),!(o<l)||!(c>0))return f;let h;do f.push(h=new Date(+o)),t(o,c),e(o);while(h<o&&o<l);return f},i.filter=o=>er(l=>{if(l>=l)for(;e(l),!o(l);)l.setTime(l-1)},(l,c)=>{if(l>=l)if(c<0)for(;++c<=0;)for(;t(l,-1),!o(l););else for(;--c>=0;)for(;t(l,1),!o(l););}),n&&(i.count=(o,l)=>(Z2.setTime(+o),X2.setTime(+l),e(Z2),e(X2),Math.floor(n(Z2,X2))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?l=>r(l)%o===0:l=>i.count(0,l)%o===0):i)),i}const cy=er(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);cy.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?er(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):cy);cy.range;const Lo=1e3,Wi=Lo*60,Ro=Wi*60,qo=Ro*24,YC=qo*7,y5=qo*30,Q2=qo*365,Cu=er(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Lo)},(e,t)=>(t-e)/Lo,e=>e.getUTCSeconds());Cu.range;const WC=er(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Lo)},(e,t)=>{e.setTime(+e+t*Wi)},(e,t)=>(t-e)/Wi,e=>e.getMinutes());WC.range;const KC=er(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Wi)},(e,t)=>(t-e)/Wi,e=>e.getUTCMinutes());KC.range;const ZC=er(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Lo-e.getMinutes()*Wi)},(e,t)=>{e.setTime(+e+t*Ro)},(e,t)=>(t-e)/Ro,e=>e.getHours());ZC.range;const XC=er(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ro)},(e,t)=>(t-e)/Ro,e=>e.getUTCHours());XC.range;const Am=er(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Wi)/qo,e=>e.getDate()-1);Am.range;const P0=er(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/qo,e=>e.getUTCDate()-1);P0.range;const cI=er(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/qo,e=>Math.floor(e/qo));cI.range;function Qu(e){return er(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())*Wi)/YC)}const N0=Qu(0),fy=Qu(1),vse=Qu(2),yse=Qu(3),_f=Qu(4),bse=Qu(5),xse=Qu(6);N0.range;fy.range;vse.range;yse.range;_f.range;bse.range;xse.range;function Ju(e){return er(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)/YC)}const L0=Ju(0),dy=Ju(1),_se=Ju(2),wse=Ju(3),wf=Ju(4),Sse=Ju(5),Cse=Ju(6);L0.range;dy.range;_se.range;wse.range;wf.range;Sse.range;Cse.range;const QC=er(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());QC.range;const JC=er(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());JC.range;const Go=er(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());Go.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:er(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)});Go.range;const Yo=er(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());Yo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:er(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)});Yo.range;function fI(e,t,n,r,i,o){const l=[[Cu,1,Lo],[Cu,5,5*Lo],[Cu,15,15*Lo],[Cu,30,30*Lo],[o,1,Wi],[o,5,5*Wi],[o,15,15*Wi],[o,30,30*Wi],[i,1,Ro],[i,3,3*Ro],[i,6,6*Ro],[i,12,12*Ro],[r,1,qo],[r,2,2*qo],[n,1,YC],[t,1,y5],[t,3,3*y5],[e,1,Q2]];function c(h,m,y){const x=m<h;x&&([h,m]=[m,h]);const b=y&&typeof y.range=="function"?y:f(h,m,y),w=b?b.range(h,+m+1):[];return x?w.reverse():w}function f(h,m,y){const x=Math.abs(m-h)/y,b=RC(([,,O])=>O).right(l,x);if(b===l.length)return e.every(Pw(h/Q2,m/Q2,y));if(b===0)return cy.every(Math.max(Pw(h,m,y),1));const[w,C]=l[x/l[b-1][2]<l[b][2]/x?b-1:b];return w.every(C)}return[c,f]}const[Ese,Ase]=fI(Yo,JC,L0,cI,XC,KC),[Ose,Tse]=fI(Go,QC,N0,Am,ZC,WC);function J2(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 e_(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 sh(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function jse(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,l=e.shortDays,c=e.months,f=e.shortMonths,h=lh(i),m=uh(i),y=lh(o),x=uh(o),b=lh(l),w=uh(l),C=lh(c),O=uh(c),T=lh(f),P=uh(f),N={a:I,A:z,b:H,B:k,c:null,d:C5,e:C5,f:Qse,g:lle,G:cle,H:Kse,I:Zse,j:Xse,L:dI,m:Jse,M:ele,p:M,q,Q:O5,s:T5,S:tle,u:nle,U:rle,V:ile,w:ale,W:ole,x:null,X:null,y:sle,Y:ule,Z:fle,"%":A5},F={a:ee,A:se,b:me,B:de,c:null,d:E5,e:E5,f:ple,g:Ele,G:Ole,H:dle,I:hle,j:mle,L:mI,m:gle,M:vle,p:be,q:D,Q:O5,s:T5,S:yle,u:ble,U:xle,V:_le,w:wle,W:Sle,x:null,X:null,y:Cle,Y:Ale,Z:Tle,"%":A5},B={a:ae,A:J,b:oe,B:ve,c:ie,d:w5,e:w5,f:qse,g:_5,G:x5,H:S5,I:S5,j:$se,L:Hse,m:Use,M:Fse,p:ce,q:Bse,Q:Yse,s:Wse,S:Vse,u:Rse,U:Dse,V:kse,w:Lse,W:Ise,x:ue,X:Y,y:_5,Y:x5,Z:zse,"%":Gse};N.x=W(n,N),N.X=W(r,N),N.c=W(t,N),F.x=W(n,F),F.X=W(r,F),F.c=W(t,F);function W(R,G){return function(ne){var V=[],X=-1,te=0,he=R.length,xe,Le,ke;for(ne instanceof Date||(ne=new Date(+ne));++X<he;)R.charCodeAt(X)===37&&(V.push(R.slice(te,X)),(Le=b5[xe=R.charAt(++X)])!=null?xe=R.charAt(++X):Le=xe==="e"?" ":"0",(ke=G[xe])&&(xe=ke(ne,Le)),V.push(xe),te=X+1);return V.push(R.slice(te,X)),V.join("")}}function Q(R,G){return function(ne){var V=sh(1900,void 0,1),X=re(V,R,ne+="",0),te,he;if(X!=ne.length)return null;if("Q"in V)return new Date(V.Q);if("s"in V)return new Date(V.s*1e3+("L"in V?V.L:0));if(G&&!("Z"in V)&&(V.Z=0),"p"in V&&(V.H=V.H%12+V.p*12),V.m===void 0&&(V.m="q"in V?V.q:0),"V"in V){if(V.V<1||V.V>53)return null;"w"in V||(V.w=1),"Z"in V?(te=e_(sh(V.y,0,1)),he=te.getUTCDay(),te=he>4||he===0?dy.ceil(te):dy(te),te=P0.offset(te,(V.V-1)*7),V.y=te.getUTCFullYear(),V.m=te.getUTCMonth(),V.d=te.getUTCDate()+(V.w+6)%7):(te=J2(sh(V.y,0,1)),he=te.getDay(),te=he>4||he===0?fy.ceil(te):fy(te),te=Am.offset(te,(V.V-1)*7),V.y=te.getFullYear(),V.m=te.getMonth(),V.d=te.getDate()+(V.w+6)%7)}else("W"in V||"U"in V)&&("w"in V||(V.w="u"in V?V.u%7:"W"in V?1:0),he="Z"in V?e_(sh(V.y,0,1)).getUTCDay():J2(sh(V.y,0,1)).getDay(),V.m=0,V.d="W"in V?(V.w+6)%7+V.W*7-(he+5)%7:V.w+V.U*7-(he+6)%7);return"Z"in V?(V.H+=V.Z/100|0,V.M+=V.Z%100,e_(V)):J2(V)}}function re(R,G,ne,V){for(var X=0,te=G.length,he=ne.length,xe,Le;X<te;){if(V>=he)return-1;if(xe=G.charCodeAt(X++),xe===37){if(xe=G.charAt(X++),Le=B[xe in b5?G.charAt(X++):xe],!Le||(V=Le(R,ne,V))<0)return-1}else if(xe!=ne.charCodeAt(V++))return-1}return V}function ce(R,G,ne){var V=h.exec(G.slice(ne));return V?(R.p=m.get(V[0].toLowerCase()),ne+V[0].length):-1}function ae(R,G,ne){var V=b.exec(G.slice(ne));return V?(R.w=w.get(V[0].toLowerCase()),ne+V[0].length):-1}function J(R,G,ne){var V=y.exec(G.slice(ne));return V?(R.w=x.get(V[0].toLowerCase()),ne+V[0].length):-1}function oe(R,G,ne){var V=T.exec(G.slice(ne));return V?(R.m=P.get(V[0].toLowerCase()),ne+V[0].length):-1}function ve(R,G,ne){var V=C.exec(G.slice(ne));return V?(R.m=O.get(V[0].toLowerCase()),ne+V[0].length):-1}function ie(R,G,ne){return re(R,t,G,ne)}function ue(R,G,ne){return re(R,n,G,ne)}function Y(R,G,ne){return re(R,r,G,ne)}function I(R){return l[R.getDay()]}function z(R){return o[R.getDay()]}function H(R){return f[R.getMonth()]}function k(R){return c[R.getMonth()]}function M(R){return i[+(R.getHours()>=12)]}function q(R){return 1+~~(R.getMonth()/3)}function ee(R){return l[R.getUTCDay()]}function se(R){return o[R.getUTCDay()]}function me(R){return f[R.getUTCMonth()]}function de(R){return c[R.getUTCMonth()]}function be(R){return i[+(R.getUTCHours()>=12)]}function D(R){return 1+~~(R.getUTCMonth()/3)}return{format:function(R){var G=W(R+="",N);return G.toString=function(){return R},G},parse:function(R){var G=Q(R+="",!1);return G.toString=function(){return R},G},utcFormat:function(R){var G=W(R+="",F);return G.toString=function(){return R},G},utcParse:function(R){var G=Q(R+="",!0);return G.toString=function(){return R},G}}}var b5={"-":"",_:" ",0:"0"},fr=/^\s*\d+/,Mse=/^%/,Pse=/[\\^$*+?|[\]().{}]/g;function Nt(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Nse(e){return e.replace(Pse,"\\$&")}function lh(e){return new RegExp("^(?:"+e.map(Nse).join("|")+")","i")}function uh(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function Lse(e,t,n){var r=fr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Rse(e,t,n){var r=fr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Dse(e,t,n){var r=fr.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function kse(e,t,n){var r=fr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Ise(e,t,n){var r=fr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function x5(e,t,n){var r=fr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function _5(e,t,n){var r=fr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function zse(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 Bse(e,t,n){var r=fr.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Use(e,t,n){var r=fr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function w5(e,t,n){var r=fr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function $se(e,t,n){var r=fr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function S5(e,t,n){var r=fr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Fse(e,t,n){var r=fr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Vse(e,t,n){var r=fr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Hse(e,t,n){var r=fr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function qse(e,t,n){var r=fr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Gse(e,t,n){var r=Mse.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Yse(e,t,n){var r=fr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Wse(e,t,n){var r=fr.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function C5(e,t){return Nt(e.getDate(),t,2)}function Kse(e,t){return Nt(e.getHours(),t,2)}function Zse(e,t){return Nt(e.getHours()%12||12,t,2)}function Xse(e,t){return Nt(1+Am.count(Go(e),e),t,3)}function dI(e,t){return Nt(e.getMilliseconds(),t,3)}function Qse(e,t){return dI(e,t)+"000"}function Jse(e,t){return Nt(e.getMonth()+1,t,2)}function ele(e,t){return Nt(e.getMinutes(),t,2)}function tle(e,t){return Nt(e.getSeconds(),t,2)}function nle(e){var t=e.getDay();return t===0?7:t}function rle(e,t){return Nt(N0.count(Go(e)-1,e),t,2)}function hI(e){var t=e.getDay();return t>=4||t===0?_f(e):_f.ceil(e)}function ile(e,t){return e=hI(e),Nt(_f.count(Go(e),e)+(Go(e).getDay()===4),t,2)}function ale(e){return e.getDay()}function ole(e,t){return Nt(fy.count(Go(e)-1,e),t,2)}function sle(e,t){return Nt(e.getFullYear()%100,t,2)}function lle(e,t){return e=hI(e),Nt(e.getFullYear()%100,t,2)}function ule(e,t){return Nt(e.getFullYear()%1e4,t,4)}function cle(e,t){var n=e.getDay();return e=n>=4||n===0?_f(e):_f.ceil(e),Nt(e.getFullYear()%1e4,t,4)}function fle(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Nt(t/60|0,"0",2)+Nt(t%60,"0",2)}function E5(e,t){return Nt(e.getUTCDate(),t,2)}function dle(e,t){return Nt(e.getUTCHours(),t,2)}function hle(e,t){return Nt(e.getUTCHours()%12||12,t,2)}function mle(e,t){return Nt(1+P0.count(Yo(e),e),t,3)}function mI(e,t){return Nt(e.getUTCMilliseconds(),t,3)}function ple(e,t){return mI(e,t)+"000"}function gle(e,t){return Nt(e.getUTCMonth()+1,t,2)}function vle(e,t){return Nt(e.getUTCMinutes(),t,2)}function yle(e,t){return Nt(e.getUTCSeconds(),t,2)}function ble(e){var t=e.getUTCDay();return t===0?7:t}function xle(e,t){return Nt(L0.count(Yo(e)-1,e),t,2)}function pI(e){var t=e.getUTCDay();return t>=4||t===0?wf(e):wf.ceil(e)}function _le(e,t){return e=pI(e),Nt(wf.count(Yo(e),e)+(Yo(e).getUTCDay()===4),t,2)}function wle(e){return e.getUTCDay()}function Sle(e,t){return Nt(dy.count(Yo(e)-1,e),t,2)}function Cle(e,t){return Nt(e.getUTCFullYear()%100,t,2)}function Ele(e,t){return e=pI(e),Nt(e.getUTCFullYear()%100,t,2)}function Ale(e,t){return Nt(e.getUTCFullYear()%1e4,t,4)}function Ole(e,t){var n=e.getUTCDay();return e=n>=4||n===0?wf(e):wf.ceil(e),Nt(e.getUTCFullYear()%1e4,t,4)}function Tle(){return"+0000"}function A5(){return"%"}function O5(e){return+e}function T5(e){return Math.floor(+e/1e3)}var Yc,gI,vI;jle({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 jle(e){return Yc=jse(e),gI=Yc.format,Yc.parse,vI=Yc.utcFormat,Yc.utcParse,Yc}function Mle(e){return new Date(e)}function Ple(e){return e instanceof Date?+e:+new Date(+e)}function e3(e,t,n,r,i,o,l,c,f,h){var m=UC(),y=m.invert,x=m.domain,b=h(".%L"),w=h(":%S"),C=h("%I:%M"),O=h("%I %p"),T=h("%a %d"),P=h("%b %d"),N=h("%B"),F=h("%Y");function B(W){return(f(W)<W?b:c(W)<W?w:l(W)<W?C:o(W)<W?O:r(W)<W?i(W)<W?T:P:n(W)<W?N:F)(W)}return m.invert=function(W){return new Date(y(W))},m.domain=function(W){return arguments.length?x(Array.from(W,Ple)):x().map(Mle)},m.ticks=function(W){var Q=x();return e(Q[0],Q[Q.length-1],W??10)},m.tickFormat=function(W,Q){return Q==null?B:h(Q)},m.nice=function(W){var Q=x();return(!W||typeof W.range!="function")&&(W=t(Q[0],Q[Q.length-1],W??10)),W?x(rI(Q,W)):m},m.copy=function(){return Em(m,e3(e,t,n,r,i,o,l,c,f,h))},m}function Nle(){return Ji.apply(e3(Ose,Tse,Go,QC,N0,Am,ZC,WC,Cu,gI).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Lle(){return Ji.apply(e3(Ese,Ase,Yo,JC,L0,P0,XC,KC,Cu,vI).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function R0(){var e=0,t=1,n,r,i,o,l=Ir,c=!1,f;function h(y){return y==null||isNaN(y=+y)?f:l(i===0?.5:(y=(o(y)-n)*i,c?Math.max(0,Math.min(1,y)):y))}h.domain=function(y){return arguments.length?([e,t]=y,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),h):[e,t]},h.clamp=function(y){return arguments.length?(c=!!y,h):c},h.interpolator=function(y){return arguments.length?(l=y,h):l};function m(y){return function(x){var b,w;return arguments.length?([b,w]=x,l=y(b,w),h):[l(0),l(1)]}}return h.range=m(If),h.rangeRound=m(BC),h.unknown=function(y){return arguments.length?(f=y,h):f},function(y){return o=y,n=y(e),r=y(t),i=n===r?0:1/(r-n),h}}function El(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function yI(){var e=Cl(R0()(Ir));return e.copy=function(){return El(e,yI())},rs.apply(e,arguments)}function bI(){var e=VC(R0()).domain([1,10]);return e.copy=function(){return El(e,bI()).base(e.base())},rs.apply(e,arguments)}function xI(){var e=HC(R0());return e.copy=function(){return El(e,xI()).constant(e.constant())},rs.apply(e,arguments)}function t3(){var e=qC(R0());return e.copy=function(){return El(e,t3()).exponent(e.exponent())},rs.apply(e,arguments)}function Rle(){return t3.apply(null,arguments).exponent(.5)}function _I(){var e=[],t=Ir;function n(r){if(r!=null&&!isNaN(r=+r))return t((Sm(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(el),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,o)=>boe(e,o/r))},n.copy=function(){return _I(t).domain(e)},rs.apply(n,arguments)}function D0(){var e=0,t=.5,n=1,r=1,i,o,l,c,f,h=Ir,m,y=!1,x;function b(C){return isNaN(C=+C)?x:(C=.5+((C=+m(C))-o)*(r*C<r*o?c:f),h(y?Math.max(0,Math.min(1,C)):C))}b.domain=function(C){return arguments.length?([e,t,n]=C,i=m(e=+e),o=m(t=+t),l=m(n=+n),c=i===o?0:.5/(o-i),f=o===l?0:.5/(l-o),r=o<i?-1:1,b):[e,t,n]},b.clamp=function(C){return arguments.length?(y=!!C,b):y},b.interpolator=function(C){return arguments.length?(h=C,b):h};function w(C){return function(O){var T,P,N;return arguments.length?([T,P,N]=O,h=Goe(C,[T,P,N]),b):[h(0),h(.5),h(1)]}}return b.range=w(If),b.rangeRound=w(BC),b.unknown=function(C){return arguments.length?(x=C,b):x},function(C){return m=C,i=C(e),o=C(t),l=C(n),c=i===o?0:.5/(o-i),f=o===l?0:.5/(l-o),r=o<i?-1:1,b}}function wI(){var e=Cl(D0()(Ir));return e.copy=function(){return El(e,wI())},rs.apply(e,arguments)}function SI(){var e=VC(D0()).domain([.1,1,10]);return e.copy=function(){return El(e,SI()).base(e.base())},rs.apply(e,arguments)}function CI(){var e=HC(D0());return e.copy=function(){return El(e,CI()).constant(e.constant())},rs.apply(e,arguments)}function n3(){var e=qC(D0());return e.copy=function(){return El(e,n3()).exponent(e.exponent())},rs.apply(e,arguments)}function Dle(){return n3.apply(null,arguments).exponent(.5)}const vh=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:kC,scaleDiverging:wI,scaleDivergingLog:SI,scaleDivergingPow:n3,scaleDivergingSqrt:Dle,scaleDivergingSymlog:CI,scaleIdentity:nI,scaleImplicit:Nw,scaleLinear:tI,scaleLog:iI,scaleOrdinal:DC,scalePoint:woe,scalePow:GC,scaleQuantile:sI,scaleQuantize:lI,scaleRadial:oI,scaleSequential:yI,scaleSequentialLog:bI,scaleSequentialPow:t3,scaleSequentialQuantile:_I,scaleSequentialSqrt:Rle,scaleSequentialSymlog:xI,scaleSqrt:pse,scaleSymlog:aI,scaleThreshold:uI,scaleTime:Nle,scaleUtc:Lle,tickFormat:eI},Symbol.toStringTag,{value:"Module"}));var Al=e=>e.chartData,r3=Se([Al],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),k0=(e,t,n,r)=>r?r3(e):Al(e);function $u(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(Rn(t)&&Rn(n))return!0}return!1}function j5(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function EI(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,i,o;if(Rn(n))i=n;else if(typeof n=="function")return;if(Rn(r))o=r;else if(typeof r=="function")return;var l=[i,o];if($u(l))return l}}function kle(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if($u(r))return j5(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,o]=e,l,c;if(i==="auto")t!=null&&(l=Math.min(...t));else if(He(i))l=i;else if(typeof i=="function")try{t!=null&&(l=i(t?.[0]))}catch{}else if(typeof i=="string"&&aP.test(i)){var f=aP.exec(i);if(f==null||t==null)l=void 0;else{var h=+f[1];l=t[0]-h}}else l=t?.[0];if(o==="auto")t!=null&&(c=Math.max(...t));else if(He(o))c=o;else if(typeof o=="function")try{t!=null&&(c=o(t?.[1]))}catch{}else if(typeof o=="string"&&oP.test(o)){var m=oP.exec(o);if(m==null||t==null)c=void 0;else{var y=+m[1];c=t[1]+y}}else c=t?.[1];var x=[l,c];if($u(x))return t==null?x:j5(x,t,n)}}}var zf=1e9,Ile={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},a3,hn=!0,Zi="[DecimalError] ",Tu=Zi+"Invalid argument: ",i3=Zi+"Exponent out of range: ",Bf=Math.floor,bu=Math.pow,zle=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,xi,ur=1e7,nn=7,AI=9007199254740991,hy=Bf(AI/nn),$e={};$e.absoluteValue=$e.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};$e.comparedTo=$e.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};$e.decimalPlaces=$e.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*nn;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};$e.dividedBy=$e.div=function(e){return Io(this,new this.constructor(e))};$e.dividedToIntegerBy=$e.idiv=function(e){var t=this,n=t.constructor;return Kt(Io(t,new n(e),0,1),n.precision)};$e.equals=$e.eq=function(e){return!this.cmp(e)};$e.exponent=function(){return Vn(this)};$e.greaterThan=$e.gt=function(e){return this.cmp(e)>0};$e.greaterThanOrEqualTo=$e.gte=function(e){return this.cmp(e)>=0};$e.isInteger=$e.isint=function(){return this.e>this.d.length-2};$e.isNegative=$e.isneg=function(){return this.s<0};$e.isPositive=$e.ispos=function(){return this.s>0};$e.isZero=function(){return this.s===0};$e.lessThan=$e.lt=function(e){return this.cmp(e)<0};$e.lessThanOrEqualTo=$e.lte=function(e){return this.cmp(e)<1};$e.logarithm=$e.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(xi))throw Error(Zi+"NaN");if(n.s<1)throw Error(Zi+(n.s?"NaN":"-Infinity"));return n.eq(xi)?new r(0):(hn=!1,t=Io(Xh(n,o),Xh(e,o),o),hn=!0,Kt(t,i))};$e.minus=$e.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?jI(t,e):OI(t,(e.s=-e.s,e))};$e.modulo=$e.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Zi+"NaN");return n.s?(hn=!1,t=Io(n,e,0,1).times(e),hn=!0,n.minus(t)):Kt(new r(n),i)};$e.naturalExponential=$e.exp=function(){return TI(this)};$e.naturalLogarithm=$e.ln=function(){return Xh(this)};$e.negated=$e.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};$e.plus=$e.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?OI(t,e):jI(t,(e.s=-e.s,e))};$e.precision=$e.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Tu+e);if(t=Vn(i)+1,r=i.d.length-1,n=r*nn+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};$e.squareRoot=$e.sqrt=function(){var e,t,n,r,i,o,l,c=this,f=c.constructor;if(c.s<1){if(!c.s)return new f(0);throw Error(Zi+"NaN")}for(e=Vn(c),hn=!1,i=Math.sqrt(+c),i==0||i==1/0?(t=Ha(c.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Bf((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 f(t)):r=new f(i.toString()),n=f.precision,i=l=n+3;;)if(o=r,r=o.plus(Io(c,o,l+2)).times(.5),Ha(o.d).slice(0,l)===(t=Ha(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),i==l&&t=="4999"){if(Kt(o,n+1,0),o.times(o).eq(c)){r=o;break}}else if(t!="9999")break;l+=4}return hn=!0,Kt(r,n)};$e.times=$e.mul=function(e){var t,n,r,i,o,l,c,f,h,m=this,y=m.constructor,x=m.d,b=(e=new y(e)).d;if(!m.s||!e.s)return new y(0);for(e.s*=m.s,n=m.e+e.e,f=x.length,h=b.length,f<h&&(o=x,x=b,b=o,l=f,f=h,h=l),o=[],l=f+h,r=l;r--;)o.push(0);for(r=h;--r>=0;){for(t=0,i=f+r;i>r;)c=o[i]+b[r]*x[i-r-1]+t,o[i--]=c%ur|0,t=c/ur|0;o[i]=(o[i]+t)%ur|0}for(;!o[--l];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,hn?Kt(e,y.precision):e};$e.toDecimalPlaces=$e.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Za(e,0,zf),t===void 0?t=r.rounding:Za(t,0,8),Kt(n,e+Vn(n)+1,t))};$e.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Fu(r,!0):(Za(e,0,zf),t===void 0?t=i.rounding:Za(t,0,8),r=Kt(new i(r),e+1,t),n=Fu(r,!0,e+1)),n};$e.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Fu(i):(Za(e,0,zf),t===void 0?t=o.rounding:Za(t,0,8),r=Kt(new o(i),e+Vn(i)+1,t),n=Fu(r.abs(),!1,e+Vn(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};$e.toInteger=$e.toint=function(){var e=this,t=e.constructor;return Kt(new t(e),Vn(e)+1,t.rounding)};$e.toNumber=function(){return+this};$e.toPower=$e.pow=function(e){var t,n,r,i,o,l,c=this,f=c.constructor,h=12,m=+(e=new f(e));if(!e.s)return new f(xi);if(c=new f(c),!c.s){if(e.s<1)throw Error(Zi+"Infinity");return c}if(c.eq(xi))return c;if(r=f.precision,e.eq(xi))return Kt(c,r);if(t=e.e,n=e.d.length-1,l=t>=n,o=c.s,l){if((n=m<0?-m:m)<=AI){for(i=new f(xi),t=Math.ceil(r/nn+4),hn=!1;n%2&&(i=i.times(c),P5(i.d,t)),n=Bf(n/2),n!==0;)c=c.times(c),P5(c.d,t);return hn=!0,e.s<0?new f(xi).div(i):Kt(i,r)}}else if(o<0)throw Error(Zi+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,c.s=1,hn=!1,i=e.times(Xh(c,r+h)),hn=!0,i=TI(i),i.s=o,i};$e.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=Vn(i),r=Fu(i,n<=o.toExpNeg||n>=o.toExpPos)):(Za(e,1,zf),t===void 0?t=o.rounding:Za(t,0,8),i=Kt(new o(i),e,t),n=Vn(i),r=Fu(i,e<=n||n<=o.toExpNeg,e)),r};$e.toSignificantDigits=$e.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Za(e,1,zf),t===void 0?t=r.rounding:Za(t,0,8)),Kt(new r(n),e,t)};$e.toString=$e.valueOf=$e.val=$e.toJSON=$e[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Vn(e),n=e.constructor;return Fu(e,t<=n.toExpNeg||t>=n.toExpPos)};function OI(e,t){var n,r,i,o,l,c,f,h,m=e.constructor,y=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),hn?Kt(t,y):t;if(f=e.d,h=t.d,l=e.e,i=t.e,f=f.slice(),o=l-i,o){for(o<0?(r=f,o=-o,c=h.length):(r=h,i=l,c=f.length),l=Math.ceil(y/nn),c=l>c?l+1:c+1,o>c&&(o=c,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(c=f.length,o=h.length,c-o<0&&(o=c,r=h,h=f,f=r),n=0;o;)n=(f[--o]=f[o]+h[o]+n)/ur|0,f[o]%=ur;for(n&&(f.unshift(n),++i),c=f.length;f[--c]==0;)f.pop();return t.d=f,t.e=i,hn?Kt(t,y):t}function Za(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Tu+e)}function Ha(e){var t,n,r,i=e.length-1,o="",l=e[0];if(i>0){for(o+=l,t=1;t<i;t++)r=e[t]+"",n=nn-r.length,n&&(o+=Ks(n)),o+=r;l=e[t],r=l+"",n=nn-r.length,n&&(o+=Ks(n))}else if(l===0)return"0";for(;l%10===0;)l/=10;return o+l}var Io=(function(){function e(r,i){var o,l=0,c=r.length;for(r=r.slice();c--;)o=r[c]*i+l,r[c]=o%ur|0,l=o/ur|0;return l&&r.unshift(l),r}function t(r,i,o,l){var c,f;if(o!=l)f=o>l?1:-1;else for(c=f=0;c<o;c++)if(r[c]!=i[c]){f=r[c]>i[c]?1:-1;break}return f}function n(r,i,o){for(var l=0;o--;)r[o]-=l,l=r[o]<i[o]?1:0,r[o]=l*ur+r[o]-i[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,o,l){var c,f,h,m,y,x,b,w,C,O,T,P,N,F,B,W,Q,re,ce=r.constructor,ae=r.s==i.s?1:-1,J=r.d,oe=i.d;if(!r.s)return new ce(r);if(!i.s)throw Error(Zi+"Division by zero");for(f=r.e-i.e,Q=oe.length,B=J.length,b=new ce(ae),w=b.d=[],h=0;oe[h]==(J[h]||0);)++h;if(oe[h]>(J[h]||0)&&--f,o==null?P=o=ce.precision:l?P=o+(Vn(r)-Vn(i))+1:P=o,P<0)return new ce(0);if(P=P/nn+2|0,h=0,Q==1)for(m=0,oe=oe[0],P++;(h<B||m)&&P--;h++)N=m*ur+(J[h]||0),w[h]=N/oe|0,m=N%oe|0;else{for(m=ur/(oe[0]+1)|0,m>1&&(oe=e(oe,m),J=e(J,m),Q=oe.length,B=J.length),F=Q,C=J.slice(0,Q),O=C.length;O<Q;)C[O++]=0;re=oe.slice(),re.unshift(0),W=oe[0],oe[1]>=ur/2&&++W;do m=0,c=t(oe,C,Q,O),c<0?(T=C[0],Q!=O&&(T=T*ur+(C[1]||0)),m=T/W|0,m>1?(m>=ur&&(m=ur-1),y=e(oe,m),x=y.length,O=C.length,c=t(y,C,x,O),c==1&&(m--,n(y,Q<x?re:oe,x))):(m==0&&(c=m=1),y=oe.slice()),x=y.length,x<O&&y.unshift(0),n(C,y,O),c==-1&&(O=C.length,c=t(oe,C,Q,O),c<1&&(m++,n(C,Q<O?re:oe,O))),O=C.length):c===0&&(m++,C=[0]),w[h++]=m,c&&C[0]?C[O++]=J[F]||0:(C=[J[F]],O=1);while((F++<B||C[0]!==void 0)&&P--)}return w[0]||w.shift(),b.e=f,Kt(b,l?o+Vn(b)+1:o)}})();function TI(e,t){var n,r,i,o,l,c,f=0,h=0,m=e.constructor,y=m.precision;if(Vn(e)>16)throw Error(i3+Vn(e));if(!e.s)return new m(xi);for(hn=!1,c=y,l=new m(.03125);e.abs().gte(.1);)e=e.times(l),h+=5;for(r=Math.log(bu(2,h))/Math.LN10*2+5|0,c+=r,n=i=o=new m(xi),m.precision=c;;){if(i=Kt(i.times(e),c),n=n.times(++f),l=o.plus(Io(i,n,c)),Ha(l.d).slice(0,c)===Ha(o.d).slice(0,c)){for(;h--;)o=Kt(o.times(o),c);return m.precision=y,t==null?(hn=!0,Kt(o,y)):o}o=l}}function Vn(e){for(var t=e.e*nn,n=e.d[0];n>=10;n/=10)t++;return t}function t_(e,t,n){if(t>e.LN10.sd())throw hn=!0,n&&(e.precision=n),Error(Zi+"LN10 precision limit exceeded");return Kt(new e(e.LN10),t)}function Ks(e){for(var t="";e--;)t+="0";return t}function Xh(e,t){var n,r,i,o,l,c,f,h,m,y=1,x=10,b=e,w=b.d,C=b.constructor,O=C.precision;if(b.s<1)throw Error(Zi+(b.s?"NaN":"-Infinity"));if(b.eq(xi))return new C(0);if(t==null?(hn=!1,h=O):h=t,b.eq(10))return t==null&&(hn=!0),t_(C,h);if(h+=x,C.precision=h,n=Ha(w),r=n.charAt(0),o=Vn(b),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)b=b.times(e),n=Ha(b.d),r=n.charAt(0),y++;o=Vn(b),r>1?(b=new C("0."+n),o++):b=new C(r+"."+n.slice(1))}else return f=t_(C,h+2,O).times(o+""),b=Xh(new C(r+"."+n.slice(1)),h-x).plus(f),C.precision=O,t==null?(hn=!0,Kt(b,O)):b;for(c=l=b=Io(b.minus(xi),b.plus(xi),h),m=Kt(b.times(b),h),i=3;;){if(l=Kt(l.times(m),h),f=c.plus(Io(l,new C(i),h)),Ha(f.d).slice(0,h)===Ha(c.d).slice(0,h))return c=c.times(2),o!==0&&(c=c.plus(t_(C,h+2,O).times(o+""))),c=Io(c,new C(y),h),C.precision=O,t==null?(hn=!0,Kt(c,O)):c;c=f,i+=2}}function M5(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=Bf(n/nn),e.d=[],r=(n+1)%nn,n<0&&(r+=nn),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=nn;r<i;)e.d.push(+t.slice(r,r+=nn));t=t.slice(r),r=nn-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),hn&&(e.e>hy||e.e<-hy))throw Error(i3+n)}else e.s=0,e.e=0,e.d=[0];return e}function Kt(e,t,n){var r,i,o,l,c,f,h,m,y=e.d;for(l=1,o=y[0];o>=10;o/=10)l++;if(r=t-l,r<0)r+=nn,i=t,h=y[m=0];else{if(m=Math.ceil((r+1)/nn),o=y.length,m>=o)return e;for(h=o=y[m],l=1;o>=10;o/=10)l++;r%=nn,i=r-nn+l}if(n!==void 0&&(o=bu(10,l-i-1),c=h/o%10|0,f=t<0||y[m+1]!==void 0||h%o,f=n<4?(c||f)&&(n==0||n==(e.s<0?3:2)):c>5||c==5&&(n==4||f||n==6&&(r>0?i>0?h/bu(10,l-i):0:y[m-1])%10&1||n==(e.s<0?8:7))),t<1||!y[0])return f?(o=Vn(e),y.length=1,t=t-o-1,y[0]=bu(10,(nn-t%nn)%nn),e.e=Bf(-t/nn)||0):(y.length=1,y[0]=e.e=e.s=0),e;if(r==0?(y.length=m,o=1,m--):(y.length=m+1,o=bu(10,nn-r),y[m]=i>0?(h/bu(10,l-i)%bu(10,i)|0)*o:0),f)for(;;)if(m==0){(y[0]+=o)==ur&&(y[0]=1,++e.e);break}else{if(y[m]+=o,y[m]!=ur)break;y[m--]=0,o=1}for(r=y.length;y[--r]===0;)y.pop();if(hn&&(e.e>hy||e.e<-hy))throw Error(i3+Vn(e));return e}function jI(e,t){var n,r,i,o,l,c,f,h,m,y,x=e.constructor,b=x.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new x(e),hn?Kt(t,b):t;if(f=e.d,y=t.d,r=t.e,h=e.e,f=f.slice(),l=h-r,l){for(m=l<0,m?(n=f,l=-l,c=y.length):(n=y,r=h,c=f.length),i=Math.max(Math.ceil(b/nn),c)+2,l>i&&(l=i,n.length=1),n.reverse(),i=l;i--;)n.push(0);n.reverse()}else{for(i=f.length,c=y.length,m=i<c,m&&(c=i),i=0;i<c;i++)if(f[i]!=y[i]){m=f[i]<y[i];break}l=0}for(m&&(n=f,f=y,y=n,t.s=-t.s),c=f.length,i=y.length-c;i>0;--i)f[c++]=0;for(i=y.length;i>l;){if(f[--i]<y[i]){for(o=i;o&&f[--o]===0;)f[o]=ur-1;--f[o],f[i]+=ur}f[i]-=y[i]}for(;f[--c]===0;)f.pop();for(;f[0]===0;f.shift())--r;return f[0]?(t.d=f,t.e=r,hn?Kt(t,b):t):new x(0)}function Fu(e,t,n){var r,i=Vn(e),o=Ha(e.d),l=o.length;return t?(n&&(r=n-l)>0?o=o.charAt(0)+"."+o.slice(1)+Ks(r):l>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Ks(-i-1)+o,n&&(r=n-l)>0&&(o+=Ks(r))):i>=l?(o+=Ks(i+1-l),n&&(r=n-i-1)>0&&(o=o+"."+Ks(r))):((r=i+1)<l&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-l)>0&&(i+1===l&&(o+="."),o+=Ks(r))),e.s<0?"-"+o:o}function P5(e,t){if(e.length>t)return e.length=t,!0}function MI(e){var t,n,r;function i(o){var l=this;if(!(l instanceof i))return new i(o);if(l.constructor=i,o instanceof i){l.s=o.s,l.e=o.e,l.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Tu+o);if(o>0)l.s=1;else if(o<0)o=-o,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(o===~~o&&o<1e7){l.e=0,l.d=[o];return}return M5(l,o.toString())}else if(typeof o!="string")throw Error(Tu+o);if(o.charCodeAt(0)===45?(o=o.slice(1),l.s=-1):l.s=1,zle.test(o))M5(l,o);else throw Error(Tu+o)}if(i.prototype=$e,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=MI,i.config=i.set=Ble,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 Ble(e){if(!e||typeof e!="object")throw Error(Zi+"Object expected");var t,n,r,i=["precision",1,zf,"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(Bf(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Tu+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Tu+n+": "+r);return this}var a3=MI(Ile);xi=new a3(1);const $t=a3;var Ule=e=>e,PI={},NI=e=>e===PI,N5=e=>function t(){return arguments.length===0||arguments.length===1&&NI(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},LI=(e,t)=>e===1?t:N5(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=r.filter(l=>l!==PI).length;return o>=e?t(...r):LI(e-o,N5(function(){for(var l=arguments.length,c=new Array(l),f=0;f<l;f++)c[f]=arguments[f];var h=r.map(m=>NI(m)?c.shift():m);return t(...h,...c)}))}),I0=e=>LI(e.length,e),kw=(e,t)=>{for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},$le=I0((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(n=>t[n]).map(e)),Fle=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return Ule;var i=n.reverse(),o=i[0],l=i.slice(1);return function(){return l.reduce((c,f)=>f(c),o(...arguments))}},Iw=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),RI=e=>{var t=null,n=null;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return t&&i.every((l,c)=>{var f;return l===((f=t)===null||f===void 0?void 0:f[c])})||(t=i,n=e(...i)),n}};function DI(e){var t;return e===0?t=1:t=Math.floor(new $t(e).abs().log(10).toNumber())+1,t}function kI(e,t,n){for(var r=new $t(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}I0((e,t,n)=>{var r=+e,i=+t;return r+n*(i-r)});I0((e,t,n)=>{var r=t-+e;return r=r||1/0,(n-e)/r});I0((e,t,n)=>{var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});var II=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},zI=(e,t,n)=>{if(e.lte(0))return new $t(0);var r=DI(e.toNumber()),i=new $t(10).pow(r),o=e.div(i),l=r!==1?.05:.1,c=new $t(Math.ceil(o.div(l).toNumber())).add(n).mul(l),f=c.mul(i);return t?new $t(f.toNumber()):new $t(Math.ceil(f.toNumber()))},Vle=(e,t,n)=>{var r=new $t(1),i=new $t(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new $t(10).pow(DI(e)-1),i=new $t(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new $t(Math.floor(e)))}else e===0?i=new $t(Math.floor((t-1)/2)):n||(i=new $t(Math.floor(e)));var l=Math.floor((t-1)/2),c=Fle($le(f=>i.add(new $t(f-l).mul(r)).toNumber()),kw);return c(0,t)},BI=function(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-t)/(r-1)))return{step:new $t(0),tickMin:new $t(0),tickMax:new $t(0)};var l=zI(new $t(n).sub(t).div(r-1),i,o),c;t<=0&&n>=0?c=new $t(0):(c=new $t(t).add(n).div(2),c=c.sub(new $t(c).mod(l)));var f=Math.ceil(c.sub(t).div(l).toNumber()),h=Math.ceil(new $t(n).sub(c).div(l).toNumber()),m=f+h+1;return m>r?BI(t,n,r,i,o+1):(m<r&&(h=n>0?h+(r-m):h,f=n>0?f:f+(r-m)),{step:l,tickMin:c.sub(new $t(f).mul(l)),tickMax:c.add(new $t(h).mul(l))})};function Hle(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,o=Math.max(r,2),[l,c]=II([t,n]);if(l===-1/0||c===1/0){var f=c===1/0?[l,...kw(0,r-1).map(()=>1/0)]:[...kw(0,r-1).map(()=>-1/0),c];return t>n?Iw(f):f}if(l===c)return Vle(l,r,i);var{step:h,tickMin:m,tickMax:y}=BI(l,c,o,i,0),x=kI(m,y.add(new $t(.1).mul(h)),h);return t>n?Iw(x):x}function qle(e,t){var[n,r]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[o,l]=II([n,r]);if(o===-1/0||l===1/0)return[n,r];if(o===l)return[o];var c=Math.max(t,2),f=zI(new $t(l).sub(o).div(c-1),i,0),h=[...kI(new $t(o),new $t(l),f),l];return i===!1&&(h=h.map(m=>Math.round(m))),n>r?Iw(h):h}var Gle=RI(Hle),Yle=RI(qle),UI=e=>e.rootProps.maxBarSize,Wle=e=>e.rootProps.barGap,$I=e=>e.rootProps.barCategoryGap,Kle=e=>e.rootProps.barSize,Om=e=>e.rootProps.stackOffset,o3=e=>e.options.chartName,s3=e=>e.rootProps.syncId,FI=e=>e.rootProps.syncMethod,l3=e=>e.options.eventEmitter,Ln={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Po={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"},z0=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},Zle={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Po.angleAxisId,includeHidden:!1,name:void 0,reversed:Po.reversed,scale:Po.scale,tick:Po.tick,tickCount:void 0,ticks:void 0,type:Po.type,unit:void 0},Xle={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},Qle={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:Po.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Po.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Po.scale,tick:Po.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},Jle={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},u3=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?Qle:Zle,c3=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?Jle:Xle,B0=e=>e.polarOptions,f3=Se([ts,ns,Jn],U8),VI=Se([B0,f3],(e,t)=>{if(e!=null)return Mr(e.innerRadius,t,0)}),HI=Se([B0,f3],(e,t)=>{if(e!=null)return Mr(e.outerRadius,t,t*.8)}),eue=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},qI=Se([B0],eue);Se([u3,qI],z0);var GI=Se([f3,VI,HI],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});Se([c3,GI],z0);var YI=Se([At,B0,VI,HI,ts,ns],(e,t,n,r,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:l,cy:c,startAngle:f,endAngle:h}=t;return{cx:Mr(l,i,i/2),cy:Mr(c,o,o/2),innerRadius:n,outerRadius:r,startAngle:f,endAngle:h,clockWise:!1}}}),gn=(e,t)=>t,Tm=(e,t,n)=>n;function d3(e){return e?.id}function WI(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:o}=n,l=new Map;return e.forEach(c=>{var f,h=(f=c.data)!==null&&f!==void 0?f:r;if(!(h==null||h.length===0)){var m=d3(c);h.forEach((y,x)=>{var b=o==null||i?x:String(Qt(y,o,null)),w=Qt(y,c.dataKey,0),C;l.has(b)?C=l.get(b):C={},Object.assign(C,{[m]:w}),l.set(b,C)})}}),Array.from(l.values())}function U0(e){return e.stackId!=null&&e.dataKey!=null}var $0=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function F0(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function tue(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}var tr=e=>{var t=At(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Uf=e=>e.tooltip.settings.axisId;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 my(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){nue(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 nue(e,t,n){return(t=rue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rue(e){var t=iue(e,"string");return typeof t=="symbol"?t:t+""}function iue(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 zw=[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},KI=(e,t)=>e.cartesianAxis.xAxis[t],is=(e,t)=>{var n=KI(e,t);return n??gi},vi={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:zw,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:ym},ZI=(e,t)=>e.cartesianAxis.yAxis[t],as=(e,t)=>{var n=ZI(e,t);return n??vi},aue={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:""},h3=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??aue},_n=(e,t,n)=>{switch(t){case"xAxis":return is(e,n);case"yAxis":return as(e,n);case"zAxis":return h3(e,n);case"angleAxis":return u3(e,n);case"radiusAxis":return c3(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},oue=(e,t,n)=>{switch(t){case"xAxis":return is(e,n);case"yAxis":return as(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},jm=(e,t,n)=>{switch(t){case"xAxis":return is(e,n);case"yAxis":return as(e,n);case"angleAxis":return u3(e,n);case"radiusAxis":return c3(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},XI=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function m3(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 V0=e=>e.graphicalItems.cartesianItems,sue=Se([gn,Tm],m3),p3=(e,t,n)=>e.filter(n).filter(r=>t?.includeHidden===!0?!0:!r.hide),Mm=Se([V0,_n,sue],p3,{memoizeOptions:{resultEqualityCheck:F0}}),QI=Se([Mm],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(U0)),JI=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),lue=Se([Mm],JI),g3=e=>e.map(t=>t.data).filter(Boolean).flat(1),uue=Se([Mm],g3,{memoizeOptions:{resultEqualityCheck:F0}}),v3=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},y3=Se([uue,k0],v3),b3=(e,t,n)=>t?.dataKey!=null?e.map(r=>({value:Qt(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(i=>({value:Qt(i,r)}))):e.map(r=>({value:r})),H0=Se([y3,_n,Mm],b3);function e7(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function rv(e){if(ni(e)||e instanceof Date){var t=Number(e);if(Rn(t))return t}}function R5(e){if(Array.isArray(e)){var t=[rv(e[0]),rv(e[1])];return $u(t)?t:void 0}var n=rv(e);if(n!=null)return[n,n]}function Wo(e){return e.map(rv).filter(jne)}function cue(e,t,n){return!n||typeof t!="number"||_a(t)?[]:n.length?Wo(n.flatMap(r=>{var i=Qt(e,r.dataKey),o,l;if(Array.isArray(i)?[o,l]=i:o=l=i,!(!Rn(o)||!Rn(l)))return[t-o,t+l]})):[]}var nr=e=>{var t=tr(e),n=Uf(e);return jm(e,t,n)},t7=Se([nr],e=>e?.dataKey),fue=Se([QI,k0,nr],WI),n7=(e,t,n)=>{var r={},i=t.reduce((o,l)=>(l.stackId==null||(o[l.stackId]==null&&(o[l.stackId]=[]),o[l.stackId].push(l)),o),r);return Object.fromEntries(Object.entries(i).map(o=>{var[l,c]=o,f=c.map(d3);return[l,{stackedData:Hre(e,f,n),graphicalItems:c}]}))},Bw=Se([fue,QI,Om],n7),r7=(e,t,n,r)=>{var{dataStartIndex:i,dataEndIndex:o}=t;if(r==null&&n!=="zAxis"){var l=Kre(e,i,o);if(!(l!=null&&l[0]===0&&l[1]===0))return l}},due=Se([_n],e=>e.allowDataOverflow),x3=e=>{var t;if(e==null||!("domain"in e))return zw;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var n=Wo(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:zw},_3=Se([_n],x3),w3=Se([_3,due],EI),hue=Se([Bw,Al,gn,w3],r7,{memoizeOptions:{resultEqualityCheck:$0}}),q0=e=>e.errorBars,mue=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>e7(n,r)),py=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 o=i.flat(),l=Math.min(...o),c=Math.max(...o);return[l,c]}},S3=(e,t,n,r,i)=>{var o,l;if(n.length>0&&e.forEach(c=>{n.forEach(f=>{var h,m,y=(h=r[f.id])===null||h===void 0?void 0:h.filter(T=>e7(i,T)),x=Qt(c,(m=t.dataKey)!==null&&m!==void 0?m:f.dataKey),b=cue(c,x,y);if(b.length>=2){var w=Math.min(...b),C=Math.max(...b);(o==null||w<o)&&(o=w),(l==null||C>l)&&(l=C)}var O=R5(x);O!=null&&(o=o==null?O[0]:Math.min(o,O[0]),l=l==null?O[1]:Math.max(l,O[1]))})}),t?.dataKey!=null&&e.forEach(c=>{var f=R5(Qt(c,t.dataKey));f!=null&&(o=o==null?f[0]:Math.min(o,f[0]),l=l==null?f[1]:Math.max(l,f[1]))}),Rn(o)&&Rn(l))return[o,l]},pue=Se([y3,_n,lue,q0,gn],S3,{memoizeOptions:{resultEqualityCheck:$0}});function gue(e){var{value:t}=e;if(ni(t)||t instanceof Date)return t}var vue=(e,t,n)=>{var r=e.map(gue).filter(i=>i!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&Kk(r))?H8(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},i7=e=>e.referenceElements.dots,$f=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),yue=Se([i7,gn,Tm],$f),a7=e=>e.referenceElements.areas,bue=Se([a7,gn,Tm],$f),o7=e=>e.referenceElements.lines,xue=Se([o7,gn,Tm],$f),s7=(e,t)=>{var n=Wo(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},_ue=Se(yue,gn,s7),l7=(e,t)=>{var n=Wo(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)]},wue=Se([bue,gn],l7);function Sue(e){var t;if(e.x!=null)return Wo([e.x]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.x);return n==null||n.length===0?[]:Wo(n)}function Cue(e){var t;if(e.y!=null)return Wo([e.y]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.y);return n==null||n.length===0?[]:Wo(n)}var u7=(e,t)=>{var n=e.flatMap(r=>t==="xAxis"?Sue(r):Cue(r));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},Eue=Se([xue,gn],u7),Aue=Se(_ue,Eue,wue,(e,t,n)=>py(e,n,t)),C3=(e,t,n,r,i,o,l,c)=>{if(n!=null)return n;var f=l==="vertical"&&c==="xAxis"||l==="horizontal"&&c==="yAxis",h=f?py(r,o,i):py(o,i);return kle(t,h,e.allowDataOverflow)},Oue=Se([_n,_3,w3,hue,pue,Aue,At,gn],C3,{memoizeOptions:{resultEqualityCheck:$0}}),Tue=[0,1],E3=(e,t,n,r,i,o,l)=>{if(!((e==null||n==null||n.length===0)&&l===void 0)){var{dataKey:c,type:f}=e,h=wl(t,o);if(h&&c==null){var m;return H8(0,(m=n?.length)!==null&&m!==void 0?m:0)}return f==="category"?vue(r,e,h):i==="expand"?Tue:l}},A3=Se([_n,At,y3,H0,Om,gn,Oue],E3),c7=(e,t,n,r,i)=>{if(e!=null){var{scale:o,type:l}=e;if(o==="auto")return t==="radial"&&i==="radiusAxis"?"band":t==="radial"&&i==="angleAxis"?"linear":l==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?"point":l==="category"?"band":"linear";if(typeof o=="string"){var c="scale".concat(vm(o));return c in vh?c:"point"}}},Ff=Se([_n,At,XI,o3,gn],c7);function jue(e){if(e!=null){if(e in vh)return vh[e]();var t="scale".concat(vm(e));if(t in vh)return vh[t]()}}function O3(e,t,n,r){if(!(n==null||r==null)){if(typeof e.scale=="function")return e.scale.copy().domain(n).range(r);var i=jue(t);if(i!=null){var o=i.domain(n).range(r);return Bre(o),o}}}var T3=(e,t,n)=>{var r=x3(t);if(!(n!=="auto"&&n!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(r)&&(r[0]==="auto"||r[1]==="auto")&&$u(e))return Gle(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&$u(e))return Yle(e,t.tickCount,t.allowDecimals)}},j3=Se([A3,jm,Ff],T3),M3=(e,t,n,r)=>{if(r!=="angleAxis"&&e?.type==="number"&&$u(t)&&Array.isArray(n)&&n.length>0){var i=t[0],o=n[0],l=t[1],c=n[n.length-1];return[Math.min(i,o),Math.max(l,c)]}return t},Mue=Se([_n,A3,j3,gn],M3),Pue=Se(H0,_n,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(Wo(e.map(c=>c.value))).sort((c,f)=>c-f);if(r.length<2)return 1/0;var i=r[r.length-1]-r[0];if(i===0)return 1/0;for(var o=0;o<r.length-1;o++){var l=r[o+1]-r[o];n=Math.min(n,l)}return n/i}}),f7=Se(Pue,At,$I,Jn,(e,t,n,r)=>r,(e,t,n,r,i)=>{if(!Rn(e))return 0;var o=t==="vertical"?r.height:r.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var l=Mr(n,e*o),c=e*o/2;return c-l-(c-l)/o*l}return 0}),Nue=(e,t)=>{var n=is(e,t);return n==null||typeof n.padding!="string"?0:f7(e,"xAxis",t,n.padding)},Lue=(e,t)=>{var n=as(e,t);return n==null||typeof n.padding!="string"?0:f7(e,"yAxis",t,n.padding)},Rue=Se(is,Nue,(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}}),Due=Se(as,Lue,(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}}),kue=Se([Jn,Rue,C0,S0,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:o}=r;return i?[o.left,n.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),Iue=Se([Jn,At,Due,C0,S0,(e,t,n)=>n],(e,t,n,r,i,o)=>{var{padding:l}=i;return o?[r.height-l.bottom,l.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),Pm=(e,t,n,r)=>{var i;switch(t){case"xAxis":return kue(e,n,r);case"yAxis":return Iue(e,n,r);case"zAxis":return(i=h3(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return qI(e);case"radiusAxis":return GI(e,n);default:return}},d7=Se([_n,Pm],z0),ml=Se([_n,Ff,Mue,d7],O3);Se([Mm,q0,gn],mue);function h7(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var G0=(e,t)=>t,Y0=(e,t,n)=>n,zue=Se(_0,G0,Y0,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(h7)),Bue=Se(w0,G0,Y0,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(h7)),m7=(e,t)=>({width:e.width,height:t.height}),Uue=(e,t)=>{var n=typeof t.width=="number"?t.width:ym;return{width:n,height:e.height}},p7=Se(Jn,is,m7),$ue=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},Fue=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},Vue=Se(ns,Jn,zue,G0,Y0,(e,t,n,r,i)=>{var o={},l;return n.forEach(c=>{var f=m7(t,c);l==null&&(l=$ue(t,r,e));var h=r==="top"&&!i||r==="bottom"&&i;o[c.id]=l-Number(h)*f.height,l+=(h?-1:1)*f.height}),o}),Hue=Se(ts,Jn,Bue,G0,Y0,(e,t,n,r,i)=>{var o={},l;return n.forEach(c=>{var f=Uue(t,c);l==null&&(l=Fue(t,r,e));var h=r==="left"&&!i||r==="right"&&i;o[c.id]=l-Number(h)*f.width,l+=(h?-1:1)*f.width}),o}),que=(e,t)=>{var n=is(e,t);if(n!=null)return Vue(e,n.orientation,n.mirror)},Gue=Se([Jn,is,que,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),Yue=(e,t)=>{var n=as(e,t);if(n!=null)return Hue(e,n.orientation,n.mirror)},Wue=Se([Jn,as,Yue,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),g7=Se(Jn,as,(e,t)=>{var n=typeof t.width=="number"?t.width:ym;return{width:n,height:e.height}}),D5=(e,t,n)=>{switch(t){case"xAxis":return p7(e,n).width;case"yAxis":return g7(e,n).height;default:return}},v7=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:i,type:o,dataKey:l}=n,c=wl(e,r),f=t.map(h=>h.value);if(l&&c&&o==="category"&&i&&Kk(f))return f}},P3=Se([At,H0,_n,gn],v7),y7=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:o}=n,l=wl(e,r);if(l&&(i==="number"||o!=="auto"))return t.map(c=>c.value)}},N3=Se([At,H0,jm,gn],y7),k5=Se([At,oue,Ff,ml,P3,N3,Pm,j3,gn],(e,t,n,r,i,o,l,c,f)=>{if(t!=null){var h=wl(e,f);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:f,categoricalDomain:o,duplicateDomain:i,isCategorical:h,niceTicks:c,range:l,realScaleType:n,scale:r}}}),Kue=(e,t,n,r,i,o,l,c,f)=>{if(!(t==null||r==null)){var h=wl(e,f),{type:m,ticks:y,tickCount:x}=t,b=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,w=m==="category"&&r.bandwidth?r.bandwidth()/b:0;w=f==="angleAxis"&&o!=null&&o.length>=2?cr(o[0]-o[1])*2*w:w;var C=y||i;if(C){var O=C.map((T,P)=>{var N=l?l.indexOf(T):T;return{index:P,coordinate:r(N)+w,value:T,offset:w}});return O.filter(T=>Rn(T.coordinate))}return h&&c?c.map((T,P)=>({coordinate:r(T)+w,value:T,index:P,offset:w})).filter(T=>Rn(T.coordinate)):r.ticks?r.ticks(x).map(T=>({coordinate:r(T)+w,value:T,offset:w})):r.domain().map((T,P)=>({coordinate:r(T)+w,value:l?l[T]:T,index:P,offset:w}))}},b7=Se([At,jm,Ff,ml,j3,Pm,P3,N3,gn],Kue),Zue=(e,t,n,r,i,o,l)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var c=wl(e,l),{tickCount:f}=t,h=0;return h=l==="angleAxis"&&r?.length>=2?cr(r[0]-r[1])*2*h:h,c&&o?o.map((m,y)=>({coordinate:n(m)+h,value:m,index:y,offset:h})):n.ticks?n.ticks(f).map(m=>({coordinate:n(m)+h,value:m,offset:h})):n.domain().map((m,y)=>({coordinate:n(m)+h,value:i?i[m]:m,index:y,offset:h}))}},pl=Se([At,jm,ml,Pm,P3,N3,gn],Zue),gl=Se(_n,ml,(e,t)=>{if(!(e==null||t==null))return my(my({},e),{},{scale:t})}),Xue=Se([_n,Ff,A3,d7],O3);Se((e,t,n)=>h3(e,n),Xue,(e,t)=>{if(!(e==null||t==null))return my(my({},e),{},{scale:t})});var Que=Se([At,_0,w0],(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}}),x7=e=>e.options.defaultTooltipEventType,_7=e=>e.options.validateTooltipEventTypes;function w7(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function L3(e,t){var n=x7(e),r=_7(e);return w7(t,n,r)}function Jue(e){return Ve(t=>L3(t,e))}var S7=(e,t)=>{var n,r=Number(t);if(!(_a(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},ece=e=>e.tooltip.settings,Xs={active:!1,index:null,dataKey:void 0,coordinate:void 0},tce={itemInteraction:{click:Xs,hover:Xs},axisInteraction:{click:Xs,hover:Xs},keyboardInteraction:Xs,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},C7=Et({name:"tooltip",initialState:tce,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:Zn()},removeTooltipEntrySettings:{reducer(e,t){var n=ko(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:Zn()},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:nce,removeTooltipEntrySettings:rce,setTooltipSettingsState:ice,setActiveMouseOverItemIndex:E7,mouseLeaveItem:ace,mouseLeaveChart:A7,setActiveClickItemIndex:oce,setMouseOverAxisIndex:O7,setMouseClickAxisIndex:sce,setSyncInteraction:Uw,setKeyboardInteraction:$w}=C7.actions,lce=C7.reducer;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 Rg(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){uce(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 uce(e,t,n){return(t=cce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cce(e){var t=fce(e,"string");return typeof t=="symbol"?t:t+""}function fce(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 dce(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function hce(e){return e.index!=null}var T7=(e,t,n,r)=>{if(t==null)return Xs;var i=dce(e,t,n);if(i==null)return Xs;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(hce(i)){if(o)return Rg(Rg({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r};return Rg(Rg({},Xs),{},{coordinate:i.coordinate})},R3=(e,t)=>{var n=e?.index;if(n==null)return null;var r=Number(n);if(!Rn(r))return n;var i=0,o=1/0;return t.length>0&&(o=t.length-1),String(Math.max(i,Math.min(r,o)))},j7=(e,t,n,r,i,o,l,c)=>{if(!(o==null||c==null)){var f=l[0],h=f==null?void 0:c(f.positions,o);if(h!=null)return h;var m=i?.[Number(o)];if(m)return n==="horizontal"?{x:m.coordinate,y:(r.top+t)/2}:{x:(r.left+e)/2,y:m.coordinate}}},M7=(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(o=>{var l;return((l=o.settings)===null||l===void 0?void 0:l.dataKey)===i})},Nm=e=>e.options.tooltipPayloadSearcher,Vf=e=>e.tooltip;function z5(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 B5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z5(Object(n),!0).forEach(function(r){mce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mce(e,t,n){return(t=pce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pce(e){var t=gce(e,"string");return typeof t=="symbol"?t:t+""}function gce(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 vce(e,t){return e??t}var P7=(e,t,n,r,i,o,l)=>{if(!(t==null||o==null)){var{chartData:c,computedData:f,dataStartIndex:h,dataEndIndex:m}=n,y=[];return e.reduce((x,b)=>{var w,{dataDefinedOnItem:C,settings:O}=b,T=vce(C,c),P=Array.isArray(T)?h8(T,h,m):T,N=(w=O?.dataKey)!==null&&w!==void 0?w:r,F=O?.nameKey,B;if(r&&Array.isArray(P)&&!Array.isArray(P[0])&&l==="axis"?B=Zk(P,r,i):B=o(P,t,f,F),Array.isArray(B))B.forEach(Q=>{var re=B5(B5({},O),{},{name:Q.name,unit:Q.unit,color:void 0,fill:void 0});x.push(sP({tooltipEntrySettings:re,dataKey:Q.dataKey,payload:Q.payload,value:Qt(Q.payload,Q.dataKey),name:Q.name}))});else{var W;x.push(sP({tooltipEntrySettings:O,dataKey:N,payload:B,value:Qt(B,N),name:(W=Qt(B,F))!==null&&W!==void 0?W:O?.name}))}return x},y)}},D3=Se([nr,At,XI,o3,tr],c7),yce=Se([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),bce=Se([tr,Uf],m3),Lm=Se([yce,nr,bce],p3,{memoizeOptions:{resultEqualityCheck:F0}}),xce=Se([Lm],e=>e.filter(U0)),_ce=Se([Lm],g3,{memoizeOptions:{resultEqualityCheck:F0}}),Hf=Se([_ce,Al],v3),wce=Se([xce,Al,nr],WI),k3=Se([Hf,nr,Lm],b3),N7=Se([nr],x3),Sce=Se([nr],e=>e.allowDataOverflow),L7=Se([N7,Sce],EI),Cce=Se([Lm],e=>e.filter(U0)),Ece=Se([wce,Cce,Om],n7),Ace=Se([Ece,Al,tr,L7],r7),Oce=Se([Lm],JI),Tce=Se([Hf,nr,Oce,q0,tr],S3,{memoizeOptions:{resultEqualityCheck:$0}}),jce=Se([i7,tr,Uf],$f),Mce=Se([jce,tr],s7),Pce=Se([a7,tr,Uf],$f),Nce=Se([Pce,tr],l7),Lce=Se([o7,tr,Uf],$f),Rce=Se([Lce,tr],u7),Dce=Se([Mce,Rce,Nce],py),kce=Se([nr,N7,L7,Ace,Tce,Dce,At,tr],C3),R7=Se([nr,At,Hf,k3,Om,tr,kce],E3),Ice=Se([R7,nr,D3],T3),zce=Se([nr,R7,Ice,tr],M3),D7=e=>{var t=tr(e),n=Uf(e),r=!1;return Pm(e,t,n,r)},k7=Se([nr,D7],z0),I7=Se([nr,D3,zce,k7],O3),Bce=Se([At,k3,nr,tr],v7),Uce=Se([At,k3,nr,tr],y7),$ce=(e,t,n,r,i,o,l,c)=>{if(t){var{type:f}=t,h=wl(e,c);if(r){var m=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,y=f==="category"&&r.bandwidth?r.bandwidth()/m:0;return y=c==="angleAxis"&&i!=null&&i?.length>=2?cr(i[0]-i[1])*2*y:y,h&&l?l.map((x,b)=>({coordinate:r(x)+y,value:x,index:b,offset:y})):r.domain().map((x,b)=>({coordinate:r(x)+y,value:o?o[x]:x,index:b,offset:y}))}}},os=Se([At,nr,D3,I7,D7,Bce,Uce,tr],$ce),I3=Se([x7,_7,ece],(e,t,n)=>w7(n.shared,e,t)),z7=e=>e.tooltip.settings.trigger,z3=e=>e.tooltip.settings.defaultIndex,W0=Se([Vf,I3,z7,z3],T7),vl=Se([W0,Hf],R3),B7=Se([os,vl],S7),U7=Se([W0],e=>{if(e)return e.dataKey}),$7=Se([Vf,I3,z7,z3],M7),Fce=Se([ts,ns,At,Jn,os,z3,$7,Nm],j7),Vce=Se([W0,Fce],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),Hce=Se([W0],e=>e.active),qce=Se([$7,vl,Al,t7,B7,Nm,I3],P7),Gce=Se([qce],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function U5(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 $5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U5(Object(n),!0).forEach(function(r){Yce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yce(e,t,n){return(t=Wce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wce(e){var t=Kce(e,"string");return typeof t=="symbol"?t:t+""}function Kce(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 Zce=()=>Ve(nr),Xce=()=>{var e=Zce(),t=Ve(os),n=Ve(I7);return yf(!e||!n?void 0:$5($5({},e),{},{scale:n}),t)};function F5(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 Wc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F5(Object(n),!0).forEach(function(r){Qce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qce(e,t,n){return(t=Jce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jce(e){var t=efe(e,"string");return typeof t=="symbol"?t:t+""}function efe(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 tfe=(e,t,n,r)=>{var i=t.find(o=>o&&o.index===n);if(i){if(e==="horizontal")return{x:i.coordinate,y:r.chartY};if(e==="vertical")return{x:r.chartX,y:i.coordinate}}return{x:0,y:0}},nfe=(e,t,n,r)=>{var i=t.find(h=>h&&h.index===n);if(i){if(e==="centric"){var o=i.coordinate,{radius:l}=r;return Wc(Wc(Wc({},r),Fn(r.cx,r.cy,l,o)),{},{angle:o,radius:l})}var c=i.coordinate,{angle:f}=r;return Wc(Wc(Wc({},r),Fn(r.cx,r.cy,c,f)),{},{angle:f,radius:c})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function rfe(e,t){var{chartX:n,chartY:r}=e;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}var F7=(e,t,n,r,i)=>{var o,l=-1,c=(o=t?.length)!==null&&o!==void 0?o:0;if(c<=1||e==null)return 0;if(r==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var f=0;f<c;f++){var h=f>0?n[f-1].coordinate:n[c-1].coordinate,m=n[f].coordinate,y=f>=c-1?n[0].coordinate:n[f+1].coordinate,x=void 0;if(cr(m-h)!==cr(y-m)){var b=[];if(cr(y-m)===cr(i[1]-i[0])){x=y;var w=m+i[1]-i[0];b[0]=Math.min(w,(w+h)/2),b[1]=Math.max(w,(w+h)/2)}else{x=h;var C=y+i[1]-i[0];b[0]=Math.min(m,(C+m)/2),b[1]=Math.max(m,(C+m)/2)}var O=[Math.min(m,(x+m)/2),Math.max(m,(x+m)/2)];if(e>O[0]&&e<=O[1]||e>=b[0]&&e<=b[1]){({index:l}=n[f]);break}}else{var T=Math.min(h,y),P=Math.max(h,y);if(e>(T+m)/2&&e<=(P+m)/2){({index:l}=n[f]);break}}}else if(t){for(var N=0;N<c;N++)if(N===0&&e<=(t[N].coordinate+t[N+1].coordinate)/2||N>0&&N<c-1&&e>(t[N].coordinate+t[N-1].coordinate)/2&&e<=(t[N].coordinate+t[N+1].coordinate)/2||N===c-1&&e>(t[N].coordinate+t[N-1].coordinate)/2){({index:l}=t[N]);break}}return l},ife=()=>Ve(o3),B3=(e,t)=>t,V7=(e,t,n)=>n,U3=(e,t,n,r)=>r,afe=Se(os,e=>x0(e,t=>t.coordinate)),$3=Se([Vf,B3,V7,U3],T7),H7=Se([$3,Hf],R3),ofe=(e,t,n)=>{if(t!=null){var r=Vf(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},q7=Se([Vf,B3,V7,U3],M7),gy=Se([ts,ns,At,Jn,os,U3,q7,Nm],j7),sfe=Se([$3,gy],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),G7=Se([os,H7],S7),lfe=Se([q7,H7,Al,t7,G7,Nm,B3],P7),ufe=Se([$3],e=>({isActive:e.active,activeIndex:e.index})),cfe=(e,t,n,r,i,o,l)=>{if(!(!e||!n||!r||!i)&&rfe(e,l)){var c=Zre(e,t),f=F7(c,o,i,n,r),h=tfe(t,i,f,e);return{activeIndex:String(f),activeCoordinate:h}}},ffe=(e,t,n,r,i,o,l)=>{if(!(!e||!r||!i||!o||!n)){var c=Qae(e,n);if(c){var f=Xre(c,t),h=F7(f,l,o,r,i),m=nfe(t,o,h,c);return{activeIndex:String(h),activeCoordinate:m}}}},dfe=(e,t,n,r,i,o,l,c)=>{if(!(!e||!t||!r||!i||!o))return t==="horizontal"||t==="vertical"?cfe(e,t,r,i,o,l,c):ffe(e,t,n,r,i,o,l)},hfe=Se(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElementId:r.elementId}}),mfe=Se(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(r=>parseInt(r,10)).concat(Object.values(Ln)),n=Array.from(new Set(t));return n.sort((r,i)=>r-i)},{memoizeOptions:{resultEqualityCheck:tue}});function V5(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 H5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?V5(Object(n),!0).forEach(function(r){pfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pfe(e,t,n){return(t=gfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gfe(e){var t=vfe(e,"string");return typeof t=="symbol"?t:t+""}function vfe(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 yfe={},bfe={zIndexMap:Object.values(Ln).reduce((e,t)=>H5(H5({},e),{},{[t]:{elementId:void 0,panoramaElementId:void 0,consumers:0}}),yfe)},xfe=new Set(Object.values(Ln));function _fe(e){return xfe.has(e)}var Y7=Et({name:"zIndex",initialState:bfe,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,elementId:void 0,panoramaElementId:void 0}},prepare:Zn()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!_fe(n)&&delete e.zIndexMap[n])},prepare:Zn()},registerZIndexPortalId:{reducer:(e,t)=>{var{zIndex:n,elementId:r,isPanorama:i}=t.payload;e.zIndexMap[n]?i?e.zIndexMap[n].panoramaElementId=r:e.zIndexMap[n].elementId=r:e.zIndexMap[n]={consumers:0,elementId:i?void 0:r,panoramaElementId:i?r:void 0}},prepare:Zn()},unregisterZIndexPortalId:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElementId=void 0:e.zIndexMap[n].elementId=void 0)},prepare:Zn()}}}),{registerZIndexPortal:wfe,unregisterZIndexPortal:Sfe,registerZIndexPortalId:Cfe,unregisterZIndexPortalId:Efe}=Y7.actions,Afe=Y7.reducer;function Fr(e){var{zIndex:t,children:n}=e,r=Tie(),i=r&&t!==void 0&&t!==0,o=wr(),l=sn();_.useLayoutEffect(()=>i?(l(wfe({zIndex:t})),()=>{l(Sfe({zIndex:t}))}):Xu,[l,t,i]);var c=Ve(h=>hfe(h,t,o));if(!i)return n;if(!c)return null;var f=document.getElementById(c);return f?Pf.createPortal(n,f):null}function Fw(){return Fw=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},Fw.apply(null,arguments)}function q5(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 Dg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?q5(Object(n),!0).forEach(function(r){Ofe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ofe(e,t,n){return(t=Tfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tfe(e){var t=jfe(e,"string");return typeof t=="symbol"?t:t+""}function jfe(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 Mfe(e){var{cursor:t,cursorComp:n,cursorProps:r}=e;return _.isValidElement(t)?_.cloneElement(t,r):_.createElement(n,r)}function Pfe(e){var t,{coordinate:n,payload:r,index:i,offset:o,tooltipAxisBandSize:l,layout:c,cursor:f,tooltipEventType:h,chartName:m}=e,y=n,x=r,b=i;if(!f||!y||m!=="ScatterChart"&&h!=="axis")return null;var w,C,O;if(m==="ScatterChart")w=y,C=mae,O=Ln.cursorLine;else if(m==="BarChart")w=pae(c,y,o,l),C=LC,O=Ln.cursorRectangle;else if(c==="radial"&&Jk(y)){var{cx:T,cy:P,radius:N,startAngle:F,endAngle:B}=$8(y);w={cx:T,cy:P,startAngle:F,endAngle:B,innerRadius:N,outerRadius:N},C=V8,O=Ln.cursorLine}else w={points:noe(c,y,o)},C=NC,O=Ln.cursorLine;var W=typeof f=="object"&&"className"in f?f.className:void 0,Q=Dg(Dg(Dg(Dg({stroke:"#ccc",pointerEvents:"none"},o),w),Iu(f)),{},{payload:x,payloadIndex:b,className:Oe("recharts-tooltip-cursor",W)});return _.createElement(Fr,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:O},_.createElement(Mfe,{cursor:f,cursorComp:C,cursorProps:Q}))}function Nfe(e){var t=Xce(),n=S8(),r=bm(),i=ife();return t==null||n==null||r==null||i==null?null:_.createElement(Pfe,Fw({},e,{offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var W7=_.createContext(null),Lfe=()=>_.useContext(W7),n_={exports:{}},G5;function Rfe(){return G5||(G5=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(f,h,m){this.fn=f,this.context=h,this.once=m||!1}function o(f,h,m,y,x){if(typeof m!="function")throw new TypeError("The listener must be a function");var b=new i(m,y||f,x),w=n?n+h:h;return f._events[w]?f._events[w].fn?f._events[w]=[f._events[w],b]:f._events[w].push(b):(f._events[w]=b,f._eventsCount++),f}function l(f,h){--f._eventsCount===0?f._events=new r:delete f._events[h]}function c(){this._events=new r,this._eventsCount=0}c.prototype.eventNames=function(){var h=[],m,y;if(this._eventsCount===0)return h;for(y in m=this._events)t.call(m,y)&&h.push(n?y.slice(1):y);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(m)):h},c.prototype.listeners=function(h){var m=n?n+h:h,y=this._events[m];if(!y)return[];if(y.fn)return[y.fn];for(var x=0,b=y.length,w=new Array(b);x<b;x++)w[x]=y[x].fn;return w},c.prototype.listenerCount=function(h){var m=n?n+h:h,y=this._events[m];return y?y.fn?1:y.length:0},c.prototype.emit=function(h,m,y,x,b,w){var C=n?n+h:h;if(!this._events[C])return!1;var O=this._events[C],T=arguments.length,P,N;if(O.fn){switch(O.once&&this.removeListener(h,O.fn,void 0,!0),T){case 1:return O.fn.call(O.context),!0;case 2:return O.fn.call(O.context,m),!0;case 3:return O.fn.call(O.context,m,y),!0;case 4:return O.fn.call(O.context,m,y,x),!0;case 5:return O.fn.call(O.context,m,y,x,b),!0;case 6:return O.fn.call(O.context,m,y,x,b,w),!0}for(N=1,P=new Array(T-1);N<T;N++)P[N-1]=arguments[N];O.fn.apply(O.context,P)}else{var F=O.length,B;for(N=0;N<F;N++)switch(O[N].once&&this.removeListener(h,O[N].fn,void 0,!0),T){case 1:O[N].fn.call(O[N].context);break;case 2:O[N].fn.call(O[N].context,m);break;case 3:O[N].fn.call(O[N].context,m,y);break;case 4:O[N].fn.call(O[N].context,m,y,x);break;default:if(!P)for(B=1,P=new Array(T-1);B<T;B++)P[B-1]=arguments[B];O[N].fn.apply(O[N].context,P)}}return!0},c.prototype.on=function(h,m,y){return o(this,h,m,y,!1)},c.prototype.once=function(h,m,y){return o(this,h,m,y,!0)},c.prototype.removeListener=function(h,m,y,x){var b=n?n+h:h;if(!this._events[b])return this;if(!m)return l(this,b),this;var w=this._events[b];if(w.fn)w.fn===m&&(!x||w.once)&&(!y||w.context===y)&&l(this,b);else{for(var C=0,O=[],T=w.length;C<T;C++)(w[C].fn!==m||x&&!w[C].once||y&&w[C].context!==y)&&O.push(w[C]);O.length?this._events[b]=O.length===1?O[0]:O:l(this,b)}return this},c.prototype.removeAllListeners=function(h){var m;return h?(m=n?n+h:h,this._events[m]&&l(this,m)):(this._events=new r,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,e.exports=c})(n_)),n_.exports}var Dfe=Rfe();const kfe=Qi(Dfe);var Qh=new kfe,Vw="recharts.syncEvent.tooltip",Y5="recharts.syncEvent.brush";function F3(e,t){if(t){var n=Number.parseInt(t,10);if(!_a(n))return e?.[n]}}var Ife={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},K7=Et({name:"options",initialState:Ife,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),zfe=K7.reducer,{createEventEmitter:Bfe}=K7.actions;function Ufe(e){return e.tooltip.syncInteraction}var $fe={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},Z7=Et({name:"chartData",initialState:$fe,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:W5,setDataStartEndIndexes:Ffe,setComputedData:Jwe}=Z7.actions,Vfe=Z7.reducer,Hfe=["x","y"];function K5(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 Kc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?K5(Object(n),!0).forEach(function(r){qfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qfe(e,t,n){return(t=Gfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gfe(e){var t=Yfe(e,"string");return typeof t=="symbol"?t:t+""}function Yfe(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 Wfe(e,t){if(e==null)return{};var n,r,i=Kfe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Kfe(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 Zfe(){var e=Ve(s3),t=Ve(l3),n=sn(),r=Ve(FI),i=Ve(os),o=bm(),l=E0(),c=Ve(f=>f.rootProps.className);_.useEffect(()=>{if(e==null)return Xu;var f=(h,m,y)=>{if(t!==y&&e===h){if(r==="index"){var x;if(l&&m!==null&&m!==void 0&&(x=m.payload)!==null&&x!==void 0&&x.coordinate&&m.payload.sourceViewBox){var b=m.payload.coordinate,{x:w,y:C}=b,O=Wfe(b,Hfe),{x:T,y:P,width:N,height:F}=m.payload.sourceViewBox,B=Kc(Kc({},O),{},{x:l.x+(N?(w-T)/N:0)*l.width,y:l.y+(F?(C-P)/F:0)*l.height});n(Kc(Kc({},m),{},{payload:Kc(Kc({},m.payload),{},{coordinate:B})}))}else n(m);return}if(i!=null){var W;if(typeof r=="function"){var Q={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},re=r(i,Q);W=i[re]}else r==="value"&&(W=i.find(Y=>String(Y.value)===m.payload.label));var{coordinate:ce}=m.payload;if(W==null||m.payload.active===!1||ce==null||l==null){n(Uw({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0}));return}var{x:ae,y:J}=ce,oe=Math.min(ae,l.x+l.width),ve=Math.min(J,l.y+l.height),ie={x:o==="horizontal"?W.coordinate:oe,y:o==="horizontal"?ve:W.coordinate},ue=Uw({active:m.payload.active,coordinate:ie,dataKey:m.payload.dataKey,index:String(W.index),label:m.payload.label,sourceViewBox:m.payload.sourceViewBox});n(ue)}}};return Qh.on(Vw,f),()=>{Qh.off(Vw,f)}},[c,n,t,e,r,i,o,l])}function Xfe(){var e=Ve(s3),t=Ve(l3),n=sn();_.useEffect(()=>{if(e==null)return Xu;var r=(i,o,l)=>{t!==l&&e===i&&n(Ffe(o))};return Qh.on(Y5,r),()=>{Qh.off(Y5,r)}},[n,t,e])}function Qfe(){var e=sn();_.useEffect(()=>{e(Bfe())},[e]),Zfe(),Xfe()}function Jfe(e,t,n,r,i,o){var l=Ve(b=>ofe(b,e,t)),c=Ve(l3),f=Ve(s3),h=Ve(FI),m=Ve(Ufe),y=m?.active,x=E0();_.useEffect(()=>{if(!y&&f!=null&&c!=null){var b=Uw({active:o,coordinate:n,dataKey:l,index:i,label:typeof r=="number"?String(r):r,sourceViewBox:x});Qh.emit(Vw,f,b,c)}},[y,n,l,i,r,c,f,h,o,x])}function Z5(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 X5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Z5(Object(n),!0).forEach(function(r){ede(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ede(e,t,n){return(t=tde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tde(e){var t=nde(e,"string");return typeof t=="symbol"?t:t+""}function nde(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 rde(e){return e.dataKey}function ide(e,t){return _.isValidElement(e)?_.cloneElement(e,t):typeof e=="function"?_.createElement(e,t):_.createElement(Gie,t)}var Q5=[],ade={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!Sl.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function V3(e){var t,n,r=Qn(e,ade),{active:i,allowEscapeViewBox:o,animationDuration:l,animationEasing:c,content:f,filterNull:h,isAnimationActive:m,offset:y,payloadUniqBy:x,position:b,reverseDirection:w,useTranslate3d:C,wrapperStyle:O,cursor:T,shared:P,trigger:N,defaultIndex:F,portal:B,axisId:W}=r,Q=sn(),re=typeof F=="number"?String(F):F;_.useEffect(()=>{Q(ice({shared:P,trigger:N,axisId:W,active:i,defaultIndex:re}))},[Q,P,N,W,i,re]);var ce=E0(),ae=D8(),J=Jue(P),{activeIndex:oe,isActive:ve}=(t=Ve(be=>ufe(be,J,N,re)))!==null&&t!==void 0?t:{},ie=Ve(be=>lfe(be,J,N,re)),ue=Ve(be=>G7(be,J,N,re)),Y=Ve(be=>sfe(be,J,N,re)),I=ie,z=Lfe(),H=(n=i??ve)!==null&&n!==void 0?n:!1,[k,M]=Tre([I,H]),q=J==="axis"?ue:void 0;Jfe(J,N,Y,q,oe,H);var ee=B??z;if(ee==null||ce==null||J==null)return null;var se=I??Q5;H||(se=Q5),h&&se.length&&(se=cre(se.filter(be=>be.value!=null&&(be.hide!==!0||r.includeHidden)),x,rde));var me=se.length>0,de=_.createElement(Jie,{allowEscapeViewBox:o,animationDuration:l,animationEasing:c,isAnimationActive:m,active:H,coordinate:Y,hasPayload:me,offset:y,position:b,reverseDirection:w,useTranslate3d:C,viewBox:ce,wrapperStyle:O,lastBoundingBox:k,innerRef:M,hasPortalFromProps:!!B},ide(f,X5(X5({},r),{},{payload:se,label:q,active:H,activeIndex:oe,coordinate:Y,accessibilityLayer:ae})));return _.createElement(_.Fragment,null,Pf.createPortal(de,ee),H&&_.createElement(Nfe,{cursor:T,tooltipEventType:J,coordinate:Y,payload:se,index:oe}))}var tl=e=>null;tl.displayName="Cell";function ode(e,t,n){return(t=sde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sde(e){var t=lde(e,"string");return typeof t=="symbol"?t:t+""}function lde(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 ude{constructor(t){ode(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 J5(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 cde(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?J5(Object(n),!0).forEach(function(r){fde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fde(e,t,n){return(t=dde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dde(e){var t=hde(e,"string");return typeof t=="symbol"?t:t+""}function hde(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 mde={cacheSize:2e3,enableCache:!0},X7=cde({},mde),eN=new ude(X7.cacheSize),pde={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},tN="recharts_measurement_span";function gde(e,t){var n=t.fontSize||"",r=t.fontFamily||"",i=t.fontWeight||"",o=t.fontStyle||"",l=t.letterSpacing||"",c=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(i,"|").concat(o,"|").concat(l,"|").concat(c)}var nN=(e,t)=>{try{var n=document.getElementById(tN);n||(n=document.createElement("span"),n.setAttribute("id",tN),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,pde,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},Eh=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Sl.isSsr)return{width:0,height:0};if(!X7.enableCache)return nN(t,n);var r=gde(t,n),i=eN.get(r);if(i)return i;var o=nN(t,n);return eN.set(r,o),o},rN=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,iN=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,vde=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,yde=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Q7={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},bde=Object.keys(Q7),tf="NaN";function xde(e,t){return e*Q7[t]}class ti{static parse(t){var n,[,r,i]=(n=yde.exec(t))!==null&&n!==void 0?n:[];return new ti(parseFloat(r),i??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,_a(t)&&(this.unit=""),n!==""&&!vde.test(n)&&(this.num=NaN,this.unit=""),bde.includes(n)&&(this.num=xde(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new ti(NaN,""):new ti(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new ti(NaN,""):new ti(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new ti(NaN,""):new ti(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new ti(NaN,""):new ti(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return _a(this.num)}}function J7(e){if(e.includes(tf))return tf;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,i,o]=(n=rN.exec(t))!==null&&n!==void 0?n:[],l=ti.parse(r??""),c=ti.parse(o??""),f=i==="*"?l.multiply(c):l.divide(c);if(f.isNaN())return tf;t=t.replace(rN,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var h,[,m,y,x]=(h=iN.exec(t))!==null&&h!==void 0?h:[],b=ti.parse(m??""),w=ti.parse(x??""),C=y==="+"?b.add(w):b.subtract(w);if(C.isNaN())return tf;t=t.replace(iN,C.toString())}return t}var aN=/\(([^()]*)\)/;function _de(e){for(var t=e,n;(n=aN.exec(t))!=null;){var[,r]=n;t=t.replace(aN,J7(r))}return t}function wde(e){var t=e.replace(/\s+/g,"");return t=_de(t),t=J7(t),t}function Sde(e){try{return wde(e)}catch{return tf}}function r_(e){var t=Sde(e.slice(5,-1));return t===tf?"":t}var Cde=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],Ede=["dx","dy","angle","className","breakAll"];function Hw(){return Hw=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},Hw.apply(null,arguments)}function oN(e,t){if(e==null)return{};var n,r,i=Ade(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ade(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 e9=/[ \f\n\r\t\v\u2028\u2029]+/,t9=e=>{var{children:t,breakAll:n,style:r}=e;try{var i=[];pn(t)||(n?i=t.toString().split(""):i=t.toString().split(e9));var o=i.map(c=>({word:c,width:Eh(c,r).width})),l=n?0:Eh(" ",r).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}};function Ode(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}var n9=(e,t,n,r)=>e.reduce((i,o)=>{var{word:l,width:c}=o,f=i[i.length-1];if(f&&c!=null&&(t==null||r||f.width+c+n<Number(t)))f.words.push(l),f.width+=c+n;else{var h={words:[l],width:c};i.push(h)}return i},[]),r9=e=>e.reduce((t,n)=>t.width>n.width?t:n),Tde="…",sN=(e,t,n,r,i,o,l,c)=>{var f=e.slice(0,t),h=t9({breakAll:n,style:r,children:f+Tde});if(!h)return[!1,[]];var m=n9(h.wordsWithComputedWidth,o,l,c),y=m.length>i||r9(m).width>Number(o);return[y,m]},jde=(e,t,n,r,i)=>{var{maxLines:o,children:l,style:c,breakAll:f}=e,h=He(o),m=String(l),y=n9(t,r,n,i);if(!h||i)return y;var x=y.length>o||r9(y).width>Number(r);if(!x)return y;for(var b=0,w=m.length-1,C=0,O;b<=w&&C<=m.length-1;){var T=Math.floor((b+w)/2),P=T-1,[N,F]=sN(m,P,f,c,o,r,n,i),[B]=sN(m,T,f,c,o,r,n,i);if(!N&&!B&&(b=T+1),N&&B&&(w=T-1),!N&&B){O=F;break}C++}return O||y},lN=e=>{var t=pn(e)?[]:e.toString().split(e9);return[{words:t,width:void 0}]},Mde=e=>{var{width:t,scaleToFit:n,children:r,style:i,breakAll:o,maxLines:l}=e;if((t||n)&&!Sl.isSsr){var c,f,h=t9({breakAll:o,children:r,style:i});if(h){var{wordsWithComputedWidth:m,spaceWidth:y}=h;c=m,f=y}else return lN(r);return jde({breakAll:o,children:r,maxLines:l,style:i},c,f,t,!!n)}return lN(r)},i9="#808080",Pde={breakAll:!1,capHeight:"0.71em",fill:i9,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},K0=_.forwardRef((e,t)=>{var n=Qn(e,Pde),{x:r,y:i,lineHeight:o,capHeight:l,fill:c,scaleToFit:f,textAnchor:h,verticalAnchor:m}=n,y=oN(n,Cde),x=_.useMemo(()=>Mde({breakAll:y.breakAll,children:y.children,maxLines:y.maxLines,scaleToFit:f,style:y.style,width:y.width}),[y.breakAll,y.children,y.maxLines,f,y.style,y.width]),{dx:b,dy:w,angle:C,className:O,breakAll:T}=y,P=oN(y,Ede);if(!ni(r)||!ni(i)||x.length===0)return null;var N=Number(r)+(He(b)?b:0),F=Number(i)+(He(w)?w:0);if(!Rn(N)||!Rn(F))return null;var B;switch(m){case"start":B=r_("calc(".concat(l,")"));break;case"middle":B=r_("calc(".concat((x.length-1)/2," * -").concat(o," + (").concat(l," / 2))"));break;default:B=r_("calc(".concat(x.length-1," * -").concat(o,")"));break}var W=[];if(f){var Q=x[0].width,{width:re}=y;W.push("scale(".concat(He(re)&&He(Q)?re/Q:1,")"))}return C&&W.push("rotate(".concat(C,", ").concat(N,", ").concat(F,")")),W.length&&(P.transform=W.join(" ")),_.createElement("text",Hw({},Nr(P),{ref:t,x:N,y:F,className:Oe("recharts-text",O),textAnchor:h,fill:c.includes("url")?i9:c}),x.map((ce,ae)=>{var J=ce.words.join(T?"":" ");return _.createElement("tspan",{x:N,dy:ae===0?B:o,key:"".concat(J,"-").concat(ae)},J)}))});K0.displayName="Text";var Nde=["labelRef"];function Lde(e,t){if(e==null)return{};var n,r,i=Rde(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Rde(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 uN(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 Nn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uN(Object(n),!0).forEach(function(r){Dde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dde(e,t,n){return(t=kde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kde(e){var t=Ide(e,"string");return typeof t=="symbol"?t:t+""}function Ide(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 No(){return No=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},No.apply(null,arguments)}var a9=_.createContext(null),o9=e=>{var{x:t,y:n,upperWidth:r,lowerWidth:i,width:o,height:l,children:c}=e,f=_.useMemo(()=>({x:t,y:n,upperWidth:r,lowerWidth:i,width:o,height:l}),[t,n,r,i,o,l]);return _.createElement(a9.Provider,{value:f},c)},s9=()=>{var e=_.useContext(a9),t=E0();return e||w8(t)},zde=_.createContext(null),Bde=()=>{var e=_.useContext(zde),t=Ve(YI);return e||t},Ude=e=>{var{value:t,formatter:n}=e,r=pn(e.children)?t:e.children;return typeof n=="function"?n(r):r},H3=e=>e!=null&&typeof e=="function",$de=(e,t)=>{var n=cr(t-e),r=Math.min(Math.abs(t-e),360);return n*r},Fde=(e,t,n,r,i)=>{var{offset:o,className:l}=e,{cx:c,cy:f,innerRadius:h,outerRadius:m,startAngle:y,endAngle:x,clockWise:b}=i,w=(h+m)/2,C=$de(y,x),O=C>=0?1:-1,T,P;switch(t){case"insideStart":T=y+O*o,P=b;break;case"insideEnd":T=x-O*o,P=!b;break;case"end":T=x+O*o,P=b;break;default:throw new Error("Unsupported position ".concat(t))}P=C<=0?P:!P;var N=Fn(c,f,w,T),F=Fn(c,f,w,T+(P?1:-1)*359),B="M".concat(N.x,",").concat(N.y,`
|
||
A`).concat(w,",").concat(w,",0,1,").concat(P?0:1,`,
|
||
`).concat(F.x,",").concat(F.y),W=pn(e.id)?Fh("recharts-radial-line-"):e.id;return _.createElement("text",No({},r,{dominantBaseline:"central",className:Oe("recharts-radial-bar-label",l)}),_.createElement("defs",null,_.createElement("path",{id:W,d:B})),_.createElement("textPath",{xlinkHref:"#".concat(W)},n))},Vde=(e,t,n)=>{var{cx:r,cy:i,innerRadius:o,outerRadius:l,startAngle:c,endAngle:f}=e,h=(c+f)/2;if(n==="outside"){var{x:m,y}=Fn(r,i,l+t,h);return{x:m,y,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 x=(o+l)/2,{x:b,y:w}=Fn(r,i,x,h);return{x:b,y:w,textAnchor:"middle",verticalAnchor:"middle"}},qw=e=>"cx"in e&&He(e.cx),Hde=(e,t)=>{var{parentViewBox:n,offset:r,position:i}=e,o;n!=null&&!qw(n)&&(o=n);var{x:l,y:c,upperWidth:f,lowerWidth:h,height:m}=t,y=l,x=l+(f-h)/2,b=(y+x)/2,w=(f+h)/2,C=y+f/2,O=m>=0?1:-1,T=O*r,P=O>0?"end":"start",N=O>0?"start":"end",F=f>=0?1:-1,B=F*r,W=F>0?"end":"start",Q=F>0?"start":"end";if(i==="top"){var re={x:y+f/2,y:c-T,textAnchor:"middle",verticalAnchor:P};return Nn(Nn({},re),o?{height:Math.max(c-o.y,0),width:f}:{})}if(i==="bottom"){var ce={x:x+h/2,y:c+m+T,textAnchor:"middle",verticalAnchor:N};return Nn(Nn({},ce),o?{height:Math.max(o.y+o.height-(c+m),0),width:h}:{})}if(i==="left"){var ae={x:b-B,y:c+m/2,textAnchor:W,verticalAnchor:"middle"};return Nn(Nn({},ae),o?{width:Math.max(ae.x-o.x,0),height:m}:{})}if(i==="right"){var J={x:b+w+B,y:c+m/2,textAnchor:Q,verticalAnchor:"middle"};return Nn(Nn({},J),o?{width:Math.max(o.x+o.width-J.x,0),height:m}:{})}var oe=o?{width:w,height:m}:{};return i==="insideLeft"?Nn({x:b+B,y:c+m/2,textAnchor:Q,verticalAnchor:"middle"},oe):i==="insideRight"?Nn({x:b+w-B,y:c+m/2,textAnchor:W,verticalAnchor:"middle"},oe):i==="insideTop"?Nn({x:y+f/2,y:c+T,textAnchor:"middle",verticalAnchor:N},oe):i==="insideBottom"?Nn({x:x+h/2,y:c+m-T,textAnchor:"middle",verticalAnchor:P},oe):i==="insideTopLeft"?Nn({x:y+B,y:c+T,textAnchor:Q,verticalAnchor:N},oe):i==="insideTopRight"?Nn({x:y+f-B,y:c+T,textAnchor:W,verticalAnchor:N},oe):i==="insideBottomLeft"?Nn({x:x+B,y:c+m-T,textAnchor:Q,verticalAnchor:P},oe):i==="insideBottomRight"?Nn({x:x+h-B,y:c+m-T,textAnchor:W,verticalAnchor:P},oe):i&&typeof i=="object"&&(He(i.x)||Ho(i.x))&&(He(i.y)||Ho(i.y))?Nn({x:l+Mr(i.x,w),y:c+Mr(i.y,m),textAnchor:"end",verticalAnchor:"end"},oe):Nn({x:C,y:c+m/2,textAnchor:"middle",verticalAnchor:"middle"},oe)},qde={offset:5,zIndex:Ln.label};function Zs(e){var t=Qn(e,qde),{viewBox:n,position:r,value:i,children:o,content:l,className:c="",textBreakAll:f,labelRef:h}=t,m=Bde(),y=s9(),x=r==="center"?y:m??y,b,w,C;if(n==null?b=x:qw(n)?b=n:b=w8(n),!b||pn(i)&&pn(o)&&!_.isValidElement(l)&&typeof l!="function")return null;var O=Nn(Nn({},t),{},{viewBox:b});if(_.isValidElement(l)){var{labelRef:T}=O,P=Lde(O,Nde);return _.cloneElement(l,P)}if(typeof l=="function"){if(w=_.createElement(l,O),_.isValidElement(w))return w}else w=Ude(t);var N=Nr(t);if(qw(b)){if(r==="insideStart"||r==="insideEnd"||r==="end")return Fde(t,r,w,N,b);C=Vde(b,t.offset,t.position)}else C=Hde(t,b);return _.createElement(Fr,{zIndex:t.zIndex},_.createElement(K0,No({ref:h,className:Oe("recharts-label",c)},N,C,{textAnchor:Ode(N.textAnchor)?N.textAnchor:C.textAnchor,breakAll:f}),w))}Zs.displayName="Label";var Gde=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?_.createElement(Zs,No({key:"label-implicit"},r)):ni(e)?_.createElement(Zs,No({key:"label-implicit",value:e},r)):_.isValidElement(e)?e.type===Zs?_.cloneElement(e,Nn({key:"label-implicit"},r)):_.createElement(Zs,No({key:"label-implicit",content:e},r)):H3(e)?_.createElement(Zs,No({key:"label-implicit",content:e},r)):e&&typeof e=="object"?_.createElement(Zs,No({},e,{key:"label-implicit"},r)):null};function l9(e){var{label:t,labelRef:n}=e,r=s9();return Gde(t,r,n)||null}var i_={},a_={},cN;function Yde(){return cN||(cN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n[n.length-1]}e.last=t})(a_)),a_}var o_={},fN;function Wde(){return fN||(fN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Array.isArray(n)?n:Array.from(n)}e.toArray=t})(o_)),o_}var dN;function Kde(){return dN||(dN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Yde(),n=Wde(),r=AC();function i(o){if(r.isArrayLike(o))return t.last(n.toArray(o))}e.last=i})(i_)),i_}var s_,hN;function Zde(){return hN||(hN=1,s_=Kde().last),s_}var Xde=Zde();const Qde=Qi(Xde);var Jde=["valueAccessor"],ehe=["dataKey","clockWise","id","textBreakAll","zIndex"];function vy(){return vy=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},vy.apply(null,arguments)}function mN(e,t){if(e==null)return{};var n,r,i=the(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function the(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 nhe=e=>Array.isArray(e.value)?Qde(e.value):e.value,u9=_.createContext(void 0),c9=u9.Provider,f9=_.createContext(void 0),rhe=f9.Provider;function ihe(){return _.useContext(u9)}function ahe(){return _.useContext(f9)}function iv(e){var{valueAccessor:t=nhe}=e,n=mN(e,Jde),{dataKey:r,clockWise:i,id:o,textBreakAll:l,zIndex:c}=n,f=mN(n,ehe),h=ihe(),m=ahe(),y=h||m;return!y||!y.length?null:_.createElement(Fr,{zIndex:c??Ln.label},_.createElement(Xn,{className:"recharts-label-list"},y.map((x,b)=>{var w,C=pn(r)?t(x,b):Qt(x&&x.payload,r),O=pn(o)?{}:{id:"".concat(o,"-").concat(b)};return _.createElement(Zs,vy({key:"label-".concat(b)},Nr(x),f,O,{fill:(w=n.fill)!==null&&w!==void 0?w:x.fill,parentViewBox:x.parentViewBox,value:C,textBreakAll:l,viewBox:x.viewBox,index:b,zIndex:0}))})))}iv.displayName="LabelList";function q3(e){var{label:t}=e;return t?t===!0?_.createElement(iv,{key:"labelList-implicit"}):_.isValidElement(t)||H3(t)?_.createElement(iv,{key:"labelList-implicit",content:t}):typeof t=="object"?_.createElement(iv,vy({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Gw(){return Gw=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},Gw.apply(null,arguments)}var d9=e=>{var{cx:t,cy:n,r,className:i}=e,o=Oe("recharts-dot",i);return He(t)&&He(n)&&He(r)?_.createElement("circle",Gw({},Oi(e),EC(e),{className:o,cx:t,cy:n,r})):null},h9=e=>e.graphicalItems.polarItems,ohe=Se([gn,Tm],m3),Z0=Se([h9,_n,ohe],p3),she=Se([Z0],g3),X0=Se([she,r3],v3),lhe=Se([X0,_n,Z0],b3);Se([X0,_n,Z0],(e,t,n)=>n.length>0?e.flatMap(r=>n.flatMap(i=>{var o,l=Qt(r,(o=t.dataKey)!==null&&o!==void 0?o:i.dataKey);return{value:l,errorDomain:[]}})).filter(Boolean):t?.dataKey!=null?e.map(r=>({value:Qt(r,t.dataKey),errorDomain:[]})):e.map(r=>({value:r,errorDomain:[]})));var pN=()=>{},uhe=Se([X0,_n,Z0,q0,gn],S3),che=Se([_n,_3,w3,pN,uhe,pN,At,gn],C3),m9=Se([_n,At,X0,lhe,Om,gn,che],E3),fhe=Se([m9,_n,Ff],T3);Se([_n,m9,fhe,gn],M3);var dhe={radiusAxis:{},angleAxis:{}},p9=Et({name:"polarAxis",initialState:dhe,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:eSe,removeRadiusAxis:tSe,addAngleAxis:nSe,removeAngleAxis:rSe}=p9.actions,hhe=p9.reducer;function gN(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 vN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gN(Object(n),!0).forEach(function(r){mhe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mhe(e,t,n){return(t=phe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function phe(e){var t=ghe(e,"string");return typeof t=="symbol"?t:t+""}function ghe(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 vhe=(e,t)=>t,G3=Se([h9,vhe],(e,t)=>e.filter(n=>n.type==="pie").find(n=>n.id===t)),yhe=[],Y3=(e,t,n)=>n?.length===0?yhe:n,g9=Se([r3,G3,Y3],(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(o=>vN(vN({},t.presentationProps),o.props))),i!=null)return i}}),bhe=Se([g9,G3,Y3],(e,t,n)=>{if(!(e==null||t==null))return e.map((r,i)=>{var o,l=Qt(r,t.nameKey,t.name),c;return n!=null&&(o=n[i])!==null&&o!==void 0&&(o=o.props)!==null&&o!==void 0&&o.fill?c=n[i].props.fill:typeof r=="object"&&r!=null&&"fill"in r?c=r.fill:c=t.fill,{value:kf(l,t.dataKey),color:c,payload:r,type:t.legendType}})}),xhe=Se([g9,G3,Y3,Jn],(e,t,n,r)=>{if(!(t==null||e==null))return bme({offset:r,pieSettings:t,displayedData:e,cells:n})}),l_={exports:{}},It={};var yN;function _he(){if(yN)return It;yN=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,o=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,h=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,x=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,w=e?Symbol.for("react.lazy"):60116,C=e?Symbol.for("react.block"):60121,O=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,P=e?Symbol.for("react.scope"):60119;function N(B){if(typeof B=="object"&&B!==null){var W=B.$$typeof;switch(W){case t:switch(B=B.type,B){case f:case h:case r:case o:case i:case y:return B;default:switch(B=B&&B.$$typeof,B){case c:case m:case w:case b:case l:return B;default:return W}}case n:return W}}}function F(B){return N(B)===h}return It.AsyncMode=f,It.ConcurrentMode=h,It.ContextConsumer=c,It.ContextProvider=l,It.Element=t,It.ForwardRef=m,It.Fragment=r,It.Lazy=w,It.Memo=b,It.Portal=n,It.Profiler=o,It.StrictMode=i,It.Suspense=y,It.isAsyncMode=function(B){return F(B)||N(B)===f},It.isConcurrentMode=F,It.isContextConsumer=function(B){return N(B)===c},It.isContextProvider=function(B){return N(B)===l},It.isElement=function(B){return typeof B=="object"&&B!==null&&B.$$typeof===t},It.isForwardRef=function(B){return N(B)===m},It.isFragment=function(B){return N(B)===r},It.isLazy=function(B){return N(B)===w},It.isMemo=function(B){return N(B)===b},It.isPortal=function(B){return N(B)===n},It.isProfiler=function(B){return N(B)===o},It.isStrictMode=function(B){return N(B)===i},It.isSuspense=function(B){return N(B)===y},It.isValidElementType=function(B){return typeof B=="string"||typeof B=="function"||B===r||B===h||B===o||B===i||B===y||B===x||typeof B=="object"&&B!==null&&(B.$$typeof===w||B.$$typeof===b||B.$$typeof===l||B.$$typeof===c||B.$$typeof===m||B.$$typeof===O||B.$$typeof===T||B.$$typeof===P||B.$$typeof===C)},It.typeOf=N,It}var bN;function whe(){return bN||(bN=1,l_.exports=_he()),l_.exports}var She=whe(),xN=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",_N=null,u_=null,v9=e=>{if(e===_N&&Array.isArray(u_))return u_;var t=[];return _.Children.forEach(e,n=>{pn(n)||(She.isFragment(n)?t=t.concat(v9(n.props.children)):t.push(n))}),u_=t,_N=e,t};function W3(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(i=>xN(i)):r=[xN(t)],v9(e).forEach(i=>{var o=zu(i,"type.displayName")||zu(i,"type.name");o&&r.indexOf(o)!==-1&&n.push(i)}),n}var y9=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,c_={},wN;function Che(){return wN||(wN=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})(c_)),c_}var f_,SN;function Ehe(){return SN||(SN=1,f_=Che().isPlainObject),f_}var Ahe=Ehe();const Ohe=Qi(Ahe);function CN(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 EN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CN(Object(n),!0).forEach(function(r){The(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function The(e,t,n){return(t=jhe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jhe(e){var t=Mhe(e,"string");return typeof t=="symbol"?t:t+""}function Mhe(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 yy(){return yy=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},yy.apply(null,arguments)}var AN=(e,t,n,r,i)=>{var o=n-r,l;return l="M ".concat(e,",").concat(t),l+="L ".concat(e+n,",").concat(t),l+="L ".concat(e+n-o/2,",").concat(t+i),l+="L ".concat(e+n-o/2-r,",").concat(t+i),l+="L ".concat(e,",").concat(t," Z"),l},Phe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Nhe=e=>{var t=Qn(e,Phe),{x:n,y:r,upperWidth:i,lowerWidth:o,height:l,className:c}=t,{animationEasing:f,animationDuration:h,animationBegin:m,isUpdateAnimationActive:y}=t,x=_.useRef(null),[b,w]=_.useState(-1),C=_.useRef(i),O=_.useRef(o),T=_.useRef(l),P=_.useRef(n),N=_.useRef(r),F=wm(e,"trapezoid-");if(_.useEffect(()=>{if(x.current&&x.current.getTotalLength)try{var ie=x.current.getTotalLength();ie&&w(ie)}catch{}},[]),n!==+n||r!==+r||i!==+i||o!==+o||l!==+l||i===0&&o===0||l===0)return null;var B=Oe("recharts-trapezoid",c);if(!y)return _.createElement("g",null,_.createElement("path",yy({},Nr(t),{className:B,d:AN(n,r,i,o,l)})));var W=C.current,Q=O.current,re=T.current,ce=P.current,ae=N.current,J="0px ".concat(b===-1?1:b,"px"),oe="".concat(b,"px 0px"),ve=k8(["strokeDasharray"],h,f);return _.createElement(_m,{animationId:F,key:F,canBegin:b>0,duration:h,easing:f,isActive:y,begin:m},ie=>{var ue=fn(W,i,ie),Y=fn(Q,o,ie),I=fn(re,l,ie),z=fn(ce,n,ie),H=fn(ae,r,ie);x.current&&(C.current=ue,O.current=Y,T.current=I,P.current=z,N.current=H);var k=ie>0?{transition:ve,strokeDasharray:oe}:{strokeDasharray:J};return _.createElement("path",yy({},Nr(t),{className:B,d:AN(z,H,ue,Y,I),ref:x,style:EN(EN({},k),t.style)}))})},Lhe=["option","shapeType","propTransformer","activeClassName","isActive"];function Rhe(e,t){if(e==null)return{};var n,r,i=Dhe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Dhe(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 ON(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 by(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ON(Object(n),!0).forEach(function(r){khe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ON(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function khe(e,t,n){return(t=Ihe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ihe(e){var t=zhe(e,"string");return typeof t=="symbol"?t:t+""}function zhe(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 Bhe(e,t){return by(by({},t),e)}function Uhe(e,t){return e==="symbols"}function TN(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return _.createElement(LC,n);case"trapezoid":return _.createElement(Nhe,n);case"sector":return _.createElement(V8,n);case"symbols":if(Uhe(t))return _.createElement(Qk,n);break;case"curve":return _.createElement(NC,n);default:return null}}function $he(e){return _.isValidElement(e)?e.props:e}function K3(e){var{option:t,shapeType:n,propTransformer:r=Bhe,activeClassName:i="recharts-active-shape",isActive:o}=e,l=Rhe(e,Lhe),c;if(_.isValidElement(t))c=_.cloneElement(t,by(by({},l),$he(t)));else if(typeof t=="function")c=t(l);else if(Ohe(t)&&typeof t!="boolean"){var f=r(t,l);c=_.createElement(TN,{shapeType:n,elementProps:f})}else{var h=l;c=_.createElement(TN,{shapeType:n,elementProps:h})}return o?_.createElement(Xn,{className:i},c):c}var Z3=(e,t)=>{var n=sn();return(r,i)=>o=>{e?.(r,i,o),n(E7({activeIndex:String(i),activeDataKey:t,activeCoordinate:r.tooltipPosition}))}},X3=e=>{var t=sn();return(n,r)=>i=>{e?.(n,r,i),t(ace())}},Q3=(e,t)=>{var n=sn();return(r,i)=>o=>{e?.(r,i,o),n(oce({activeIndex:String(i),activeDataKey:t,activeCoordinate:r.tooltipPosition}))}};function J3(e){var{fn:t,args:n}=e,r=sn(),i=wr();return _.useLayoutEffect(()=>{if(!i){var o=t(n);return r(nce(o)),()=>{r(rce(o))}}},[t,n,r,i]),null}function b9(e){var{legendPayload:t}=e,n=sn(),r=wr();return _.useLayoutEffect(()=>r?Xu:(n(L8(t)),()=>{n(R8(t))}),[n,r,t]),null}function Fhe(e){var{legendPayload:t}=e,n=sn(),r=Ve(At);return _.useLayoutEffect(()=>r!=="centric"&&r!=="radial"?Xu:(n(L8(t)),()=>{n(R8(t))}),[n,r,t]),null}var d_,Vhe=()=>{var[e]=_.useState(()=>Fh("uid-"));return e},Hhe=(d_=oS.useId)!==null&&d_!==void 0?d_:Vhe;function x9(e,t){var n=Hhe();return t||(e?"".concat(e,"-").concat(n):n)}var qhe=_.createContext(void 0),e4=e=>{var{id:t,type:n,children:r}=e,i=x9("recharts-".concat(n),t);return _.createElement(qhe.Provider,{value:i},r(i))},Ghe={cartesianItems:[],polarItems:[]},_9=Et({name:"graphicalItems",initialState:Ghe,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:Zn()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,i=ko(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=r)},prepare:Zn()},removeCartesianGraphicalItem:{reducer(e,t){var n=ko(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:Zn()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:Zn()},removePolarGraphicalItem:{reducer(e,t){var n=ko(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:Zn()}}}),{addCartesianGraphicalItem:Yhe,replaceCartesianGraphicalItem:Whe,removeCartesianGraphicalItem:Khe,addPolarGraphicalItem:Zhe,removePolarGraphicalItem:Xhe}=_9.actions,Qhe=_9.reducer;function w9(e){var t=sn(),n=_.useRef(null);return _.useLayoutEffect(()=>{n.current===null?t(Yhe(e)):n.current!==e&&t(Whe({prev:n.current,next:e})),n.current=e},[t,e]),_.useLayoutEffect(()=>()=>{n.current&&(t(Khe(n.current)),n.current=null)},[t]),null}function Jhe(e){var t=sn();return _.useLayoutEffect(()=>(t(Zhe(e)),()=>{t(Xhe(e))}),[t,e]),null}var eme=["onMouseEnter","onClick","onMouseLeave"],tme=["id"],nme=["id"];function t4(e,t){if(e==null)return{};var n,r,i=rme(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[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 jN(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 dn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jN(Object(n),!0).forEach(function(r){ime(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ime(e,t,n){return(t=ame(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ame(e){var t=ome(e,"string");return typeof t=="symbol"?t:t+""}function ome(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 yl(){return yl=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},yl.apply(null,arguments)}function sme(e){var t=_.useMemo(()=>W3(e.children,tl),[e.children]),n=Ve(r=>bhe(r,e.id,t));return n==null?null:_.createElement(Fhe,{legendPayload:n})}function lme(e){var{dataKey:t,nameKey:n,sectors:r,stroke:i,strokeWidth:o,fill:l,name:c,hide:f,tooltipType:h}=e;return{dataDefinedOnItem:r.map(m=>m.tooltipPayload),positions:r.map(m=>m.tooltipPosition),settings:{stroke:i,strokeWidth:o,fill:l,dataKey:t,nameKey:n,name:kf(c,t),hide:f,type:h,color:l,unit:""}}}var ume=(e,t)=>e>t?"start":e<t?"end":"middle",cme=(e,t,n)=>Mr(typeof t=="function"?t(e):t,n,n*.8),fme=(e,t,n)=>{var{top:r,left:i,width:o,height:l}=t,c=U8(o,l),f=i+Mr(e.cx,o,o/2),h=r+Mr(e.cy,l,l/2),m=Mr(e.innerRadius,c,0),y=cme(n,e.outerRadius,c),x=e.maxRadius||Math.sqrt(o*o+l*l)/2;return{cx:f,cy:h,innerRadius:m,outerRadius:y,maxRadius:x}},dme=(e,t)=>{var n=cr(t-e),r=Math.min(Math.abs(t-e),360);return n*r};function hme(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var mme=(e,t)=>{if(_.isValidElement(e))return _.cloneElement(e,t);if(typeof e=="function")return e(t);var n=Oe("recharts-pie-label-line",typeof e!="boolean"?e.className:"");return _.createElement(NC,yl({},t,{type:"linear",className:n}))},pme=(e,t,n)=>{if(_.isValidElement(e))return _.cloneElement(e,t);var r=n;if(typeof e=="function"&&(r=e(t),_.isValidElement(r)))return r;var i=Oe("recharts-pie-label-text",hme(e));return _.createElement(K0,yl({},t,{alignmentBaseline:"middle",className:i}),r)};function gme(e){var{sectors:t,props:n,showLabels:r}=e,{label:i,labelLine:o,dataKey:l}=n;if(!r||!i||!t)return null;var c=Oi(n),f=Iu(i),h=Iu(o),m=typeof i=="object"&&"offsetRadius"in i&&typeof i.offsetRadius=="number"&&i.offsetRadius||20,y=t.map((x,b)=>{var w=(x.startAngle+x.endAngle)/2,C=Fn(x.cx,x.cy,x.outerRadius+m,w),O=dn(dn(dn(dn({},c),x),{},{stroke:"none"},f),{},{index:b,textAnchor:ume(C.x,x.cx)},C),T=dn(dn(dn(dn({},c),x),{},{fill:"none",stroke:x.fill},h),{},{index:b,points:[Fn(x.cx,x.cy,x.outerRadius,w),C],key:"line"});return _.createElement(Fr,{zIndex:Ln.label,key:"label-".concat(x.startAngle,"-").concat(x.endAngle,"-").concat(x.midAngle,"-").concat(b)},_.createElement(Xn,null,o&&mme(o,T),pme(i,O,Qt(x,l))))});return _.createElement(Xn,{className:"recharts-pie-labels"},y)}function vme(e){var{sectors:t,props:n,showLabels:r}=e,{label:i}=n;return typeof i=="object"&&i!=null&&"position"in i?_.createElement(q3,{label:i}):_.createElement(gme,{sectors:t,props:n,showLabels:r})}function yme(e){var{sectors:t,activeShape:n,inactiveShape:r,allOtherPieProps:i}=e,o=Ve(vl),{onMouseEnter:l,onClick:c,onMouseLeave:f}=i,h=t4(i,eme),m=Z3(l,i.dataKey),y=X3(f),x=Q3(c,i.dataKey);return t==null||t.length===0?null:_.createElement(_.Fragment,null,t.map((b,w)=>{if(b?.startAngle===0&&b?.endAngle===0&&t.length!==1)return null;var C=n&&String(w)===o,O=o?r:null,T=C?n:O,P=dn(dn({},b),{},{stroke:b.stroke,tabIndex:-1,[v8]:w,[y8]:i.dataKey});return _.createElement(Xn,yl({key:"sector-".concat(b?.startAngle,"-").concat(b?.endAngle,"-").concat(b.midAngle,"-").concat(w),tabIndex:-1,className:"recharts-pie-sector"},b0(h,b,w),{onMouseEnter:m(b,w),onMouseLeave:y(b,w),onClick:x(b,w)}),_.createElement(K3,yl({option:T,isActive:C,shapeType:"sector"},P)))}))}function bme(e){var t,{pieSettings:n,displayedData:r,cells:i,offset:o}=e,{cornerRadius:l,startAngle:c,endAngle:f,dataKey:h,nameKey:m,tooltipType:y}=n,x=Math.abs(n.minAngle),b=dme(c,f),w=Math.abs(b),C=r.length<=1?0:(t=n.paddingAngle)!==null&&t!==void 0?t:0,O=r.filter(W=>Qt(W,h,0)!==0).length,T=(w>=360?O:O-1)*C,P=w-O*x-T,N=r.reduce((W,Q)=>{var re=Qt(Q,h,0);return W+(He(re)?re:0)},0),F;if(N>0){var B;F=r.map((W,Q)=>{var re=Qt(W,h,0),ce=Qt(W,m,Q),ae=fme(n,o,W),J=(He(re)?re:0)/N,oe,ve=dn(dn({},W),i&&i[Q]&&i[Q].props);Q?oe=B.endAngle+cr(b)*C*(re!==0?1:0):oe=c;var ie=oe+cr(b)*((re!==0?x:0)+J*P),ue=(oe+ie)/2,Y=(ae.innerRadius+ae.outerRadius)/2,I=[{name:ce,value:re,payload:ve,dataKey:h,type:y}],z=Fn(ae.cx,ae.cy,Y,ue);return B=dn(dn(dn(dn({},n.presentationProps),{},{percent:J,cornerRadius:typeof l=="string"?parseFloat(l):l,name:ce,tooltipPayload:I,midAngle:ue,middleRadius:Y,tooltipPosition:z},ve),ae),{},{value:re,startAngle:oe,endAngle:ie,payload:ve,paddingAngle:cr(b)*C}),B})}return F}function xme(e){var{showLabels:t,sectors:n,children:r}=e,i=_.useMemo(()=>!t||!n?[]:n.map(o=>({value:o.value,payload:o.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:o.cx,cy:o.cy,innerRadius:o.innerRadius,outerRadius:o.outerRadius,startAngle:o.startAngle,endAngle:o.endAngle,clockWise:!1},fill:o.fill})),[n,t]);return _.createElement(rhe,{value:t?i:void 0},r)}function _me(e){var{props:t,previousSectorsRef:n}=e,{sectors:r,isAnimationActive:i,animationBegin:o,animationDuration:l,animationEasing:c,activeShape:f,inactiveShape:h,onAnimationStart:m,onAnimationEnd:y}=t,x=wm(t,"recharts-pie-"),b=n.current,[w,C]=_.useState(!1),O=_.useCallback(()=>{typeof y=="function"&&y(),C(!1)},[y]),T=_.useCallback(()=>{typeof m=="function"&&m(),C(!0)},[m]);return _.createElement(xme,{showLabels:!w,sectors:r},_.createElement(_m,{animationId:x,begin:o,duration:l,isActive:i,easing:c,onAnimationStart:T,onAnimationEnd:O,key:x},P=>{var N=[],F=r&&r[0],B=F?.startAngle;return r?.forEach((W,Q)=>{var re=b&&b[Q],ce=Q>0?zu(W,"paddingAngle",0):0;if(re){var ae=fn(re.endAngle-re.startAngle,W.endAngle-W.startAngle,P),J=dn(dn({},W),{},{startAngle:B+ce,endAngle:B+ae+ce});N.push(J),B=J.endAngle}else{var{endAngle:oe,startAngle:ve}=W,ie=fn(0,oe-ve,P),ue=dn(dn({},W),{},{startAngle:B+ce,endAngle:B+ie+ce});N.push(ue),B=ue.endAngle}}),n.current=N,_.createElement(Xn,null,_.createElement(yme,{sectors:N,activeShape:f,inactiveShape:h,allOtherPieProps:t}))}),_.createElement(vme,{showLabels:!w,sectors:r,props:t}),t.children)}var wme={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:!Sl.isSsr,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff",zIndex:Ln.area};function Sme(e){var{id:t}=e,n=t4(e,tme),{hide:r,className:i,rootTabIndex:o}=e,l=_.useMemo(()=>W3(e.children,tl),[e.children]),c=Ve(m=>xhe(m,t,l)),f=_.useRef(null),h=Oe("recharts-pie",i);return r||c==null?(f.current=null,_.createElement(Xn,{tabIndex:o,className:h})):_.createElement(Fr,{zIndex:e.zIndex},_.createElement(J3,{fn:lme,args:dn(dn({},e),{},{sectors:c})}),_.createElement(Xn,{tabIndex:o,className:h},_.createElement(_me,{props:dn(dn({},n),{},{sectors:c}),previousSectorsRef:f})))}function Yw(e){var t=Qn(e,wme),{id:n}=t,r=t4(t,nme),i=Oi(r);return _.createElement(e4,{id:n,type:"pie"},o=>_.createElement(_.Fragment,null,_.createElement(Jhe,{type:"pie",id:o,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,maxRadius:t.maxRadius}),_.createElement(sme,yl({},r,{id:o})),_.createElement(Sme,yl({},r,{id:o}))))}Yw.displayName="Pie";var Cme=["points"];function MN(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 h_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MN(Object(n),!0).forEach(function(r){Eme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Eme(e,t,n){return(t=Ame(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ame(e){var t=Ome(e,"string");return typeof t=="symbol"?t:t+""}function Ome(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 xy(){return xy=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},xy.apply(null,arguments)}function Tme(e,t){if(e==null)return{};var n,r,i=jme(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[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 Mme(e){var{option:t,dotProps:n,className:r}=e;if(_.isValidElement(t))return _.cloneElement(t,n);if(typeof t=="function")return t(n);var i=Oe(r,typeof t!="boolean"?t.className:""),o=n??{},{points:l}=o,c=Tme(o,Cme);return _.createElement(d9,xy({},c,{className:i}))}function Pme(e,t){return e==null?!1:t?!0:e.length===1}function Nme(e){var{points:t,dot:n,className:r,dotClassName:i,dataKey:o,baseProps:l,needClip:c,clipPathId:f,zIndex:h=Ln.scatter}=e;if(!Pme(t,n))return null;var m=y9(n),y=Ite(n),x=t.map((w,C)=>{var O,T,P=h_(h_(h_({r:3},l),y),{},{index:C,cx:(O=w.x)!==null&&O!==void 0?O:void 0,cy:(T=w.y)!==null&&T!==void 0?T:void 0,dataKey:o,value:w.value,payload:w.payload,points:t});return _.createElement(Mme,{key:"dot-".concat(C),option:n,dotProps:P,className:i})}),b={};return c&&f!=null&&(b.clipPath="url(#clipPath-".concat(m?"":"dots-").concat(f,")")),_.createElement(Fr,{zIndex:h},_.createElement(Xn,xy({className:r},b),x))}function PN(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 NN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PN(Object(n),!0).forEach(function(r){Lme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lme(e,t,n){return(t=Rme(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rme(e){var t=Dme(e,"string");return typeof t=="symbol"?t:t+""}function Dme(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 kme={xAxis:{},yAxis:{},zAxis:{}},S9=Et({name:"cartesianAxis",initialState:kme,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:Zn()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:Zn()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:Zn()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:Zn()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:Zn()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:Zn()},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload,i=e.yAxis[n];if(i){var o=i.widthHistory||[];if(o.length===3&&o[0]===o[2]&&r===o[1]&&r!==i.width&&Math.abs(r-o[0])<=1)return;var l=[...o,r].slice(-3);e.yAxis[n]=NN(NN({},e.yAxis[n]),{},{width:r,widthHistory:l})}}}}),{addXAxis:Ime,removeXAxis:zme,addYAxis:Bme,removeYAxis:Ume,addZAxis:iSe,removeZAxis:aSe,updateYAxisWidth:$me}=S9.actions,Fme=S9.reducer,Vme=Se([Jn],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),Hme=Se([Vme,ts,ns],(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)}}),n4=()=>Ve(Hme),qme=()=>Ve(Gce);function LN(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 m_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LN(Object(n),!0).forEach(function(r){Gme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gme(e,t,n){return(t=Yme(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yme(e){var t=Wme(e,"string");return typeof t=="symbol"?t:t+""}function Wme(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 Kme=e=>{var{point:t,childIndex:n,mainColor:r,activeDot:i,dataKey:o}=e;if(i===!1||t.x==null||t.y==null)return null;var l={index:n,dataKey:o,cx:t.x,cy:t.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},c=m_(m_(m_({},l),Iu(i)),EC(i)),f;return _.isValidElement(i)?f=_.cloneElement(i,c):typeof i=="function"?f=i(c):f=_.createElement(d9,c),_.createElement(Xn,{className:"recharts-active-dot"},f)};function Zme(e){var{points:t,mainColor:n,activeDot:r,itemDataKey:i,zIndex:o=Ln.activeDot}=e,l=Ve(vl),c=qme();if(t==null||c==null)return null;var f=t.find(h=>c.includes(h.payload));return pn(f)?null:_.createElement(Fr,{zIndex:o},_.createElement(Kme,{point:f,childIndex:Number(l),mainColor:n,dataKey:i,activeDot:r}))}var Xme="Invariant failed";function Qme(e,t){throw new Error(Xme)}var Jme=["x","y"];function Ww(){return Ww=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},Ww.apply(null,arguments)}function RN(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 ch(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RN(Object(n),!0).forEach(function(r){epe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function epe(e,t,n){return(t=tpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tpe(e){var t=npe(e,"string");return typeof t=="symbol"?t:t+""}function npe(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 rpe(e,t){if(e==null)return{};var n,r,i=ipe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ipe(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 ape(e,t){var{x:n,y:r}=e,i=rpe(e,Jme),o="".concat(n),l=parseInt(o,10),c="".concat(r),f=parseInt(c,10),h="".concat(t.height||i.height),m=parseInt(h,10),y="".concat(t.width||i.width),x=parseInt(y,10);return ch(ch(ch(ch(ch({},t),i),l?{x:l}:{}),f?{y:f}:{}),{},{height:m,width:x,name:t.name,radius:t.radius})}function _y(e){return _.createElement(K3,Ww({shapeType:"rectangle",propTransformer:ape,activeClassName:"recharts-active-bar"},e))}var ope=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(r,i)=>{if(He(t))return t;var o=He(r)||pn(r);return o?t(r,i):(o||Qme(),n)}},spe={},C9=Et({name:"errorBars",initialState:spe,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:i}=t.payload;e[n]&&(e[n]=e[n].map(o=>o.dataKey===r.dataKey&&o.direction===r.direction?i:o))},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:oSe,replaceErrorBar:sSe,removeErrorBar:lSe}=C9.actions,lpe=C9.reducer,upe=["children"];function cpe(e,t){if(e==null)return{};var n,r,i=fpe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function fpe(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 dpe={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},hpe=_.createContext(dpe);function E9(e){var{children:t}=e,n=cpe(e,upe);return _.createElement(hpe.Provider,{value:n},t)}function r4(e,t){var n,r,i=Ve(h=>is(h,e)),o=Ve(h=>as(h,t)),l=(n=i?.allowDataOverflow)!==null&&n!==void 0?n:gi.allowDataOverflow,c=(r=o?.allowDataOverflow)!==null&&r!==void 0?r:vi.allowDataOverflow,f=l||c;return{needClip:f,needClipX:l,needClipY:c}}function A9(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,i=n4(),{needClipX:o,needClipY:l,needClip:c}=r4(t,n);if(!c||!i)return null;var{x:f,y:h,width:m,height:y}=i;return _.createElement("clipPath",{id:"clipPath-".concat(r)},_.createElement("rect",{x:o?f:f-m/2,y:l?h:h-y/2,width:o?m:m*2,height:l?y:y*2}))}function mpe(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&Rn(e.zIndex)?e.zIndex:t}var ppe=["onMouseEnter","onMouseLeave","onClick"],gpe=["value","background","tooltipPosition"],vpe=["id"],ype=["onMouseEnter","onClick","onMouseLeave"];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 DN(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 kr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DN(Object(n),!0).forEach(function(r){bpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bpe(e,t,n){return(t=xpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xpe(e){var t=_pe(e,"string");return typeof t=="symbol"?t:t+""}function _pe(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 wy(e,t){if(e==null)return{};var n,r,i=wpe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function wpe(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 Spe=e=>{var{dataKey:t,name:n,fill:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:kf(n,t),payload:e}]};function Cpe(e){var{dataKey:t,stroke:n,strokeWidth:r,fill:i,name:o,hide:l,unit:c}=e;return{dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:n,strokeWidth:r,fill:i,dataKey:t,nameKey:void 0,name:kf(o,t),hide:l,type:e.tooltipType,color:e.fill,unit:c}}}function Epe(e){var t=Ve(vl),{data:n,dataKey:r,background:i,allOtherBarProps:o}=e,{onMouseEnter:l,onMouseLeave:c,onClick:f}=o,h=wy(o,ppe),m=Z3(l,r),y=X3(c),x=Q3(f,r);if(!i||n==null)return null;var b=Iu(i);return _.createElement(Fr,{zIndex:mpe(i,Ln.barBackground)},n.map((w,C)=>{var{value:O,background:T,tooltipPosition:P}=w,N=wy(w,gpe);if(!T)return null;var F=m(w,C),B=y(w,C),W=x(w,C),Q=kr(kr(kr(kr(kr({option:i,isActive:String(C)===t},N),{},{fill:"#eee"},T),b),b0(h,w,C)),{},{onMouseEnter:F,onMouseLeave:B,onClick:W,dataKey:r,index:C,className:"recharts-bar-background-rectangle"});return _.createElement(_y,Ko({key:"background-bar-".concat(C)},Q))}))}function Ape(e){var{showLabels:t,children:n,rects:r}=e,i=r?.map(o=>{var l={x:o.x,y:o.y,width:o.width,lowerWidth:o.width,upperWidth:o.width,height:o.height};return kr(kr({},l),{},{value:o.value,payload:o.payload,parentViewBox:o.parentViewBox,viewBox:l,fill:o.fill})});return _.createElement(c9,{value:t?i:void 0},n)}function Ope(e){var{shape:t,activeBar:n,baseProps:r,entry:i,index:o,dataKey:l}=e,c=Ve(vl),f=Ve(U7),h=n&&String(o)===c&&(f==null||l===f),m=h?n:t;return h?_.createElement(Fr,{zIndex:Ln.activeBar},_.createElement(_y,Ko({},r,{name:String(r.name)},i,{isActive:h,option:m,index:o,dataKey:l}))):_.createElement(_y,Ko({},r,{name:String(r.name)},i,{isActive:h,option:m,index:o,dataKey:l}))}function Tpe(e){var{shape:t,baseProps:n,entry:r,index:i,dataKey:o}=e;return _.createElement(_y,Ko({},n,{name:String(n.name)},r,{isActive:!1,option:t,index:i,dataKey:o}))}function jpe(e){var t,{data:n,props:r}=e,i=(t=Oi(r))!==null&&t!==void 0?t:{},{id:o}=i,l=wy(i,vpe),{shape:c,dataKey:f,activeBar:h}=r,{onMouseEnter:m,onClick:y,onMouseLeave:x}=r,b=wy(r,ype),w=Z3(m,f),C=X3(x),O=Q3(y,f);return n?_.createElement(_.Fragment,null,n.map((T,P)=>_.createElement(Xn,Ko({key:"rectangle-".concat(T?.x,"-").concat(T?.y,"-").concat(T?.value,"-").concat(P),className:"recharts-bar-rectangle"},b0(b,T,P),{onMouseEnter:w(T,P),onMouseLeave:C(T,P),onClick:O(T,P)}),h?_.createElement(Ope,{shape:c,activeBar:h,baseProps:l,entry:T,index:P,dataKey:f}):_.createElement(Tpe,{shape:c,baseProps:l,entry:T,index:P,dataKey:f})))):null}function Mpe(e){var{props:t,previousRectanglesRef:n}=e,{data:r,layout:i,isAnimationActive:o,animationBegin:l,animationDuration:c,animationEasing:f,onAnimationEnd:h,onAnimationStart:m}=t,y=n.current,x=wm(t,"recharts-bar-"),[b,w]=_.useState(!1),C=!b,O=_.useCallback(()=>{typeof h=="function"&&h(),w(!1)},[h]),T=_.useCallback(()=>{typeof m=="function"&&m(),w(!0)},[m]);return _.createElement(Ape,{showLabels:C,rects:r},_.createElement(_m,{animationId:x,begin:l,duration:c,isActive:o,easing:f,onAnimationEnd:O,onAnimationStart:T,key:x},P=>{var N=P===1?r:r?.map((F,B)=>{var W=y&&y[B];if(W)return kr(kr({},F),{},{x:fn(W.x,F.x,P),y:fn(W.y,F.y,P),width:fn(W.width,F.width,P),height:fn(W.height,F.height,P)});if(i==="horizontal"){var Q=fn(0,F.height,P),re=fn(F.stackedBarStart,F.y,P);return kr(kr({},F),{},{y:re,height:Q})}var ce=fn(0,F.width,P),ae=fn(F.stackedBarStart,F.x,P);return kr(kr({},F),{},{width:ce,x:ae})});return P>0&&(n.current=N??null),N==null?null:_.createElement(Xn,null,_.createElement(jpe,{props:t,data:N}))}),_.createElement(q3,{label:t.label}),t.children)}function Ppe(e){var t=_.useRef(null);return _.createElement(Mpe,{previousRectanglesRef:t,props:e})}var O9=0,Npe=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:Qt(e,t)}};class Lpe extends _.PureComponent{render(){var{hide:t,data:n,dataKey:r,className:i,xAxisId:o,yAxisId:l,needClip:c,background:f,id:h}=this.props;if(t||n==null)return null;var m=Oe("recharts-bar",i),y=h;return _.createElement(Xn,{className:m,id:h},c&&_.createElement("defs",null,_.createElement(A9,{clipPathId:y,xAxisId:o,yAxisId:l})),_.createElement(Xn,{className:"recharts-bar-rectangles",clipPath:c?"url(#clipPath-".concat(y,")"):void 0},_.createElement(Epe,{data:n,dataKey:r,background:f,allOtherBarProps:this.props}),_.createElement(Ppe,this.props)))}}var Rpe={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!Sl.isSsr,legendType:"rect",minPointSize:O9,xAxisId:0,yAxisId:0,zIndex:Ln.bar};function Dpe(e){var{xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:o,activeBar:l,animationBegin:c,animationDuration:f,animationEasing:h,isAnimationActive:m}=e,{needClip:y}=r4(t,n),x=bm(),b=wr(),w=W3(e.children,tl),C=Ve(P=>uge(P,t,n,b,e.id,w));if(x!=="vertical"&&x!=="horizontal")return null;var O,T=C?.[0];return T==null||T.height==null||T.width==null?O=0:O=x==="vertical"?T.height/2:T.width/2,_.createElement(E9,{xAxisId:t,yAxisId:n,data:C,dataPointFormatter:Npe,errorBarOffset:O},_.createElement(Lpe,Ko({},e,{layout:x,needClip:y,data:C,xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:o,activeBar:l,animationBegin:c,animationDuration:f,animationEasing:h,isAnimationActive:m})))}function kpe(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r},pos:i,bandSize:o,xAxis:l,yAxis:c,xAxisTicks:f,yAxisTicks:h,stackedData:m,displayedData:y,offset:x,cells:b,parentViewBox:w,dataStartIndex:C}=e,O=t==="horizontal"?c:l,T=m?O.scale.domain():null,P=Gre({numericAxis:O}),N=O.scale(P);return y.map((F,B)=>{var W,Q,re,ce,ae,J;m?W=Ure(m[B+C],T):(W=Qt(F,n),Array.isArray(W)||(W=[P,W]));var oe=ope(r,O9)(W[1],B);if(t==="horizontal"){var ve,[ie,ue]=[c.scale(W[0]),c.scale(W[1])];Q=iP({axis:l,ticks:f,bandSize:o,offset:i.offset,entry:F,index:B}),re=(ve=ue??ie)!==null&&ve!==void 0?ve:void 0,ce=i.size;var Y=ie-ue;if(ae=_a(Y)?0:Y,J={x:Q,y:x.top,width:ce,height:x.height},Math.abs(oe)>0&&Math.abs(ae)<Math.abs(oe)){var I=cr(ae||oe)*(Math.abs(oe)-Math.abs(ae));re-=I,ae+=I}}else{var[z,H]=[l.scale(W[0]),l.scale(W[1])];if(Q=z,re=iP({axis:c,ticks:h,bandSize:o,offset:i.offset,entry:F,index:B}),ce=H-z,ae=i.size,J={x:x.left,y:re,width:x.width,height:ae},Math.abs(oe)>0&&Math.abs(ce)<Math.abs(oe)){var k=cr(ce||oe)*(Math.abs(oe)-Math.abs(ce));ce+=k}}if(Q==null||re==null||ce==null||ae==null)return null;var M=kr(kr({},F),{},{stackedBarStart:N,x:Q,y:re,width:ce,height:ae,value:m?W:W[1],payload:F,background:J,tooltipPosition:{x:Q+ce/2,y:re+ae/2},parentViewBox:w},b&&b[B]&&b[B].props);return M}).filter(Boolean)}function Ipe(e){var t=Qn(e,Rpe),n=wr();return _.createElement(e4,{id:t.id,type:"bar"},r=>_.createElement(_.Fragment,null,_.createElement(b9,{legendPayload:Spe(t)}),_.createElement(J3,{fn:Cpe,args:t}),_.createElement(w9,{type:"bar",id:r,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:qre(t.stackId),hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n}),_.createElement(Fr,{zIndex:t.zIndex},_.createElement(Dpe,Ko({},t,{id:r})))))}var av=_.memo(Ipe);av.displayName="Bar";function kN(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 kg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kN(Object(n),!0).forEach(function(r){zpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zpe(e,t,n){return(t=Bpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bpe(e){var t=Upe(e,"string");return typeof t=="symbol"?t:t+""}function Upe(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 $pe=(e,t)=>t,Fpe=(e,t,n)=>n,Vpe=(e,t,n,r)=>r,Hpe=(e,t,n,r,i)=>i,Rm=Se([V0,Hpe],(e,t)=>e.filter(n=>n.type==="bar").find(n=>n.id===t)),qpe=Se([Rm],e=>e?.maxBarSize),Gpe=(e,t,n,r,i,o)=>o,IN=(e,t,n)=>{var r=n??e;if(!pn(r))return Mr(r,t,0)},Ype=Se([At,V0,$pe,Fpe,Vpe],(e,t,n,r,i)=>t.filter(o=>e==="horizontal"?o.xAxisId===n:o.yAxisId===r).filter(o=>o.isPanorama===i).filter(o=>o.hide===!1).filter(o=>o.type==="bar")),Wpe=(e,t,n,r)=>{var i=At(e);return i==="horizontal"?Bw(e,"yAxis",n,r):Bw(e,"xAxis",t,r)},Kpe=(e,t,n)=>{var r=At(e);return r==="horizontal"?D5(e,"xAxis",t):D5(e,"yAxis",n)},Zpe=(e,t,n)=>{var r={},i=e.filter(U0),o=e.filter(h=>h.stackId==null),l=i.reduce((h,m)=>(h[m.stackId]||(h[m.stackId]=[]),h[m.stackId].push(m),h),r),c=Object.entries(l).map(h=>{var[m,y]=h,x=y.map(w=>w.dataKey),b=IN(t,n,y[0].barSize);return{stackId:m,dataKeys:x,barSize:b}}),f=o.map(h=>{var m=[h.dataKey].filter(x=>x!=null),y=IN(t,n,h.barSize);return{stackId:void 0,dataKeys:m,barSize:y}});return[...c,...f]},Xpe=Se([Ype,Kle,Kpe],Zpe),Qpe=(e,t,n,r,i)=>{var o,l,c=Rm(e,t,n,r,i);if(c!=null){var f=At(e),h=UI(e),{maxBarSize:m}=c,y=pn(m)?h:m,x,b;return f==="horizontal"?(x=gl(e,"xAxis",t,r),b=pl(e,"xAxis",t,r)):(x=gl(e,"yAxis",n,r),b=pl(e,"yAxis",n,r)),(o=(l=yf(x,b,!0))!==null&&l!==void 0?l:y)!==null&&o!==void 0?o:0}},T9=(e,t,n,r)=>{var i=At(e),o,l;return i==="horizontal"?(o=gl(e,"xAxis",t,r),l=pl(e,"xAxis",t,r)):(o=gl(e,"yAxis",n,r),l=pl(e,"yAxis",n,r)),yf(o,l)};function Jpe(e,t,n,r,i){var o=r.length;if(!(o<1)){var l=Mr(e,n,0,!0),c,f=[];if(Rn(r[0].barSize)){var h=!1,m=n/o,y=r.reduce((T,P)=>T+(P.barSize||0),0);y+=(o-1)*l,y>=n&&(y-=(o-1)*l,l=0),y>=n&&m>0&&(h=!0,m*=.9,y=o*m);var x=(n-y)/2>>0,b={offset:x-l,size:0};c=r.reduce((T,P)=>{var N,F={stackId:P.stackId,dataKeys:P.dataKeys,position:{offset:b.offset+b.size+l,size:h?m:(N=P.barSize)!==null&&N!==void 0?N:0}},B=[...T,F];return b=B[B.length-1].position,B},f)}else{var w=Mr(t,n,0,!0);n-2*w-(o-1)*l<=0&&(l=0);var C=(n-2*w-(o-1)*l)/o;C>1&&(C>>=0);var O=Rn(i)?Math.min(C,i):C;c=r.reduce((T,P,N)=>[...T,{stackId:P.stackId,dataKeys:P.dataKeys,position:{offset:w+(C+l)*N+(C-O)/2,size:O}}],f)}return c}}var ege=(e,t,n,r,i,o,l)=>{var c=pn(l)?t:l,f=Jpe(n,r,i!==o?i:o,e,c);return i!==o&&f!=null&&(f=f.map(h=>kg(kg({},h),{},{position:kg(kg({},h.position),{},{offset:h.position.offset-i/2})}))),f},tge=Se([Xpe,UI,Wle,$I,Qpe,T9,qpe],ege),nge=(e,t,n,r)=>gl(e,"xAxis",t,r),rge=(e,t,n,r)=>gl(e,"yAxis",n,r),ige=(e,t,n,r)=>pl(e,"xAxis",t,r),age=(e,t,n,r)=>pl(e,"yAxis",n,r),oge=Se([tge,Rm],(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}}),sge=(e,t)=>{var n=d3(t);if(!(!e||n==null||t==null)){var{stackId:r}=t;if(r!=null){var i=e[r];if(i){var{stackedData:o}=i;if(o)return o.find(l=>l.key===n)}}}},lge=Se([Wpe,Rm],sge),uge=Se([Jn,TC,nge,rge,ige,age,oge,At,k0,T9,lge,Rm,Gpe],(e,t,n,r,i,o,l,c,f,h,m,y,x)=>{var{chartData:b,dataStartIndex:w,dataEndIndex:C}=f;if(!(y==null||l==null||t==null||c!=="horizontal"&&c!=="vertical"||n==null||r==null||i==null||o==null||h==null)){var{data:O}=y,T;if(O!=null&&O.length>0?T=O:T=b?.slice(w,C+1),T!=null)return kpe({layout:c,barSettings:y,pos:l,parentViewBox:t,bandSize:h,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,stackedData:m,displayedData:T,offset:e,cells:x,dataStartIndex:w})}}),j9=e=>{var{chartData:t}=e,n=sn(),r=wr();return _.useEffect(()=>r?()=>{}:(n(W5(t)),()=>{n(W5(void 0))}),[t,n,r]),null},zN={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},M9=Et({name:"brush",initialState:zN,reducers:{setBrushSettings(e,t){return t.payload==null?zN:t.payload}}}),{setBrushSettings:uSe}=M9.actions,cge=M9.reducer;function BN(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 Ig(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BN(Object(n),!0).forEach(function(r){P9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function P9(e,t,n){return(t=fge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fge(e){var t=dge(e,"string");return typeof t=="symbol"?t:t+""}function dge(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 hge=(e,t)=>{var{x:n,y:r}=e,{x:i,y:o}=t;return{x:Math.min(n,i),y:Math.min(r,o),width:Math.abs(i-n),height:Math.abs(o-r)}};class Q0{static create(t){return new Q0(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 o=this.bandwidth?this.bandwidth():0;return this.scale(t)+o}default:return this.scale(t)}if(n){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+l}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}}P9(Q0,"EPS",1e-4);var mge=e=>{var t=Object.keys(e).reduce((n,r)=>Ig(Ig({},n),{},{[r]:Q0.create(e[r])}),{});return Ig(Ig({},t),{},{apply(n){var{bandAware:r,position:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.fromEntries(Object.entries(n).map(o=>{var[l,c]=o;return[l,t[l].apply(c,{bandAware:r,position:i})]}))},isInRange(n){return Object.keys(n).every(r=>t[r].isInRange(n[r]))}})};function pge(e){return(e%180+180)%180}var gge=function(t){var{width:n,height:r}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=pge(i),l=o*Math.PI/180,c=Math.atan(r/n),f=l>c&&l<Math.PI-c?r/Math.sin(l):n/Math.cos(l);return Math.abs(f)},vge={dots:[],areas:[],lines:[]},N9=Et({name:"referenceElements",initialState:vge,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=ko(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=ko(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=ko(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:cSe,removeDot:fSe,addArea:yge,removeArea:bge,addLine:dSe,removeLine:hSe}=N9.actions,xge=N9.reducer,L9=_.createContext(void 0),_ge=e=>{var{children:t}=e,[n]=_.useState("".concat(Fh("recharts"),"-clip")),r=n4();if(r==null)return null;var{x:i,y:o,width:l,height:c}=r;return _.createElement(L9.Provider,{value:n},_.createElement("defs",null,_.createElement("clipPath",{id:n},_.createElement("rect",{x:i,y:o,height:c,width:l}))),t)},wge=()=>_.useContext(L9);function UN(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 $N(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UN(Object(n),!0).forEach(function(r){Sge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sge(e,t,n){return(t=Cge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cge(e){var t=Ege(e,"string");return typeof t=="symbol"?t:t+""}function Ege(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 Sy(){return Sy=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},Sy.apply(null,arguments)}var Age=(e,t,n,r,i,o,l)=>{var{x1:c,x2:f,y1:h,y2:m}=l;if(i==null||o==null)return null;var y=mge({x:i,y:o}),x={x:e?y.x.apply(c,{position:"start"}):y.x.rangeMin,y:n?y.y.apply(h,{position:"start"}):y.y.rangeMin},b={x:t?y.x.apply(f,{position:"end"}):y.x.rangeMax,y:r?y.y.apply(m,{position:"end"}):y.y.rangeMax};return l.ifOverflow==="discard"&&(!y.isInRange(x)||!y.isInRange(b))?null:hge(x,b)},Oge=(e,t)=>{var n;return _.isValidElement(e)?n=_.cloneElement(e,t):typeof e=="function"?n=e(t):n=_.createElement(LC,Sy({},t,{className:"recharts-reference-area-rect"})),n};function Tge(e){var t=sn();return _.useEffect(()=>(t(yge(e)),()=>{t(bge(e))})),null}function jge(e){var{x1:t,x2:n,y1:r,y2:i,className:o,shape:l,xAxisId:c,yAxisId:f}=e,h=wge(),m=wr(),y=Ve(F=>ml(F,"xAxis",c,m)),x=Ve(F=>ml(F,"yAxis",f,m));if(y==null||!x==null)return null;var b=ni(t),w=ni(n),C=ni(r),O=ni(i);if(!b&&!w&&!C&&!O&&!l)return null;var T=Age(b,w,C,O,y,x,e);if(!T&&!l)return null;var P=e.ifOverflow==="hidden",N=P?"url(#".concat(h,")"):void 0;return _.createElement(Fr,{zIndex:e.zIndex},_.createElement(Xn,{className:Oe("recharts-reference-area",o)},Oge(l,$N($N({clipPath:N},Nr(e)),T)),T!=null&&_.createElement(o9,Sy({},T,{lowerWidth:T.width,upperWidth:T.width}),_.createElement(l9,{label:e.label}),e.children)))}var Mge={ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1,zIndex:Ln.area};function R9(e){var t=Qn(e,Mge);return _.createElement(_.Fragment,null,_.createElement(Tge,{yAxisId:t.yAxisId,xAxisId:t.xAxisId,ifOverflow:t.ifOverflow,x1:t.x1,x2:t.x2,y1:t.y1,y2:t.y2}),_.createElement(jge,t))}R9.displayName="ReferenceArea";function Sf(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 D9(e,t){if(t<1)return[];if(t===1)return e;for(var n=[],r=0;r<e.length;r+=t)n.push(e[r]);return n}function Pge(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return gge(r,n)}function Nge(e,t,n){var r=n==="width",{x:i,y:o,width:l,height:c}=e;return t===1?{start:r?i:o,end:r?i+l:o+c}:{start:r?i+l:o+c,end:r?i:o}}function Cy(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function Lge(e,t){return D9(e,t+1)}function Rge(e,t,n,r,i){for(var o=(r||[]).slice(),{start:l,end:c}=t,f=0,h=1,m=l,y=function(){var w=r?.[f];if(w===void 0)return{v:D9(r,h)};var C=f,O,T=()=>(O===void 0&&(O=n(w,C)),O),P=w.coordinate,N=f===0||Cy(e,P,T,m,c);N||(f=0,m=l,h+=1),N&&(m=P+e*(T()/2+i),f+=h)},x;h<=o.length;)if(x=y(),x)return x.v;return[]}function FN(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?FN(Object(n),!0).forEach(function(r){Dge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dge(e,t,n){return(t=kge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kge(e){var t=Ige(e,"string");return typeof t=="symbol"?t:t+""}function Ige(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 zge(e,t,n,r,i){for(var o=(r||[]).slice(),l=o.length,{start:c}=t,{end:f}=t,h=function(x){var b=o[x],w,C=()=>(w===void 0&&(w=n(b,x)),w);if(x===l-1){var O=e*(b.coordinate+e*C()/2-f);o[x]=b=Or(Or({},b),{},{tickCoord:O>0?b.coordinate-O*e:b.coordinate})}else o[x]=b=Or(Or({},b),{},{tickCoord:b.coordinate});if(b.tickCoord!=null){var T=Cy(e,b.tickCoord,C,c,f);T&&(f=b.tickCoord-e*(C()/2+i),o[x]=Or(Or({},b),{},{isShow:!0}))}},m=l-1;m>=0;m--)h(m);return o}function Bge(e,t,n,r,i,o){var l=(r||[]).slice(),c=l.length,{start:f,end:h}=t;if(o){var m=r[c-1],y=n(m,c-1),x=e*(m.coordinate+e*y/2-h);if(l[c-1]=m=Or(Or({},m),{},{tickCoord:x>0?m.coordinate-x*e:m.coordinate}),m.tickCoord!=null){var b=Cy(e,m.tickCoord,()=>y,f,h);b&&(h=m.tickCoord-e*(y/2+i),l[c-1]=Or(Or({},m),{},{isShow:!0}))}}for(var w=o?c-1:c,C=function(P){var N=l[P],F,B=()=>(F===void 0&&(F=n(N,P)),F);if(P===0){var W=e*(N.coordinate-e*B()/2-f);l[P]=N=Or(Or({},N),{},{tickCoord:W<0?N.coordinate-W*e:N.coordinate})}else l[P]=N=Or(Or({},N),{},{tickCoord:N.coordinate});if(N.tickCoord!=null){var Q=Cy(e,N.tickCoord,B,f,h);Q&&(f=N.tickCoord+e*(B()/2+i),l[P]=Or(Or({},N),{},{isShow:!0}))}},O=0;O<w;O++)C(O);return l}function i4(e,t,n){var{tick:r,ticks:i,viewBox:o,minTickGap:l,orientation:c,interval:f,tickFormatter:h,unit:m,angle:y}=e;if(!i||!i.length||!r)return[];if(He(f)||Sl.isSsr){var x;return(x=Lge(i,He(f)?f:0))!==null&&x!==void 0?x:[]}var b=[],w=c==="top"||c==="bottom"?"width":"height",C=m&&w==="width"?Eh(m,{fontSize:t,letterSpacing:n}):{width:0,height:0},O=(N,F)=>{var B=typeof h=="function"?h(N.value,F):N.value;return w==="width"?Pge(Eh(B,{fontSize:t,letterSpacing:n}),C,y):Eh(B,{fontSize:t,letterSpacing:n})[w]},T=i.length>=2?cr(i[1].coordinate-i[0].coordinate):1,P=Nge(o,T,w);return f==="equidistantPreserveStart"?Rge(T,P,O,i,l):(f==="preserveStart"||f==="preserveStartEnd"?b=Bge(T,P,O,i,l,f==="preserveStartEnd"):b=zge(T,P,O,i,l),b.filter(N=>N.isShow))}var Uge=e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:i=0,tickMargin:o=0}=e,l=0;if(t){Array.from(t).forEach(m=>{if(m){var y=m.getBoundingClientRect();y.width>l&&(l=y.width)}});var c=n?n.getBoundingClientRect().width:0,f=i+o,h=l+f+c+(n?r:0);return Math.round(h)}return 0},$ge=["axisLine","width","height","className","hide","ticks","axisType"],Fge=["viewBox"],Vge=["viewBox"];function Kw(e,t){if(e==null)return{};var n,r,i=Hge(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Hge(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 Vu(){return Vu=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},Vu.apply(null,arguments)}function VN(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 $n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VN(Object(n),!0).forEach(function(r){qge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qge(e,t,n){return(t=Gge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gge(e){var t=Yge(e,"string");return typeof t=="symbol"?t:t+""}function Yge(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 a4={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",zIndex:Ln.axis};function Wge(e){var{x:t,y:n,width:r,height:i,orientation:o,mirror:l,axisLine:c,otherSvgProps:f}=e;if(!c)return null;var h=$n($n($n({},f),Oi(c)),{},{fill:"none"});if(o==="top"||o==="bottom"){var m=+(o==="top"&&!l||o==="bottom"&&l);h=$n($n({},h),{},{x1:t,y1:n+m*i,x2:t+r,y2:n+m*i})}else{var y=+(o==="left"&&!l||o==="right"&&l);h=$n($n({},h),{},{x1:t+y*r,y1:n,x2:t+y*r,y2:n+i})}return _.createElement("line",Vu({},h,{className:Oe("recharts-cartesian-axis-line",zu(c,"className"))}))}function Kge(e,t,n,r,i,o,l,c,f){var h,m,y,x,b,w,C=c?-1:1,O=e.tickSize||l,T=He(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":h=m=e.coordinate,x=n+ +!c*i,y=x-C*O,w=y-C*f,b=T;break;case"left":y=x=e.coordinate,m=t+ +!c*r,h=m-C*O,b=h-C*f,w=T;break;case"right":y=x=e.coordinate,m=t+ +c*r,h=m+C*O,b=h+C*f,w=T;break;default:h=m=e.coordinate,x=n+ +c*i,y=x+C*O,w=y+C*f,b=T;break}return{line:{x1:h,y1:y,x2:m,y2:x},tick:{x:b,y:w}}}function Zge(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function Xge(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function Qge(e){var{option:t,tickProps:n,value:r}=e,i,o=Oe(n.className,"recharts-cartesian-axis-tick-value");if(_.isValidElement(t))i=_.cloneElement(t,$n($n({},n),{},{className:o}));else if(typeof t=="function")i=t($n($n({},n),{},{className:o}));else{var l="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(l=Oe(l,t?.className)),i=_.createElement(K0,Vu({},n,{className:l}),r)}return i}var Jge=_.forwardRef((e,t)=>{var{ticks:n=[],tick:r,tickLine:i,stroke:o,tickFormatter:l,unit:c,padding:f,tickTextProps:h,orientation:m,mirror:y,x,y:b,width:w,height:C,tickSize:O,tickMargin:T,fontSize:P,letterSpacing:N,getTicksConfig:F,events:B,axisType:W}=e,Q=i4($n($n({},F),{},{ticks:n}),P,N),re=Zge(m,y),ce=Xge(m,y),ae=Oi(F),J=Iu(r),oe={};typeof i=="object"&&(oe=i);var ve=$n($n({},ae),{},{fill:"none"},oe),ie=Q.map(I=>$n({entry:I},Kge(I,x,b,w,C,m,O,y,T))),ue=ie.map(I=>{var{entry:z,line:H}=I;return _.createElement(Xn,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(z.value,"-").concat(z.coordinate,"-").concat(z.tickCoord)},i&&_.createElement("line",Vu({},ve,H,{className:Oe("recharts-cartesian-axis-tick-line",zu(i,"className"))})))}),Y=ie.map((I,z)=>{var{entry:H,tick:k}=I,M=$n($n($n($n({textAnchor:re,verticalAnchor:ce},ae),{},{stroke:"none",fill:o},J),k),{},{index:z,payload:H,visibleTicksCount:Q.length,tickFormatter:l,padding:f},h);return _.createElement(Xn,Vu({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(H.value,"-").concat(H.coordinate,"-").concat(H.tickCoord)},b0(B,H,z)),r&&_.createElement(Qge,{option:r,tickProps:M,value:"".concat(typeof l=="function"?l(H.value,z):H.value).concat(c||"")}))});return _.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(W,"-ticks")},Y.length>0&&_.createElement(Fr,{zIndex:Ln.label},_.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(W,"-tick-labels"),ref:t},Y)),ue.length>0&&_.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(W,"-tick-lines")},ue))}),eve=_.forwardRef((e,t)=>{var{axisLine:n,width:r,height:i,className:o,hide:l,ticks:c,axisType:f}=e,h=Kw(e,$ge),[m,y]=_.useState(""),[x,b]=_.useState(""),w=_.useRef(null);_.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var O;return Uge({ticks:w.current,label:(O=e.labelRef)===null||O===void 0?void 0:O.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var C=_.useCallback(O=>{if(O){var T=O.getElementsByClassName("recharts-cartesian-axis-tick-value");w.current=T;var P=T[0];if(P){var N=window.getComputedStyle(P),F=N.fontSize,B=N.letterSpacing;(F!==m||B!==x)&&(y(F),b(B))}}},[m,x]);return l||r!=null&&r<=0||i!=null&&i<=0?null:_.createElement(Fr,{zIndex:e.zIndex},_.createElement(Xn,{className:Oe("recharts-cartesian-axis",o)},_.createElement(Wge,{x:e.x,y:e.y,width:r,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:Oi(e)}),_.createElement(Jge,{ref:C,axisType:f,events:h,fontSize:m,getTicksConfig:e,height:e.height,letterSpacing:x,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:c,unit:e.unit,width:e.width,x:e.x,y:e.y}),_.createElement(o9,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},_.createElement(l9,{label:e.label,labelRef:e.labelRef}),e.children)))}),tve=_.memo(eve,(e,t)=>{var{viewBox:n}=e,r=Kw(e,Fge),{viewBox:i}=t,o=Kw(t,Vge);return Sf(n,i)&&Sf(r,o)}),o4=_.forwardRef((e,t)=>{var n=Qn(e,a4);return _.createElement(tve,Vu({},n,{ref:t}))});o4.displayName="CartesianAxis";var nve=["x1","y1","x2","y2","key"],rve=["offset"],ive=["xAxisId","yAxisId"],ave=["xAxisId","yAxisId"];function HN(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?HN(Object(n),!0).forEach(function(r){ove(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ove(e,t,n){return(t=sve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sve(e){var t=lve(e,"string");return typeof t=="symbol"?t:t+""}function lve(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 Eu(){return Eu=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},Eu.apply(null,arguments)}function Ey(e,t){if(e==null)return{};var n,r,i=uve(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function uve(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 cve=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:n,x:r,y:i,width:o,height:l,ry:c}=e;return _.createElement("rect",{x:r,y:i,ry:c,width:o,height:l,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function k9(e){var{option:t,lineItemProps:n}=e,r;if(_.isValidElement(t))r=_.cloneElement(t,n);else if(typeof t=="function")r=t(n);else{var i,{x1:o,y1:l,x2:c,y2:f,key:h}=n,m=Ey(n,nve),y=(i=Oi(m))!==null&&i!==void 0?i:{},{offset:x}=y,b=Ey(y,rve);r=_.createElement("line",Eu({},b,{x1:o,y1:l,x2:c,y2:f,fill:"none",key:h}))}return r}function fve(e){var{x:t,width:n,horizontal:r=!0,horizontalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:o,yAxisId:l}=e,c=Ey(e,ive),f=i.map((h,m)=>{var y=Tr(Tr({},c),{},{x1:t,y1:h,x2:t+n,y2:h,key:"line-".concat(m),index:m});return _.createElement(k9,{key:"line-".concat(m),option:r,lineItemProps:y})});return _.createElement("g",{className:"recharts-cartesian-grid-horizontal"},f)}function dve(e){var{y:t,height:n,vertical:r=!0,verticalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:o,yAxisId:l}=e,c=Ey(e,ave),f=i.map((h,m)=>{var y=Tr(Tr({},c),{},{x1:h,y1:t,x2:h,y2:t+n,key:"line-".concat(m),index:m});return _.createElement(k9,{option:r,lineItemProps:y,key:"line-".concat(m)})});return _.createElement("g",{className:"recharts-cartesian-grid-vertical"},f)}function hve(e){var{horizontalFill:t,fillOpacity:n,x:r,y:i,width:o,height:l,horizontalPoints:c,horizontal:f=!0}=e;if(!f||!t||!t.length||c==null)return null;var h=c.map(y=>Math.round(y+i-i)).sort((y,x)=>y-x);i!==h[0]&&h.unshift(0);var m=h.map((y,x)=>{var b=!h[x+1],w=b?i+l-y:h[x+1]-y;if(w<=0)return null;var C=x%t.length;return _.createElement("rect",{key:"react-".concat(x),y,x:r,height:w,width:o,stroke:"none",fill:t[C],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return _.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},m)}function mve(e){var{vertical:t=!0,verticalFill:n,fillOpacity:r,x:i,y:o,width:l,height:c,verticalPoints:f}=e;if(!t||!n||!n.length)return null;var h=f.map(y=>Math.round(y+i-i)).sort((y,x)=>y-x);i!==h[0]&&h.unshift(0);var m=h.map((y,x)=>{var b=!h[x+1],w=b?i+l-y:h[x+1]-y;if(w<=0)return null;var C=x%n.length;return _.createElement("rect",{key:"react-".concat(x),x:y,y:o,width:w,height:c,stroke:"none",fill:n[C],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return _.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},m)}var pve=(e,t)=>{var{xAxis:n,width:r,height:i,offset:o}=e;return m8(i4(Tr(Tr(Tr({},a4),n),{},{ticks:p8(n),viewBox:{x:0,y:0,width:r,height:i}})),o.left,o.left+o.width,t)},gve=(e,t)=>{var{yAxis:n,width:r,height:i,offset:o}=e;return m8(i4(Tr(Tr(Tr({},a4),n),{},{ticks:p8(n),viewBox:{x:0,y:0,width:r,height:i}})),o.top,o.top+o.height,t)},vve={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Ln.grid};function s4(e){var t=C8(),n=E8(),r=S8(),i=Tr(Tr({},Qn(e,vve)),{},{x:He(e.x)?e.x:r.left,y:He(e.y)?e.y:r.top,width:He(e.width)?e.width:r.width,height:He(e.height)?e.height:r.height}),{xAxisId:o,yAxisId:l,x:c,y:f,width:h,height:m,syncWithTicks:y,horizontalValues:x,verticalValues:b}=i,w=wr(),C=Ve(ce=>k5(ce,"xAxis",o,w)),O=Ve(ce=>k5(ce,"yAxis",l,w));if(!Ka(h)||!Ka(m)||!He(c)||!He(f))return null;var T=i.verticalCoordinatesGenerator||pve,P=i.horizontalCoordinatesGenerator||gve,{horizontalPoints:N,verticalPoints:F}=i;if((!N||!N.length)&&typeof P=="function"){var B=x&&x.length,W=P({yAxis:O?Tr(Tr({},O),{},{ticks:B?x:O.ticks}):void 0,width:t??h,height:n??m,offset:r},B?!0:y);Kv(Array.isArray(W),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof W,"]")),Array.isArray(W)&&(N=W)}if((!F||!F.length)&&typeof T=="function"){var Q=b&&b.length,re=T({xAxis:C?Tr(Tr({},C),{},{ticks:Q?b:C.ticks}):void 0,width:t??h,height:n??m,offset:r},Q?!0:y);Kv(Array.isArray(re),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof re,"]")),Array.isArray(re)&&(F=re)}return _.createElement(Fr,{zIndex:i.zIndex},_.createElement("g",{className:"recharts-cartesian-grid"},_.createElement(cve,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),_.createElement(hve,Eu({},i,{horizontalPoints:N})),_.createElement(mve,Eu({},i,{verticalPoints:F})),_.createElement(fve,Eu({},i,{offset:r,horizontalPoints:N,xAxis:C,yAxis:O})),_.createElement(dve,Eu({},i,{offset:r,verticalPoints:F,xAxis:C,yAxis:O}))))}s4.displayName="CartesianGrid";var I9=(e,t,n,r)=>gl(e,"xAxis",t,r),z9=(e,t,n,r)=>pl(e,"xAxis",t,r),B9=(e,t,n,r)=>gl(e,"yAxis",n,r),U9=(e,t,n,r)=>pl(e,"yAxis",n,r),yve=Se([At,I9,B9,z9,U9],(e,t,n,r,i)=>wl(e,"xAxis")?yf(t,r,!1):yf(n,i,!1)),bve=(e,t,n,r,i)=>i;function xve(e){return e.type==="line"}var _ve=Se([V0,bve],(e,t)=>e.filter(xve).find(n=>n.id===t)),wve=Se([At,I9,B9,z9,U9,_ve,yve,k0],(e,t,n,r,i,o,l,c)=>{var{chartData:f,dataStartIndex:h,dataEndIndex:m}=c;if(!(o==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||l==null)){var{dataKey:y,data:x}=o,b;if(x!=null&&x.length>0?b=x:b=f?.slice(h,m+1),b!=null)return Vve({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:y,bandSize:l,displayedData:b})}});function Sve(e){var t=Iu(e),n=3,r=2;if(t!=null){var{r:i,strokeWidth:o}=t,l=Number(i),c=Number(o);return(Number.isNaN(l)||l<0)&&(l=n),(Number.isNaN(c)||c<0)&&(c=r),{r:l,strokeWidth:c}}return{r:n,strokeWidth:r}}var Cve=["id"],Eve=["type","layout","connectNulls","needClip","shape"],Ave=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Jh(){return Jh=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},Jh.apply(null,arguments)}function qN(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 Fa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qN(Object(n),!0).forEach(function(r){Ove(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ove(e,t,n){return(t=Tve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tve(e){var t=jve(e,"string");return typeof t=="symbol"?t:t+""}function jve(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 l4(e,t){if(e==null)return{};var n,r,i=Mve(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Mve(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 Pve=e=>{var{dataKey:t,name:n,stroke:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:kf(n,t),payload:e}]};function Nve(e){var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:o,name:l,hide:c,unit:f}=e;return{dataDefinedOnItem:n,positions:void 0,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:kf(l,t),hide:c,type:e.tooltipType,color:e.stroke,unit:f}}}var $9=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function Lve(e,t){for(var n=e.length%2!==0?[...e,0]:e,r=[],i=0;i<t;++i)r=[...r,...n];return r}var Rve=(e,t,n)=>{var r=n.reduce((y,x)=>y+x);if(!r)return $9(t,e);for(var i=Math.floor(e/r),o=e%r,l=t-e,c=[],f=0,h=0;f<n.length;h+=n[f],++f)if(h+n[f]>o){c=[...n.slice(0,f),o-h];break}var m=c.length%2===0?[0,l]:[l];return[...Lve(n,i),...c,...m].map(y=>"".concat(y,"px")).join(", ")};function Dve(e){var{clipPathId:t,points:n,props:r}=e,{dot:i,dataKey:o,needClip:l}=r,{id:c}=r,f=l4(r,Cve),h=Oi(f);return _.createElement(Nme,{points:n,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:o,baseProps:h,needClip:l,clipPathId:t})}function kve(e){var{showLabels:t,children:n,points:r}=e,i=_.useMemo(()=>r?.map(o=>{var l,c,f={x:(l=o.x)!==null&&l!==void 0?l:0,y:(c=o.y)!==null&&c!==void 0?c:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Fa(Fa({},f),{},{value:o.value,payload:o.payload,viewBox:f,parentViewBox:void 0,fill:void 0})}),[r]);return _.createElement(c9,{value:t?i:void 0},n)}function GN(e){var{clipPathId:t,pathRef:n,points:r,strokeDasharray:i,props:o}=e,{type:l,layout:c,connectNulls:f,needClip:h,shape:m}=o,y=l4(o,Eve),x=Fa(Fa({},Nr(y)),{},{fill:"none",className:"recharts-line-curve",clipPath:h?"url(#clipPath-".concat(t,")"):void 0,points:r,type:l,layout:c,connectNulls:f,strokeDasharray:i??o.strokeDasharray});return _.createElement(_.Fragment,null,r?.length>1&&_.createElement(K3,Jh({shapeType:"curve",option:m},x,{pathRef:n})),_.createElement(Dve,{points:r,clipPathId:t,props:o}))}function Ive(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function zve(e){var{clipPathId:t,props:n,pathRef:r,previousPointsRef:i,longestAnimatedLengthRef:o}=e,{points:l,strokeDasharray:c,isAnimationActive:f,animationBegin:h,animationDuration:m,animationEasing:y,animateNewValues:x,width:b,height:w,onAnimationEnd:C,onAnimationStart:O}=n,T=i.current,P=wm(n,"recharts-line-"),[N,F]=_.useState(!1),B=!N,W=_.useCallback(()=>{typeof C=="function"&&C(),F(!1)},[C]),Q=_.useCallback(()=>{typeof O=="function"&&O(),F(!0)},[O]),re=Ive(r.current),ce=o.current;return _.createElement(kve,{points:l,showLabels:B},n.children,_.createElement(_m,{animationId:P,begin:h,duration:m,isActive:f,easing:y,onAnimationEnd:W,onAnimationStart:Q,key:P},ae=>{var J=fn(ce,re+ce,ae),oe=Math.min(J,re),ve;if(f)if(c){var ie="".concat(c).split(/[,\s]+/gim).map(I=>parseFloat(I));ve=Rve(oe,re,ie)}else ve=$9(re,oe);else ve=c==null?void 0:String(c);if(T){var ue=T.length/l.length,Y=ae===1?l:l.map((I,z)=>{var H=Math.floor(z*ue);if(T[H]){var k=T[H];return Fa(Fa({},I),{},{x:fn(k.x,I.x,ae),y:fn(k.y,I.y,ae)})}return x?Fa(Fa({},I),{},{x:fn(b*2,I.x,ae),y:fn(w/2,I.y,ae)}):Fa(Fa({},I),{},{x:I.x,y:I.y})});return i.current=Y,_.createElement(GN,{props:n,points:Y,clipPathId:t,pathRef:r,strokeDasharray:ve})}return ae>0&&re>0&&(i.current=l,o.current=oe),_.createElement(GN,{props:n,points:l,clipPathId:t,pathRef:r,strokeDasharray:ve})}),_.createElement(q3,{label:n.label}))}function Bve(e){var{clipPathId:t,props:n}=e,r=_.useRef(null),i=_.useRef(0),o=_.useRef(null);return _.createElement(zve,{props:n,clipPathId:t,previousPointsRef:r,longestAnimatedLengthRef:i,pathRef:o})}var Uve=(e,t)=>{var n,r;return{x:(n=e.x)!==null&&n!==void 0?n:void 0,y:(r=e.y)!==null&&r!==void 0?r:void 0,value:e.value,errorVal:Qt(e.payload,t)}};class $ve extends _.Component{render(){var{hide:t,dot:n,points:r,className:i,xAxisId:o,yAxisId:l,top:c,left:f,width:h,height:m,id:y,needClip:x,zIndex:b}=this.props;if(t)return null;var w=Oe("recharts-line",i),C=y,{r:O,strokeWidth:T}=Sve(n),P=y9(n),N=O*2+T;return _.createElement(Fr,{zIndex:b},_.createElement(Xn,{className:w},x&&_.createElement("defs",null,_.createElement(A9,{clipPathId:C,xAxisId:o,yAxisId:l}),!P&&_.createElement("clipPath",{id:"clipPath-dots-".concat(C)},_.createElement("rect",{x:f-N/2,y:c-N/2,width:h+N,height:m+N}))),_.createElement(E9,{xAxisId:o,yAxisId:l,data:r,dataPointFormatter:Uve,errorBarOffset:0},_.createElement(Bve,{props:this.props,clipPathId:C}))),_.createElement(Zme,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey}))}}var F9={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:!Sl.isSsr,label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:Ln.line};function Fve(e){var t=Qn(e,F9),{activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:l,connectNulls:c,dot:f,hide:h,isAnimationActive:m,label:y,legendType:x,xAxisId:b,yAxisId:w,id:C}=t,O=l4(t,Ave),{needClip:T}=r4(b,w),P=n4(),N=bm(),F=wr(),B=Ve(ae=>wve(ae,b,w,F,C));if(N!=="horizontal"&&N!=="vertical"||B==null||P==null)return null;var{height:W,width:Q,x:re,y:ce}=P;return _.createElement($ve,Jh({},O,{id:C,connectNulls:c,dot:f,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:l,isAnimationActive:m,hide:h,label:y,legendType:x,xAxisId:b,yAxisId:w,points:B,layout:N,height:W,width:Q,left:re,top:ce,needClip:T}))}function Vve(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,dataKey:l,bandSize:c,displayedData:f}=e;return f.map((h,m)=>{var y=Qt(h,l);if(t==="horizontal"){var x=rP({axis:n,ticks:i,bandSize:c,entry:h,index:m}),b=pn(y)?null:r.scale(y);return{x,y:b,value:y,payload:h}}var w=pn(y)?null:n.scale(y),C=rP({axis:r,ticks:o,bandSize:c,entry:h,index:m});return w==null||C==null?null:{x:w,y:C,value:y,payload:h}}).filter(Boolean)}function Hve(e){var t=Qn(e,F9),n=wr();return _.createElement(e4,{id:t.id,type:"line"},r=>_.createElement(_.Fragment,null,_.createElement(b9,{legendPayload:Pve(t)}),_.createElement(J3,{fn:Nve,args:t}),_.createElement(w9,{type:"line",id:r,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),_.createElement(Fve,Jh({},t,{id:r}))))}var V9=_.memo(Hve);V9.displayName="Line";var qve=["dangerouslySetInnerHTML","ticks"],Gve=["id"],Yve=["domain"],Wve=["domain"];function Zw(){return Zw=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},Zw.apply(null,arguments)}function Ay(e,t){if(e==null)return{};var n,r,i=Kve(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Kve(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 Zve(e){var t=sn();return _.useLayoutEffect(()=>(t(Ime(e)),()=>{t(zme(e))}),[e,t]),null}var Xve=e=>{var{xAxisId:t,className:n}=e,r=Ve(TC),i=wr(),o="xAxis",l=Ve(O=>ml(O,o,t,i)),c=Ve(O=>b7(O,o,t,i)),f=Ve(O=>p7(O,t)),h=Ve(O=>Gue(O,t)),m=Ve(O=>KI(O,t));if(f==null||h==null||m==null)return null;var{dangerouslySetInnerHTML:y,ticks:x}=e,b=Ay(e,qve),{id:w}=m,C=Ay(m,Gve);return _.createElement(o4,Zw({},b,C,{scale:l,x:h.x,y:h.y,width:f.width,height:f.height,className:Oe("recharts-".concat(o," ").concat(o),n),viewBox:r,ticks:c,axisType:o}))},Qve={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},Jve=e=>{var t,n,r,i,o,l=Qn(e,Qve);return _.createElement(_.Fragment,null,_.createElement(Zve,{interval:(t=l.interval)!==null&&t!==void 0?t:"preserveEnd",id:l.xAxisId,scale:l.scale,type:l.type,padding:l.padding,allowDataOverflow:l.allowDataOverflow,domain:l.domain,dataKey:l.dataKey,allowDuplicatedCategory:l.allowDuplicatedCategory,allowDecimals:l.allowDecimals,tickCount:l.tickCount,includeHidden:(n=l.includeHidden)!==null&&n!==void 0?n:!1,reversed:l.reversed,ticks:l.ticks,height:l.height,orientation:l.orientation,mirror:l.mirror,hide:l.hide,unit:l.unit,name:l.name,angle:(r=l.angle)!==null&&r!==void 0?r:0,minTickGap:(i=l.minTickGap)!==null&&i!==void 0?i:5,tick:(o=l.tick)!==null&&o!==void 0?o:!0,tickFormatter:l.tickFormatter}),_.createElement(Xve,l))},eye=(e,t)=>{var{domain:n}=e,r=Ay(e,Yve),{domain:i}=t,o=Ay(t,Wve);return Sf(r,o)?Array.isArray(n)&&n.length===2&&Array.isArray(i)&&i.length===2?n[0]===i[0]&&n[1]===i[1]:Sf({domain:n},{domain:i}):!1},u4=_.memo(Jve,eye);u4.displayName="XAxis";var tye=["dangerouslySetInnerHTML","ticks"],nye=["id"],rye=["domain"],iye=["domain"];function Xw(){return Xw=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},Xw.apply(null,arguments)}function Oy(e,t){if(e==null)return{};var n,r,i=aye(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function aye(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 oye(e){var t=sn();return _.useLayoutEffect(()=>(t(Bme(e)),()=>{t(Ume(e))}),[e,t]),null}var sye=e=>{var{yAxisId:t,className:n,width:r,label:i}=e,o=_.useRef(null),l=_.useRef(null),c=Ve(TC),f=wr(),h=sn(),m="yAxis",y=Ve(B=>ml(B,m,t,f)),x=Ve(B=>g7(B,t)),b=Ve(B=>Wue(B,t)),w=Ve(B=>b7(B,m,t,f)),C=Ve(B=>ZI(B,t));if(_.useLayoutEffect(()=>{if(!(r!=="auto"||!x||H3(i)||_.isValidElement(i)||C==null)){var B=o.current;if(B){var W=B.getCalculatedWidth();Math.round(x.width)!==Math.round(W)&&h($me({id:t,width:W}))}}},[w,x,h,i,t,r,C]),x==null||b==null||C==null)return null;var{dangerouslySetInnerHTML:O,ticks:T}=e,P=Oy(e,tye),{id:N}=C,F=Oy(C,nye);return _.createElement(o4,Xw({},P,F,{ref:o,labelRef:l,scale:y,x:b.x,y:b.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:x.width,height:x.height,className:Oe("recharts-".concat(m," ").concat(m),n),viewBox:c,ticks:w,axisType:m}))},lye={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},uye=e=>{var t,n,r,i,o,l=Qn(e,lye);return _.createElement(_.Fragment,null,_.createElement(oye,{interval:(t=l.interval)!==null&&t!==void 0?t:"preserveEnd",id:l.yAxisId,scale:l.scale,type:l.type,domain:l.domain,allowDataOverflow:l.allowDataOverflow,dataKey:l.dataKey,allowDuplicatedCategory:l.allowDuplicatedCategory,allowDecimals:l.allowDecimals,tickCount:l.tickCount,padding:l.padding,includeHidden:(n=l.includeHidden)!==null&&n!==void 0?n:!1,reversed:l.reversed,ticks:l.ticks,width:l.width,orientation:l.orientation,mirror:l.mirror,hide:l.hide,unit:l.unit,name:l.name,angle:(r=l.angle)!==null&&r!==void 0?r:0,minTickGap:(i=l.minTickGap)!==null&&i!==void 0?i:5,tick:(o=l.tick)!==null&&o!==void 0?o:!0,tickFormatter:l.tickFormatter}),_.createElement(sye,l))},cye=(e,t)=>{var{domain:n}=e,r=Oy(e,rye),{domain:i}=t,o=Oy(t,iye);return Sf(r,o)?Array.isArray(n)&&n.length===2&&Array.isArray(i)&&i.length===2?n[0]===i[0]&&n[1]===i[1]:Sf({domain:n},{domain:i}):!1},c4=_.memo(uye,cye);c4.displayName="YAxis";var fye=(e,t)=>t,f4=Se([fye,At,YI,tr,k7,os,afe,Jn],dfe),d4=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)}},H9=on("mouseClick"),q9=mm();q9.startListening({actionCreator:H9,effect:(e,t)=>{var n=e.payload,r=f4(t.getState(),d4(n));r?.activeIndex!=null&&t.dispatch(sce({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var Qw=on("mouseMove"),G9=mm();G9.startListening({actionCreator:Qw,effect:(e,t)=>{var n=e.payload,r=t.getState(),i=L3(r,r.tooltip.settings.shared),o=f4(r,d4(n));i==="axis"&&(o?.activeIndex!=null?t.dispatch(O7({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate})):t.dispatch(A7()))}});var YN={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0},Y9=Et({name:"rootProps",initialState:YN,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:YN.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,e.baseValue=t.payload.baseValue}}}),dye=Y9.reducer,{updateOptions:hye}=Y9.actions,W9=Et({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:mye}=W9.actions,pye=W9.reducer,K9=on("keyDown"),Z9=on("focus"),h4=mm();h4.startListening({actionCreator:K9,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip,o=e.payload;if(!(o!=="ArrowRight"&&o!=="ArrowLeft"&&o!=="Enter")){var l=Number(R3(i,Hf(n))),c=os(n);if(o==="Enter"){var f=gy(n,"axis","hover",String(i.index));t.dispatch($w({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:f}));return}var h=Que(n),m=h==="left-to-right"?1:-1,y=o==="ArrowRight"?1:-1,x=l+y*m;if(!(c==null||x>=c.length||x<0)){var b=gy(n,"axis","hover",String(x));t.dispatch($w({active:!0,activeIndex:x.toString(),activeDataKey:void 0,activeCoordinate:b}))}}}}});h4.startListening({actionCreator:Z9,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 o="0",l=gy(n,"axis","hover",String(o));t.dispatch($w({activeDataKey:void 0,active:!0,activeIndex:o,activeCoordinate:l}))}}}});var Gi=on("externalEvent"),X9=mm();X9.startListening({actionCreator:Gi,effect:(e,t)=>{if(e.payload.handler!=null){var n=t.getState(),r={activeCoordinate:Vce(n),activeDataKey:U7(n),activeIndex:vl(n),activeLabel:B7(n),activeTooltipIndex:vl(n),isTooltipActive:Hce(n)};e.payload.handler(r,e.payload.reactEvent)}}});var gye=Se([Vf],e=>e.tooltipItemPayloads),vye=Se([gye,Nm,(e,t,n)=>t,(e,t,n)=>n],(e,t,n,r)=>{var i=e.find(c=>c.settings.dataKey===r);if(i!=null){var{positions:o}=i;if(o!=null){var l=t(o,n);return l}}}),Q9=on("touchMove"),J9=mm();J9.startListening({actionCreator:Q9,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){var r=t.getState(),i=L3(r,r.tooltip.settings.shared);if(i==="axis"){var o=f4(r,d4({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY,currentTarget:n.currentTarget}));o?.activeIndex!=null&&t.dispatch(O7({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if(i==="item"){var l,c=n.touches[0];if(document.elementFromPoint==null)return;var f=document.elementFromPoint(c.clientX,c.clientY);if(!f||!f.getAttribute)return;var h=f.getAttribute(v8),m=(l=f.getAttribute(y8))!==null&&l!==void 0?l:void 0,y=vye(t.getState(),h,m);t.dispatch(E7({activeDataKey:m,activeIndex:h,activeCoordinate:y}))}}}});var yye=n0({brush:cge,cartesianAxis:Fme,chartData:Vfe,errorBars:lpe,graphicalItems:Qhe,layout:Rre,legend:$ie,options:zfe,polarAxis:hhe,polarOptions:pye,referenceElements:xge,rootProps:dye,tooltip:lce,zIndex:Afe}),bye=function(t){return QS({reducer:yye,preloadedState:t,middleware:n=>n({serializableCheck:!1}).concat([q9.middleware,G9.middleware,h4.middleware,X9.middleware,J9.middleware]),enhancers:n=>{var r=n;return typeof n=="function"&&(r=n()),r.concat(xD({type:"raf"}))},devTools:Sl.devToolsEnabled})};function ez(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,i=wr(),o=_.useRef(null);if(i)return n;o.current==null&&(o.current=bye(t));var l=OC;return _.createElement(sS,{context:l,store:o.current},n)}function tz(e){var{layout:t,margin:n}=e,r=sn(),i=wr();return _.useEffect(()=>{i||(r(Pre(t)),r(Mre(n)))},[r,i,t,n]),null}function nz(e){var t=sn();return _.useEffect(()=>{t(hye(e))},[t,e]),null}function WN(e){var{zIndex:t,isPanorama:n}=e,r=n?"recharts-zindex-panorama-":"recharts-zindex-",i=x9("".concat(r).concat(t)),o=sn();return _.useLayoutEffect(()=>(o(Cfe({zIndex:t,elementId:i,isPanorama:n})),()=>{o(Efe({zIndex:t,isPanorama:n}))}),[o,t,i,n]),_.createElement("g",{id:i})}function KN(e){var{children:t,isPanorama:n}=e,r=Ve(mfe);if(!r||r.length===0)return t;var i=r.filter(l=>l<0),o=r.filter(l=>l>0);return _.createElement(_.Fragment,null,i.map(l=>_.createElement(WN,{key:l,zIndex:l,isPanorama:n})),t,o.map(l=>_.createElement(WN,{key:l,zIndex:l,isPanorama:n})))}var xye=["children"];function _ye(e,t){if(e==null)return{};var n,r,i=wye(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function wye(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 Ty(){return Ty=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},Ty.apply(null,arguments)}var Sye={width:"100%",height:"100%",display:"block"},Cye=_.forwardRef((e,t)=>{var n=C8(),r=E8(),i=D8();if(!Ka(n)||!Ka(r))return null;var{children:o,otherAttributes:l,title:c,desc:f}=e,h,m;return l!=null&&(typeof l.tabIndex=="number"?h=l.tabIndex:h=i?0:void 0,typeof l.role=="string"?m=l.role:m=i?"application":void 0),_.createElement(Pk,Ty({},l,{title:c,desc:f,role:m,tabIndex:h,width:n,height:r,style:Sye,ref:t}),o)}),Eye=e=>{var{children:t}=e,n=Ve(C0);if(!n)return null;var{width:r,height:i,y:o,x:l}=n;return _.createElement(Pk,{width:r,height:i,x:l,y:o},t)},ZN=_.forwardRef((e,t)=>{var{children:n}=e,r=_ye(e,xye),i=wr();return i?_.createElement(Eye,null,_.createElement(KN,{isPanorama:!0},n)):_.createElement(Cye,Ty({ref:t},r),_.createElement(KN,{isPanorama:!1},n))});function Aye(){var e=sn(),[t,n]=_.useState(null),r=Ve(Qre);return _.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),o=i.width/t.offsetWidth;Rn(o)&&o!==r&&e(Lre(o))}},[t,e,r]),n}function XN(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 Oye(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XN(Object(n),!0).forEach(function(r){Tye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tye(e,t,n){return(t=jye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jye(e){var t=Mye(e,"string");return typeof t=="symbol"?t:t+""}function Mye(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 Hu(){return Hu=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},Hu.apply(null,arguments)}var Pye=()=>(Qfe(),null);function jy(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var Nye=_.forwardRef((e,t)=>{var n,r,i=_.useRef(null),[o,l]=_.useState({containerWidth:jy((n=e.style)===null||n===void 0?void 0:n.width),containerHeight:jy((r=e.style)===null||r===void 0?void 0:r.height)}),c=_.useCallback((h,m)=>{l(y=>{var x=Math.round(h),b=Math.round(m);return y.containerWidth===x&&y.containerHeight===b?y:{containerWidth:x,containerHeight:b}})},[]),f=_.useCallback(h=>{if(typeof t=="function"&&t(h),h!=null&&typeof ResizeObserver<"u"){var{width:m,height:y}=h.getBoundingClientRect();c(m,y);var x=w=>{var{width:C,height:O}=w[0].contentRect;c(C,O)},b=new ResizeObserver(x);b.observe(h),i.current=b}},[t,c]);return _.useEffect(()=>()=>{var h=i.current;h?.disconnect()},[c]),_.createElement(_.Fragment,null,_.createElement(A0,{width:o.containerWidth,height:o.containerHeight}),_.createElement("div",Hu({ref:f},e)))}),Lye=_.forwardRef((e,t)=>{var{width:n,height:r}=e,[i,o]=_.useState({containerWidth:jy(n),containerHeight:jy(r)}),l=_.useCallback((f,h)=>{o(m=>{var y=Math.round(f),x=Math.round(h);return m.containerWidth===y&&m.containerHeight===x?m:{containerWidth:y,containerHeight:x}})},[]),c=_.useCallback(f=>{if(typeof t=="function"&&t(f),f!=null){var{width:h,height:m}=f.getBoundingClientRect();l(h,m)}},[t,l]);return _.createElement(_.Fragment,null,_.createElement(A0,{width:i.containerWidth,height:i.containerHeight}),_.createElement("div",Hu({ref:c},e)))}),Rye=_.forwardRef((e,t)=>{var{width:n,height:r}=e;return _.createElement(_.Fragment,null,_.createElement(A0,{width:n,height:r}),_.createElement("div",Hu({ref:t},e)))}),Dye=_.forwardRef((e,t)=>{var{width:n,height:r}=e;return Ho(n)||Ho(r)?_.createElement(Lye,Hu({},e,{ref:t})):_.createElement(Rye,Hu({},e,{ref:t}))});function kye(e){return e===!0?Nye:Dye}var Iye=_.forwardRef((e,t)=>{var{children:n,className:r,height:i,onClick:o,onContextMenu:l,onDoubleClick:c,onMouseDown:f,onMouseEnter:h,onMouseLeave:m,onMouseMove:y,onMouseUp:x,onTouchEnd:b,onTouchMove:w,onTouchStart:C,style:O,width:T,responsive:P,dispatchTouchEvents:N=!0}=e,F=_.useRef(null),B=sn(),[W,Q]=_.useState(null),[re,ce]=_.useState(null),ae=Aye(),J=jC(),oe=J?.width>0?J.width:T,ve=J?.height>0?J.height:i,ie=_.useCallback(R=>{ae(R),typeof t=="function"&&t(R),Q(R),ce(R),R!=null&&(F.current=R)},[ae,t,Q,ce]),ue=_.useCallback(R=>{B(H9(R)),B(Gi({handler:o,reactEvent:R}))},[B,o]),Y=_.useCallback(R=>{B(Qw(R)),B(Gi({handler:h,reactEvent:R}))},[B,h]),I=_.useCallback(R=>{B(A7()),B(Gi({handler:m,reactEvent:R}))},[B,m]),z=_.useCallback(R=>{B(Qw(R)),B(Gi({handler:y,reactEvent:R}))},[B,y]),H=_.useCallback(()=>{B(Z9())},[B]),k=_.useCallback(R=>{B(K9(R.key))},[B]),M=_.useCallback(R=>{B(Gi({handler:l,reactEvent:R}))},[B,l]),q=_.useCallback(R=>{B(Gi({handler:c,reactEvent:R}))},[B,c]),ee=_.useCallback(R=>{B(Gi({handler:f,reactEvent:R}))},[B,f]),se=_.useCallback(R=>{B(Gi({handler:x,reactEvent:R}))},[B,x]),me=_.useCallback(R=>{B(Gi({handler:C,reactEvent:R}))},[B,C]),de=_.useCallback(R=>{N&&B(Q9(R)),B(Gi({handler:w,reactEvent:R}))},[B,N,w]),be=_.useCallback(R=>{B(Gi({handler:b,reactEvent:R}))},[B,b]),D=kye(P);return _.createElement(W7.Provider,{value:W},_.createElement(Hte.Provider,{value:re},_.createElement(D,{width:oe??O?.width,height:ve??O?.height,className:Oe("recharts-wrapper",r),style:Oye({position:"relative",cursor:"default",width:oe,height:ve},O),onClick:ue,onContextMenu:M,onDoubleClick:q,onFocus:H,onKeyDown:k,onMouseDown:ee,onMouseEnter:Y,onMouseLeave:I,onMouseMove:z,onMouseUp:se,onTouchEnd:be,onTouchMove:de,onTouchStart:me,ref:ie},_.createElement(Pye,null),n)))}),zye=["width","height","responsive","children","className","style","compact","title","desc"];function Bye(e,t){if(e==null)return{};var n,r,i=Uye(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Uye(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 rz=_.forwardRef((e,t)=>{var{width:n,height:r,responsive:i,children:o,className:l,style:c,compact:f,title:h,desc:m}=e,y=Bye(e,zye),x=Oi(y);return f?_.createElement(_.Fragment,null,_.createElement(A0,{width:n,height:r}),_.createElement(ZN,{otherAttributes:x,title:h,desc:m},o)):_.createElement(Iye,{className:l,style:c,width:n,height:r,responsive:i??!1,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},_.createElement(ZN,{otherAttributes:x,title:h,desc:m,ref:t},_.createElement(_ge,null,o)))});function Jw(){return Jw=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},Jw.apply(null,arguments)}var $ye={top:5,right:5,bottom:5,left:5},Fye={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:$ye,reverseStackOrder:!1,syncMethod:"index",responsive:!1},iz=_.forwardRef(function(t,n){var r,i=Qn(t.categoricalChartProps,Fye),{chartName:o,defaultTooltipEventType:l,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,categoricalChartProps:h}=t,m={chartName:o,defaultTooltipEventType:l,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,eventEmitter:void 0};return _.createElement(ez,{preloadedState:{options:m},reduxStoreName:(r=h.id)!==null&&r!==void 0?r:o},_.createElement(j9,{chartData:h.data}),_.createElement(tz,{layout:i.layout,margin:i.margin}),_.createElement(nz,{baseValue:i.baseValue,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}),_.createElement(rz,Jw({},i,{ref:n})))}),Vye=["axis"],Hye=_.forwardRef((e,t)=>_.createElement(iz,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Vye,tooltipPayloadSearcher:F3,categoricalChartProps:e,ref:t}));function qye(e){var t=sn();return _.useEffect(()=>{t(mye(e))},[t,e]),null}var Gye=["layout"];function eS(){return eS=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},eS.apply(null,arguments)}function Yye(e,t){if(e==null)return{};var n,r,i=Wye(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Wye(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 Kye={top:5,right:5,bottom:5,left:5},Zye={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:Kye,reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1},Xye=_.forwardRef(function(t,n){var r,i=Qn(t.categoricalChartProps,Zye),{layout:o}=i,l=Yye(i,Gye),{chartName:c,defaultTooltipEventType:f,validateTooltipEventTypes:h,tooltipPayloadSearcher:m}=t,y={chartName:c,defaultTooltipEventType:f,validateTooltipEventTypes:h,tooltipPayloadSearcher:m,eventEmitter:void 0};return _.createElement(ez,{preloadedState:{options:y},reduxStoreName:(r=i.id)!==null&&r!==void 0?r:c},_.createElement(j9,{chartData:i.data}),_.createElement(tz,{layout:o,margin:i.margin}),_.createElement(nz,{baseValue:void 0,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}),_.createElement(qye,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),_.createElement(rz,eS({},l,{ref:n})))}),Qye=["item"],Jye={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},e0e=_.forwardRef((e,t)=>{var n=Qn(e,Jye);return _.createElement(Xye,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:Qye,tooltipPayloadSearcher:F3,categoricalChartProps:n,ref:t})}),t0e=["axis"],n0e=_.forwardRef((e,t)=>_.createElement(iz,{chartName:"ComposedChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:t0e,tooltipPayloadSearcher:F3,categoricalChartProps:e,ref:t}));function az(e,t){const n=_.useRef(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 r0e=1;function i0e(e){return Object.freeze({__version:r0e,map:e})}function a0e(e,t){return Object.freeze({...e,...t})}const m4=_.createContext(null);function oz(){const e=_.use(m4);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}function o0e(e){function t(n,r){const{instance:i,context:o}=e(n).current;_.useImperativeHandle(r,()=>i);const{children:l}=n;return l==null?null:cf.createElement(m4,{value:o},l)}return _.forwardRef(t)}function s0e(e){function t(n,r){const[i,o]=_.useState(!1),{instance:l}=e(n,o).current;_.useImperativeHandle(r,()=>l),_.useEffect(function(){i&&l.update()},[l,i,n.children]);const c=l._contentNode;return c?Pf.createPortal(n.children,c):null}return _.forwardRef(t)}function l0e(e){function t(n,r){const{instance:i}=e(n).current;return _.useImperativeHandle(r,()=>i),null}return _.forwardRef(t)}function sz(e,t){const n=_.useRef(void 0);_.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 p4(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function u0e(e,t){return function(r,i){const o=oz(),l=e(p4(r,o),o);return az(o.map,r.attribution),sz(l.current,r.eventHandlers),t(l.current,o,r,i),l}}var yh={exports:{}};var c0e=yh.exports,QN;function f0e(){return QN||(QN=1,(function(e,t){(function(n,r){r(t)})(c0e,(function(n){var r="1.9.4";function i(u){var p,S,j,U;for(S=1,j=arguments.length;S<j;S++){U=arguments[S];for(p in U)u[p]=U[p]}return u}var o=Object.create||(function(){function u(){}return function(p){return u.prototype=p,new u}})();function l(u,p){var S=Array.prototype.slice;if(u.bind)return u.bind.apply(u,S.call(arguments,1));var j=S.call(arguments,2);return function(){return u.apply(p,j.length?j.concat(S.call(arguments)):arguments)}}var c=0;function f(u){return"_leaflet_id"in u||(u._leaflet_id=++c),u._leaflet_id}function h(u,p,S){var j,U,K,le;return le=function(){j=!1,U&&(K.apply(S,U),U=!1)},K=function(){j?U=arguments:(u.apply(S,arguments),setTimeout(le,p),j=!0)},K}function m(u,p,S){var j=p[1],U=p[0],K=j-U;return u===j&&S?u:((u-U)%K+K)%K+U}function y(){return!1}function x(u,p){if(p===!1)return u;var S=Math.pow(10,p===void 0?6:p);return Math.round(u*S)/S}function b(u){return u.trim?u.trim():u.replace(/^\s+|\s+$/g,"")}function w(u){return b(u).split(/\s+/)}function C(u,p){Object.prototype.hasOwnProperty.call(u,"options")||(u.options=u.options?o(u.options):{});for(var S in p)u.options[S]=p[S];return u.options}function O(u,p,S){var j=[];for(var U in u)j.push(encodeURIComponent(S?U.toUpperCase():U)+"="+encodeURIComponent(u[U]));return(!p||p.indexOf("?")===-1?"?":"&")+j.join("&")}var T=/\{ *([\w_ -]+) *\}/g;function P(u,p){return u.replace(T,function(S,j){var U=p[j];if(U===void 0)throw new Error("No value provided for variable "+S);return typeof U=="function"&&(U=U(p)),U})}var N=Array.isArray||function(u){return Object.prototype.toString.call(u)==="[object Array]"};function F(u,p){for(var S=0;S<u.length;S++)if(u[S]===p)return S;return-1}var B="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function W(u){return window["webkit"+u]||window["moz"+u]||window["ms"+u]}var Q=0;function re(u){var p=+new Date,S=Math.max(0,16-(p-Q));return Q=p+S,window.setTimeout(u,S)}var ce=window.requestAnimationFrame||W("RequestAnimationFrame")||re,ae=window.cancelAnimationFrame||W("CancelAnimationFrame")||W("CancelRequestAnimationFrame")||function(u){window.clearTimeout(u)};function J(u,p,S){if(S&&ce===re)u.call(p);else return ce.call(window,l(u,p))}function oe(u){u&&ae.call(window,u)}var ve={__proto__:null,extend:i,create:o,bind:l,get lastId(){return c},stamp:f,throttle:h,wrapNum:m,falseFn:y,formatNum:x,trim:b,splitWords:w,setOptions:C,getParamString:O,template:P,isArray:N,indexOf:F,emptyImageUrl:B,requestFn:ce,cancelFn:ae,requestAnimFrame:J,cancelAnimFrame:oe};function ie(){}ie.extend=function(u){var p=function(){C(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},S=p.__super__=this.prototype,j=o(S);j.constructor=p,p.prototype=j;for(var U in this)Object.prototype.hasOwnProperty.call(this,U)&&U!=="prototype"&&U!=="__super__"&&(p[U]=this[U]);return u.statics&&i(p,u.statics),u.includes&&(ue(u.includes),i.apply(null,[j].concat(u.includes))),i(j,u),delete j.statics,delete j.includes,j.options&&(j.options=S.options?o(S.options):{},i(j.options,u.options)),j._initHooks=[],j.callInitHooks=function(){if(!this._initHooksCalled){S.callInitHooks&&S.callInitHooks.call(this),this._initHooksCalled=!0;for(var K=0,le=j._initHooks.length;K<le;K++)j._initHooks[K].call(this)}},p},ie.include=function(u){var p=this.prototype.options;return i(this.prototype,u),u.options&&(this.prototype.options=p,this.mergeOptions(u.options)),this},ie.mergeOptions=function(u){return i(this.prototype.options,u),this},ie.addInitHook=function(u){var p=Array.prototype.slice.call(arguments,1),S=typeof u=="function"?u:function(){this[u].apply(this,p)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(S),this};function ue(u){if(!(typeof L>"u"||!L||!L.Mixin)){u=N(u)?u:[u];for(var p=0;p<u.length;p++)u[p]===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 Y={on:function(u,p,S){if(typeof u=="object")for(var j in u)this._on(j,u[j],p);else{u=w(u);for(var U=0,K=u.length;U<K;U++)this._on(u[U],p,S)}return this},off:function(u,p,S){if(!arguments.length)delete this._events;else if(typeof u=="object")for(var j in u)this._off(j,u[j],p);else{u=w(u);for(var U=arguments.length===1,K=0,le=u.length;K<le;K++)U?this._off(u[K]):this._off(u[K],p,S)}return this},_on:function(u,p,S,j){if(typeof p!="function"){console.warn("wrong listener type: "+typeof p);return}if(this._listens(u,p,S)===!1){S===this&&(S=void 0);var U={fn:p,ctx:S};j&&(U.once=!0),this._events=this._events||{},this._events[u]=this._events[u]||[],this._events[u].push(U)}},_off:function(u,p,S){var j,U,K;if(this._events&&(j=this._events[u],!!j)){if(arguments.length===1){if(this._firingCount)for(U=0,K=j.length;U<K;U++)j[U].fn=y;delete this._events[u];return}if(typeof p!="function"){console.warn("wrong listener type: "+typeof p);return}var le=this._listens(u,p,S);if(le!==!1){var ye=j[le];this._firingCount&&(ye.fn=y,this._events[u]=j=j.slice()),j.splice(le,1)}}},fire:function(u,p,S){if(!this.listens(u,S))return this;var j=i({},p,{type:u,target:this,sourceTarget:p&&p.sourceTarget||this});if(this._events){var U=this._events[u];if(U){this._firingCount=this._firingCount+1||1;for(var K=0,le=U.length;K<le;K++){var ye=U[K],Ce=ye.fn;ye.once&&this.off(u,Ce,ye.ctx),Ce.call(ye.ctx||this,j)}this._firingCount--}}return S&&this._propagateEvent(j),this},listens:function(u,p,S,j){typeof u!="string"&&console.warn('"string" type argument expected');var U=p;typeof p!="function"&&(j=!!p,U=void 0,S=void 0);var K=this._events&&this._events[u];if(K&&K.length&&this._listens(u,U,S)!==!1)return!0;if(j){for(var le in this._eventParents)if(this._eventParents[le].listens(u,p,S,j))return!0}return!1},_listens:function(u,p,S){if(!this._events)return!1;var j=this._events[u]||[];if(!p)return!!j.length;S===this&&(S=void 0);for(var U=0,K=j.length;U<K;U++)if(j[U].fn===p&&j[U].ctx===S)return U;return!1},once:function(u,p,S){if(typeof u=="object")for(var j in u)this._on(j,u[j],p,!0);else{u=w(u);for(var U=0,K=u.length;U<K;U++)this._on(u[U],p,S,!0)}return this},addEventParent:function(u){return this._eventParents=this._eventParents||{},this._eventParents[f(u)]=u,this},removeEventParent:function(u){return this._eventParents&&delete this._eventParents[f(u)],this},_propagateEvent:function(u){for(var p in this._eventParents)this._eventParents[p].fire(u.type,i({layer:u.target,propagatedFrom:u.target},u),!0)}};Y.addEventListener=Y.on,Y.removeEventListener=Y.clearAllEventListeners=Y.off,Y.addOneTimeEventListener=Y.once,Y.fireEvent=Y.fire,Y.hasEventListeners=Y.listens;var I=ie.extend(Y);function z(u,p,S){this.x=S?Math.round(u):u,this.y=S?Math.round(p):p}var H=Math.trunc||function(u){return u>0?Math.floor(u):Math.ceil(u)};z.prototype={clone:function(){return new z(this.x,this.y)},add:function(u){return this.clone()._add(k(u))},_add:function(u){return this.x+=u.x,this.y+=u.y,this},subtract:function(u){return this.clone()._subtract(k(u))},_subtract:function(u){return this.x-=u.x,this.y-=u.y,this},divideBy:function(u){return this.clone()._divideBy(u)},_divideBy:function(u){return this.x/=u,this.y/=u,this},multiplyBy:function(u){return this.clone()._multiplyBy(u)},_multiplyBy:function(u){return this.x*=u,this.y*=u,this},scaleBy:function(u){return new z(this.x*u.x,this.y*u.y)},unscaleBy:function(u){return new z(this.x/u.x,this.y/u.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=H(this.x),this.y=H(this.y),this},distanceTo:function(u){u=k(u);var p=u.x-this.x,S=u.y-this.y;return Math.sqrt(p*p+S*S)},equals:function(u){return u=k(u),u.x===this.x&&u.y===this.y},contains:function(u){return u=k(u),Math.abs(u.x)<=Math.abs(this.x)&&Math.abs(u.y)<=Math.abs(this.y)},toString:function(){return"Point("+x(this.x)+", "+x(this.y)+")"}};function k(u,p,S){return u instanceof z?u:N(u)?new z(u[0],u[1]):u==null?u:typeof u=="object"&&"x"in u&&"y"in u?new z(u.x,u.y):new z(u,p,S)}function M(u,p){if(u)for(var S=p?[u,p]:u,j=0,U=S.length;j<U;j++)this.extend(S[j])}M.prototype={extend:function(u){var p,S;if(!u)return this;if(u instanceof z||typeof u[0]=="number"||"x"in u)p=S=k(u);else if(u=q(u),p=u.min,S=u.max,!p||!S)return this;return!this.min&&!this.max?(this.min=p.clone(),this.max=S.clone()):(this.min.x=Math.min(p.x,this.min.x),this.max.x=Math.max(S.x,this.max.x),this.min.y=Math.min(p.y,this.min.y),this.max.y=Math.max(S.y,this.max.y)),this},getCenter:function(u){return k((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,u)},getBottomLeft:function(){return k(this.min.x,this.max.y)},getTopRight:function(){return k(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(u){var p,S;return typeof u[0]=="number"||u instanceof z?u=k(u):u=q(u),u instanceof M?(p=u.min,S=u.max):p=S=u,p.x>=this.min.x&&S.x<=this.max.x&&p.y>=this.min.y&&S.y<=this.max.y},intersects:function(u){u=q(u);var p=this.min,S=this.max,j=u.min,U=u.max,K=U.x>=p.x&&j.x<=S.x,le=U.y>=p.y&&j.y<=S.y;return K&&le},overlaps:function(u){u=q(u);var p=this.min,S=this.max,j=u.min,U=u.max,K=U.x>p.x&&j.x<S.x,le=U.y>p.y&&j.y<S.y;return K&&le},isValid:function(){return!!(this.min&&this.max)},pad:function(u){var p=this.min,S=this.max,j=Math.abs(p.x-S.x)*u,U=Math.abs(p.y-S.y)*u;return q(k(p.x-j,p.y-U),k(S.x+j,S.y+U))},equals:function(u){return u?(u=q(u),this.min.equals(u.getTopLeft())&&this.max.equals(u.getBottomRight())):!1}};function q(u,p){return!u||u instanceof M?u:new M(u,p)}function ee(u,p){if(u)for(var S=p?[u,p]:u,j=0,U=S.length;j<U;j++)this.extend(S[j])}ee.prototype={extend:function(u){var p=this._southWest,S=this._northEast,j,U;if(u instanceof me)j=u,U=u;else if(u instanceof ee){if(j=u._southWest,U=u._northEast,!j||!U)return this}else return u?this.extend(de(u)||se(u)):this;return!p&&!S?(this._southWest=new me(j.lat,j.lng),this._northEast=new me(U.lat,U.lng)):(p.lat=Math.min(j.lat,p.lat),p.lng=Math.min(j.lng,p.lng),S.lat=Math.max(U.lat,S.lat),S.lng=Math.max(U.lng,S.lng)),this},pad:function(u){var p=this._southWest,S=this._northEast,j=Math.abs(p.lat-S.lat)*u,U=Math.abs(p.lng-S.lng)*u;return new ee(new me(p.lat-j,p.lng-U),new me(S.lat+j,S.lng+U))},getCenter:function(){return new me((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 me(this.getNorth(),this.getWest())},getSouthEast:function(){return new me(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(u){typeof u[0]=="number"||u instanceof me||"lat"in u?u=de(u):u=se(u);var p=this._southWest,S=this._northEast,j,U;return u instanceof ee?(j=u.getSouthWest(),U=u.getNorthEast()):j=U=u,j.lat>=p.lat&&U.lat<=S.lat&&j.lng>=p.lng&&U.lng<=S.lng},intersects:function(u){u=se(u);var p=this._southWest,S=this._northEast,j=u.getSouthWest(),U=u.getNorthEast(),K=U.lat>=p.lat&&j.lat<=S.lat,le=U.lng>=p.lng&&j.lng<=S.lng;return K&&le},overlaps:function(u){u=se(u);var p=this._southWest,S=this._northEast,j=u.getSouthWest(),U=u.getNorthEast(),K=U.lat>p.lat&&j.lat<S.lat,le=U.lng>p.lng&&j.lng<S.lng;return K&&le},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(u,p){return u?(u=se(u),this._southWest.equals(u.getSouthWest(),p)&&this._northEast.equals(u.getNorthEast(),p)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function se(u,p){return u instanceof ee?u:new ee(u,p)}function me(u,p,S){if(isNaN(u)||isNaN(p))throw new Error("Invalid LatLng object: ("+u+", "+p+")");this.lat=+u,this.lng=+p,S!==void 0&&(this.alt=+S)}me.prototype={equals:function(u,p){if(!u)return!1;u=de(u);var S=Math.max(Math.abs(this.lat-u.lat),Math.abs(this.lng-u.lng));return S<=(p===void 0?1e-9:p)},toString:function(u){return"LatLng("+x(this.lat,u)+", "+x(this.lng,u)+")"},distanceTo:function(u){return D.distance(this,de(u))},wrap:function(){return D.wrapLatLng(this)},toBounds:function(u){var p=180*u/40075017,S=p/Math.cos(Math.PI/180*this.lat);return se([this.lat-p,this.lng-S],[this.lat+p,this.lng+S])},clone:function(){return new me(this.lat,this.lng,this.alt)}};function de(u,p,S){return u instanceof me?u:N(u)&&typeof u[0]!="object"?u.length===3?new me(u[0],u[1],u[2]):u.length===2?new me(u[0],u[1]):null:u==null?u:typeof u=="object"&&"lat"in u?new me(u.lat,"lng"in u?u.lng:u.lon,u.alt):p===void 0?null:new me(u,p,S)}var be={latLngToPoint:function(u,p){var S=this.projection.project(u),j=this.scale(p);return this.transformation._transform(S,j)},pointToLatLng:function(u,p){var S=this.scale(p),j=this.transformation.untransform(u,S);return this.projection.unproject(j)},project:function(u){return this.projection.project(u)},unproject:function(u){return this.projection.unproject(u)},scale:function(u){return 256*Math.pow(2,u)},zoom:function(u){return Math.log(u/256)/Math.LN2},getProjectedBounds:function(u){if(this.infinite)return null;var p=this.projection.bounds,S=this.scale(u),j=this.transformation.transform(p.min,S),U=this.transformation.transform(p.max,S);return new M(j,U)},infinite:!1,wrapLatLng:function(u){var p=this.wrapLng?m(u.lng,this.wrapLng,!0):u.lng,S=this.wrapLat?m(u.lat,this.wrapLat,!0):u.lat,j=u.alt;return new me(S,p,j)},wrapLatLngBounds:function(u){var p=u.getCenter(),S=this.wrapLatLng(p),j=p.lat-S.lat,U=p.lng-S.lng;if(j===0&&U===0)return u;var K=u.getSouthWest(),le=u.getNorthEast(),ye=new me(K.lat-j,K.lng-U),Ce=new me(le.lat-j,le.lng-U);return new ee(ye,Ce)}},D=i({},be,{wrapLng:[-180,180],R:6371e3,distance:function(u,p){var S=Math.PI/180,j=u.lat*S,U=p.lat*S,K=Math.sin((p.lat-u.lat)*S/2),le=Math.sin((p.lng-u.lng)*S/2),ye=K*K+Math.cos(j)*Math.cos(U)*le*le,Ce=2*Math.atan2(Math.sqrt(ye),Math.sqrt(1-ye));return this.R*Ce}}),R=6378137,G={R,MAX_LATITUDE:85.0511287798,project:function(u){var p=Math.PI/180,S=this.MAX_LATITUDE,j=Math.max(Math.min(S,u.lat),-S),U=Math.sin(j*p);return new z(this.R*u.lng*p,this.R*Math.log((1+U)/(1-U))/2)},unproject:function(u){var p=180/Math.PI;return new me((2*Math.atan(Math.exp(u.y/this.R))-Math.PI/2)*p,u.x*p/this.R)},bounds:(function(){var u=R*Math.PI;return new M([-u,-u],[u,u])})()};function ne(u,p,S,j){if(N(u)){this._a=u[0],this._b=u[1],this._c=u[2],this._d=u[3];return}this._a=u,this._b=p,this._c=S,this._d=j}ne.prototype={transform:function(u,p){return this._transform(u.clone(),p)},_transform:function(u,p){return p=p||1,u.x=p*(this._a*u.x+this._b),u.y=p*(this._c*u.y+this._d),u},untransform:function(u,p){return p=p||1,new z((u.x/p-this._b)/this._a,(u.y/p-this._d)/this._c)}};function V(u,p,S,j){return new ne(u,p,S,j)}var X=i({},D,{code:"EPSG:3857",projection:G,transformation:(function(){var u=.5/(Math.PI*G.R);return V(u,.5,-u,.5)})()}),te=i({},X,{code:"EPSG:900913"});function he(u){return document.createElementNS("http://www.w3.org/2000/svg",u)}function xe(u,p){var S="",j,U,K,le,ye,Ce;for(j=0,K=u.length;j<K;j++){for(ye=u[j],U=0,le=ye.length;U<le;U++)Ce=ye[U],S+=(U?"L":"M")+Ce.x+" "+Ce.y;S+=p?Ge.svg?"z":"x":""}return S||"M0 0"}var Le=document.documentElement.style,ke="ActiveXObject"in window,We=ke&&!document.addEventListener,Je="msLaunchUri"in navigator&&!("documentMode"in document),Ke=Vr("webkit"),at=Vr("android"),zt=Vr("android 2")||Vr("android 3"),mt=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Lt=at&&Vr("Google")&&mt<537&&!("AudioNode"in window),ht=!!window.opera,Qe=!Je&&Vr("chrome"),Rt=Vr("gecko")&&!Ke&&!ht&&!ke,vn=!Qe&&Vr("safari"),nt=Vr("phantom"),Hn="OTransition"in Le,qn=navigator.platform.indexOf("Win")===0,Jt=ke&&"transition"in Le,Cn="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!zt,dr="MozPerspective"in Le,Gt=!window.L_DISABLE_3D&&(Jt||Cn||dr)&&!Hn&&!nt,Tl=typeof orientation<"u"||Vr("mobile"),f1=Tl&&Ke,d1=Tl&&Cn,jl=!window.PointerEvent&&window.MSPointerEvent,Ml=!!(window.PointerEvent||jl),Pl="ontouchstart"in window||!!window.TouchEvent,ro=!window.L_NO_TOUCH&&(Pl||Ml),tc=Tl&&ht,Nl=Tl&&Rt,h1=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Vm=(function(){var u=!1;try{var p=Object.defineProperty({},"passive",{get:function(){u=!0}});window.addEventListener("testPassiveEventSupport",y,p),window.removeEventListener("testPassiveEventSupport",y,p)}catch{}return u})(),Wf=(function(){return!!document.createElement("canvas").getContext})(),io=!!(document.createElementNS&&he("svg").createSVGRect),m1=!!io&&(function(){var u=document.createElement("div");return u.innerHTML="<svg/>",(u.firstChild&&u.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"})(),Hm=!io&&(function(){try{var u=document.createElement("div");u.innerHTML='<v:shape adj="1"/>';var p=u.firstChild;return p.style.behavior="url(#default#VML)",p&&typeof p.adj=="object"}catch{return!1}})(),qm=navigator.platform.indexOf("Mac")===0,Gm=navigator.platform.indexOf("Linux")===0;function Vr(u){return navigator.userAgent.toLowerCase().indexOf(u)>=0}var Ge={ie:ke,ielt9:We,edge:Je,webkit:Ke,android:at,android23:zt,androidStock:Lt,opera:ht,chrome:Qe,gecko:Rt,safari:vn,phantom:nt,opera12:Hn,win:qn,ie3d:Jt,webkit3d:Cn,gecko3d:dr,any3d:Gt,mobile:Tl,mobileWebkit:f1,mobileWebkit3d:d1,msPointer:jl,pointer:Ml,touch:ro,touchNative:Pl,mobileOpera:tc,mobileGecko:Nl,retina:h1,passiveEvents:Vm,canvas:Wf,svg:io,vml:Hm,inlineSvg:m1,mac:qm,linux:Gm},Kf=Ge.msPointer?"MSPointerDown":"pointerdown",Zf=Ge.msPointer?"MSPointerMove":"pointermove",ta=Ge.msPointer?"MSPointerUp":"pointerup",Dn=Ge.msPointer?"MSPointerCancel":"pointercancel",ir={touchstart:Kf,touchmove:Zf,touchend:ta,touchcancel:Dn},ao={touchstart:us,touchmove:Oa,touchend:Oa,touchcancel:Oa},Aa={},Ym=!1;function p1(u,p,S){return p==="touchstart"&&ls(),ao[p]?(S=ao[p].bind(this,S),u.addEventListener(ir[p],S,!1),S):(console.warn("wrong event specified:",p),y)}function Wm(u,p,S){if(!ir[p]){console.warn("wrong event specified:",p);return}u.removeEventListener(ir[p],S,!1)}function Ll(u){Aa[u.pointerId]=u}function Xf(u){Aa[u.pointerId]&&(Aa[u.pointerId]=u)}function oo(u){delete Aa[u.pointerId]}function ls(){Ym||(document.addEventListener(Kf,Ll,!0),document.addEventListener(Zf,Xf,!0),document.addEventListener(ta,oo,!0),document.addEventListener(Dn,oo,!0),Ym=!0)}function Oa(u,p){if(p.pointerType!==(p.MSPOINTER_TYPE_MOUSE||"mouse")){p.touches=[];for(var S in Aa)p.touches.push(Aa[S]);p.changedTouches=[p],u(p)}}function us(u,p){p.MSPOINTER_TYPE_TOUCH&&p.pointerType===p.MSPOINTER_TYPE_TOUCH&&En(p),Oa(u,p)}function kn(u){var p={},S,j;for(j in u)S=u[j],p[j]=S&&S.bind?S.bind(u):S;return u=p,p.type="dblclick",p.detail=2,p.isTrusted=!1,p._simulated=!0,p}var Km=200;function Zm(u,p){u.addEventListener("dblclick",p);var S=0,j;function U(K){if(K.detail!==1){j=K.detail;return}if(!(K.pointerType==="mouse"||K.sourceCapabilities&&!K.sourceCapabilities.firesTouchEvents)){var le=Ul(K);if(!(le.some(function(Ce){return Ce instanceof HTMLLabelElement&&Ce.attributes.for})&&!le.some(function(Ce){return Ce instanceof HTMLInputElement||Ce instanceof HTMLSelectElement}))){var ye=Date.now();ye-S<=Km?(j++,j===2&&p(kn(K))):j=1,S=ye}}}return u.addEventListener("click",U),{dblclick:p,simDblclick:U}}function so(u,p){u.removeEventListener("dblclick",p.dblclick),u.removeEventListener("click",p.simDblclick)}var Ta=kl(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Rl=kl(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Qf=Rl==="webkitTransition"||Rl==="OTransition"?Rl+"End":"transitionend";function Jf(u){return typeof u=="string"?document.getElementById(u):u}function Dl(u,p){var S=u.style[p]||u.currentStyle&&u.currentStyle[p];if((!S||S==="auto")&&document.defaultView){var j=document.defaultView.getComputedStyle(u,null);S=j?j[p]:null}return S==="auto"?null:S}function pt(u,p,S){var j=document.createElement(u);return j.className=p||"",S&&S.appendChild(j),j}function Ft(u){var p=u.parentNode;p&&p.removeChild(u)}function Hr(u){for(;u.firstChild;)u.removeChild(u.firstChild)}function Gn(u){var p=u.parentNode;p&&p.lastChild!==u&&p.appendChild(u)}function lo(u){var p=u.parentNode;p&&p.firstChild!==u&&p.insertBefore(u,p.firstChild)}function ed(u,p){if(u.classList!==void 0)return u.classList.contains(p);var S=nc(u);return S.length>0&&new RegExp("(^|\\s)"+p+"(\\s|$)").test(S)}function ot(u,p){if(u.classList!==void 0)for(var S=w(p),j=0,U=S.length;j<U;j++)u.classList.add(S[j]);else if(!ed(u,p)){var K=nc(u);cs(u,(K?K+" ":"")+p)}}function un(u,p){u.classList!==void 0?u.classList.remove(p):cs(u,b((" "+nc(u)+" ").replace(" "+p+" "," ")))}function cs(u,p){u.className.baseVal===void 0?u.className=p:u.className.baseVal=p}function nc(u){return u.correspondingElement&&(u=u.correspondingElement),u.className.baseVal===void 0?u.className:u.className.baseVal}function en(u,p){"opacity"in u.style?u.style.opacity=p:"filter"in u.style&&td(u,p)}function td(u,p){var S=!1,j="DXImageTransform.Microsoft.Alpha";try{S=u.filters.item(j)}catch{if(p===1)return}p=Math.round(p*100),S?(S.Enabled=p!==100,S.Opacity=p):u.style.filter+=" progid:"+j+"(opacity="+p+")"}function kl(u){for(var p=document.documentElement.style,S=0;S<u.length;S++)if(u[S]in p)return u[S];return!1}function na(u,p,S){var j=p||new z(0,0);u.style[Ta]=(Ge.ie3d?"translate("+j.x+"px,"+j.y+"px)":"translate3d("+j.x+"px,"+j.y+"px,0)")+(S?" scale("+S+")":"")}function Yt(u,p){u._leaflet_pos=p,Ge.any3d?na(u,p):(u.style.left=p.x+"px",u.style.top=p.y+"px")}function ja(u){return u._leaflet_pos||new z(0,0)}var fs,Li,nd;if("onselectstart"in document)fs=function(){tt(window,"selectstart",En)},Li=function(){kt(window,"selectstart",En)};else{var ds=kl(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);fs=function(){if(ds){var u=document.documentElement.style;nd=u[ds],u[ds]="none"}},Li=function(){ds&&(document.documentElement.style[ds]=nd,nd=void 0)}}function rc(){tt(window,"dragstart",En)}function Il(){kt(window,"dragstart",En)}var ic,rd;function hs(u){for(;u.tabIndex===-1;)u=u.parentNode;u.style&&(qr(),ic=u,rd=u.style.outlineStyle,u.style.outlineStyle="none",tt(window,"keydown",qr))}function qr(){ic&&(ic.style.outlineStyle=rd,ic=void 0,rd=void 0,kt(window,"keydown",qr))}function ac(u){do u=u.parentNode;while((!u.offsetWidth||!u.offsetHeight)&&u!==document.body);return u}function zl(u){var p=u.getBoundingClientRect();return{x:p.width/u.offsetWidth||1,y:p.height/u.offsetHeight||1,boundingClientRect:p}}var ms={__proto__:null,TRANSFORM:Ta,TRANSITION:Rl,TRANSITION_END:Qf,get:Jf,getStyle:Dl,create:pt,remove:Ft,empty:Hr,toFront:Gn,toBack:lo,hasClass:ed,addClass:ot,removeClass:un,setClass:cs,getClass:nc,setOpacity:en,testProp:kl,setTransform:na,setPosition:Yt,getPosition:ja,get disableTextSelection(){return fs},get enableTextSelection(){return Li},disableImageDrag:rc,enableImageDrag:Il,preventOutline:hs,restoreOutline:qr,getSizedParentNode:ac,getScale:zl};function tt(u,p,S,j){if(p&&typeof p=="object")for(var U in p)si(u,U,p[U],S);else{p=w(p);for(var K=0,le=p.length;K<le;K++)si(u,p[K],S,j)}return this}var oi="_leaflet_events";function kt(u,p,S,j){if(arguments.length===1)id(u),delete u[oi];else if(p&&typeof p=="object")for(var U in p)Bl(u,U,p[U],S);else if(p=w(p),arguments.length===2)id(u,function(ye){return F(p,ye)!==-1});else for(var K=0,le=p.length;K<le;K++)Bl(u,p[K],S,j);return this}function id(u,p){for(var S in u[oi]){var j=S.split(/\d/)[0];(!p||p(j))&&Bl(u,j,null,null,S)}}var uo={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function si(u,p,S,j){var U=p+f(S)+(j?"_"+f(j):"");if(u[oi]&&u[oi][U])return this;var K=function(ye){return S.call(j||u,ye||window.event)},le=K;!Ge.touchNative&&Ge.pointer&&p.indexOf("touch")===0?K=p1(u,p,K):Ge.touch&&p==="dblclick"?K=Zm(u,K):"addEventListener"in u?p==="touchstart"||p==="touchmove"||p==="wheel"||p==="mousewheel"?u.addEventListener(uo[p]||p,K,Ge.passiveEvents?{passive:!1}:!1):p==="mouseenter"||p==="mouseleave"?(K=function(ye){ye=ye||window.event,ra(u,ye)&&le(ye)},u.addEventListener(uo[p],K,!1)):u.addEventListener(p,le,!1):u.attachEvent("on"+p,K),u[oi]=u[oi]||{},u[oi][U]=K}function Bl(u,p,S,j,U){U=U||p+f(S)+(j?"_"+f(j):"");var K=u[oi]&&u[oi][U];if(!K)return this;!Ge.touchNative&&Ge.pointer&&p.indexOf("touch")===0?Wm(u,p,K):Ge.touch&&p==="dblclick"?so(u,K):"removeEventListener"in u?u.removeEventListener(uo[p]||p,K,!1):u.detachEvent("on"+p,K),u[oi][U]=null}function li(u){return u.stopPropagation?u.stopPropagation():u.originalEvent?u.originalEvent._stopped=!0:u.cancelBubble=!0,this}function Ri(u){return si(u,"wheel",li),this}function co(u){return tt(u,"mousedown touchstart dblclick contextmenu",li),u._leaflet_disable_click=!0,this}function En(u){return u.preventDefault?u.preventDefault():u.returnValue=!1,this}function Ma(u){return En(u),li(u),this}function Ul(u){if(u.composedPath)return u.composedPath();for(var p=[],S=u.target;S;)p.push(S),S=S.parentNode;return p}function $l(u,p){if(!p)return new z(u.clientX,u.clientY);var S=zl(p),j=S.boundingClientRect;return new z((u.clientX-j.left)/S.x-p.clientLeft,(u.clientY-j.top)/S.y-p.clientTop)}var Xm=Ge.linux&&Ge.chrome?window.devicePixelRatio:Ge.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function hr(u){return Ge.edge?u.wheelDeltaY/2:u.deltaY&&u.deltaMode===0?-u.deltaY/Xm:u.deltaY&&u.deltaMode===1?-u.deltaY*20:u.deltaY&&u.deltaMode===2?-u.deltaY*60:u.deltaX||u.deltaZ?0:u.wheelDelta?(u.wheelDeltaY||u.wheelDelta)/2:u.detail&&Math.abs(u.detail)<32765?-u.detail*20:u.detail?u.detail/-32765*60:0}function ra(u,p){var S=p.relatedTarget;if(!S)return!0;try{for(;S&&S!==u;)S=S.parentNode}catch{return!1}return S!==u}var oc={__proto__:null,on:tt,off:kt,stopPropagation:li,disableScrollPropagation:Ri,disableClickPropagation:co,preventDefault:En,stop:Ma,getPropagationPath:Ul,getMousePosition:$l,getWheelDelta:hr,isExternalTarget:ra,addListener:tt,removeListener:kt},ps=I.extend({run:function(u,p,S,j){this.stop(),this._el=u,this._inProgress=!0,this._duration=S||.25,this._easeOutPower=1/Math.max(j||.5,.2),this._startPos=ja(u),this._offset=p.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(u){var p=+new Date-this._startTime,S=this._duration*1e3;p<S?this._runFrame(this._easeOut(p/S),u):(this._runFrame(1),this._complete())},_runFrame:function(u,p){var S=this._startPos.add(this._offset.multiplyBy(u));p&&S._round(),Yt(this._el,S),this.fire("step")},_complete:function(){oe(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(u){return 1-Math.pow(1-u,this._easeOutPower)}}),_t=I.extend({options:{crs:X,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(u,p){p=C(this,p),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(u),this._initLayout(),this._onResize=l(this._onResize,this),this._initEvents(),p.maxBounds&&this.setMaxBounds(p.maxBounds),p.zoom!==void 0&&(this._zoom=this._limitZoom(p.zoom)),p.center&&p.zoom!==void 0&&this.setView(de(p.center),p.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Rl&&Ge.any3d&&!Ge.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),tt(this._proxy,Qf,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(u,p,S){if(p=p===void 0?this._zoom:this._limitZoom(p),u=this._limitCenter(de(u),p,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 j=this._zoom!==p?this._tryAnimatedZoom&&this._tryAnimatedZoom(u,p,S.zoom):this._tryAnimatedPan(u,S.pan);if(j)return clearTimeout(this._sizeTimer),this}return this._resetView(u,p,S.pan&&S.pan.noMoveStart),this},setZoom:function(u,p){return this._loaded?this.setView(this.getCenter(),u,{zoom:p}):(this._zoom=u,this)},zoomIn:function(u,p){return u=u||(Ge.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+u,p)},zoomOut:function(u,p){return u=u||(Ge.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-u,p)},setZoomAround:function(u,p,S){var j=this.getZoomScale(p),U=this.getSize().divideBy(2),K=u instanceof z?u:this.latLngToContainerPoint(u),le=K.subtract(U).multiplyBy(1-1/j),ye=this.containerPointToLatLng(U.add(le));return this.setView(ye,p,{zoom:S})},_getBoundsCenterZoom:function(u,p){p=p||{},u=u.getBounds?u.getBounds():se(u);var S=k(p.paddingTopLeft||p.padding||[0,0]),j=k(p.paddingBottomRight||p.padding||[0,0]),U=this.getBoundsZoom(u,!1,S.add(j));if(U=typeof p.maxZoom=="number"?Math.min(p.maxZoom,U):U,U===1/0)return{center:u.getCenter(),zoom:U};var K=j.subtract(S).divideBy(2),le=this.project(u.getSouthWest(),U),ye=this.project(u.getNorthEast(),U),Ce=this.unproject(le.add(ye).divideBy(2).add(K),U);return{center:Ce,zoom:U}},fitBounds:function(u,p){if(u=se(u),!u.isValid())throw new Error("Bounds are not valid.");var S=this._getBoundsCenterZoom(u,p);return this.setView(S.center,S.zoom,p)},fitWorld:function(u){return this.fitBounds([[-90,-180],[90,180]],u)},panTo:function(u,p){return this.setView(u,this._zoom,{pan:p})},panBy:function(u,p){if(u=k(u).round(),p=p||{},!u.x&&!u.y)return this.fire("moveend");if(p.animate!==!0&&!this.getSize().contains(u))return this._resetView(this.unproject(this.project(this.getCenter()).add(u)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new ps,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),p.noMoveStart||this.fire("movestart"),p.animate!==!1){ot(this._mapPane,"leaflet-pan-anim");var S=this._getMapPanePos().subtract(u).round();this._panAnim.run(this._mapPane,S,p.duration||.25,p.easeLinearity)}else this._rawPanBy(u),this.fire("move").fire("moveend");return this},flyTo:function(u,p,S){if(S=S||{},S.animate===!1||!Ge.any3d)return this.setView(u,p,S);this._stop();var j=this.project(this.getCenter()),U=this.project(u),K=this.getSize(),le=this._zoom;u=de(u),p=p===void 0?le:p;var ye=Math.max(K.x,K.y),Ce=ye*this.getZoomScale(le,p),Pe=U.distanceTo(j)||1,Be=1.42,Ye=Be*Be;function ct(yn){var sa=yn?-1:1,po=yn?Ce:ye,bd=Ce*Ce-ye*ye+sa*Ye*Ye*Pe*Pe,ru=2*po*Ye*Pe,iu=bd/ru,Ba=Math.sqrt(iu*iu+1)-iu,la=Ba<1e-9?-18:Math.log(Ba);return la}function Yn(yn){return(Math.exp(yn)-Math.exp(-yn))/2}function An(yn){return(Math.exp(yn)+Math.exp(-yn))/2}function Rr(yn){return Yn(yn)/An(yn)}var Tt=ct(0);function jt(yn){return ye*(An(Tt)/An(Tt+Be*yn))}function gt(yn){return ye*(An(Tt)*Rr(Tt+Be*yn)-Yn(Tt))/Ye}function Ia(yn){return 1-Math.pow(1-yn,1.5)}var Kr=Date.now(),xc=(ct(1)-Tt)/Be,za=S.duration?1e3*S.duration:1e3*xc*.8;function yd(){var yn=(Date.now()-Kr)/za,sa=Ia(yn)*xc;yn<=1?(this._flyToFrame=J(yd,this),this._move(this.unproject(j.add(U.subtract(j).multiplyBy(gt(sa)/Pe)),le),this.getScaleZoom(ye/jt(sa),le),{flyTo:!0})):this._move(u,p)._moveEnd(!0)}return this._moveStart(!0,S.noMoveStart),yd.call(this),this},flyToBounds:function(u,p){var S=this._getBoundsCenterZoom(u,p);return this.flyTo(S.center,S.zoom,p)},setMaxBounds:function(u){return u=se(u),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),u.isValid()?(this.options.maxBounds=u,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(u){var p=this.options.minZoom;return this.options.minZoom=u,this._loaded&&p!==u&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(u):this},setMaxZoom:function(u){var p=this.options.maxZoom;return this.options.maxZoom=u,this._loaded&&p!==u&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(u):this},panInsideBounds:function(u,p){this._enforcingBounds=!0;var S=this.getCenter(),j=this._limitCenter(S,this._zoom,se(u));return S.equals(j)||this.panTo(j,p),this._enforcingBounds=!1,this},panInside:function(u,p){p=p||{};var S=k(p.paddingTopLeft||p.padding||[0,0]),j=k(p.paddingBottomRight||p.padding||[0,0]),U=this.project(this.getCenter()),K=this.project(u),le=this.getPixelBounds(),ye=q([le.min.add(S),le.max.subtract(j)]),Ce=ye.getSize();if(!ye.contains(K)){this._enforcingBounds=!0;var Pe=K.subtract(ye.getCenter()),Be=ye.extend(K).getSize().subtract(Ce);U.x+=Pe.x<0?-Be.x:Be.x,U.y+=Pe.y<0?-Be.y:Be.y,this.panTo(this.unproject(U),p),this._enforcingBounds=!1}return this},invalidateSize:function(u){if(!this._loaded)return this;u=i({animate:!1,pan:!0},u===!0?{animate:!0}:u);var p=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var S=this.getSize(),j=p.divideBy(2).round(),U=S.divideBy(2).round(),K=j.subtract(U);return!K.x&&!K.y?this:(u.animate&&u.pan?this.panBy(K):(u.pan&&this._rawPanBy(K),this.fire("move"),u.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(l(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:p,newSize:S}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(u){if(u=this._locateOptions=i({timeout:1e4,watch:!1},u),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var p=l(this._handleGeolocationResponse,this),S=l(this._handleGeolocationError,this);return u.watch?this._locationWatchId=navigator.geolocation.watchPosition(p,S,u):navigator.geolocation.getCurrentPosition(p,S,u),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(u){if(this._container._leaflet_id){var p=u.code,S=u.message||(p===1?"permission denied":p===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:p,message:"Geolocation error: "+S+"."})}},_handleGeolocationResponse:function(u){if(this._container._leaflet_id){var p=u.coords.latitude,S=u.coords.longitude,j=new me(p,S),U=j.toBounds(u.coords.accuracy*2),K=this._locateOptions;if(K.setView){var le=this.getBoundsZoom(U);this.setView(j,K.maxZoom?Math.min(le,K.maxZoom):le)}var ye={latlng:j,bounds:U,timestamp:u.timestamp};for(var Ce in u.coords)typeof u.coords[Ce]=="number"&&(ye[Ce]=u.coords[Ce]);this.fire("locationfound",ye)}},addHandler:function(u,p){if(!p)return this;var S=this[u]=new p(this);return this._handlers.push(S),this.options[u]&&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(),Ft(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(oe(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var u;for(u in this._layers)this._layers[u].remove();for(u in this._panes)Ft(this._panes[u]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(u,p){var S="leaflet-pane"+(u?" leaflet-"+u.replace("Pane","")+"-pane":""),j=pt("div",S,p||this._mapPane);return u&&(this._panes[u]=j),j},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var u=this.getPixelBounds(),p=this.unproject(u.getBottomLeft()),S=this.unproject(u.getTopRight());return new ee(p,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(u,p,S){u=se(u),S=k(S||[0,0]);var j=this.getZoom()||0,U=this.getMinZoom(),K=this.getMaxZoom(),le=u.getNorthWest(),ye=u.getSouthEast(),Ce=this.getSize().subtract(S),Pe=q(this.project(ye,j),this.project(le,j)).getSize(),Be=Ge.any3d?this.options.zoomSnap:1,Ye=Ce.x/Pe.x,ct=Ce.y/Pe.y,Yn=p?Math.max(Ye,ct):Math.min(Ye,ct);return j=this.getScaleZoom(Yn,j),Be&&(j=Math.round(j/(Be/100))*(Be/100),j=p?Math.ceil(j/Be)*Be:Math.floor(j/Be)*Be),Math.max(U,Math.min(K,j))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new z(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(u,p){var S=this._getTopLeftPoint(u,p);return new M(S,S.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(u){return this.options.crs.getProjectedBounds(u===void 0?this.getZoom():u)},getPane:function(u){return typeof u=="string"?this._panes[u]:u},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(u,p){var S=this.options.crs;return p=p===void 0?this._zoom:p,S.scale(u)/S.scale(p)},getScaleZoom:function(u,p){var S=this.options.crs;p=p===void 0?this._zoom:p;var j=S.zoom(u*S.scale(p));return isNaN(j)?1/0:j},project:function(u,p){return p=p===void 0?this._zoom:p,this.options.crs.latLngToPoint(de(u),p)},unproject:function(u,p){return p=p===void 0?this._zoom:p,this.options.crs.pointToLatLng(k(u),p)},layerPointToLatLng:function(u){var p=k(u).add(this.getPixelOrigin());return this.unproject(p)},latLngToLayerPoint:function(u){var p=this.project(de(u))._round();return p._subtract(this.getPixelOrigin())},wrapLatLng:function(u){return this.options.crs.wrapLatLng(de(u))},wrapLatLngBounds:function(u){return this.options.crs.wrapLatLngBounds(se(u))},distance:function(u,p){return this.options.crs.distance(de(u),de(p))},containerPointToLayerPoint:function(u){return k(u).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(u){return k(u).add(this._getMapPanePos())},containerPointToLatLng:function(u){var p=this.containerPointToLayerPoint(k(u));return this.layerPointToLatLng(p)},latLngToContainerPoint:function(u){return this.layerPointToContainerPoint(this.latLngToLayerPoint(de(u)))},mouseEventToContainerPoint:function(u){return $l(u,this._container)},mouseEventToLayerPoint:function(u){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(u))},mouseEventToLatLng:function(u){return this.layerPointToLatLng(this.mouseEventToLayerPoint(u))},_initContainer:function(u){var p=this._container=Jf(u);if(p){if(p._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");tt(p,"scroll",this._onScroll,this),this._containerId=f(p)},_initLayout:function(){var u=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ge.any3d,ot(u,"leaflet-container"+(Ge.touch?" leaflet-touch":"")+(Ge.retina?" leaflet-retina":"")+(Ge.ielt9?" leaflet-oldie":"")+(Ge.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var p=Dl(u,"position");p!=="absolute"&&p!=="relative"&&p!=="fixed"&&p!=="sticky"&&(u.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var u=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Yt(this._mapPane,new z(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ot(u.markerPane,"leaflet-zoom-hide"),ot(u.shadowPane,"leaflet-zoom-hide"))},_resetView:function(u,p,S){Yt(this._mapPane,new z(0,0));var j=!this._loaded;this._loaded=!0,p=this._limitZoom(p),this.fire("viewprereset");var U=this._zoom!==p;this._moveStart(U,S)._move(u,p)._moveEnd(U),this.fire("viewreset"),j&&this.fire("load")},_moveStart:function(u,p){return u&&this.fire("zoomstart"),p||this.fire("movestart"),this},_move:function(u,p,S,j){p===void 0&&(p=this._zoom);var U=this._zoom!==p;return this._zoom=p,this._lastCenter=u,this._pixelOrigin=this._getNewPixelOrigin(u),j?S&&S.pinch&&this.fire("zoom",S):((U||S&&S.pinch)&&this.fire("zoom",S),this.fire("move",S)),this},_moveEnd:function(u){return u&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return oe(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(u){Yt(this._mapPane,this._getMapPanePos().subtract(u))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(u){this._targets={},this._targets[f(this._container)]=this;var p=u?kt:tt;p(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&p(window,"resize",this._onResize,this),Ge.any3d&&this.options.transform3DLimit&&(u?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){oe(this._resizeRequest),this._resizeRequest=J(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var u=this._getMapPanePos();Math.max(Math.abs(u.x),Math.abs(u.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(u,p){for(var S=[],j,U=p==="mouseout"||p==="mouseover",K=u.target||u.srcElement,le=!1;K;){if(j=this._targets[f(K)],j&&(p==="click"||p==="preclick")&&this._draggableMoved(j)){le=!0;break}if(j&&j.listens(p,!0)&&(U&&!ra(K,u)||(S.push(j),U))||K===this._container)break;K=K.parentNode}return!S.length&&!le&&!U&&this.listens(p,!0)&&(S=[this]),S},_isClickDisabled:function(u){for(;u&&u!==this._container;){if(u._leaflet_disable_click)return!0;u=u.parentNode}},_handleDOMEvent:function(u){var p=u.target||u.srcElement;if(!(!this._loaded||p._leaflet_disable_events||u.type==="click"&&this._isClickDisabled(p))){var S=u.type;S==="mousedown"&&hs(p),this._fireDOMEvent(u,S)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(u,p,S){if(u.type==="click"){var j=i({},u);j.type="preclick",this._fireDOMEvent(j,j.type,S)}var U=this._findEventTargets(u,p);if(S){for(var K=[],le=0;le<S.length;le++)S[le].listens(p,!0)&&K.push(S[le]);U=K.concat(U)}if(U.length){p==="contextmenu"&&En(u);var ye=U[0],Ce={originalEvent:u};if(u.type!=="keypress"&&u.type!=="keydown"&&u.type!=="keyup"){var Pe=ye.getLatLng&&(!ye._radius||ye._radius<=10);Ce.containerPoint=Pe?this.latLngToContainerPoint(ye.getLatLng()):this.mouseEventToContainerPoint(u),Ce.layerPoint=this.containerPointToLayerPoint(Ce.containerPoint),Ce.latlng=Pe?ye.getLatLng():this.layerPointToLatLng(Ce.layerPoint)}for(le=0;le<U.length;le++)if(U[le].fire(p,Ce,!0),Ce.originalEvent._stopped||U[le].options.bubblingMouseEvents===!1&&F(this._mouseEvents,p)!==-1)return}},_draggableMoved:function(u){return u=u.dragging&&u.dragging.enabled()?u:this,u.dragging&&u.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var u=0,p=this._handlers.length;u<p;u++)this._handlers[u].disable()},whenReady:function(u,p){return this._loaded?u.call(p||this,{target:this}):this.on("load",u,p),this},_getMapPanePos:function(){return ja(this._mapPane)||new z(0,0)},_moved:function(){var u=this._getMapPanePos();return u&&!u.equals([0,0])},_getTopLeftPoint:function(u,p){var S=u&&p!==void 0?this._getNewPixelOrigin(u,p):this.getPixelOrigin();return S.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(u,p){var S=this.getSize()._divideBy(2);return this.project(u,p)._subtract(S)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(u,p,S){var j=this._getNewPixelOrigin(S,p);return this.project(u,p)._subtract(j)},_latLngBoundsToNewLayerBounds:function(u,p,S){var j=this._getNewPixelOrigin(S,p);return q([this.project(u.getSouthWest(),p)._subtract(j),this.project(u.getNorthWest(),p)._subtract(j),this.project(u.getSouthEast(),p)._subtract(j),this.project(u.getNorthEast(),p)._subtract(j)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(u){return this.latLngToLayerPoint(u).subtract(this._getCenterLayerPoint())},_limitCenter:function(u,p,S){if(!S)return u;var j=this.project(u,p),U=this.getSize().divideBy(2),K=new M(j.subtract(U),j.add(U)),le=this._getBoundsOffset(K,S,p);return Math.abs(le.x)<=1&&Math.abs(le.y)<=1?u:this.unproject(j.add(le),p)},_limitOffset:function(u,p){if(!p)return u;var S=this.getPixelBounds(),j=new M(S.min.add(u),S.max.add(u));return u.add(this._getBoundsOffset(j,p))},_getBoundsOffset:function(u,p,S){var j=q(this.project(p.getNorthEast(),S),this.project(p.getSouthWest(),S)),U=j.min.subtract(u.min),K=j.max.subtract(u.max),le=this._rebound(U.x,-K.x),ye=this._rebound(U.y,-K.y);return new z(le,ye)},_rebound:function(u,p){return u+p>0?Math.round(u-p)/2:Math.max(0,Math.ceil(u))-Math.max(0,Math.floor(p))},_limitZoom:function(u){var p=this.getMinZoom(),S=this.getMaxZoom(),j=Ge.any3d?this.options.zoomSnap:1;return j&&(u=Math.round(u/j)*j),Math.max(p,Math.min(S,u))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){un(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(u,p){var S=this._getCenterOffset(u)._trunc();return(p&&p.animate)!==!0&&!this.getSize().contains(S)?!1:(this.panBy(S,p),!0)},_createAnimProxy:function(){var u=this._proxy=pt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(u),this.on("zoomanim",function(p){var S=Ta,j=this._proxy.style[S];na(this._proxy,this.project(p.center,p.zoom),this.getZoomScale(p.zoom,1)),j===this._proxy.style[S]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Ft(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var u=this.getCenter(),p=this.getZoom();na(this._proxy,this.project(u,p),this.getZoomScale(p,1))},_catchTransitionEnd:function(u){this._animatingZoom&&u.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(u,p,S){if(this._animatingZoom)return!0;if(S=S||{},!this._zoomAnimated||S.animate===!1||this._nothingToAnimate()||Math.abs(p-this._zoom)>this.options.zoomAnimationThreshold)return!1;var j=this.getZoomScale(p),U=this._getCenterOffset(u)._divideBy(1-1/j);return S.animate!==!0&&!this.getSize().contains(U)?!1:(J(function(){this._moveStart(!0,S.noMoveStart||!1)._animateZoom(u,p,!0)},this),!0)},_animateZoom:function(u,p,S,j){this._mapPane&&(S&&(this._animatingZoom=!0,this._animateToCenter=u,this._animateToZoom=p,ot(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:u,zoom:p,noUpdate:j}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(l(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&un(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 ad(u,p){return new _t(u,p)}var Lr=ie.extend({options:{position:"topright"},initialize:function(u){C(this,u)},getPosition:function(){return this.options.position},setPosition:function(u){var p=this._map;return p&&p.removeControl(this),this.options.position=u,p&&p.addControl(this),this},getContainer:function(){return this._container},addTo:function(u){this.remove(),this._map=u;var p=this._container=this.onAdd(u),S=this.getPosition(),j=u._controlCorners[S];return ot(p,"leaflet-control"),S.indexOf("bottom")!==-1?j.insertBefore(p,j.firstChild):j.appendChild(p),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Ft(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(u){this._map&&u&&u.screenX>0&&u.screenY>0&&this._map.getContainer().focus()}}),ia=function(u){return new Lr(u)};_t.include({addControl:function(u){return u.addTo(this),this},removeControl:function(u){return u.remove(),this},_initControlPos:function(){var u=this._controlCorners={},p="leaflet-",S=this._controlContainer=pt("div",p+"control-container",this._container);function j(U,K){var le=p+U+" "+p+K;u[U+K]=pt("div",le,S)}j("top","left"),j("top","right"),j("bottom","left"),j("bottom","right")},_clearControlPos:function(){for(var u in this._controlCorners)Ft(this._controlCorners[u]);Ft(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Fl=Lr.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(u,p,S,j){return S<j?-1:j<S?1:0}},initialize:function(u,p,S){C(this,S),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var j in u)this._addLayer(u[j],j);for(j in p)this._addLayer(p[j],j,!0)},onAdd:function(u){this._initLayout(),this._update(),this._map=u,u.on("zoomend",this._checkDisabledLayers,this);for(var p=0;p<this._layers.length;p++)this._layers[p].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(u){return Lr.prototype.addTo.call(this,u),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var u=0;u<this._layers.length;u++)this._layers[u].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(u,p){return this._addLayer(u,p),this._map?this._update():this},addOverlay:function(u,p){return this._addLayer(u,p,!0),this._map?this._update():this},removeLayer:function(u){u.off("add remove",this._onLayerChange,this);var p=this._getLayer(f(u));return p&&this._layers.splice(this._layers.indexOf(p),1),this._map?this._update():this},expand:function(){ot(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var u=this._map.getSize().y-(this._container.offsetTop+50);return u<this._section.clientHeight?(ot(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=u+"px"):un(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return un(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var u="leaflet-control-layers",p=this._container=pt("div",u),S=this.options.collapsed;p.setAttribute("aria-haspopup",!0),co(p),Ri(p);var j=this._section=pt("section",u+"-list");S&&(this._map.on("click",this.collapse,this),tt(p,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var U=this._layersLink=pt("a",u+"-toggle",p);U.href="#",U.title="Layers",U.setAttribute("role","button"),tt(U,{keydown:function(K){K.keyCode===13&&this._expandSafely()},click:function(K){En(K),this._expandSafely()}},this),S||this.expand(),this._baseLayersList=pt("div",u+"-base",j),this._separator=pt("div",u+"-separator",j),this._overlaysList=pt("div",u+"-overlays",j),p.appendChild(j)},_getLayer:function(u){for(var p=0;p<this._layers.length;p++)if(this._layers[p]&&f(this._layers[p].layer)===u)return this._layers[p]},_addLayer:function(u,p,S){this._map&&u.on("add remove",this._onLayerChange,this),this._layers.push({layer:u,name:p,overlay:S}),this.options.sortLayers&&this._layers.sort(l(function(j,U){return this.options.sortFunction(j.layer,U.layer,j.name,U.name)},this)),this.options.autoZIndex&&u.setZIndex&&(this._lastZIndex++,u.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Hr(this._baseLayersList),Hr(this._overlaysList),this._layerControlInputs=[];var u,p,S,j,U=0;for(S=0;S<this._layers.length;S++)j=this._layers[S],this._addItem(j),p=p||j.overlay,u=u||!j.overlay,U+=j.overlay?0:1;return this.options.hideSingleBase&&(u=u&&U>1,this._baseLayersList.style.display=u?"":"none"),this._separator.style.display=p&&u?"":"none",this},_onLayerChange:function(u){this._handlingClick||this._update();var p=this._getLayer(f(u.target)),S=p.overlay?u.type==="add"?"overlayadd":"overlayremove":u.type==="add"?"baselayerchange":null;S&&this._map.fire(S,p)},_createRadioElement:function(u,p){var S='<input type="radio" class="leaflet-control-layers-selector" name="'+u+'"'+(p?' checked="checked"':"")+"/>",j=document.createElement("div");return j.innerHTML=S,j.firstChild},_addItem:function(u){var p=document.createElement("label"),S=this._map.hasLayer(u.layer),j;u.overlay?(j=document.createElement("input"),j.type="checkbox",j.className="leaflet-control-layers-selector",j.defaultChecked=S):j=this._createRadioElement("leaflet-base-layers_"+f(this),S),this._layerControlInputs.push(j),j.layerId=f(u.layer),tt(j,"click",this._onInputClick,this);var U=document.createElement("span");U.innerHTML=" "+u.name;var K=document.createElement("span");p.appendChild(K),K.appendChild(j),K.appendChild(U);var le=u.overlay?this._overlaysList:this._baseLayersList;return le.appendChild(p),this._checkDisabledLayers(),p},_onInputClick:function(){if(!this._preventClick){var u=this._layerControlInputs,p,S,j=[],U=[];this._handlingClick=!0;for(var K=u.length-1;K>=0;K--)p=u[K],S=this._getLayer(p.layerId).layer,p.checked?j.push(S):p.checked||U.push(S);for(K=0;K<U.length;K++)this._map.hasLayer(U[K])&&this._map.removeLayer(U[K]);for(K=0;K<j.length;K++)this._map.hasLayer(j[K])||this._map.addLayer(j[K]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var u=this._layerControlInputs,p,S,j=this._map.getZoom(),U=u.length-1;U>=0;U--)p=u[U],S=this._getLayer(p.layerId).layer,p.disabled=S.options.minZoom!==void 0&&j<S.options.minZoom||S.options.maxZoom!==void 0&&j>S.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var u=this._section;this._preventClick=!0,tt(u,"click",En),this.expand();var p=this;setTimeout(function(){kt(u,"click",En),p._preventClick=!1})}}),Qm=function(u,p,S){return new Fl(u,p,S)},od=Lr.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(u){var p="leaflet-control-zoom",S=pt("div",p+" leaflet-bar"),j=this.options;return this._zoomInButton=this._createButton(j.zoomInText,j.zoomInTitle,p+"-in",S,this._zoomIn),this._zoomOutButton=this._createButton(j.zoomOutText,j.zoomOutTitle,p+"-out",S,this._zoomOut),this._updateDisabled(),u.on("zoomend zoomlevelschange",this._updateDisabled,this),S},onRemove:function(u){u.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(u){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(u.shiftKey?3:1))},_zoomOut:function(u){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(u.shiftKey?3:1))},_createButton:function(u,p,S,j,U){var K=pt("a",S,j);return K.innerHTML=u,K.href="#",K.title=p,K.setAttribute("role","button"),K.setAttribute("aria-label",p),co(K),tt(K,"click",Ma),tt(K,"click",U,this),tt(K,"click",this._refocusOnMap,this),K},_updateDisabled:function(){var u=this._map,p="leaflet-disabled";un(this._zoomInButton,p),un(this._zoomOutButton,p),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||u._zoom===u.getMinZoom())&&(ot(this._zoomOutButton,p),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||u._zoom===u.getMaxZoom())&&(ot(this._zoomInButton,p),this._zoomInButton.setAttribute("aria-disabled","true"))}});_t.mergeOptions({zoomControl:!0}),_t.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new od,this.addControl(this.zoomControl))});var g1=function(u){return new od(u)},Jm=Lr.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(u){var p="leaflet-control-scale",S=pt("div",p),j=this.options;return this._addScales(j,p+"-line",S),u.on(j.updateWhenIdle?"moveend":"move",this._update,this),u.whenReady(this._update,this),S},onRemove:function(u){u.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(u,p,S){u.metric&&(this._mScale=pt("div",p,S)),u.imperial&&(this._iScale=pt("div",p,S))},_update:function(){var u=this._map,p=u.getSize().y/2,S=u.distance(u.containerPointToLatLng([0,p]),u.containerPointToLatLng([this.options.maxWidth,p]));this._updateScales(S)},_updateScales:function(u){this.options.metric&&u&&this._updateMetric(u),this.options.imperial&&u&&this._updateImperial(u)},_updateMetric:function(u){var p=this._getRoundNum(u),S=p<1e3?p+" m":p/1e3+" km";this._updateScale(this._mScale,S,p/u)},_updateImperial:function(u){var p=u*3.2808399,S,j,U;p>5280?(S=p/5280,j=this._getRoundNum(S),this._updateScale(this._iScale,j+" mi",j/S)):(U=this._getRoundNum(p),this._updateScale(this._iScale,U+" ft",U/p))},_updateScale:function(u,p,S){u.style.width=Math.round(this.options.maxWidth*S)+"px",u.innerHTML=p},_getRoundNum:function(u){var p=Math.pow(10,(Math.floor(u)+"").length-1),S=u/p;return S=S>=10?10:S>=5?5:S>=3?3:S>=2?2:1,p*S}}),sd=function(u){return new Jm(u)},v1='<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>',ld=Lr.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Ge.inlineSvg?v1+" ":"")+"Leaflet</a>"},initialize:function(u){C(this,u),this._attributions={}},onAdd:function(u){u.attributionControl=this,this._container=pt("div","leaflet-control-attribution"),co(this._container);for(var p in u._layers)u._layers[p].getAttribution&&this.addAttribution(u._layers[p].getAttribution());return this._update(),u.on("layeradd",this._addAttribution,this),this._container},onRemove:function(u){u.off("layeradd",this._addAttribution,this)},_addAttribution:function(u){u.layer.getAttribution&&(this.addAttribution(u.layer.getAttribution()),u.layer.once("remove",function(){this.removeAttribution(u.layer.getAttribution())},this))},setPrefix:function(u){return this.options.prefix=u,this._update(),this},addAttribution:function(u){return u?(this._attributions[u]||(this._attributions[u]=0),this._attributions[u]++,this._update(),this):this},removeAttribution:function(u){return u?(this._attributions[u]&&(this._attributions[u]--,this._update()),this):this},_update:function(){if(this._map){var u=[];for(var p in this._attributions)this._attributions[p]&&u.push(p);var S=[];this.options.prefix&&S.push(this.options.prefix),u.length&&S.push(u.join(", ")),this._container.innerHTML=S.join(' <span aria-hidden="true">|</span> ')}}});_t.mergeOptions({attributionControl:!0}),_t.addInitHook(function(){this.options.attributionControl&&new ld().addTo(this)});var y1=function(u){return new ld(u)};Lr.Layers=Fl,Lr.Zoom=od,Lr.Scale=Jm,Lr.Attribution=ld,ia.layers=Qm,ia.zoom=g1,ia.scale=sd,ia.attribution=y1;var Di=ie.extend({initialize:function(u){this._map=u},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Di.addTo=function(u,p){return u.addHandler(p,this),this};var b1={Events:Y},ud=Ge.touch?"touchstart mousedown":"mousedown",Pa=I.extend({options:{clickTolerance:3},initialize:function(u,p,S,j){C(this,j),this._element=u,this._dragStartTarget=p||u,this._preventOutline=S},enable:function(){this._enabled||(tt(this._dragStartTarget,ud,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Pa._dragging===this&&this.finishDrag(!0),kt(this._dragStartTarget,ud,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(u){if(this._enabled&&(this._moved=!1,!ed(this._element,"leaflet-zoom-anim"))){if(u.touches&&u.touches.length!==1){Pa._dragging===this&&this.finishDrag();return}if(!(Pa._dragging||u.shiftKey||u.which!==1&&u.button!==1&&!u.touches)&&(Pa._dragging=this,this._preventOutline&&hs(this._element),rc(),fs(),!this._moving)){this.fire("down");var p=u.touches?u.touches[0]:u,S=ac(this._element);this._startPoint=new z(p.clientX,p.clientY),this._startPos=ja(this._element),this._parentScale=zl(S);var j=u.type==="mousedown";tt(document,j?"mousemove":"touchmove",this._onMove,this),tt(document,j?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(u){if(this._enabled){if(u.touches&&u.touches.length>1){this._moved=!0;return}var p=u.touches&&u.touches.length===1?u.touches[0]:u,S=new z(p.clientX,p.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,En(u),this._moved||(this.fire("dragstart"),this._moved=!0,ot(document.body,"leaflet-dragging"),this._lastTarget=u.target||u.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ot(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(S),this._moving=!0,this._lastEvent=u,this._updatePosition())}},_updatePosition:function(){var u={originalEvent:this._lastEvent};this.fire("predrag",u),Yt(this._element,this._newPos),this.fire("drag",u)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(u){un(document.body,"leaflet-dragging"),this._lastTarget&&(un(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),kt(document,"mousemove touchmove",this._onMove,this),kt(document,"mouseup touchend touchcancel",this._onUp,this),Il(),Li();var p=this._moved&&this._moving;this._moving=!1,Pa._dragging=!1,p&&this.fire("dragend",{noInertia:u,distance:this._newPos.distanceTo(this._startPos)})}});function ep(u,p,S){var j,U=[1,4,2,8],K,le,ye,Ce,Pe,Be,Ye,ct;for(K=0,Be=u.length;K<Be;K++)u[K]._code=fo(u[K],p);for(ye=0;ye<4;ye++){for(Ye=U[ye],j=[],K=0,Be=u.length,le=Be-1;K<Be;le=K++)Ce=u[K],Pe=u[le],Ce._code&Ye?Pe._code&Ye||(ct=sc(Pe,Ce,Ye,p,S),ct._code=fo(ct,p),j.push(ct)):(Pe._code&Ye&&(ct=sc(Pe,Ce,Ye,p,S),ct._code=fo(ct,p),j.push(ct)),j.push(Ce));u=j}return u}function tp(u,p){var S,j,U,K,le,ye,Ce,Pe,Be;if(!u||u.length===0)throw new Error("latlngs not passed");Gr(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var Ye=de([0,0]),ct=se(u),Yn=ct.getNorthWest().distanceTo(ct.getSouthWest())*ct.getNorthEast().distanceTo(ct.getNorthWest());Yn<1700&&(Ye=cd(u));var An=u.length,Rr=[];for(S=0;S<An;S++){var Tt=de(u[S]);Rr.push(p.project(de([Tt.lat-Ye.lat,Tt.lng-Ye.lng])))}for(ye=Ce=Pe=0,S=0,j=An-1;S<An;j=S++)U=Rr[S],K=Rr[j],le=U.y*K.x-K.y*U.x,Ce+=(U.x+K.x)*le,Pe+=(U.y+K.y)*le,ye+=le*3;ye===0?Be=Rr[0]:Be=[Ce/ye,Pe/ye];var jt=p.unproject(k(Be));return de([jt.lat+Ye.lat,jt.lng+Ye.lng])}function cd(u){for(var p=0,S=0,j=0,U=0;U<u.length;U++){var K=de(u[U]);p+=K.lat,S+=K.lng,j++}return de([p/j,S/j])}var fd={__proto__:null,clipPolygon:ep,polygonCenter:tp,centroid:cd};function np(u,p){if(!p||!u.length)return u.slice();var S=p*p;return u=_1(u,S),u=ip(u,S),u}function rp(u,p,S){return Math.sqrt(Vl(u,p,S,!0))}function x1(u,p,S){return Vl(u,p,S)}function ip(u,p){var S=u.length,j=typeof Uint8Array<"u"?Uint8Array:Array,U=new j(S);U[0]=U[S-1]=1,dd(u,U,p,0,S-1);var K,le=[];for(K=0;K<S;K++)U[K]&&le.push(u[K]);return le}function dd(u,p,S,j,U){var K=0,le,ye,Ce;for(ye=j+1;ye<=U-1;ye++)Ce=Vl(u[ye],u[j],u[U],!0),Ce>K&&(le=ye,K=Ce);K>S&&(p[le]=1,dd(u,p,S,j,le),dd(u,p,S,le,U))}function _1(u,p){for(var S=[u[0]],j=1,U=0,K=u.length;j<K;j++)w1(u[j],u[U])>p&&(S.push(u[j]),U=j);return U<K-1&&S.push(u[K-1]),S}var ap;function op(u,p,S,j,U){var K=j?ap:fo(u,S),le=fo(p,S),ye,Ce,Pe;for(ap=le;;){if(!(K|le))return[u,p];if(K&le)return!1;ye=K||le,Ce=sc(u,p,ye,S,U),Pe=fo(Ce,S),ye===K?(u=Ce,K=Pe):(p=Ce,le=Pe)}}function sc(u,p,S,j,U){var K=p.x-u.x,le=p.y-u.y,ye=j.min,Ce=j.max,Pe,Be;return S&8?(Pe=u.x+K*(Ce.y-u.y)/le,Be=Ce.y):S&4?(Pe=u.x+K*(ye.y-u.y)/le,Be=ye.y):S&2?(Pe=Ce.x,Be=u.y+le*(Ce.x-u.x)/K):S&1&&(Pe=ye.x,Be=u.y+le*(ye.x-u.x)/K),new z(Pe,Be,U)}function fo(u,p){var S=0;return u.x<p.min.x?S|=1:u.x>p.max.x&&(S|=2),u.y<p.min.y?S|=4:u.y>p.max.y&&(S|=8),S}function w1(u,p){var S=p.x-u.x,j=p.y-u.y;return S*S+j*j}function Vl(u,p,S,j){var U=p.x,K=p.y,le=S.x-U,ye=S.y-K,Ce=le*le+ye*ye,Pe;return Ce>0&&(Pe=((u.x-U)*le+(u.y-K)*ye)/Ce,Pe>1?(U=S.x,K=S.y):Pe>0&&(U+=le*Pe,K+=ye*Pe)),le=u.x-U,ye=u.y-K,j?le*le+ye*ye:new z(U,K)}function Gr(u){return!N(u[0])||typeof u[0][0]!="object"&&typeof u[0][0]<"u"}function lc(u){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Gr(u)}function gs(u,p){var S,j,U,K,le,ye,Ce,Pe;if(!u||u.length===0)throw new Error("latlngs not passed");Gr(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var Be=de([0,0]),Ye=se(u),ct=Ye.getNorthWest().distanceTo(Ye.getSouthWest())*Ye.getNorthEast().distanceTo(Ye.getNorthWest());ct<1700&&(Be=cd(u));var Yn=u.length,An=[];for(S=0;S<Yn;S++){var Rr=de(u[S]);An.push(p.project(de([Rr.lat-Be.lat,Rr.lng-Be.lng])))}for(S=0,j=0;S<Yn-1;S++)j+=An[S].distanceTo(An[S+1])/2;if(j===0)Pe=An[0];else for(S=0,K=0;S<Yn-1;S++)if(le=An[S],ye=An[S+1],U=le.distanceTo(ye),K+=U,K>j){Ce=(K-j)/U,Pe=[ye.x-Ce*(ye.x-le.x),ye.y-Ce*(ye.y-le.y)];break}var Tt=p.unproject(k(Pe));return de([Tt.lat+Be.lat,Tt.lng+Be.lng])}var S1={__proto__:null,simplify:np,pointToSegmentDistance:rp,closestPointOnSegment:x1,clipSegment:op,_getEdgeIntersection:sc,_getBitCode:fo,_sqClosestPointOnSegment:Vl,isFlat:Gr,_flat:lc,polylineCenter:gs},uc={project:function(u){return new z(u.lng,u.lat)},unproject:function(u){return new me(u.y,u.x)},bounds:new M([-180,-90],[180,90])},cc={R:6378137,R_MINOR:6356752314245179e-9,bounds:new M([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(u){var p=Math.PI/180,S=this.R,j=u.lat*p,U=this.R_MINOR/S,K=Math.sqrt(1-U*U),le=K*Math.sin(j),ye=Math.tan(Math.PI/4-j/2)/Math.pow((1-le)/(1+le),K/2);return j=-S*Math.log(Math.max(ye,1e-10)),new z(u.lng*p*S,j)},unproject:function(u){for(var p=180/Math.PI,S=this.R,j=this.R_MINOR/S,U=Math.sqrt(1-j*j),K=Math.exp(-u.y/S),le=Math.PI/2-2*Math.atan(K),ye=0,Ce=.1,Pe;ye<15&&Math.abs(Ce)>1e-7;ye++)Pe=U*Math.sin(le),Pe=Math.pow((1-Pe)/(1+Pe),U/2),Ce=Math.PI/2-2*Math.atan(K*Pe)-le,le+=Ce;return new me(le*p,u.x*p/S)}},sp={__proto__:null,LonLat:uc,Mercator:cc,SphericalMercator:G},lp=i({},D,{code:"EPSG:3395",projection:cc,transformation:(function(){var u=.5/(Math.PI*cc.R);return V(u,.5,-u,.5)})()}),hd=i({},D,{code:"EPSG:4326",projection:uc,transformation:V(1/180,1,-1/180,.5)}),vs=i({},be,{projection:uc,transformation:V(1,0,-1,0),scale:function(u){return Math.pow(2,u)},zoom:function(u){return Math.log(u)/Math.LN2},distance:function(u,p){var S=p.lng-u.lng,j=p.lat-u.lat;return Math.sqrt(S*S+j*j)},infinite:!0});be.Earth=D,be.EPSG3395=lp,be.EPSG3857=X,be.EPSG900913=te,be.EPSG4326=hd,be.Simple=vs;var ui=I.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(u){return u.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(u){return u&&u.removeLayer(this),this},getPane:function(u){return this._map.getPane(u?this.options[u]||u:this.options.pane)},addInteractiveTarget:function(u){return this._map._targets[f(u)]=this,this},removeInteractiveTarget:function(u){return delete this._map._targets[f(u)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(u){var p=u.target;if(p.hasLayer(this)){if(this._map=p,this._zoomAnimated=p._zoomAnimated,this.getEvents){var S=this.getEvents();p.on(S,this),this.once("remove",function(){p.off(S,this)},this)}this.onAdd(p),this.fire("add"),p.fire("layeradd",{layer:this})}}});_t.include({addLayer:function(u){if(!u._layerAdd)throw new Error("The provided object is not a Layer.");var p=f(u);return this._layers[p]?this:(this._layers[p]=u,u._mapToAdd=this,u.beforeAdd&&u.beforeAdd(this),this.whenReady(u._layerAdd,u),this)},removeLayer:function(u){var p=f(u);return this._layers[p]?(this._loaded&&u.onRemove(this),delete this._layers[p],this._loaded&&(this.fire("layerremove",{layer:u}),u.fire("remove")),u._map=u._mapToAdd=null,this):this},hasLayer:function(u){return f(u)in this._layers},eachLayer:function(u,p){for(var S in this._layers)u.call(p,this._layers[S]);return this},_addLayers:function(u){u=u?N(u)?u:[u]:[];for(var p=0,S=u.length;p<S;p++)this.addLayer(u[p])},_addZoomLimit:function(u){(!isNaN(u.options.maxZoom)||!isNaN(u.options.minZoom))&&(this._zoomBoundLayers[f(u)]=u,this._updateZoomLevels())},_removeZoomLimit:function(u){var p=f(u);this._zoomBoundLayers[p]&&(delete this._zoomBoundLayers[p],this._updateZoomLevels())},_updateZoomLevels:function(){var u=1/0,p=-1/0,S=this._getZoomSpan();for(var j in this._zoomBoundLayers){var U=this._zoomBoundLayers[j].options;u=U.minZoom===void 0?u:Math.min(u,U.minZoom),p=U.maxZoom===void 0?p:Math.max(p,U.maxZoom)}this._layersMaxZoom=p===-1/0?void 0:p,this._layersMinZoom=u===1/0?void 0:u,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 ys=ui.extend({initialize:function(u,p){C(this,p),this._layers={};var S,j;if(u)for(S=0,j=u.length;S<j;S++)this.addLayer(u[S])},addLayer:function(u){var p=this.getLayerId(u);return this._layers[p]=u,this._map&&this._map.addLayer(u),this},removeLayer:function(u){var p=u in this._layers?u:this.getLayerId(u);return this._map&&this._layers[p]&&this._map.removeLayer(this._layers[p]),delete this._layers[p],this},hasLayer:function(u){var p=typeof u=="number"?u:this.getLayerId(u);return p in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(u){var p=Array.prototype.slice.call(arguments,1),S,j;for(S in this._layers)j=this._layers[S],j[u]&&j[u].apply(j,p);return this},onAdd:function(u){this.eachLayer(u.addLayer,u)},onRemove:function(u){this.eachLayer(u.removeLayer,u)},eachLayer:function(u,p){for(var S in this._layers)u.call(p,this._layers[S]);return this},getLayer:function(u){return this._layers[u]},getLayers:function(){var u=[];return this.eachLayer(u.push,u),u},setZIndex:function(u){return this.invoke("setZIndex",u)},getLayerId:function(u){return f(u)}}),C1=function(u,p){return new ys(u,p)},ki=ys.extend({addLayer:function(u){return this.hasLayer(u)?this:(u.addEventParent(this),ys.prototype.addLayer.call(this,u),this.fire("layeradd",{layer:u}))},removeLayer:function(u){return this.hasLayer(u)?(u in this._layers&&(u=this._layers[u]),u.removeEventParent(this),ys.prototype.removeLayer.call(this,u),this.fire("layerremove",{layer:u})):this},setStyle:function(u){return this.invoke("setStyle",u)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var u=new ee;for(var p in this._layers){var S=this._layers[p];u.extend(S.getBounds?S.getBounds():S.getLatLng())}return u}}),up=function(u,p){return new ki(u,p)},Ii=ie.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(u){C(this,u)},createIcon:function(u){return this._createIcon("icon",u)},createShadow:function(u){return this._createIcon("shadow",u)},_createIcon:function(u,p){var S=this._getIconUrl(u);if(!S){if(u==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var j=this._createImg(S,p&&p.tagName==="IMG"?p:null);return this._setIconStyles(j,u),(this.options.crossOrigin||this.options.crossOrigin==="")&&(j.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),j},_setIconStyles:function(u,p){var S=this.options,j=S[p+"Size"];typeof j=="number"&&(j=[j,j]);var U=k(j),K=k(p==="shadow"&&S.shadowAnchor||S.iconAnchor||U&&U.divideBy(2,!0));u.className="leaflet-marker-"+p+" "+(S.className||""),K&&(u.style.marginLeft=-K.x+"px",u.style.marginTop=-K.y+"px"),U&&(u.style.width=U.x+"px",u.style.height=U.y+"px")},_createImg:function(u,p){return p=p||document.createElement("img"),p.src=u,p},_getIconUrl:function(u){return Ge.retina&&this.options[u+"RetinaUrl"]||this.options[u+"Url"]}});function Hl(u){return new Ii(u)}var ql=Ii.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(u){return typeof ql.imagePath!="string"&&(ql.imagePath=this._detectIconPath()),(this.options.imagePath||ql.imagePath)+Ii.prototype._getIconUrl.call(this,u)},_stripUrl:function(u){var p=function(S,j,U){var K=j.exec(S);return K&&K[U]};return u=p(u,/^url\((['"])?(.+)\1\)$/,2),u&&p(u,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var u=pt("div","leaflet-default-icon-path",document.body),p=Dl(u,"background-image")||Dl(u,"backgroundImage");if(document.body.removeChild(u),p=this._stripUrl(p),p)return p;var S=document.querySelector('link[href$="leaflet.css"]');return S?S.href.substring(0,S.href.length-11-1):""}}),Gl=Di.extend({initialize:function(u){this._marker=u},addHooks:function(){var u=this._marker._icon;this._draggable||(this._draggable=new Pa(u,u,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ot(u,"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&&un(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(u){var p=this._marker,S=p._map,j=this._marker.options.autoPanSpeed,U=this._marker.options.autoPanPadding,K=ja(p._icon),le=S.getPixelBounds(),ye=S.getPixelOrigin(),Ce=q(le.min._subtract(ye).add(U),le.max._subtract(ye).subtract(U));if(!Ce.contains(K)){var Pe=k((Math.max(Ce.max.x,K.x)-Ce.max.x)/(le.max.x-Ce.max.x)-(Math.min(Ce.min.x,K.x)-Ce.min.x)/(le.min.x-Ce.min.x),(Math.max(Ce.max.y,K.y)-Ce.max.y)/(le.max.y-Ce.max.y)-(Math.min(Ce.min.y,K.y)-Ce.min.y)/(le.min.y-Ce.min.y)).multiplyBy(j);S.panBy(Pe,{animate:!1}),this._draggable._newPos._add(Pe),this._draggable._startPos._add(Pe),Yt(p._icon,this._draggable._newPos),this._onDrag(u),this._panRequest=J(this._adjustPan.bind(this,u))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(u){this._marker.options.autoPan&&(oe(this._panRequest),this._panRequest=J(this._adjustPan.bind(this,u)))},_onDrag:function(u){var p=this._marker,S=p._shadow,j=ja(p._icon),U=p._map.layerPointToLatLng(j);S&&Yt(S,j),p._latlng=U,u.latlng=U,u.oldLatLng=this._oldLatLng,p.fire("move",u).fire("drag",u)},_onDragEnd:function(u){oe(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",u)}}),Yl=ui.extend({options:{icon:new ql,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(u,p){C(this,p),this._latlng=de(u)},onAdd:function(u){this._zoomAnimated=this._zoomAnimated&&u.options.markerZoomAnimation,this._zoomAnimated&&u.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(u){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&u.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(u){var p=this._latlng;return this._latlng=de(u),this.update(),this.fire("move",{oldLatLng:p,latlng:this._latlng})},setZIndexOffset:function(u){return this.options.zIndexOffset=u,this.update()},getIcon:function(){return this.options.icon},setIcon:function(u){return this.options.icon=u,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 u=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(u)}return this},_initIcon:function(){var u=this.options,p="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),S=u.icon.createIcon(this._icon),j=!1;S!==this._icon&&(this._icon&&this._removeIcon(),j=!0,u.title&&(S.title=u.title),S.tagName==="IMG"&&(S.alt=u.alt||"")),ot(S,p),u.keyboard&&(S.tabIndex="0",S.setAttribute("role","button")),this._icon=S,u.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&tt(S,"focus",this._panOnFocus,this);var U=u.icon.createShadow(this._shadow),K=!1;U!==this._shadow&&(this._removeShadow(),K=!0),U&&(ot(U,p),U.alt=""),this._shadow=U,u.opacity<1&&this._updateOpacity(),j&&this.getPane().appendChild(this._icon),this._initInteraction(),U&&K&&this.getPane(u.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&kt(this._icon,"focus",this._panOnFocus,this),Ft(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&Ft(this._shadow),this._shadow=null},_setPos:function(u){this._icon&&Yt(this._icon,u),this._shadow&&Yt(this._shadow,u),this._zIndex=u.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(u){this._icon&&(this._icon.style.zIndex=this._zIndex+u)},_animateZoom:function(u){var p=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center).round();this._setPos(p)},_initInteraction:function(){if(this.options.interactive&&(ot(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Gl)){var u=this.options.draggable;this.dragging&&(u=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Gl(this),u&&this.dragging.enable()}},setOpacity:function(u){return this.options.opacity=u,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var u=this.options.opacity;this._icon&&en(this._icon,u),this._shadow&&en(this._shadow,u)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var u=this._map;if(u){var p=this.options.icon.options,S=p.iconSize?k(p.iconSize):k(0,0),j=p.iconAnchor?k(p.iconAnchor):k(0,0);u.panInside(this._latlng,{paddingTopLeft:j,paddingBottomRight:S.subtract(j)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function cp(u,p){return new Yl(u,p)}var zi=ui.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(u){this._renderer=u.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(u){return C(this,u),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&u&&Object.prototype.hasOwnProperty.call(u,"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)}}),bs=zi.extend({options:{fill:!0,radius:10},initialize:function(u,p){C(this,p),this._latlng=de(u),this._radius=this.options.radius},setLatLng:function(u){var p=this._latlng;return this._latlng=de(u),this.redraw(),this.fire("move",{oldLatLng:p,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(u){return this.options.radius=this._radius=u,this.redraw()},getRadius:function(){return this._radius},setStyle:function(u){var p=u&&u.radius||this._radius;return zi.prototype.setStyle.call(this,u),this.setRadius(p),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var u=this._radius,p=this._radiusY||u,S=this._clickTolerance(),j=[u+S,p+S];this._pxBounds=new M(this._point.subtract(j),this._point.add(j))},_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(u){return u.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function fp(u,p){return new bs(u,p)}var fc=bs.extend({initialize:function(u,p,S){if(typeof p=="number"&&(p=i({},S,{radius:p})),C(this,p),this._latlng=de(u),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(u){return this._mRadius=u,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var u=[this._radius,this._radiusY||this._radius];return new ee(this._map.layerPointToLatLng(this._point.subtract(u)),this._map.layerPointToLatLng(this._point.add(u)))},setStyle:zi.prototype.setStyle,_project:function(){var u=this._latlng.lng,p=this._latlng.lat,S=this._map,j=S.options.crs;if(j.distance===D.distance){var U=Math.PI/180,K=this._mRadius/D.R/U,le=S.project([p+K,u]),ye=S.project([p-K,u]),Ce=le.add(ye).divideBy(2),Pe=S.unproject(Ce).lat,Be=Math.acos((Math.cos(K*U)-Math.sin(p*U)*Math.sin(Pe*U))/(Math.cos(p*U)*Math.cos(Pe*U)))/U;(isNaN(Be)||Be===0)&&(Be=K/Math.cos(Math.PI/180*p)),this._point=Ce.subtract(S.getPixelOrigin()),this._radius=isNaN(Be)?0:Ce.x-S.project([Pe,u-Be]).x,this._radiusY=Ce.y-le.y}else{var Ye=j.unproject(j.project(this._latlng).subtract([this._mRadius,0]));this._point=S.latLngToLayerPoint(this._latlng),this._radius=this._point.x-S.latLngToLayerPoint(Ye).x}this._updateBounds()}});function dp(u,p,S){return new fc(u,p,S)}var aa=zi.extend({options:{smoothFactor:1,noClip:!1},initialize:function(u,p){C(this,p),this._setLatLngs(u)},getLatLngs:function(){return this._latlngs},setLatLngs:function(u){return this._setLatLngs(u),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(u){for(var p=1/0,S=null,j=Vl,U,K,le=0,ye=this._parts.length;le<ye;le++)for(var Ce=this._parts[le],Pe=1,Be=Ce.length;Pe<Be;Pe++){U=Ce[Pe-1],K=Ce[Pe];var Ye=j(u,U,K,!0);Ye<p&&(p=Ye,S=j(u,U,K))}return S&&(S.distance=Math.sqrt(p)),S},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return gs(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(u,p){return p=p||this._defaultShape(),u=de(u),p.push(u),this._bounds.extend(u),this.redraw()},_setLatLngs:function(u){this._bounds=new ee,this._latlngs=this._convertLatLngs(u)},_defaultShape:function(){return Gr(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(u){for(var p=[],S=Gr(u),j=0,U=u.length;j<U;j++)S?(p[j]=de(u[j]),this._bounds.extend(p[j])):p[j]=this._convertLatLngs(u[j]);return p},_project:function(){var u=new M;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,u),this._bounds.isValid()&&u.isValid()&&(this._rawPxBounds=u,this._updateBounds())},_updateBounds:function(){var u=this._clickTolerance(),p=new z(u,u);this._rawPxBounds&&(this._pxBounds=new M([this._rawPxBounds.min.subtract(p),this._rawPxBounds.max.add(p)]))},_projectLatlngs:function(u,p,S){var j=u[0]instanceof me,U=u.length,K,le;if(j){for(le=[],K=0;K<U;K++)le[K]=this._map.latLngToLayerPoint(u[K]),S.extend(le[K]);p.push(le)}else for(K=0;K<U;K++)this._projectLatlngs(u[K],p,S)},_clipPoints:function(){var u=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(u))){if(this.options.noClip){this._parts=this._rings;return}var p=this._parts,S,j,U,K,le,ye,Ce;for(S=0,U=0,K=this._rings.length;S<K;S++)for(Ce=this._rings[S],j=0,le=Ce.length;j<le-1;j++)ye=op(Ce[j],Ce[j+1],u,j,!0),ye&&(p[U]=p[U]||[],p[U].push(ye[0]),(ye[1]!==Ce[j+1]||j===le-2)&&(p[U].push(ye[1]),U++))}},_simplifyPoints:function(){for(var u=this._parts,p=this.options.smoothFactor,S=0,j=u.length;S<j;S++)u[S]=np(u[S],p)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(u,p){var S,j,U,K,le,ye,Ce=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(u))return!1;for(S=0,K=this._parts.length;S<K;S++)for(ye=this._parts[S],j=0,le=ye.length,U=le-1;j<le;U=j++)if(!(!p&&j===0)&&rp(u,ye[U],ye[j])<=Ce)return!0;return!1}});function E1(u,p){return new aa(u,p)}aa._flat=lc;var xs=aa.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 tp(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(u){var p=aa.prototype._convertLatLngs.call(this,u),S=p.length;return S>=2&&p[0]instanceof me&&p[0].equals(p[S-1])&&p.pop(),p},_setLatLngs:function(u){aa.prototype._setLatLngs.call(this,u),Gr(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Gr(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var u=this._renderer._bounds,p=this.options.weight,S=new z(p,p);if(u=new M(u.min.subtract(S),u.max.add(S)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(u))){if(this.options.noClip){this._parts=this._rings;return}for(var j=0,U=this._rings.length,K;j<U;j++)K=ep(this._rings[j],u,!0),K.length&&this._parts.push(K)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(u){var p=!1,S,j,U,K,le,ye,Ce,Pe;if(!this._pxBounds||!this._pxBounds.contains(u))return!1;for(K=0,Ce=this._parts.length;K<Ce;K++)for(S=this._parts[K],le=0,Pe=S.length,ye=Pe-1;le<Pe;ye=le++)j=S[le],U=S[ye],j.y>u.y!=U.y>u.y&&u.x<(U.x-j.x)*(u.y-j.y)/(U.y-j.y)+j.x&&(p=!p);return p||aa.prototype._containsPoint.call(this,u,!0)}});function A1(u,p){return new xs(u,p)}var oa=ki.extend({initialize:function(u,p){C(this,p),this._layers={},u&&this.addData(u)},addData:function(u){var p=N(u)?u:u.features,S,j,U;if(p){for(S=0,j=p.length;S<j;S++)U=p[S],(U.geometries||U.geometry||U.features||U.coordinates)&&this.addData(U);return this}var K=this.options;if(K.filter&&!K.filter(u))return this;var le=ar(u,K);return le?(le.feature=mc(u),le.defaultOptions=le.options,this.resetStyle(le),K.onEachFeature&&K.onEachFeature(u,le),this.addLayer(le)):this},resetStyle:function(u){return u===void 0?this.eachLayer(this.resetStyle,this):(u.options=i({},u.defaultOptions),this._setLayerStyle(u,this.options.style),this)},setStyle:function(u){return this.eachLayer(function(p){this._setLayerStyle(p,u)},this)},_setLayerStyle:function(u,p){u.setStyle&&(typeof p=="function"&&(p=p(u.feature)),u.setStyle(p))}});function ar(u,p){var S=u.type==="Feature"?u.geometry:u,j=S?S.coordinates:null,U=[],K=p&&p.pointToLayer,le=p&&p.coordsToLatLng||dc,ye,Ce,Pe,Be;if(!j&&!S)return null;switch(S.type){case"Point":return ye=le(j),_s(K,u,ye,p);case"MultiPoint":for(Pe=0,Be=j.length;Pe<Be;Pe++)ye=le(j[Pe]),U.push(_s(K,u,ye,p));return new ki(U);case"LineString":case"MultiLineString":return Ce=Wl(j,S.type==="LineString"?0:1,le),new aa(Ce,p);case"Polygon":case"MultiPolygon":return Ce=Wl(j,S.type==="Polygon"?1:2,le),new xs(Ce,p);case"GeometryCollection":for(Pe=0,Be=S.geometries.length;Pe<Be;Pe++){var Ye=ar({geometry:S.geometries[Pe],type:"Feature",properties:u.properties},p);Ye&&U.push(Ye)}return new ki(U);case"FeatureCollection":for(Pe=0,Be=S.features.length;Pe<Be;Pe++){var ct=ar(S.features[Pe],p);ct&&U.push(ct)}return new ki(U);default:throw new Error("Invalid GeoJSON object.")}}function _s(u,p,S,j){return u?u(p,S):new Yl(S,j&&j.markersInheritOptions&&j)}function dc(u){return new me(u[1],u[0],u[2])}function Wl(u,p,S){for(var j=[],U=0,K=u.length,le;U<K;U++)le=p?Wl(u[U],p-1,S):(S||dc)(u[U]),j.push(le);return j}function hc(u,p){return u=de(u),u.alt!==void 0?[x(u.lng,p),x(u.lat,p),x(u.alt,p)]:[x(u.lng,p),x(u.lat,p)]}function Kl(u,p,S,j){for(var U=[],K=0,le=u.length;K<le;K++)U.push(p?Kl(u[K],Gr(u[K])?0:p-1,S,j):hc(u[K],j));return!p&&S&&U.length>0&&U.push(U[0].slice()),U}function Na(u,p){return u.feature?i({},u.feature,{geometry:p}):mc(p)}function mc(u){return u.type==="Feature"||u.type==="FeatureCollection"?u:{type:"Feature",properties:{},geometry:u}}var La={toGeoJSON:function(u){return Na(this,{type:"Point",coordinates:hc(this.getLatLng(),u)})}};Yl.include(La),fc.include(La),bs.include(La),aa.include({toGeoJSON:function(u){var p=!Gr(this._latlngs),S=Kl(this._latlngs,p?1:0,!1,u);return Na(this,{type:(p?"Multi":"")+"LineString",coordinates:S})}}),xs.include({toGeoJSON:function(u){var p=!Gr(this._latlngs),S=p&&!Gr(this._latlngs[0]),j=Kl(this._latlngs,S?2:p?1:0,!0,u);return p||(j=[j]),Na(this,{type:(S?"Multi":"")+"Polygon",coordinates:j})}}),ys.include({toMultiPoint:function(u){var p=[];return this.eachLayer(function(S){p.push(S.toGeoJSON(u).geometry.coordinates)}),Na(this,{type:"MultiPoint",coordinates:p})},toGeoJSON:function(u){var p=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(p==="MultiPoint")return this.toMultiPoint(u);var S=p==="GeometryCollection",j=[];return this.eachLayer(function(U){if(U.toGeoJSON){var K=U.toGeoJSON(u);if(S)j.push(K.geometry);else{var le=mc(K);le.type==="FeatureCollection"?j.push.apply(j,le.features):j.push(le)}}}),S?Na(this,{geometries:j,type:"GeometryCollection"}):{type:"FeatureCollection",features:j}}});function pc(u,p){return new oa(u,p)}var Zl=pc,ws=ui.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(u,p,S){this._url=u,this._bounds=se(p),C(this,S)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ot(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Ft(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(u){return this.options.opacity=u,this._image&&this._updateOpacity(),this},setStyle:function(u){return u.opacity&&this.setOpacity(u.opacity),this},bringToFront:function(){return this._map&&Gn(this._image),this},bringToBack:function(){return this._map&&lo(this._image),this},setUrl:function(u){return this._url=u,this._image&&(this._image.src=u),this},setBounds:function(u){return this._bounds=se(u),this._map&&this._reset(),this},getEvents:function(){var u={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var u=this._url.tagName==="IMG",p=this._image=u?this._url:pt("img");if(ot(p,"leaflet-image-layer"),this._zoomAnimated&&ot(p,"leaflet-zoom-animated"),this.options.className&&ot(p,this.options.className),p.onselectstart=y,p.onmousemove=y,p.onload=l(this.fire,this,"load"),p.onerror=l(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(p.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),u){this._url=p.src;return}p.src=this._url,p.alt=this.options.alt},_animateZoom:function(u){var p=this._map.getZoomScale(u.zoom),S=this._map._latLngBoundsToNewLayerBounds(this._bounds,u.zoom,u.center).min;na(this._image,S,p)},_reset:function(){var u=this._image,p=new M(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),S=p.getSize();Yt(u,p.min),u.style.width=S.x+"px",u.style.height=S.y+"px"},_updateOpacity:function(){en(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var u=this.options.errorOverlayUrl;u&&this._url!==u&&(this._url=u,this._image.src=u)},getCenter:function(){return this._bounds.getCenter()}}),hp=function(u,p,S){return new ws(u,p,S)},Ra=ws.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var u=this._url.tagName==="VIDEO",p=this._image=u?this._url:pt("video");if(ot(p,"leaflet-image-layer"),this._zoomAnimated&&ot(p,"leaflet-zoom-animated"),this.options.className&&ot(p,this.options.className),p.onselectstart=y,p.onmousemove=y,p.onloadeddata=l(this.fire,this,"load"),u){for(var S=p.getElementsByTagName("source"),j=[],U=0;U<S.length;U++)j.push(S[U].src);this._url=S.length>0?j:[p.src];return}N(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(p.style,"objectFit")&&(p.style.objectFit="fill"),p.autoplay=!!this.options.autoplay,p.loop=!!this.options.loop,p.muted=!!this.options.muted,p.playsInline=!!this.options.playsInline;for(var K=0;K<this._url.length;K++){var le=pt("source");le.src=this._url[K],p.appendChild(le)}}});function Ss(u,p,S){return new Ra(u,p,S)}var gc=ws.extend({_initImage:function(){var u=this._image=this._url;ot(u,"leaflet-image-layer"),this._zoomAnimated&&ot(u,"leaflet-zoom-animated"),this.options.className&&ot(u,this.options.className),u.onselectstart=y,u.onmousemove=y}});function mp(u,p,S){return new gc(u,p,S)}var or=ui.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(u,p){u&&(u instanceof me||N(u))?(this._latlng=de(u),C(this,p)):(C(this,u),this._source=p),this.options.content&&(this._content=this.options.content)},openOn:function(u){return u=arguments.length?u:this._source._map,u.hasLayer(this)||u.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(u){return this._map?this.close():(arguments.length?this._source=u:u=this._source,this._prepareOpen(),this.openOn(u._map)),this},onAdd:function(u){this._zoomAnimated=u._zoomAnimated,this._container||this._initLayout(),u._fadeAnimated&&en(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),u._fadeAnimated&&en(this._container,1),this.bringToFront(),this.options.interactive&&(ot(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(u){u._fadeAnimated?(en(this._container,0),this._removeTimeout=setTimeout(l(Ft,void 0,this._container),200)):Ft(this._container),this.options.interactive&&(un(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(u){return this._latlng=de(u),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(u){return this._content=u,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 u={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&Gn(this._container),this},bringToBack:function(){return this._map&&lo(this._container),this},_prepareOpen:function(u){var p=this._source;if(!p._map)return!1;if(p instanceof ki){p=null;var S=this._source._layers;for(var j in S)if(S[j]._map){p=S[j];break}if(!p)return!1;this._source=p}if(!u)if(p.getCenter)u=p.getCenter();else if(p.getLatLng)u=p.getLatLng();else if(p.getBounds)u=p.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(u),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var u=this._contentNode,p=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof p=="string")u.innerHTML=p;else{for(;u.hasChildNodes();)u.removeChild(u.firstChild);u.appendChild(p)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var u=this._map.latLngToLayerPoint(this._latlng),p=k(this.options.offset),S=this._getAnchor();this._zoomAnimated?Yt(this._container,u.add(S)):p=p.add(u).add(S);var j=this._containerBottom=-p.y,U=this._containerLeft=-Math.round(this._containerWidth/2)+p.x;this._container.style.bottom=j+"px",this._container.style.left=U+"px"}},_getAnchor:function(){return[0,0]}});_t.include({_initOverlay:function(u,p,S,j){var U=p;return U instanceof u||(U=new u(j).setContent(p)),S&&U.setLatLng(S),U}}),ui.include({_initOverlay:function(u,p,S,j){var U=S;return U instanceof u?(C(U,j),U._source=this):(U=p&&!j?p:new u(j,this),U.setContent(S)),U}});var Xl=or.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(u){return u=arguments.length?u:this._source._map,!u.hasLayer(this)&&u._popup&&u._popup.options.autoClose&&u.removeLayer(u._popup),u._popup=this,or.prototype.openOn.call(this,u)},onAdd:function(u){or.prototype.onAdd.call(this,u),u.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof zi||this._source.on("preclick",li))},onRemove:function(u){or.prototype.onRemove.call(this,u),u.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof zi||this._source.off("preclick",li))},getEvents:function(){var u=or.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(u.preclick=this.close),this.options.keepInView&&(u.moveend=this._adjustPan),u},_initLayout:function(){var u="leaflet-popup",p=this._container=pt("div",u+" "+(this.options.className||"")+" leaflet-zoom-animated"),S=this._wrapper=pt("div",u+"-content-wrapper",p);if(this._contentNode=pt("div",u+"-content",S),co(p),Ri(this._contentNode),tt(p,"contextmenu",li),this._tipContainer=pt("div",u+"-tip-container",p),this._tip=pt("div",u+"-tip",this._tipContainer),this.options.closeButton){var j=this._closeButton=pt("a",u+"-close-button",p);j.setAttribute("role","button"),j.setAttribute("aria-label","Close popup"),j.href="#close",j.innerHTML='<span aria-hidden="true">×</span>',tt(j,"click",function(U){En(U),this.close()},this)}},_updateLayout:function(){var u=this._contentNode,p=u.style;p.width="",p.whiteSpace="nowrap";var S=u.offsetWidth;S=Math.min(S,this.options.maxWidth),S=Math.max(S,this.options.minWidth),p.width=S+1+"px",p.whiteSpace="",p.height="";var j=u.offsetHeight,U=this.options.maxHeight,K="leaflet-popup-scrolled";U&&j>U?(p.height=U+"px",ot(u,K)):un(u,K),this._containerWidth=this._container.offsetWidth},_animateZoom:function(u){var p=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center),S=this._getAnchor();Yt(this._container,p.add(S))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var u=this._map,p=parseInt(Dl(this._container,"marginBottom"),10)||0,S=this._container.offsetHeight+p,j=this._containerWidth,U=new z(this._containerLeft,-S-this._containerBottom);U._add(ja(this._container));var K=u.layerPointToContainerPoint(U),le=k(this.options.autoPanPadding),ye=k(this.options.autoPanPaddingTopLeft||le),Ce=k(this.options.autoPanPaddingBottomRight||le),Pe=u.getSize(),Be=0,Ye=0;K.x+j+Ce.x>Pe.x&&(Be=K.x+j-Pe.x+Ce.x),K.x-Be-ye.x<0&&(Be=K.x-ye.x),K.y+S+Ce.y>Pe.y&&(Ye=K.y+S-Pe.y+Ce.y),K.y-Ye-ye.y<0&&(Ye=K.y-ye.y),(Be||Ye)&&(this.options.keepInView&&(this._autopanning=!0),u.fire("autopanstart").panBy([Be,Ye]))}},_getAnchor:function(){return k(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),pp=function(u,p){return new Xl(u,p)};_t.mergeOptions({closePopupOnClick:!0}),_t.include({openPopup:function(u,p,S){return this._initOverlay(Xl,u,p,S).openOn(this),this},closePopup:function(u){return u=arguments.length?u:this._popup,u&&u.close(),this}}),ui.include({bindPopup:function(u,p){return this._popup=this._initOverlay(Xl,this._popup,u,p),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(u){return this._popup&&(this instanceof ki||(this._popup._source=this),this._popup._prepareOpen(u||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(u){return this._popup&&this._popup.setContent(u),this},getPopup:function(){return this._popup},_openPopup:function(u){if(!(!this._popup||!this._map)){Ma(u);var p=u.layer||u.target;if(this._popup._source===p&&!(p instanceof zi)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(u.latlng);return}this._popup._source=p,this.openPopup(u.latlng)}},_movePopup:function(u){this._popup.setLatLng(u.latlng)},_onKeyPress:function(u){u.originalEvent.keyCode===13&&this._openPopup(u)}});var Ql=or.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(u){or.prototype.onAdd.call(this,u),this.setOpacity(this.options.opacity),u.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(u){or.prototype.onRemove.call(this,u),u.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var u=or.prototype.getEvents.call(this);return this.options.permanent||(u.preclick=this.close),u},_initLayout:function(){var u="leaflet-tooltip",p=u+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=pt("div",p),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+f(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(u){var p,S,j=this._map,U=this._container,K=j.latLngToContainerPoint(j.getCenter()),le=j.layerPointToContainerPoint(u),ye=this.options.direction,Ce=U.offsetWidth,Pe=U.offsetHeight,Be=k(this.options.offset),Ye=this._getAnchor();ye==="top"?(p=Ce/2,S=Pe):ye==="bottom"?(p=Ce/2,S=0):ye==="center"?(p=Ce/2,S=Pe/2):ye==="right"?(p=0,S=Pe/2):ye==="left"?(p=Ce,S=Pe/2):le.x<K.x?(ye="right",p=0,S=Pe/2):(ye="left",p=Ce+(Be.x+Ye.x)*2,S=Pe/2),u=u.subtract(k(p,S,!0)).add(Be).add(Ye),un(U,"leaflet-tooltip-right"),un(U,"leaflet-tooltip-left"),un(U,"leaflet-tooltip-top"),un(U,"leaflet-tooltip-bottom"),ot(U,"leaflet-tooltip-"+ye),Yt(U,u)},_updatePosition:function(){var u=this._map.latLngToLayerPoint(this._latlng);this._setPosition(u)},setOpacity:function(u){this.options.opacity=u,this._container&&en(this._container,u)},_animateZoom:function(u){var p=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center);this._setPosition(p)},_getAnchor:function(){return k(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),O1=function(u,p){return new Ql(u,p)};_t.include({openTooltip:function(u,p,S){return this._initOverlay(Ql,u,p,S).openOn(this),this},closeTooltip:function(u){return u.close(),this}}),ui.include({bindTooltip:function(u,p){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ql,this._tooltip,u,p),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(u){if(!(!u&&this._tooltipHandlersAdded)){var p=u?"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[p](S),this._tooltipHandlersAdded=!u}},openTooltip:function(u){return this._tooltip&&(this instanceof ki||(this._tooltip._source=this),this._tooltip._prepareOpen(u)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(u){return this._tooltip&&this._tooltip.setContent(u),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(u){var p=typeof u.getElement=="function"&&u.getElement();p&&(tt(p,"focus",function(){this._tooltip._source=u,this.openTooltip()},this),tt(p,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(u){var p=typeof u.getElement=="function"&&u.getElement();p&&p.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(u){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var p=this;this._map.once("moveend",function(){p._openOnceFlag=!1,p._openTooltip(u)});return}this._tooltip._source=u.layer||u.target,this.openTooltip(this._tooltip.options.sticky?u.latlng:void 0)}},_moveTooltip:function(u){var p=u.latlng,S,j;this._tooltip.options.sticky&&u.originalEvent&&(S=this._map.mouseEventToContainerPoint(u.originalEvent),j=this._map.containerPointToLayerPoint(S),p=this._map.layerPointToLatLng(j)),this._tooltip.setLatLng(p)}});var gp=Ii.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(u){var p=u&&u.tagName==="DIV"?u:document.createElement("div"),S=this.options;if(S.html instanceof Element?(Hr(p),p.appendChild(S.html)):p.innerHTML=S.html!==!1?S.html:"",S.bgPos){var j=k(S.bgPos);p.style.backgroundPosition=-j.x+"px "+-j.y+"px"}return this._setIconStyles(p,"icon"),p},createShadow:function(){return null}});function T1(u){return new gp(u)}Ii.Default=ql;var Cs=ui.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Ge.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(u){C(this,u)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(u){u._addZoomLimit(this)},onRemove:function(u){this._removeAllTiles(),Ft(this._container),u._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Gn(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(lo(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(u){return this.options.opacity=u,this._updateOpacity(),this},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var u=this._clampZoom(this._map.getZoom());u!==this._tileZoom&&(this._tileZoom=u,this._updateLevels()),this._update()}return this},getEvents:function(){var u={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=h(this._onMoveEnd,this.options.updateInterval,this)),u.move=this._onMove),this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},createTile:function(){return document.createElement("div")},getTileSize:function(){var u=this.options.tileSize;return u instanceof z?u:new z(u,u)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(u){for(var p=this.getPane().children,S=-u(-1/0,1/0),j=0,U=p.length,K;j<U;j++)K=p[j].style.zIndex,p[j]!==this._container&&K&&(S=u(S,+K));isFinite(S)&&(this.options.zIndex=S+u(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Ge.ielt9){en(this._container,this.options.opacity);var u=+new Date,p=!1,S=!1;for(var j in this._tiles){var U=this._tiles[j];if(!(!U.current||!U.loaded)){var K=Math.min(1,(u-U.loaded)/200);en(U.el,K),K<1?p=!0:(U.active?S=!0:this._onOpaqueTile(U),U.active=!0)}}S&&!this._noPrune&&this._pruneTiles(),p&&(oe(this._fadeFrame),this._fadeFrame=J(this._updateOpacity,this))}},_onOpaqueTile:y,_initContainer:function(){this._container||(this._container=pt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var u=this._tileZoom,p=this.options.maxZoom;if(u!==void 0){for(var S in this._levels)S=Number(S),this._levels[S].el.children.length||S===u?(this._levels[S].el.style.zIndex=p-Math.abs(u-S),this._onUpdateLevel(S)):(Ft(this._levels[S].el),this._removeTilesAtZoom(S),this._onRemoveLevel(S),delete this._levels[S]);var j=this._levels[u],U=this._map;return j||(j=this._levels[u]={},j.el=pt("div","leaflet-tile-container leaflet-zoom-animated",this._container),j.el.style.zIndex=p,j.origin=U.project(U.unproject(U.getPixelOrigin()),u).round(),j.zoom=u,this._setZoomTransform(j,U.getCenter(),U.getZoom()),y(j.el.offsetWidth),this._onCreateLevel(j)),this._level=j,j}},_onUpdateLevel:y,_onRemoveLevel:y,_onCreateLevel:y,_pruneTiles:function(){if(this._map){var u,p,S=this._map.getZoom();if(S>this.options.maxZoom||S<this.options.minZoom){this._removeAllTiles();return}for(u in this._tiles)p=this._tiles[u],p.retain=p.current;for(u in this._tiles)if(p=this._tiles[u],p.current&&!p.active){var j=p.coords;this._retainParent(j.x,j.y,j.z,j.z-5)||this._retainChildren(j.x,j.y,j.z,j.z+2)}for(u in this._tiles)this._tiles[u].retain||this._removeTile(u)}},_removeTilesAtZoom:function(u){for(var p in this._tiles)this._tiles[p].coords.z===u&&this._removeTile(p)},_removeAllTiles:function(){for(var u in this._tiles)this._removeTile(u)},_invalidateAll:function(){for(var u in this._levels)Ft(this._levels[u].el),this._onRemoveLevel(Number(u)),delete this._levels[u];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(u,p,S,j){var U=Math.floor(u/2),K=Math.floor(p/2),le=S-1,ye=new z(+U,+K);ye.z=+le;var Ce=this._tileCoordsToKey(ye),Pe=this._tiles[Ce];return Pe&&Pe.active?(Pe.retain=!0,!0):(Pe&&Pe.loaded&&(Pe.retain=!0),le>j?this._retainParent(U,K,le,j):!1)},_retainChildren:function(u,p,S,j){for(var U=2*u;U<2*u+2;U++)for(var K=2*p;K<2*p+2;K++){var le=new z(U,K);le.z=S+1;var ye=this._tileCoordsToKey(le),Ce=this._tiles[ye];if(Ce&&Ce.active){Ce.retain=!0;continue}else Ce&&Ce.loaded&&(Ce.retain=!0);S+1<j&&this._retainChildren(U,K,S+1,j)}},_resetView:function(u){var p=u&&(u.pinch||u.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),p,p)},_animateZoom:function(u){this._setView(u.center,u.zoom,!0,u.noUpdate)},_clampZoom:function(u){var p=this.options;return p.minNativeZoom!==void 0&&u<p.minNativeZoom?p.minNativeZoom:p.maxNativeZoom!==void 0&&p.maxNativeZoom<u?p.maxNativeZoom:u},_setView:function(u,p,S,j){var U=Math.round(p);this.options.maxZoom!==void 0&&U>this.options.maxZoom||this.options.minZoom!==void 0&&U<this.options.minZoom?U=void 0:U=this._clampZoom(U);var K=this.options.updateWhenZooming&&U!==this._tileZoom;(!j||K)&&(this._tileZoom=U,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),U!==void 0&&this._update(u),S||this._pruneTiles(),this._noPrune=!!S),this._setZoomTransforms(u,p)},_setZoomTransforms:function(u,p){for(var S in this._levels)this._setZoomTransform(this._levels[S],u,p)},_setZoomTransform:function(u,p,S){var j=this._map.getZoomScale(S,u.zoom),U=u.origin.multiplyBy(j).subtract(this._map._getNewPixelOrigin(p,S)).round();Ge.any3d?na(u.el,U,j):Yt(u.el,U)},_resetGrid:function(){var u=this._map,p=u.options.crs,S=this._tileSize=this.getTileSize(),j=this._tileZoom,U=this._map.getPixelWorldBounds(this._tileZoom);U&&(this._globalTileRange=this._pxBoundsToTileRange(U)),this._wrapX=p.wrapLng&&!this.options.noWrap&&[Math.floor(u.project([0,p.wrapLng[0]],j).x/S.x),Math.ceil(u.project([0,p.wrapLng[1]],j).x/S.y)],this._wrapY=p.wrapLat&&!this.options.noWrap&&[Math.floor(u.project([p.wrapLat[0],0],j).y/S.x),Math.ceil(u.project([p.wrapLat[1],0],j).y/S.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(u){var p=this._map,S=p._animatingZoom?Math.max(p._animateToZoom,p.getZoom()):p.getZoom(),j=p.getZoomScale(S,this._tileZoom),U=p.project(u,this._tileZoom).floor(),K=p.getSize().divideBy(j*2);return new M(U.subtract(K),U.add(K))},_update:function(u){var p=this._map;if(p){var S=this._clampZoom(p.getZoom());if(u===void 0&&(u=p.getCenter()),this._tileZoom!==void 0){var j=this._getTiledPixelBounds(u),U=this._pxBoundsToTileRange(j),K=U.getCenter(),le=[],ye=this.options.keepBuffer,Ce=new M(U.getBottomLeft().subtract([ye,-ye]),U.getTopRight().add([ye,-ye]));if(!(isFinite(U.min.x)&&isFinite(U.min.y)&&isFinite(U.max.x)&&isFinite(U.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var Pe in this._tiles){var Be=this._tiles[Pe].coords;(Be.z!==this._tileZoom||!Ce.contains(new z(Be.x,Be.y)))&&(this._tiles[Pe].current=!1)}if(Math.abs(S-this._tileZoom)>1){this._setView(u,S);return}for(var Ye=U.min.y;Ye<=U.max.y;Ye++)for(var ct=U.min.x;ct<=U.max.x;ct++){var Yn=new z(ct,Ye);if(Yn.z=this._tileZoom,!!this._isValidTile(Yn)){var An=this._tiles[this._tileCoordsToKey(Yn)];An?An.current=!0:le.push(Yn)}}if(le.sort(function(Tt,jt){return Tt.distanceTo(K)-jt.distanceTo(K)}),le.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Rr=document.createDocumentFragment();for(ct=0;ct<le.length;ct++)this._addTile(le[ct],Rr);this._level.el.appendChild(Rr)}}}},_isValidTile:function(u){var p=this._map.options.crs;if(!p.infinite){var S=this._globalTileRange;if(!p.wrapLng&&(u.x<S.min.x||u.x>S.max.x)||!p.wrapLat&&(u.y<S.min.y||u.y>S.max.y))return!1}if(!this.options.bounds)return!0;var j=this._tileCoordsToBounds(u);return se(this.options.bounds).overlaps(j)},_keyToBounds:function(u){return this._tileCoordsToBounds(this._keyToTileCoords(u))},_tileCoordsToNwSe:function(u){var p=this._map,S=this.getTileSize(),j=u.scaleBy(S),U=j.add(S),K=p.unproject(j,u.z),le=p.unproject(U,u.z);return[K,le]},_tileCoordsToBounds:function(u){var p=this._tileCoordsToNwSe(u),S=new ee(p[0],p[1]);return this.options.noWrap||(S=this._map.wrapLatLngBounds(S)),S},_tileCoordsToKey:function(u){return u.x+":"+u.y+":"+u.z},_keyToTileCoords:function(u){var p=u.split(":"),S=new z(+p[0],+p[1]);return S.z=+p[2],S},_removeTile:function(u){var p=this._tiles[u];p&&(Ft(p.el),delete this._tiles[u],this.fire("tileunload",{tile:p.el,coords:this._keyToTileCoords(u)}))},_initTile:function(u){ot(u,"leaflet-tile");var p=this.getTileSize();u.style.width=p.x+"px",u.style.height=p.y+"px",u.onselectstart=y,u.onmousemove=y,Ge.ielt9&&this.options.opacity<1&&en(u,this.options.opacity)},_addTile:function(u,p){var S=this._getTilePos(u),j=this._tileCoordsToKey(u),U=this.createTile(this._wrapCoords(u),l(this._tileReady,this,u));this._initTile(U),this.createTile.length<2&&J(l(this._tileReady,this,u,null,U)),Yt(U,S),this._tiles[j]={el:U,coords:u,current:!0},p.appendChild(U),this.fire("tileloadstart",{tile:U,coords:u})},_tileReady:function(u,p,S){p&&this.fire("tileerror",{error:p,tile:S,coords:u});var j=this._tileCoordsToKey(u);S=this._tiles[j],S&&(S.loaded=+new Date,this._map._fadeAnimated?(en(S.el,0),oe(this._fadeFrame),this._fadeFrame=J(this._updateOpacity,this)):(S.active=!0,this._pruneTiles()),p||(ot(S.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:S.el,coords:u})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ge.ielt9||!this._map._fadeAnimated?J(this._pruneTiles,this):setTimeout(l(this._pruneTiles,this),250)))},_getTilePos:function(u){return u.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(u){var p=new z(this._wrapX?m(u.x,this._wrapX):u.x,this._wrapY?m(u.y,this._wrapY):u.y);return p.z=u.z,p},_pxBoundsToTileRange:function(u){var p=this.getTileSize();return new M(u.min.unscaleBy(p).floor(),u.max.unscaleBy(p).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var u in this._tiles)if(!this._tiles[u].loaded)return!1;return!0}});function vp(u){return new Cs(u)}var Da=Cs.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(u,p){this._url=u,p=C(this,p),p.detectRetina&&Ge.retina&&p.maxZoom>0?(p.tileSize=Math.floor(p.tileSize/2),p.zoomReverse?(p.zoomOffset--,p.minZoom=Math.min(p.maxZoom,p.minZoom+1)):(p.zoomOffset++,p.maxZoom=Math.max(p.minZoom,p.maxZoom-1)),p.minZoom=Math.max(0,p.minZoom)):p.zoomReverse?p.minZoom=Math.min(p.maxZoom,p.minZoom):p.maxZoom=Math.max(p.minZoom,p.maxZoom),typeof p.subdomains=="string"&&(p.subdomains=p.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(u,p){return this._url===u&&p===void 0&&(p=!0),this._url=u,p||this.redraw(),this},createTile:function(u,p){var S=document.createElement("img");return tt(S,"load",l(this._tileOnLoad,this,p,S)),tt(S,"error",l(this._tileOnError,this,p,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(u),S},getTileUrl:function(u){var p={r:Ge.retina?"@2x":"",s:this._getSubdomain(u),x:u.x,y:u.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var S=this._globalTileRange.max.y-u.y;this.options.tms&&(p.y=S),p["-y"]=S}return P(this._url,i(p,this.options))},_tileOnLoad:function(u,p){Ge.ielt9?setTimeout(l(u,this,null,p),0):u(null,p)},_tileOnError:function(u,p,S){var j=this.options.errorTileUrl;j&&p.getAttribute("src")!==j&&(p.src=j),u(S,p)},_onTileRemove:function(u){u.tile.onload=null},_getZoomForUrl:function(){var u=this._tileZoom,p=this.options.maxZoom,S=this.options.zoomReverse,j=this.options.zoomOffset;return S&&(u=p-u),u+j},_getSubdomain:function(u){var p=Math.abs(u.x+u.y)%this.options.subdomains.length;return this.options.subdomains[p]},_abortLoading:function(){var u,p;for(u in this._tiles)if(this._tiles[u].coords.z!==this._tileZoom&&(p=this._tiles[u].el,p.onload=y,p.onerror=y,!p.complete)){p.src=B;var S=this._tiles[u].coords;Ft(p),delete this._tiles[u],this.fire("tileabort",{tile:p,coords:S})}},_removeTile:function(u){var p=this._tiles[u];if(p)return p.el.setAttribute("src",B),Cs.prototype._removeTile.call(this,u)},_tileReady:function(u,p,S){if(!(!this._map||S&&S.getAttribute("src")===B))return Cs.prototype._tileReady.call(this,u,p,S)}});function Yr(u,p){return new Da(u,p)}var Jl=Da.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(u,p){this._url=u;var S=i({},this.defaultWmsParams);for(var j in p)j in this.options||(S[j]=p[j]);p=C(this,p);var U=p.detectRetina&&Ge.retina?2:1,K=this.getTileSize();S.width=K.x*U,S.height=K.y*U,this.wmsParams=S},onAdd:function(u){this._crs=this.options.crs||u.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var p=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[p]=this._crs.code,Da.prototype.onAdd.call(this,u)},getTileUrl:function(u){var p=this._tileCoordsToNwSe(u),S=this._crs,j=q(S.project(p[0]),S.project(p[1])),U=j.min,K=j.max,le=(this._wmsVersion>=1.3&&this._crs===hd?[U.y,U.x,K.y,K.x]:[U.x,U.y,K.x,K.y]).join(","),ye=Da.prototype.getTileUrl.call(this,u);return ye+O(this.wmsParams,ye,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+le},setParams:function(u,p){return i(this.wmsParams,u),p||this.redraw(),this}});function Wr(u,p){return new Jl(u,p)}Da.WMS=Jl,Yr.wms=Wr;var Sr=ui.extend({options:{padding:.1},initialize:function(u){C(this,u),f(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),ot(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var u={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(u.zoomanim=this._onAnimZoom),u},_onAnimZoom:function(u){this._updateTransform(u.center,u.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(u,p){var S=this._map.getZoomScale(p,this._zoom),j=this._map.getSize().multiplyBy(.5+this.options.padding),U=this._map.project(this._center,p),K=j.multiplyBy(-S).add(U).subtract(this._map._getNewPixelOrigin(u,p));Ge.any3d?na(this._container,K,S):Yt(this._container,K)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var u in this._layers)this._layers[u]._reset()},_onZoomEnd:function(){for(var u in this._layers)this._layers[u]._project()},_updatePaths:function(){for(var u in this._layers)this._layers[u]._update()},_update:function(){var u=this.options.padding,p=this._map.getSize(),S=this._map.containerPointToLayerPoint(p.multiplyBy(-u)).round();this._bounds=new M(S,S.add(p.multiplyBy(1+u*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),vc=Sr.extend({options:{tolerance:0},getEvents:function(){var u=Sr.prototype.getEvents.call(this);return u.viewprereset=this._onViewPreReset,u},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Sr.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var u=this._container=document.createElement("canvas");tt(u,"mousemove",this._onMouseMove,this),tt(u,"click dblclick mousedown mouseup contextmenu",this._onClick,this),tt(u,"mouseout",this._handleMouseOut,this),u._leaflet_disable_events=!0,this._ctx=u.getContext("2d")},_destroyContainer:function(){oe(this._redrawRequest),delete this._ctx,Ft(this._container),kt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var u;this._redrawBounds=null;for(var p in this._layers)u=this._layers[p],u._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Sr.prototype._update.call(this);var u=this._bounds,p=this._container,S=u.getSize(),j=Ge.retina?2:1;Yt(p,u.min),p.width=j*S.x,p.height=j*S.y,p.style.width=S.x+"px",p.style.height=S.y+"px",Ge.retina&&this._ctx.scale(2,2),this._ctx.translate(-u.min.x,-u.min.y),this.fire("update")}},_reset:function(){Sr.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(u){this._updateDashArray(u),this._layers[f(u)]=u;var p=u._order={layer:u,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=p),this._drawLast=p,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(u){this._requestRedraw(u)},_removePath:function(u){var p=u._order,S=p.next,j=p.prev;S?S.prev=j:this._drawLast=j,j?j.next=S:this._drawFirst=S,delete u._order,delete this._layers[f(u)],this._requestRedraw(u)},_updatePath:function(u){this._extendRedrawBounds(u),u._project(),u._update(),this._requestRedraw(u)},_updateStyle:function(u){this._updateDashArray(u),this._requestRedraw(u)},_updateDashArray:function(u){if(typeof u.options.dashArray=="string"){var p=u.options.dashArray.split(/[, ]+/),S=[],j,U;for(U=0;U<p.length;U++){if(j=Number(p[U]),isNaN(j))return;S.push(j)}u.options._dashArray=S}else u.options._dashArray=u.options.dashArray},_requestRedraw:function(u){this._map&&(this._extendRedrawBounds(u),this._redrawRequest=this._redrawRequest||J(this._redraw,this))},_extendRedrawBounds:function(u){if(u._pxBounds){var p=(u.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new M,this._redrawBounds.extend(u._pxBounds.min.subtract([p,p])),this._redrawBounds.extend(u._pxBounds.max.add([p,p]))}},_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 u=this._redrawBounds;if(u){var p=u.getSize();this._ctx.clearRect(u.min.x,u.min.y,p.x,p.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 u,p=this._redrawBounds;if(this._ctx.save(),p){var S=p.getSize();this._ctx.beginPath(),this._ctx.rect(p.min.x,p.min.y,S.x,S.y),this._ctx.clip()}this._drawing=!0;for(var j=this._drawFirst;j;j=j.next)u=j.layer,(!p||u._pxBounds&&u._pxBounds.intersects(p))&&u._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(u,p){if(this._drawing){var S,j,U,K,le=u._parts,ye=le.length,Ce=this._ctx;if(ye){for(Ce.beginPath(),S=0;S<ye;S++){for(j=0,U=le[S].length;j<U;j++)K=le[S][j],Ce[j?"lineTo":"moveTo"](K.x,K.y);p&&Ce.closePath()}this._fillStroke(Ce,u)}}},_updateCircle:function(u){if(!(!this._drawing||u._empty())){var p=u._point,S=this._ctx,j=Math.max(Math.round(u._radius),1),U=(Math.max(Math.round(u._radiusY),1)||j)/j;U!==1&&(S.save(),S.scale(1,U)),S.beginPath(),S.arc(p.x,p.y/U,j,0,Math.PI*2,!1),U!==1&&S.restore(),this._fillStroke(S,u)}},_fillStroke:function(u,p){var S=p.options;S.fill&&(u.globalAlpha=S.fillOpacity,u.fillStyle=S.fillColor||S.color,u.fill(S.fillRule||"evenodd")),S.stroke&&S.weight!==0&&(u.setLineDash&&u.setLineDash(p.options&&p.options._dashArray||[]),u.globalAlpha=S.opacity,u.lineWidth=S.weight,u.strokeStyle=S.color,u.lineCap=S.lineCap,u.lineJoin=S.lineJoin,u.stroke())},_onClick:function(u){for(var p=this._map.mouseEventToLayerPoint(u),S,j,U=this._drawFirst;U;U=U.next)S=U.layer,S.options.interactive&&S._containsPoint(p)&&(!(u.type==="click"||u.type==="preclick")||!this._map._draggableMoved(S))&&(j=S);this._fireEvent(j?[j]:!1,u)},_onMouseMove:function(u){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var p=this._map.mouseEventToLayerPoint(u);this._handleMouseHover(u,p)}},_handleMouseOut:function(u){var p=this._hoveredLayer;p&&(un(this._container,"leaflet-interactive"),this._fireEvent([p],u,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(u,p){if(!this._mouseHoverThrottled){for(var S,j,U=this._drawFirst;U;U=U.next)S=U.layer,S.options.interactive&&S._containsPoint(p)&&(j=S);j!==this._hoveredLayer&&(this._handleMouseOut(u),j&&(ot(this._container,"leaflet-interactive"),this._fireEvent([j],u,"mouseover"),this._hoveredLayer=j)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,u),this._mouseHoverThrottled=!0,setTimeout(l(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(u,p,S){this._map._fireDOMEvent(p,S||p.type,u)},_bringToFront:function(u){var p=u._order;if(p){var S=p.next,j=p.prev;if(S)S.prev=j;else return;j?j.next=S:S&&(this._drawFirst=S),p.prev=this._drawLast,this._drawLast.next=p,p.next=null,this._drawLast=p,this._requestRedraw(u)}},_bringToBack:function(u){var p=u._order;if(p){var S=p.next,j=p.prev;if(j)j.next=S;else return;S?S.prev=j:j&&(this._drawLast=j),p.prev=null,p.next=this._drawFirst,this._drawFirst.prev=p,this._drawFirst=p,this._requestRedraw(u)}}});function eu(u){return Ge.canvas?new vc(u):null}var ka=(function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(u){return document.createElement("<lvml:"+u+' class="lvml">')}}catch{}return function(u){return document.createElement("<"+u+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}})(),md={_initContainer:function(){this._container=pt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Sr.prototype._update.call(this),this.fire("update"))},_initPath:function(u){var p=u._container=ka("shape");ot(p,"leaflet-vml-shape "+(this.options.className||"")),p.coordsize="1 1",u._path=ka("path"),p.appendChild(u._path),this._updateStyle(u),this._layers[f(u)]=u},_addPath:function(u){var p=u._container;this._container.appendChild(p),u.options.interactive&&u.addInteractiveTarget(p)},_removePath:function(u){var p=u._container;Ft(p),u.removeInteractiveTarget(p),delete this._layers[f(u)]},_updateStyle:function(u){var p=u._stroke,S=u._fill,j=u.options,U=u._container;U.stroked=!!j.stroke,U.filled=!!j.fill,j.stroke?(p||(p=u._stroke=ka("stroke")),U.appendChild(p),p.weight=j.weight+"px",p.color=j.color,p.opacity=j.opacity,j.dashArray?p.dashStyle=N(j.dashArray)?j.dashArray.join(" "):j.dashArray.replace(/( *, *)/g," "):p.dashStyle="",p.endcap=j.lineCap.replace("butt","flat"),p.joinstyle=j.lineJoin):p&&(U.removeChild(p),u._stroke=null),j.fill?(S||(S=u._fill=ka("fill")),U.appendChild(S),S.color=j.fillColor||j.color,S.opacity=j.fillOpacity):S&&(U.removeChild(S),u._fill=null)},_updateCircle:function(u){var p=u._point.round(),S=Math.round(u._radius),j=Math.round(u._radiusY||S);this._setPath(u,u._empty()?"M0 0":"AL "+p.x+","+p.y+" "+S+","+j+" 0,"+65535*360)},_setPath:function(u,p){u._path.v=p},_bringToFront:function(u){Gn(u._container)},_bringToBack:function(u){lo(u._container)}},Bi=Ge.vml?ka:he,Es=Sr.extend({_initContainer:function(){this._container=Bi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Bi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Ft(this._container),kt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Sr.prototype._update.call(this);var u=this._bounds,p=u.getSize(),S=this._container;(!this._svgSize||!this._svgSize.equals(p))&&(this._svgSize=p,S.setAttribute("width",p.x),S.setAttribute("height",p.y)),Yt(S,u.min),S.setAttribute("viewBox",[u.min.x,u.min.y,p.x,p.y].join(" ")),this.fire("update")}},_initPath:function(u){var p=u._path=Bi("path");u.options.className&&ot(p,u.options.className),u.options.interactive&&ot(p,"leaflet-interactive"),this._updateStyle(u),this._layers[f(u)]=u},_addPath:function(u){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(u._path),u.addInteractiveTarget(u._path)},_removePath:function(u){Ft(u._path),u.removeInteractiveTarget(u._path),delete this._layers[f(u)]},_updatePath:function(u){u._project(),u._update()},_updateStyle:function(u){var p=u._path,S=u.options;p&&(S.stroke?(p.setAttribute("stroke",S.color),p.setAttribute("stroke-opacity",S.opacity),p.setAttribute("stroke-width",S.weight),p.setAttribute("stroke-linecap",S.lineCap),p.setAttribute("stroke-linejoin",S.lineJoin),S.dashArray?p.setAttribute("stroke-dasharray",S.dashArray):p.removeAttribute("stroke-dasharray"),S.dashOffset?p.setAttribute("stroke-dashoffset",S.dashOffset):p.removeAttribute("stroke-dashoffset")):p.setAttribute("stroke","none"),S.fill?(p.setAttribute("fill",S.fillColor||S.color),p.setAttribute("fill-opacity",S.fillOpacity),p.setAttribute("fill-rule",S.fillRule||"evenodd")):p.setAttribute("fill","none"))},_updatePoly:function(u,p){this._setPath(u,xe(u._parts,p))},_updateCircle:function(u){var p=u._point,S=Math.max(Math.round(u._radius),1),j=Math.max(Math.round(u._radiusY),1)||S,U="a"+S+","+j+" 0 1,0 ",K=u._empty()?"M0 0":"M"+(p.x-S)+","+p.y+U+S*2+",0 "+U+-S*2+",0 ";this._setPath(u,K)},_setPath:function(u,p){u._path.setAttribute("d",p)},_bringToFront:function(u){Gn(u._path)},_bringToBack:function(u){lo(u._path)}});Ge.vml&&Es.include(md);function tu(u){return Ge.svg||Ge.vml?new Es(u):null}_t.include({getRenderer:function(u){var p=u.options.renderer||this._getPaneRenderer(u.options.pane)||this.options.renderer||this._renderer;return p||(p=this._renderer=this._createRenderer()),this.hasLayer(p)||this.addLayer(p),p},_getPaneRenderer:function(u){if(u==="overlayPane"||u===void 0)return!1;var p=this._paneRenderers[u];return p===void 0&&(p=this._createRenderer({pane:u}),this._paneRenderers[u]=p),p},_createRenderer:function(u){return this.options.preferCanvas&&eu(u)||tu(u)}});var ho=xs.extend({initialize:function(u,p){xs.prototype.initialize.call(this,this._boundsToLatLngs(u),p)},setBounds:function(u){return this.setLatLngs(this._boundsToLatLngs(u))},_boundsToLatLngs:function(u){return u=se(u),[u.getSouthWest(),u.getNorthWest(),u.getNorthEast(),u.getSouthEast()]}});function j1(u,p){return new ho(u,p)}Es.create=Bi,Es.pointsToPath=xe,oa.geometryToLayer=ar,oa.coordsToLatLng=dc,oa.coordsToLatLngs=Wl,oa.latLngToCoords=hc,oa.latLngsToCoords=Kl,oa.getFeature=Na,oa.asFeature=mc,_t.mergeOptions({boxZoom:!0});var Cr=Di.extend({initialize:function(u){this._map=u,this._container=u._container,this._pane=u._panes.overlayPane,this._resetStateTimeout=0,u.on("unload",this._destroy,this)},addHooks:function(){tt(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){kt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Ft(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(u){if(!u.shiftKey||u.which!==1&&u.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),fs(),rc(),this._startPoint=this._map.mouseEventToContainerPoint(u),tt(document,{contextmenu:Ma,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(u){this._moved||(this._moved=!0,this._box=pt("div","leaflet-zoom-box",this._container),ot(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(u);var p=new M(this._point,this._startPoint),S=p.getSize();Yt(this._box,p.min),this._box.style.width=S.x+"px",this._box.style.height=S.y+"px"},_finish:function(){this._moved&&(Ft(this._box),un(this._container,"leaflet-crosshair")),Li(),Il(),kt(document,{contextmenu:Ma,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(u){if(!(u.which!==1&&u.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(l(this._resetState,this),0);var p=new ee(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(p).fire("boxzoomend",{boxZoomBounds:p})}},_onKeyDown:function(u){u.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});_t.addInitHook("addHandler","boxZoom",Cr),_t.mergeOptions({doubleClickZoom:!0});var yc=Di.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(u){var p=this._map,S=p.getZoom(),j=p.options.zoomDelta,U=u.originalEvent.shiftKey?S-j:S+j;p.options.doubleClickZoom==="center"?p.setZoom(U):p.setZoomAround(u.containerPoint,U)}});_t.addInitHook("addHandler","doubleClickZoom",yc),_t.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Ui=Di.extend({addHooks:function(){if(!this._draggable){var u=this._map;this._draggable=new Pa(u._mapPane,u._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),u.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),u.on("zoomend",this._onZoomEnd,this),u.whenReady(this._onZoomEnd,this))}ot(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){un(this._map._container,"leaflet-grab"),un(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var u=this._map;if(u._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var p=se(this._map.options.maxBounds);this._offsetLimit=q(this._map.latLngToContainerPoint(p.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(p.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;u.fire("movestart").fire("dragstart"),u.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(u){if(this._map.options.inertia){var p=this._lastTime=+new Date,S=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(S),this._times.push(p),this._prunePositions(p)}this._map.fire("move",u).fire("drag",u)},_prunePositions:function(u){for(;this._positions.length>1&&u-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var u=this._map.getSize().divideBy(2),p=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=p.subtract(u).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(u,p){return u-(u-p)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var u=this._draggable._newPos.subtract(this._draggable._startPos),p=this._offsetLimit;u.x<p.min.x&&(u.x=this._viscousLimit(u.x,p.min.x)),u.y<p.min.y&&(u.y=this._viscousLimit(u.y,p.min.y)),u.x>p.max.x&&(u.x=this._viscousLimit(u.x,p.max.x)),u.y>p.max.y&&(u.y=this._viscousLimit(u.y,p.max.y)),this._draggable._newPos=this._draggable._startPos.add(u)}},_onPreDragWrap:function(){var u=this._worldWidth,p=Math.round(u/2),S=this._initialWorldOffset,j=this._draggable._newPos.x,U=(j-p+S)%u+p-S,K=(j+p+S)%u-p-S,le=Math.abs(U+S)<Math.abs(K+S)?U:K;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=le},_onDragEnd:function(u){var p=this._map,S=p.options,j=!S.inertia||u.noInertia||this._times.length<2;if(p.fire("dragend",u),j)p.fire("moveend");else{this._prunePositions(+new Date);var U=this._lastPos.subtract(this._positions[0]),K=(this._lastTime-this._times[0])/1e3,le=S.easeLinearity,ye=U.multiplyBy(le/K),Ce=ye.distanceTo([0,0]),Pe=Math.min(S.inertiaMaxSpeed,Ce),Be=ye.multiplyBy(Pe/Ce),Ye=Pe/(S.inertiaDeceleration*le),ct=Be.multiplyBy(-Ye/2).round();!ct.x&&!ct.y?p.fire("moveend"):(ct=p._limitOffset(ct,p.options.maxBounds),J(function(){p.panBy(ct,{duration:Ye,easeLinearity:le,noMoveStart:!0,animate:!0})}))}}});_t.addInitHook("addHandler","dragging",Ui),_t.mergeOptions({keyboard:!0,keyboardPanDelta:80});var pd=Di.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(u){this._map=u,this._setPanDelta(u.options.keyboardPanDelta),this._setZoomDelta(u.options.zoomDelta)},addHooks:function(){var u=this._map._container;u.tabIndex<=0&&(u.tabIndex="0"),tt(u,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),kt(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 u=document.body,p=document.documentElement,S=u.scrollTop||p.scrollTop,j=u.scrollLeft||p.scrollLeft;this._map._container.focus(),window.scrollTo(j,S)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(u){var p=this._panKeys={},S=this.keyCodes,j,U;for(j=0,U=S.left.length;j<U;j++)p[S.left[j]]=[-1*u,0];for(j=0,U=S.right.length;j<U;j++)p[S.right[j]]=[u,0];for(j=0,U=S.down.length;j<U;j++)p[S.down[j]]=[0,u];for(j=0,U=S.up.length;j<U;j++)p[S.up[j]]=[0,-1*u]},_setZoomDelta:function(u){var p=this._zoomKeys={},S=this.keyCodes,j,U;for(j=0,U=S.zoomIn.length;j<U;j++)p[S.zoomIn[j]]=u;for(j=0,U=S.zoomOut.length;j<U;j++)p[S.zoomOut[j]]=-u},_addHooks:function(){tt(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){kt(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(u){if(!(u.altKey||u.ctrlKey||u.metaKey)){var p=u.keyCode,S=this._map,j;if(p in this._panKeys){if(!S._panAnim||!S._panAnim._inProgress)if(j=this._panKeys[p],u.shiftKey&&(j=k(j).multiplyBy(3)),S.options.maxBounds&&(j=S._limitOffset(k(j),S.options.maxBounds)),S.options.worldCopyJump){var U=S.wrapLatLng(S.unproject(S.project(S.getCenter()).add(j)));S.panTo(U)}else S.panBy(j)}else if(p in this._zoomKeys)S.setZoom(S.getZoom()+(u.shiftKey?3:1)*this._zoomKeys[p]);else if(p===27&&S._popup&&S._popup.options.closeOnEscapeKey)S.closePopup();else return;Ma(u)}}});_t.addInitHook("addHandler","keyboard",pd),_t.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var nu=Di.extend({addHooks:function(){tt(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){kt(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(u){var p=hr(u),S=this._map.options.wheelDebounceTime;this._delta+=p,this._lastMousePos=this._map.mouseEventToContainerPoint(u),this._startTime||(this._startTime=+new Date);var j=Math.max(S-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(l(this._performZoom,this),j),Ma(u)},_performZoom:function(){var u=this._map,p=u.getZoom(),S=this._map.options.zoomSnap||0;u._stop();var j=this._delta/(this._map.options.wheelPxPerZoomLevel*4),U=4*Math.log(2/(1+Math.exp(-Math.abs(j))))/Math.LN2,K=S?Math.ceil(U/S)*S:U,le=u._limitZoom(p+(this._delta>0?K:-K))-p;this._delta=0,this._startTime=null,le&&(u.options.scrollWheelZoom==="center"?u.setZoom(p+le):u.setZoomAround(this._lastMousePos,p+le))}});_t.addInitHook("addHandler","scrollWheelZoom",nu);var mo=600;_t.mergeOptions({tapHold:Ge.touchNative&&Ge.safari&&Ge.mobile,tapTolerance:15});var bc=Di.extend({addHooks:function(){tt(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){kt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(u){if(clearTimeout(this._holdTimeout),u.touches.length===1){var p=u.touches[0];this._startPos=this._newPos=new z(p.clientX,p.clientY),this._holdTimeout=setTimeout(l(function(){this._cancel(),this._isTapValid()&&(tt(document,"touchend",En),tt(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",p))},this),mo),tt(document,"touchend touchcancel contextmenu",this._cancel,this),tt(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function u(){kt(document,"touchend",En),kt(document,"touchend touchcancel",u)},_cancel:function(){clearTimeout(this._holdTimeout),kt(document,"touchend touchcancel contextmenu",this._cancel,this),kt(document,"touchmove",this._onMove,this)},_onMove:function(u){var p=u.touches[0];this._newPos=new z(p.clientX,p.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(u,p){var S=new MouseEvent(u,{bubbles:!0,cancelable:!0,view:window,screenX:p.screenX,screenY:p.screenY,clientX:p.clientX,clientY:p.clientY});S._simulated=!0,p.target.dispatchEvent(S)}});_t.addInitHook("addHandler","tapHold",bc),_t.mergeOptions({touchZoom:Ge.touch,bounceAtZoomLimits:!0});var gd=Di.extend({addHooks:function(){ot(this._map._container,"leaflet-touch-zoom"),tt(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){un(this._map._container,"leaflet-touch-zoom"),kt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(u){var p=this._map;if(!(!u.touches||u.touches.length!==2||p._animatingZoom||this._zooming)){var S=p.mouseEventToContainerPoint(u.touches[0]),j=p.mouseEventToContainerPoint(u.touches[1]);this._centerPoint=p.getSize()._divideBy(2),this._startLatLng=p.containerPointToLatLng(this._centerPoint),p.options.touchZoom!=="center"&&(this._pinchStartLatLng=p.containerPointToLatLng(S.add(j)._divideBy(2))),this._startDist=S.distanceTo(j),this._startZoom=p.getZoom(),this._moved=!1,this._zooming=!0,p._stop(),tt(document,"touchmove",this._onTouchMove,this),tt(document,"touchend touchcancel",this._onTouchEnd,this),En(u)}},_onTouchMove:function(u){if(!(!u.touches||u.touches.length!==2||!this._zooming)){var p=this._map,S=p.mouseEventToContainerPoint(u.touches[0]),j=p.mouseEventToContainerPoint(u.touches[1]),U=S.distanceTo(j)/this._startDist;if(this._zoom=p.getScaleZoom(U,this._startZoom),!p.options.bounceAtZoomLimits&&(this._zoom<p.getMinZoom()&&U<1||this._zoom>p.getMaxZoom()&&U>1)&&(this._zoom=p._limitZoom(this._zoom)),p.options.touchZoom==="center"){if(this._center=this._startLatLng,U===1)return}else{var K=S._add(j)._divideBy(2)._subtract(this._centerPoint);if(U===1&&K.x===0&&K.y===0)return;this._center=p.unproject(p.project(this._pinchStartLatLng,this._zoom).subtract(K),this._zoom)}this._moved||(p._moveStart(!0,!1),this._moved=!0),oe(this._animRequest);var le=l(p._move,p,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=J(le,this,!0),En(u)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,oe(this._animRequest),kt(document,"touchmove",this._onTouchMove,this),kt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});_t.addInitHook("addHandler","touchZoom",gd),_t.BoxZoom=Cr,_t.DoubleClickZoom=yc,_t.Drag=Ui,_t.Keyboard=pd,_t.ScrollWheelZoom=nu,_t.TapHold=bc,_t.TouchZoom=gd,n.Bounds=M,n.Browser=Ge,n.CRS=be,n.Canvas=vc,n.Circle=fc,n.CircleMarker=bs,n.Class=ie,n.Control=Lr,n.DivIcon=gp,n.DivOverlay=or,n.DomEvent=oc,n.DomUtil=ms,n.Draggable=Pa,n.Evented=I,n.FeatureGroup=ki,n.GeoJSON=oa,n.GridLayer=Cs,n.Handler=Di,n.Icon=Ii,n.ImageOverlay=ws,n.LatLng=me,n.LatLngBounds=ee,n.Layer=ui,n.LayerGroup=ys,n.LineUtil=S1,n.Map=_t,n.Marker=Yl,n.Mixin=b1,n.Path=zi,n.Point=z,n.PolyUtil=fd,n.Polygon=xs,n.Polyline=aa,n.Popup=Xl,n.PosAnimation=ps,n.Projection=sp,n.Rectangle=ho,n.Renderer=Sr,n.SVG=Es,n.SVGOverlay=gc,n.TileLayer=Da,n.Tooltip=Ql,n.Transformation=ne,n.Util=ve,n.VideoOverlay=Ra,n.bind=l,n.bounds=q,n.canvas=eu,n.circle=dp,n.circleMarker=fp,n.control=ia,n.divIcon=T1,n.extend=i,n.featureGroup=up,n.geoJSON=pc,n.geoJson=Zl,n.gridLayer=vp,n.icon=Hl,n.imageOverlay=hp,n.latLng=de,n.latLngBounds=se,n.layerGroup=C1,n.map=ad,n.marker=cp,n.point=k,n.polygon=A1,n.polyline=E1,n.popup=pp,n.rectangle=j1,n.setOptions=C,n.stamp=f,n.svg=tu,n.svgOverlay=mp,n.tileLayer=Yr,n.tooltip=O1,n.transformation=V,n.version=r,n.videoOverlay=Ss;var vd=window.L;n.noConflict=function(){return window.L=vd,this},window.L=n}))})(yh,yh.exports)),yh.exports}var Dm=f0e();const JN=Qi(Dm);function g4(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function v4(e,t){return t==null?function(r,i){const o=_.useRef(void 0);return o.current||(o.current=e(r,i)),o}:function(r,i){const o=_.useRef(void 0);o.current||(o.current=e(r,i));const l=_.useRef(r),{instance:c}=o.current;return _.useEffect(function(){l.current!==r&&(t(c,r,l.current),l.current=r)},[c,r,t]),o}}function d0e(e,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 lz(e){return function(n){const r=oz(),i=e(p4(n,r),r);return az(r.map,n.attribution),sz(i.current,n.eventHandlers),d0e(i.current,r),i}}function h0e(e,t){const n=v4(e,t),r=lz(n);return o0e(r)}function m0e(e,t){const n=v4(e),r=u0e(n,t);return s0e(r)}function p0e(e,t){const n=v4(e,t),r=lz(n);return l0e(r)}function g0e(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 v0e({bounds:e,boundsOptions:t,center:n,children:r,className:i,id:o,placeholder:l,style:c,whenReady:f,zoom:h,...m},y){const[x]=_.useState({className:i,id:o,style:c}),[b,w]=_.useState(null),C=_.useRef(void 0);_.useImperativeHandle(y,()=>b?.map??null,[b]);const O=_.useCallback(P=>{if(P!==null&&!C.current){const N=new Dm.Map(P,m);C.current=N,n!=null&&h!=null?N.setView(n,h):e!=null&&N.fitBounds(e,t),f!=null&&N.whenReady(f),w(i0e(N))}},[]);_.useEffect(()=>()=>{b?.map.remove()},[b]);const T=b?cf.createElement(m4,{value:b},r):l??null;return cf.createElement("div",{...x,ref:O},T)}const y0e=_.forwardRef(v0e),b0e=h0e(function({position:t,...n},r){const i=new Dm.Marker(t,n);return g4(i,a0e(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())}),x0e=m0e(function(t,n){const r=new Dm.Popup(t,n.overlayContainer);return g4(r,n)},function(t,n,{position:r},i){_.useEffect(function(){const{instance:l}=t;function c(h){h.popup===l&&(l.update(),i(!0))}function f(h){h.popup===l&&i(!1)}return n.map.on({popupopen:c,popupclose:f}),n.overlayContainer==null?(r!=null&&l.setLatLng(r),l.openOn(n.map)):n.overlayContainer.bindPopup(l),function(){n.map.off({popupopen:c,popupclose:f}),n.overlayContainer?.unbindPopup(),n.map.removeLayer(l)}},[t,n,i,r])}),_0e=p0e(function({url:t,...n},r){const i=new Dm.TileLayer(t,p4(n,r));return g4(i,r)},function(t,n,r){g0e(t,n,r);const{url:i}=n;i!=null&&i!==r.url&&t.setUrl(i)}),w0e=new dk,S0e=e=>w0e.parse(e),C0e=6,eL="0123456789ABCDEF";function E0e(){return`#${dC(C0e,()=>eL[Math.floor(Math.random()*eL.length)]).join("")}`}const tL=e=>e.toLowerCase().trim();class A0e{constructor(t){this.storage=t,this.colors=this.storage?.getTagColors()??{},this.lights={}}colors;lights;getColorForKey(t){const n=tL(t);return this.colors[n]||this.setColorForKey(n,E0e())}setColorForKey(t,n){const r=tL(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]=$S(n)),this.lights[n]}}const uz=({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)},O0e=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);uz(e,i,n)};class T0e{constructor(t,n){this.fetch=t,this.window=n}async saveImage(t,n){const r=await this.fetch(t).then(o=>o.blob()),i=URL.createObjectURL(r);uz(this.window,i,n)}}class j0e{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);O0e(this.window,r,t)}}const nl="DEFAULT",Ah=(e,t,n)=>n==null?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===n,M0e=(e,t)=>!e.domain&&t===nl?!0:e.domain===t,P0e=e=>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}:{longUrl:""},cz=e=>e.replaceAll("/","__"),y4=e=>e.replaceAll("__","/"),b4=({domain:e,shortCode:t})=>`${e??nl}__${cz(t)}`,fz=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===nl?null:t,shortCode:y4(n)}},N0e="yyyy-MM-dd",dz="yyyy-MM-dd HH:mm",bl=()=>new Date,x4=e=>typeof e!="string",_4=(e,t)=>!e||!x4(e)?e:t?$v(e,t):Kee(e),xl=e=>_4(e,void 0),Js=e=>_4(e,N0e),em=e=>_4(e,dz),wi=e=>x4(e)?e:hl(e),km=(e,t,n)=>{const r=wi(e),i=t&&wi(t),o=n&&wi(n);if(i&&o)try{return Qee(r,{start:i,end:o})}catch{return!1}return i?sw(r,i)||Xee(r,i):o?sw(r,o)||Fv(r,o):!0},mu=(e,t)=>sw(e,t)||Fv(e,t),J0="all",hz={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days",[J0]:void 0},mz=Object.keys(hz),L0e=e=>!e||!e.startDate&&!e.endDate,My=e=>typeof e=="string"&&mz.includes(e),R0e=mz.filter(e=>e!==J0),nL=e=>e?wi(e):null,pz=(e,t)=>({startDate:nL(e),endDate:nL(t)}),D0e=e=>{if(!(!e||L0e(e)))return e.startDate&&!e.endDate?`Since ${Js(e.startDate)}`:!e.startDate&&e.endDate?`Until ${Js(e.endDate)}`:`${Js(e.startDate)} - ${Js(e.endDate)}`},rL=e=>{if(!(!e||e===J0))return My(e)?hz[e]:D0e(e)},Yi=e=>ku(Vv(bl(),e)),Zc=e=>({startDate:e,endDate:gf(bl())}),gz=e=>[[()=>e==="today",()=>Zc(ku(bl()))],[()=>e==="yesterday",()=>({startDate:Yi(1),endDate:gf(Vv(bl(),1))})],[()=>e==="last7Days",()=>Zc(Yi(7))],[()=>e==="last30Days",()=>Zc(Yi(30))],[()=>e==="last90Days",()=>Zc(Yi(90))],[()=>e==="last180Days",()=>Zc(Yi(180))],[()=>e==="last365Days",()=>Zc(Yi(365))]].find(([t])=>t())?.[1]()??{},k0e=e=>{const t=wi(e);return[[()=>mu(ku(bl()),t),"today"],[()=>mu(Yi(1),t),"yesterday"],[()=>mu(Yi(7),t),"last7Days"],[()=>mu(Yi(30),t),"last30Days"],[()=>mu(Yi(90),t),"last90Days"],[()=>mu(Yi(180),t),"last180Days"],[()=>mu(Yi(365),t),"last365Days"]].find(([n])=>n())?.[1]??J0},vz=e=>My(e)?gz(e):e,yz=e=>!!(e&&e.startDate),I0e=({startDate:e,endDate:t})=>{const n=wk(gf(t??new Date),ku(e))+1,r=Vv(ku(e),n),i=Vv(gf(e),1);return{startDate:r,endDate:i}},z0e=e=>{if(yz(e))return wk(e.endDate??new Date,e.startDate)},bz=e=>e.type!==void 0,B0e=e=>e.type!==void 0,U0e=e=>{const t=DD(e,n=>bz(n.visit)?"orphanVisits":"nonOrphanVisits");return{orphanVisits:[],nonOrphanVisits:[],...t}},xz=(e,{shortCode:t,domain:n},{endDate:r,startDate:i}={})=>e.filter(({shortUrl:o,visit:l})=>o&&Ah(o,t,n)&&km(l.date,i,r)),_z=(e,t,{endDate:n,startDate:r}={})=>e.filter(({shortUrl:i,visit:o})=>i&&M0e(i,t)&&km(o.date,r,n)),wz=(e,t,{endDate:n,startDate:r}={})=>e.filter(({shortUrl:i,visit:o})=>i?.tags.includes(t)&&km(o.date,r,n)),zg=(e,t)=>RD(e,n=>n[t]),$0e=e=>{const t=(e?.startDate&&xl(e?.startDate))??void 0,n=(e?.endDate&&xl(e?.endDate))??void 0;return{startDate:t,endDate:n}},tS=({filter:e,dateRange:t})=>{const{startDate:n,endDate:r}=$0e(t),i=e?.excludeBots||void 0;return{startDate:n,endDate:r,excludeBots:i}},F0e=e=>yz(e.dateRange),V0e=({dateRange:e,...t})=>({...t,dateRange:I0e(e)}),Bg="Others",H0e=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],q0e=e=>{if(!xu(e))return{browser:Bg,os:Bg};const{browser:{name:t},os:{name:n}}=bte.parse(e);return{os:n??Bg,browser:t&&H0e.includes(t)?t:Bg}},G0e=e=>xu(e)?e.split("/")[e.includes("://")?2:0]?.split(":")[0]??"":"Direct",Sz=(e,t)=>e[t]!==void 0,iL=e=>typeof e=="number"?e:e?parseFloat(e):0,Y0e=(e,{os:t})=>{e[t]=(e[t]||0)+1},W0e=(e,{browser:t})=>{e[t]=(e[t]||0)+1},K0e=(e,{referer:t})=>{e[t]=(e[t]||0)+1},Cz=e=>(t,n)=>{const r=Sz(n,e)?n[e]:"Unknown";t[r]=(t[r]||0)+1},Z0e=Cz("country"),X0e=Cz("city"),Q0e=(e,t)=>{if(!Sz(t,"city")||t.city==="Unknown")return;const{city:n,latitude:r,longitude:i}=t,o=e[n]||{cityName:n,count:0,latLong:[iL(r),iL(i)]};o.count+=1,e[n]=o},J0e=(e,t)=>{if(!B0e(t))return;const{visitedUrl:n}=t;e[n]=(e[n]||0)+1},nS=e=>e.reduce((t,n)=>(Y0e(t.os,n),W0e(t.browsers,n),K0e(t.referrers,n),Z0e(t.countries,n),X0e(t.cities,n),Q0e(t.citiesForMap,n),J0e(t.visitedUrls,n),t),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}}),Py=e=>e.map(t=>{const{userAgent:n,date:r,referer:i,visitLocation:o,potentialBot:l}=t;return{date:r,potentialBot:l,userAgent:n,...q0e(n),referer:G0e(i),country:o?.countryName||"Unknown",region:o?.regionName||"Unknown",city:o?.cityName||"Unknown",latitude:o?.latitude,longitude:o?.longitude,visitedUrl:t.visitedUrl,type:bz(t)?t.type:void 0}}),e1e=Object.freeze(Object.defineProperty({__proto__:null,normalizeVisits:Py,processStatsFromVisits:nS},Symbol.toStringTag,{value:"Module"})),no=new ck,{container:mSe}=no;no.constant("window",window);no.constant("fetch",window.fetch.bind(window));no.service("ImageDownloader",T0e,"fetch","window");no.service("ColorGenerator",A0e,"TagColorsStorage");no.constant("jsonToCsv",S0e);no.service("ReportExporter",j0e,"window","jsonToCsv");no.serviceFactory("useTimeoutToggle",()=>Jy);no.serviceFactory("VisitsParser",()=>e1e);const w4=_.createContext(null),t1e=w4.Provider,Ez=(...e)=>{const t=_.useContext(w4);if(!t)throw new Error('You cannot use "useDependencies" outside of a ContainerProvider');return e.map(n=>{const r=t[n];if(!r)throw new Error(`Dependency with name "${n}" not found in container`);return r})};function ea(e,t){function n(r){const i=_.useContext(w4),o={};for(const c of t)c in r||(o[c]=i?.[c]);const l={...o,...r};return g.jsx(e,{...l})}return n}const fh=({children:e,to:t,active:n,...r})=>g.jsx(vS,{...r,className:({isActive:i})=>Oe("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}),n1e=({routePrefix:e,showOnMobile:t=!1})=>{const{pathname:n}=_r(),r=i=>`${e}${i}`;return g.jsx("aside",{className:Oe("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:g.jsxs("nav",{className:"flex flex-col h-full",children:[g.jsxs(fh,{to:r("/overview"),children:[g.jsx(De,{icon:iH}),"Overview"]}),g.jsxs(fh,{to:r("/list-short-urls/1"),active:n.match("/list-short-urls")!==null,children:[g.jsx(De,{icon:xS}),"List short URLs"]}),g.jsxs(fh,{to:r("/create-short-url"),children:[g.jsx(De,{icon:JV,flip:"horizontal"}),"Create short URL"]}),g.jsxs(fh,{to:r("/manage-tags"),children:[g.jsx(De,{icon:v6}),"Manage tags"]}),g.jsxs(fh,{to:r("/manage-domains"),children:[g.jsx(De,{icon:mH}),"Manage domains"]})]})})},r1e=e=>e?.type===vC.INVALID_ARGUMENT,i1e=e=>e?.type===vC.INVALID_SHORT_URL_DELETION,a1e=e=>!!e&&typeof e=="object"&&["type","detail","title","status"].every(t=>t in e),Ni=e=>a1e(e)?e:void 0,S4=e=>"error"in e,Xa=({errorData:e,fallbackMessage:t})=>g.jsxs(g.Fragment,{children:[e?.detail??t,r1e(e)&&g.jsxs("p",{children:["Invalid elements: [",e.invalidElements.join(", "),"]"]})]}),Az=_.createContext(""),o1e=Az.Provider,ss=()=>_.useContext(Az),Oz=_.createContext(void 0),{Provider:C4}=Oz,e1=()=>_.useContext(Oz),s1e=5,E4=()=>{const[e,t]=_.useState([]),n=_.useMemo(()=>e.length>=s1e,[e.length]),r=_.useCallback(c=>!n&&t(f=>[...f,c]),[n]),i=_.useCallback(c=>!n&&e.every(f=>f.name!==c),[e,n]),o=_.useCallback(c=>t(f=>f.filter(h=>h!==c)),[]),l=_.useCallback(()=>t([]),[]);return{itemsToCompare:e,addItemToCompare:r,removeItemToCompare:o,clearItemsToCompare:l,canAddItemWithName:i}},A4=({className:e,type:t})=>{const n=ss(),r=e1(),i=_.useMemo(()=>r?encodeURIComponent(r.itemsToCompare.map(f=>f.query).join(",")):"",[r]);if(!r||r.itemsToCompare.length===0)return null;const{itemsToCompare:o,clearItemsToCompare:l,removeItemToCompare:c}=r;return g.jsx("div",{className:Oe("sticky top-(--header-height) z-10",e),children:g.jsxs(Ot,{bodyClassName:"flex flex-col lg:flex-row gap-4 items-center",children:[g.jsx("ul",{className:"flex flex-wrap gap-1 grow items-center",children:o.map((f,h)=>g.jsxs("li",{className:Oe("flex items-center gap-1 text-sm font-bold text-white py-0.5 px-1.5 rounded",{"bg-gray-500":!f.style?.backgroundColor}),style:f.style,children:[f.name,g.jsx(Ru,{label:`Remove ${f.name}`,className:"text-xs",onClick:()=>c(f)})]},`${f.name}_${h}`))}),g.jsxs("div",{className:"flex gap-2 max-lg:w-full",children:[g.jsxs(Ct,{className:"grow whitespace-nowrap",disabled:o.length<2,to:o.length>1?`${n}/${t}/compare-visits?${t}=${i}`:void 0,children:[g.jsx(De,{icon:Uy}),"Compare (",o.length,"/5)",g.jsx(De,{icon:xv})]}),g.jsx(Ct,{"aria-label":"Close compare",variant:"secondary",onClick:l,children:g.jsx(De,{icon:Fy})})]})]})})},l1e=(e,{maxVersion:t,minVersion:n})=>{const r=!n||iw(e,n,">=");return(!t||iw(e,t,"<="))&&r},Tz={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"},filterShortUrlsByExcludedTags:{minVersion:"4.6.0"},filterVisitsByDomain:{minVersion:"4.6.0"}};Object.freeze(Tz);const pu=(e,t)=>l1e(t==="latest"?"999.99.99":t,Tz[e]),jz=e=>({ipRedirectCondition:pu("ipRedirectCondition",e),geolocationRedirectCondition:pu("geolocationRedirectCondition",e),filterShortUrlsByDomain:pu("filterShortUrlsByDomain",e),advancedQueryRedirectConditions:pu("advancedQueryRedirectConditions",e),desktopDeviceTypes:pu("advancedQueryRedirectConditions",e),filterShortUrlsByExcludedTags:pu("filterShortUrlsByExcludedTags",e),filterVisitsByDomain:pu("filterVisitsByDomain",e)}),Mz=_.createContext(jz("0.0.0")),u1e=Mz.Provider,c1e=e=>_.useMemo(()=>jz(e),[e]),rl=e=>_.useContext(Mz)[e],rr=(e,t)=>SD(e,t,{serializeError:n=>n}),wn=()=>{const[e]=Ez("apiClientFactory");return e},Pz="shlink/shortUrlCreation",aL={status:"idle"},ju=rr(`${Pz}/createShortUrl`,({apiClientFactory:e,...t})=>e().createShortUrl(t)),{reducer:f1e,actions:Nz}=Et({name:Pz,initialState:aL,reducers:{resetCreateShortUrl:()=>aL},extraReducers:e=>{e.addCase(ju.pending,()=>({status:"saving"})),e.addCase(ju.rejected,(t,{error:n})=>({status:"error",error:Ni(n)})),e.addCase(ju.fulfilled,(t,{payload:n})=>({result:n,status:"saved"}))}}),{resetCreateShortUrl:pSe}=Nz,d1e=f1e,h1e=()=>{const e=ln(),t=wn(),n=_.useCallback(()=>e(Nz.resetCreateShortUrl()),[e]),r=_.useCallback(i=>e(ju({...i,apiClientFactory:t})),[t,e]);return{shortUrlCreation:Sn(i=>i.shortUrlCreation),resetCreateShortUrl:n,createShortUrl:r}},t1="shlink/domainsList",Ug={status:"idle",domains:[],filteredDomains:[]},oL=({domain:e,redirects:t})=>n=>n.domain!==e?n:{...n,redirects:t},sL=(e,t)=>n=>n.domain!==e?n:{...n,status:t},ov=rr(`${t1}/listDomains`,async({apiClientFactory:e})=>{const{data:t,defaultRedirects:n}=await e().listDomains();return{domains:t.map(r=>({...r,status:"validating"})),defaultRedirects:n}}),Lz=rr(`${t1}/checkDomainHealth`,async({domain:e,apiClientFactory:t})=>{try{const{status:n}=await t().health({domain:e});return{domain:e,status:n==="pass"?"valid":"invalid"}}catch{return{domain:e,status:"invalid"}}}),Rz=on(`${t1}/filterDomains`),{reducer:m1e}=Et({name:t1,initialState:Ug,reducers:{},extraReducers:e=>{e.addCase(ov.pending,()=>({...Ug,status:"loading"})),e.addCase(ov.rejected,(t,{error:n})=>({...Ug,status:"error",error:Ni(n)})),e.addCase(ov.fulfilled,(t,{payload:n})=>({...Ug,...n,filteredDomains:n.domains})),e.addCase(Lz.fulfilled,({domains:t,filteredDomains:n,...r},{payload:i})=>({...r,domains:t.map(sL(i.domain,i.status)),filteredDomains:n.map(sL(i.domain,i.status))})),e.addCase(Rz,(t,{payload:n})=>({...t,filteredDomains:t.domains.filter(({domain:r})=>r.toLowerCase().match(n.toLowerCase()))})),e.addCase(vB.fulfilled,(t,{payload:n})=>({...t,domains:t.domains.map(oL(n)),filteredDomains:t.filteredDomains.map(oL(n))})),e.addCase(ju.fulfilled,(t,{payload:n})=>{n.domain===null||t.domains.some(r=>r.domain===n.domain)||t.domains.push({domain:n.domain,status:"validating",isDefault:!1,redirects:{baseUrlRedirect:null,regular404Redirect:null,invalidShortUrlRedirect:null}})})}}),ec=()=>{const e=ln(),t=wn(),n=_.useCallback(()=>e(ov({apiClientFactory:t})),[t,e]),r=_.useCallback(o=>e(Lz({domain:o,apiClientFactory:t})),[t,e]),i=_.useCallback(o=>e(Rz(o)),[e]);return{domainsList:Sn(o=>o.domainsList),listDomains:n,checkDomainHealth:r,filterDomains:i}},Dz="shlink/mercure",lL={status:"loading"},sv=rr(`${Dz}/loadMercureInfo`,({apiClientFactory:e,...t})=>{if(t.realTimeUpdates&&!t.realTimeUpdates.enabled)throw new Error("Real time updates not enabled");return e().mercureInfo()}),{reducer:p1e}=Et({name:Dz,initialState:lL,reducers:{},extraReducers:e=>{e.addCase(sv.pending,()=>lL),e.addCase(sv.rejected,()=>({status:"error"})),e.addCase(sv.fulfilled,(t,{payload:n})=>({...n,status:"loaded"}))}}),g1e=p1e,kz=()=>{const e=ln(),t=wn(),n=_.useCallback(r=>e(sv({...r,apiClientFactory:t})),[t,e]);return{mercureInfo:Sn(r=>r.mercureInfo),loadMercureInfo:n}},Iz="shlink/setShortUrlRedirectRules",uL={status:"idle"},lv=rr(`${Iz}/setShortUrlRedirectRules`,({shortUrl:e,data:t,apiClientFactory:n})=>{const{shortCode:r,domain:i}=e;return n().setShortUrlRedirectRules({shortCode:r,domain:i},t)}),{reducer:v1e,actions:zz}=Et({name:Iz,initialState:uL,reducers:{resetSetRules:()=>uL},extraReducers:e=>{e.addCase(lv.pending,()=>({status:"saving"})),e.addCase(lv.rejected,(t,{error:n})=>({status:"error",error:Ni(n)})),e.addCase(lv.fulfilled,()=>({status:"saved"}))}}),{resetSetRules:gSe}=zz,y1e=v1e,b1e=()=>{const e=ln(),t=wn(),n=_.useCallback(i=>e(lv({...i,apiClientFactory:t})),[t,e]),r=_.useCallback(()=>e(zz.resetSetRules()),[e]);return{shortUrlRedirectRulesSaving:Sn(i=>i.shortUrlRedirectRulesSaving),resetSetRules:r,setShortUrlRedirectRules:n}},Bz="shlink/getShortUrlRedirectRules",x1e={status:"idle"},uv=rr(`${Bz}/getShortUrlRedirectRules`,({apiClientFactory:e,...t})=>e().getShortUrlRedirectRules(t)),{reducer:_1e}=Et({name:Bz,initialState:x1e,reducers:{},extraReducers:e=>{e.addCase(uv.pending,()=>({status:"loading"})),e.addCase(uv.rejected,()=>({status:"error"})),e.addCase(uv.fulfilled,(t,{payload:n})=>({status:"loaded",...n}))}}),w1e=()=>{const e=ln(),t=wn(),n=_.useCallback(r=>e(uv({...r,apiClientFactory:t})),[t,e]);return{shortUrlRedirectRules:Sn(r=>r.shortUrlRedirectRules),getShortUrlRedirectRules:n}},O4="shlink/shortUrlDeletion",cL={status:"idle"},cv=rr(`${O4}/deleteShortUrl`,async({shortCode:e,domain:t,apiClientFactory:n})=>(await n().deleteShortUrl({shortCode:e,domain:t}),{shortCode:e,domain:t})),Uz=on(`${O4}/shortUrlDeleted`),{actions:$z,reducer:S1e}=Et({name:O4,initialState:cL,reducers:{resetDeleteShortUrl:()=>cL},extraReducers:e=>{e.addCase(cv.pending,()=>({status:"deleting"})),e.addCase(cv.rejected,(t,{error:n})=>({status:"error",error:Ni(n)})),e.addCase(cv.fulfilled,(t,{payload:n})=>({status:"deleted",shortCode:n.shortCode}))}}),{resetDeleteShortUrl:vSe}=$z,C1e=S1e,Fz=()=>{const e=ln(),t=wn(),n=_.useCallback(o=>e(cv({...o,apiClientFactory:t})),[t,e]),r=_.useCallback(()=>e($z.resetDeleteShortUrl()),[e]),i=_.useCallback(o=>e(Uz(o)),[e]);return{shortUrlDeletion:Sn(o=>o.shortUrlDeletion),resetDeleteShortUrl:r,shortUrlDeleted:i,deleteShortUrl:n}},Vz="shlink/shortUrlEdition",E1e={saving:!1,saved:!1,error:!1},Oh=rr(`${Vz}/editShortUrl`,({shortCode:e,domain:t,data:n,apiClientFactory:r})=>r().updateShortUrl({shortCode:e,domain:t},n)),{reducer:A1e}=Et({name:Vz,initialState:E1e,reducers:{},extraReducers:e=>{e.addCase(Oh.pending,t=>({...t,saving:!0,error:!1,saved:!1})),e.addCase(Oh.rejected,(t,{error:n})=>({...t,saving:!1,error:!0,saved:!1,errorData:Ni(n)})),e.addCase(Oh.fulfilled,(t,{payload:n})=>({shortUrl:n,saving:!1,error:!1,saved:!0}))}}),O1e=()=>{const e=ln(),t=wn(),n=_.useCallback(r=>e(Oh({...r,apiClientFactory:t})),[t,e]);return{shortUrlEdition:Sn(r=>r.shortUrlEdition),editShortUrl:n}},Hz="shlink/shortUrlsDetails",T1e={status:"idle"},fv=rr(`${Hz}/getShortUrlsDetails`,async({identifiers:e,apiClientFactory:t},{getState:n})=>{const{shortUrlsList:r}=n(),i=await Promise.all(e.map(async o=>{const{shortCode:l,domain:c}=o,f=r.status==="loaded"?r.shortUrls.data.find(h=>Ah(h,l,c)):void 0;return[o,f??await t().getShortUrl({shortCode:l,domain:c})]}));return new Map(i)}),{reducer:j1e}=Et({name:Hz,initialState:T1e,reducers:{},extraReducers:e=>{e.addCase(fv.pending,()=>({status:"loading"})),e.addCase(fv.rejected,(t,{error:n})=>({status:"error",error:Ni(n)})),e.addCase(fv.fulfilled,(t,{payload:n})=>({status:"loaded",shortUrls:n}))}}),n1=()=>{const e=ln(),t=wn(),n=_.useCallback(r=>e(fv({identifiers:r,apiClientFactory:t})),[t,e]);return{shortUrlsDetails:Sn(r=>r.shortUrlsDetails),getShortUrlsDetails:n}},qf=on("shlink/visitCreation/createNewVisits",e=>({payload:{createdVisits:e}})),M1e=()=>{const e=ln();return{createNewVisits:_.useCallback(t=>e(qf(t)),[e])}},qz="shlink/shortUrlsList",Gz=5,P1e={status:"idle"},dv=rr(`${qz}/listShortUrls`,({apiClientFactory:e,...t})=>e().listShortUrls(t??{})),{reducer:N1e}=Et({name:qz,initialState:P1e,reducers:{},extraReducers:e=>{e.addCase(dv.pending,()=>({status:"loading"})),e.addCase(dv.rejected,()=>({status:"error"})),e.addCase(dv.fulfilled,(t,{payload:n})=>({status:"loaded",shortUrls:n})),e.addCase(ju.fulfilled,(t,{payload:n})=>{t.status==="loaded"&&(t.shortUrls.data=[n,...t.shortUrls.data.slice(0,Gz-1)],t.shortUrls.pagination.totalItems+=1)}),e.addCase(Oh.fulfilled,(t,{payload:n})=>{t.status==="loaded"&&(t.shortUrls.data=t.shortUrls.data.map(r=>{const{shortCode:i,domain:o}=n;return Ah(r,i,o)?n:r}))}),e.addCase(Uz,(t,{payload:n})=>{t.status==="loaded"&&(t.shortUrls.data=t.shortUrls.data.filter(r=>!Ah(r,n.shortCode,n.domain)),t.shortUrls.pagination.totalItems-=1)}),e.addCase(qf,(t,{payload:n})=>{t.status==="loaded"&&(t.shortUrls.data=t.shortUrls.data.map(r=>n.createdVisits.findLast(({shortUrl:i})=>i&&Ah(r,i.shortCode,i.domain))?.shortUrl??r))})}}),Yz=()=>{const e=ln(),t=wn(),n=_.useCallback(r=>e(dv({...r,apiClientFactory:t})),[t,e]);return{shortUrlsList:Sn(r=>r.shortUrlsList),listShortUrls:n}},T4="shlink/tagDelete",L1e={status:"idle"},Wz=on(`${T4}/tagDeleted`),hv=rr(`${T4}/deleteTag`,async({apiClientFactory:e,tag:t})=>{await e().deleteTags([t])}),{reducer:R1e}=Et({name:T4,initialState:L1e,reducers:{},extraReducers:e=>{e.addCase(hv.pending,()=>({status:"deleting"})),e.addCase(hv.rejected,(t,{error:n})=>({status:"error",error:Ni(n)})),e.addCase(hv.fulfilled,()=>({status:"deleted"}))}}),D1e=()=>{const e=ln(),t=wn(),n=_.useCallback(i=>e(hv({tag:i,apiClientFactory:t})),[t,e]),r=_.useCallback(i=>e(Wz(i)),[e]);return{tagDelete:Sn(i=>i.tagDelete),deleteTag:n,tagDeleted:r}},j4="shlink/tagEdit",k1e={status:"idle"},Kz=on(`${j4}/tagEdited`),mv=rr(`${j4}/editTag`,async({oldName:e,newName:t,color:n,apiClientFactory:r,colorGenerator:i})=>(await r().editTag({oldName:e,newName:t}),i.setColorForKey(t,n),{oldName:e,newName:t,color:n})),{reducer:I1e}=Et({name:j4,initialState:k1e,reducers:{},extraReducers:e=>{e.addCase(mv.pending,()=>({status:"editing"})),e.addCase(mv.rejected,(t,{error:n})=>({status:"error",error:Ni(n)})),e.addCase(mv.fulfilled,(t,{payload:n})=>{const{oldName:r,newName:i}=n;return{status:"edited",oldName:r,newName:i}})}}),z1e=()=>{const e=ln(),[t,n]=Ez("apiClientFactory","ColorGenerator"),r=_.useCallback(o=>e(mv({...o,apiClientFactory:t,colorGenerator:n})),[t,n,e]),i=_.useCallback(o=>e(Kz(o)),[e]);return{tagEdit:Sn(o=>o.tagEdit),editTag:r,tagEdited:i}},M4="shlink/tagsList",p_={status:"idle",tags:[],filteredTags:[],stats:{}},fL=(e,t)=>n=>n===e?t:n,dL=(e,t)=>e.filter(n=>n!==t),B1e=(e,t)=>e.reduce((n,[r,i])=>{if(!n[r])return n;const{bots:o,nonBots:l}=i,c=n[r];return{...n,[r]:{...c,visitsSummary:{total:c.visitsSummary.total+o+l,bots:c.visitsSummary.bots+o,nonBots:c.visitsSummary.nonBots+l}}}},{...t}),U1e=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),{})),pv=rr(`${M4}/listTags`,async({apiClientFactory:e})=>{const{data:t}=await e().tagsStats(),n=t.reduce((r,{tag:i,...o})=>(r[i]=o,r),{});return{tags:Object.keys(n),stats:n}}),Zz=on(`${M4}/filterTags`),{reducer:$1e}=Et({name:M4,initialState:p_,reducers:{},extraReducers:e=>{e.addCase(Zz,(t,{payload:n})=>({...t,filteredTags:t.tags.filter(r=>r.toLowerCase().match(n.toLowerCase()))})),e.addCase(pv.pending,()=>({...p_,status:"loading"})),e.addCase(pv.rejected,(t,{error:n})=>({...p_,status:"error",error:Ni(n)})),e.addCase(pv.fulfilled,(t,{payload:n})=>({stats:n.stats,tags:n.tags,filteredTags:n.tags,status:"idle"})),e.addCase(Wz,({tags:t,filteredTags:n,...r},{payload:i})=>({...r,tags:dL(t,i),filteredTags:dL(n,i)})),e.addCase(Kz,({tags:t,filteredTags:n,stats:r,...i},{payload:o})=>({...i,stats:{...r,[o.newName]:r[o.oldName]},tags:t.map(fL(o.oldName,o.newName)).sort(),filteredTags:n.map(fL(o.oldName,o.newName)).sort()})),e.addCase(qf,(t,{payload:n})=>({...t,stats:B1e(U1e(n.createdVisits),t.stats)})),e.addCase(ju.fulfilled,({tags:t,...n},{payload:r})=>({...n,tags:t.concat(r.tags.filter(i=>!t.includes(i)))}))}}),Im=()=>{const e=ln(),t=wn(),n=_.useCallback(()=>e(pv({apiClientFactory:t})),[t,e]),r=_.useCallback(i=>e(Zz(i)),[e]);return{tagsList:Sn(i=>i.tagsList),listTags:n,filterTags:r}},hL=5e3,F1e=2,V1e=4,H1e=({currentPage:e,pagesCount:t})=>e>=t,q1e=(e,t)=>t*100/e,Xz=({visitsLoader:e,shouldCancel:t,progressChanged:n,batchSize:r})=>{const i=async(l,c)=>Promise.all(c.map(async f=>e({...l,page:f,itemsPerPage:hL}).then(({data:h})=>h))).then(f=>f.flat()),o=async(l,c,f=0)=>{if(t())return[];const h=await i(l,c[f]);return n(q1e(c.length,f+1)),f<c.length-1?h.concat(await o(l,c,f+1)):h};return async l=>{const{pagination:c,data:f}=await e({...l,page:1,itemsPerPage:hL});if(H1e(c))return f;const h=ID(F1e,c.pagesCount+1),m=sf(h,r);return c.pagesCount-1>r&&n(0),f.concat(await o(l,m))}},zm=(e,t)=>async n=>e?t({page:1,itemsPerPage:1,excludeBots:n}).then(({data:r})=>r[0]):Promise.resolve(void 0),Bm=({typePrefix:e,createLoaders:t,shouldCancel:n})=>{const r=on(`${e}/progressChanged`),i=on(`${e}/fallbackToInterval`),o=rr(e,async(l,{getState:c,dispatch:f})=>{const{params:h,options:m}=l,{visitsLoader:y,lastVisitLoader:x}=t(l),b=z0e(h.dateRange),w=tS(h),C=m.loadPrevInterval&&F0e(h)?tS(V0e(h)):void 0,O=V1e/(C?2:1),T=C?{main:0,prev:0}:{main:0},P=(Q,re)=>{T[Q]=re;const ce=Object.values(T),ae=ce.reduce((J,oe)=>J+oe,0);f(r(ae/ce.length))},N=Xz({visitsLoader:y,shouldCancel:()=>n(c),progressChanged:Q=>P("main",Q),batchSize:O}),[F,B,W]=await Promise.all([N(w),x(h.filter?.excludeBots),C?N(C).then(Q=>Q.map(re=>{if(b===void 0)return re;const{date:ce,...ae}=re,J=gC(wi(ce),b);return{...ae,date:xl(J)}})):Promise.resolve(void 0)]);return!F.length&&B&&f(i(k0e(B.date))),{...l,visits:F,prevVisits:W}});return Object.assign(o,{progressChanged:r,fallbackToInterval:i})},Um=({name:e,asyncThunk:t,initialState:n,filterCreatedVisits:r,extraReducers:i})=>{const{pending:o,rejected:l,fulfilled:c,progressChanged:f,fallbackToInterval:h}=t,{reducer:m,actions:y}=Et({name:e,initialState:n,reducers:{cancelGetVisits:()=>({status:"canceled"})},extraReducers:b=>{b.addCase(o,()=>({status:"loading",progress:null})),b.addCase(f,(w,{payload:C})=>w.status!=="loading"?w:{status:"loading",progress:C}),b.addCase(l,(w,{error:C})=>({status:"error",error:Ni(C)})),b.addCase(c,(w,{payload:C})=>({...w,...C,status:"loaded"})),b.addCase(h,(w,{payload:C})=>({status:"fallback",fallbackInterval:C})),b.addCase(qf,(w,{payload:C})=>{if(w.status!=="loaded")return w;const{visits:O}=w,T=r(w,C.createdVisits).map(({visit:P})=>P);return T.length?{...w,visits:[...T,...O]}:w}),i?.(b)}}),{cancelGetVisits:x}=y;return{reducer:m,cancelGetVisits:x}},Qz="shlink/domainVisits",G1e={status:"idle"},Jz=Bm({typePrefix:`${Qz}/getDomainVisits`,createLoaders:({domain:e,options:t,apiClientFactory:n})=>{const r=n(),{doIntervalFallback:i=!1}=t,o=c=>r.getDomainVisits(e,c),l=zm(i,c=>r.getDomainVisits(e,c));return{visitsLoader:o,lastVisitLoader:l}},shouldCancel:e=>e().domainVisits.status==="canceled"}),{reducer:Y1e,cancelGetVisits:W1e}=Um({name:Qz,initialState:G1e,asyncThunk:Jz,filterCreatedVisits:(e,t)=>e.status!=="loaded"?t:_z(t,e.domain,e.params?.dateRange)}),K1e=()=>{const e=ln(),t=wn(),n=_.useCallback(i=>e(Jz({...i,apiClientFactory:t})),[t,e]),r=_.useCallback(()=>e(W1e()),[e]);return{domainVisits:Sn(i=>i.domainVisits),getDomainVisits:n,cancelGetDomainVisits:r}},eB="shlink/orphanVisits",Z1e={status:"idle"},tB=Bm({typePrefix:`${eB}/getNonOrphanVisits`,createLoaders:({options:e,domain:t,apiClientFactory:n})=>{const r=n(),{doIntervalFallback:i=!1}=e,o=async c=>r.getNonOrphanVisits({...c,domain:t}),l=zm(i,c=>r.getNonOrphanVisits(c));return{visitsLoader:o,lastVisitLoader:l}},shouldCancel:e=>e().nonOrphanVisits.status==="canceled"}),{reducer:X1e,cancelGetVisits:Q1e}=Um({name:eB,initialState:Z1e,asyncThunk:tB,filterCreatedVisits:(e,t)=>{if(e.status!=="loaded")return t;const{startDate:n,endDate:r}=e.params?.dateRange??{};return t.filter(({visit:i})=>km(i.date,n,r))}}),J1e=()=>{const e=ln(),t=wn(),n=_.useCallback(i=>e(tB({...i,apiClientFactory:t})),[t,e]),r=_.useCallback(()=>e(Q1e()),[e]);return{nonOrphanVisits:Sn(i=>i.nonOrphanVisits),getNonOrphanVisits:n,cancelGetNonOrphanVisits:r}},nB="shlink/orphanVisitsDeletion",ebe={status:"idle"},Th=rr(`${nB}/deleteOrphanVisits`,({apiClientFactory:e})=>e().deleteOrphanVisits()),{reducer:tbe}=Et({name:nB,initialState:ebe,reducers:{},extraReducers:e=>{e.addCase(Th.pending,()=>({status:"deleting"})),e.addCase(Th.rejected,(t,{error:n})=>({status:"error",error:Ni(n)})),e.addCase(Th.fulfilled,(t,{payload:n})=>{const{deletedVisits:r}=n;return{status:"deleted",deletedVisits:r}})}}),nbe=()=>{const e=ln(),t=wn(),n=_.useCallback(()=>e(Th({apiClientFactory:t})),[t,e]);return{orphanVisitsDeletion:Sn(r=>r.orphanVisitsDeletion),deleteOrphanVisits:n}},rB="shlink/orphanVisits",rbe={status:"idle"},iB=Bm({typePrefix:`${rB}/getOrphanVisits`,createLoaders:({orphanVisitsType:e,domain:t,options:n,apiClientFactory:r})=>{const i=r(),{doIntervalFallback:o=!1}=n,l=async f=>i.getOrphanVisits({...f,type:e,domain:t}),c=zm(o,f=>i.getOrphanVisits(f));return{visitsLoader:l,lastVisitLoader:c}},shouldCancel:e=>e().orphanVisits.status==="canceled"}),{reducer:ibe,cancelGetVisits:abe}=Um({name:rB,initialState:rbe,asyncThunk:iB,extraReducers:e=>{e.addCase(Th.fulfilled,t=>({...t,visits:[]}))},filterCreatedVisits:(e,t)=>{if(e.status!=="loaded")return t;const{startDate:n,endDate:r}=e.params?.dateRange??{};return t.filter(({visit:i,shortUrl:o})=>!o&&km(i.date,n,r))}}),obe=()=>{const e=ln(),t=wn(),n=_.useCallback(i=>e(iB({...i,apiClientFactory:t})),[t,e]),r=_.useCallback(()=>e(abe()),[e]);return{orphanVisits:Sn(i=>i.orphanVisits),getOrphanVisits:n,cancelGetOrphanVisits:r}},aB="shlink/shortUrlVisitsDeletion",sbe={status:"idle"},jh=rr(`${aB}/deleteShortUrlVisits`,async({shortCode:e,domain:t,apiClientFactory:n})=>({...await n().deleteShortUrlVisits({shortCode:e,domain:t}),shortCode:e,domain:t})),{reducer:lbe}=Et({name:aB,initialState:sbe,reducers:{},extraReducers:e=>{e.addCase(jh.pending,()=>({status:"deleting"})),e.addCase(jh.rejected,(t,{error:n})=>({status:"error",error:Ni(n)})),e.addCase(jh.fulfilled,(t,{payload:n})=>{const{shortCode:r,domain:i,deletedVisits:o}=n;return{status:"deleted",shortCode:r,domain:i,deletedVisits:o}})}}),ube=()=>{const e=ln(),t=wn(),n=_.useCallback(r=>e(jh({...r,apiClientFactory:t})),[t,e]);return{shortUrlVisitsDeletion:Sn(r=>r.shortUrlVisitsDeletion),deleteShortUrlVisits:n}},oB="shlink/shortUrlVisits",cbe={status:"idle"},sB=Bm({typePrefix:`${oB}/getShortUrlVisits`,createLoaders:({shortCode:e,domain:t,options:n,apiClientFactory:r})=>{const i=r(),{doIntervalFallback:o=!1}=n,l=f=>i.getShortUrlVisits({shortCode:e,domain:t},f),c=zm(o,f=>i.getShortUrlVisits({shortCode:e,domain:t},f));return{visitsLoader:l,lastVisitLoader:c}},shouldCancel:e=>e().shortUrlVisits.status==="canceled"}),{reducer:fbe,cancelGetVisits:dbe}=Um({name:oB,initialState:cbe,asyncThunk:sB,extraReducers:e=>{e.addCase(jh.fulfilled,(t,{payload:n})=>t.status==="loaded"&&t.shortCode===n.shortCode&&t.domain===n.domain?{...t,visits:[]}:t)},filterCreatedVisits:(e,t)=>e.status!=="loaded"?t:xz(t,{shortCode:e.shortCode,domain:e.domain},e.params?.dateRange)}),hbe=()=>{const e=ln(),t=wn(),n=_.useCallback(i=>e(sB({...i,apiClientFactory:t})),[t,e]),r=_.useCallback(()=>e(dbe()),[e]);return{shortUrlVisits:Sn(i=>i.shortUrlVisits),getShortUrlVisits:n,cancelGetShortUrlVisits:r}},lB="shlink/tagVisits",mbe={status:"idle"},uB=Bm({typePrefix:`${lB}/getTagVisits`,createLoaders:({tag:e,options:t,domain:n,apiClientFactory:r})=>{const i=r(),{doIntervalFallback:o=!1}=t,l=f=>i.getTagVisits(e,{...f,domain:n}),c=zm(o,async f=>i.getTagVisits(e,f));return{visitsLoader:l,lastVisitLoader:c}},shouldCancel:e=>e().tagVisits.status==="canceled"}),{reducer:pbe,cancelGetVisits:gbe}=Um({name:lB,initialState:mbe,asyncThunk:uB,filterCreatedVisits:(e,t)=>e.status!=="loaded"?t:wz(t,e.tag,e.params?.dateRange)}),vbe=()=>{const e=ln(),t=wn(),n=_.useCallback(i=>e(uB({...i,apiClientFactory:t})),[t,e]),r=_.useCallback(()=>e(gbe()),[e]);return{tagVisits:Sn(i=>i.tagVisits),getTagVisits:n,cancelGetTagVisits:r}},cB="shlink/visitsOverview",ybe={status:"idle"},mL=e=>e.filter(({visit:t})=>t.potentialBot).length,gv=rr(`${cB}/loadVisitsOverview`,({apiClientFactory:e})=>e().getVisitsOverview()),{reducer:bbe}=Et({name:cB,initialState:ybe,reducers:{},extraReducers:e=>{e.addCase(gv.pending,()=>({status:"loading"})),e.addCase(gv.rejected,()=>({status:"error"})),e.addCase(gv.fulfilled,(t,{payload:n})=>({...n,status:"loaded"})),e.addCase(qf,(t,{payload:n})=>{if(t.status!=="loaded")return t;const{nonOrphanVisits:r,orphanVisits:i,...o}=t,{nonOrphanVisits:l,orphanVisits:c}=U0e(n.createdVisits),f=l.length,h=mL(l),m=f-h,y=c.length,x=mL(c),b=y-x;return{...o,nonOrphanVisits:{total:r.total+f,bots:r.bots+h,nonBots:r.nonBots+m},orphanVisits:{total:i.total+y,bots:i.bots+x,nonBots:i.nonBots+b}}})}}),xbe=()=>{const e=ln(),t=wn(),n=_.useCallback(()=>e(gv({apiClientFactory:t})),[t,e]);return{visitsOverview:Sn(r=>r.visitsOverview),loadVisitsOverview:n}},_be=({visitsLoaders:e,shouldCancel:t,progressChanged:n})=>{const r=Object.keys(e),i=Math.max(1,Math.round(4/r.length)),o=Object.fromEntries(r.map(f=>[f,0])),l=(f,h)=>{o[f]=h;const m=Object.values(o),y=m.reduce((x,b)=>x+b,0);n(y/m.length)},c=Object.entries(e).map(([f,h])=>[f,Xz({visitsLoader:h,batchSize:i,shouldCancel:t,progressChanged:m=>l(f,m)})]);return async f=>{const h=await Promise.all(c.map(async([m,y])=>{const x=await y(f);return[m,x]}));return Object.fromEntries(h)}},P4=({typePrefix:e,createLoaders:t,shouldCancel:n})=>{const r=on(`${e}/progressChanged`),i=rr(e,async(o,{getState:l,dispatch:c})=>{const f=t(o),h=await _be({visitsLoaders:f,shouldCancel:()=>n(l),progressChanged:m=>c(r(m))})(tS(o.params));return{...o,visitsGroups:h}});return Object.assign(i,{progressChanged:r})},N4=({name:e,asyncThunk:t,initialState:n,filterCreatedVisitsForGroup:r})=>{const{pending:i,rejected:o,fulfilled:l,progressChanged:c}=t,{reducer:f,actions:h}=Et({name:e,initialState:n,reducers:{cancelGetVisits:()=>({status:"canceled"})},extraReducers:y=>{y.addCase(i,()=>({status:"loading",progress:null})),y.addCase(c,(x,{payload:b})=>x.status!=="loading"?x:{status:"loading",progress:b}),y.addCase(o,(x,{error:b})=>({status:"error",error:Ni(b)})),y.addCase(l,(x,{payload:b})=>({...x,...b,status:"loaded"})),y.addCase(qf,(x,{payload:b})=>{if(x.status!=="loaded")return x;const{visitsGroups:w,params:C,...O}=x,T=Object.keys(w).map(N=>{const F=r({params:C,groupKey:N},b.createdVisits).map(({visit:B})=>B);return[N,[...F,...w[N]]]}),P=Object.fromEntries(T);return{...O,params:C,visitsGroups:P}})}}),{cancelGetVisits:m}=h;return{reducer:f,cancelGetVisits:m}},fB="shlink/domainVisitsComparison",wbe={status:"idle"},dB=P4({typePrefix:`${fB}/getDomainVisitsForComparison`,createLoaders:({domains:e,apiClientFactory:t})=>{const n=t(),r=e.map(i=>[i,o=>n.getDomainVisits(i,o)]);return Object.fromEntries(r)},shouldCancel:e=>e().domainVisitsComparison.status==="canceled"}),{reducer:Sbe,cancelGetVisits:Cbe}=N4({name:fB,initialState:wbe,asyncThunk:dB,filterCreatedVisitsForGroup:({groupKey:e,params:t},n)=>_z(n,e,t?.dateRange)}),Ebe=()=>{const e=ln(),t=wn(),n=_.useCallback(i=>e(dB({...i,apiClientFactory:t})),[t,e]),r=_.useCallback(()=>e(Cbe()),[e]);return{domainVisitsComparison:Sn(i=>i.domainVisitsComparison),getDomainVisitsForComparison:n,cancelGetDomainVisitsForComparison:r}},hB="shlink/shortUrlVisitsComparison",Abe={status:"idle"},mB=P4({typePrefix:`${hB}/getShortUrlVisitsForComparison`,createLoaders:({shortUrls:e,apiClientFactory:t})=>{const n=t(),r=e.map(i=>[b4(i),o=>n.getShortUrlVisits(i,o)]);return Object.fromEntries(r)},shouldCancel:e=>e().shortUrlVisitsComparison.status==="canceled"}),{reducer:Obe,cancelGetVisits:Tbe}=N4({name:hB,initialState:Abe,asyncThunk:mB,filterCreatedVisitsForGroup:({groupKey:e,params:t},n)=>xz(n,fz(e),t?.dateRange)}),jbe=()=>{const e=ln(),t=wn(),n=_.useCallback(i=>e(mB({...i,apiClientFactory:t})),[t,e]),r=_.useCallback(()=>e(Tbe()),[e]);return{shortUrlVisitsComparison:Sn(i=>i.shortUrlVisitsComparison),getShortUrlVisitsForComparison:n,cancelGetShortUrlVisitsComparison:r}},pB="shlink/tagVisitsComparison",Mbe={status:"idle"},gB=P4({typePrefix:`${pB}/getTagVisitsForComparison`,createLoaders:({tags:e,apiClientFactory:t})=>{const n=t(),r=e.map(i=>[i,o=>n.getTagVisits(i,o)]);return Object.fromEntries(r)},shouldCancel:e=>e().tagVisitsComparison.status==="canceled"}),{reducer:Pbe,cancelGetVisits:Nbe}=N4({name:pB,initialState:Mbe,asyncThunk:gB,filterCreatedVisitsForGroup:({groupKey:e,params:t},n)=>wz(n,e,t?.dateRange)}),Lbe=()=>{const e=ln(),t=wn(),n=_.useCallback(i=>e(gB({...i,apiClientFactory:t})),[t,e]),r=_.useCallback(()=>e(Nbe()),[e]);return{tagVisitsComparison:Sn(i=>i.tagVisitsComparison),getTagVisitsForComparison:n,cancelGetTagVisitsForComparison:r}},Rbe=e=>QS({devTools:!1,reducer:n0({mercureInfo:g1e,shortUrlsList:N1e,shortUrlCreation:d1e,shortUrlDeletion:C1e,shortUrlEdition:A1e,shortUrlsDetails:j1e,shortUrlVisits:fbe,shortUrlVisitsDeletion:lbe,shortUrlVisitsComparison:Obe,tagVisits:pbe,tagVisitsComparison:Pbe,domainVisits:Y1e,domainVisitsComparison:Sbe,orphanVisits:ibe,orphanVisitsDeletion:tbe,nonOrphanVisits:X1e,tagsList:$1e,tagDelete:R1e,tagEdit:I1e,domainsList:m1e,visitsOverview:bbe,shortUrlRedirectRules:_1e,shortUrlRedirectRulesSaving:y1e}),preloadedState:e,middleware:t=>t({immutableCheck:!1,serializableCheck:!1})}),ln=qL.withTypes(),Sn=GL.withTypes(),Dbe="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",vB=rr(Dbe,async({domain:e,redirects:t,apiClientFactory:n})=>{const r=await n().editDomainRedirects({domain:e,...t});return{domain:e,redirects:r}}),kbe=()=>{const e=ln(),t=wn();return{editDomainRedirects:_.useCallback(n=>e(vB({...n,apiClientFactory:t})),[t,e])}},g_=({children:e,onChange:t,infoTitle:n,...r})=>g.jsx(ii,{...r,onChange:i=>t(i.target.value),label:g.jsxs(g.Fragment,{children:[g.jsx(De,{className:"mr-1.5",icon:Vy,title:n}),e]}),type:"url",placeholder:"No redirect"}),Ibe=({isOpen:e,onClose:t,domain:n})=>{const[r,i]=_.useState(n.redirects?.baseUrlRedirect??""),[o,l]=_.useState(n.redirects?.regular404Redirect??""),[c,f]=_.useState(n.redirects?.invalidShortUrlRedirect??""),{editDomainRedirects:h}=kbe(),[m,y]=_.useState(!1),x=_.useCallback(async()=>{y(!0);try{await h({domain:n.domain,redirects:{baseUrlRedirect:kx(r),regular404Redirect:kx(o),invalidShortUrlRedirect:kx(c)}}),t()}finally{y(!1)}},[h,n.domain,r,o,c,t]);return g.jsx(eo,{title:`Edit redirects for ${n.domain}`,open:e,onClose:t,onConfirm:x,confirmText:m?"Saving...":"Save",confirmDisabled:m,children:g.jsxs("div",{className:"flex flex-col gap-y-3",children:[g.jsx(g_,{value:r,onChange:i,infoTitle:`Visitors accessing the base url, as in https://${n.domain}/, will be redirected to this URL.`,children:"Base URL"}),g.jsx(g_,{value:o,onChange:l,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"}),g.jsx(g_,{value:c,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"})]})})},zbe=({domain:e})=>{const{flag:t,setToTrue:n,setToFalse:r}=xn(),i=ss(),o=e1(),l=rl("filterShortUrlsByDomain");return g.jsxs(g.Fragment,{children:[g.jsxs(Xt,{menuAlignment:"right",children:[g.jsxs(Xt.Item,{className:"gap-1.5",to:`${i}/domain/${e.domain}${e.isDefault?`_${nl}`:""}/visits`,children:[g.jsx(De,{icon:_S})," Visit stats"]}),g.jsxs(Xt.Item,{className:"gap-1.5",disabled:!o||!o.canAddItemWithName(e.domain),onClick:()=>o?.addItemToCompare({name:e.domain,query:e.domain}),children:[g.jsx(De,{icon:Uy})," Compare visits"]}),l&&g.jsxs(Xt.Item,{className:"gap-1.5",to:`${i}/list-short-urls/1?domain=${e.isDefault?nl:e.domain}`,children:[g.jsx(De,{icon:xS})," Short URLs"]}),g.jsx(Xt.Separator,{}),g.jsxs(Xt.Item,{onClick:n,className:"gap-1.5",children:[g.jsx(De,{icon:bS})," Edit redirects"]})]}),g.jsx(Ibe,{domain:e,isOpen:t,onClose:r})]})},Bbe=({status:e})=>{const{anchor:t,tooltip:n}=Qo();return e==="validating"?g.jsx(De,{icon:yS,spin:!0,"data-testid":"domain-health-loader"}):g.jsxs("span",{...t,children:[g.jsx(De,{icon:e==="valid"?Pu:aH,className:Oe({"text-danger":e!=="valid"})}),g.jsx(Jo,{...n,children:e==="valid"?g.jsxs(g.Fragment,{children:["Congratulations!",g.jsx("br",{}),"This domain is properly configured."]}):g.jsxs("span",{children:["Oops! There is some missing configuration, and short URLs shared with this domain will not work.",g.jsx("br",{}),"Check the ",g.jsx(Ci,{href:"https://slnk.to/multi-domain-docs",children:"documentation"})," in order to find out what is missing."]})})]})},v_=({fallback:e})=>g.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:[!e&&g.jsx("small",{children:"No redirect"}),e&&g.jsxs(g.Fragment,{children:[e," ",g.jsx("small",{children:"(as fallback)"})]})]}),Ube=()=>{const{anchor:e,tooltip:t}=Qo();return g.jsxs(g.Fragment,{children:[g.jsx(De,{...e,icon:OH,className:"text-lm-brand dark:text-dm-brand","data-testid":"default-domain-icon"}),g.jsx(Jo,{...t,children:"Default domain"})]})},$be=({domain:e,checkDomainHealth:t,defaultRedirects:n})=>{const{domain:r,isDefault:i,redirects:o,status:l}=e;return _.useEffect(()=>{t(e.domain)},[t,e.domain]),g.jsxs(ze.Row,{className:"relative",children:[g.jsx(ze.Cell,{columnName:"Is default domain:",children:i&&g.jsx(Ube,{})}),g.jsx(ze.Cell,{columnName:"Domain:",children:g.jsx("b",{children:r})}),g.jsx(ze.Cell,{columnName:"Base path redirect:",children:o?.baseUrlRedirect??g.jsx(v_,{fallback:n?.baseUrlRedirect})}),g.jsx(ze.Cell,{columnName:"Regular 404 redirect:",children:o?.regular404Redirect??g.jsx(v_,{fallback:n?.regular404Redirect})}),g.jsx(ze.Cell,{columnName:"Invalid short URL redirect:",children:o?.invalidShortUrlRedirect??g.jsx(v_,{fallback:n?.invalidShortUrlRedirect})}),g.jsx(ze.Cell,{className:"lg:text-center max-lg:border-none",columnName:"Status:",children:g.jsx(Bbe,{status:l})}),g.jsx(ze.Cell,{className:"text-right max-lg:absolute max-lg:top-1 max-lg:right-1 max-lg:p-0",children:g.jsx(zbe,{domain:e})})]})},pL=[{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}],Fbe=()=>{const{domainsList:e,filterDomains:t,checkDomainHealth:n}=ec(),{filteredDomains:r,defaultRedirects:i,status:o}=e,l=i??r.find(({isDefault:f})=>f)?.redirects,c=E4();return o==="loading"?g.jsx($o,{loading:!0}):g.jsx(C4,{value:c,children:g.jsxs("div",{className:"flex flex-col gap-y-4",children:[g.jsx(Lf,{onChange:t}),g.jsx(A4,{type:"domains"}),o==="error"?g.jsx(zr,{variant:"error",children:g.jsx(Xa,{errorData:e.error,fallbackMessage:"Error loading domains :("})}):g.jsx(Ot,{className:"card",children:g.jsxs(ze,{header:g.jsx(ze.Row,{children:pL.map((f,h)=>g.jsx(ze.Cell,{children:g.jsx("span",{className:f.isHidden?"sr-only":void 0,children:f.value})},h))}),children:[r.length<1&&g.jsx(ze.Row,{children:g.jsx(ze.Cell,{colSpan:pL.length,className:"text-center",children:"No results found"})}),r.map(f=>g.jsx($be,{domain:f,checkDomainHealth:n,defaultRedirects:l},f.domain))]})})]})})},Vbe=(e,t,n,r)=>{const{status:i}=e;if(i!=="loaded"||!e.mercureHubUrl)return;const o=({data:c})=>n(JSON.parse(c)),l=t.map(c=>{const f=new URL(e.mercureHubUrl);f.searchParams.append("topic",c),f.searchParams.append("authorization",e.token);const h=new EventSource(f);return h.onmessage=o,h.onerror=r,h});return()=>l.forEach(c=>c.close())};function Ea(e,t){const n=new Set;return r=>{const{createNewVisits:i}=M1e(),{loadMercureInfo:o,mercureInfo:l}=kz(),c=Yu(),{interval:f}=jn("realTimeUpdates",{enabled:!0});return _.useEffect(()=>{const h=b=>f?n.add(b):i([b]),m=t(c),y=Vbe(l,m,h,o);if(!f)return y;const x=setInterval(()=>{i([...n]),n.clear()},f*1e3*60);return()=>{clearInterval(x),y?.()}},[i,f,o,l,c]),g.jsx(e,{...r})}}class Xi{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 Hbe=({creation:e,resetCreateShortUrl:t,canBeClosed:n=!1})=>{const{status:r}=e;if(_.useEffect(()=>{t()},[t]),r==="error")return g.jsxs(zr,{variant:"error",className:"mt-4 relative",children:[n&&g.jsx("div",{className:"absolute right-1.5 top-1.5","data-testid":"error-close-button",children:g.jsx(Ru,{onClick:t})}),g.jsx(Xa,{errorData:e.error,fallbackMessage:"An error occurred while creating the URL :("})]});if(r!=="saved")return null;const{shortUrl:i}=e.result;return g.jsxs(zr,{variant:"success",className:"mt-4 relative",children:[n&&g.jsx("div",{className:"absolute right-1.5 top-1.5","data-testid":"success-close-button",children:g.jsx(Ru,{onClick:t})}),g.jsxs("div",{className:"flex items-center justify-center gap-1",children:[g.jsxs("span",{children:[g.jsx("b",{children:"Great!"})," The short URL is ",g.jsx("b",{children:i})]}),g.jsx(YR,{text:i})]})]})},qbe=({domains:e,value:t,onChange:n})=>{const{flag:r,setToTrue:i,setToFalse:o}=xn(),l=!t,c=_.useCallback(()=>{n(""),o()},[n,o]),f=_.useCallback(()=>{n(""),i()},[n,i]);return r?g.jsxs("div",{className:"flex",children:[g.jsx(bi,{value:t??"",placeholder:"Domain",onChange:h=>n(h.target.value),className:"flex-grow rounded-r-none [&]:border-r-0"}),g.jsx(Ct,{variant:"secondary",type:"button",className:"rounded-l-none","aria-label":"Back to domains list",title:"Existing domains",onClick:c,children:g.jsx(De,{icon:wH})})]}):g.jsxs(Ue,{buttonContent:l?"Domain":`Domain: ${t}`,buttonClassName:Oe("w-full",{"text-placeholder":l}),children:[e.map(({domain:h,isDefault:m})=>g.jsxs(Ue.Item,{selected:(t===h||m)&&l,onClick:()=>n(h),className:"flex justify-between items-center",children:[h,m&&g.jsx(Vo,{children:"default"})]},h)),g.jsx(Ue.Separator,{}),g.jsx(Ue.Item,{onClick:f,children:g.jsx("i",{children:"New domain"})})]})},Gbe=({onChange:e,ColorGenerator:t,...n})=>{const r=jn("shortUrlCreation")?.tagFilteringMode??"startsWith";return g.jsx(nZ,{...n,onTagsChange:e,getColorForTag:i=>t.getColorForKey(i),size:"lg",searchMode:r})},Ybe=ea(Gbe,["ColorGenerator"]),Wbe=({minDate:e,maxDate:t,value:n,onChange:r,withTime:i=!1,...o})=>{const l=_.useCallback(({target:f})=>{if(!f.value){r?.(null);return}r?.(wi(f.value))},[r]),c=_.useMemo(()=>i?em:Js,[i]);return g.jsx(bi,{...o,type:i?"datetime-local":"date",value:c(n)??"",max:c(t)??void 0,min:c(e)??void 0,onChange:l})},Ny=({label:e,id:t,...n})=>{const r=_.useId();return g.jsxs(g.Fragment,{children:[g.jsxs("label",{htmlFor:t??r,className:"mb-1",children:[e,":"]}),g.jsx(Wbe,{id:t??r,...n})]})},Kbe=({className:e,placement:t,children:n})=>{const{anchor:r,tooltip:i}=Qo({placement:t});return g.jsxs(g.Fragment,{children:[g.jsx("span",{className:e,...r,"data-placement":t,"data-testid":"tooltip-anchor",children:g.jsx(De,{icon:Vy})}),g.jsx(Jo,{...i,children:n})]})},gL=({children:e,infoTooltip:t,checked:n,onChange:r})=>g.jsxs("div",{className:"flex items-center gap-x-2",children:[g.jsxs(Sa,{className:"inline-flex items-center gap-x-1.5",children:[g.jsx(zS,{checked:n,onChange:r}),e]}),g.jsx(Kbe,{placement:"right",children:t})]}),Cf=({className:e,...t})=>g.jsx("button",{type:"button",className:Oe("rounded-sm focus-ring cursor-pointer",e),...t}),Zbe=e=>g.jsx(eo,{...e,title:"Info",size:"lg",children:g.jsxs("div",{className:"flex flex-col gap-y-2",children:[g.jsxs("p",{children:["When the ",g.jsx("b",{children:g.jsx("i",{children:'"Use existing URL if found"'})})," checkbox is checked, the server will return an existing short URL if it matches provided params."]}),g.jsx("p",{children:"These are the checks performed by Shlink in order to determine if an existing short URL should be returned:"}),g.jsxs("ul",{className:"list-disc pl-5",children:[g.jsx("li",{children:"When only the long URL is provided: The most recent match will be returned, or a new short URL will be created if none is found."}),g.jsxs("li",{children:["When long URL and custom slug and/or domain are provided: Same as in previous case, but it will try to match the short URL using both the long URL and the slug, the long URL and the domain, or the three of them.",g.jsx("br",{}),"If the slug is being used by another long URL, an error will be returned."]}),g.jsx("li",{children:"When other params are provided: Same as in previous cases, but it will try to match existing short URLs with all provided data. If any of them does not match, a new short URL will be created"})]})]})}),Xbe=()=>{const{flag:e,setToFalse:t,setToTrue:n}=xn();return g.jsxs(g.Fragment,{children:[g.jsx(Cf,{title:"What does this mean?",onClick:n,children:g.jsx(De,{icon:Vy})}),g.jsx(Zbe,{open:e,onClose:t})]})},$g=e=>typeof e=="string"?hl(e):e,Qbe=e=>"shortCodeLength"in e&&"customSlug"in e&&"domain"in e,yB=({basicMode:e=!1,saving:t,onSave:n,initialState:r})=>{const{domainsList:i}=ec(),{tagsList:o}=Im(),[l,c]=_.useState(r),f=Qbe(l),h=_.useCallback(()=>c(r),[r]),m=_.useCallback((w,C)=>xu(w)?w:xu(C)?null:void 0,[]),y=_.useCallback(w=>c(C=>({...C,tags:w})),[]),x=_.useCallback(async w=>(w.preventDefault(),n(l).then(C=>f&&!S4(C)&&h()).catch(()=>{})),[f,n,h,l]),b=_.useMemo(()=>g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx(bi,{size:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:l.longUrl,onChange:w=>c(C=>({...C,longUrl:w.target.value}))}),g.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[e&&f&&g.jsx("div",{className:"w-full lg:w-1/2",children:g.jsx(bi,{size:"lg",placeholder:"Custom slug",value:l.customSlug??"",onChange:w=>c(C=>({...C,customSlug:w.target.value}))})}),g.jsx("div",{className:Oe("w-full",{"lg:w-1/2":e}),children:g.jsx(Ybe,{tags:o.tags,selectedTags:l.tags??[],onChange:y,placeholder:"Add tags to the URL"})})]})]}),[e,y,f,l,o.tags]);return g.jsxs("form",{name:"shortUrlForm",onSubmit:x,className:"flex flex-col gap-4",children:[e&&b,!e&&g.jsxs(g.Fragment,{children:[g.jsx("div",{children:g.jsx("div",{className:"w-full",children:g.jsx(Ot,{title:"Main options",className:"card",children:b})})}),g.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[g.jsx("div",{className:"w-full sm:w-1/2",children:g.jsxs(Ot,{title:"Customize the short URL",bodyClassName:"flex flex-col gap-4",className:"card h-full",children:[g.jsx(bi,{placeholder:"Title",value:l.title??"",onChange:({target:w})=>c(C=>({...C,title:m(w.value,r.title)}))}),f&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[g.jsx("div",{className:"lg:w-1/2",children:g.jsx(bi,{placeholder:"Custom slug",value:l.customSlug??"",onChange:w=>c(C=>({...C,customSlug:w.target.value})),disabled:xu(l.shortCodeLength)})}),g.jsx("div",{className:"lg:w-1/2",children:g.jsx(bi,{type:"number",placeholder:"Short code length",value:l.shortCodeLength??"",onChange:w=>c(C=>({...C,shortCodeLength:w.target.value})),min:4,disabled:xu(l.customSlug)})})]}),g.jsx(qbe,{value:l.domain,onChange:w=>c(C=>({...C,domain:w})),domains:i.domains})]})]})}),g.jsx("div",{className:"w-full sm:w-1/2",children:g.jsxs(Ot,{title:"Limit access to the short URL",className:"card h-full",bodyClassName:"flex flex-col gap-y-4",children:[g.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[g.jsx("div",{className:"lg:w-1/2",children:g.jsx(Ny,{label:"Enabled since",withTime:!0,maxDate:l.validUntil?$g(l.validUntil):void 0,value:l.validSince?$g(l.validSince):null,onChange:w=>c(C=>({...C,validSince:xl(w)}))})}),g.jsx("div",{className:"lg:w-1/2",children:g.jsx(Ny,{label:"Enabled until",withTime:!0,minDate:l.validSince?$g(l.validSince):void 0,value:l.validUntil?$g(l.validUntil):null,onChange:w=>c(C=>({...C,validUntil:xl(w)}))})})]}),g.jsx(ii,{label:"Maximum visits allowed:",type:"number",min:1,placeholder:"25...",value:l.maxVisits??"",onChange:w=>c(C=>({...C,maxVisits:xu(w.target.value)?Number(w.target.value):null}))})]})})]}),g.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[f&&g.jsx("div",{className:"w-full sm:w-1/2",children:g.jsx(Ot,{title:"Extra checks",className:"h-full",children:g.jsxs("p",{className:"inline-flex items-center gap-x-2",children:[g.jsxs(Sa,{className:"inline-flex items-center gap-x-1.5",children:[g.jsx(zS,{checked:l.findIfExists,onChange:w=>c(C=>({...C,findIfExists:w}))}),"Use existing URL if found"]}),g.jsx(Xbe,{})]})})}),g.jsx("div",{className:Oe("w-full",{"sm:w-1/2":f}),children:g.jsxs(Ot,{title:"Configure behavior",children:[g.jsx(gL,{infoTooltip:"This short URL will be included in the robots.txt for your Shlink instance, allowing web crawlers (like Google) to index it.",checked:l.crawlable,onChange:w=>c(C=>({...C,crawlable:w})),children:"Make it crawlable"}),g.jsx(gL,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:l.forwardQuery,onChange:w=>c(C=>({...C,forwardQuery:w})),children:"Forward query params on redirect"})]})})]})]}),g.jsx("div",{className:"text-center",children:g.jsx(Ct,{type:"submit",inline:!0,solid:!0,disabled:t||!l.longUrl,className:"max-md:w-full",children:t?"Saving...":"Save"})})]})},bB=({basicMode:e=!1})=>{const{createShortUrl:t,shortUrlCreation:n,resetCreateShortUrl:r}=h1e(),i=jn("shortUrlCreation"),{"long-url":o=""}=Wu(),l=_.useMemo(()=>({longUrl:o,tags:[],customSlug:"",title:void 0,shortCodeLength:void 0,domain:"",validSince:void 0,validUntil:void 0,maxVisits:void 0,findIfExists:!1,forwardQuery:i?.forwardQuery??!0}),[o,i?.forwardQuery]);return g.jsxs(g.Fragment,{children:[g.jsx(yB,{initialState:l,saving:n.status==="saving",basicMode:e,onSave:async c=>(r(),t(c))}),g.jsx(Hbe,{creation:n,resetCreateShortUrl:r,canBeClosed:e})]})},Ly=({date:e,format:t=dz,relative:n=!1})=>{const r=x4(e)?e:hl(e);return g.jsx("time",{dateTime:`${Zee(r)}000`,children:n?`${Wee(bl(),r)} ago`:$v(r,t)})},r1=()=>{const e=Ja(),t=ss(),n=Wu(),r=_.useMemo(()=>{const{orderBy:o,tags:l,excludeTags:c,excludeBots:f,excludeMaxVisitsReached:h,excludePastValidUntil:m,...y}=n,x=o?MZ(o):void 0,b=l?.split(",")??[];return{...y,orderBy:x,tags:b,excludeTags:c?.split(",")??[],excludeBots:f!==void 0?f==="true":void 0,excludeMaxVisitsReached:h!==void 0?h==="true":void 0,excludePastValidUntil:m!==void 0?m==="true":void 0}},[n]),i=_.useCallback(o=>{const l={...r,...o},{orderBy:c,tags:f,excludeTags:h,excludeBots:m,excludeMaxVisitsReached:y,excludePastValidUntil:x,...b}=l,w={...b,orderBy:c&&jZ(c),tags:f.length>0?f.join(","):void 0,excludeTags:h.length>0?h.join(","):void 0,excludeBots:Ix(m),excludeMaxVisitsReached:Ix(y),excludePastValidUntil:Ix(x)},C=FS(w),O=C?`?${C}`:"";e(`${t}/list-short-urls/1${O}`)},[r,e,t]);return[r,i]},L4=()=>{const{domain:e}=Wu(),{shortCode:t=""}=Yu();return _.useMemo(()=>({shortCode:y4(t),domain:e}),[e,t])},xB=(e,{shortCode:t,domain:n},r)=>{const i=n?`?domain=${n}`:"";return`${e}/short-code/${cz(t)}/${r}${i}`},_B=({shortUrl:e,suffix:t,asLink:n,children:r,...i})=>{const o=ss();return!n||!e?g.jsx("span",{...i,children:r}):g.jsx(Pr,{to:xB(o,e,t),...i,children:r})},y_="delete",Jbe=({shortUrl:e,onClose:t,isOpen:n})=>{const[r,i]=_.useState(""),{shortUrlDeletion:o,resetDeleteShortUrl:l,deleteShortUrl:c,shortUrlDeleted:f}=Fz();_.useEffect(()=>()=>{l()},[l]);const{status:h}=o,m=h==="deleting",y=_.useCallback(()=>{l(),t()},[l,t]),x=_.useCallback(()=>c(e).then(b=>!S4(b)&&t()),[c,e,t]);return g.jsx(eo,{open:n,title:"Delete short URL",variant:"danger",confirmText:m?"Deleting...":"Delete",confirmDisabled:r!==y_||m,onConfirm:x,onClose:y,onClosed:()=>h==="deleted"&&f(e),children:g.jsxs("div",{className:"flex flex-col gap-y-2",children:[g.jsxs("p",{children:[g.jsx("b",{className:"text-danger",children:"Caution!"})," You are about to delete a short URL."]}),g.jsx("p",{children:"This action cannot be undone. Once you have deleted it, all the visits stats will be lost."}),g.jsx(ii,{label:g.jsxs(g.Fragment,{children:["Type ",g.jsx("b",{children:y_})," to confirm deletion."]}),type:"text",placeholder:y_,value:r,onChange:b=>i(b.target.value),onKeyDown:b=>b.key==="Enter"&&x()}),h==="error"&&g.jsx(zr,{variant:i1e(o.error)?"warning":"error",size:"sm",className:"mt-2",children:g.jsx(Xa,{errorData:o.error,fallbackMessage:"Something went wrong while deleting the URL :("})})]})})},wB=_.forwardRef(({name:e,color:t,onChange:n,className:r},i)=>g.jsxs("div",{className:Oe("relative rounded w-12",r),style:{backgroundColor:t,borderColor:t},children:[g.jsx(bi,{className:"w-full h-full cursor-pointer relative z-1 opacity-0",type:"color",value:t,onChange:o=>n(o.target.value),ref:i,name:e,"aria-label":e.replace("-"," ")}),g.jsx(De,{icon:UV,className:"absolute top-1/2 left-1/2 -translate-1/2",style:{color:$S(t.substring(1))?"#000":"#fff"}})]})),vL=({color:e,onChange:t,name:n})=>{const r=_.useRef(null);return g.jsxs("div",{className:"flex",children:[g.jsx(wB,{name:`${n}-picker`,color:e,onChange:t,className:"rounded-r-none",ref:r}),g.jsx(bi,{readOnly:!0,value:e,onClick:()=>r.current?.click(),"aria-label":n,"data-testid":"text-input",className:"grow rounded-l-none"})]})};function exe(e){switch(e){case"L":return 1;case"M":return .5;default:return .3}}const txe=_.forwardRef(({data:e,color:t="#000000",bgColor:n="#ffffff",margin:r=0,errorCorrection:i="L",size:o=300,drawType:l="canvas",logo:c},f)=>{const h=_.useRef(null),m=_.useRef(new Ste),y=_.useCallback((b,w)=>m.current.download({name:b,extension:w}),[]),x=_.useCallback(b=>new Promise((w,C)=>{const O=m.current.getRawData(b),T=new FileReader;T.onload=()=>{const{result:P}=T;P&&w(P.toString())},T.onerror=C,O.then(P=>{P instanceof Blob?T.readAsDataURL(P):C(new Error("QR code image blob not available"))})}),[]);return _.useImperativeHandle(f,()=>({download:y,getDataUri:x}),[y,x]),_.useEffect(()=>{const b=h.current;m.current.append(b)},[]),_.useEffect(()=>{m.current.update({type:l,data:e,width:o+r,height:o+r,margin:r,dotsOptions:{color:t},backgroundOptions:{color:n},qrOptions:{errorCorrectionLevel:i},imageOptions:{margin:5,imageSize:exe(i)},image:c})},[n,t,e,l,i,c,r,o]),g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"#qr-code-canvas-container canvas { max-width: 100% }"}}),g.jsx("div",{ref:h,id:"qr-code-canvas-container"})]})}),nxe=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}))},yL=({name:e,value:t,step:n,min:r,max:i,onChange:o})=>{const l=_.useId();return g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsxs("label",{htmlFor:l,className:"capitalize",children:[e,": ",t,"px"]}),g.jsx("input",{id:l,type:"range",value:t,step:n,min:r,max:i,onChange:c=>o(Number(c.target.value))})]})},rxe=({shortUrl:{shortUrl:e,shortCode:t},onClose:n,isOpen:r,qrDrawType:i})=>{const o=jn("qrCodes",Df),[{size:l,margin:c,color:f,bgColor:h,errorCorrection:m,format:y},x]=_.useState(o),b=_.useCallback(re=>x(ce=>({...ce,...re})),[]),w=_.useRef(null),[C,O]=_.useState(),T=_.useCallback(re=>{const ce=re.target.files?.[0];ce&&O({url:URL.createObjectURL(new Blob([ce],{type:ce.type})),name:ce.name})},[]),P=_.useRef(null),N=_.useCallback(()=>P.current?.download(`${t}-qr-code`,y),[y,t]),[F,B]=Jy({}),W=_.useCallback(()=>{const re=P.current?.getDataUri(y)??"";return nxe({text:re,onCopy:B})},[y,B]),Q=_.useCallback(()=>{x(o),O(void 0)},[o]);return g.jsx(eo,{size:"lg",open:r,onClose:n,title:g.jsxs(g.Fragment,{children:["QR code for ",g.jsx(Ci,{href:e})]}),onClosed:Q,children:g.jsxs("div",{className:"flex flex-col-reverse lg:flex-row gap-4",children:[g.jsx("div",{className:"grow flex items-center justify-around",children:g.jsxs("div",{className:"flex flex-col gap-1 items-center","data-testid":"qr-code-container",children:[g.jsx(txe,{ref:P,data:e,size:l,margin:c,errorCorrection:m,color:f,bgColor:h,logo:C?.url,drawType:i}),g.jsxs("div",{className:"italic",children:["Preview (",l+c,"x",l+c,")"]})]})}),g.jsxs("div",{className:"flex flex-col gap-2 lg:w-64",children:[g.jsx(yL,{name:"size",value:l,onChange:re=>b({size:re}),step:10,min:50,max:1e3}),g.jsx(yL,{name:"margin",value:c,onChange:re=>b({margin:re}),step:1,min:0,max:100}),g.jsx(hk,{errorCorrection:m,onChange:re=>b({errorCorrection:re})}),g.jsx(vL,{name:"color",color:f,onChange:re=>b({color:re})}),g.jsx(vL,{name:"background",color:h,onChange:re=>b({bgColor:re})}),!C&&g.jsxs(g.Fragment,{children:[g.jsxs(Ct,{variant:"secondary",onClick:()=>w.current?.click(),children:[g.jsx(De,{icon:DK}),"Select logo"]}),g.jsx("input",{ref:w,type:"file",accept:"image/*","aria-hidden":!0,tabIndex:-1,className:"hidden",onChange:T,"data-testid":"logo-input"})]}),C&&g.jsxs(Ct,{variant:"secondary",onClick:()=>O(void 0),children:[g.jsx(De,{icon:$y}),g.jsxs("div",{className:"truncate",children:["Clear logo (",C.name,")"]})]}),g.jsx("div",{className:"my-auto",children:g.jsx("hr",{className:"my-2"})}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsx(mk,{format:y,onChange:re=>b({format:re})}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Ct,{onClick:W,"aria-label":"Copy data URI",title:"Copy data URI",className:"h-full",children:g.jsx(De,{icon:F?Pu:VR})}),g.jsxs(Ct,{solid:!0,onClick:N,className:"grow",children:["Download ",g.jsx(De,{icon:m6})]})]})]})]})]})})},ixe=({shortUrl:e})=>{const{flag:t,setToTrue:n,setToFalse:r}=xn(),{flag:i,setToTrue:o,setToFalse:l}=xn(),c=e1(),{confirmDeletions:f=!0}=jn("shortUrlsList",{}),{deleteShortUrl:h,shortUrlDeleted:m}=Fz(),y=_.useCallback(async()=>{const w=await h(e);S4(w)||m(e)},[h,e,m]),x=ss(),b=_.useCallback(w=>xB(x,e,w),[x,e]);return g.jsxs(g.Fragment,{children:[g.jsxs(Xt,{menuAlignment:"right",children:[g.jsxs(Xt.Item,{to:b("visits"),className:"gap-1.5",children:[g.jsx(De,{icon:_S})," Visit stats"]}),c&&g.jsxs(g.Fragment,{children:[g.jsxs(Xt.Item,{className:"gap-1.5",disabled:!c.canAddItemWithName(e.shortUrl),onClick:()=>c.addItemToCompare({name:e.shortUrl,query:b4(e)}),children:[g.jsx(De,{icon:Uy})," Compare visits"]}),g.jsx(Xt.Separator,{})]}),g.jsxs(Xt.Item,{to:b("edit"),className:"gap-1.5",children:[g.jsx(De,{icon:bS})," Edit short URL"]}),g.jsxs(Xt.Item,{to:b("redirect-rules"),className:"gap-1.5",children:[g.jsx(De,{icon:p6})," Manage redirect rules"]}),g.jsxs(Xt.Item,{onClick:n,className:"gap-1.5",children:[g.jsx(De,{icon:TH})," QR code"]}),g.jsx(Xt.Separator,{}),g.jsxs(Xt.Item,{className:"[&]:text-danger gap-1.5",onClick:f?o:y,children:[g.jsx(De,{icon:x6})," Delete short URL"]})]}),g.jsx(rxe,{shortUrl:e,isOpen:t,onClose:r}),g.jsx(Jbe,{shortUrl:e,isOpen:i,onClose:l})]})},axe=e=>{const{meta:t,visitsSummary:n}=e,{maxVisits:r,validSince:i,validUntil:o}=t,l=n.total;return r&&l>=r?{icon:vH,className:"text-danger",description:`This short URL cannot be currently visited because it has reached the maximum amount of ${r} visit${r>1?"s":""}`}:o&&Fv(wi(o),bl())?{icon:rT,className:"text-danger",description:`This short URL cannot be visited since ${em(wi(o))}`}:i&&Fv(bl(),wi(i))?{icon:rT,className:"text-warning",description:`This short URL will start working on ${em(wi(i))}`}:{icon:Pu,className:"text-lm-brand dark:text-dm-brand",description:"This short URL can be visited normally"}},oxe=({shortUrl:e})=>{const{icon:t,className:n,description:r}=_.useMemo(()=>axe(e),[e]);return g.jsx("span",{className:"cursor-help",title:r,children:g.jsx(De,{icon:t,className:n,"data-testid":"status-icon"})})},SB=({visitsCount:e,shortUrl:t,active:n=!1,asLink:r=!1})=>{const{anchor:i,tooltip:o}=Qo(),{maxVisits:l,validSince:c,validUntil:f}=t?.meta??{},h=!!l||!!c||!!f,m=g.jsx(_B,{shortUrl:t,suffix:"visits",asLink:r,children:g.jsx("strong",{className:Oe("inline-block transition-all duration-300",{"scale-150":n}),children:bn(e)})});return h?g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:"whitespace-nowrap",children:[m,g.jsxs("small",{className:"cursor-help",...i,children:[l&&g.jsxs(g.Fragment,{children:[" / ",bn(l)]}),g.jsx("sup",{className:"ml-1",children:g.jsx(De,{icon:Vy})})]})]}),g.jsx(Jo,{...o,children:g.jsxs("ul",{className:"flex flex-col gap-y-2",children:[l&&g.jsxs("li",{children:["This short URL will not accept more than ",g.jsx("b",{children:bn(l)})," visit",l===1?"":"s","."]}),c&&g.jsxs("li",{children:["This short URL will not accept visits before ",g.jsx("b",{className:"whitespace-nowrap",children:em(wi(c))}),"."]}),f&&g.jsxs("li",{children:["This short URL will not accept visits after ",g.jsx("b",{className:"whitespace-nowrap",children:em(wi(f))}),"."]})]})})]}):m},sxe=e=>!!e.onClose,lxe=e=>!!e.onClick,i1=e=>{const{text:t,children:n,className:r,colorGenerator:i}=e,o=lxe(e),l=sxe(e),c=o?Cf:"span",f=_.useMemo(()=>i.stylesForKey(t),[t,i]);return g.jsxs(c,{className:Oe("inline-flex items-center gap-1","font-bold [&]:rounded-md",{"text-sm px-1.5 py-0.5":!l,"py-1 px-2":l,"cursor-pointer":o},r),style:f,onClick:o?e.onClick:void 0,"data-testid":"tag",children:[n??t,l&&g.jsx(Cf,{"aria-label":`Remove ${t}`,className:"p-0 text-lg leading-5.5",onClick:e.onClose,children:g.jsx(De,{icon:Fy,size:"sm"})})]})},uxe=({tags:e,onTagClick:t,colorGenerator:n})=>e.length===0?g.jsx("i",{className:"whitespace-nowrap",children:g.jsx("small",{children:"No tags"})}):g.jsx("div",{className:"inline-flex flex-wrap gap-1 items-center",children:e.map(r=>g.jsx(i1,{text:r,colorGenerator:n,onClick:()=>t?.(r)},r))}),cxe=({shortUrl:e,onTagClick:t,ColorGenerator:n,useTimeoutToggle:r})=>{const[i,o]=r({initialValue:!1,delay:500}),l=_.useRef(!0),[{excludeBots:c}]=r1(),f=jn("visits"),h=c??f?.excludeBots;return _.useEffect(()=>{l.current||o(),l.current=!1},[e.visitsSummary.total,e.visitsSummary.nonBots,o]),g.jsxs(ze.Row,{className:"relative",children:[g.jsx(ze.Cell,{className:"whitespace-nowrap",columnName:"Created at:",children:g.jsx(Ly,{date:e.dateCreated})}),g.jsx(ze.Cell,{columnName:"Short URL:",children:g.jsxs("span",{className:"lg:whitespace-nowrap inline-flex items-center gap-x-2",children:[g.jsx(Ci,{href:e.shortUrl,className:"max-md:break-all lg:truncate max-w-72"}),g.jsx(YR,{text:e.shortUrl})]})}),g.jsx(ze.Cell,{className:"break-all",columnName:`${e.title?"Title":"Long URL"}:`,children:g.jsx(Ci,{href:e.longUrl,children:e.title??e.longUrl})}),e.title&&g.jsx(ze.Cell,{className:"break-all [&]:lg:hidden",columnName:"Long URL:",children:g.jsx(Ci,{href:e.longUrl})}),g.jsx(ze.Cell,{columnName:"Tags:",children:g.jsx(uxe,{tags:e.tags,colorGenerator:n,onTagClick:t})}),g.jsx(ze.Cell,{className:"lg:text-right",columnName:"Visits:",children:g.jsx(SB,{visitsCount:h?e.visitsSummary.nonBots:e.visitsSummary.total,shortUrl:e,active:i,asLink:!0})}),g.jsx(ze.Cell,{columnName:"Status:",className:"max-lg:border-none",children:g.jsxs("div",{className:"inline-flex gap-2",children:[g.jsx(oxe,{shortUrl:e}),e.hasRedirectRules&&g.jsx(_B,{asLink:!0,shortUrl:e,suffix:"redirect-rules",title:"This short URL has dynamic redirect rules",children:g.jsx(De,{icon:p6})})]})}),g.jsx(ze.Cell,{className:"text-right max-lg:absolute max-lg:top-1 max-lg:right-1 max-lg:p-0",children:g.jsx(ixe,{shortUrl:e})})]})},fxe=ea(cxe,["ColorGenerator","useTimeoutToggle"]),b_=({children:e,danger:t})=>g.jsx(ze.Row,{children:g.jsx(ze.Cell,{colSpan:6,className:Oe("text-center",{"text-danger font-bold":t}),children:e})}),dxe=({shortUrlsList:e,onTagClick:t})=>{const{status:n}=e;return n==="error"?g.jsx(b_,{danger:!0,children:"Something went wrong while loading short URLs :("}):n==="loading"?g.jsx(b_,{children:"Loading..."}):n!=="loaded"||e.shortUrls.data.length===0?g.jsx(b_,{children:"No results found"}):e.shortUrls.data.map(r=>g.jsx(fxe,{shortUrl:r,onTagClick:t},r.shortUrl))},CB=({orderByColumn:e,renderOrderIcon:t,shortUrlsList:n,onTagClick:r})=>{const i=Oe({"cursor-pointer":!!e});return g.jsx(ze,{className:"mb-[-1px] w-full",header:g.jsxs(ze.Row,{children:[g.jsxs(ze.Cell,{className:i,onClick:e?.("dateCreated"),children:["Created at ",t?.("dateCreated")]}),g.jsxs(ze.Cell,{className:i,onClick:e?.("shortCode"),children:["Short URL ",t?.("shortCode")]}),g.jsxs(ze.Cell,{children:[g.jsxs(Cf,{className:Oe("p-0",i),onClick:e?.("title"),children:["Title ",t?.("title")]})," / ",g.jsxs(Cf,{className:Oe("p-0",i),onClick:e?.("longUrl"),children:[g.jsx("span",{className:"whitespace-nowrap",children:"Long URL"})," ",t?.("longUrl")]})]}),g.jsx(ze.Cell,{children:"Tags"}),g.jsx(ze.Cell,{className:i,onClick:e?.("visits"),children:g.jsxs("span",{className:"whitespace-nowrap",children:["Visits ",t?.("visits")]})}),g.jsx(ze.Cell,{colSpan:2,"aria-hidden":!0})]}),children:g.jsx(dxe,{shortUrlsList:n,onTagClick:r})})},rS=({children:e,title:t,link:n,tooltip:r})=>{const{anchor:i,tooltip:o}=Qo({placement:"bottom"});return g.jsxs(g.Fragment,{children:[g.jsx(Pr,{to:n,className:"no-underline text-inherit",...i,children:g.jsxs(Ot,{className:Oe("text-center border-t-3 border-t-lm-main dark:border-t-dm-main relative"),children:[g.jsx(De,{icon:zK,size:"3x",className:"absolute right-[5px] bottom-[5px] opacity-10 -rotate-45"}),g.jsx("div",{role:"heading","aria-level":5,className:"text-xl uppercase text-placeholder font-bold mb-2",children:t}),g.jsx("div",{className:"text-4xl font-semibold",children:e})]})}),r&&g.jsx(Jo,{...o,children:r})]})},bL=({loading:e,excludeBots:t,visitsSummary:n,...r})=>g.jsx(rS,{tooltip:n.bots!==void 0?g.jsxs(g.Fragment,{children:[t?"Plus":"Including"," ",g.jsx("b",{"data-testid":"tooltip-amount",children:bn(n.bots)})," potential bot visits"]}):void 0,...r,children:e?"Loading...":bn(t&&n.nonBots!==void 0?n.nonBots:n.total)}),xL=({children:e,titleLinkText:t,titleLink:n,title:r})=>g.jsxs(an,{className:"card",children:[g.jsxs(an.Header,{className:"flex justify-between items-center",children:[g.jsx("span",{className:"sm:hidden",children:r}),g.jsx("h5",{className:"hidden sm:inline",children:r}),g.jsxs(Pr,{to:n,children:[t," »"]})]}),g.jsx(an.Body,{children:e})]}),_L={total:0,bots:0,nonBots:0},hxe=Ea(()=>{const{shortUrlsList:e,listShortUrls:t}=Yz(),{loadVisitsOverview:n,visitsOverview:r}=xbe(),i=r.status==="loading",{orphanVisits:o,nonOrphanVisits:l}=r.status==="loaded"?r:{orphanVisits:_L,nonOrphanVisits:_L},{tagsList:c}=Im(),f=c.status==="loading",h=ss(),m=Ja(),y=jn("visits");return _.useEffect(()=>{t({itemsPerPage:Gz,orderBy:{field:"dateCreated",dir:"DESC"}}),n()},[t,n]),g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-4 gap-4",children:[g.jsx(bL,{title:"Visits",link:`${h}/non-orphan-visits`,excludeBots:y?.excludeBots??!1,loading:i,visitsSummary:l}),g.jsx(bL,{title:"Orphan visits",link:`${h}/orphan-visits`,excludeBots:y?.excludeBots??!1,loading:i,visitsSummary:o}),g.jsxs(rS,{title:"Short URLs",link:`${h}/list-short-urls/1`,children:[e.status==="loading"&&"Loading...",e.status==="loaded"&&bn(e.shortUrls.pagination.totalItems)]}),g.jsx(rS,{title:"Tags",link:`${h}/manage-tags`,children:f?"Loading...":bn(c.tags.length)})]}),g.jsx(xL,{title:"Create a short URL",titleLinkText:"Advanced options",titleLink:`${h}/create-short-url`,children:g.jsx(bB,{basicMode:!0})}),g.jsx(xL,{title:"Recently created URLs",titleLinkText:"See all",titleLink:`${h}/list-short-urls/1`,children:g.jsx(CB,{shortUrlsList:e,onTagClick:x=>m(`${h}/list-short-urls/1?tags=${encodeURIComponent(x)}`)})})]})},()=>[Xi.visits,Xi.orphanVisits]);function Ur(e){e.preventDefault()}function Ol(e){e.stopPropagation()}function EB(){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[AB,OB]=EB();function mxe(e,t){return e.source===t.source&&e.flags.split("").sort().join("")===t.flags.split("").sort().join("")}function tm(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 mxe(e,t);if(e===null||t===null)return!1;const i=e,o=t;if(Object.keys(i).length!==Object.keys(o).length)return!1;for(const l of r)if((l in i||l in o)&&i[l]!==o[l])return!1;for(const l in i)if(!(l in o)||i[l]!==o[l]&&!n||n&&!tm(i[l],o[l],n,r))return!1;return!0}return!1}function TB(e){return e.split(" ").filter(t=>t)}function Gf(e){return{x:e.clientX,y:e.clientY}}Array();var R4=typeof window<"u",jr=new WeakMap,Qa=new WeakMap;function jB(){if(!R4)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 pxe={affectedNodes:[],coordinates:{x:0,y:0},currentTargetValue:void 0,on:OB,emit:AB,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},Re=pxe,_l=!1,wL,x_;function gxe(){Re.scrollDebounceTimeout&&clearTimeout(Re.scrollDebounceTimeout),Re.longPressTimeout&&clearTimeout(Re.longPressTimeout),Re.frameIdX!==void 0&&cancelAnimationFrame(Re.frameIdX),Re.frameIdY!==void 0&&cancelAnimationFrame(Re.frameIdY),Re={affectedNodes:[],coordinates:{x:0,y:0},on:OB,emit:AB,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 MB(e){return Object.assign(Re,e),e.initialParent.data.emit("dragStarted",Re),_l=!1,Re.emit("dragStarted",Re),Re}function vxe(){Re.activeState&&qu(Re.activeState.parent,void 0,Re),Re.selectedState&&Mu(Re.selectedState.nodes,Re.selectedState.parent,Re),Re.selectedState=Re.activeState=void 0}function yxe(){if(Re.pointerDown&&(Re.pointerDown.node.el.draggable=!0),Re.pointerDown=void 0,!ji(Re))return;const e=Re.currentParent.data.config;ji(Re)&&e.handleEnd(Re)}function bxe(e){e.key==="Escape"&&(Re.selectedState&&Mu(Re.selectedState.nodes,Re.selectedState.parent,Re),Re.activeState&&qu(Re.activeState.parent,void 0,Re),Re.selectedState=Re.activeState=void 0)}function xxe(e){if(!$r(Re))return;_l=!0;const t=Re.initialParent.data.config.handleEnd;t(Re)}function _xe(e){if(!$r(Re))return;Ur(e);const{x:t,y:n}=Gf(e);$r(Re)&&s1({x:t,y:n},e,Re)}function wxe(e){if(!Re.pointerDown||!Re.pointerDown.validated)return;const t=Re.pointerDown.parent.data.config;if(!(e.pointerType==="mouse"&&!jB()))if(ji(Re))ji(Re)&&SL(e,Re);else{if(Ur(e),t.longPress&&!Re.longPress){clearTimeout(Re.longPressTimeout),Re.longPress=!1;return}const n=t.draggedNodes(Re.pointerDown);t.dragstartClasses(Re.pointerDown.node,n,t,!0);const r=Re.pointerDown.node.el.getBoundingClientRect(),i=Xxe(Re.pointerDown.node,Re.pointerDown.parent,e,Re,n,r);SL(e,i,!0)}}function Sxe({parent:e,getValues:t,setValues:n,config:r={}}){if(!R4)return;wL||(wL=Ry(document,{dragover:_xe,pointerdown:vxe,pointerup:yxe,keydown:bxe,drop:xxe,pointermove:wxe,pointercancel:pi(r.handlePointercancel),touchmove:c=>{$r(Re)&&c.cancelable&&Ur(c)},contextmenu:c=>{ji(Re)&&Ur(c)}})),NB(e);const[i,o]=EB(),l={getValues:t,setValues:n,config:{dragDropEffect:r.dragDropEffect??"move",dragEffectAllowed:r.dragEffectAllowed??"move",draggedNodes:kxe,dragstartClasses:Uxe,handleNodeKeydown:Fxe,handleDragstart:zxe,handleNodeDragover:Jxe,handleParentDragover:e2e,handleNodeDrop:Hxe,handleNodeFocus:qxe,handleNodeBlur:Gxe,handlePointercancel:Wxe,handleEnd:Kxe,handleDragend:Yxe,handleParentFocus:Exe,handleNodePointerup:Zxe,handleNodePointerover:Vxe,handleParentPointerover:t2e,handleParentScroll:Ixe,handleNodePointerdown:Bxe,handleNodeDragenter:r2e,handleNodeDragleave:i2e,handleParentDrop:Oxe,multiDrag:r.multiDrag??!1,nativeDrag:r.nativeDrag??!0,performSort:Cxe,performTransfer:Axe,root:r.root??document,setupNode:jxe,setupNodeRemap:LB,reapplyDragClasses:Mxe,tearDownNode:Nxe,tearDownNodeRemap:Pxe,remapFinished:Rxe,threshold:{horizontal:0,vertical:0},...r},enabledNodes:[],abortControllers:{},privateClasses:[],on:o,emit:i};new MutationObserver(Lxe).observe(e,{childList:!0}),jr.set(e,l),r.plugins?.forEach(c=>{c(e)?.tearDown?.()}),r.plugins?.forEach(c=>{c(e)?.tearDown?.()}),r.plugins?.forEach(c=>{c(e)?.setup?.()}),Txe(e,l),a1(e,!0)}function PB(e,t,n,r,i,o){const{x:l,y:c}=Gf(n),f=e.el.getBoundingClientRect();return{affectedNodes:[],ascendingDirection:!1,clonedDraggedEls:[],coordinates:{x:l,y:c},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||l-(f?.left??0),startTop:o||c-(f?.top??0),targetIndex:e.data.index,transferred:!1}}function Cxe({parent:e,draggedNodes:t,targetNodes:n}){a1(e.el);const r=t.map(f=>f.data.value),i=Ef(e.el,e.data),o=t[0].data.index,l=[...e.data.enabledNodes],c=[...i.filter(f=>!r.some(h=>tm(f,h)))];c.splice(n[0].data.index,0,...r),"draggedNode"in Re&&(Re.currentTargetValue=n[0].data.value),iS(e.el,e.data,[...c]),e.data.config.onSort&&e.data.config.onSort({parent:{el:e.el,data:e.data},previousValues:[...i],previousNodes:[...l],nodes:[...e.data.enabledNodes],values:[...c],draggedNodes:t,previousPosition:o,position:n[0].data.index,targetNodes:n,state:Re})}function qu(e,t,n){if(!t){n.activeState=void 0;return}n.activeState={node:t,parent:e}}function Mu(e,t,n){const r=t.data.config.selectedClass;if(!n.selectedState)return;const i=Array.from(e);il(e.map(o=>o.el),r);for(const o of i){o.el.setAttribute("aria-selected","false");const l=n.selectedState.nodes.findIndex(c=>c.el===o.el);l!==-1&&n.selectedState.nodes.splice(l,1)}}function Fg(e,t,n,r,i=!1){r.pointerSelection=i;for(const o of t)o.el.setAttribute("aria-selected","true"),uf([o.el],e.data.config.selectedClass,!0);r.selectedState={nodes:t,parent:e},qu(e,n,r)}function Exe(e,t){const n=e.targetData.parent.data.enabledNodes[0];n&&(t.selectedState&&t.selectedState.parent.el!==e.targetData.parent.el?qu(e.targetData.parent,n,t):t.selectedState||qu(e.targetData.parent,n,t))}function Axe({currentParent:e,targetParent:t,initialParent:n,draggedNodes:r,initialIndex:i,targetNodes:o,state:l}){a1(n.el);const c=r.map(x=>x.data.value),f=[...Ef(e.el,e.data).filter(x=>!c.some(b=>tm(x,b)))],h=Ef(t.el,t.data),m=n.el===t.el&&t.data.config.sortable===!1;let y;o.length?(m?y=i:t.data.config.sortable===!1?y=t.data.enabledNodes.length:y=o[0].data.index,h.splice(y,0,...c)):(y=m?i:t.data.enabledNodes.length,h.splice(y,0,...c)),iS(e.el,e.data,f),iS(t.el,t.data,h),t.data.config.onTransfer&&t.data.config.onTransfer({sourceParent:e,targetParent:t,initialParent:n,draggedNodes:r,targetIndex:y,state:l,targetNodes:o}),e.data.config.onTransfer&&e.data.config.onTransfer({sourceParent:e,targetParent:t,initialParent:n,draggedNodes:r,targetIndex:y,state:l,targetNodes:o||[]})}function Ef(e,t){return[...t.getValues(e)]}function iS(e,t,n){t.setValues(n,e)}function Oxe(e,t){Ol(e.e),_l=!0;const n=t.initialParent.data.config.handleEnd;n(t)}function NB(e){const t=jr.get(e);t&&t.abortControllers.mainParent&&t.abortControllers.mainParent.abort()}function $r(e){return"draggedNode"in e&&!!e.draggedNode}function ji(e){return"synthDragging"in e&&!!e.synthDragging}function Txe(e,t){t.abortControllers.mainParent=Ry(e,{dragover:Vg(t.config.handleParentDragover),handleParentPointerover:t.config.handleParentPointerover,scroll:Vg(t.config.handleParentScroll),drop:Vg(t.config.handleParentDrop),hasNestedParent:n=>{const r=jr.get(n.target);r&&(r.nestedParent=n.detail.parent)},focus:Vg(t.config.handleParentFocus)}),t.config.externalDragHandle&&t.config.externalDragHandle.el&&t.config.externalDragHandle.callback&&(t.abortControllers.externalDragHandle=Ry(t.config.externalDragHandle.el,{pointerdown:n=>{if(!t.config.externalDragHandle||!t.config.externalDragHandle.callback)return;const r=t.config.externalDragHandle.callback();if(!l1(r)){console.warn("No draggable item found from external drag handle callback");return}const i=Qa.get(r);if(!i)return;const o=r.parentNode;if(!(o instanceof HTMLElement))return;const l=jr.get(o);l&&(Re.pointerDown={parent:{el:o,data:l},node:{el:r,data:i},validated:!0},r.draggable=!0)}}))}function jxe(e){const t=e.parent.data.config;e.node.data.abortControllers.mainNode=Ry(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=>{$r(Re)&&n.cancelable&&Ur(n)},contextmenu:n=>{ji(Re)&&Ur(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 LB(e){Qa.set(e.node.el,e.node.data),e.parent.data.config.plugins?.forEach(t=>{t(e.parent.el)?.setupNodeRemap?.(e)})}function Mxe(e,t){if(!$r(Re))return;const n=ji(Re)?t.config.synthDropZoneClass:t.config.dropZoneClass;Re.draggedNode.el===e&&uf([e],n,!0)}function Pxe(e){e.parent.data.config.plugins?.forEach(t=>{t(e.parent.el)?.tearDownNodeRemap?.(e)})}function Nxe(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 Lxe(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)||!jr.get(t)||a1(t)}function a1(e,t){const n=jr.get(e);if(!n)return;n.privateClasses=Array.from(e.classList);const r=[],i=n.config;for(let c=0;c<e.children.length;c++){const f=e.children[c];if(!l1(f)||f.id==="dnd-dragged-node-clone")continue;const h=Qa.get(f);(t||!h)&&i.tearDownNode({parent:{el:e,data:n},node:{el:f,data:h}}),!i.disabled&&(!i.draggable||i.draggable&&i.draggable(f))&&r.push(f)}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 o=n.getValues(e),l=[];for(let c=0;c<r.length;c++){const f=r[c],h=Qa.get(f);if(i.draggableValue&&!i.draggableValue(o[c]))continue;const m=Object.assign(h??{privateClasses:[],abortControllers:{}},{value:o[c],index:c});if(!$r(Re)&&Re.activeState&&tm(Re.activeState.node.data.value,m.value)&&qu({data:n,el:e},{el:f,data:m},Re),$r(Re)&&tm(Re.draggedNode.data.value,m.value)){Re.draggedNode.data=m,Re.draggedNode.el=f;const y=Re.draggedNodes.find(x=>x.data.value===m.value);y&&(y.el=f)}l.push({el:f,data:m}),(t||!h)&&i.setupNode({parent:{el:e,data:n},node:{el:f,data:m}}),LB({parent:{el:e,data:n},node:{el:f,data:m}})}jr.set(e,{...n,enabledNodes:l}),i.remapFinished(n),n.config.plugins?.forEach(c=>{c(e)?.remapFinished?.()})}function Rxe(){Re.remapJustFinished=!0,"draggedNode"in Re&&(Re.affectedNodes=[])}function Dxe(e){return!!e.targetData.parent.data.config.nativeDrag}function kxe(e){if(e.parent.data.config.multiDrag){if(Re.selectedState)return[e.node,...Re.selectedState?.nodes.filter(t=>t.el!==e.node.el)]}else return[e.node];return[]}function Ixe(e){$r(Re)&&(Re.emit("scrollStarted",Re),!ji(Re)&&(Re.preventEnter=!0,x_&&clearTimeout(x_),x_=setTimeout(()=>{Re.preventEnter=!1,Re.emit("scrollEnded",Re)},100)))}function zxe(e,t){const n=e.targetData.parent.data.config;if(!n.nativeDrag||!Dxe(e)||!RB({x:e.e.clientX,y:e.e.clientY,node:e.targetData.node,config:n})){Ur(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=$xe(e,r);if(n.onDragstart){const o={parent:e.targetData.parent,values:Ef(e.targetData.parent.el,e.targetData.parent.data),draggedNode:i.draggedNode,draggedNodes:i.draggedNodes,position:i.initialIndex,state:i};n.onDragstart(o)}}function Bxe(e,t){if(Ol(e.e),t.pointerDown={parent:e.targetData.parent,node:e.targetData.node,validated:!1},!RB({x:e.e.clientX,y:e.e.clientY,node:e.targetData.node,config:e.targetData.parent.data.config}))return;t.pointerDown.validated=!0,Qxe(e,t,e.targetData.node);const n=e.targetData.parent.data;let r=[e.targetData.node];const i=e.e.ctrlKey||e.e.metaKey,o=e.e.shiftKey,l=e.targetData.node;if(i&&n.config.multiDrag){t.selectedState?t.selectedState.nodes.findIndex(c=>c.el===l.el)===-1?r=[...t.selectedState.nodes,l]:r=t.selectedState.nodes.filter(c=>c.el!==l.el):r=[l],Fg(e.targetData.parent,r,e.targetData.node,t,!0);return}if(o&&n.config.multiDrag){const c=e.targetData.parent.data.enabledNodes;if(t.selectedState&&t.activeState)if(t.selectedState.parent.el!==e.targetData.parent.el){Mu(t.selectedState.nodes,t.selectedState.parent,t),t.selectedState=void 0;for(let f=0;f<=l.data.index;f++)r.push(c[f])}else{const[f,h]=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=c.slice(f,h+1)}else for(let f=0;f<=l.data.index;f++)r.push(c[f]);Fg(e.targetData.parent,r,e.targetData.node,t,!0);return}t.selectedState?.nodes?.length?t.selectedState.nodes.findIndex(c=>c.el===e.targetData.node.el)===-1&&(t.selectedState.parent.el!==e.targetData.parent.el?Mu(t.selectedState.nodes,e.targetData.parent,t):n.config.multiDrag&&jB()?r.push(...t.selectedState.nodes):Mu(t.selectedState.nodes,e.targetData.parent,t),Fg(e.targetData.parent,r,e.targetData.node,t,!0)):Fg(e.targetData.parent,[e.targetData.node],e.targetData.node,t,!0)}function Uxe(e,t,n,r=!1){uf(t.map(i=>i.el),r?n.synthDraggingClass:n.draggingClass),setTimeout(()=>{il(t.map(i=>i.el),r?n.synthDraggingClass:n.draggingClass),uf(t.map(i=>i.el),r?n.synthDragPlaceholderClass:n.dragPlaceholderClass),uf(t.map(i=>i.el),r?n.synthDropZoneClass:n.dropZoneClass),il(t.map(i=>i.el),n.selectedClass)})}function $xe(e,t){Ol(e.e);const n=MB(PB(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 o=document.createElement("div");o.setAttribute("id","dnd-dragged-node-clone"),o.setAttribute("popover","manual");for(const c of t){const f=c.el.cloneNode(!0);f.id=c.el.id+"-clone",f.style.pointerEvents="none",o.appendChild(f)}const{width:l}=t[0].el.getBoundingClientRect();Object.assign(o.style,{display:"flex",flexDirection:"column",width:`${l}px`,position:"absolute",pointerEvents:"none",zIndex:"9999",left:"-9999px",boxSizing:"border-box",background:"transparent",overflow:"hidden"}),e.targetData.parent.el.appendChild(o),o.showPopover(),o.getBoundingClientRect(),i=o,e.e.dataTransfer.setDragImage(i,e.e.offsetX,e.e.offsetY)}}setTimeout(()=>{i?.remove()})}return n}function RB({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 o=r.root.elementFromPoint(e,t);if(!o)return!1;for(const l of Array.from(i))if(o===l||l.contains(o))return!0;return!1}function Fxe(e){}function Vxe(e){e.detail.targetData.parent.el===e.detail.state.currentParent.el?kB(e.detail,e.detail.state):o1(e.detail,e.detail.state)}function Hxe(e,t){const n=e.targetData.parent.data.config;n.nativeDrag&&(Ol(e.e),_l=!0,n.handleEnd(t))}function qxe(e){e.e.target!==e.e.currentTarget&&Re.pointerDown&&(Re.pointerDown.node.el.draggable=!1)}function Gxe(e){e.e.target!==e.e.currentTarget&&Re.pointerDown&&(Re.pointerDown.node.el.draggable=!0)}function Yxe(e,t){const n=e.targetData.parent.data.config;if(n.nativeDrag){if(Ur(e.e),Ol(e.e),_l){_l=!1;return}n.handleEnd(t)}}function Wxe(e,t){if(!ji(t))return;if(Ur(e.e),_l){_l=!1;return}const n=jr.get(t.initialParent.el)?.config;n?.onDragend&&n.onDragend({parent:t.currentParent,values:Ef(t.currentParent.el,t.currentParent.data),draggedNode:t.draggedNode,draggedNodes:t.draggedNodes,state:t}),n?.handleEnd(t)}function Kxe(e){e.draggedNode&&(e.draggedNode.el.draggable=!0);const t=e.draggedNodes.map(m=>m.el),n=e.initialParent.data,r=ji(e),i=jr.get(e.initialParent.el)?.config,o=r?i?.synthDropZoneClass:i?.dropZoneClass,l=n?.config?.longPressClass,c=r?n?.config?.synthDragPlaceholderClass:n?.config?.dragPlaceholderClass,f=e.originalZIndex;ji(e)&&(e.clonedDraggedNode&&e.clonedDraggedNode.remove(),e.longPressTimeout&&clearTimeout(e.longPressTimeout)),aS(e),e.lastScrollDirectionX=void 0,e.lastScrollDirectionY=void 0,e.preventEnter=!1,e.scrollDebounceTimeout&&(clearTimeout(e.scrollDebounceTimeout),e.scrollDebounceTimeout=void 0),f!==void 0&&e.draggedNode&&(e.draggedNode.el.style.zIndex=f),requestAnimationFrame(()=>{il(t,o),il(t,l),il(t,c)}),Mu(e.draggedNodes,e.currentParent,e),qu(e.currentParent,void 0,e);const h={...e};i?.onDragend?.({parent:h.currentParent,values:Ef(h.currentParent.el,h.currentParent.data),draggedNode:h.draggedNode,draggedNodes:h.draggedNodes,state:h}),e.emit("dragEnded",h),gxe()}function Zxe(e,t){Ol(e.e),!t.pointerSelection&&t.selectedState&&Mu(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,il(e.targetData.parent.data.enabledNodes.map(r=>r.el),n.longPressClass),$r(t)&&n.handleEnd(t)}function Xxe(e,t,n,r,i,o){const l=t.data.config;let c,f;const h=["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=(b,w)=>{const C=window.getComputedStyle(b);h.forEach(O=>{w.style[O]=C[O]})},y=(b,w={})=>{Object.assign(b.style,{position:"absolute",zIndex:"9999",pointerEvents:"none",willChange:"transform",boxSizing:"border-box",opacity:"0",overflow:"hidden",width:`${o.width}px`,height:`${o.height}px`,...w})};if(l.synthDragImage)f=l.synthDragImage(e,t,n,i),c=f.dragImage,c.setAttribute("popover","manual"),y(c);else if(!l.multiDrag||i.length===1)c=e.el.cloneNode(!0),m(e.el,c),c.setAttribute("popover","manual"),y(c);else{const b=document.createElement("div");b.setAttribute("popover","manual"),i.forEach(w=>{const C=w.el.cloneNode(!0);m(w.el,C),C.style.pointerEvents="none",C.style.margin="0",b.append(C)}),b.style.display="flex",b.style.flexDirection="column",b.style.padding="0",b.style.margin="0",b.style.position="absolute",b.style.zIndex="9999",b.style.pointerEvents="none",c=b}c.id="dnd-dragged-node-clone",t.el.appendChild(c),c.showPopover();const x={clonedDraggedEls:[],clonedDraggedNode:c,synthDragScrolling:!1,synthDragging:!0,rootScrollWidth:document.scrollingElement?.scrollWidth,rootScrollHeight:document.scrollingElement?.scrollHeight};return MB({...PB(e,t,n,i,f?.offsetX,f?.offsetY),...x})}function Qxe(e,t,n){const r=e.targetData.parent.data.config;t.longPressTimeout=setTimeout(()=>{t&&(t.longPress=!0,r.longPressClass&&e.e.cancelable&&uf([n.el],r.longPressClass),Ur(e.e))},r.longPressDuration||1e3)}function aS(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 DB(e,t=!1){const{x:n,y:r}=e.coordinates,i=e.startLeft??0,o=e.startTop??0,l=window.scrollX??0,c=window.scrollY??0,f=n-i+l,h=r-o+c;e.clonedDraggedNode.style.transform=`translate3d(${f}px, ${h}px, 0px)`,t&&(e.clonedDraggedNode.style.opacity="1",il(e.draggedNodes.map(m=>m.el),e.initialParent.data.config?.longPressClass))}function SL(e,t,n=!1){const r=Gf(e);t.coordinates.x=r.x,t.coordinates.y=r.y,DB(t,n),t.scrollDebounceTimeout&&(clearTimeout(t.scrollDebounceTimeout),t.scrollDebounceTimeout=void 0),t.scrollDebounceTimeout=setTimeout(()=>{ji(t)&&s1(t.coordinates,e,t)},16);const i=l2e(r);if(!i){document.dispatchEvent(new CustomEvent("handleRootPointerover",{detail:{e,state:t}}));return}const o={e,targetData:i,state:t};"node"in i?i.node.el.dispatchEvent(new CustomEvent("handleNodePointerover",{detail:o})):i.parent.el.dispatchEvent(new CustomEvent("handleParentPointerover",{detail:o}))}function Jxe(e,t){if(!e.targetData.parent.data.config.nativeDrag)return;const{x:n,y:r}=Gf(e.e);t.coordinates.y=r,t.coordinates.x=n,Ur(e.e),Ol(e.e),$r(t)&&s1({x:n,y:r},e.e,t),e.targetData.parent.el===t.currentParent?.el?kB(e,t):o1(e,t)}function e2e(e,t){if(!e.targetData.parent.data.config.nativeDrag)return;Ur(e.e),Ol(e.e);const{x:n,y:r}=Gf(e.e);$r(t)&&s1({x:n,y:r},e.e,t),o1(e,t)}function t2e(e){e.detail.targetData.parent.el!==e.detail.state.currentParent.el&&o1(e.detail,e.detail.state)}function n2e({currentParent:e,targetParent:t,initialParent:n,draggedNodes:r,state:i}){if(t.el===e.el)return!1;const o=t.data.config;if(r[0].el.contains(t.el)||o.dropZone===!1)return!1;const l=n.data.config;return o.accepts?o.accepts(t,n,e,i):!(!o.group||o.group!==l.group)}function r2e(e,t){Ur(e.e)}function i2e(e,t){Ur(e.e)}function a2e(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(),o=t.draggedNode.el.getBoundingClientRect(),l=i.y-o.y,c=i.x-o.x;let f;Math.abs(l)>Math.abs(c)?f=l>0?"above":"below":f=c>0?"left":"right";const h=t.currentParent.data.config.threshold;switch(f){case"left":if(n>i.x+i.width*h.horizontal)return t.incomingDirection="left",!0;break;case"right":if(n<i.x+i.width*(1-h.horizontal))return t.incomingDirection="right",!0;break;case"above":if(r>i.y+i.height*h.vertical)return t.incomingDirection="above",!0;break;case"below":if(r<i.y+i.height*(1-h.vertical))return t.incomingDirection="below",!0;break}return!1}function kB(e,t){const{x:n,y:r}=Gf(e.e);if(!a2e(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(o=>i[0]<=o.data.index&&o.data.index<=i[1]&&o.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=Qa.get(n);if(!r)return;const i=jr.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},Re)}}function o1(e,t){Ur(e.e),n2e({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 Vg(e){function t(n){const r=jr.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},Re)}}function uf(e,t,n=!1){function r(i,o){Qa.set(i,o)}for(const i of e){const o=Qa.get(i),l=o2e(i,t,o,n);l&&r(i,l)}}function o2e(e,t,n,r=!1){if(!t)return;const i=TB(t);if(!i.length)return;if(!n){e.classList.add(...i);return}const o=[];for(const l of i)e.classList.contains(l)?e.classList.contains(l)&&r===!1&&o.push(l):e.classList.add(l);return n.privateClasses=o,n}function il(e,t){if(!t)return;const n=TB(t);if(n.length)for(const r of e){if(!l1(r)){r.classList.remove(...n);continue}const i=Qa.get(r)||jr.get(r);if(i)for(const o of n)i.privateClasses.includes(o)||r.classList.remove(o)}}function CL(e,t,n,r,i){const o=i.axis==="x",l=e===document.scrollingElement,c=o?"scrollLeft":"scrollTop",f=o?"clientWidth":"clientHeight",h=o?"offsetWidth":"offsetHeight",m=o?"scrollWidth":"scrollHeight",y=o?t.clientX:t.clientY,x=o?r.left:r.top,b=o?n.overflowX:n.overflowY;if(l){const w=e[c],C=e[f],O=w>0,T=w+C<(o?i.state.rootScrollWidth||0:e[m]);return o?{left:O&&y<C*.075,right:T&&y>C*(1-.075)}:{up:O&&y<C*.075,down:T&&y>C*(1-.075)}}if((b==="auto"||b==="scroll")&&e!==document.body&&e!==document.documentElement){const w=e[m],C=e[h],O=e[c],T=O>0,P=O<w-C;return o?{left:T&&y<x+C*.075,right:P&&y>x+C*(1-.075)}:{up:T&&y<x+C*.075,down:P&&y>x+C*(1-.075)}}return o?{left:!1,right:!1}:{up:!1,down:!1}}function s2e(e,t,n,r){if(!$r(n)||!n.draggedNode)return;n.preventEnter=!0;const i=r.axis==="x",o=r.direction==="positive"?1:-1,l=20,c=i?"lastScrollDirectionX":"lastScrollDirectionY",f=i?"frameIdX":"frameIdY";n[f]!==void 0&&(cancelAnimationFrame(n[f]),n[f]=void 0),n[c]=r.direction;const h=()=>{if(!$r(n)||!n.draggedNode){n[f]!==void 0&&(cancelAnimationFrame(n[f]),n[f]=void 0);return}const m=i?"scrollLeft":"scrollTop",y=i?"clientWidth":"clientHeight",x=i?"scrollWidth":"scrollHeight",b=e[m],w=e[y],C=e[x];if(!(o>0?b+w<C:b>0)){n[f]=void 0,n[c]=void 0;return}e[m]+=l*o,ji(n)&&DB(n),n[f]=requestAnimationFrame(h)};n[f]=requestAnimationFrame(h)}function EL(e,t,n){const r=e.getBoundingClientRect();return t>=r.left&&t<=r.right&&n>=r.top&&n<=r.bottom}function s1(e,t,n){if(!$r(n)||!n.draggedNode)return;aS(n);const{x:r,y:i}=e;let o=!1;const l=(f,h,m)=>{s2e(m,t,n,{axis:f,direction:h}),o=!0},c=f=>{const h=window.getComputedStyle(f),m=f.getBoundingClientRect(),y=CL(f,t,h,m,{axis:"x",state:n}),x=CL(f,t,h,m,{axis:"y"});(y.left||y.right)&&(n.lastScrollContainerX=f,l("x",y.right?"positive":"negative",f)),(x.up||x.down)&&(n.lastScrollContainerY=f,l("y",x.down?"positive":"negative",f))};if(n.lastScrollContainerX&&EL(n.lastScrollContainerX,r,i)&&c(n.lastScrollContainerX),!o&&n.lastScrollContainerY&&EL(n.lastScrollContainerY,r,i)&&c(n.lastScrollContainerY),!o){let f=document.elementFromPoint(r,i);for(;f&&!(o&&n.lastScrollContainerX&&n.lastScrollContainerY);)f instanceof HTMLElement&&c(f),f=f.parentElement}if(!o){const f=document.scrollingElement;f instanceof HTMLElement&&c(f)}o||aS(n)}function l2e(e){let t=document.elementFromPoint(e.x,e.y);if(!l1(t))return;let n,r=!0;for(;t&&r;){if(Qa.has(t)||jr.has(t)){r=!1,n=jr.has(t);break}t=t.parentNode}if(n){const i=jr.get(t);return i?{parent:{el:t,data:i}}:void 0}else{const i=Qa.get(t);if(!i)return;const o=jr.get(t.parentNode);return o?{node:{el:t,data:i},parent:{el:t.parentNode,data:o}}:void 0}}function l1(e){return e instanceof HTMLElement&&e.parentNode instanceof HTMLElement}function Ry(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 u2e(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 c2e(e,t){const n=u2e(e);n&&t(n)}var Dy=new WeakMap;function f2e(e){const t=Dy.get(e);return t?t[0]:(console.warn("No values found for parent element"),[])}function d2e(e,t){const n=Dy.get(t);n&&n[1](e),Dy.set(t,[e,n[1]])}function h2e(e,t){return n=>{Dy.set(n,t),Sxe({parent:n,getValues:f2e,setValues:d2e,config:e})}}function AL(e){R4&&(Array.isArray(e)||(e=[e]),e.forEach(t=>{const{parent:n,state:r,...i}=t;c2e(n,h2e(i,r))}))}function m2e(e,t={}){const n=_.useRef(null),[r,i]=_.useState(e);function o(l={}){AL({parent:n,state:[r,i],...l})}return _.useEffect(()=>{AL({parent:n,state:[r,i],...t})},[r]),_.useEffect(()=>()=>{n.current&&NB(n.current)},[]),[n,r,i,o]}const u1=()=>{const e=iZ();return g.jsx(e0,{size:"lg",className:"[&]:p-1 mr-4",onClick:e,"aria-label":"Go back",children:g.jsx(De,{icon:pH})})},p2e={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"},g2e=({deviceType:e,onDeviceTypeChange:t})=>{const n=rl("desktopDeviceTypes"),r=_.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 g.jsxs(US,{label:"Device type:",value:e??void 0,onChange:i=>t(i.target.value),hiddenRequired:!0,children:[!e&&g.jsx("option",{value:"",children:"- Select type -"}),Object.entries(r).map(([i,o])=>g.jsx("option",{value:i,children:o},i))]})},D4=({value:e,onValueChange:t,label:n,placeholder:r})=>g.jsx(ii,{label:`${n}:`,value:e??"",onChange:i=>t(i.target.value),placeholder:r,hiddenRequired:!0}),v2e=({language:e,onLanguageChange:t})=>g.jsx(D4,{value:e,onValueChange:t,label:"Language",placeholder:"en-US / en"}),__=({name:e,value:t,onNameChange:n,onValueChange:r})=>g.jsxs(g.Fragment,{children:[g.jsx(ii,{label:"Param name:",value:e??"",onChange:i=>n(i.target.value),placeholder:"hello",hiddenRequired:!0}),typeof t=="string"&&g.jsx(ii,{label:"Param value:",value:t,onChange:i=>r(i.target.value),placeholder:"world",hiddenRequired:!0})]}),y2e=({ipAddress:e,onIpAddressChange:t})=>g.jsx(D4,{value:e,onValueChange:t,label:"IP address",placeholder:"192.168.1.10"}),b2e=({countryCode:e,onCountryCodeChange:t})=>g.jsxs(US,{label:"Country:",value:e??void 0,onChange:n=>t(n.target.value),hiddenRequired:!0,children:[!e&&g.jsx("option",{value:"",children:"- Select country -"}),Object.entries(p2e).map(([n,r])=>g.jsx("option",{value:n,children:r},n))]}),x2e=({cityName:e,onCityNameChange:t})=>g.jsx(D4,{value:e,onValueChange:t,label:"City name",placeholder:"New York"}),_2e=({condition:e,onConditionChange:t,onDelete:n})=>{const r=_.useCallback(m=>t({type:m,matchValue:null,matchKey:null}),[t]),i=_.useCallback(m=>t({...e,matchValue:m}),[e,t]),o=_.useCallback(m=>t({...e,matchKey:m}),[e,t]),l=rl("ipRedirectCondition"),c=rl("geolocationRedirectCondition"),f=rl("advancedQueryRedirectConditions"),h=_.useMemo(()=>{const m={device:"Device type",language:"Language","query-param":"Query param"};return f&&(m["any-value-query-param"]="Any value query param",m["valueless-query-param"]="Valueless query param"),l&&(m["ip-address"]="IP address"),c&&(m["geolocation-country-code"]="Country (geolocation)",m["geolocation-city-name"]="City name (geolocation)"),m},[f,c,l]);return g.jsxs("div",{className:Oe("flex flex-col gap-2","border border-lm-border dark:border-dm-border","rounded-md relative p-4 h-full"),children:[g.jsxs("div",{children:[g.jsx(Ct,{variant:"secondary","aria-label":"Remove condition",onClick:n,className:Oe("absolute -top-3.5 -right-3.5 [&]:px-2","[&]:rounded-full bg-lm-primary dark:bg-dm-primary"),children:g.jsx(De,{icon:$y,widthAuto:!0})}),g.jsx(US,{label:"Type:",value:e.type,onChange:m=>r(m.target.value),hiddenRequired:!0,children:Object.entries(h).map(([m,y])=>g.jsx("option",{value:m,children:y},m))})]}),e.type==="device"&&g.jsx(g2e,{deviceType:e.matchValue,onDeviceTypeChange:i}),e.type==="language"&&g.jsx(v2e,{language:e.matchValue,onLanguageChange:i}),e.type==="query-param"&&g.jsx(__,{name:e.matchKey,value:e.matchValue??"",onNameChange:o,onValueChange:i}),e.type==="any-value-query-param"&&g.jsx(__,{name:e.matchKey,onNameChange:o,onValueChange:i}),e.type==="valueless-query-param"&&g.jsx(__,{name:e.matchKey,onNameChange:o,onValueChange:i}),e.type==="ip-address"&&g.jsx(y2e,{ipAddress:e.matchValue,onIpAddressChange:i}),e.type==="geolocation-country-code"&&g.jsx(b2e,{countryCode:e.matchValue,onCountryCodeChange:i}),e.type==="geolocation-city-name"&&g.jsx(x2e,{cityName:e.matchValue,onCityNameChange:i})]})},IB=({isOpen:e,onClose:t,onSave:n,initialData:r})=>{const[i,o]=_.useState(r??{longUrl:"",conditions:[]}),l=_.useCallback(()=>{i&&n(i),t()},[n,i,t]),c=_.useCallback(()=>o(({longUrl:x,conditions:b})=>({longUrl:x,conditions:[...b,{type:"device",matchValue:null,matchKey:null}]})),[]),f=_.useCallback((x,b)=>o(({longUrl:w,conditions:C})=>{const O=[...C];return O[x]=b,{longUrl:w,conditions:O}}),[]),h=_.useCallback(x=>o(({longUrl:b,conditions:w})=>{const C=[...w];return C.splice(x,1),{longUrl:b,conditions:C}}),[]),m=_.useRef(null),y=_.useCallback(()=>o(r??{longUrl:"",conditions:[]}),[r]);return _.useEffect(()=>{const x=new MutationObserver(()=>{m.current&&e&&(m.current.focus(),x.disconnect())});return x.observe(document.body,{childList:!0,subtree:!0}),()=>x.disconnect()},[e]),g.jsxs(eo,{size:"xl",title:"Redirect rule",open:e,onClose:t,onClosed:y,onConfirm:l,confirmDisabled:i.conditions.length===0,confirmText:"Confirm",children:[g.jsx(ii,{label:"Long URL:",type:"url",placeholder:"https://www.example.com",value:i.longUrl,onChange:x=>o(b=>({...b,longUrl:x.target.value})),hiddenRequired:!0,ref:m}),g.jsx("hr",{}),g.jsxs("div",{className:"flex justify-between",children:[g.jsx("b",{children:"Conditions:"}),g.jsx(Ct,{className:"[&]:px-1.5",variant:"secondary","aria-label":"Add condition",onClick:c,children:g.jsx(De,{icon:im})})]}),i.conditions.length===0&&g.jsx("div",{className:"text-center",children:g.jsx("i",{children:"Add conditions..."})}),i.conditions.length>0&&g.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((x,b)=>g.jsx(_2e,{condition:x,onConditionChange:w=>f(b,w),onDelete:()=>h(b)},`${b}_${x.type}`))})]})},w2e=({priority:e,isLast:t,redirectRule:n,onDelete:r,onMoveUp:i,onMoveDown:o,onUpdate:l})=>{const{flag:c,setToTrue:f,setToFalse:h}=xn();return g.jsxs(Ot,{children:[g.jsxs("div",{className:"flex align-center gap-4",children:[g.jsx("div",{className:"flex flex-col my-auto hidden md:block cursor-grab drag-n-drop-handler",children:g.jsx(De,{icon:cH})}),g.jsxs("div",{className:"flex flex-col my-auto",children:[g.jsx(Ct,{variant:"secondary","aria-label":`Move rule with priority ${e} up`,disabled:e===1,onClick:i,className:"[&]:px-2 rounded-b-none mb-[-1px]",children:g.jsx(De,{icon:tH})}),g.jsx(Ct,{variant:"secondary","aria-label":`Move rule with priority ${e} down`,disabled:t,onClick:o,className:"[&]:px-2 rounded-t-none",children:g.jsx(De,{icon:CH})})]}),g.jsxs("div",{className:"grow",children:[g.jsxs("div",{className:"mb-2",children:[g.jsx("b",{children:"Long URL:"})," ",g.jsx(Ci,{href:n.longUrl,"data-testid":"rule-long-url"})]}),g.jsxs("div",{className:"flex flex-col lg:flex-row gap-2",children:[g.jsx("b",{children:"Conditions:"}),n.conditions.map((m,y)=>g.jsxs("div",{className:"rounded-sm bg-gray-600 px-1 text-white",children:[m.type==="device"&&g.jsxs(g.Fragment,{children:["Device is ",m.matchValue]}),m.type==="language"&&g.jsxs(g.Fragment,{children:[m.matchValue," language is accepted"]}),m.type==="query-param"&&g.jsxs(g.Fragment,{children:["Query string contains ",m.matchKey,"=",m.matchValue]}),m.type==="ip-address"&&g.jsxs(g.Fragment,{children:["IP address matches ",m.matchValue]}),m.type==="geolocation-country-code"&&g.jsxs(g.Fragment,{children:["Country code is ",m.matchValue]}),m.type==="geolocation-city-name"&&g.jsxs(g.Fragment,{children:["City name is ",m.matchValue]})]},`${m.type}_${y}`))]})]}),g.jsxs("div",{className:"flex flex-col sm:flex-row gap-1 my-auto",children:[g.jsx(Ct,{className:"[&]:px-1.5",variant:"secondary","aria-label":`Edit rule with priority ${e}`,onClick:f,children:g.jsx(De,{icon:g6})}),g.jsx(Ct,{className:"[&]:px-2",variant:"danger","aria-label":`Delete rule with priority ${e}`,onClick:r,children:g.jsx(De,{icon:nH})})]})]}),g.jsx(IB,{onSave:l,isOpen:c,onClose:h,initialData:n})]})},S2e=()=>{const{shortUrlRedirectRules:e,getShortUrlRedirectRules:t}=w1e(),{setShortUrlRedirectRules:n,shortUrlRedirectRulesSaving:r,resetSetRules:i}=b1e(),o=e.status==="loading",l=L4(),{getShortUrlsDetails:c,shortUrlsDetails:f}=n1(),{status:h}=f,m=l&&h==="loaded"?f.shortUrls.get(l):void 0,[y,x,b]=m2e([],{dragHandle:".drag-n-drop-handler",dropZoneClass:"opacity-25"}),w=r.status==="saving",{flag:C,setToFalse:O,setToTrue:T}=xn(),P=_.useCallback(J=>b((oe=[])=>[...oe,J]),[b]),N=_.useCallback(J=>b((oe=[])=>{const ve=[...oe];return ve.splice(J,1),ve}),[b]),F=_.useCallback((J,oe)=>b((ve=[])=>{const ie=[...ve];return ie[J]=oe,ie}),[b]),B=_.useCallback((J,oe)=>b((ve=[])=>{if(!ve[oe])return ve;const ie=[...ve],ue=ie[oe];return ie[oe]=ie[J],ie[J]=ue,ie}),[b]),W=_.useCallback(J=>B(J,J-1),[B]),Q=_.useCallback(J=>B(J,J+1),[B]),re=_.useCallback(J=>{J.preventDefault(),x&&n({shortUrl:l,data:{redirectRules:x}})},[l,x,n]);_.useEffect(()=>(t(l),c([l]),()=>{i()}),[t,c,l,i]);const{redirectRules:ce,defaultLongUrl:ae}=e.status==="loaded"?e:{};return _.useEffect(()=>{ce&&b(ce)},[b,ce]),g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx("header",{children:g.jsxs(Ot,{children:[g.jsxs("h2",{className:"sm:flex justify-between items-center",children:[g.jsx(u1,{}),g.jsx("div",{className:"text-center grow",children:h==="loading"?g.jsx(g.Fragment,{children:"Loading..."}):g.jsxs("small",{children:["Redirect rules for ",g.jsx(Ci,{href:m?.shortUrl??""})]})})]}),g.jsx("hr",{}),g.jsxs("div",{children:[g.jsx("p",{children:"Configure dynamic conditions that will be checked at runtime."}),ae&&g.jsxs("p",{children:["If no conditions match, visitors will be redirected to: ",g.jsx(Ci,{href:ae})]})]})]})}),g.jsx("div",{children:g.jsxs(Ct,{onClick:T,children:[g.jsx(De,{icon:im})," Add rule"]})}),g.jsxs("form",{onSubmit:re,children:[o&&g.jsx($o,{loading:!0}),x.length===0&&!o&&g.jsx(Ot,{className:"text-center",children:g.jsx("i",{children:"This short URL has no dynamic redirect rules"})}),g.jsx("div",{className:"flex flex-col gap-2",ref:y,children:x.map((J,oe)=>g.jsx(w2e,{redirectRule:J,priority:oe+1,isLast:oe===x.length-1,onDelete:()=>N(oe),onMoveUp:()=>W(oe),onMoveDown:()=>Q(oe),onUpdate:ve=>F(oe,ve)},`${J.longUrl}_${oe}`))}),g.jsx("div",{className:"text-center mt-4",children:g.jsx(Ct,{type:"submit",inline:!0,className:"max-md:w-full",disabled:w,"data-testid":"save-button",children:w?"Saving...":"Save rules"})})]}),r.status==="error"&&g.jsx(zr,{variant:"error",children:g.jsx(Xa,{errorData:r.error,fallbackMessage:"An error occurred while saving short URL redirect rules :("})}),r.status==="saved"&&g.jsx(zr,{variant:"success",children:"Redirect rules properly saved."}),g.jsx(IB,{isOpen:C,onClose:O,onSave:P})]})},C2e=()=>{const e=L4(),{shortUrlsDetails:t,getShortUrlsDetails:n}=n1(),{status:r}=t,i=e&&r==="loaded"?t.shortUrls.get(e):void 0,{shortUrlEdition:o,editShortUrl:l}=O1e(),{saving:c,saved:f,error:h,errorData:m}=o,y=_.useMemo(()=>P0e(i),[i]);return _.useEffect(()=>{e&&n([e])},[n,e]),r==="loading"?g.jsx($o,{loading:!0}):r==="error"?g.jsx(zr,{variant:"error",children:g.jsx(Xa,{errorData:t.error,fallbackMessage:"An error occurred while loading short URL detail :("})}):g.jsxs("div",{className:"flex flex-col gap-y-4",children:[g.jsx("header",{children:g.jsx(Ot,{children:g.jsxs("h4",{className:"sm:flex items-center text-4xl",children:[g.jsx(u1,{}),g.jsx("div",{className:"text-center grow",children:g.jsxs("small",{children:["Edit ",g.jsx(Ci,{href:i?.shortUrl??""})]})})]})})}),g.jsx(yB,{initialState:y,saving:c,onSave:async x=>{i&&l({...i,data:x})}}),f&&h&&g.jsx(zr,{variant:"error",children:g.jsx(Xa,{errorData:m,fallbackMessage:"An error occurred while updating short URL :("})}),f&&!h&&g.jsx(zr,{variant:"success",children:"Short URL properly edited."})]})};function Mh({currentOrder:e,field:t,className:n="ml-1"}){return!e.dir||e.field!==t?null:g.jsx(De,{icon:e.dir==="ASC"?hH:b6,className:n})}const E2e=({paginator:e,currentQueryString:t=""})=>{const{currentPage:n=0,pagesCount:r=0}=e??{},i=ss(),o=_.useCallback(l=>`${i}/list-short-urls/${l}${t}`,[t,i]);return r<=1?g.jsx("div",{"data-testid":"empty-gap",className:"pb-4"}):g.jsx("div",{"data-testid":"short-urls-paginator",className:Oe("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:g.jsx(t0,{urlForPage:o,currentPage:n,pagesCount:r})})},zB=({domains:e,value:t,onChange:n})=>{const r=!t,i=t===nl?e.find(({isDefault:l})=>l)?.domain:t,o=_.useCallback(l=>{l!==t&&n(l)},[n,t]);return g.jsxs(Ue,{buttonContent:r?"All domains":g.jsxs("span",{children:["Domain: ",g.jsx("b",{children:i})]}),buttonClassName:"w-full",menuAlignment:"right",buttonDisabled:!e.length,children:[g.jsx(Ue.Item,{onClick:()=>o(),selected:r,children:"All domains"}),g.jsx(Ue.Separator,{}),e.map(({domain:l,isDefault:c})=>g.jsxs(Ue.Item,{selected:c?t===nl:t===l,onClick:()=>o(c?nl:l),className:"flex justify-between items-center",children:[l,c&&g.jsx(Vo,{children:"default"})]},l))]})},c1=({color:e,testId:t})=>g.jsx("div",{"data-testid":t,style:{backgroundColor:e},className:Oe("inline-block w-[20px] h-[20px] rounded-full","align-[-4px] mr-1.5")}),A2e=({tags:e,selectedTags:t,onTagsChange:n,mode:r="any",onModeChange:i,buttonClassName:o,title:l,prefix:c,ColorGenerator:f})=>{const h=jn("shortUrlCreation")?.tagFilteringMode??"startsWith",{searchResults:m,onSearch:y}=KR({tags:e,selectedTags:t,searchMode:h}),x=_.useCallback(C=>n?.([...new Set([...t,VS(C)])]),[n,t]),b=_.useCallback(C=>n?.(t.filter(O=>O!==C)),[n,t]),w=_.useCallback(C=>{n?.([]),C.target.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:!0}))},[n]);return g.jsxs(Ue,{buttonContent:t.length?g.jsxs("span",{children:[c," ",g.jsx("b",{children:bn(t.length)})," tag",t.length>1&&"s"]}):g.jsxs(g.Fragment,{children:[c," tags..."]}),menuAlignment:"right",menuClassName:"min-w-72 w-full",buttonClassName:o,children:[g.jsxs(Ue.Title,{children:[l,":"]}),g.jsxs(Ue.Misc,{className:"flex flex-col gap-3",children:[g.jsx(qR,{size:"sm",searchResults:m,onSearch:y,onSelectSearchResult:x,renderSearchResult:C=>g.jsxs("div",{className:"flex items-center",children:[g.jsx(c1,{color:f.getColorForKey(C)}),C]}),onKeyDownCapture:C=>{C.key==="Escape"&&m&&C.stopPropagation()}}),t.length>0&&g.jsxs(g.Fragment,{children:[g.jsx("ul",{className:"flex gap-1 flex-wrap",children:t.map((C,O)=>g.jsx("li",{children:g.jsx(i1,{text:C,colorGenerator:f,onClose:()=>b(C)})},`${C}${O}`))}),g.jsxs(Ct,{variant:"secondary",size:"sm",onClick:w,className:"gap-1!",children:[g.jsx(De,{icon:Fy})," Clear tags"]})]})]}),g.jsx(Ue.Separator,{}),g.jsx(Ue.Title,{children:"Mode:"}),g.jsxs(Ue.Misc,{className:"flex flex-col gap-1",children:[g.jsxs("div",{className:"flex",children:[g.jsxs(Ct,{className:"w-1/2 rounded-r-none gap-1! border-r-0",size:"sm",solid:r==="any",onClick:()=>i?.("any"),children:[g.jsx(De,{icon:SH})," Any"]}),g.jsxs(Ct,{className:"w-1/2 rounded-l-none gap-1!",size:"sm",solid:r==="all",onClick:()=>i?.("all"),children:[g.jsx(De,{icon:v6})," All"]})]}),g.jsxs(Vo,{children:[c," ",g.jsx("b",{children:r})," of the tags"]})]})]})},OL=ea(A2e,["ColorGenerator"]),O2e=({startDate:e,endDate:t,disabled:n=!1,onStartDateChange:r,onEndDateChange:i})=>g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-y-3 gap-x-4",children:[g.jsx("div",{className:"flex flex-col",children:g.jsx(Ny,{label:"Since",value:e,maxDate:t??void 0,disabled:n,onChange:r})}),g.jsx("div",{className:"flex flex-col",children:g.jsx(Ny,{label:"Until",value:t,minDate:e??void 0,disabled:n,onChange:o=>i(o&&gf(o))})})]}),k4=({onDatesChange:e,dateRangeOrInterval:t,defaultText:n,disabled:r})=>{const i=_.useMemo(()=>rL(t)??n,[t,n]),[o,l]=_.useMemo(()=>My(t)?[void 0,t]:[t,void 0],[t]),c=_.useCallback(f=>{My(f)?e(gz(f),f):e(f)},[e]);return g.jsxs(Ue,{buttonDisabled:r,buttonContent:i,containerClassName:"[&]:block",buttonClassName:"w-full",menuClassName:"md:min-w-90!",children:[g.jsx(Ue.Item,{selected:l==="all",onClick:()=>c("all"),children:n}),g.jsx(Ue.Separator,{}),R0e.map(f=>g.jsx(Ue.Item,{selected:l===f,onClick:()=>c(f),children:rL(f)},f)),g.jsx(Ue.Separator,{}),g.jsx(Ue.Misc,{children:g.jsx(O2e,{...o,onStartDateChange:f=>c({...o,startDate:f}),onEndDateChange:f=>c({...o,endDate:f})})})]})},T2e={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},BB=({amount:e=0,loading:t=!1,...n})=>g.jsxs(Ct,{...n,disabled:t,solid:!es(),children:[g.jsx(De,{icon:uH})," ",t?"Exporting...":g.jsxs(g.Fragment,{children:["Export (",bn(e),")"]})]}),TL=20,j2e=({amount:e=0,apiClientFactory:t,ReportExporter:n})=>{const[{tags:r,search:i,startDate:o,endDate:l,orderBy:c,tagsMode:f}]=r1(),{flag:h,setToTrue:m,setToFalse:y}=xn(),x=_.useCallback(async()=>{const b=e/TL,w=async(O=1)=>{const{data:T}=await t().listShortUrls({page:`${O}`,tags:r,searchTerm:i,startDate:o,endDate:l,orderBy:c,tagsMode:f,itemsPerPage:TL});return O>=b?T:T.concat(await w(O+1))};m();const C=await w();n.exportShortUrls(C.map(O=>{const{hostname:T,pathname:P}=new URL(O.shortUrl),N=P.substring(1);return{createdAt:O.dateCreated,domain:T,shortCode:N,shortUrl:O.shortUrl,longUrl:O.longUrl,title:O.title??"",tags:O.tags.join("|"),visits:O.visitsSummary.total}})),y()},[e,t,l,c,n,i,o,m,y,r,f]);return g.jsx(BB,{loading:h,className:"max-xl:w-full",amount:e,onClick:x})},M2e=ea(j2e,["apiClientFactory","ReportExporter"]),P2e=({onChange:e,selected:t={}})=>{const{excludeBots:n=!1,excludeMaxVisitsReached:r=!1,excludePastValidUntil:i=!1}=t,o=Number(n)+Number(r)+Number(i),l=_.useCallback(f=>e({...t,...f}),[e,t]),c=_.useCallback(f=>l({[f]:!t?.[f]}),[l,t]);return g.jsxs(Ue,{buttonContent:g.jsxs("span",{children:["More",o>0?g.jsxs("b",{children:[" (",o,")"]}):""]}),buttonClassName:"w-full",menuAlignment:"right",children:[g.jsx(Ue.Title,{children:"Visits:"}),g.jsx(Ue.Item,{selected:n,onClick:()=>c("excludeBots"),children:"Ignore visits from bots"}),g.jsx(Ue.Separator,{}),g.jsx(Ue.Title,{children:"Short URLs:"}),g.jsx(Ue.Item,{selected:r,onClick:()=>c("excludeMaxVisitsReached"),children:"Exclude with visits reached"}),g.jsx(Ue.Item,{selected:i,onClick:()=>c("excludePastValidUntil"),children:"Exclude enabled in the past"}),g.jsx(Ue.Separator,{}),g.jsx(Ue.Item,{disabled:t.excludeBots===void 0&&t.excludeMaxVisitsReached===void 0&&t.excludePastValidUntil===void 0,onClick:()=>e({excludeBots:void 0,excludeMaxVisitsReached:void 0,excludePastValidUntil:void 0}),className:"italic",children:"Reset to defaults"})]})},N2e=({className:e,shortUrlsAmount:t,order:n,handleOrderBy:r})=>{const{domainsList:i}=ec(),{tagsList:o}=Im(),[{search:l,tags:c,tagsMode:f="any",excludeTags:h,excludeTagsMode:m="any",startDate:y,endDate:x,excludeBots:b,excludeMaxVisitsReached:w,excludePastValidUntil:C,domain:O},T]=r1(),P=jn("visits"),N=rl("filterShortUrlsByDomain"),F=rl("filterShortUrlsByExcludedTags"),[B,W]=_.useState(),Q=_.useCallback(({startDate:ie,endDate:ue},Y)=>{T({startDate:xl(ie)??void 0,endDate:xl(ue)??void 0}),W(Y)},[T]),re=_.useCallback(ie=>T({search:ie||void 0}),[T]),ce=_.useCallback(ie=>T({domain:ie}),[T]),ae=_.useCallback(ie=>T({tags:ie}),[T]),J=_.useCallback(ie=>T({tagsMode:ie}),[T]),oe=_.useCallback(ie=>T({excludeTags:ie}),[T]),ve=_.useCallback(ie=>T({excludeTagsMode:ie}),[T]);return g.jsxs("div",{className:Oe("flex flex-col gap-y-4",e),children:[g.jsx(Lf,{defaultValue:l,onChange:re}),g.jsxs("div",{className:"flex flex-col xl:flex-row-reverse justify-between gap-y-4",children:[g.jsxs("div",{className:Oe("flex flex-col lg:flex-row gap-x-2 gap-y-4",{"min-w-3/4":F,"min-w-2/3":!F}),children:[g.jsxs("div",{className:"flex flex-col md:flex-row gap-x-2 gap-y-4 grow",children:[g.jsx("div",{className:"grow",children:g.jsx(k4,{defaultText:"All short URLs",dateRangeOrInterval:B??pz(y,x),onDatesChange:Q})}),g.jsxs("div",{className:Oe("grid lg:flex gap-x-2 gap-y-4",{"grid-cols-2":F}),children:[g.jsx(OL,{title:"Filter by tag",prefix:"With",tags:o.tags,selectedTags:c,onTagsChange:ae,mode:f,onModeChange:J,buttonClassName:"w-full"}),F&&g.jsx(OL,{title:"Filter by excluded tag",prefix:"Without",tags:o.tags,selectedTags:h,onTagsChange:oe,mode:m,onModeChange:ve,buttonClassName:"w-full"})]})]}),g.jsxs("div",{className:Oe("grid lg:flex gap-x-2 gap-y-4",{"grid-cols-2":N}),children:[N&&g.jsx(zB,{domains:i.domains,onChange:ce,value:O}),g.jsx(P2e,{selected:{excludeBots:b??P?.excludeBots,excludeMaxVisitsReached:w,excludePastValidUntil:C},onChange:T})]})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("div",{className:"max-xl:w-1/2 xl:hidden",children:g.jsx(fm,{containerClassName:"[&]:block",buttonClassName:"w-full",prefixed:!1,items:T2e,order:n,onChange:({field:ie,dir:ue})=>r(ie,ue)})}),g.jsx("div",{className:"max-xl:w-1/2",children:g.jsx(M2e,{amount:t})})]})]})]})},L2e={field:"dateCreated",dir:"DESC"},R2e=Ea(()=>{const{listShortUrls:e,shortUrlsList:t}=Yz(),{page:n}=Yu(),r=_r(),[{tags:i,tagsMode:o,excludeTags:l,excludeTagsMode:c,search:f,startDate:h,endDate:m,orderBy:y,excludeBots:x,excludePastValidUntil:b,excludeMaxVisitsReached:w,domain:C},O]=r1(),T=hC(),[P,N]=_.useState(y??T.shortUrlsList?.defaultOrdering??L2e),F=t.status==="loaded",{pagination:B}=F?t.shortUrls:{},W=_.useMemo(()=>x??T.visits?.excludeBots,[x,T.visits?.excludeBots]),Q=_.useCallback((ve,ie)=>{O({orderBy:{field:ve,dir:ie}}),N({field:ve,dir:ie})},[O]),re=ve=>()=>Q(ve,nD({currentOrderDir:P.dir,currentField:P.field,newField:ve})),ce=ve=>g.jsx(Mh,{currentOrder:P,field:ve}),ae=_.useCallback(ve=>O({tags:[...new Set([...i,ve])]}),[i,O]),J=_.useCallback(({field:ve,dir:ie})=>W&&ve==="visits"?{field:"nonBotVisits",dir:ie}:{field:ve,dir:ie},[W]),oe=E4();return _.useEffect(()=>{e({page:n,searchTerm:f,tags:i,tagsMode:o,excludeTags:l,excludeTagsMode:c,startDate:h,endDate:m,orderBy:J(P),excludePastValidUntil:b,excludeMaxVisitsReached:w,domain:C})},[e,J,n,f,i,h,m,P,o,b,w,C,l,c]),g.jsxs(C4,{value:oe,children:[g.jsx(N2e,{shortUrlsAmount:F?t.shortUrls.pagination.totalItems:void 0,order:P,handleOrderBy:Q,className:"mb-4"}),g.jsx(A4,{type:"short-urls",className:"mb-4"}),g.jsxs(Ot,{bodyClassName:Oe({"pb-0":F}),children:[g.jsx(CB,{shortUrlsList:t,orderByColumn:re,renderOrderIcon:ce,onTagClick:ae}),B&&g.jsx(E2e,{paginator:B,currentQueryString:r.search})]})]})},()=>[Xi.visits]),UB=_.createContext(void 0),I4=()=>_.useContext(UB),$B=({children:e})=>{const t=I4(),{flag:n,toggle:r,setToTrue:i,setToFalse:o}=xn(),l=t??{sidebarVisible:n,toggleSidebar:r,showSidebar:i,hideSidebar:o};return g.jsx(UB.Provider,{value:l,children:e})},FB=({className:e,...t})=>{const n=I4();if(!n)throw new Error("ShlinkSidebarToggleButton has to be used inside a ShlinkSidebarVisibilityProvider");const{sidebarVisible:r,toggleSidebar:i}=n;return g.jsx(Cf,{"aria-label":"Toggle sidebar",className:Oe("md:hidden transition-colors",{"text-white/50":!r,"text-white":r},e),onClick:i,...t,children:g.jsx(De,{icon:EH,size:"xl"})})},D2e={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},k2e=(e,t)=>{const n=r=>i=>{i.event.composedPath().some(({classList:o})=>o?.contains("visits-table"))||document.querySelector(".modal")||r()};return Rte({delta:40,onSwipedLeft:n(t),onSwipedRight:n(e)})},I2e=(e,t)=>{const[n,r]=_.useState(t),i=_.useCallback(o=>{const{location:l,history:c}=window,f=WR(l.search);f[e]=o,c.pushState(null,"",`${l.pathname}?${FS(f)}`),r(o)},[e]);return[n,i]},z4=e=>{const t=Wu();return _.useMemo(()=>t[e]?.split(",").filter(Boolean)??[],[e,t])},z2e=(e,t)=>{const n=_.useCallback(()=>t(`(max-width: ${e}px)`).matches,[t,e]),[r,i]=_.useState(n());return _.useEffect(()=>{const o=()=>i(n());return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[n]),r},B2e=(e,t,n)=>{_.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])},U2e=({tag:e,onClose:t,isOpen:n})=>{const{deleteTag:r,tagDelete:i,tagDeleted:o}=D1e(),{status:l}=i,c=l==="deleting";return g.jsxs(eo,{title:"Delete tag",variant:"danger",open:n,onClose:t,onClosed:()=>l==="deleted"&&o(e),onConfirm:async()=>{await r(e),t()},confirmText:c?"Deleting tag...":"Delete tag",confirmDisabled:c,children:["Are you sure you want to delete tag ",g.jsx("b",{children:e}),"?",l==="error"&&g.jsx(zr,{variant:"error",size:"sm",className:"mt-2",children:g.jsx(Xa,{errorData:i.error,fallbackMessage:"Something went wrong while deleting the tag :("})})]})},$2e=({tag:e,onClose:t,isOpen:n,ColorGenerator:r})=>{const{editTag:i,tagEdited:o,tagEdit:l}=z1e(),[c,f]=_.useState(e),[h,m]=_.useState(r.getColorForKey(e)),{status:y}=l,x=y==="editing",b=_.useCallback(async()=>{await i({oldName:e,newName:c,color:h}),t()},[h,i,c,t,e]),w=_.useCallback(()=>y==="edited"&&o({oldName:e,newName:c,color:h}),[h,y,c,e,o]);return g.jsxs(eo,{title:"Edit tag",open:n,onClose:t,onClosed:w,onConfirm:b,confirmText:x?"Saving...":"Save",confirmDisabled:x,children:[g.jsxs("div",{className:"flex",children:[g.jsx(wB,{color:h,onChange:m,className:"rounded-r-none",name:"tag-color"}),g.jsx(bi,{className:"grow [&]:rounded-l-none",value:c,placeholder:"Tag",required:!0,onChange:({target:C})=>f(C.value)})]}),y==="error"&&g.jsx(zr,{variant:"error",size:"sm",className:"mt-2",children:g.jsx(Xa,{errorData:l.error,fallbackMessage:"Something went wrong while editing the tag :("})})]})},F2e=ea($2e,["ColorGenerator"]),V2e=({tag:e,colorGenerator:t})=>g.jsx(c1,{color:t.getColorForKey(e)}),H2e=({tag:e,ColorGenerator:t})=>{const{flag:n,setToFalse:r,setToTrue:i}=xn(),{flag:o,setToFalse:l,setToTrue:c}=xn(),f=ss(),h=e1();return g.jsxs(ze.Row,{className:"max-lg:relative",children:[g.jsxs(ze.Cell,{columnName:"Tag",children:[g.jsx(V2e,{tag:e.tag,colorGenerator:t})," ",e.tag]}),g.jsx(ze.Cell,{className:"lg:text-right",columnName:"Short URLs",children:g.jsx(Pr,{to:`${f}/list-short-urls/1?tags=${encodeURIComponent(e.tag)}`,children:bn(e.shortUrls)})}),g.jsx(ze.Cell,{className:"lg:text-right",columnName:"Visits",children:g.jsx(Pr,{to:`${f}/tag/${e.tag}/visits`,"data-testid":"visits-amount",children:bn(e.visits)})}),g.jsx(ze.Cell,{className:"lg:text-right max-lg:absolute max-lg:top-1.25 max-lg:right-0 max-lg:p-0",children:g.jsxs(Xt,{menuAlignment:"right",children:[g.jsxs(Xt.Item,{onClick:c,className:"gap-1.5",children:[g.jsx(De,{icon:g6})," Edit"]}),g.jsxs(Xt.Item,{className:"gap-1.5",disabled:!h||!h.canAddItemWithName(e.tag),onClick:()=>h?.addItemToCompare({name:e.tag,query:e.tag,style:t.stylesForKey(e.tag)}),children:[g.jsx(De,{icon:Uy})," Compare visits"]}),g.jsx(Xt.Separator,{}),g.jsxs(Xt.Item,{className:"[&]:text-danger gap-1.5",onClick:i,children:[g.jsx(De,{icon:FV})," Delete tag"]})]})}),g.jsx(F2e,{tag:e.tag,onClose:l,isOpen:o}),g.jsx(U2e,{tag:e.tag,onClose:r,isOpen:n})]})},q2e=ea(H2e,["ColorGenerator"]),G2e=20,Y2e=({sortedTags:e,orderByColumn:t,currentOrder:n})=>{const r=_.useRef(!0),{page:i=1}=Wu(),[o,l]=I2e("page",Number(i)),c=_.useCallback(x=>{l(x),scrollTo(0,0)},[l]),f=sf(e,G2e),h=f.length>1,m=f[o-1]??[];_.useEffect(()=>{r.current||c(1),r.current=!1},[c,e]);const y="cursor-pointer top-(--header-height) sticky-cell";return g.jsxs(Ot,{bodyClassName:h?"pb-1":"",children:[g.jsxs(ze,{header:g.jsxs(ze.Row,{children:[g.jsxs(ze.Cell,{onClick:t("tag"),className:y,children:["Tag ",g.jsx(Mh,{currentOrder:n,field:"tag"})]}),g.jsxs(ze.Cell,{onClick:t("shortUrls"),className:`lg:text-right ${y}`,children:["Short URLs ",g.jsx(Mh,{currentOrder:n,field:"shortUrls"})]}),g.jsxs(ze.Cell,{onClick:t("visits"),className:`lg:text-right ${y}`,children:["Visits ",g.jsx(Mh,{currentOrder:n,field:"visits"})]}),g.jsx(ze.Cell,{className:y,children:g.jsx("span",{className:"sr-only",children:"Options"})})]}),children:[m.length===0&&g.jsx(ze.Row,{children:g.jsx(ze.Cell,{colSpan:4,className:"text-center",children:"No tags found"})}),m.map(x=>g.jsx(q2e,{tag:x},x.tag))]}),h&&g.jsx("div",{className:Oe("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:g.jsx(t0,{pagesCount:f.length,currentPage:o,onPageChange:c})})]},o)},W2e=Ea(()=>{const{filterTags:e,tagsList:t}=Im(),n=hC(),[r,i]=_.useState(n.tags?.defaultOrdering??{}),o=_.useMemo(()=>{const c=t.filteredTags.map(f=>{const h=t.stats[f],m=n.visits?.excludeBots?h.visitsSummary.nonBots:h.visitsSummary.total;return{tag:f,visits:m,shortUrls:h?.shortUrlsCount??0}});return rD(c,r)},[r,n.visits?.excludeBots,t.filteredTags,t.stats]),l=E4();return t.status==="loading"?g.jsx($o,{loading:!0}):t.status==="error"?g.jsx(zr,{variant:"error",children:g.jsx(Xa,{errorData:t.error,fallbackMessage:"Error loading tags :("})}):g.jsx(C4,{value:l,children:g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx(Lf,{onChange:e}),g.jsx("div",{className:"flex flex-col lg:flex-row lg:justify-end",children:g.jsx("div",{className:"lg:w-1/2",children:g.jsx(fm,{containerClassName:"[&]:block",buttonClassName:"w-full",items:D2e,order:r,onChange:i})})}),g.jsx(A4,{type:"tags"}),g.jsx(Y2e,{sortedTags:o,currentOrder:r,orderByColumn:c=>()=>i(HS({currentField:r.field,currentOrderDir:r.dir,newField:c}))})]})})},()=>[Xi.visits]),$m=({visits:e,shortUrl:t,children:n,title:r})=>g.jsx("header",{children:g.jsxs(Ot,{children:[g.jsxs("h2",{className:"flex justify-between items-center",children:[g.jsx(u1,{}),g.jsx("span",{className:"text-center hidden sm:block",children:g.jsx("small",{children:r})}),g.jsxs("span",{className:Oe("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:"," ",g.jsx(SB,{visitsCount:e.length,shortUrl:t})]})]}),g.jsx("h3",{className:"text-center block sm:hidden mt-3",children:g.jsx("small",{children:r})}),n&&g.jsx("div",{className:"md:mt-3",children:n})]})}),B4=({children:e,className:t})=>g.jsx("div",{className:Oe("flex justify-between items-center",t),children:e}),VB=({title:e,footer:t,children:n})=>g.jsxs(an,{role:"document",children:[g.jsx(an.Header,{children:e}),g.jsx(an.Body,{children:n}),t&&g.jsx(an.Footer,{className:"sticky bottom-0",children:t})]}),HB=_.createContext(null),{Provider:ySe}=HB,U4=e=>{const t=_.useContext(HB)??void 0,n=_.useMemo(()=>t?{}:{width:"100%",height:e},[e,t]);return{ChartWrapper:t?_.Fragment:Aie,dimensions:t,wrapperDimensions:n}},qB={color:"white",background:"rgb(0 0 0 / .9)",border:"none",borderRadius:"5px"},K2e={marginBottom:"5px",fontWeight:"bold"},GB={contentStyle:qB,labelStyle:K2e,itemStyle:{padding:0}},jL=["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],YB=e=>jL[e%jL.length],ky=()=>es()?"#46e587":"#1DAA58",Z2e=()=>es()?"rgba(70, 229, 135, 0.4)":"rgba(29, 170, 88, 0.4)",X2e=({chartData:e,showNumbers:t})=>g.jsx("ul",{className:"space-y-1",children:e.map(({name:n,color:r,value:i},o)=>g.jsxs("li",{className:"flex items-center",children:[g.jsx(c1,{color:r,testId:`color-bullet-${o}`}),g.jsxs("small",{className:"truncate grow","data-testid":`name-${o}`,children:[n,t&&g.jsxs("b",{children:[" (",bn(i),")"]})]})]},n))}),ML=e=>_.useMemo(()=>Object.entries(e).map(([t,n],r)=>({name:t,value:n,color:YB(r)})),[e]),Q2e=({stats:e,prevStats:t,showNumbersInLegend:n})=>{const r=ML(e),i=ML(t),o=i.length>0,l=es()?zZ:IZ,{ChartWrapper:c,dimensions:f,wrapperDimensions:h}=U4(300);return g.jsxs("div",{className:"flex flex-col md:flex-row md:items-center gap-y-4",children:[g.jsx("div",{className:"md:flex-7",children:g.jsx("div",{style:h,children:g.jsx(c,{children:g.jsxs(e0e,{...f,children:[g.jsx(V3,{formatter:bn,contentStyle:qB,itemStyle:{color:"white"}}),g.jsx(Yw,{data:r,dataKey:"value",nameKey:"name",startAngle:360,endAngle:0,outerRadius:"100%",innerRadius:o?"65%":"50%",animationBegin:0,children:r.map((m,y)=>g.jsx(tl,{fill:m.color,stroke:l},`${m.name}-${y}`))}),o&&g.jsx(Yw,{data:i,dataKey:"value",nameKey:"name",startAngle:360,endAngle:0,outerRadius:"55%",innerRadius:"20%",animationBegin:0,stroke:l,fill:ky()})]})})})}),g.jsx("div",{className:"md:flex-5",children:g.jsx(X2e,{chartData:r,showNumbers:n})})]})},PL=({title:e,...t})=>{const{flag:n,toggle:r}=xn();return g.jsx(VB,{title:g.jsxs(B4,{children:[e,g.jsx(dl,{checked:n,onChange:r,children:"Show numbers"})]}),children:g.jsx(Q2e,{...t,showNumbersInLegend:n})})},J2e=_.forwardRef(({visitsGroups:e},t)=>{const n=_.useMemo(()=>Object.entries(e),[e]);return n.length===0?null:g.jsx("ul",{className:"mt-2 flex flex-wrap justify-center gap-4",ref:t,children:n.map(([r,i],o)=>g.jsxs("li",{className:"inline",children:[g.jsx(c1,{color:WB(i)}),g.jsxs("strong",{children:[r," (",bn(i.length),")"]})]},`${r}${o}`))})}),e_e={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},t_e={hourly:e=>({hours:e}),daily:e=>({days:e}),weekly:e=>({weeks:e}),monthly:e=>({months:e})},n_e={hourly:FJ,daily:p0,weekly:$J,monthly:Uv},$4={hourly:e=>$v(e,"yyyy-MM-dd HH:00"),daily:e=>Js(e),weekly(e){const t=Js($h(e)),n=Js(ZJ(e));return`${t} - ${n}`},monthly:e=>$v(e,"yyyy-MM")},r_e=e=>{const t=Object.values(e).filter(o=>o.length>0);if(t.length===0)return"monthly";const n=new Date,r=t.map(o=>hl(o[o.length-1].date)),i=_k(r);return[[()=>p0(n,i)<=2,"hourly"],[()=>Uv(n,i)<=1,"daily"],[()=>Uv(n,i)<=6,"weekly"]].find(([o])=>o())?.[1]??"monthly"},i_e=(e,t)=>Object.keys(t).reduce((n,r)=>(n[r]=RD(t[r],i=>$4[e](hl(i.date))),n),{}),a_e=(e,t)=>t.reduce((n,r)=>{const i=$4[e](hl(r.date));return n[i]=n[i]??[],n[i].push(r),n},{}),o_e=(e,t)=>{const n=Object.values(t).filter(m=>m.length>0).map(m=>[...m].reverse());if(n.length===0)return[];const r=n_e[e],i=$4[e],o=t_e[e],l=n.flat(),c=hl(l[0].date),f=hl(l[l.length-1].date),h=r(f,c)||1;return[{formattedDate:i(c),date:c},...dC(h,m=>{const y=DJ(c,o(m));return{formattedDate:i(y),date:y}})]},WB=e=>{if(e.color)return e.color;const t={main:Ih(),highlighted:G_,previous:ky()};return e.type?t[e.type]:Ih()},NL=(e,t)=>_.useMemo(()=>Object.values(e).find(n=>n.type===t)??[],[e,t]),s_e=(e,t,n)=>{const r=NL(e,"main"),i=NL(e,"highlighted"),o=_.useMemo(()=>n?a_e(t,r):{},[n,t,r]),l=_.useCallback((c,{payload:f})=>{const h=o[f.formattedDate]??[];n?.(h===i?[]:h)},[o,i,n]);return n&&{cursor:"pointer",onClick:l}},KB=({visitsGroups:e,setSelectedVisits:t,matchMedia:n,onDateRangeChange:r})=>{const[i,o]=_.useState(r_e(e)),l=z2e(767,n??window.matchMedia),c=_.useMemo(()=>{const J=i_e(i,e),oe=Object.keys(J);return o_e(i,e).map(({formattedDate:ve,date:ie})=>({date:ie,formattedDate:ve,...oe.reduce((ue,Y)=>(ue[Y]=J[Y][ve]??0,ue),{})}))},[i,e]),f=s_e(e,i,t),{flag:h,toggle:m,setToFalse:y}=xn(),x=_.useId(),b=_.useRef(null),[w,C]=_.useState(l?300:400);_.useLayoutEffect(()=>{if(!h)return C(l?300:400),()=>{};const J=new ResizeObserver(()=>{const oe=window.innerHeight,{height:ve}=b.current.getBoundingClientRect();C(oe-ve-98)});return J.observe(b.current),()=>J.disconnect()},[h,l,b]),B2e("Escape",y,h);const{ChartWrapper:O,dimensions:T,wrapperDimensions:P}=U4(w),[N,F]=_.useState(),[B,W]=_.useState(),Q=_.useCallback(()=>{F(void 0),W(void 0)},[]),re=_.useCallback((J,oe)=>{const ve=J.activeIndex&&c[J.activeIndex];oe.button===0&&ve&&F(ve)},[c]),ce=_.useCallback(J=>{const oe=J.activeIndex&&c[J.activeIndex];N&&oe&&W(oe)},[c,N]),ae=_.useCallback(()=>{if(!N||!B){Q();return}const J=[N.date,B.date],oe=zJ(J),ve=_k(J);Q(),r({startDate:oe,endDate:ve})},[r,Q,B,N]);return g.jsxs(an,{className:Oe({"fixed top-0 bottom-0 left-0 right-0 z-1030":h}),"data-testid":"line-chart-card",children:[g.jsxs(an.Header,{role:"heading","aria-level":4,className:"flex justify-between items-center",children:["Visits over time",g.jsxs("div",{className:"flex content-center gap-1",children:[g.jsx(e0,{"aria-label":h?"Collapse":"Expand","aria-expanded":h,"aria-controls":x,size:"sm",onClick:m,children:g.jsx(De,{icon:h?gH:eH})}),g.jsx(Ue,{buttonContent:"Group by",buttonSize:"sm",buttonVariant:"link",buttonClassName:"[&]:p-0",menuAlignment:"right",menuClassName:"w-40",children:Object.entries(e_e).map(([J,oe])=>g.jsx(Ue.Item,{selected:i===J,onClick:()=>o(J),children:oe},J))})]})]}),g.jsxs(an.Body,{id:x,children:[g.jsx(O,{...P,children:g.jsxs(Hye,{className:"select-none",data:c,...T,onMouseDown:re,onMouseMove:ce,onMouseUp:ae,children:[g.jsx(u4,{dataKey:"formattedDate"}),g.jsx(c4,{tickFormatter:bn,yAxisId:"1"}),g.jsx(V3,{formatter:bn,...GB}),g.jsx(s4,{strokeOpacity:es()?.1:.9}),Object.entries(e).map(([J,oe])=>oe.length>0&&g.jsx(V9,{yAxisId:"1",dataKey:J,type:"monotone",stroke:WB(oe),strokeWidth:2,activeDot:oe.type==="previous"?void 0:f,strokeDasharray:oe.type==="previous"?"8 3":void 0},J)),N&&B&&g.jsx(R9,{yAxisId:"1",x1:N.formattedDate,x2:B.formattedDate})]})}),g.jsx(J2e,{visitsGroups:e,ref:b})]})]})},l_e=({ranges:e,value:t,setValue:n})=>g.jsxs(Ue,{buttonContent:"Paginate",buttonVariant:"link",buttonClassName:"[&]:p-0",buttonSize:"sm",menuAlignment:"right",children:[e.map(r=>g.jsxs(Ue.Item,{selected:r===t,onClick:()=>n(r),children:[g.jsx("b",{children:r})," items per page"]},r)),g.jsx(Ue.Separator,{}),g.jsx(Ue.Item,{disabled:t===1/0,onClick:()=>n(1/0),children:g.jsx("i",{children:"Clear pagination"})})]}),LL=e=>typeof e!="string"||e.startsWith("hidden_"),u_e=({stats:e,prevStats:t,highlightedStats:n,highlightedLabel:r,max:i,onClick:o})=>{const l=_.useMemo(()=>Object.entries(e).map(([y,x])=>{const b=n?.[y]??0,w=t?.[y]??0,C=LL(y);return{name:y,amount:Math.max(x,w),nonHighlightedAmount:C?null:x-b,highlightedAmount:C?null:b,prevAmount:C?null:w}}),[e,t,n]),c=_.useMemo(()=>{const y=l.reduce((x,{name:b})=>x>b.length?x:b.length,0);return Math.min(150,y*7)},[l]),{ChartWrapper:f,dimensions:h,wrapperDimensions:m}=U4(Math.max(300,l.length*(t?44:22)));return g.jsx(f,{...m,children:g.jsxs(n0e,{layout:"vertical",data:l,barCategoryGap:3,...h,children:[g.jsx(u4,{type:"number",dataKey:"amount",tickFormatter:bn,domain:i?[0,i]:void 0}),g.jsx(c4,{type:"category",dataKey:"name",width:c,interval:0,style:{fontSize:".8rem"},tickFormatter:y=>LL(y)?"":y}),g.jsx(s4,{strokeOpacity:es()?.05:.9}),g.jsx(V3,{filterNull:!0,...GB,formatter:(y,x)=>[bn(y),x==="highlightedAmount"?r:x==="prevAmount"?"Previous period":n?"Non-selected":"Visits"]}),g.jsx(av,{dataKey:"nonHighlightedAmount",stackId:"main",cursor:"pointer",fill:Ih(),onClick:({name:y})=>y&&o?.(y),children:l.map(y=>g.jsx(tl,{fill:DZ(),stroke:Ih(),strokeWidth:2},y.name))}),n&&g.jsx(av,{dataKey:"highlightedAmount",stackId:"main",cursor:"pointer",fill:G_,onClick:({name:y})=>y&&o?.(y),children:l.map(y=>g.jsx(tl,{fill:kZ,stroke:G_,strokeWidth:2},y.name))}),t&&g.jsx(av,{dataKey:"prevAmount",fill:ky(),children:l.map(y=>g.jsx(tl,{fill:Z2e(),stroke:ky(),strokeWidth:2},y.name))})]})})},c_e=e=>typeof e=="string"?e.toLowerCase():e,f_e=([e])=>e,d_e=([,e])=>e,Hg=({stats:e,prevStats:t,highlightedStats:n,title:r,sortingItems:i,extraHeaderContent:o,withPagination:l=!0,...c})=>{const[f,h]=_.useState({}),[m,y]=_.useState(1),[x,b]=_.useState(50),w=_.useCallback((re,ce)=>{const ae=Object.entries(re),J=f.field?ZX(ae,([oe,ve])=>c_e(f.field===Object.keys(ce)[0]?oe:ve)):ae;return!f.dir||f.dir==="ASC"?J:[...J].reverse()},[f.dir,f.field]),C=_.useCallback(re=>{const ce=re[m-1];if(m<re.length)return ce;const ae=re[0].length;return[...ce,...dC(ae-ce.length,J=>[`hidden_${J}`,0])]},[m]),O=_.useCallback(re=>g.jsx(t0,{currentPage:m,pagesCount:re,onPageChange:y}),[m]),T=_.useCallback((re,ce,ae,J)=>{const oe=w(re,ce),ve=oe.map(f_e),ie=ae&&Object.entries({..._j(ve,ve.map(()=>0)),...ae}),ue=J&&Object.entries({..._j(ve,ve.map(()=>0)),...J});if(oe.length<=x)return{currentPageStats:Object.fromEntries(oe),currentPageHighlightedStats:ie&&Object.fromEntries(ie),currentPagePrevStats:ue&&Object.fromEntries(ue)};const Y=sf(oe,x),I=ie&&sf(ie,x),z=ue&&sf(ue,x);return{currentPageStats:Object.fromEntries(C(Y)),currentPageHighlightedStats:I&&Object.fromEntries(C(I)),currentPagePrevStats:z&&Object.fromEntries(C(z)),pagination:O(Y.length),max:lZ(Math.max(...oe.map(d_e)))}},[C,w,x,O]),{currentPageStats:P,currentPagePrevStats:N,currentPageHighlightedStats:F,pagination:B,max:W}=_.useMemo(()=>T(e,i,n&&Object.keys(n).length>0?n:void 0,t&&Object.keys(t).length>0?t:void 0),[T,n,t,i,e]),Q=_.useMemo(()=>Object.keys(P),[P]);return g.jsx(VB,{title:g.jsxs(B4,{children:[r,g.jsxs("div",{className:"flex items-center gap-3",children:[o?.(B?Q:void 0),l&&Object.keys(e).length>50&&g.jsx(l_e,{ranges:[50,100,200,500],value:x,setValue:re=>{b(re),y(1)}}),g.jsx(fm,{buttonVariant:"link",menuAlignment:"right",buttonSize:"sm",buttonClassName:"[&]:p-0",items:i,order:f,onChange:re=>{h(re),y(1)}})]})]}),footer:B&&g.jsx("div",{className:"flex justify-around items-center","data-testid":"chart-paginator",children:B}),children:g.jsx(u_e,{stats:P,prevStats:N,highlightedStats:F,max:W,...c})})},RL=(e,t)=>{if(!(!t||!(e in t)))return t[e]&&xl(t[e])||""},ZB=()=>{const e=Ja(),t=Wu(),{startDate:n,endDate:r,orphanVisitsType:i,excludeBots:o,loadPrevInterval:l,domain:c,...f}=t,h=_.useMemo(()=>({dateRange:n!=null||r!=null?pz(n,r):void 0,visitsFilter:{orphanVisitsType:i,excludeBots:o!==void 0?o==="true":void 0},loadPrevInterval:l!==void 0?l==="true":void 0,domain:c}),[r,o,l,i,n,c]),m=_.useCallback(y=>{const{dateRange:x,visitsFilter:b={},loadPrevInterval:w,domain:C}=Rf(h,y),{excludeBots:O,orphanVisitsType:T}=b,P={...f,startDate:RL("startDate",x),endDate:RL("endDate",x),excludeBots:O===void 0?void 0:ow(O),orphanVisitsType:T,loadPrevInterval:w===void 0?void 0:ow(w),domain:C},N=FS(P),F=N?`?${N}`:"";e(F,{replace:!0,relative:"route"})},[h,e,f]);return[h,m]},h_e=()=>g.jsx(_0e,{attribution:'© <a href="https://osm.org/copyright">OpenStreetMap</a> contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),m_e=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}},p_e=({toggle:e,isOpen:t,title:n,locations:r=[]})=>g.jsx(eo,{open:t,onClose:e,title:n,variant:"cover",children:g.jsxs(y0e,{...m_e(r),className:"h-full w-full",children:[g.jsx(h_e,{}),r.map(({cityName:i,latLong:o,count:l},c)=>g.jsx(b0e,{position:o,children:g.jsxs(x0e,{children:[g.jsx("b",{children:l})," visit",l>1?"s":""," from ",g.jsx("b",{children:i})]})},c))]})}),g_e=({modalTitle:e,activeCities:t,locations:n=[]})=>{const{flag:r,setToTrue:i,setToFalse:o}=xn(),[l,c]=_.useState([]),f=_.useCallback(h=>{c(h?n.filter(h):n),i()},[n,i]);return g.jsxs(g.Fragment,{children:[!t&&g.jsx(e0,{onClick:()=>f(),"aria-label":"Show in map",title:"Show in map",className:"[&]:p-0",children:g.jsx(De,{icon:A_})}),t&&g.jsxs(Ue,{buttonContent:g.jsx(De,{icon:A_,title:"Show in map"}),buttonLabel:"Show in map",buttonVariant:"link",buttonClassName:"[&]:p-0",menuAlignment:"right",caretless:!0,children:[g.jsx(Ue.Item,{onClick:()=>f(),children:"Show all locations"}),g.jsx(Ue.Item,{onClick:()=>f(({cityName:h})=>t.includes(h)),children:"Show locations in current page"})]}),g.jsx(p_e,{toggle:o,isOpen:r,title:e,locations:l})]})},XB=({onChange:e,selected:t={},isOrphanVisits:n=!1,withPrevInterval:r=!1,disabled:i})=>{const{orphanVisitsType:o,excludeBots:l=!1,loadPrevInterval:c=!1}=t,f=y=>({selected:o===y,onClick:()=>e({...t,orphanVisitsType:y===o?void 0:y})}),h=_.useCallback(()=>e({...t,excludeBots:!l}),[l,e,t]),m=_.useCallback(()=>e({...t,loadPrevInterval:!c}),[c,e,t]);return g.jsxs(Ue,{buttonDisabled:i,buttonContent:"More",buttonClassName:"w-full",menuAlignment:"right",children:[r&&g.jsxs(g.Fragment,{children:[g.jsx(Ue.Item,{selected:c,onClick:m,children:"Compare with previous period"}),g.jsx(Ue.Separator,{})]}),g.jsx(Ue.Title,{children:"Bots:"}),g.jsx(Ue.Item,{selected:l,onClick:h,children:"Exclude potential bots"}),n&&g.jsxs(g.Fragment,{children:[g.jsx(Ue.Separator,{}),g.jsx(Ue.Title,{children:"Orphan visits type:"}),g.jsx(Ue.Item,{...f("base_url"),children:"Base URL"}),g.jsx(Ue.Item,{...f("invalid_short_url"),children:"Invalid short URL"}),g.jsx(Ue.Item,{...f("regular_404"),children:"Regular 404"})]}),g.jsx(Ue.Separator,{}),g.jsx(Ue.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:g.jsx("i",{children:"Reset to defaults"})})]})},v_e=({className:e,value:t,...n})=>{const r=Math.min(100,Math.max(0,t));return g.jsx("div",{className:Oe("flex h-4 bg-gray-100 overflow-hidden rounded-md",e),...n,children:g.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}%`}})})},QB=({info:e})=>{const{status:t}=e;return t==="error"?g.jsx(zr,{variant:"error",children:g.jsx(Xa,{errorData:e.error,fallbackMessage:"An error occurred while loading visits :("})}):t==="loading"?e.progress===null?g.jsx($o,{loading:!0}):g.jsxs($o,{loading:!0,children:["This is going to take a while... :S",g.jsx(v_e,{value:e.progress,className:"mt-4"})]}):null},vv=({children:e,showFallback:t})=>g.jsxs(g.Fragment,{children:[t&&g.jsx($o,{children:"There are no visits matching current filter"}),!t&&g.jsx(g.Fragment,{children:e})]}),y_e=({visitsDeletion:e,deleteVisits:t})=>{const n=e.status==="deleting",{flag:r,setToTrue:i}=xn();return g.jsx(Ot,{title:g.jsx("span",{className:"text-danger font-bold text-base",children:"Danger zone"}),children:g.jsxs(B4,{children:[g.jsxs("dl",{className:"m-0 mr-3",children:[g.jsx("dt",{children:"Delete visits."}),g.jsxs("dd",{className:"m-0",children:["This will delete ",g.jsx("b",{children:"all"})," visits, not only the ones matching current filter."]})]}),!r&&g.jsx(Ct,{variant:"danger",solid:!0,className:"whitespace-nowrap",onClick:i,children:"Delete visits"}),r&&g.jsxs(Ct,{solid:!0,variant:"danger",disabled:n,className:"whitespace-nowrap",onClick:t,autoFocus:!0,children:[!n&&g.jsx(g.Fragment,{children:"Click again to confirm"}),n&&g.jsx(g.Fragment,{children:"Deleting..."})]})]})})},bh=20,b_e=({browser:e,os:t,referer:n,country:r,city:i,userAgent:o,...l},c,f)=>{const h=f?o:`${r} ${i}`;return`${e} ${t} ${n} ${h} ${l.visitedUrl}`.toLowerCase().includes(c.toLowerCase())},x_e=(e,t,n)=>t.filter(r=>b_e(r,e,n)),__e=(e,t)=>rD(t,e),w_e=({visits:e,searchTerm:t,order:n,searchInRawUserAgent:r})=>{const i=t?x_e(t,e,r):[...e],o=__e(n,i),l=o.length;return{visitsGroups:sf(o,bh),total:l}},da="cursor-pointer md:sticky-cell-separated md:top-[calc(var(--header-height)+41px)]",S_e=()=>{const{anchor:e,tooltip:t}=Qo({placement:"right"});return g.jsxs(g.Fragment,{children:[g.jsx(De,{icon:y6,...e}),g.jsx(Jo,{...t,children:"Potentially a visit from a bot or crawler"})]})},C_e=({visits:e,selectedVisits:t=[],setSelectedVisits:n})=>{const[r,i]=_.useState(),o=_.useCallback(F=>{i(F),x(1),n([])},[n]),[l,c]=_.useState({}),f=jn("visitsList"),h=_.useMemo(()=>Rf(m0,f?.columns??{}),[f?.columns]),m=_.useMemo(()=>w_e({visits:e,searchTerm:r,order:l,searchInRawUserAgent:h.userAgent}),[e,r,l,h.userAgent]),[y,x]=_.useState(1),b=y*bh,w=b-bh,C=_.useMemo(()=>h.visitedUrl?m.visitsGroups.length===0||!!m.visitsGroups[y-1]?.[0]?.visitedUrl:!1,[h.visitedUrl,y,m.visitsGroups]),O=6+Number(C)+(h.userAgent?1:2),T=m.total>0,P=F=>c(HS({currentField:l.field,currentOrderDir:l.dir,newField:F})),N=F=>g.jsx(Mh,{currentOrder:l,field:F,className:"float-right mt-[5px] ml-[5px]"});return g.jsx(Ot,{bodyClassName:"[&]:p-0 [&]:pb-1",title:"Visits list",children:g.jsxs(ze,{responsive:!1,size:"sm",className:"w-full relative overflow-y-hidden bg-lm-primary dark:bg-dm-primary",header:g.jsxs(g.Fragment,{children:[g.jsxs(ze.Row,{children:[g.jsxs(ze.Cell,{className:Oe(da,"[&]:text-center"),onClick:()=>n(t.length<m.total?m.visitsGroups.flat():[]),children:[g.jsx("span",{className:"sr-only",children:"Is selected"}),g.jsx(De,{icon:Pu,className:Oe({"text-lm-brand dark:text-dm-brand":t.length>0})})]}),h.potentialBot&&g.jsxs(ze.Cell,{className:Oe(da,"[&]:text-center"),onClick:()=>P("potentialBot"),children:[g.jsx("span",{className:"sr-only",children:"Is bot"}),g.jsx(De,{icon:y6}),N("potentialBot")]}),h.date&&g.jsxs(ze.Cell,{className:da,onClick:()=>P("date"),children:["Date",N("date")]}),h.country&&g.jsxs(ze.Cell,{className:da,onClick:()=>P("country"),children:["Country",N("country")]}),h.region&&g.jsxs(ze.Cell,{className:da,onClick:()=>P("region"),children:["Region",N("region")]}),h.city&&g.jsxs(ze.Cell,{className:da,onClick:()=>P("city"),children:["City",N("city")]}),h.userAgent&&g.jsxs(ze.Cell,{className:da,onClick:()=>P("userAgent"),children:["User agent",N("userAgent")]}),h.browser&&g.jsxs(ze.Cell,{className:da,onClick:()=>P("browser"),children:["Browser",N("browser")]}),h.browser&&g.jsxs(ze.Cell,{className:da,onClick:()=>P("os"),children:["OS",N("os")]}),h.referer&&g.jsxs(ze.Cell,{className:da,onClick:()=>P("referer"),children:["Referrer",N("referer")]}),C&&g.jsxs(ze.Cell,{className:da,onClick:()=>P("visitedUrl"),children:["Visited URL",N("visitedUrl")]})]}),g.jsx(ze.Row,{children:g.jsx(ze.Cell,{colSpan:O,className:"[&]:p-0",children:g.jsx(Lf,{size:"md",borderless:!0,onChange:o})})})]}),footer:m.total>bh?g.jsx(ze.Row,{children:g.jsx(ze.Cell,{type:"td",colSpan:O,className:"md:sticky-cell-separated bottom-0",children:g.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-center gap-4 p-1",children:[g.jsx(t0,{pagesCount:Math.ceil(m.total/bh),currentPage:y,onPageChange:x}),g.jsxs("div",{children:["Visits ",g.jsx("b",{children:bn(w+1)})," to"," ",g.jsx("b",{children:bn(Math.min(b,m.total))})," of"," ",g.jsx("b",{children:bn(m.total)})]})]})})}):void 0,children:[!T&&g.jsx(ze.Row,{children:g.jsx(ze.Cell,{colSpan:O,className:"text-center",children:"There are no visits matching current filter"})}),m.visitsGroups[y-1]?.map((F,B)=>{const W=t.includes(F);return g.jsxs(ze.Row,{className:Oe("cursor-pointer",W&&["bg-lm-table-highlight hover:[&]:bg-lm-table-highlight","dark:bg-dm-table-highlight dark:hover:[&]:bg-dm-table-highlight"]),onClick:()=>n(W?t.filter(Q=>Q!==F):[...t,F]),children:[g.jsx(ze.Cell,{className:"text-center",children:W&&g.jsx(De,{icon:Pu,className:"text-lm-brand dark:text-dm-brand"})}),h.potentialBot&&g.jsx(ze.Cell,{className:"text-center",children:F.potentialBot&&g.jsx(S_e,{})}),h.date&&g.jsx(ze.Cell,{children:g.jsx(Ly,{date:F.date})}),h.country&&g.jsx(ze.Cell,{children:F.country}),h.region&&g.jsx(ze.Cell,{children:F.region}),h.city&&g.jsx(ze.Cell,{children:F.city}),h.userAgent&&g.jsx(ze.Cell,{children:F.userAgent}),h.browser&&g.jsx(ze.Cell,{children:F.browser}),h.os&&g.jsx(ze.Cell,{children:F.os}),h.referer&&g.jsx(ze.Cell,{children:F.referer}),C&&g.jsx(ze.Cell,{children:F.visitedUrl??""})]},B)})]})})},Ys={byTime:{title:"By time",subPath:"by-time",icon:LV},byContext:{title:"By context",subPath:"by-context",icon:_S},byLocation:{title:"By location",subPath:"by-location",icon:A_},list:{title:"List",subPath:"list",icon:xS},options:{title:"Options",subPath:"options",icon:h6,shouldRender:({deletion:e})=>!!e}};Object.freeze(Ys);const w_=({display:e})=>e&&g.jsx("div",{className:"mx-auto w-3/4",children:g.jsx(Ot,{children:g.jsxs("div",{className:"flex gap-2",children:[g.jsx(De,{icon:dH,className:"mt-1"}),g.jsx("i",{children:"Could not calculate previous period because selected one does not have a strictly defined start date."})]})})}),Fm=e=>{const{children:t,visitsInfo:n,getVisits:r,cancelGetVisits:i,deletion:o,exportCsv:l,isOrphanVisits:c=!1,domains:f}=e,{status:h}=n,m=h==="loading",{visits:y,prevVisits:x}=h==="loaded"?n:{visits:[]},[{dateRange:b,visitsFilter:w,loadPrevInterval:C,domain:O},T]=ZB(),P=jn("visits"),[N,F]=_.useState(),B=_.useCallback(({startDate:X,endDate:te},he)=>{T({dateRange:{startDate:X??void 0,endDate:te??void 0}}),F(he)},[T]),{fallbackInterval:W}=h==="fallback"?n:{},[Q,re]=_.useState(h==="fallback"?n.fallbackInterval:P?.defaultInterval??"last30Days"),[ce,ae]=_.useState([]),[J,oe]=_.useState(),ve=_.useRef(!0),{search:ie}=_r(),ue=_.useCallback(X=>X?`../${X}${ie}`:ie,[ie]),Y=_.useMemo(()=>Py(y),[y]),I=_.useMemo(()=>x&&Py(x),[x]),{os:z,browsers:H,referrers:k,countries:M,cities:q,citiesForMap:ee,visitedUrls:se}=_.useMemo(()=>nS(Y),[Y]),me=_.useMemo(()=>nS(I??[]),[I]),de=_.useMemo(()=>Object.fromEntries([["Visits",Object.assign(Y,{type:"main"})],I&&["Previous period",Object.assign(I,{type:"previous"})],ce.length>0&&[J??"Selected",Object.assign(ce,{type:"highlighted"})]].filter(Boolean)),[J,ce,I,Y]),be=_.useMemo(()=>({...w,excludeBots:w.excludeBots??P?.excludeBots,loadPrevInterval:C??P?.loadPrevInterval,domain:O}),[C,w,P?.excludeBots,P?.loadPrevInterval,O]),D=_.useMemo(()=>Object.values(ee),[ee]),R=_.useRef(void 0),G=_.useCallback(X=>{R.current=void 0,ae(X)},[]),ne=_.useCallback((X,te)=>{const he=`${X}_${te}`;R.current===he?(ae([]),oe(void 0),R.current=void 0):(ae(Y.filter(xe=>xe[X]===te)),oe(te),R.current=he)},[Y]),V=rl("filterVisitsByDomain");return _.useEffect(()=>i,[i]),_.useEffect(()=>{const X=b??vz(Q),{loadPrevInterval:te,...he}=be,xe={doIntervalFallback:ve.current,loadPrevInterval:te};r({dateRange:X,filter:he},xe),G([]),ve.current=!1},[Q,b,r,be,G]),_.useEffect(()=>{W&&Q===(P?.defaultInterval??"last30Days")&&re(W)},[Q,h,W,P?.defaultInterval]),g.jsxs("div",{className:"flex flex-col gap-y-4",children:[t,g.jsxs("section",{className:"flex flex-col lg:flex-row-reverse gap-4",children:[g.jsxs("div",{className:"lg:w-1/2 flex flex-col md:flex-row gap-x-2 gap-y-4",children:[g.jsx("div",{className:"grow",children:g.jsx(k4,{disabled:m,dateRangeOrInterval:N??b??Q,defaultText:"All visits",onDatesChange:B})}),V&&f&&g.jsx(zB,{domains:m?[]:f,value:O,onChange:X=>T({domain:X})}),g.jsx(XB,{disabled:m,isOrphanVisits:c,withPrevInterval:!0,selected:be,onChange:({loadPrevInterval:X,...te})=>T({visitsFilter:te,loadPrevInterval:X})})]}),g.jsx("div",{className:"lg:w-1/2 xl:flex-3 flex gap-2",children:y.length>0&&g.jsxs(g.Fragment,{children:[g.jsx(BB,{className:"max-lg:w-full",amount:Y.length,onClick:()=>l(Y)}),g.jsxs(Ct,{variant:"secondary",solid:ce.length>0&&!es(),disabled:ce.length===0,className:"max-lg:w-full",onClick:()=>G([]),children:["Clear selection ",ce.length>0&&g.jsxs(g.Fragment,{children:["(",bn(ce.length),")"]})]})]})})]}),g.jsxs("section",{className:"flex flex-col gap-4",children:[h!=="loaded"&&h!=="fallback"&&g.jsx(QB,{info:n}),!m&&h!=="error"&&g.jsxs(g.Fragment,{children:[g.jsx(Ws,{fill:!0,className:"sticky top-(--header-height) z-2",children:Object.values(Ys).map(({title:X,icon:te,subPath:he,shouldRender:xe},Le)=>!xe||xe(e)?g.jsxs(Ws.Pill,{to:ue(he),replace:!0,children:[g.jsx(De,{icon:te}),g.jsx("span",{className:"ml-2 max-lg:sr-only",children:X})]},Le):void 0).filter(Boolean)}),g.jsxs(zy,{children:[g.jsx(lt,{path:Ys.byTime.subPath,element:g.jsxs(vv,{showFallback:y.length===0,children:[g.jsx("div",{"data-testid":"line-chart-container",children:g.jsx(KB,{visitsGroups:de,setSelectedVisits:G,onDateRangeChange:B})}),g.jsx(w_,{display:!!be.loadPrevInterval&&!x})]})}),g.jsx(lt,{path:Ys.byContext.subPath,element:g.jsxs(vv,{showFallback:y.length===0,children:[g.jsxs("div",{className:Oe("grid grid-cols-1 gap-4",{"lg:grid-cols-2":c,"xl:grid-cols-3":!c}),children:[g.jsx(PL,{title:"Operating systems",stats:z,prevStats:me.os}),g.jsx(PL,{title:"Browsers",stats:H,prevStats:me.browsers}),g.jsx(Hg,{title:"Referrers",withPagination:!1,stats:k,prevStats:me.referrers,highlightedStats:zg(ce,"referer"),highlightedLabel:J,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:X=>ne("referer",X)}),c&&g.jsx(Hg,{title:"Visited URLs",stats:se,prevStats:me.visitedUrls,highlightedStats:zg(ce,"visitedUrl"),highlightedLabel:J,sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:X=>ne("visitedUrl",X)})]}),g.jsx(w_,{display:!!be.loadPrevInterval&&!x})]})}),g.jsx(lt,{path:Ys.byLocation.subPath,element:g.jsxs(vv,{showFallback:y.length===0,children:[g.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[g.jsx(Hg,{title:"Countries",stats:M,prevStats:me.countries,highlightedStats:zg(ce,"country"),highlightedLabel:J,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:X=>ne("country",X)}),g.jsx(Hg,{title:"Cities",stats:q,prevStats:me.cities,highlightedStats:zg(ce,"city"),highlightedLabel:J,extraHeaderContent:X=>D.length>0&&g.jsx(g_e,{modalTitle:"Cities",locations:D,activeCities:X}),sortingItems:{name:"City name",amount:"Visits amount"},onClick:X=>ne("city",X)})]}),g.jsx(w_,{display:!!be.loadPrevInterval&&!x})]})}),g.jsx(lt,{path:Ys.list.subPath,element:g.jsx(C_e,{visits:Y,selectedVisits:ce,setSelectedVisits:G})}),o&&g.jsx(lt,{path:Ys.options.subPath,element:g.jsx(y_e,{...o})}),g.jsx(lt,{path:"*",element:g.jsx(mS,{replace:!0,to:ue(Ys.byTime.subPath)})})]})]})]})]})},E_e=Ea(({ReportExporter:e})=>{const{domain:t=""}=Yu(),[n,r=n]=t.split("_"),{getDomainVisits:i,domainVisits:o,cancelGetDomainVisits:l}=K1e(),c=_.useCallback((h,m)=>i({domain:r,options:m,params:h}),[r,i]),f=_.useCallback(h=>e.exportVisits(`domain_${n}_visits.csv`,h),[n,e]);return g.jsx(Fm,{getVisits:c,cancelGetVisits:l,visitsInfo:o,exportCsv:f,children:g.jsx($m,{visits:o.status==="loaded"?o.visits:[],title:`"${n}" visits`})})},()=>[Xi.visits]),A_e=ea(E_e,["ReportExporter"]),O_e=Ea(({ReportExporter:e})=>{const t=_.useCallback(c=>e.exportVisits("non_orphan_visits.csv",c),[e]),{getNonOrphanVisits:n,nonOrphanVisits:r,cancelGetNonOrphanVisits:i}=J1e(),o=_.useCallback((c,f)=>n({options:f,params:c,domain:c.filter?.domain}),[n]),{domainsList:l}=ec();return g.jsx(Fm,{getVisits:o,cancelGetVisits:i,visitsInfo:r,exportCsv:t,domains:l.domains,children:g.jsx($m,{title:"Non-orphan visits",visits:r.status==="loaded"?r.visits:[]})})},()=>[Xi.visits]),T_e=ea(O_e,["ReportExporter"]),j_e=Ea(({ReportExporter:e})=>{const t=_.useCallback(m=>e.exportVisits("orphan_visits.csv",m),[e]),{getOrphanVisits:n,orphanVisits:r,cancelGetOrphanVisits:i}=obe(),o=_.useCallback((m,y)=>n({options:y,params:m,orphanVisitsType:m.filter?.orphanVisitsType,domain:m.filter?.domain}),[n]),{deleteOrphanVisits:l,orphanVisitsDeletion:c}=nbe(),f=_.useMemo(()=>({deleteVisits:l,visitsDeletion:c}),[l,c]),{domainsList:h}=ec();return g.jsx(Fm,{getVisits:o,cancelGetVisits:i,visitsInfo:r,exportCsv:t,deletion:f,isOrphanVisits:!0,domains:h.domains,children:g.jsx($m,{title:"Orphan visits",visits:r.status==="loaded"?r.visits:[]})})},()=>[Xi.orphanVisits]),M_e=ea(j_e,["ReportExporter"]),P_e=({shortUrl:e})=>{const{anchor:t,tooltip:n}=Qo({placement:"bottom"});return e?g.jsxs("span",{children:[g.jsx("b",{className:"cursor-default",...t,children:g.jsx(Ly,{date:e.dateCreated,relative:!0})}),g.jsx(Jo,{...n,children:g.jsx(Ly,{date:e.dateCreated})})]}):g.jsx("small",{children:"Loading..."})},N_e=({shortUrl:e,loading:t,shortUrlVisits:n})=>{const{visits:r=[]}=n.status==="loaded"?n:{},i=e?.shortUrl??"",o=e?.longUrl??"",l=e?.title;return g.jsxs($m,{title:g.jsxs(g.Fragment,{children:["Visits for ",g.jsx(Ci,{href:i})]}),visits:r,shortUrl:e,children:[g.jsx("hr",{}),g.jsxs("div",{children:["Created: ",g.jsx(P_e,{shortUrl:e})]}),g.jsxs("div",{"data-testid":"long-url-container",children:[`${l?"Title":"Long URL"}: `,t&&g.jsx("small",{children:"Loading..."}),!t&&g.jsx(Ci,{href:o,children:l??o})]})]})},L_e=Ea(({ReportExporter:e})=>{const t=L4(),{shortUrlsDetails:n,getShortUrlsDetails:r}=n1(),i=n.status==="loaded"?n.shortUrls:void 0,o=_.useMemo(()=>i?.get(t),[t,i]),{shortUrlVisits:l,getShortUrlVisits:c,cancelGetShortUrlVisits:f}=hbe(),h=_.useCallback((w,C)=>c({...t,options:C,params:w}),[c,t]),m=_.useCallback(w=>e.exportVisits(`short-url_${o?.shortUrl.replace(/https?:\/\//g,"")}_visits.csv`,w),[e,o?.shortUrl]),{shortUrlVisitsDeletion:y,deleteShortUrlVisits:x}=ube(),b=_.useMemo(()=>({deleteVisits:()=>x(t),visitsDeletion:y}),[x,t,y]);return _.useEffect(()=>{r([t])},[t,r]),g.jsx(Fm,{getVisits:h,cancelGetVisits:f,visitsInfo:l,exportCsv:m,deletion:b,children:g.jsx(N_e,{shortUrl:o,loading:n.status==="loading",shortUrlVisits:l})})},e=>e.shortCode?[Xi.shortUrlVisits(y4(e.shortCode))]:[]),R_e=ea(L_e,["ReportExporter"]),D_e=({tagVisits:e,colorGenerator:t})=>{const{tag:n=""}=Yu(),{visits:r=[],tag:i=n}=e.status==="loaded"?e:{};return g.jsx($m,{title:g.jsxs("span",{className:"flex items-center justify-center",children:[g.jsx("span",{className:"mr-2",children:"Visits for"}),g.jsx(i1,{text:i,colorGenerator:t})]}),visits:r})},k_e=Ea(({ColorGenerator:e,ReportExporter:t})=>{const{domainsList:n}=ec(),{tag:r=""}=Yu(),{getTagVisits:i,tagVisits:o,cancelGetTagVisits:l}=vbe(),c=_.useCallback((h,m)=>i({tag:r,params:h,options:m,domain:h.filter?.domain}),[i,r]),f=_.useCallback(h=>t.exportVisits(`tag_${r}_visits.csv`,h),[t,r]);return g.jsx(Fm,{getVisits:c,cancelGetVisits:l,visitsInfo:o,exportCsv:f,domains:n.domains,children:g.jsx(D_e,{tagVisits:o,colorGenerator:e})})},()=>[Xi.visits]),I_e=ea(k_e,["ColorGenerator","ReportExporter"]),F4=({title:e,colors:t,getVisitsForComparison:n,visitsComparisonInfo:r,cancelGetVisitsComparison:i})=>{const{status:o}=r,l=o==="loading",{visitsGroups:c={}}=o==="loaded"?r:{},f=jn("visits"),h=_.useMemo(()=>Object.keys(c).reduce((N,F,B)=>(N[F]=Object.assign(Py(c[F]),{color:t?.[F]??YB(B)}),N),{}),[t,c]),m=_.useMemo(()=>Object.values(c).every(N=>N.length===0),[c]),[{dateRange:y,visitsFilter:x},b]=ZB(),[w,C]=_.useState(),O=_.useCallback(({startDate:N,endDate:F},B)=>{b({dateRange:{startDate:N??void 0,endDate:F??void 0}}),C(B)},[b]),[T]=_.useState(()=>y??f?.defaultInterval??"last30Days"),P=_.useMemo(()=>({...x,excludeBots:x.excludeBots??f?.excludeBots}),[x,f?.excludeBots]);return _.useEffect(()=>{const N=y??vz(T);return n({params:{dateRange:N,filter:P}}),i},[i,y,n,T,P]),g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsxs(Ot,{bodyClassName:"flex items-center",children:[g.jsx(u1,{}),g.jsx("h3",{className:"grow text-center",children:e})]}),g.jsxs("div",{className:"flex flex-col lg:flex-row-reverse gap-4",children:[g.jsxs("div",{className:"lg:flex-3 flex flex-col md:flex-row gap-x-2 gap-y-4",children:[g.jsx("div",{className:"grow",children:g.jsx(k4,{disabled:l,defaultText:"All visits",dateRangeOrInterval:w??y??T,onDatesChange:O})}),g.jsx(XB,{disabled:l,selected:P,onChange:({orphanVisitsType:N,excludeBots:F})=>b({visitsFilter:{orphanVisitsType:N,excludeBots:F}})})]}),g.jsx("div",{className:"hidden lg:block lg:flex-2 xl:flex-3"})]}),o!=="loaded"&&g.jsx(QB,{info:r}),!l&&g.jsx(vv,{showFallback:m,children:g.jsx(KB,{visitsGroups:h,onDateRangeChange:O})})]})},z_e=Ea(()=>{const e=z4("domains"),{getDomainVisitsForComparison:t,domainVisitsComparison:n,cancelGetDomainVisitsForComparison:r}=Ebe(),i=_.useCallback(o=>t({...o,domains:e}),[e,t]);return g.jsx(F4,{title:`Comparing "${e.join('", "')}"`,getVisitsForComparison:i,visitsComparisonInfo:n,cancelGetVisitsComparison:r})},()=>[Xi.visits]),B_e=Ea(()=>{const e=z4("short-urls"),t=_.useMemo(()=>e.map(fz),[e]),{getShortUrlVisitsForComparison:n,shortUrlVisitsComparison:r,cancelGetShortUrlVisitsComparison:i}=jbe(),o=_.useCallback(y=>n({...y,shortUrls:t}),[n,t]),{shortUrlsDetails:l,getShortUrlsDetails:c}=n1(),f=l.status==="loaded"?l.shortUrls:void 0,h=_.useMemo(()=>[...f?.values()??[]],[f]),m=_.useMemo(()=>{const{status:y}=r;if(l.status==="loading")return{status:"loading",progress:y==="loading"?r.progress:null};if(y!=="loaded")return r;const{visitsGroups:x,...b}=r,w=h.reduce((C,O)=>(C[O.shortUrl]=x[b4(O)]??[],C),{});return{...b,visitsGroups:w}},[r,l.status,h]);return _.useEffect(()=>{t.length>0&&c(t)},[c,t]),g.jsx(F4,{title:g.jsx("span",{"data-testid":"title",children:l.status==="loading"?"Loading...":`Comparing ${h.length} short URLs`}),getVisitsForComparison:o,visitsComparisonInfo:m,cancelGetVisitsComparison:i})},()=>[Xi.visits]),U_e=Ea(({ColorGenerator:e})=>{const t=z4("tags"),{getTagVisitsForComparison:n,tagVisitsComparison:r,cancelGetTagVisitsForComparison:i}=Lbe(),o=_.useCallback(h=>n({...h,tags:t}),[n,t]),{status:l}=r,{visitsGroups:c}=l==="loaded"?r:{visitsGroups:{}},f=_.useMemo(()=>Object.keys(c).reduce((h,m)=>(h[m]=e.getColorForKey(m),h),{}),[e,c]);return g.jsx(F4,{title:g.jsxs(g.Fragment,{children:["Comparing ",t.map(h=>g.jsx(i1,{colorGenerator:e,text:h},h))]}),getVisitsForComparison:o,visitsComparisonInfo:r,cancelGetVisitsComparison:i,colors:f})},()=>[Xi.visits]),$_e=ea(U_e,["ColorGenerator"]),F_e=({createNotFound:e,autoToggleButton:t})=>{const n=_r(),r=ss(),{loadMercureInfo:i}=kz(),{listTags:o}=Im(),{listDomains:l}=ec();_.useEffect(()=>{i(),o(),l()},[l,o,i]);const{sidebarVisible:c,showSidebar:f,hideSidebar:h}=I4();_.useEffect(()=>h(),[n,h]);const m=k2e(f,h);return g.jsxs(g.Fragment,{children:[t&&g.jsx(FB,{className:"fixed top-4 left-3 z-1035"}),g.jsx("div",{...m,className:"h-full",children:g.jsxs("div",{className:"h-full",children:[g.jsx(n1e,{routePrefix:r,showOnMobile:c}),g.jsx("div",{className:"min-h-full pt-[20px] md:pt-[30px] md:pl-(--aside-menu-width)",onPointerDown:h,children:g.jsx("div",{className:"container mx-auto px-3",children:g.jsxs(zy,{children:[g.jsx(lt,{index:!0,element:g.jsx(mS,{replace:!0,to:"overview"})}),g.jsx(lt,{path:"/overview",element:g.jsx(hxe,{})}),g.jsx(lt,{path:"/list-short-urls/:page",element:g.jsx(R2e,{})}),g.jsx(lt,{path:"/create-short-url",element:g.jsx(bB,{})}),g.jsx(lt,{path:"/short-code/:shortCode/visits",children:["","*"].map(y=>g.jsx(lt,{path:y,element:g.jsx(R_e,{})},y))}),g.jsx(lt,{path:"/short-code/:shortCode/edit",element:g.jsx(C2e,{})}),g.jsx(lt,{path:"/short-code/:shortCode/redirect-rules",element:g.jsx(S2e,{})}),g.jsx(lt,{path:"/short-urls/compare-visits",element:g.jsx(B_e,{})}),g.jsx(lt,{path:"/tag/:tag/visits",children:["","*"].map(y=>g.jsx(lt,{path:y,element:g.jsx(I_e,{})},y))}),g.jsx(lt,{path:"/tags/compare-visits",element:g.jsx($_e,{})}),g.jsx(lt,{path:"/domain/:domain/visits",children:["","*"].map(y=>g.jsx(lt,{path:y,element:g.jsx(A_e,{})},y))}),g.jsx(lt,{path:"/orphan-visits",children:["","*"].map(y=>g.jsx(lt,{path:y,element:g.jsx(M_e,{})},y))}),g.jsx(lt,{path:"/non-orphan-visits",children:["","*"].map(y=>g.jsx(lt,{path:y,element:g.jsx(T_e,{})},y))}),g.jsx(lt,{path:"/manage-tags",element:g.jsx(W2e,{})}),g.jsx(lt,{path:"/manage-domains",element:g.jsx(Fbe,{})}),g.jsx(lt,{path:"/domains/compare-visits",element:g.jsx(z_e,{})}),e&&g.jsx(lt,{path:"*",element:e("/list-short-urls/1")})]})})})]})})]})},V_e=e=>({serverVersion:t,apiClient:n,settings:r,routesPrefix:i="",createNotFound:o,tagColorsStorage:l,autoSidebarToggle:c=!0})=>{const f=c1e(t),[h,m]=_.useState(),y=Gu(),x=_.useMemo(()=>y?_.Fragment:u6,[y]);return _.useEffect(()=>{const b=()=>n;e.value("apiClientFactory",b),l&&e.value("TagColorsStorage",l);const w=Rbe();m(w)},[n,c,o,r,l]),h&&g.jsx(sS,{store:h,children:g.jsx(t1e,{value:e.container,children:g.jsx(yk,{value:r??{},children:g.jsx(u1e,{value:f,children:g.jsx($B,{children:g.jsx(o1e,{value:i,children:g.jsx(x,{children:g.jsx(F_e,{createNotFound:o,autoToggleButton:c})})})})})})})})},H_e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",q_e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",G_e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",Y_e=()=>{delete JN.Icon.Default.prototype._getIconUrl,JN.Icon.Default.mergeOptions({iconRetinaUrl:q_e,iconUrl:H_e,shadowUrl:G_e})};Y_e();const W_e=V_e(no),Yf=({children:e,className:t})=>g.jsx("div",{className:Oe("container mx-auto p-5 pt-8 max-md:p-3 max-md:py-4",t),children:e}),JB=({server:e,onClose:t,open:n})=>{const{deleteServer:r}=to(),i=_.useCallback(o=>{o==="confirm"&&r(e)},[r,e]);return g.jsx(eo,{open:n,title:"Remove server",variant:"danger",onClose:()=>t(!1),onConfirm:()=>t(!0),onClosed:i,confirmText:"Delete",children:g.jsxs("div",{className:"flex flex-col gap-y-4",children:[g.jsxs("p",{children:["Are you sure you want to remove ",g.jsx("b",{children:e?e.name:""}),"?"]}),g.jsx("p",{children:g.jsx("i",{children:"No data will be deleted, only the access to this server will be removed from this device. You can create it again at any moment."})})]})})},K_e=({server:e,children:t})=>{const{flag:n,setToTrue:r,setToFalse:i}=xn(),o=Ja(),l=_.useCallback(c=>{i(),c&&o("/")},[i,o]);return g.jsxs(g.Fragment,{children:[g.jsx("button",{type:"button",className:"text-danger hover:underline",onClick:r,children:t}),g.jsx(JB,{server:e,open:n,onClose:l})]})},eU=()=>{const{servers:e}=to(),{selectedServer:t}=Ku();return g.jsx(Yf,{children:g.jsxs("div",{className:"flex flex-col items-center gap-y-4 md:gap-y-8",children:[g.jsxs($o,{className:"w-full lg:w-[80%]",variant:"error",children:[!Ch(t)&&"Could not find this Shlink server.",Ch(t)&&g.jsxs(g.Fragment,{children:[g.jsx("p",{children:"Oops! Could not connect to this Shlink server."}),"Make sure you have internet connection, and the server is properly configured and on-line."]})]}),g.jsxs("p",{className:"text-xl",children:["These are the Shlink servers currently configured. Choose one of them or ",g.jsx(Pr,{to:"/server/create",children:"add a new one"}),"."]}),g.jsx(an,{className:"w-full max-w-100 overflow-hidden",children:g.jsx(KD,{borderless:!0,servers:Object.values(e)})}),Ch(t)&&g.jsxs("p",{className:"text-xl",children:["Alternatively, if you think you may have misconfigured this server, you can ",g.jsx(K_e,{server:t,children:"remove it"})," or ",g.jsx(Pr,{to:`/server/${t.id}/edit?reconnect=true`,children:"edit it"}),"."]})]})})};function tU(e){return n=>{const r=Yu(),{selectServer:i,selectedServer:o}=Ku();return _.useEffect(()=>{r.serverId&&i(r.serverId)},[r.serverId,i]),o?NQ(o)?g.jsx(eU,{}):g.jsx(e,{...n}):g.jsx(Yf,{children:g.jsx($o,{loading:!0})})}}const Z_e=tU(_.memo(({buildShlinkApiClient:e,TagColorsStorage:t})=>{const{selectedServer:n}=Ku(),{settings:r}=nC();if(!oC(n))return g.jsx(eU,{});const i=`/server/${n.id}`;return g.jsxs($B,{children:[g.jsx(FB,{className:"fixed top-3.5 left-3 z-901"}),g.jsx(W_e,{serverVersion:n.version,apiClient:e(n),settings:r,routesPrefix:i,tagColorsStorage:t,createNotFound:o=>g.jsx(JD,{to:`${i}${o}`,children:"List short URLs"}),autoSidebarToggle:!1})]})})),X_e=f0(Z_e,["buildShlinkApiClient","TagColorsStorage"]),nU=()=>{const e=Ja();return _.useCallback(()=>e(-1),[e])},rU=({open:e,duplicatedServers:t,onClose:n,onConfirm:r})=>{const i=t.length>1;return g.jsxs(eo,{size:"lg",title:`Duplicated server${i?"s":""}`,open:e,onClose:n,onConfirm:r,confirmText:`Save duplicate${i?"s":""}`,cancelText:i?"Ignore duplicates":"Discard",children:[g.jsx("p",{children:i?"The next servers already exist:":"There is already a server with:"}),g.jsx("ul",{className:"list-disc my-4 pl-5",children:t.map(({url:o,apiKey:l},c)=>i?g.jsxs("li",{children:[g.jsx("b",{children:o})," - ",g.jsx("b",{children:l})]},c):g.jsxs(_.Fragment,{children:[g.jsxs("li",{children:["URL: ",g.jsx("b",{children:o})]}),g.jsxs("li",{children:["API key: ",g.jsx("b",{children:l})]})]},c))}),g.jsxs("span",{children:[i?"Do you want to save duplicated servers":"Do you want to save this server","?"]})]})},Q_e=({children:e,onImport:t,onError:n=()=>{},tooltipPlacement:r="bottom",className:i="",ServersImporter:o})=>{const{createServers:l,servers:c}=to(),f=_.useRef(null),{anchor:h,tooltip:m}=Qo({placement:r}),[y,x]=_.useState([]),{flag:b,setToTrue:w,setToFalse:C}=xn(),O=_.useRef(!1),T=_.useCallback(async({target:F})=>o.importServersFromFile(F.files?.[0]).then(B=>{const{duplicatedServers:W,newServers:Q}=uQ(c,B);O.current=Q.length>0,l(zv(c,Q)),W.length>0?(x(W),w()):t?.()}).then(()=>{F.value=null}).catch(n),[l,n,t,c,o,w]),P=_.useCallback(()=>{l(zv(c,y)),C(),t?.()},[l,y,C,t,c]),N=_.useCallback(()=>{C(),O.current&&t?.()},[C,t]);return g.jsxs(g.Fragment,{children:[g.jsxs(Ct,{variant:"secondary",className:i,onClick:()=>f.current?.click(),...h,children:[g.jsx(De,{icon:YV,widthAuto:!0})," ",e??"Import from file"]}),g.jsxs(Jo,{...m,children:["You can create servers by importing a CSV file with ",g.jsx("b",{children:"name"}),", ",g.jsx("b",{children:"apiKey"})," and ",g.jsx("b",{children:"url"})," columns."]}),g.jsx("input",{type:"file",accept:".csv",className:"hidden","aria-hidden":!0,tabIndex:-1,ref:f,onChange:T,"data-testid":"csv-file-input"}),g.jsx(rU,{open:b,duplicatedServers:y,onClose:N,onConfirm:P})]})},iU=f0(Q_e,["ServersImporter"]),J_e=e=>_.useCallback(t=>{t.preventDefault(),e(t)},[e]),aU=({onSubmit:e,initialValues:t,children:n,title:r})=>{const[i,o]=_.useState(t?.name??""),[l,c]=_.useState(t?.url??""),[f,h]=_.useState(t?.apiKey??""),{flag:m,toggle:y}=xn(t?.forwardCredentials??!1),x=J_e(()=>e({name:i,url:l,apiKey:f,forwardCredentials:m}));return g.jsxs("form",{name:"serverForm",onSubmit:x,children:[g.jsxs(Ot,{className:"mb-4",bodyClassName:"flex flex-col gap-y-3",title:r,children:[g.jsx(ii,{label:"Name",value:i,onChange:b=>o(b.target.value),required:!0}),g.jsx(ii,{label:"URL",type:"url",value:l,onChange:b=>c(b.target.value),required:!0}),g.jsx(QK,{label:"API key",value:f,onChange:b=>h(b.target.value),required:!0}),g.jsx(BK,{summary:"Advanced options",children:g.jsxs("div",{className:"flex flex-col gap-0.5",children:[g.jsxs(Sa,{className:"flex items-center gap-x-1.5 cursor-pointer",children:[g.jsx(zS,{onChange:y,checked:m}),"Forward credentials to this server on every request."]}),g.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."]}),g.jsxs("small",{className:"pl-5.5 text-gray-600 dark:text-gray-400",children:[g.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 ",g.jsx("code",{className:"whitespace-nowrap",children:"Access-Control-Allow-Origin"})," than ",g.jsx("code",{children:"*"}),"."]})]})})]}),g.jsx("div",{className:"flex items-center justify-end gap-x-2",children:n})]})},DL=4e3,kL=({variant:e})=>g.jsx("div",{className:"mt-4",children:g.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."]})}),ewe=aC(({useTimeoutToggle:e})=>{const{servers:t,createServers:n}=to(),r=Ja(),i=nU(),o=!!Object.keys(t).length,[l,c]=e({delay:DL}),[f,h]=e({delay:DL}),{flag:m,toggle:y}=xn(),[x,b]=_.useState(),w=_.useCallback(O=>{const[T]=zv(t,[O]);n([T]),r(`/server/${T.id}`)},[n,r,t]),C=_.useCallback(O=>{b(O),Object.values(t).some(({url:P,apiKey:N})=>O.url===P&&O.apiKey===N)?y():w(O)},[w,t,y]);return g.jsxs(Yf,{children:[g.jsxs(aU,{title:"Add new server",onSubmit:C,children:[!o&&g.jsx(iU,{tooltipPlacement:"top",onImport:c,onError:h}),o&&g.jsx(Ct,{variant:"secondary",onClick:i,children:"Cancel"}),g.jsx(Ct,{type:"submit",children:"Create server"})]}),l&&g.jsx(kL,{variant:"success"}),f&&g.jsx(kL,{variant:"error"}),g.jsx(rU,{open:m,duplicatedServers:x?[x]:[],onClose:i,onConfirm:()=>x&&w(x)})]})}),twe=f0(ewe,["useTimeoutToggle"]),nwe=tU(()=>{const{editServer:e}=to(),{selectServer:t,selectedServer:n}=Ku(),r=nU(),{reconnect:i}=Wu();if(!Ch(n))return null;const o=l=>{e(n.id,l),i==="true"&&t(n.id),r()};return g.jsx(Yf,{children:g.jsxs(aU,{title:g.jsxs(g.Fragment,{children:['Edit "',n.name,'"']}),initialValues:n,onSubmit:o,children:[g.jsx(Ct,{variant:"secondary",onClick:r,children:"Cancel"}),g.jsx(Ct,{type:"submit",children:"Save"})]})})}),rwe=({server:e})=>{const{setAutoConnect:t}=to(),{flag:n,setToTrue:r,setToFalse:i}=xn(),o=`/server/${e.id}`,{autoConnect:l}=e,c=l?BV:kK;return g.jsxs(g.Fragment,{children:[g.jsxs(Xt,{menuAlignment:"right",children:[g.jsxs(Xt.Item,{to:o,className:"gap-1.5",children:[g.jsx(De,{icon:lH})," Connect"]}),g.jsxs(Xt.Item,{to:`${o}/edit`,className:"gap-1.5",children:[g.jsx(De,{icon:bS})," Edit server"]}),g.jsxs(Xt.Item,{onClick:()=>t(e,!l),className:"gap-1.5",children:[g.jsx(De,{icon:c})," ",l?"Do not a":"A","uto-connect"]}),g.jsx(Xt.Separator,{}),g.jsxs(Xt.Item,{className:"[&]:text-danger gap-1.5",onClick:r,children:[g.jsx(De,{icon:x6})," Remove server"]})]}),g.jsx(JB,{server:e,open:n,onClose:i})]})},iwe=({server:e,hasAutoConnect:t})=>{const{anchor:n,tooltip:r}=Qo();return g.jsxs(ze.Row,{className:"relative",children:[t&&g.jsx(ze.Cell,{columnName:"Auto-connect",children:e.autoConnect&&g.jsxs(g.Fragment,{children:[g.jsx(De,{icon:Pu,className:"text-lm-brand dark:text-dm-brand",...n,"data-testid":"auto-connect"}),g.jsx(Jo,{...r,children:"Auto-connect to this server"})]})}),g.jsx(ze.Cell,{className:"font-bold",columnName:"Name",children:g.jsx(Pr,{to:`/server/${e.id}`,children:e.name})}),g.jsx(ze.Cell,{columnName:"Base URL",className:"max-lg:border-b-0",children:e.url}),g.jsx(ze.Cell,{className:"text-right max-lg:absolute right-0 -top-1 mx-lg:pt-0",children:g.jsx(rwe,{server:e})})]})},awe=4e3,owe=aC(({ServersExporter:e,useTimeoutToggle:t})=>{const{servers:n}=to(),[r,i]=_.useState(""),o=_.useMemo(()=>Object.values(n),[n]),l=_.useMemo(()=>o.filter(({name:m,url:y})=>`${m} ${y}`.toLowerCase().match(r.toLowerCase())),[o,r]),c=o.some(({autoConnect:m})=>!!m),[f,h]=t({delay:awe});return g.jsxs(Yf,{className:"flex flex-col gap-y-4",children:[g.jsx(Lf,{onChange:i}),g.jsxs("div",{className:"flex flex-col md:flex-row gap-2",children:[g.jsxs("div",{className:"flex gap-2",children:[g.jsx(iU,{className:"flex-grow",onError:h,children:"Import servers"}),l.length>0&&g.jsxs(Ct,{variant:"secondary",className:"flex-grow",onClick:async()=>e.exportServers(),children:[g.jsx(De,{icon:m6,widthAuto:!0})," Export servers"]})]}),g.jsxs(Ct,{className:"md:ml-auto",to:"/server/create",children:[g.jsx(De,{icon:im,widthAuto:!0})," Add a server"]})]}),g.jsx(Ot,{className:"card",children:g.jsxs(ze,{header:g.jsxs(ze.Row,{children:[c&&g.jsx(ze.Cell,{className:"w-[35px]",children:g.jsx("span",{className:"sr-only",children:"Auto-connect"})}),g.jsx(ze.Cell,{children:"Name"}),g.jsx(ze.Cell,{children:"Base URL"}),g.jsx(ze.Cell,{children:g.jsx("span",{className:"sr-only",children:"Options"})})]}),children:[!l.length&&g.jsx(ze.Row,{className:"text-center",children:g.jsx(ze.Cell,{colSpan:4,children:"No servers found."})}),l.map(m=>g.jsx(iwe,{server:m,hasAutoConnect:c},m.id))]})}),f&&g.jsx("div",{children:g.jsx(zr,{variant:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})}),swe=f0(owe,["ServersExporter","useTimeoutToggle"]),lwe=e=>zv({},Array.isArray(e)?e.filter(XD):[]),uwe=VD("shlink/remoteServers/fetchServers",async(e,{dispatch:t})=>{const n=await e.jsonRequest(`${bv.homepage}/servers.json`),r=lwe(n);t(dQ(r))}),cwe=()=>{const e=pm(),[t]=zD("HttpClient");return{fetchServers:_.useCallback(()=>e(uwe(t)),[e,t])}},fwe=()=>{const{fetchServers:e}=cwe(),{servers:t}=to(),n=_.useRef(t);_.useEffect(()=>{Object.keys(n.current).length===0&&e()},[e])},dwe=()=>{const{settings:e,setSettings:t}=nC();return g.jsx(Yf,{children:g.jsx(NJ,{settings:e,onUpdateSettings:t,defaultShortUrlsListOrdering:UD})})},hwe=async()=>{(await navigator.serviceWorker?.getRegistrations()??[]).forEach(({waiting:t})=>{t?.addEventListener("statechange",n=>{n.target?.state==="activated"&&window.location.reload()}),t?.postMessage({type:"SKIP_WAITING"})})},mwe=()=>{const{appUpdated:e,resetAppUpdate:t}=aQ();fwe();const r=_r().pathname==="/",{settings:i}=nC();return _.useEffect(()=>{BZ(i.ui?.theme??qS())},[i.ui?.theme]),g.jsxs("div",{className:"h-full",children:[g.jsxs(g.Fragment,{children:[g.jsx(zQ,{}),g.jsxs("div",{className:"h-full pt-(--header-height)",children:[g.jsx("div",{"data-testid":"shlink-wrapper",className:Oe("min-h-full pb-[calc(var(--footer-height)+var(--footer-margin))] -mb-[calc(var(--footer-height)+var(--footer-margin))]",{"flex items-center pt-4":r}),children:g.jsxs(zy,{children:[g.jsx(lt,{index:!0,element:g.jsx(PQ,{})}),g.jsx(lt,{path:"/settings",children:["","*"].map(o=>g.jsx(lt,{path:o,element:g.jsx(dwe,{})},o))}),g.jsx(lt,{path:"/manage-servers",element:g.jsx(swe,{})}),g.jsx(lt,{path:"/server/create",element:g.jsx(twe,{})}),g.jsx(lt,{path:"/server/:serverId/edit",element:g.jsx(nwe,{})}),g.jsx(lt,{path:"/server/:serverId",children:["","*"].map(o=>g.jsx(lt,{path:o,element:g.jsx(X_e,{})},o))}),g.jsx(lt,{path:"*",element:g.jsx(JD,{})})]})}),g.jsx("div",{className:"h-(--footer-height) mt-(--footer-margin) md:px-4",children:g.jsx(FQ,{})})]})]}),g.jsx(UZ,{isOpen:e,onClose:t,forceUpdate:hwe})]})};class pwe extends _.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 g.jsxs(QD,{title:"Oops! This is awkward :S",children:[g.jsx("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),g.jsx("br",{}),g.jsx(Ct,{size:"lg",onClick:()=>n.reload(),children:"Take me back"})]});const{children:r}=this.props;return r}}const gwe=({children:e})=>{const t=_r();return _.useEffect(()=>{scrollTo(0,0)},[t]),g.jsx(g.Fragment,{children:e})},IL={"Content-Type":"application/json"},zL=e=>e?.body?e?{...e,headers:{...e.headers??{},...IL}}:{headers:IL}:e;let vwe=class{#t;constructor(t=globalThis.fetch.bind(globalThis)){this.#t=t}async jsonRequest(t,n){const r=await this.#t(t,zL(n)),i=await r.json();if(!r.ok)throw i;return i}async emptyRequest(t,n){const r=await this.#t(t,zL(n));if(!r.ok)throw await r.json()}};const ywe=(e,t)=>`${e}/rest/v${t}`,bwe=e=>e.dir?`${e.field}-${e.dir}`:void 0,xwe=({orderBy:e={},excludeMaxVisitsReached:t,excludePastValidUntil:n,...r})=>({...r,excludeMaxVisitsReached:t===!0?"true":void 0,excludePastValidUntil:n===!0?"true":void 0,orderBy:bwe(e)}),_we=(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("/"),o=i.length?`/${i.join("/")}`:"";return`${n}://${t}${o}`},wwe=(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()};class Swe{#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:xwe(n),signal:t}).then(({shortUrls:r})=>r)}async createShortUrl({signal:t,...n}){const r=Object.entries(n).reduce((i,[o,l])=>(l&&(i[o]=l),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:o,signal:l}){const c=wwe(r??{}),f=c?`?${c}`:"",h=o?_we(this.#n.baseUrl,o):this.#n.baseUrl;return[`${ywe(h,this.#t)}${t}${f}`,{method:n,body:i&&JSON.stringify(i),headers:{"X-Api-Key":this.#n.apiKey},credentials:this.#o.requestCredentials,signal:l}]}}const BL=new Map,Cwe=e=>{const{selectedServer:t}=e();if(!XD(t))throw new Error("There's no selected server or it is not found");return t},Ewe=e=>t=>{const{url:n,apiKey:r,forwardCredentials:i}=typeof t=="function"?Cwe(t):t,o=`${r}_${n}_${i?"forward":"no-forward"}`,l=BL.get(o);if(l)return l;const c=new Swe(e,{apiKey:r,baseUrl:n},{requestCredentials:i?"include":void 0});return BL.set(o,c),c},Awe=({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)},Owe=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);Awe(e,i,n)},Twe="shlink-servers.csv";class jwe{#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(RQ);try{const n=this.#n(t);Owe(this.#r,n,Twe)}catch(n){console.error(n)}}}const Mwe=e=>{if(!Array.isArray(e))throw new Error("Provided file does not have the right format.");return e.map(kQ)};class Pwe{#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 Mwe(r)}}var S_,UL;function Nwe(){return UL||(UL=1,S_=(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var l in r)n.d(o,l,(function(c){return r[c]}).bind(null,l));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=31)})([function(e,t){var n;n=(function(){return this})();try{n=n||new Function("return this")()}catch{typeof window=="object"&&(n=window)}e.exports=n},function(e,t,n){var r=n(6),i=Object.keys||function(w){var C=[];for(var O in w)C.push(O);return C};e.exports=y;var o=Object.create(n(4));o.inherits=n(2);var l=n(22),c=n(13);o.inherits(y,l);for(var f=i(c.prototype),h=0;h<f.length;h++){var m=f[h];y.prototype[m]||(y.prototype[m]=c.prototype[m])}function y(w){if(!(this instanceof y))return new y(w);l.call(this,w),c.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",x)}function x(){this.allowHalfOpen||this._writableState.ended||r.nextTick(b,this)}function b(w){w.end()}Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(y.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)}}),y.prototype._destroy=function(w,C){this.push(null),this.end(),r.nextTick(C,w)}},function(e,t){typeof Object.create=="function"?e.exports=function(n,r){r&&(n.super_=r,n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(n,r){if(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){var i=n(37),o=n(38),l=n(39);function c(){return h.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function f(D,R){if(c()<R)throw new RangeError("Invalid typed array length");return h.TYPED_ARRAY_SUPPORT?(D=new Uint8Array(R)).__proto__=h.prototype:(D===null&&(D=new h(R)),D.length=R),D}function h(D,R,G){if(!(h.TYPED_ARRAY_SUPPORT||this instanceof h))return new h(D,R,G);if(typeof D=="number"){if(typeof R=="string")throw new Error("If encoding is specified then the first argument must be a string");return x(this,D)}return m(this,D,R,G)}function m(D,R,G,ne){if(typeof R=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&R instanceof ArrayBuffer?(function(V,X,te,he){if(X.byteLength,te<0||X.byteLength<te)throw new RangeError("'offset' is out of bounds");if(X.byteLength<te+(he||0))throw new RangeError("'length' is out of bounds");return X=te===void 0&&he===void 0?new Uint8Array(X):he===void 0?new Uint8Array(X,te):new Uint8Array(X,te,he),h.TYPED_ARRAY_SUPPORT?(V=X).__proto__=h.prototype:V=b(V,X),V})(D,R,G,ne):typeof R=="string"?(function(V,X,te){if(typeof te=="string"&&te!==""||(te="utf8"),!h.isEncoding(te))throw new TypeError('"encoding" must be a valid string encoding');var he=0|C(X,te),xe=(V=f(V,he)).write(X,te);return xe!==he&&(V=V.slice(0,xe)),V})(D,R,G):(function(V,X){if(h.isBuffer(X)){var te=0|w(X.length);return(V=f(V,te)).length===0||X.copy(V,0,0,te),V}if(X){if(typeof ArrayBuffer<"u"&&X.buffer instanceof ArrayBuffer||"length"in X)return typeof X.length!="number"||(function(he){return he!=he})(X.length)?f(V,0):b(V,X);if(X.type==="Buffer"&&l(X.data))return b(V,X.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")})(D,R)}function y(D){if(typeof D!="number")throw new TypeError('"size" argument must be a number');if(D<0)throw new RangeError('"size" argument must not be negative')}function x(D,R){if(y(R),D=f(D,R<0?0:0|w(R)),!h.TYPED_ARRAY_SUPPORT)for(var G=0;G<R;++G)D[G]=0;return D}function b(D,R){var G=R.length<0?0:0|w(R.length);D=f(D,G);for(var ne=0;ne<G;ne+=1)D[ne]=255&R[ne];return D}function w(D){if(D>=c())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+c().toString(16)+" bytes");return 0|D}function C(D,R){if(h.isBuffer(D))return D.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(D)||D instanceof ArrayBuffer))return D.byteLength;typeof D!="string"&&(D=""+D);var G=D.length;if(G===0)return 0;for(var ne=!1;;)switch(R){case"ascii":case"latin1":case"binary":return G;case"utf8":case"utf-8":case void 0:return me(D).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*G;case"hex":return G>>>1;case"base64":return de(D).length;default:if(ne)return me(D).length;R=(""+R).toLowerCase(),ne=!0}}function O(D,R,G){var ne=D[R];D[R]=D[G],D[G]=ne}function T(D,R,G,ne,V){if(D.length===0)return-1;if(typeof G=="string"?(ne=G,G=0):G>2147483647?G=2147483647:G<-2147483648&&(G=-2147483648),G=+G,isNaN(G)&&(G=V?0:D.length-1),G<0&&(G=D.length+G),G>=D.length){if(V)return-1;G=D.length-1}else if(G<0){if(!V)return-1;G=0}if(typeof R=="string"&&(R=h.from(R,ne)),h.isBuffer(R))return R.length===0?-1:P(D,R,G,ne,V);if(typeof R=="number")return R&=255,h.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?V?Uint8Array.prototype.indexOf.call(D,R,G):Uint8Array.prototype.lastIndexOf.call(D,R,G):P(D,[R],G,ne,V);throw new TypeError("val must be string, number or Buffer")}function P(D,R,G,ne,V){var X,te=1,he=D.length,xe=R.length;if(ne!==void 0&&((ne=String(ne).toLowerCase())==="ucs2"||ne==="ucs-2"||ne==="utf16le"||ne==="utf-16le")){if(D.length<2||R.length<2)return-1;te=2,he/=2,xe/=2,G/=2}function Le(Ke,at){return te===1?Ke[at]:Ke.readUInt16BE(at*te)}if(V){var ke=-1;for(X=G;X<he;X++)if(Le(D,X)===Le(R,ke===-1?0:X-ke)){if(ke===-1&&(ke=X),X-ke+1===xe)return ke*te}else ke!==-1&&(X-=X-ke),ke=-1}else for(G+xe>he&&(G=he-xe),X=G;X>=0;X--){for(var We=!0,Je=0;Je<xe;Je++)if(Le(D,X+Je)!==Le(R,Je)){We=!1;break}if(We)return X}return-1}function N(D,R,G,ne){G=Number(G)||0;var V=D.length-G;ne?(ne=Number(ne))>V&&(ne=V):ne=V;var X=R.length;if(X%2!=0)throw new TypeError("Invalid hex string");ne>X/2&&(ne=X/2);for(var te=0;te<ne;++te){var he=parseInt(R.substr(2*te,2),16);if(isNaN(he))return te;D[G+te]=he}return te}function F(D,R,G,ne){return be(me(R,D.length-G),D,G,ne)}function B(D,R,G,ne){return be((function(V){for(var X=[],te=0;te<V.length;++te)X.push(255&V.charCodeAt(te));return X})(R),D,G,ne)}function W(D,R,G,ne){return B(D,R,G,ne)}function Q(D,R,G,ne){return be(de(R),D,G,ne)}function re(D,R,G,ne){return be((function(V,X){for(var te,he,xe,Le=[],ke=0;ke<V.length&&!((X-=2)<0);++ke)he=(te=V.charCodeAt(ke))>>8,xe=te%256,Le.push(xe),Le.push(he);return Le})(R,D.length-G),D,G,ne)}function ce(D,R,G){return R===0&&G===D.length?i.fromByteArray(D):i.fromByteArray(D.slice(R,G))}function ae(D,R,G){G=Math.min(D.length,G);for(var ne=[],V=R;V<G;){var X,te,he,xe,Le=D[V],ke=null,We=Le>239?4:Le>223?3:Le>191?2:1;if(V+We<=G)switch(We){case 1:Le<128&&(ke=Le);break;case 2:(192&(X=D[V+1]))==128&&(xe=(31&Le)<<6|63&X)>127&&(ke=xe);break;case 3:X=D[V+1],te=D[V+2],(192&X)==128&&(192&te)==128&&(xe=(15&Le)<<12|(63&X)<<6|63&te)>2047&&(xe<55296||xe>57343)&&(ke=xe);break;case 4:X=D[V+1],te=D[V+2],he=D[V+3],(192&X)==128&&(192&te)==128&&(192&he)==128&&(xe=(15&Le)<<18|(63&X)<<12|(63&te)<<6|63&he)>65535&&xe<1114112&&(ke=xe)}ke===null?(ke=65533,We=1):ke>65535&&(ke-=65536,ne.push(ke>>>10&1023|55296),ke=56320|1023&ke),ne.push(ke),V+=We}return(function(Je){var Ke=Je.length;if(Ke<=J)return String.fromCharCode.apply(String,Je);for(var at="",zt=0;zt<Ke;)at+=String.fromCharCode.apply(String,Je.slice(zt,zt+=J));return at})(ne)}t.Buffer=h,t.SlowBuffer=function(D){return+D!=D&&(D=0),h.alloc(+D)},t.INSPECT_MAX_BYTES=50,h.TYPED_ARRAY_SUPPORT=r.TYPED_ARRAY_SUPPORT!==void 0?r.TYPED_ARRAY_SUPPORT:(function(){try{var D=new Uint8Array(1);return D.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},D.foo()===42&&typeof D.subarray=="function"&&D.subarray(1,1).byteLength===0}catch{return!1}})(),t.kMaxLength=c(),h.poolSize=8192,h._augment=function(D){return D.__proto__=h.prototype,D},h.from=function(D,R,G){return m(null,D,R,G)},h.TYPED_ARRAY_SUPPORT&&(h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0})),h.alloc=function(D,R,G){return(function(ne,V,X,te){return y(V),V<=0?f(ne,V):X!==void 0?typeof te=="string"?f(ne,V).fill(X,te):f(ne,V).fill(X):f(ne,V)})(null,D,R,G)},h.allocUnsafe=function(D){return x(null,D)},h.allocUnsafeSlow=function(D){return x(null,D)},h.isBuffer=function(D){return!(D==null||!D._isBuffer)},h.compare=function(D,R){if(!h.isBuffer(D)||!h.isBuffer(R))throw new TypeError("Arguments must be Buffers");if(D===R)return 0;for(var G=D.length,ne=R.length,V=0,X=Math.min(G,ne);V<X;++V)if(D[V]!==R[V]){G=D[V],ne=R[V];break}return G<ne?-1:ne<G?1:0},h.isEncoding=function(D){switch(String(D).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}},h.concat=function(D,R){if(!l(D))throw new TypeError('"list" argument must be an Array of Buffers');if(D.length===0)return h.alloc(0);var G;if(R===void 0)for(R=0,G=0;G<D.length;++G)R+=D[G].length;var ne=h.allocUnsafe(R),V=0;for(G=0;G<D.length;++G){var X=D[G];if(!h.isBuffer(X))throw new TypeError('"list" argument must be an Array of Buffers');X.copy(ne,V),V+=X.length}return ne},h.byteLength=C,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var D=this.length;if(D%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var R=0;R<D;R+=2)O(this,R,R+1);return this},h.prototype.swap32=function(){var D=this.length;if(D%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var R=0;R<D;R+=4)O(this,R,R+3),O(this,R+1,R+2);return this},h.prototype.swap64=function(){var D=this.length;if(D%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var R=0;R<D;R+=8)O(this,R,R+7),O(this,R+1,R+6),O(this,R+2,R+5),O(this,R+3,R+4);return this},h.prototype.toString=function(){var D=0|this.length;return D===0?"":arguments.length===0?ae(this,0,D):(function(R,G,ne){var V=!1;if((G===void 0||G<0)&&(G=0),G>this.length||((ne===void 0||ne>this.length)&&(ne=this.length),ne<=0)||(ne>>>=0)<=(G>>>=0))return"";for(R||(R="utf8");;)switch(R){case"hex":return ie(this,G,ne);case"utf8":case"utf-8":return ae(this,G,ne);case"ascii":return oe(this,G,ne);case"latin1":case"binary":return ve(this,G,ne);case"base64":return ce(this,G,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,G,ne);default:if(V)throw new TypeError("Unknown encoding: "+R);R=(R+"").toLowerCase(),V=!0}}).apply(this,arguments)},h.prototype.equals=function(D){if(!h.isBuffer(D))throw new TypeError("Argument must be a Buffer");return this===D||h.compare(this,D)===0},h.prototype.inspect=function(){var D="",R=t.INSPECT_MAX_BYTES;return this.length>0&&(D=this.toString("hex",0,R).match(/.{2}/g).join(" "),this.length>R&&(D+=" ... ")),"<Buffer "+D+">"},h.prototype.compare=function(D,R,G,ne,V){if(!h.isBuffer(D))throw new TypeError("Argument must be a Buffer");if(R===void 0&&(R=0),G===void 0&&(G=D?D.length:0),ne===void 0&&(ne=0),V===void 0&&(V=this.length),R<0||G>D.length||ne<0||V>this.length)throw new RangeError("out of range index");if(ne>=V&&R>=G)return 0;if(ne>=V)return-1;if(R>=G)return 1;if(this===D)return 0;for(var X=(V>>>=0)-(ne>>>=0),te=(G>>>=0)-(R>>>=0),he=Math.min(X,te),xe=this.slice(ne,V),Le=D.slice(R,G),ke=0;ke<he;++ke)if(xe[ke]!==Le[ke]){X=xe[ke],te=Le[ke];break}return X<te?-1:te<X?1:0},h.prototype.includes=function(D,R,G){return this.indexOf(D,R,G)!==-1},h.prototype.indexOf=function(D,R,G){return T(this,D,R,G,!0)},h.prototype.lastIndexOf=function(D,R,G){return T(this,D,R,G,!1)},h.prototype.write=function(D,R,G,ne){if(R===void 0)ne="utf8",G=this.length,R=0;else if(G===void 0&&typeof R=="string")ne=R,G=this.length,R=0;else{if(!isFinite(R))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");R|=0,isFinite(G)?(G|=0,ne===void 0&&(ne="utf8")):(ne=G,G=void 0)}var V=this.length-R;if((G===void 0||G>V)&&(G=V),D.length>0&&(G<0||R<0)||R>this.length)throw new RangeError("Attempt to write outside buffer bounds");ne||(ne="utf8");for(var X=!1;;)switch(ne){case"hex":return N(this,D,R,G);case"utf8":case"utf-8":return F(this,D,R,G);case"ascii":return B(this,D,R,G);case"latin1":case"binary":return W(this,D,R,G);case"base64":return Q(this,D,R,G);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,D,R,G);default:if(X)throw new TypeError("Unknown encoding: "+ne);ne=(""+ne).toLowerCase(),X=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var J=4096;function oe(D,R,G){var ne="";G=Math.min(D.length,G);for(var V=R;V<G;++V)ne+=String.fromCharCode(127&D[V]);return ne}function ve(D,R,G){var ne="";G=Math.min(D.length,G);for(var V=R;V<G;++V)ne+=String.fromCharCode(D[V]);return ne}function ie(D,R,G){var ne=D.length;(!R||R<0)&&(R=0),(!G||G<0||G>ne)&&(G=ne);for(var V="",X=R;X<G;++X)V+=se(D[X]);return V}function ue(D,R,G){for(var ne=D.slice(R,G),V="",X=0;X<ne.length;X+=2)V+=String.fromCharCode(ne[X]+256*ne[X+1]);return V}function Y(D,R,G){if(D%1!=0||D<0)throw new RangeError("offset is not uint");if(D+R>G)throw new RangeError("Trying to access beyond buffer length")}function I(D,R,G,ne,V,X){if(!h.isBuffer(D))throw new TypeError('"buffer" argument must be a Buffer instance');if(R>V||R<X)throw new RangeError('"value" argument is out of bounds');if(G+ne>D.length)throw new RangeError("Index out of range")}function z(D,R,G,ne){R<0&&(R=65535+R+1);for(var V=0,X=Math.min(D.length-G,2);V<X;++V)D[G+V]=(R&255<<8*(ne?V:1-V))>>>8*(ne?V:1-V)}function H(D,R,G,ne){R<0&&(R=4294967295+R+1);for(var V=0,X=Math.min(D.length-G,4);V<X;++V)D[G+V]=R>>>8*(ne?V:3-V)&255}function k(D,R,G,ne,V,X){if(G+ne>D.length)throw new RangeError("Index out of range");if(G<0)throw new RangeError("Index out of range")}function M(D,R,G,ne,V){return V||k(D,0,G,4),o.write(D,R,G,ne,23,4),G+4}function q(D,R,G,ne,V){return V||k(D,0,G,8),o.write(D,R,G,ne,52,8),G+8}h.prototype.slice=function(D,R){var G,ne=this.length;if((D=~~D)<0?(D+=ne)<0&&(D=0):D>ne&&(D=ne),(R=R===void 0?ne:~~R)<0?(R+=ne)<0&&(R=0):R>ne&&(R=ne),R<D&&(R=D),h.TYPED_ARRAY_SUPPORT)(G=this.subarray(D,R)).__proto__=h.prototype;else{var V=R-D;G=new h(V,void 0);for(var X=0;X<V;++X)G[X]=this[X+D]}return G},h.prototype.readUIntLE=function(D,R,G){D|=0,R|=0,G||Y(D,R,this.length);for(var ne=this[D],V=1,X=0;++X<R&&(V*=256);)ne+=this[D+X]*V;return ne},h.prototype.readUIntBE=function(D,R,G){D|=0,R|=0,G||Y(D,R,this.length);for(var ne=this[D+--R],V=1;R>0&&(V*=256);)ne+=this[D+--R]*V;return ne},h.prototype.readUInt8=function(D,R){return R||Y(D,1,this.length),this[D]},h.prototype.readUInt16LE=function(D,R){return R||Y(D,2,this.length),this[D]|this[D+1]<<8},h.prototype.readUInt16BE=function(D,R){return R||Y(D,2,this.length),this[D]<<8|this[D+1]},h.prototype.readUInt32LE=function(D,R){return R||Y(D,4,this.length),(this[D]|this[D+1]<<8|this[D+2]<<16)+16777216*this[D+3]},h.prototype.readUInt32BE=function(D,R){return R||Y(D,4,this.length),16777216*this[D]+(this[D+1]<<16|this[D+2]<<8|this[D+3])},h.prototype.readIntLE=function(D,R,G){D|=0,R|=0,G||Y(D,R,this.length);for(var ne=this[D],V=1,X=0;++X<R&&(V*=256);)ne+=this[D+X]*V;return ne>=(V*=128)&&(ne-=Math.pow(2,8*R)),ne},h.prototype.readIntBE=function(D,R,G){D|=0,R|=0,G||Y(D,R,this.length);for(var ne=R,V=1,X=this[D+--ne];ne>0&&(V*=256);)X+=this[D+--ne]*V;return X>=(V*=128)&&(X-=Math.pow(2,8*R)),X},h.prototype.readInt8=function(D,R){return R||Y(D,1,this.length),128&this[D]?-1*(255-this[D]+1):this[D]},h.prototype.readInt16LE=function(D,R){R||Y(D,2,this.length);var G=this[D]|this[D+1]<<8;return 32768&G?4294901760|G:G},h.prototype.readInt16BE=function(D,R){R||Y(D,2,this.length);var G=this[D+1]|this[D]<<8;return 32768&G?4294901760|G:G},h.prototype.readInt32LE=function(D,R){return R||Y(D,4,this.length),this[D]|this[D+1]<<8|this[D+2]<<16|this[D+3]<<24},h.prototype.readInt32BE=function(D,R){return R||Y(D,4,this.length),this[D]<<24|this[D+1]<<16|this[D+2]<<8|this[D+3]},h.prototype.readFloatLE=function(D,R){return R||Y(D,4,this.length),o.read(this,D,!0,23,4)},h.prototype.readFloatBE=function(D,R){return R||Y(D,4,this.length),o.read(this,D,!1,23,4)},h.prototype.readDoubleLE=function(D,R){return R||Y(D,8,this.length),o.read(this,D,!0,52,8)},h.prototype.readDoubleBE=function(D,R){return R||Y(D,8,this.length),o.read(this,D,!1,52,8)},h.prototype.writeUIntLE=function(D,R,G,ne){D=+D,R|=0,G|=0,ne||I(this,D,R,G,Math.pow(2,8*G)-1,0);var V=1,X=0;for(this[R]=255&D;++X<G&&(V*=256);)this[R+X]=D/V&255;return R+G},h.prototype.writeUIntBE=function(D,R,G,ne){D=+D,R|=0,G|=0,ne||I(this,D,R,G,Math.pow(2,8*G)-1,0);var V=G-1,X=1;for(this[R+V]=255&D;--V>=0&&(X*=256);)this[R+V]=D/X&255;return R+G},h.prototype.writeUInt8=function(D,R,G){return D=+D,R|=0,G||I(this,D,R,1,255,0),h.TYPED_ARRAY_SUPPORT||(D=Math.floor(D)),this[R]=255&D,R+1},h.prototype.writeUInt16LE=function(D,R,G){return D=+D,R|=0,G||I(this,D,R,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[R]=255&D,this[R+1]=D>>>8):z(this,D,R,!0),R+2},h.prototype.writeUInt16BE=function(D,R,G){return D=+D,R|=0,G||I(this,D,R,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[R]=D>>>8,this[R+1]=255&D):z(this,D,R,!1),R+2},h.prototype.writeUInt32LE=function(D,R,G){return D=+D,R|=0,G||I(this,D,R,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[R+3]=D>>>24,this[R+2]=D>>>16,this[R+1]=D>>>8,this[R]=255&D):H(this,D,R,!0),R+4},h.prototype.writeUInt32BE=function(D,R,G){return D=+D,R|=0,G||I(this,D,R,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[R]=D>>>24,this[R+1]=D>>>16,this[R+2]=D>>>8,this[R+3]=255&D):H(this,D,R,!1),R+4},h.prototype.writeIntLE=function(D,R,G,ne){if(D=+D,R|=0,!ne){var V=Math.pow(2,8*G-1);I(this,D,R,G,V-1,-V)}var X=0,te=1,he=0;for(this[R]=255&D;++X<G&&(te*=256);)D<0&&he===0&&this[R+X-1]!==0&&(he=1),this[R+X]=(D/te>>0)-he&255;return R+G},h.prototype.writeIntBE=function(D,R,G,ne){if(D=+D,R|=0,!ne){var V=Math.pow(2,8*G-1);I(this,D,R,G,V-1,-V)}var X=G-1,te=1,he=0;for(this[R+X]=255&D;--X>=0&&(te*=256);)D<0&&he===0&&this[R+X+1]!==0&&(he=1),this[R+X]=(D/te>>0)-he&255;return R+G},h.prototype.writeInt8=function(D,R,G){return D=+D,R|=0,G||I(this,D,R,1,127,-128),h.TYPED_ARRAY_SUPPORT||(D=Math.floor(D)),D<0&&(D=255+D+1),this[R]=255&D,R+1},h.prototype.writeInt16LE=function(D,R,G){return D=+D,R|=0,G||I(this,D,R,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[R]=255&D,this[R+1]=D>>>8):z(this,D,R,!0),R+2},h.prototype.writeInt16BE=function(D,R,G){return D=+D,R|=0,G||I(this,D,R,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[R]=D>>>8,this[R+1]=255&D):z(this,D,R,!1),R+2},h.prototype.writeInt32LE=function(D,R,G){return D=+D,R|=0,G||I(this,D,R,4,2147483647,-2147483648),h.TYPED_ARRAY_SUPPORT?(this[R]=255&D,this[R+1]=D>>>8,this[R+2]=D>>>16,this[R+3]=D>>>24):H(this,D,R,!0),R+4},h.prototype.writeInt32BE=function(D,R,G){return D=+D,R|=0,G||I(this,D,R,4,2147483647,-2147483648),D<0&&(D=4294967295+D+1),h.TYPED_ARRAY_SUPPORT?(this[R]=D>>>24,this[R+1]=D>>>16,this[R+2]=D>>>8,this[R+3]=255&D):H(this,D,R,!1),R+4},h.prototype.writeFloatLE=function(D,R,G){return M(this,D,R,!0,G)},h.prototype.writeFloatBE=function(D,R,G){return M(this,D,R,!1,G)},h.prototype.writeDoubleLE=function(D,R,G){return q(this,D,R,!0,G)},h.prototype.writeDoubleBE=function(D,R,G){return q(this,D,R,!1,G)},h.prototype.copy=function(D,R,G,ne){if(G||(G=0),ne||ne===0||(ne=this.length),R>=D.length&&(R=D.length),R||(R=0),ne>0&&ne<G&&(ne=G),ne===G||D.length===0||this.length===0)return 0;if(R<0)throw new RangeError("targetStart out of bounds");if(G<0||G>=this.length)throw new RangeError("sourceStart out of bounds");if(ne<0)throw new RangeError("sourceEnd out of bounds");ne>this.length&&(ne=this.length),D.length-R<ne-G&&(ne=D.length-R+G);var V,X=ne-G;if(this===D&&G<R&&R<ne)for(V=X-1;V>=0;--V)D[V+R]=this[V+G];else if(X<1e3||!h.TYPED_ARRAY_SUPPORT)for(V=0;V<X;++V)D[V+R]=this[V+G];else Uint8Array.prototype.set.call(D,this.subarray(G,G+X),R);return X},h.prototype.fill=function(D,R,G,ne){if(typeof D=="string"){if(typeof R=="string"?(ne=R,R=0,G=this.length):typeof G=="string"&&(ne=G,G=this.length),D.length===1){var V=D.charCodeAt(0);V<256&&(D=V)}if(ne!==void 0&&typeof ne!="string")throw new TypeError("encoding must be a string");if(typeof ne=="string"&&!h.isEncoding(ne))throw new TypeError("Unknown encoding: "+ne)}else typeof D=="number"&&(D&=255);if(R<0||this.length<R||this.length<G)throw new RangeError("Out of range index");if(G<=R)return this;var X;if(R>>>=0,G=G===void 0?this.length:G>>>0,D||(D=0),typeof D=="number")for(X=R;X<G;++X)this[X]=D;else{var te=h.isBuffer(D)?D:me(new h(D,ne).toString()),he=te.length;for(X=0;X<G-R;++X)this[X+R]=te[X%he]}return this};var ee=/[^+\/0-9A-Za-z-_]/g;function se(D){return D<16?"0"+D.toString(16):D.toString(16)}function me(D,R){var G;R=R||1/0;for(var ne=D.length,V=null,X=[],te=0;te<ne;++te){if((G=D.charCodeAt(te))>55295&&G<57344){if(!V){if(G>56319){(R-=3)>-1&&X.push(239,191,189);continue}if(te+1===ne){(R-=3)>-1&&X.push(239,191,189);continue}V=G;continue}if(G<56320){(R-=3)>-1&&X.push(239,191,189),V=G;continue}G=65536+(V-55296<<10|G-56320)}else V&&(R-=3)>-1&&X.push(239,191,189);if(V=null,G<128){if((R-=1)<0)break;X.push(G)}else if(G<2048){if((R-=2)<0)break;X.push(G>>6|192,63&G|128)}else if(G<65536){if((R-=3)<0)break;X.push(G>>12|224,G>>6&63|128,63&G|128)}else{if(!(G<1114112))throw new Error("Invalid code point");if((R-=4)<0)break;X.push(G>>18|240,G>>12&63|128,G>>6&63|128,63&G|128)}}return X}function de(D){return i.toByteArray((function(R){if((R=(function(G){return G.trim?G.trim():G.replace(/^\s+|\s+$/g,"")})(R).replace(ee,"")).length<2)return"";for(;R.length%4!=0;)R+="=";return R})(D))}function be(D,R,G,ne){for(var V=0;V<ne&&!(V+G>=R.length||V>=D.length);++V)R[V+G]=D[V];return V}}).call(this,n(0))},function(e,t,n){function r(i){return Object.prototype.toString.call(i)}t.isArray=function(i){return Array.isArray?Array.isArray(i):r(i)==="[object Array]"},t.isBoolean=function(i){return typeof i=="boolean"},t.isNull=function(i){return i===null},t.isNullOrUndefined=function(i){return i==null},t.isNumber=function(i){return typeof i=="number"},t.isString=function(i){return typeof i=="string"},t.isSymbol=function(i){return typeof i=="symbol"},t.isUndefined=function(i){return i===void 0},t.isRegExp=function(i){return r(i)==="[object RegExp]"},t.isObject=function(i){return typeof i=="object"&&i!==null},t.isDate=function(i){return r(i)==="[object Date]"},t.isError=function(i){return r(i)==="[object Error]"||i instanceof Error},t.isFunction=function(i){return typeof i=="function"},t.isPrimitive=function(i){return i===null||typeof i=="boolean"||typeof i=="number"||typeof i=="string"||typeof i=="symbol"||i===void 0},t.isBuffer=n(3).Buffer.isBuffer},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function c(O){if(n===setTimeout)return setTimeout(O,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(O,0);try{return n(O,0)}catch{try{return n.call(null,O,0)}catch{return n.call(this,O,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:o}catch{n=o}try{r=typeof clearTimeout=="function"?clearTimeout:l}catch{r=l}})();var f,h=[],m=!1,y=-1;function x(){m&&f&&(m=!1,f.length?h=f.concat(h):y=-1,h.length&&b())}function b(){if(!m){var O=c(x);m=!0;for(var T=h.length;T;){for(f=h,h=[];++y<T;)f&&f[y].run();y=-1,T=h.length}f=null,m=!1,(function(P){if(r===clearTimeout)return clearTimeout(P);if((r===l||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(P);try{r(P)}catch{try{return r.call(null,P)}catch{return r.call(this,P)}}})(O)}}function w(O,T){this.fun=O,this.array=T}function C(){}i.nextTick=function(O){var T=new Array(arguments.length-1);if(arguments.length>1)for(var P=1;P<arguments.length;P++)T[P-1]=arguments[P];h.push(new w(O,T)),h.length!==1||m||c(b)},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=C,i.addListener=C,i.once=C,i.off=C,i.removeListener=C,i.removeAllListeners=C,i.emit=C,i.prependListener=C,i.prependOnceListener=C,i.listeners=function(O){return[]},i.binding=function(O){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(O){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){(function(r){r===void 0||!r.version||r.version.indexOf("v0.")===0||r.version.indexOf("v1.")===0&&r.version.indexOf("v1.8.")!==0?e.exports={nextTick:function(i,o,l,c){if(typeof i!="function")throw new TypeError('"callback" argument must be a function');var f,h,m=arguments.length;switch(m){case 0:case 1:return r.nextTick(i);case 2:return r.nextTick((function(){i.call(null,o)}));case 3:return r.nextTick((function(){i.call(null,o,l)}));case 4:return r.nextTick((function(){i.call(null,o,l,c)}));default:for(f=new Array(m-1),h=0;h<f.length;)f[h++]=arguments[h];return r.nextTick((function(){i.apply(null,f)}))}}}:e.exports=r}).call(this,n(5))},function(e,t,n){var r=n(15)(Object,"create");e.exports=r},function(e,t,n){var r=n(30);e.exports=function(i,o){for(var l=i.length;l--;)if(r(i[l][0],o))return l;return-1}},function(e,t,n){var r=n(94);e.exports=function(i,o){var l=i.__data__;return r(o)?l[typeof o=="string"?"string":"hash"]:l.map}},function(e,t,n){var r,i=typeof Reflect=="object"?Reflect:null,o=i&&typeof i.apply=="function"?i.apply:function(T,P,N){return Function.prototype.apply.call(T,P,N)};r=i&&typeof i.ownKeys=="function"?i.ownKeys:Object.getOwnPropertySymbols?function(T){return Object.getOwnPropertyNames(T).concat(Object.getOwnPropertySymbols(T))}:function(T){return Object.getOwnPropertyNames(T)};var l=Number.isNaN||function(T){return T!=T};function c(){c.init.call(this)}e.exports=c,e.exports.once=function(T,P){return new Promise((function(N,F){function B(Q){T.removeListener(P,W),F(Q)}function W(){typeof T.removeListener=="function"&&T.removeListener("error",B),N([].slice.call(arguments))}O(T,P,W,{once:!0}),P!=="error"&&(function(Q,re,ce){typeof Q.on=="function"&&O(Q,"error",re,{once:!0})})(T,B)}))},c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var f=10;function h(T){if(typeof T!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof T)}function m(T){return T._maxListeners===void 0?c.defaultMaxListeners:T._maxListeners}function y(T,P,N,F){var B,W,Q;if(h(N),(W=T._events)===void 0?(W=T._events=Object.create(null),T._eventsCount=0):(W.newListener!==void 0&&(T.emit("newListener",P,N.listener?N.listener:N),W=T._events),Q=W[P]),Q===void 0)Q=W[P]=N,++T._eventsCount;else if(typeof Q=="function"?Q=W[P]=F?[N,Q]:[Q,N]:F?Q.unshift(N):Q.push(N),(B=m(T))>0&&Q.length>B&&!Q.warned){Q.warned=!0;var re=new Error("Possible EventEmitter memory leak detected. "+Q.length+" "+String(P)+" listeners added. Use emitter.setMaxListeners() to increase limit");re.name="MaxListenersExceededWarning",re.emitter=T,re.type=P,re.count=Q.length,(function(ce){console&&console.warn&&console.warn(ce)})(re)}return T}function x(T,P,N){var F={fired:!1,wrapFn:void 0,target:T,type:P,listener:N},B=(function(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}).bind(F);return B.listener=N,F.wrapFn=B,B}function b(T,P,N){var F=T._events;if(F===void 0)return[];var B=F[P];return B===void 0?[]:typeof B=="function"?N?[B.listener||B]:[B]:N?(function(W){for(var Q=new Array(W.length),re=0;re<Q.length;++re)Q[re]=W[re].listener||W[re];return Q})(B):C(B,B.length)}function w(T){var P=this._events;if(P!==void 0){var N=P[T];if(typeof N=="function")return 1;if(N!==void 0)return N.length}return 0}function C(T,P){for(var N=new Array(P),F=0;F<P;++F)N[F]=T[F];return N}function O(T,P,N,F){if(typeof T.on=="function")F.once?T.once(P,N):T.on(P,N);else{if(typeof T.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof T);T.addEventListener(P,(function B(W){F.once&&T.removeEventListener(P,B),N(W)}))}}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return f},set:function(T){if(typeof T!="number"||T<0||l(T))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+T+".");f=T}}),c.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},c.prototype.setMaxListeners=function(T){if(typeof T!="number"||T<0||l(T))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+T+".");return this._maxListeners=T,this},c.prototype.getMaxListeners=function(){return m(this)},c.prototype.emit=function(T){for(var P=[],N=1;N<arguments.length;N++)P.push(arguments[N]);var F=T==="error",B=this._events;if(B!==void 0)F=F&&B.error===void 0;else if(!F)return!1;if(F){var W;if(P.length>0&&(W=P[0]),W instanceof Error)throw W;var Q=new Error("Unhandled error."+(W?" ("+W.message+")":""));throw Q.context=W,Q}var re=B[T];if(re===void 0)return!1;if(typeof re=="function")o(re,this,P);else{var ce=re.length,ae=C(re,ce);for(N=0;N<ce;++N)o(ae[N],this,P)}return!0},c.prototype.addListener=function(T,P){return y(this,T,P,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function(T,P){return y(this,T,P,!0)},c.prototype.once=function(T,P){return h(P),this.on(T,x(this,T,P)),this},c.prototype.prependOnceListener=function(T,P){return h(P),this.prependListener(T,x(this,T,P)),this},c.prototype.removeListener=function(T,P){var N,F,B,W,Q;if(h(P),(F=this._events)===void 0)return this;if((N=F[T])===void 0)return this;if(N===P||N.listener===P)--this._eventsCount==0?this._events=Object.create(null):(delete F[T],F.removeListener&&this.emit("removeListener",T,N.listener||P));else if(typeof N!="function"){for(B=-1,W=N.length-1;W>=0;W--)if(N[W]===P||N[W].listener===P){Q=N[W].listener,B=W;break}if(B<0)return this;B===0?N.shift():(function(re,ce){for(;ce+1<re.length;ce++)re[ce]=re[ce+1];re.pop()})(N,B),N.length===1&&(F[T]=N[0]),F.removeListener!==void 0&&this.emit("removeListener",T,Q||P)}return this},c.prototype.off=c.prototype.removeListener,c.prototype.removeAllListeners=function(T){var P,N,F;if((N=this._events)===void 0)return this;if(N.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):N[T]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete N[T]),this;if(arguments.length===0){var B,W=Object.keys(N);for(F=0;F<W.length;++F)(B=W[F])!=="removeListener"&&this.removeAllListeners(B);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(P=N[T])=="function")this.removeListener(T,P);else if(P!==void 0)for(F=P.length-1;F>=0;F--)this.removeListener(T,P[F]);return this},c.prototype.listeners=function(T){return b(this,T,!0)},c.prototype.rawListeners=function(T){return b(this,T,!1)},c.listenerCount=function(T,P){return typeof T.listenerCount=="function"?T.listenerCount(P):w.call(T,P)},c.prototype.listenerCount=w,c.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){(t=e.exports=n(22)).Stream=t,t.Readable=t,t.Writable=n(13),t.Duplex=n(1),t.Transform=n(26),t.PassThrough=n(45)},function(e,t,n){var r=n(3),i=r.Buffer;function o(c,f){for(var h in c)f[h]=c[h]}function l(c,f,h){return i(c,f,h)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=l),o(i,l),l.from=function(c,f,h){if(typeof c=="number")throw new TypeError("Argument must not be a number");return i(c,f,h)},l.alloc=function(c,f,h){if(typeof c!="number")throw new TypeError("Argument must be a number");var m=i(c);return f!==void 0?typeof h=="string"?m.fill(f,h):m.fill(f):m.fill(0),m},l.allocUnsafe=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return i(c)},l.allocUnsafeSlow=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(c)}},function(e,t,n){(function(r,i,o){var l=n(6);function c(ae){var J=this;this.next=null,this.entry=null,this.finish=function(){(function(oe,ve,ie){var ue=oe.entry;for(oe.entry=null;ue;){var Y=ue.callback;ve.pendingcb--,Y(void 0),ue=ue.next}ve.corkedRequestsFree.next=oe})(J,ae)}}e.exports=N;var f,h=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?i:l.nextTick;N.WritableState=P;var m=Object.create(n(4));m.inherits=n(2);var y,x={deprecate:n(43)},b=n(23),w=n(12).Buffer,C=(o!==void 0?o:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},O=n(24);function T(){}function P(ae,J){f=f||n(1),ae=ae||{};var oe=J instanceof f;this.objectMode=!!ae.objectMode,oe&&(this.objectMode=this.objectMode||!!ae.writableObjectMode);var ve=ae.highWaterMark,ie=ae.writableHighWaterMark,ue=this.objectMode?16:16384;this.highWaterMark=ve||ve===0?ve:oe&&(ie||ie===0)?ie:ue,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 Y=ae.decodeStrings===!1;this.decodeStrings=!Y,this.defaultEncoding=ae.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(I){(function(z,H){var k=z._writableState,M=k.sync,q=k.writecb;if((function(se){se.writing=!1,se.writecb=null,se.length-=se.writelen,se.writelen=0})(k),H)(function(se,me,de,be,D){--me.pendingcb,de?(l.nextTick(D,be),l.nextTick(ce,se,me),se._writableState.errorEmitted=!0,se.emit("error",be)):(D(be),se._writableState.errorEmitted=!0,se.emit("error",be),ce(se,me))})(z,k,M,H,q);else{var ee=Q(k);ee||k.corked||k.bufferProcessing||!k.bufferedRequest||W(z,k),M?h(B,z,k,ee,q):B(z,k,ee,q)}})(J,I)},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 c(this)}function N(ae){if(f=f||n(1),!(y.call(N,this)||this instanceof f))return new N(ae);this._writableState=new P(ae,this),this.writable=!0,ae&&(typeof ae.write=="function"&&(this._write=ae.write),typeof ae.writev=="function"&&(this._writev=ae.writev),typeof ae.destroy=="function"&&(this._destroy=ae.destroy),typeof ae.final=="function"&&(this._final=ae.final)),b.call(this)}function F(ae,J,oe,ve,ie,ue,Y){J.writelen=ve,J.writecb=Y,J.writing=!0,J.sync=!0,oe?ae._writev(ie,J.onwrite):ae._write(ie,ue,J.onwrite),J.sync=!1}function B(ae,J,oe,ve){oe||(function(ie,ue){ue.length===0&&ue.needDrain&&(ue.needDrain=!1,ie.emit("drain"))})(ae,J),J.pendingcb--,ve(),ce(ae,J)}function W(ae,J){J.bufferProcessing=!0;var oe=J.bufferedRequest;if(ae._writev&&oe&&oe.next){var ve=J.bufferedRequestCount,ie=new Array(ve),ue=J.corkedRequestsFree;ue.entry=oe;for(var Y=0,I=!0;oe;)ie[Y]=oe,oe.isBuf||(I=!1),oe=oe.next,Y+=1;ie.allBuffers=I,F(ae,J,!0,J.length,ie,"",ue.finish),J.pendingcb++,J.lastBufferedRequest=null,ue.next?(J.corkedRequestsFree=ue.next,ue.next=null):J.corkedRequestsFree=new c(J),J.bufferedRequestCount=0}else{for(;oe;){var z=oe.chunk,H=oe.encoding,k=oe.callback;if(F(ae,J,!1,J.objectMode?1:z.length,z,H,k),oe=oe.next,J.bufferedRequestCount--,J.writing)break}oe===null&&(J.lastBufferedRequest=null)}J.bufferedRequest=oe,J.bufferProcessing=!1}function Q(ae){return ae.ending&&ae.length===0&&ae.bufferedRequest===null&&!ae.finished&&!ae.writing}function re(ae,J){ae._final((function(oe){J.pendingcb--,oe&&ae.emit("error",oe),J.prefinished=!0,ae.emit("prefinish"),ce(ae,J)}))}function ce(ae,J){var oe=Q(J);return oe&&((function(ve,ie){ie.prefinished||ie.finalCalled||(typeof ve._final=="function"?(ie.pendingcb++,ie.finalCalled=!0,l.nextTick(re,ve,ie)):(ie.prefinished=!0,ve.emit("prefinish")))})(ae,J),J.pendingcb===0&&(J.finished=!0,ae.emit("finish"))),oe}m.inherits(N,b),P.prototype.getBuffer=function(){for(var ae=this.bufferedRequest,J=[];ae;)J.push(ae),ae=ae.next;return J},(function(){try{Object.defineProperty(P.prototype,"buffer",{get:x.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"?(y=Function.prototype[Symbol.hasInstance],Object.defineProperty(N,Symbol.hasInstance,{value:function(ae){return!!y.call(this,ae)||this===N&&ae&&ae._writableState instanceof P}})):y=function(ae){return ae instanceof this},N.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},N.prototype.write=function(ae,J,oe){var ve=this._writableState,ie=!1,ue=!ve.objectMode&&(function(Y){return w.isBuffer(Y)||Y instanceof C})(ae);return ue&&!w.isBuffer(ae)&&(ae=(function(Y){return w.from(Y)})(ae)),typeof J=="function"&&(oe=J,J=null),ue?J="buffer":J||(J=ve.defaultEncoding),typeof oe!="function"&&(oe=T),ve.ended?(function(Y,I){var z=new Error("write after end");Y.emit("error",z),l.nextTick(I,z)})(this,oe):(ue||(function(Y,I,z,H){var k=!0,M=!1;return z===null?M=new TypeError("May not write null values to stream"):typeof z=="string"||z===void 0||I.objectMode||(M=new TypeError("Invalid non-string/buffer chunk")),M&&(Y.emit("error",M),l.nextTick(H,M),k=!1),k})(this,ve,ae,oe))&&(ve.pendingcb++,ie=(function(Y,I,z,H,k,M){if(!z){var q=(function(de,be,D){return de.objectMode||de.decodeStrings===!1||typeof be!="string"||(be=w.from(be,D)),be})(I,H,k);H!==q&&(z=!0,k="buffer",H=q)}var ee=I.objectMode?1:H.length;I.length+=ee;var se=I.length<I.highWaterMark;if(se||(I.needDrain=!0),I.writing||I.corked){var me=I.lastBufferedRequest;I.lastBufferedRequest={chunk:H,encoding:k,isBuf:z,callback:M,next:null},me?me.next=I.lastBufferedRequest:I.bufferedRequest=I.lastBufferedRequest,I.bufferedRequestCount+=1}else F(Y,I,!1,ee,H,k,M);return se})(this,ve,ue,ae,J,oe)),ie},N.prototype.cork=function(){this._writableState.corked++},N.prototype.uncork=function(){var ae=this._writableState;ae.corked&&(ae.corked--,ae.writing||ae.corked||ae.bufferProcessing||!ae.bufferedRequest||W(this,ae))},N.prototype.setDefaultEncoding=function(ae){if(typeof ae=="string"&&(ae=ae.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ae+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ae);return this._writableState.defaultEncoding=ae,this},Object.defineProperty(N.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),N.prototype._write=function(ae,J,oe){oe(new Error("_write() is not implemented"))},N.prototype._writev=null,N.prototype.end=function(ae,J,oe){var ve=this._writableState;typeof ae=="function"?(oe=ae,ae=null,J=null):typeof J=="function"&&(oe=J,J=null),ae!=null&&this.write(ae,J),ve.corked&&(ve.corked=1,this.uncork()),ve.ending||(function(ie,ue,Y){ue.ending=!0,ce(ie,ue),Y&&(ue.finished?l.nextTick(Y):ie.once("finish",Y)),ue.ended=!0,ie.writable=!1})(this,ve,oe)},Object.defineProperty(N.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(ae){this._writableState&&(this._writableState.destroyed=ae)}}),N.prototype.destroy=O.destroy,N.prototype._undestroy=O.undestroy,N.prototype._destroy=function(ae,J){this.end(),J(ae)}}).call(this,n(5),n(21).setImmediate,n(0))},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r,i){if(!i.eol&&r){for(var o=0,l=r.length;o<l;o++)if(r[o]==="\r"){if(r[o+1]===`
|
||
`){i.eol=`\r
|
||
`;break}if(r[o+1]){i.eol="\r";break}}else if(r[o]===`
|
||
`){i.eol=`
|
||
`;break}}return i.eol||`
|
||
`}},function(e,t,n){var r=n(63),i=n(71);e.exports=function(o,l){var c=i(o,l);return r(c)?c:void 0}},function(e,t,n){var r=n(17).Symbol;e.exports=r},function(e,t,n){var r=n(65),i=typeof self=="object"&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},function(e,t){e.exports=function(n){var r=typeof n;return n!=null&&(r=="object"||r=="function")}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r=n(29),i=n(74);e.exports=function(o){return typeof o=="symbol"||i(o)&&r(o)=="[object Symbol]"}},function(e,t,n){(function(r){var i=r!==void 0&&r||typeof self<"u"&&self||window,o=Function.prototype.apply;function l(c,f){this._id=c,this._clearFn=f}t.setTimeout=function(){return new l(o.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new l(o.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(c){c&&c.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(c,f){clearTimeout(c._idleTimeoutId),c._idleTimeout=f},t.unenroll=function(c){clearTimeout(c._idleTimeoutId),c._idleTimeout=-1},t._unrefActive=t.active=function(c){clearTimeout(c._idleTimeoutId);var f=c._idleTimeout;f>=0&&(c._idleTimeoutId=setTimeout((function(){c._onTimeout&&c._onTimeout()}),f))},n(34),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,n){(function(r,i){var o=n(6);e.exports=F;var l,c=n(36);F.ReadableState=N,n(10).EventEmitter;var f=function(k,M){return k.listeners(M).length},h=n(23),m=n(12).Buffer,y=(r!==void 0?r:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},x=Object.create(n(4));x.inherits=n(2);var b=n(40),w=void 0;w=b&&b.debuglog?b.debuglog("stream"):function(){};var C,O=n(41),T=n(24);x.inherits(F,h);var P=["error","close","destroy","pause","resume"];function N(k,M){k=k||{};var q=M instanceof(l=l||n(1));this.objectMode=!!k.objectMode,q&&(this.objectMode=this.objectMode||!!k.readableObjectMode);var ee=k.highWaterMark,se=k.readableHighWaterMark,me=this.objectMode?16:16384;this.highWaterMark=ee||ee===0?ee:q&&(se||se===0)?se:me,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new O,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=k.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,k.encoding&&(C||(C=n(25).StringDecoder),this.decoder=new C(k.encoding),this.encoding=k.encoding)}function F(k){if(l=l||n(1),!(this instanceof F))return new F(k);this._readableState=new N(k,this),this.readable=!0,k&&(typeof k.read=="function"&&(this._read=k.read),typeof k.destroy=="function"&&(this._destroy=k.destroy)),h.call(this)}function B(k,M,q,ee,se){var me,de=k._readableState;return M===null?(de.reading=!1,(function(be,D){if(!D.ended){if(D.decoder){var R=D.decoder.end();R&&R.length&&(D.buffer.push(R),D.length+=D.objectMode?1:R.length)}D.ended=!0,ce(be)}})(k,de)):(se||(me=(function(be,D){var R;return(function(G){return m.isBuffer(G)||G instanceof y})(D)||typeof D=="string"||D===void 0||be.objectMode||(R=new TypeError("Invalid non-string/buffer chunk")),R})(de,M)),me?k.emit("error",me):de.objectMode||M&&M.length>0?(typeof M=="string"||de.objectMode||Object.getPrototypeOf(M)===m.prototype||(M=(function(be){return m.from(be)})(M)),ee?de.endEmitted?k.emit("error",new Error("stream.unshift() after end event")):W(k,de,M,!0):de.ended?k.emit("error",new Error("stream.push() after EOF")):(de.reading=!1,de.decoder&&!q?(M=de.decoder.write(M),de.objectMode||M.length!==0?W(k,de,M,!1):J(k,de)):W(k,de,M,!1))):ee||(de.reading=!1)),(function(be){return!be.ended&&(be.needReadable||be.length<be.highWaterMark||be.length===0)})(de)}function W(k,M,q,ee){M.flowing&&M.length===0&&!M.sync?(k.emit("data",q),k.read(0)):(M.length+=M.objectMode?1:q.length,ee?M.buffer.unshift(q):M.buffer.push(q),M.needReadable&&ce(k)),J(k,M)}Object.defineProperty(F.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(k){this._readableState&&(this._readableState.destroyed=k)}}),F.prototype.destroy=T.destroy,F.prototype._undestroy=T.undestroy,F.prototype._destroy=function(k,M){this.push(null),M(k)},F.prototype.push=function(k,M){var q,ee=this._readableState;return ee.objectMode?q=!0:typeof k=="string"&&((M=M||ee.defaultEncoding)!==ee.encoding&&(k=m.from(k,M),M=""),q=!0),B(this,k,M,!1,q)},F.prototype.unshift=function(k){return B(this,k,null,!0,!1)},F.prototype.isPaused=function(){return this._readableState.flowing===!1},F.prototype.setEncoding=function(k){return C||(C=n(25).StringDecoder),this._readableState.decoder=new C(k),this._readableState.encoding=k,this};var Q=8388608;function re(k,M){return k<=0||M.length===0&&M.ended?0:M.objectMode?1:k!=k?M.flowing&&M.length?M.buffer.head.data.length:M.length:(k>M.highWaterMark&&(M.highWaterMark=(function(q){return q>=Q?q=Q:(q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++),q})(k)),k<=M.length?k:M.ended?M.length:(M.needReadable=!0,0))}function ce(k){var M=k._readableState;M.needReadable=!1,M.emittedReadable||(w("emitReadable",M.flowing),M.emittedReadable=!0,M.sync?o.nextTick(ae,k):ae(k))}function ae(k){w("emit readable"),k.emit("readable"),ue(k)}function J(k,M){M.readingMore||(M.readingMore=!0,o.nextTick(oe,k,M))}function oe(k,M){for(var q=M.length;!M.reading&&!M.flowing&&!M.ended&&M.length<M.highWaterMark&&(w("maybeReadMore read 0"),k.read(0),q!==M.length);)q=M.length;M.readingMore=!1}function ve(k){w("readable nexttick read 0"),k.read(0)}function ie(k,M){M.reading||(w("resume read 0"),k.read(0)),M.resumeScheduled=!1,M.awaitDrain=0,k.emit("resume"),ue(k),M.flowing&&!M.reading&&k.read(0)}function ue(k){var M=k._readableState;for(w("flow",M.flowing);M.flowing&&k.read()!==null;);}function Y(k,M){return M.length===0?null:(M.objectMode?q=M.buffer.shift():!k||k>=M.length?(q=M.decoder?M.buffer.join(""):M.buffer.length===1?M.buffer.head.data:M.buffer.concat(M.length),M.buffer.clear()):q=(function(ee,se,me){var de;return ee<se.head.data.length?(de=se.head.data.slice(0,ee),se.head.data=se.head.data.slice(ee)):de=ee===se.head.data.length?se.shift():me?(function(be,D){var R=D.head,G=1,ne=R.data;for(be-=ne.length;R=R.next;){var V=R.data,X=be>V.length?V.length:be;if(X===V.length?ne+=V:ne+=V.slice(0,be),(be-=X)==0){X===V.length?(++G,R.next?D.head=R.next:D.head=D.tail=null):(D.head=R,R.data=V.slice(X));break}++G}return D.length-=G,ne})(ee,se):(function(be,D){var R=m.allocUnsafe(be),G=D.head,ne=1;for(G.data.copy(R),be-=G.data.length;G=G.next;){var V=G.data,X=be>V.length?V.length:be;if(V.copy(R,R.length-be,0,X),(be-=X)==0){X===V.length?(++ne,G.next?D.head=G.next:D.head=D.tail=null):(D.head=G,G.data=V.slice(X));break}++ne}return D.length-=ne,R})(ee,se),de})(k,M.buffer,M.decoder),q);var q}function I(k){var M=k._readableState;if(M.length>0)throw new Error('"endReadable()" called on non-empty stream');M.endEmitted||(M.ended=!0,o.nextTick(z,M,k))}function z(k,M){k.endEmitted||k.length!==0||(k.endEmitted=!0,M.readable=!1,M.emit("end"))}function H(k,M){for(var q=0,ee=k.length;q<ee;q++)if(k[q]===M)return q;return-1}F.prototype.read=function(k){w("read",k),k=parseInt(k,10);var M=this._readableState,q=k;if(k!==0&&(M.emittedReadable=!1),k===0&&M.needReadable&&(M.length>=M.highWaterMark||M.ended))return w("read: emitReadable",M.length,M.ended),M.length===0&&M.ended?I(this):ce(this),null;if((k=re(k,M))===0&&M.ended)return M.length===0&&I(this),null;var ee,se=M.needReadable;return w("need readable",se),(M.length===0||M.length-k<M.highWaterMark)&&w("length less than watermark",se=!0),M.ended||M.reading?w("reading or ended",se=!1):se&&(w("do read"),M.reading=!0,M.sync=!0,M.length===0&&(M.needReadable=!0),this._read(M.highWaterMark),M.sync=!1,M.reading||(k=re(q,M))),(ee=k>0?Y(k,M):null)===null?(M.needReadable=!0,k=0):M.length-=k,M.length===0&&(M.ended||(M.needReadable=!0),q!==k&&M.ended&&I(this)),ee!==null&&this.emit("data",ee),ee},F.prototype._read=function(k){this.emit("error",new Error("_read() is not implemented"))},F.prototype.pipe=function(k,M){var q=this,ee=this._readableState;switch(ee.pipesCount){case 0:ee.pipes=k;break;case 1:ee.pipes=[ee.pipes,k];break;default:ee.pipes.push(k)}ee.pipesCount+=1,w("pipe count=%d opts=%j",ee.pipesCount,M);var se=M&&M.end===!1||k===i.stdout||k===i.stderr?X:me;function me(){w("onend"),k.end()}ee.endEmitted?o.nextTick(se):q.once("end",se),k.on("unpipe",(function te(he,xe){w("onunpipe"),he===q&&xe&&xe.hasUnpiped===!1&&(xe.hasUnpiped=!0,w("cleanup"),k.removeListener("close",ne),k.removeListener("finish",V),k.removeListener("drain",de),k.removeListener("error",G),k.removeListener("unpipe",te),q.removeListener("end",me),q.removeListener("end",X),q.removeListener("data",R),be=!0,!ee.awaitDrain||k._writableState&&!k._writableState.needDrain||de())}));var de=(function(te){return function(){var he=te._readableState;w("pipeOnDrain",he.awaitDrain),he.awaitDrain&&he.awaitDrain--,he.awaitDrain===0&&f(te,"data")&&(he.flowing=!0,ue(te))}})(q);k.on("drain",de);var be=!1,D=!1;function R(te){w("ondata"),D=!1,k.write(te)!==!1||D||((ee.pipesCount===1&&ee.pipes===k||ee.pipesCount>1&&H(ee.pipes,k)!==-1)&&!be&&(w("false write response, pause",ee.awaitDrain),ee.awaitDrain++,D=!0),q.pause())}function G(te){w("onerror",te),X(),k.removeListener("error",G),f(k,"error")===0&&k.emit("error",te)}function ne(){k.removeListener("finish",V),X()}function V(){w("onfinish"),k.removeListener("close",ne),X()}function X(){w("unpipe"),q.unpipe(k)}return q.on("data",R),(function(te,he,xe){if(typeof te.prependListener=="function")return te.prependListener(he,xe);te._events&&te._events[he]?c(te._events[he])?te._events[he].unshift(xe):te._events[he]=[xe,te._events[he]]:te.on(he,xe)})(k,"error",G),k.once("close",ne),k.once("finish",V),k.emit("pipe",q),ee.flowing||(w("pipe resume"),q.resume()),k},F.prototype.unpipe=function(k){var M=this._readableState,q={hasUnpiped:!1};if(M.pipesCount===0)return this;if(M.pipesCount===1)return k&&k!==M.pipes||(k||(k=M.pipes),M.pipes=null,M.pipesCount=0,M.flowing=!1,k&&k.emit("unpipe",this,q)),this;if(!k){var ee=M.pipes,se=M.pipesCount;M.pipes=null,M.pipesCount=0,M.flowing=!1;for(var me=0;me<se;me++)ee[me].emit("unpipe",this,{hasUnpiped:!1});return this}var de=H(M.pipes,k);return de===-1||(M.pipes.splice(de,1),M.pipesCount-=1,M.pipesCount===1&&(M.pipes=M.pipes[0]),k.emit("unpipe",this,q)),this},F.prototype.on=function(k,M){var q=h.prototype.on.call(this,k,M);if(k==="data")this._readableState.flowing!==!1&&this.resume();else if(k==="readable"){var ee=this._readableState;ee.endEmitted||ee.readableListening||(ee.readableListening=ee.needReadable=!0,ee.emittedReadable=!1,ee.reading?ee.length&&ce(this):o.nextTick(ve,this))}return q},F.prototype.addListener=F.prototype.on,F.prototype.resume=function(){var k=this._readableState;return k.flowing||(w("resume"),k.flowing=!0,(function(M,q){q.resumeScheduled||(q.resumeScheduled=!0,o.nextTick(ie,M,q))})(this,k)),this},F.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},F.prototype.wrap=function(k){var M=this,q=this._readableState,ee=!1;for(var se in k.on("end",(function(){if(w("wrapped end"),q.decoder&&!q.ended){var de=q.decoder.end();de&&de.length&&M.push(de)}M.push(null)})),k.on("data",(function(de){w("wrapped data"),q.decoder&&(de=q.decoder.write(de)),q.objectMode&&de==null||(q.objectMode||de&&de.length)&&(M.push(de)||(ee=!0,k.pause()))})),k)this[se]===void 0&&typeof k[se]=="function"&&(this[se]=(function(de){return function(){return k[de].apply(k,arguments)}})(se));for(var me=0;me<P.length;me++)k.on(P[me],this.emit.bind(this,P[me]));return this._read=function(de){w("wrapped _read",de),ee&&(ee=!1,k.resume())},this},Object.defineProperty(F.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),F._fromList=Y}).call(this,n(0),n(5))},function(e,t,n){e.exports=n(10).EventEmitter},function(e,t,n){var r=n(6);function i(o,l){o.emit("error",l)}e.exports={destroy:function(o,l){var c=this,f=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return f||h?(l?l(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(i,this,o)):r.nextTick(i,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,(function(m){!l&&m?c._writableState?c._writableState.errorEmitted||(c._writableState.errorEmitted=!0,r.nextTick(i,c,m)):r.nextTick(i,c,m):l&&l(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.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){var r=n(44).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 o(w){var C;switch(this.encoding=(function(O){var T=(function(P){if(!P)return"utf8";for(var N;;)switch(P){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 P;default:if(N)return;P=(""+P).toLowerCase(),N=!0}})(O);if(typeof T!="string"&&(r.isEncoding===i||!i(O)))throw new Error("Unknown encoding: "+O);return T||O})(w),this.encoding){case"utf16le":this.text=f,this.end=h,C=4;break;case"utf8":this.fillLast=c,C=4;break;case"base64":this.text=m,this.end=y,C=3;break;default:return this.write=x,void(this.end=b)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(C)}function l(w){return w<=127?0:w>>5==6?2:w>>4==14?3:w>>3==30?4:w>>6==2?-1:-2}function c(w){var C=this.lastTotal-this.lastNeed,O=(function(T,P,N){if((192&P[0])!=128)return T.lastNeed=0,"<22>";if(T.lastNeed>1&&P.length>1){if((192&P[1])!=128)return T.lastNeed=1,"<22>";if(T.lastNeed>2&&P.length>2&&(192&P[2])!=128)return T.lastNeed=2,"<22>"}})(this,w);return O!==void 0?O:this.lastNeed<=w.length?(w.copy(this.lastChar,C,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(w.copy(this.lastChar,C,0,w.length),void(this.lastNeed-=w.length))}function f(w,C){if((w.length-C)%2==0){var O=w.toString("utf16le",C);if(O){var T=O.charCodeAt(O.length-1);if(T>=55296&&T<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1],O.slice(0,-1)}return O}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=w[w.length-1],w.toString("utf16le",C,w.length-1)}function h(w){var C=w&&w.length?this.write(w):"";if(this.lastNeed){var O=this.lastTotal-this.lastNeed;return C+this.lastChar.toString("utf16le",0,O)}return C}function m(w,C){var O=(w.length-C)%3;return O===0?w.toString("base64",C):(this.lastNeed=3-O,this.lastTotal=3,O===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",C,w.length-O))}function y(w){var C=w&&w.length?this.write(w):"";return this.lastNeed?C+this.lastChar.toString("base64",0,3-this.lastNeed):C}function x(w){return w.toString(this.encoding)}function b(w){return w&&w.length?this.write(w):""}t.StringDecoder=o,o.prototype.write=function(w){if(w.length===0)return"";var C,O;if(this.lastNeed){if((C=this.fillLast(w))===void 0)return"";O=this.lastNeed,this.lastNeed=0}else O=0;return O<w.length?C?C+this.text(w,O):this.text(w,O):C||""},o.prototype.end=function(w){var C=w&&w.length?this.write(w):"";return this.lastNeed?C+"<22>":C},o.prototype.text=function(w,C){var O=(function(P,N,F){var B=N.length-1;if(B<F)return 0;var W=l(N[B]);return W>=0?(W>0&&(P.lastNeed=W-1),W):--B<F||W===-2?0:(W=l(N[B]))>=0?(W>0&&(P.lastNeed=W-2),W):--B<F||W===-2?0:(W=l(N[B]))>=0?(W>0&&(W===2?W=0:P.lastNeed=W-3),W):0})(this,w,C);if(!this.lastNeed)return w.toString("utf8",C);this.lastTotal=O;var T=w.length-(O-this.lastNeed);return w.copy(this.lastChar,0,T),w.toString("utf8",C,T)},o.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=o;var r=n(1),i=Object.create(n(4));function o(f){if(!(this instanceof o))return new o(f);r.call(this,f),this._transformState={afterTransform:(function(h,m){var y=this._transformState;y.transforming=!1;var x=y.writecb;if(!x)return this.emit("error",new Error("write callback called multiple times"));y.writechunk=null,y.writecb=null,m!=null&&this.push(m),x(h);var b=this._readableState;b.reading=!1,(b.needReadable||b.length<b.highWaterMark)&&this._read(b.highWaterMark)}).bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,f&&(typeof f.transform=="function"&&(this._transform=f.transform),typeof f.flush=="function"&&(this._flush=f.flush)),this.on("prefinish",l)}function l(){var f=this;typeof this._flush=="function"?this._flush((function(h,m){c(f,h,m)})):c(this,null,null)}function c(f,h,m){if(h)return f.emit("error",h);if(m!=null&&f.push(m),f._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(f._transformState.transforming)throw new Error("Calling transform done when still transforming");return f.push(null)}i.inherits=n(2),i.inherits(o,r),o.prototype.push=function(f,h){return this._transformState.needTransform=!1,r.prototype.push.call(this,f,h)},o.prototype._transform=function(f,h,m){throw new Error("_transform() is not implemented")},o.prototype._write=function(f,h,m){var y=this._transformState;if(y.writecb=m,y.writechunk=f,y.writeencoding=h,!y.transforming){var x=this._readableState;(y.needTransform||x.needReadable||x.length<x.highWaterMark)&&this._read(x.highWaterMark)}},o.prototype._read=function(f){var h=this._transformState;h.writechunk!==null&&h.writecb&&!h.transforming?(h.transforming=!0,this._transform(h.writechunk,h.writeencoding,h.afterTransform)):h.needTransform=!0},o.prototype._destroy=function(f,h){var m=this;r.prototype._destroy.call(this,f,(function(y){h(y),m.emit("close")}))}},function(e,t,n){(function(r){Object.defineProperty(t,"__esModule",{value:!0}),t.trimRight=t.trimLeft=void 0,t.bufFromString=function(i){var o=r.byteLength(i),l=r.allocUnsafe?r.allocUnsafe(o):new r(o);return l.write(i),l},t.emptyBuffer=function(){return r.allocUnsafe?r.allocUnsafe(0):new r(0)},t.filterArray=function(i,o){for(var l=[],c=0;c<i.length;c++)o.indexOf(c)>-1&&l.push(i[c]);return l},t.trimLeft=function(i){return i.trimStart()},t.trimRight=function(i){return i.trimEnd()}}).call(this,n(3).Buffer)},function(e,t,n){var r=this&&this.__extends||(function(){var o=function(l,c){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var m in h)Object.prototype.hasOwnProperty.call(h,m)&&(f[m]=h[m])})(l,c)};return function(l,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");function f(){this.constructor=l}o(l,c),l.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}})();Object.defineProperty(t,"__esModule",{value:!0});var i=(function(o){function l(c,f,h){var m=o.call(this,"Error: "+c+". JSON Line number: "+f+(h?" near: "+h:""))||this;return m.err=c,m.line=f,m.extra=h,m.name="CSV Parse Error",m}return r(l,o),l.column_mismatched=function(c,f){return new l("column_mismatched",c,f)},l.unclosed_quote=function(c,f){return new l("unclosed_quote",c,f)},l.fromJSON=function(c){return new l(c.err,c.line,c.extra)},l.prototype.toJSON=function(){return{err:this.err,line:this.line,extra:this.extra}},l})(Error);t.default=i},function(e,t,n){var r=n(16),i=n(66),o=n(67),l=r?r.toStringTag:void 0;e.exports=function(c){return c==null?c===void 0?"[object Undefined]":"[object Null]":l&&l in Object(c)?i(c):o(c)}},function(e,t){e.exports=function(n,r){return n===r||n!=n&&r!=r}},function(e,t,n){e.exports=n(32)},function(e,t,n){var r=n(33),i=function(o,l){return new r.Converter(o,l)};i.csv=i,i.Converter=r.Converter,e.exports=i},function(e,t,n){(function(r){var i=this&&this.__extends||(function(){var y=function(x,b){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,C){w.__proto__=C}||function(w,C){for(var O in C)Object.prototype.hasOwnProperty.call(C,O)&&(w[O]=C[O])})(x,b)};return function(x,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function w(){this.constructor=x}y(x,b),x.prototype=b===null?Object.create(b):(w.prototype=b.prototype,new w)}})();Object.defineProperty(t,"__esModule",{value:!0}),t.Converter=void 0;var o=n(35),l=n(50),c=n(51),f=n(52),h=n(103),m=(function(y){function x(b,w){w===void 0&&(w={});var C=y.call(this,w)||this;return C.options=w,C.params=(0,l.mergeParams)(b),C.runtime=(0,c.initParseRuntime)(C),C.result=new h.Result(C),C.processor=new f.ProcessorLocal(C),C.once("error",(function(O){r((function(){C.result.processError(O),C.emit("done",O)}))})),C.once("done",(function(){C.processor.destroy()})),C}return i(x,y),x.prototype.preRawData=function(b){return this.runtime.preRawDataHook=b,this},x.prototype.preFileLine=function(b){return this.runtime.preFileLineHook=b,this},x.prototype.subscribe=function(b,w,C){return this.parseRuntime.subscribe={onNext:b,onError:w,onCompleted:C},this},x.prototype.fromFile=function(b,w){var C=this,O=n(!(function(){var T=new Error("Cannot find module 'fs'");throw T.code="MODULE_NOT_FOUND",T})());return O.exists(b,(function(T){T?O.createReadStream(b,w).pipe(C):C.emit("error",new Error("File does not exist at ".concat(b,". Check to make sure the file path to your csv is correct.")))})),this},x.prototype.fromStream=function(b){return b.pipe(this),this},x.prototype.fromString=function(b){b.toString();var w=new o.Readable,C=0;return w._read=function(O){if(C>=b.length)this.push(null);else{var T=b.substring(C,C+O);this.push(T),C+=O}},this.fromStream(w)},x.prototype.then=function(b,w){var C=this;return new Promise((function(O,T){C.parseRuntime.then={onfulfilled:function(P){O(b?b(P):P)},onrejected:function(P){w?O(w(P)):T(P)}}}))},Object.defineProperty(x.prototype,"parseParam",{get:function(){return this.params},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"parseRuntime",{get:function(){return this.runtime},enumerable:!1,configurable:!0}),x.prototype._transform=function(b,w,C){var O=this;this.processor.process(b).then((function(T){if(T.length>0)return O.runtime.started=!0,O.result.processResult(T)})).then((function(){O.emit("drained"),C()}),(function(T){O.runtime.hasError=!0,O.runtime.error=T,O.emit("error",T),C()}))},x.prototype._flush=function(b){var w=this;this.processor.flush().then((function(C){if(C.length>0)return w.result.processResult(C)})).then((function(){w.processEnd(b)}),(function(C){w.emit("error",C),b()}))},x.prototype.processEnd=function(b){this.result.endProcess(),this.emit("done"),b()},Object.defineProperty(x.prototype,"parsedLineNumber",{get:function(){return this.runtime.parsedLineNumber},enumerable:!1,configurable:!0}),x})(o.Transform);t.Converter=m}).call(this,n(21).setImmediate)},function(e,t,n){(function(r,i){(function(o,l){if(!o.setImmediate){var c,f=1,h={},m=!1,y=o.document,x=Object.getPrototypeOf&&Object.getPrototypeOf(o);x=x&&x.setTimeout?x:o,{}.toString.call(o.process)==="[object process]"?c=function(C){i.nextTick((function(){w(C)}))}:(function(){if(o.postMessage&&!o.importScripts){var C=!0,O=o.onmessage;return o.onmessage=function(){C=!1},o.postMessage("","*"),o.onmessage=O,C}})()?(function(){var C="setImmediate$"+Math.random()+"$",O=function(T){T.source===o&&typeof T.data=="string"&&T.data.indexOf(C)===0&&w(+T.data.slice(C.length))};o.addEventListener?o.addEventListener("message",O,!1):o.attachEvent("onmessage",O),c=function(T){o.postMessage(C+T,"*")}})():o.MessageChannel?(function(){var C=new MessageChannel;C.port1.onmessage=function(O){w(O.data)},c=function(O){C.port2.postMessage(O)}})():y&&"onreadystatechange"in y.createElement("script")?(function(){var C=y.documentElement;c=function(O){var T=y.createElement("script");T.onreadystatechange=function(){w(O),T.onreadystatechange=null,C.removeChild(T),T=null},C.appendChild(T)}})():c=function(C){setTimeout(w,0,C)},x.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var O=new Array(arguments.length-1),T=0;T<O.length;T++)O[T]=arguments[T+1];var P={callback:C,args:O};return h[f]=P,c(f),f++},x.clearImmediate=b}function b(C){delete h[C]}function w(C){if(m)setTimeout(w,0,C);else{var O=h[C];if(O){m=!0;try{(function(T){var P=T.callback,N=T.args;switch(N.length){case 0:P();break;case 1:P(N[0]);break;case 2:P(N[0],N[1]);break;case 3:P(N[0],N[1],N[2]);break;default:P.apply(void 0,N)}})(O)}finally{b(C),m=!1}}}}})(typeof self>"u"?r===void 0?this:r:self)}).call(this,n(0),n(5))},function(e,t,n){e.exports=i;var r=n(10).EventEmitter;function i(){r.call(this)}n(2)(i,r),i.Readable=n(11),i.Writable=n(46),i.Duplex=n(47),i.Transform=n(48),i.PassThrough=n(49),i.Stream=i,i.prototype.pipe=function(o,l){var c=this;function f(C){o.writable&&o.write(C)===!1&&c.pause&&c.pause()}function h(){c.readable&&c.resume&&c.resume()}c.on("data",f),o.on("drain",h),o._isStdio||l&&l.end===!1||(c.on("end",y),c.on("close",x));var m=!1;function y(){m||(m=!0,o.end())}function x(){m||(m=!0,typeof o.destroy=="function"&&o.destroy())}function b(C){if(w(),r.listenerCount(this,"error")===0)throw C}function w(){c.removeListener("data",f),o.removeListener("drain",h),c.removeListener("end",y),c.removeListener("close",x),c.removeListener("error",b),o.removeListener("error",b),c.removeListener("end",w),c.removeListener("close",w),o.removeListener("close",w)}return c.on("error",b),o.on("error",b),c.on("end",w),c.on("close",w),o.on("close",w),o.emit("pipe",c),o}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(r){return n.call(r)=="[object Array]"}},function(e,t,n){t.byteLength=function(x){var b=h(x),w=b[0],C=b[1];return 3*(w+C)/4-C},t.toByteArray=function(x){var b,w,C=h(x),O=C[0],T=C[1],P=new o((function(B,W,Q){return 3*(W+Q)/4-Q})(0,O,T)),N=0,F=T>0?O-4:O;for(w=0;w<F;w+=4)b=i[x.charCodeAt(w)]<<18|i[x.charCodeAt(w+1)]<<12|i[x.charCodeAt(w+2)]<<6|i[x.charCodeAt(w+3)],P[N++]=b>>16&255,P[N++]=b>>8&255,P[N++]=255&b;return T===2&&(b=i[x.charCodeAt(w)]<<2|i[x.charCodeAt(w+1)]>>4,P[N++]=255&b),T===1&&(b=i[x.charCodeAt(w)]<<10|i[x.charCodeAt(w+1)]<<4|i[x.charCodeAt(w+2)]>>2,P[N++]=b>>8&255,P[N++]=255&b),P},t.fromByteArray=function(x){for(var b,w=x.length,C=w%3,O=[],T=0,P=w-C;T<P;T+=16383)O.push(y(x,T,T+16383>P?P:T+16383));return C===1?(b=x[w-1],O.push(r[b>>2]+r[b<<4&63]+"==")):C===2&&(b=(x[w-2]<<8)+x[w-1],O.push(r[b>>10]+r[b>>4&63]+r[b<<2&63]+"=")),O.join("")};for(var r=[],i=[],o=typeof Uint8Array<"u"?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,f=l.length;c<f;++c)r[c]=l[c],i[l.charCodeAt(c)]=c;function h(x){var b=x.length;if(b%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var w=x.indexOf("=");return w===-1&&(w=b),[w,w===b?0:4-w%4]}function m(x){return r[x>>18&63]+r[x>>12&63]+r[x>>6&63]+r[63&x]}function y(x,b,w){for(var C,O=[],T=b;T<w;T+=3)C=(x[T]<<16&16711680)+(x[T+1]<<8&65280)+(255&x[T+2]),O.push(m(C));return O.join("")}i[45]=62,i[95]=63},function(e,t){t.read=function(n,r,i,o,l){var c,f,h=8*l-o-1,m=(1<<h)-1,y=m>>1,x=-7,b=i?l-1:0,w=i?-1:1,C=n[r+b];for(b+=w,c=C&(1<<-x)-1,C>>=-x,x+=h;x>0;c=256*c+n[r+b],b+=w,x-=8);for(f=c&(1<<-x)-1,c>>=-x,x+=o;x>0;f=256*f+n[r+b],b+=w,x-=8);if(c===0)c=1-y;else{if(c===m)return f?NaN:1/0*(C?-1:1);f+=Math.pow(2,o),c-=y}return(C?-1:1)*f*Math.pow(2,c-o)},t.write=function(n,r,i,o,l,c){var f,h,m,y=8*c-l-1,x=(1<<y)-1,b=x>>1,w=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=o?0:c-1,O=o?1:-1,T=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(h=isNaN(r)?1:0,f=x):(f=Math.floor(Math.log(r)/Math.LN2),r*(m=Math.pow(2,-f))<1&&(f--,m*=2),(r+=f+b>=1?w/m:w*Math.pow(2,1-b))*m>=2&&(f++,m/=2),f+b>=x?(h=0,f=x):f+b>=1?(h=(r*m-1)*Math.pow(2,l),f+=b):(h=r*Math.pow(2,b-1)*Math.pow(2,l),f=0));l>=8;n[i+C]=255&h,C+=O,h/=256,l-=8);for(f=f<<l|h,y+=l;y>0;n[i+C]=255&f,C+=O,f/=256,y-=8);n[i+C-O]|=128*T}},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(12).Buffer,i=n(42);function o(l,c,f){l.copy(c,f)}e.exports=(function(){function l(){(function(c,f){if(!(c instanceof f))throw new TypeError("Cannot call a class as a function")})(this,l),this.head=null,this.tail=null,this.length=0}return l.prototype.push=function(c){var f={data:c,next:null};this.length>0?this.tail.next=f:this.head=f,this.tail=f,++this.length},l.prototype.unshift=function(c){var f={data:c,next:this.head};this.length===0&&(this.tail=f),this.head=f,++this.length},l.prototype.shift=function(){if(this.length!==0){var c=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,c}},l.prototype.clear=function(){this.head=this.tail=null,this.length=0},l.prototype.join=function(c){if(this.length===0)return"";for(var f=this.head,h=""+f.data;f=f.next;)h+=c+f.data;return h},l.prototype.concat=function(c){if(this.length===0)return r.alloc(0);for(var f=r.allocUnsafe(c>>>0),h=this.head,m=0;h;)o(h.data,f,m),m+=h.data.length,h=h.next;return f},l})(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var l=i.inspect({length:this.length});return this.constructor.name+" "+l})},function(e,t){},function(e,t,n){(function(r){function i(o){try{if(!r.localStorage)return!1}catch{return!1}var l=r.localStorage[o];return l!=null&&String(l).toLowerCase()==="true"}e.exports=function(o,l){if(i("noDeprecation"))return o;var c=!1;return function(){if(!c){if(i("throwDeprecation"))throw new Error(l);i("traceDeprecation")?console.trace(l):console.warn(l),c=!0}return o.apply(this,arguments)}}}).call(this,n(0))},function(e,t,n){var r=n(3),i=r.Buffer;function o(c,f){for(var h in c)f[h]=c[h]}function l(c,f,h){return i(c,f,h)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=l),o(i,l),l.from=function(c,f,h){if(typeof c=="number")throw new TypeError("Argument must not be a number");return i(c,f,h)},l.alloc=function(c,f,h){if(typeof c!="number")throw new TypeError("Argument must be a number");var m=i(c);return f!==void 0?typeof h=="string"?m.fill(f,h):m.fill(f):m.fill(0),m},l.allocUnsafe=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return i(c)},l.allocUnsafeSlow=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(c)}},function(e,t,n){e.exports=o;var r=n(26),i=Object.create(n(4));function o(l){if(!(this instanceof o))return new o(l);r.call(this,l)}i.inherits=n(2),i.inherits(o,r),o.prototype._transform=function(l,c,f){f(null,l)}},function(e,t,n){e.exports=n(13)},function(e,t,n){e.exports=n(1)},function(e,t,n){e.exports=n(11).Transform},function(e,t,n){e.exports=n(11).PassThrough},function(e,t,n){var r=this&&this.__spreadArray||function(i,o,l){if(l||arguments.length===2)for(var c,f=0,h=o.length;f<h;f++)!c&&f in o||(c||(c=Array.prototype.slice.call(o,0,f)),c[f]=o[f]);return i.concat(c||Array.prototype.slice.call(o))};Object.defineProperty(t,"__esModule",{value:!0}),t.mergeParams=function(i){var o={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 l in i||(i={}),i)i.hasOwnProperty(l)&&(Array.isArray(i[l])?o[l]=r([],i[l],!0):o[l]=i[l]);return o}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.initParseRuntime=function(r){var i=r.parseParam,o={needProcessIgnoreColumn:!1,needProcessIncludeColumn:!1,selectedColumns:void 0,ended:!1,hasError:!1,error:void 0,delimiter:r.parseParam.delimiter,eol:r.parseParam.eol,columnConv:[],headerType:[],headerTitle:[],headerFlag:[],headers:void 0,started:!1,parsedLineNumber:0,columnValueSetter:[]};return i.ignoreColumns&&(o.needProcessIgnoreColumn=!0),i.includeColumns&&(o.needProcessIncludeColumn=!0),o}},function(e,t,n){(function(r){var i=this&&this.__extends||(function(){var C=function(O,T){return(C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,N){P.__proto__=N}||function(P,N){for(var F in N)Object.prototype.hasOwnProperty.call(N,F)&&(P[F]=N[F])})(O,T)};return function(O,T){if(typeof T!="function"&&T!==null)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");function P(){this.constructor=O}C(O,T),O.prototype=T===null?Object.create(T):(P.prototype=T.prototype,new P)}})(),o=this&&this.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProcessorLocal=void 0;var l=n(53),c=n(54),f=o(n(14)),h=n(55),m=n(27),y=n(56),x=o(n(57)),b=o(n(28)),w=(function(C){function O(){var T=C!==null&&C.apply(this,arguments)||this;return T.rowSplit=new y.RowSplit(T.converter),T.eolEmitted=!1,T._needEmitEol=void 0,T.headEmitted=!1,T._needEmitHead=void 0,T}return i(O,C),O.prototype.flush=function(){var T=this;if(this.runtime.csvLineBuffer&&this.runtime.csvLineBuffer.length>0){var P=this.runtime.csvLineBuffer;return this.runtime.csvLineBuffer=void 0,this.process(P,!0).then((function(N){return T.runtime.csvLineBuffer&&T.runtime.csvLineBuffer.length>0?Promise.reject(b.default.unclosed_quote(T.runtime.parsedLineNumber,T.runtime.csvLineBuffer.toString())):Promise.resolve(N)}))}return Promise.resolve([])},O.prototype.destroy=function(){return Promise.resolve()},Object.defineProperty(O.prototype,"needEmitEol",{get:function(){return this._needEmitEol===void 0&&(this._needEmitEol=this.converter.listeners("eol").length>0),this._needEmitEol},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"needEmitHead",{get:function(){return this._needEmitHead===void 0&&(this._needEmitHead=this.converter.listeners("header").length>0),this._needEmitHead},enumerable:!1,configurable:!0}),O.prototype.process=function(T,P){var N,F=this;return P===void 0&&(P=!1),N=P?T.toString():(0,c.prepareData)(T,this.converter.parseRuntime),Promise.resolve().then((function(){return F.runtime.preRawDataHook?F.runtime.preRawDataHook(N):N})).then((function(B){return B&&B.length>0?F.processCSV(B,P):Promise.resolve([])}))},O.prototype.processCSV=function(T,P){var N=this,F=this.params,B=this.runtime;B.eol||(0,f.default)(T,B),this.needEmitEol&&!this.eolEmitted&&B.eol&&(this.converter.emit("eol",B.eol),this.eolEmitted=!0),F.ignoreEmpty&&!B.started&&(T=(0,m.trimLeft)(T));var W=(0,h.stringToLines)(T,B);return P?(W.lines.push(W.partial),W.partial=""):this.prependLeftBuf((0,m.bufFromString)(W.partial)),W.lines.length>0?(B.preFileLineHook?this.runPreLineHook(W.lines):Promise.resolve(W.lines)).then((function(Q){return B.started||N.runtime.headers?N.processCSVBody(Q):N.processDataWithHead(Q)})):Promise.resolve([])},O.prototype.processDataWithHead=function(T){if(this.params.noheader)this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=[];else{for(var P="",N=[];T.length;){var F=P+T.shift(),B=this.rowSplit.parse(F);if(B.closed){N=B.cells,P="";break}P=F+(0,f.default)(F,this.runtime)}if(this.prependLeftBuf((0,m.bufFromString)(P)),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(T)},O.prototype.filterHeader=function(){if(this.runtime.selectedColumns=[],this.runtime.headers){for(var T=this.runtime.headers,P=0;P<T.length;P++)if(this.params.ignoreColumns)if(this.params.ignoreColumns.test(T[P])){if(!this.params.includeColumns||!this.params.includeColumns.test(T[P]))continue;this.runtime.selectedColumns.push(P)}else this.runtime.selectedColumns.push(P);else this.params.includeColumns?this.params.includeColumns.test(T[P])&&this.runtime.selectedColumns.push(P):this.runtime.selectedColumns.push(P);this.runtime.headers=(0,m.filterArray)(this.runtime.headers,this.runtime.selectedColumns)}},O.prototype.processCSVBody=function(T){if(this.params.output==="line")return T;var P=this.rowSplit.parseMultiLines(T);return this.prependLeftBuf((0,m.bufFromString)(P.partial)),this.params.output==="csv"?P.rowsCells:(0,x.default)(P.rowsCells,this.converter)},O.prototype.prependLeftBuf=function(T){T&&(this.runtime.csvLineBuffer?this.runtime.csvLineBuffer=r.concat([T,this.runtime.csvLineBuffer]):this.runtime.csvLineBuffer=T)},O.prototype.runPreLineHook=function(T){var P=this;return new Promise((function(N,F){(function B(W,Q,re,ce){if(re>=W.length)ce();else if(Q.preFileLineHook){var ae=W[re],J=Q.preFileLineHook(ae,Q.parsedLineNumber+re);if(re++,J&&J.then)J.then((function(oe){W[re-1]=oe,B(W,Q,re,ce)}));else{for(W[re-1]=J;re<W.length;)W[re]=Q.preFileLineHook(W[re],Q.parsedLineNumber+re),re++;ce()}}else ce()})(T,P.runtime,0,(function(B){B?F(B):N(T)}))}))},O})(l.Processor);t.ProcessorLocal=w}).call(this,n(3).Buffer)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Processor=void 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){Object.defineProperty(t,"__esModule",{value:!0}),t.prepareData=function(i,o){var l=(function(f,h){return h.csvLineBuffer&&h.csvLineBuffer.length>0?r.concat([h.csvLineBuffer,f]):f})(i,o);o.csvLineBuffer=void 0;var c=(function(f,h){var m=f.length-1;if((128&f[m])!=0){for(;(192&f[m])==128;)m--;m--}return m!=f.length-1?(h.csvLineBuffer=f.slice(m+1),f.slice(0,m+1)):f})(l,o).toString("utf8");return o.started===!1?(function(f){if(typeof f!="string")throw new TypeError("Expected a string, got ".concat(typeof f));return f.charCodeAt(0)===65279?f.slice(1):f})(c):c}}).call(this,n(3).Buffer)},function(e,t,n){var r=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(t,"__esModule",{value:!0}),t.stringToLines=function(o,l){var c=(0,i.default)(o,l),f=o.split(c),h=f.pop()||"";return{lines:f,partial:h}};var i=r(n(14))},function(e,t,n){var r=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(t,"__esModule",{value:!0}),t.RowSplit=void 0;var i=r(n(14)),o=n(27),l=[",","|"," ",";",":"],c=(function(){function f(h){this.conv=h,this.cachedRegExp={},this.delimiterEmitted=!1,this._needEmitDelimiter=void 0,this.quote=h.parseParam.quote,this.trim=h.parseParam.trim,this.escape=h.parseParam.escape}return Object.defineProperty(f.prototype,"needEmitDelimiter",{get:function(){return this._needEmitDelimiter===void 0&&(this._needEmitDelimiter=this.conv.listeners("delimiter").length>0),this._needEmitDelimiter},enumerable:!1,configurable:!0}),f.prototype.parse=function(h){if(h.length===0||this.conv.parseParam.ignoreEmpty&&h.trim().length===0)return{cells:[],closed:!0};var m=this.quote,y=this.trim;this.escape,(this.conv.parseRuntime.delimiter instanceof Array||this.conv.parseRuntime.delimiter.toLowerCase()==="auto")&&(this.conv.parseRuntime.delimiter=this.getDelimiter(h)),this.needEmitDelimiter&&!this.delimiterEmitted&&(this.conv.emit("delimiter",this.conv.parseRuntime.delimiter),this.delimiterEmitted=!0);var x=this.conv.parseRuntime.delimiter,b=h.split(x);if(m==="off"){if(y)for(var w=0;w<b.length;w++)b[w]=b[w].trim();return{cells:b,closed:!0}}return this.toCSVRow(b,y,m,x)},f.prototype.toCSVRow=function(h,m,y,x){for(var b=[],w=!1,C="",O=0,T=h.length;O<T;O++){var P=h[O];!w&&m&&(P=(0,o.trimLeft)(P));var N=P.length;if(w)this.isQuoteClose(P)?(w=!1,C+=x+(P=P.substr(0,N-1)),C=this.escapeQuote(C),m&&(C=(0,o.trimRight)(C)),b.push(C),C=""):C+=x+P;else{if(N===2&&P===this.quote+this.quote){b.push("");continue}if(this.isQuoteOpen(P)){if(P=P.substr(1),this.isQuoteClose(P)){P=P.substr(0,P.lastIndexOf(y)),P=this.escapeQuote(P),b.push(P);continue}if(P.indexOf(y)!==-1){for(var F=0,B="",W=0,Q=P;W<Q.length;W++){var re=Q[W];re===y&&B!==this.escape?(F++,B=""):B=re}if(F%2==1){m&&(P=(0,o.trimRight)(P)),b.push(y+P);continue}w=!0,C+=P;continue}w=!0,C+=P;continue}m&&(P=(0,o.trimRight)(P)),b.push(P)}}return{cells:b,closed:!w}},f.prototype.getDelimiter=function(h){var m;if(this.conv.parseParam.delimiter==="auto")m=l;else{if(!(this.conv.parseParam.delimiter instanceof Array))return this.conv.parseParam.delimiter;m=this.conv.parseParam.delimiter}var y=0,x=",";return m.forEach((function(b){var w=h.split(b).length;w>y&&(x=b,y=w)})),x},f.prototype.isQuoteOpen=function(h){var m=this.quote,y=this.escape;return h[0]===m&&(h[1]!==m||h[1]===y&&(h[2]===m||h.length===2))},f.prototype.isQuoteClose=function(h){var m=this.quote,y=this.escape;this.conv.parseParam.trim&&(h=(0,o.trimRight)(h));for(var x=0,b=h.length-1;h[b]===m||h[b]===y;)b--,x++;return x%2!=0},f.prototype.escapeQuote=function(h){var m="es|"+this.quote+"|"+this.escape;this.cachedRegExp[m]===void 0&&(this.cachedRegExp[m]=new RegExp("\\"+this.escape+"\\"+this.quote,"g"));var y=this.cachedRegExp[m];return h.replace(y,this.quote)},f.prototype.parseMultiLines=function(h){for(var m=[],y="";h.length;){var x=y+h.shift(),b=this.parse(x);b.cells.length===0&&this.conv.parseParam.ignoreEmpty||(b.closed||this.conv.parseParam.alwaysSplitAtEOL?(this.conv.parseRuntime.selectedColumns?m.push((0,o.filterArray)(b.cells,this.conv.parseRuntime.selectedColumns)):m.push(b.cells),y=""):y=x+((0,i.default)(x,this.conv.parseRuntime)||`
|
||
`))}return{rowsCells:m,partial:y}},f})();t.RowSplit=c},function(e,t,n){var r=this&&this.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(T,P){for(var N=[],F=0,B=T.length;F<B;F++){var W=c(T[F],P,F);W&&N.push(W)}return N};var i=r(n(28)),o=r(n(58)),l=/^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;function c(T,P,N){if(P.parseParam.checkColumn&&P.parseRuntime.headers&&T.length!==P.parseRuntime.headers.length)throw i.default.column_mismatched(P.parseRuntime.parsedLineNumber+N);return(function(F,B,W){for(var Q=!1,re={},ce=0,ae=F.length;ce<ae;ce++){var J=F[ce];if(!W.parseParam.ignoreEmpty||J!==""){Q=!0;var oe=B[ce];oe&&oe!==""||(oe=B[ce]="field"+(ce+1));var ve=h(oe,ce,W);if(ve){var ie=ve(J,oe,re,F,ce);ie!==void 0&&m(re,oe,ie,W,ce)}else W.parseParam.checkType&&(J=b(J,oe,ce,W)(J)),J!==void 0&&m(re,oe,J,W,ce)}}return Q?re:null})(T,P.parseRuntime.headers||[],P)||null}var f={string:C,number:w,omit:function(){}};function h(T,P,N){if(N.parseRuntime.columnConv[P]!==void 0)return N.parseRuntime.columnConv[P];var F=N.parseParam.colParser[T];if(F===void 0)return N.parseRuntime.columnConv[P]=null;if(typeof F=="object"&&(F=F.cellParser||"string"),typeof F=="string"){F=F.trim().toLowerCase();var B=f[F];return N.parseRuntime.columnConv[P]=B||null}return N.parseRuntime.columnConv[P]=typeof F=="function"?F:null}function m(T,P,N,F,B){if(!F.parseRuntime.columnValueSetter[B])if(F.parseParam.flatKeys)F.parseRuntime.columnValueSetter[B]=y;else if(P.indexOf(".")>-1){for(var W=P.split("."),Q=!0;W.length>0;)if(W.shift().length===0){Q=!1;break}!Q||F.parseParam.colParser[P]&&F.parseParam.colParser[P].flat?F.parseRuntime.columnValueSetter[B]=y:F.parseRuntime.columnValueSetter[B]=x}else F.parseRuntime.columnValueSetter[B]=y;F.parseParam.nullObject===!0&&N==="null"&&(N=null),F.parseRuntime.columnValueSetter[B](T,P,N)}function y(T,P,N){T[P]=N}function x(T,P,N){(0,o.default)(T,P,N)}function b(T,P,N,F){return F.parseRuntime.headerType[N]?F.parseRuntime.headerType[N]:P.indexOf("number#!")>-1?F.parseRuntime.headerType[N]=w:P.indexOf("string#!")>-1?F.parseRuntime.headerType[N]=C:F.parseParam.checkType?F.parseRuntime.headerType[N]=O:F.parseRuntime.headerType[N]=C}function w(T){var P=parseFloat(T);return isNaN(P)?T:P}function C(T){return T.toString()}function O(T){var P=T.trim();return P===""?C(T):l.test(P)?w(T):P.length===5&&P.toLowerCase()==="false"||P.length===4&&P.toLowerCase()==="true"?(function(N){var F=N.trim();return!(F.length===5&&F.toLowerCase()==="false")})(T):P[0]==="{"&&P[P.length-1]==="}"||P[0]==="["&&P[P.length-1]==="]"?(function(N){try{return JSON.parse(N)}catch{return N}})(T):C(T)}},function(e,t,n){var r=n(59);e.exports=function(i,o,l){return i==null?i:r(i,o,l)}},function(e,t,n){var r=n(60),i=n(72),o=n(101),l=n(18),c=n(102);e.exports=function(f,h,m,y){if(!l(f))return f;for(var x=-1,b=(h=i(h,f)).length,w=b-1,C=f;C!=null&&++x<b;){var O=c(h[x]),T=m;if(O==="__proto__"||O==="constructor"||O==="prototype")return f;if(x!=w){var P=C[O];(T=y?y(P,O,C):void 0)===void 0&&(T=l(P)?P:o(h[x+1])?[]:{})}r(C,O,T),C=C[O]}return f}},function(e,t,n){var r=n(61),i=n(30),o=Object.prototype.hasOwnProperty;e.exports=function(l,c,f){var h=l[c];o.call(l,c)&&i(h,f)&&(f!==void 0||c in l)||r(l,c,f)}},function(e,t,n){var r=n(62);e.exports=function(i,o,l){o=="__proto__"&&r?r(i,o,{configurable:!0,enumerable:!0,value:l,writable:!0}):i[o]=l}},function(e,t,n){var r=n(15),i=(function(){try{var o=r(Object,"defineProperty");return o({},"",{}),o}catch{}})();e.exports=i},function(e,t,n){var r=n(64),i=n(68),o=n(18),l=n(70),c=/^\[object .+?Constructor\]$/,f=Function.prototype,h=Object.prototype,m=f.toString,y=h.hasOwnProperty,x=RegExp("^"+m.call(y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(b){return!(!o(b)||i(b))&&(r(b)?x:c).test(l(b))}},function(e,t,n){var r=n(29),i=n(18);e.exports=function(o){if(!i(o))return!1;var l=r(o);return l=="[object Function]"||l=="[object GeneratorFunction]"||l=="[object AsyncFunction]"||l=="[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(16),i=Object.prototype,o=i.hasOwnProperty,l=i.toString,c=r?r.toStringTag:void 0;e.exports=function(f){var h=o.call(f,c),m=f[c];try{f[c]=void 0;var y=!0}catch{}var x=l.call(f);return y&&(h?f[c]=m:delete f[c]),x}},function(e,t){var n=Object.prototype.toString;e.exports=function(r){return n.call(r)}},function(e,t,n){var r=n(69),i=(function(){var o=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})();e.exports=function(o){return!!i&&i in o}},function(e,t,n){var r=n(17)["__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(19),i=n(73),o=n(75),l=n(98);e.exports=function(c,f){return r(c)?c:i(c,f)?[c]:o(l(c))}},function(e,t,n){var r=n(19),i=n(20),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/;e.exports=function(c,f){if(r(c))return!1;var h=typeof c;return!(h!="number"&&h!="symbol"&&h!="boolean"&&c!=null&&!i(c))||l.test(c)||!o.test(c)||f!=null&&c in Object(f)}},function(e,t){e.exports=function(n){return n!=null&&typeof n=="object"}},function(e,t,n){var r=n(76),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,l=r((function(c){var f=[];return c.charCodeAt(0)===46&&f.push(""),c.replace(i,(function(h,m,y,x){f.push(y?x.replace(o,"$1"):m||h)})),f}));e.exports=l},function(e,t,n){var r=n(77);e.exports=function(i){var o=r(i,(function(c){return l.size===500&&l.clear(),c})),l=o.cache;return o}},function(e,t,n){var r=n(78);function i(o,l){if(typeof o!="function"||l!=null&&typeof l!="function")throw new TypeError("Expected a function");var c=function(){var f=arguments,h=l?l.apply(this,f):f[0],m=c.cache;if(m.has(h))return m.get(h);var y=o.apply(this,f);return c.cache=m.set(h,y)||m,y};return c.cache=new(i.Cache||r),c}i.Cache=r,e.exports=i},function(e,t,n){var r=n(79),i=n(93),o=n(95),l=n(96),c=n(97);function f(h){var m=-1,y=h==null?0:h.length;for(this.clear();++m<y;){var x=h[m];this.set(x[0],x[1])}}f.prototype.clear=r,f.prototype.delete=i,f.prototype.get=o,f.prototype.has=l,f.prototype.set=c,e.exports=f},function(e,t,n){var r=n(80),i=n(86),o=n(92);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(e,t,n){var r=n(81),i=n(82),o=n(83),l=n(84),c=n(85);function f(h){var m=-1,y=h==null?0:h.length;for(this.clear();++m<y;){var x=h[m];this.set(x[0],x[1])}}f.prototype.clear=r,f.prototype.delete=i,f.prototype.get=o,f.prototype.has=l,f.prototype.set=c,e.exports=f},function(e,t,n){var r=n(7);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(7),i=Object.prototype.hasOwnProperty;e.exports=function(o){var l=this.__data__;if(r){var c=l[o];return c==="__lodash_hash_undefined__"?void 0:c}return i.call(l,o)?l[o]:void 0}},function(e,t,n){var r=n(7),i=Object.prototype.hasOwnProperty;e.exports=function(o){var l=this.__data__;return r?l[o]!==void 0:i.call(l,o)}},function(e,t,n){var r=n(7);e.exports=function(i,o){var l=this.__data__;return this.size+=this.has(i)?0:1,l[i]=r&&o===void 0?"__lodash_hash_undefined__":o,this}},function(e,t,n){var r=n(87),i=n(88),o=n(89),l=n(90),c=n(91);function f(h){var m=-1,y=h==null?0:h.length;for(this.clear();++m<y;){var x=h[m];this.set(x[0],x[1])}}f.prototype.clear=r,f.prototype.delete=i,f.prototype.get=o,f.prototype.has=l,f.prototype.set=c,e.exports=f},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(8),i=Array.prototype.splice;e.exports=function(o){var l=this.__data__,c=r(l,o);return!(c<0||(c==l.length-1?l.pop():i.call(l,c,1),--this.size,0))}},function(e,t,n){var r=n(8);e.exports=function(i){var o=this.__data__,l=r(o,i);return l<0?void 0:o[l][1]}},function(e,t,n){var r=n(8);e.exports=function(i){return r(this.__data__,i)>-1}},function(e,t,n){var r=n(8);e.exports=function(i,o){var l=this.__data__,c=r(l,i);return c<0?(++this.size,l.push([i,o])):l[c][1]=o,this}},function(e,t,n){var r=n(15)(n(17),"Map");e.exports=r},function(e,t,n){var r=n(9);e.exports=function(i){var o=r(this,i).delete(i);return this.size-=o?1:0,o}},function(e,t){e.exports=function(n){var r=typeof n;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?n!=="__proto__":n===null}},function(e,t,n){var r=n(9);e.exports=function(i){return r(this,i).get(i)}},function(e,t,n){var r=n(9);e.exports=function(i){return r(this,i).has(i)}},function(e,t,n){var r=n(9);e.exports=function(i,o){var l=r(this,i),c=l.size;return l.set(i,o),this.size+=l.size==c?0:1,this}},function(e,t,n){var r=n(99);e.exports=function(i){return i==null?"":r(i)}},function(e,t,n){var r=n(16),i=n(100),o=n(19),l=n(20),c=r?r.prototype:void 0,f=c?c.toString:void 0;e.exports=function h(m){if(typeof m=="string")return m;if(o(m))return i(m,h)+"";if(l(m))return f?f.call(m):"";var y=m+"";return y=="0"&&1/m==-1/0?"-0":y}},function(e,t){e.exports=function(n,r){for(var i=-1,o=n==null?0:n.length,l=Array(o);++i<o;)l[i]=r(n[i],i,n);return l}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(r,i){var o=typeof r;return!!(i=i??9007199254740991)&&(o=="number"||o!="symbol"&&n.test(r))&&r>-1&&r%1==0&&r<i}},function(e,t,n){var r=n(20);e.exports=function(i){if(typeof i=="string"||r(i))return i;var o=i+"";return o=="0"&&1/i==-1/0?"-0":o}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Result=void 0;var r=n(104),i=(function(){function l(c){this.converter=c,this.finalResult=[]}return Object.defineProperty(l.prototype,"needEmitLine",{get:function(){return!!this.converter.parseRuntime.subscribe&&!!this.converter.parseRuntime.subscribe.onNext||this.needPushDownstream},enumerable:!1,configurable:!0}),Object.defineProperty(l.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:!1,configurable:!0}),Object.defineProperty(l.prototype,"needEmitAll",{get:function(){return!!this.converter.parseRuntime.then&&this.converter.parseParam.needEmitAll},enumerable:!1,configurable:!0}),l.prototype.processResult=function(c){var f=this,h=this.converter.parseRuntime.parsedLineNumber;return this.needPushDownstream&&this.converter.parseParam.downstreamFormat==="array"&&h===0&&o(this.converter,"["+r.EOL),new Promise((function(m,y){f.needEmitLine?(function x(b,w,C,O,T){if(C>=b.length)T();else if(w.parseRuntime.subscribe&&w.parseRuntime.subscribe.onNext){var P=w.parseRuntime.subscribe.onNext,N=b[C],F=P(N,w.parseRuntime.parsedLineNumber+C);if(C++,F&&F.then)F.then((function(){(function(W,Q,re,ce,ae,J,oe){ae&&o(re,oe),x(W,re,ce,ae,J)})(b,0,w,C,O,T,N)}),T);else{for(O&&o(w,N);C<b.length;){var B=b[C];P(B,w.parseRuntime.parsedLineNumber+C),C++,O&&o(w,B)}T()}}else{if(O)for(;C<b.length;)B=b[C++],o(w,B);T()}})(c,f.converter,0,f.needPushDownstream,(function(x){x?y(x):(f.appendFinalResult(c),m(void 0))})):(f.appendFinalResult(c),m(void 0))}))},l.prototype.appendFinalResult=function(c){this.needEmitAll&&(this.finalResult=this.finalResult.concat(c)),this.converter.parseRuntime.parsedLineNumber+=c.length},l.prototype.processError=function(c){this.converter.parseRuntime.subscribe&&this.converter.parseRuntime.subscribe.onError&&this.converter.parseRuntime.subscribe.onError(c),this.converter.parseRuntime.then&&this.converter.parseRuntime.then.onrejected&&this.converter.parseRuntime.then.onrejected(c)},l.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"&&o(this.converter,"]"+r.EOL)},l})();function o(l,c){if(typeof c!="object"||l.options.objectMode)l.push(c);else{var f=JSON.stringify(c);l.push(f+(l.parseParam.downstreamFormat==="array"?","+r.EOL:r.EOL),"utf8")}}t.Result=i},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"/"}}])),S_}var Lwe=Nwe();const Rwe=Qi(Lwe),Dwe=e=>new Promise(t=>{Rwe().fromString(e).then(t)}),kwe=new dk,Iwe=e=>kwe.parse(e),zwe="shlink",$L=e=>`${zwe}.${e}`;class Bwe{constructor(t){this.localStorage=t}get=t=>{const n=this.localStorage.getItem($L(t));return n?JSON.parse(n):void 0};set=(t,n)=>this.localStorage.setItem($L(t),JSON.stringify(n))}class Uwe{constructor(t){this.storage=t}getTagColors(){return this.storage.get("colors")??{}}storeTagColors(t){this.storage.set("colors",t)}}const ai=new ck,{container:$we}=ai;ai.constant("window",window);ai.constant("console",console);ai.constant("fetch",window.fetch.bind(window));ai.service("HttpClient",vwe,"fetch");ai.constant("localStorage",window.localStorage);ai.service("Storage",Bwe,"localStorage");ai.service("TagColorsStorage",Uwe,"Storage");ai.constant("csvToJson",Dwe);ai.constant("jsonToCsv",Iwe);ai.serviceFactory("useTimeoutToggle",()=>Jy);ai.serviceFactory("buildShlinkApiClient",Ewe,"HttpClient");ai.service("ServersImporter",Pwe,"csvToJson");ai.service("ServersExporter",jwe,"Storage","window","jsonToCsv");const Fwe=!!(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 Vwe(e){if("serviceWorker"in navigator){if(new URL(bv.homepage,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=`${bv.homepage}/service-worker.js`;Fwe?(Hwe(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")})):oU(n,e)})}}function oU(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 Hwe(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()})}):oU(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}const sU=yQ();L$.createRoot(document.getElementById("root")).render(g.jsx(XX,{value:$we,children:g.jsx(sS,{store:sU,children:g.jsx(u6,{basename:bv.homepage,children:g.jsx(pwe,{children:g.jsx(gwe,{children:g.jsx(mwe,{})})})})})}));Vwe({onUpdate(){sU.dispatch(rQ())}});
|