619 lines
1.0 MiB
619 lines
1.0 MiB
var CU=Object.defineProperty;var TU=(e,t,r)=>t in e?CU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var qE=(e,t,r)=>TU(e,typeof t!="symbol"?t+"":t,r);function kU(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>n[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"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var lh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ct(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yy={exports:{}},Fc={},xy={exports:{}},Ze={};/**
|
||
* @license React
|
||
* react.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var WE;function MU(){if(WE)return Ze;WE=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;function g($){return $===null||typeof $!="object"?null:($=p&&$[p]||$["@@iterator"],typeof $=="function"?$:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,y={};function b($,H,re){this.props=$,this.context=H,this.refs=y,this.updater=re||v}b.prototype.isReactComponent={},b.prototype.setState=function($,H){if(typeof $!="object"&&typeof $!="function"&&$!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,$,H,"setState")},b.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function S(){}S.prototype=b.prototype;function A($,H,re){this.props=$,this.context=H,this.refs=y,this.updater=re||v}var _=A.prototype=new S;_.constructor=A,w(_,b.prototype),_.isPureReactComponent=!0;var C=Array.isArray,N=Object.prototype.hasOwnProperty,O={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function k($,H,re){var se,ge={},be=null,ae=null;if(H!=null)for(se in H.ref!==void 0&&(ae=H.ref),H.key!==void 0&&(be=""+H.key),H)N.call(H,se)&&!T.hasOwnProperty(se)&&(ge[se]=H[se]);var he=arguments.length-2;if(he===1)ge.children=re;else if(1<he){for(var ne=Array(he),le=0;le<he;le++)ne[le]=arguments[le+2];ge.children=ne}if($&&$.defaultProps)for(se in he=$.defaultProps,he)ge[se]===void 0&&(ge[se]=he[se]);return{$$typeof:e,type:$,key:be,ref:ae,props:ge,_owner:O.current}}function R($,H){return{$$typeof:e,type:$.type,key:H,ref:$.ref,props:$.props,_owner:$._owner}}function F($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function I($){var H={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(re){return H[re]})}var L=/\/+/g;function V($,H){return typeof $=="object"&&$!==null&&$.key!=null?I(""+$.key):H.toString(36)}function Y($,H,re,se,ge){var be=typeof $;(be==="undefined"||be==="boolean")&&($=null);var ae=!1;if($===null)ae=!0;else switch(be){case"string":case"number":ae=!0;break;case"object":switch($.$$typeof){case e:case t:ae=!0}}if(ae)return ae=$,ge=ge(ae),$=se===""?"."+V(ae,0):se,C(ge)?(re="",$!=null&&(re=$.replace(L,"$&/")+"/"),Y(ge,H,re,"",function(le){return le})):ge!=null&&(F(ge)&&(ge=R(ge,re+(!ge.key||ae&&ae.key===ge.key?"":(""+ge.key).replace(L,"$&/")+"/")+$)),H.push(ge)),1;if(ae=0,se=se===""?".":se+":",C($))for(var he=0;he<$.length;he++){be=$[he];var ne=se+V(be,he);ae+=Y(be,H,re,ne,ge)}else if(ne=g($),typeof ne=="function")for($=ne.call($),he=0;!(be=$.next()).done;)be=be.value,ne=se+V(be,he++),ae+=Y(be,H,re,ne,ge);else if(be==="object")throw H=String($),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.");return ae}function K($,H,re){if($==null)return $;var se=[],ge=0;return Y($,se,"","",function(be){return H.call(re,be,ge++)}),se}function z($){if($._status===-1){var H=$._result;H=H(),H.then(function(re){($._status===0||$._status===-1)&&($._status=1,$._result=re)},function(re){($._status===0||$._status===-1)&&($._status=2,$._result=re)}),$._status===-1&&($._status=0,$._result=H)}if($._status===1)return $._result.default;throw $._result}var G={current:null},D={transition:null},q={ReactCurrentDispatcher:G,ReactCurrentBatchConfig:D,ReactCurrentOwner:O};function Q(){throw Error("act(...) is not supported in production builds of React.")}return Ze.Children={map:K,forEach:function($,H,re){K($,function(){H.apply(this,arguments)},re)},count:function($){var H=0;return K($,function(){H++}),H},toArray:function($){return K($,function(H){return H})||[]},only:function($){if(!F($))throw Error("React.Children.only expected to receive a single React element child.");return $}},Ze.Component=b,Ze.Fragment=r,Ze.Profiler=i,Ze.PureComponent=A,Ze.StrictMode=n,Ze.Suspense=c,Ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=q,Ze.act=Q,Ze.cloneElement=function($,H,re){if($==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+$+".");var se=w({},$.props),ge=$.key,be=$.ref,ae=$._owner;if(H!=null){if(H.ref!==void 0&&(be=H.ref,ae=O.current),H.key!==void 0&&(ge=""+H.key),$.type&&$.type.defaultProps)var he=$.type.defaultProps;for(ne in H)N.call(H,ne)&&!T.hasOwnProperty(ne)&&(se[ne]=H[ne]===void 0&&he!==void 0?he[ne]:H[ne])}var ne=arguments.length-2;if(ne===1)se.children=re;else if(1<ne){he=Array(ne);for(var le=0;le<ne;le++)he[le]=arguments[le+2];se.children=he}return{$$typeof:e,type:$.type,key:ge,ref:be,props:se,_owner:ae}},Ze.createContext=function($){return $={$$typeof:o,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},$.Provider={$$typeof:a,_context:$},$.Consumer=$},Ze.createElement=k,Ze.createFactory=function($){var H=k.bind(null,$);return H.type=$,H},Ze.createRef=function(){return{current:null}},Ze.forwardRef=function($){return{$$typeof:l,render:$}},Ze.isValidElement=F,Ze.lazy=function($){return{$$typeof:h,_payload:{_status:-1,_result:$},_init:z}},Ze.memo=function($,H){return{$$typeof:f,type:$,compare:H===void 0?null:H}},Ze.startTransition=function($){var H=D.transition;D.transition={};try{$()}finally{D.transition=H}},Ze.unstable_act=Q,Ze.useCallback=function($,H){return G.current.useCallback($,H)},Ze.useContext=function($){return G.current.useContext($)},Ze.useDebugValue=function(){},Ze.useDeferredValue=function($){return G.current.useDeferredValue($)},Ze.useEffect=function($,H){return G.current.useEffect($,H)},Ze.useId=function(){return G.current.useId()},Ze.useImperativeHandle=function($,H,re){return G.current.useImperativeHandle($,H,re)},Ze.useInsertionEffect=function($,H){return G.current.useInsertionEffect($,H)},Ze.useLayoutEffect=function($,H){return G.current.useLayoutEffect($,H)},Ze.useMemo=function($,H){return G.current.useMemo($,H)},Ze.useReducer=function($,H,re){return G.current.useReducer($,H,re)},Ze.useRef=function($){return G.current.useRef($)},Ze.useState=function($){return G.current.useState($)},Ze.useSyncExternalStore=function($,H,re){return G.current.useSyncExternalStore($,H,re)},Ze.useTransition=function(){return G.current.useTransition()},Ze.version="18.3.1",Ze}var HE;function wj(){return HE||(HE=1,xy.exports=MU()),xy.exports}/**
|
||
* @license React
|
||
* react-jsx-runtime.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var GE;function RU(){if(GE)return Fc;GE=1;var e=wj(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(l,c,f){var h,p={},g=null,v=null;f!==void 0&&(g=""+f),c.key!==void 0&&(g=""+c.key),c.ref!==void 0&&(v=c.ref);for(h in c)n.call(c,h)&&!a.hasOwnProperty(h)&&(p[h]=c[h]);if(l&&l.defaultProps)for(h in c=l.defaultProps,c)p[h]===void 0&&(p[h]=c[h]);return{$$typeof:t,type:l,key:g,ref:v,props:p,_owner:i.current}}return Fc.Fragment=r,Fc.jsx=o,Fc.jsxs=o,Fc}var KE;function IU(){return KE||(KE=1,yy.exports=RU()),yy.exports}var d=IU(),j=wj();const U=ct(j),y$=kU({__proto__:null,default:U},[j]);var ch={},by={exports:{}},kr={},wy={exports:{}},Sy={};/**
|
||
* @license React
|
||
* scheduler.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var YE;function DU(){return YE||(YE=1,function(e){function t(D,q){var Q=D.length;D.push(q);e:for(;0<Q;){var $=Q-1>>>1,H=D[$];if(0<i(H,q))D[$]=q,D[Q]=H,Q=$;else break e}}function r(D){return D.length===0?null:D[0]}function n(D){if(D.length===0)return null;var q=D[0],Q=D.pop();if(Q!==q){D[0]=Q;e:for(var $=0,H=D.length,re=H>>>1;$<re;){var se=2*($+1)-1,ge=D[se],be=se+1,ae=D[be];if(0>i(ge,Q))be<H&&0>i(ae,ge)?(D[$]=ae,D[be]=Q,$=be):(D[$]=ge,D[se]=Q,$=se);else if(be<H&&0>i(ae,Q))D[$]=ae,D[be]=Q,$=be;else break e}}return q}function i(D,q){var Q=D.sortIndex-q.sortIndex;return Q!==0?Q:D.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],f=[],h=1,p=null,g=3,v=!1,w=!1,y=!1,b=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(D){for(var q=r(f);q!==null;){if(q.callback===null)n(f);else if(q.startTime<=D)n(f),q.sortIndex=q.expirationTime,t(c,q);else break;q=r(f)}}function C(D){if(y=!1,_(D),!w)if(r(c)!==null)w=!0,z(N);else{var q=r(f);q!==null&&G(C,q.startTime-D)}}function N(D,q){w=!1,y&&(y=!1,S(k),k=-1),v=!0;var Q=g;try{for(_(q),p=r(c);p!==null&&(!(p.expirationTime>q)||D&&!I());){var $=p.callback;if(typeof $=="function"){p.callback=null,g=p.priorityLevel;var H=$(p.expirationTime<=q);q=e.unstable_now(),typeof H=="function"?p.callback=H:p===r(c)&&n(c),_(q)}else n(c);p=r(c)}if(p!==null)var re=!0;else{var se=r(f);se!==null&&G(C,se.startTime-q),re=!1}return re}finally{p=null,g=Q,v=!1}}var O=!1,T=null,k=-1,R=5,F=-1;function I(){return!(e.unstable_now()-F<R)}function L(){if(T!==null){var D=e.unstable_now();F=D;var q=!0;try{q=T(!0,D)}finally{q?V():(O=!1,T=null)}}else O=!1}var V;if(typeof A=="function")V=function(){A(L)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,K=Y.port2;Y.port1.onmessage=L,V=function(){K.postMessage(null)}}else V=function(){b(L,0)};function z(D){T=D,O||(O=!0,V())}function G(D,q){k=b(function(){D(e.unstable_now())},q)}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(D){D.callback=null},e.unstable_continueExecution=function(){w||v||(w=!0,z(N))},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(D){switch(g){case 1:case 2:case 3:var q=3;break;default:q=g}var Q=g;g=q;try{return D()}finally{g=Q}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,q){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var Q=g;g=D;try{return q()}finally{g=Q}},e.unstable_scheduleCallback=function(D,q,Q){var $=e.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?$+Q:$):Q=$,D){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=Q+H,D={id:h++,callback:q,priorityLevel:D,startTime:Q,expirationTime:H,sortIndex:-1},Q>$?(D.sortIndex=Q,t(f,D),r(c)===null&&D===r(f)&&(y?(S(k),k=-1):y=!0,G(C,Q-$))):(D.sortIndex=H,t(c,D),w||v||(w=!0,z(N))),D},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(D){var q=g;return function(){var Q=g;g=q;try{return D.apply(this,arguments)}finally{g=Q}}}}(Sy)),Sy}var XE;function $U(){return XE||(XE=1,wy.exports=DU()),wy.exports}/**
|
||
* @license React
|
||
* react-dom.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var ZE;function LU(){if(ZE)return kr;ZE=1;var e=wj(),t=$U();function r(s){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+s,m=1;m<arguments.length;m++)u+="&args[]="+encodeURIComponent(arguments[m]);return"Minified React error #"+s+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,i={};function a(s,u){o(s,u),o(s+"Capture",u)}function o(s,u){for(i[s]=u,s=0;s<u.length;s++)n.add(u[s])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,f=/^[: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]*$/,h={},p={};function g(s){return c.call(p,s)?!0:c.call(h,s)?!1:f.test(s)?p[s]=!0:(h[s]=!0,!1)}function v(s,u,m,x){if(m!==null&&m.type===0)return!1;switch(typeof u){case"function":case"symbol":return!0;case"boolean":return x?!1:m!==null?!m.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function w(s,u,m,x){if(u===null||typeof u>"u"||v(s,u,m,x))return!0;if(x)return!1;if(m!==null)switch(m.type){case 3:return!u;case 4:return u===!1;case 5:return isNaN(u);case 6:return isNaN(u)||1>u}return!1}function y(s,u,m,x,P,E,M){this.acceptsBooleans=u===2||u===3||u===4,this.attributeName=x,this.attributeNamespace=P,this.mustUseProperty=m,this.propertyName=s,this.type=u,this.sanitizeURL=E,this.removeEmptyString=M}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){b[s]=new y(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var u=s[0];b[u]=new y(u,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){b[s]=new y(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){b[s]=new y(s,2,!1,s,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(s){b[s]=new y(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){b[s]=new y(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){b[s]=new y(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){b[s]=new y(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){b[s]=new y(s,5,!1,s.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function A(s){return s[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(s){var u=s.replace(S,A);b[u]=new y(u,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var u=s.replace(S,A);b[u]=new y(u,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var u=s.replace(S,A);b[u]=new y(u,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){b[s]=new y(s,1,!1,s.toLowerCase(),null,!1,!1)}),b.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){b[s]=new y(s,1,!1,s.toLowerCase(),null,!0,!0)});function _(s,u,m,x){var P=b.hasOwnProperty(u)?b[u]:null;(P!==null?P.type!==0:x||!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(w(u,m,P,x)&&(m=null),x||P===null?g(u)&&(m===null?s.removeAttribute(u):s.setAttribute(u,""+m)):P.mustUseProperty?s[P.propertyName]=m===null?P.type===3?!1:"":m:(u=P.attributeName,x=P.attributeNamespace,m===null?s.removeAttribute(u):(P=P.type,m=P===3||P===4&&m===!0?"":""+m,x?s.setAttributeNS(x,u,m):s.setAttribute(u,m))))}var C=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,N=Symbol.for("react.element"),O=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),F=Symbol.for("react.provider"),I=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),G=Symbol.for("react.offscreen"),D=Symbol.iterator;function q(s){return s===null||typeof s!="object"?null:(s=D&&s[D]||s["@@iterator"],typeof s=="function"?s:null)}var Q=Object.assign,$;function H(s){if($===void 0)try{throw Error()}catch(m){var u=m.stack.trim().match(/\n( *(at )?)/);$=u&&u[1]||""}return`
|
||
`+$+s}var re=!1;function se(s,u){if(!s||re)return"";re=!0;var m=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(u)if(u=function(){throw Error()},Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(te){var x=te}Reflect.construct(s,[],u)}else{try{u.call()}catch(te){x=te}s.call(u.prototype)}else{try{throw Error()}catch(te){x=te}s()}}catch(te){if(te&&x&&typeof te.stack=="string"){for(var P=te.stack.split(`
|
||
`),E=x.stack.split(`
|
||
`),M=P.length-1,B=E.length-1;1<=M&&0<=B&&P[M]!==E[B];)B--;for(;1<=M&&0<=B;M--,B--)if(P[M]!==E[B]){if(M!==1||B!==1)do if(M--,B--,0>B||P[M]!==E[B]){var W=`
|
||
`+P[M].replace(" at new "," at ");return s.displayName&&W.includes("<anonymous>")&&(W=W.replace("<anonymous>",s.displayName)),W}while(1<=M&&0<=B);break}}}finally{re=!1,Error.prepareStackTrace=m}return(s=s?s.displayName||s.name:"")?H(s):""}function ge(s){switch(s.tag){case 5:return H(s.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return s=se(s.type,!1),s;case 11:return s=se(s.type.render,!1),s;case 1:return s=se(s.type,!0),s;default:return""}}function be(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case T:return"Fragment";case O:return"Portal";case R:return"Profiler";case k:return"StrictMode";case V:return"Suspense";case Y:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case I:return(s.displayName||"Context")+".Consumer";case F:return(s._context.displayName||"Context")+".Provider";case L:var u=s.render;return s=s.displayName,s||(s=u.displayName||u.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case K:return u=s.displayName||null,u!==null?u:be(s.type)||"Memo";case z:u=s._payload,s=s._init;try{return be(s(u))}catch{}}return null}function ae(s){var u=s.type;switch(s.tag){case 24:return"Cache";case 9:return(u.displayName||"Context")+".Consumer";case 10:return(u._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=u.render,s=s.displayName||s.name||"",u.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return u;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return be(u);case 8:return u===k?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u}return null}function he(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function ne(s){var u=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function le(s){var u=ne(s)?"checked":"value",m=Object.getOwnPropertyDescriptor(s.constructor.prototype,u),x=""+s[u];if(!s.hasOwnProperty(u)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var P=m.get,E=m.set;return Object.defineProperty(s,u,{configurable:!0,get:function(){return P.call(this)},set:function(M){x=""+M,E.call(this,M)}}),Object.defineProperty(s,u,{enumerable:m.enumerable}),{getValue:function(){return x},setValue:function(M){x=""+M},stopTracking:function(){s._valueTracker=null,delete s[u]}}}}function ce(s){s._valueTracker||(s._valueTracker=le(s))}function Z(s){if(!s)return!1;var u=s._valueTracker;if(!u)return!0;var m=u.getValue(),x="";return s&&(x=ne(s)?s.checked?"true":"false":s.value),s=x,s!==m?(u.setValue(s),!0):!1}function Se(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function we(s,u){var m=u.checked;return Q({},u,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:m??s._wrapperState.initialChecked})}function ze(s,u){var m=u.defaultValue==null?"":u.defaultValue,x=u.checked!=null?u.checked:u.defaultChecked;m=he(u.value!=null?u.value:m),s._wrapperState={initialChecked:x,initialValue:m,controlled:u.type==="checkbox"||u.type==="radio"?u.checked!=null:u.value!=null}}function Ue(s,u){u=u.checked,u!=null&&_(s,"checked",u,!1)}function Je(s,u){Ue(s,u);var m=he(u.value),x=u.type;if(m!=null)x==="number"?(m===0&&s.value===""||s.value!=m)&&(s.value=""+m):s.value!==""+m&&(s.value=""+m);else if(x==="submit"||x==="reset"){s.removeAttribute("value");return}u.hasOwnProperty("value")?xe(s,u.type,m):u.hasOwnProperty("defaultValue")&&xe(s,u.type,he(u.defaultValue)),u.checked==null&&u.defaultChecked!=null&&(s.defaultChecked=!!u.defaultChecked)}function ye(s,u,m){if(u.hasOwnProperty("value")||u.hasOwnProperty("defaultValue")){var x=u.type;if(!(x!=="submit"&&x!=="reset"||u.value!==void 0&&u.value!==null))return;u=""+s._wrapperState.initialValue,m||u===s.value||(s.value=u),s.defaultValue=u}m=s.name,m!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,m!==""&&(s.name=m)}function xe(s,u,m){(u!=="number"||Se(s.ownerDocument)!==s)&&(m==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+m&&(s.defaultValue=""+m))}var Ke=Array.isArray;function pe(s,u,m,x){if(s=s.options,u){u={};for(var P=0;P<m.length;P++)u["$"+m[P]]=!0;for(m=0;m<s.length;m++)P=u.hasOwnProperty("$"+s[m].value),s[m].selected!==P&&(s[m].selected=P),P&&x&&(s[m].defaultSelected=!0)}else{for(m=""+he(m),u=null,P=0;P<s.length;P++){if(s[P].value===m){s[P].selected=!0,x&&(s[P].defaultSelected=!0);return}u!==null||s[P].disabled||(u=s[P])}u!==null&&(u.selected=!0)}}function _e(s,u){if(u.dangerouslySetInnerHTML!=null)throw Error(r(91));return Q({},u,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function ot(s,u){var m=u.value;if(m==null){if(m=u.children,u=u.defaultValue,m!=null){if(u!=null)throw Error(r(92));if(Ke(m)){if(1<m.length)throw Error(r(93));m=m[0]}u=m}u==null&&(u=""),m=u}s._wrapperState={initialValue:he(m)}}function Xt(s,u){var m=he(u.value),x=he(u.defaultValue);m!=null&&(m=""+m,m!==s.value&&(s.value=m),u.defaultValue==null&&s.defaultValue!==m&&(s.defaultValue=m)),x!=null&&(s.defaultValue=""+x)}function Qi(s){var u=s.textContent;u===s._wrapperState.initialValue&&u!==""&&u!==null&&(s.value=u)}function Zf(s){switch(s){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Jo(s,u){return s==null||s==="http://www.w3.org/1999/xhtml"?Zf(u):s==="http://www.w3.org/2000/svg"&&u==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var es,ts=function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(u,m,x,P){MSApp.execUnsafeLocalFunction(function(){return s(u,m,x,P)})}:s}(function(s,u){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=u;else{for(es=es||document.createElement("div"),es.innerHTML="<svg>"+u.valueOf().toString()+"</svg>",u=es.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;u.firstChild;)s.appendChild(u.firstChild)}});function Kr(s,u){if(u){var m=s.firstChild;if(m&&m===s.lastChild&&m.nodeType===3){m.nodeValue=u;return}}s.textContent=u}var fi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Xl=["Webkit","ms","Moz","O"];Object.keys(fi).forEach(function(s){Xl.forEach(function(u){u=u+s.charAt(0).toUpperCase()+s.substring(1),fi[u]=fi[s]})});function Ka(s,u,m){return u==null||typeof u=="boolean"||u===""?"":m||typeof u!="number"||u===0||fi.hasOwnProperty(s)&&fi[s]?(""+u).trim():u+"px"}function Qf(s,u){s=s.style;for(var m in u)if(u.hasOwnProperty(m)){var x=m.indexOf("--")===0,P=Ka(m,u[m],x);m==="float"&&(m="cssFloat"),x?s.setProperty(m,P):s[m]=P}}var Rg=Q({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Zl(s,u){if(u){if(Rg[s]&&(u.children!=null||u.dangerouslySetInnerHTML!=null))throw Error(r(137,s));if(u.dangerouslySetInnerHTML!=null){if(u.children!=null)throw Error(r(60));if(typeof u.dangerouslySetInnerHTML!="object"||!("__html"in u.dangerouslySetInnerHTML))throw Error(r(61))}if(u.style!=null&&typeof u.style!="object")throw Error(r(62))}}function Ql(s,u){if(s.indexOf("-")===-1)return typeof u.is=="string";switch(s){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 Jl=null;function rs(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var ec=null,di=null,hi=null;function tc(s){if(s=Pc(s)){if(typeof ec!="function")throw Error(r(280));var u=s.stateNode;u&&(u=jd(u),ec(s.stateNode,s.type,u))}}function Jf(s){di?hi?hi.push(s):hi=[s]:di=s}function rc(){if(di){var s=di,u=hi;if(hi=di=null,tc(s),u)for(s=0;s<u.length;s++)tc(u[s])}}function nc(s,u){return s(u)}function ed(){}var Ig=!1;function dA(s,u,m){if(Ig)return s(u,m);Ig=!0;try{return nc(s,u,m)}finally{Ig=!1,(di!==null||hi!==null)&&(ed(),rc())}}function ic(s,u){var m=s.stateNode;if(m===null)return null;var x=jd(m);if(x===null)return null;m=x[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(x=!x.disabled)||(s=s.type,x=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!x;break e;default:s=!1}if(s)return null;if(m&&typeof m!="function")throw Error(r(231,u,typeof m));return m}var Dg=!1;if(l)try{var ac={};Object.defineProperty(ac,"passive",{get:function(){Dg=!0}}),window.addEventListener("test",ac,ac),window.removeEventListener("test",ac,ac)}catch{Dg=!1}function Dz(s,u,m,x,P,E,M,B,W){var te=Array.prototype.slice.call(arguments,3);try{u.apply(m,te)}catch(fe){this.onError(fe)}}var oc=!1,td=null,rd=!1,$g=null,$z={onError:function(s){oc=!0,td=s}};function Lz(s,u,m,x,P,E,M,B,W){oc=!1,td=null,Dz.apply($z,arguments)}function Bz(s,u,m,x,P,E,M,B,W){if(Lz.apply(this,arguments),oc){if(oc){var te=td;oc=!1,td=null}else throw Error(r(198));rd||(rd=!0,$g=te)}}function Ya(s){var u=s,m=s;if(s.alternate)for(;u.return;)u=u.return;else{s=u;do u=s,(u.flags&4098)!==0&&(m=u.return),s=u.return;while(s)}return u.tag===3?m:null}function hA(s){if(s.tag===13){var u=s.memoizedState;if(u===null&&(s=s.alternate,s!==null&&(u=s.memoizedState)),u!==null)return u.dehydrated}return null}function pA(s){if(Ya(s)!==s)throw Error(r(188))}function Fz(s){var u=s.alternate;if(!u){if(u=Ya(s),u===null)throw Error(r(188));return u!==s?null:s}for(var m=s,x=u;;){var P=m.return;if(P===null)break;var E=P.alternate;if(E===null){if(x=P.return,x!==null){m=x;continue}break}if(P.child===E.child){for(E=P.child;E;){if(E===m)return pA(P),s;if(E===x)return pA(P),u;E=E.sibling}throw Error(r(188))}if(m.return!==x.return)m=P,x=E;else{for(var M=!1,B=P.child;B;){if(B===m){M=!0,m=P,x=E;break}if(B===x){M=!0,x=P,m=E;break}B=B.sibling}if(!M){for(B=E.child;B;){if(B===m){M=!0,m=E,x=P;break}if(B===x){M=!0,x=E,m=P;break}B=B.sibling}if(!M)throw Error(r(189))}}if(m.alternate!==x)throw Error(r(190))}if(m.tag!==3)throw Error(r(188));return m.stateNode.current===m?s:u}function mA(s){return s=Fz(s),s!==null?gA(s):null}function gA(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var u=gA(s);if(u!==null)return u;s=s.sibling}return null}var vA=t.unstable_scheduleCallback,yA=t.unstable_cancelCallback,zz=t.unstable_shouldYield,Vz=t.unstable_requestPaint,Dt=t.unstable_now,Uz=t.unstable_getCurrentPriorityLevel,Lg=t.unstable_ImmediatePriority,xA=t.unstable_UserBlockingPriority,nd=t.unstable_NormalPriority,qz=t.unstable_LowPriority,bA=t.unstable_IdlePriority,id=null,Un=null;function Wz(s){if(Un&&typeof Un.onCommitFiberRoot=="function")try{Un.onCommitFiberRoot(id,s,void 0,(s.current.flags&128)===128)}catch{}}var vn=Math.clz32?Math.clz32:Kz,Hz=Math.log,Gz=Math.LN2;function Kz(s){return s>>>=0,s===0?32:31-(Hz(s)/Gz|0)|0}var ad=64,od=4194304;function sc(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function sd(s,u){var m=s.pendingLanes;if(m===0)return 0;var x=0,P=s.suspendedLanes,E=s.pingedLanes,M=m&268435455;if(M!==0){var B=M&~P;B!==0?x=sc(B):(E&=M,E!==0&&(x=sc(E)))}else M=m&~P,M!==0?x=sc(M):E!==0&&(x=sc(E));if(x===0)return 0;if(u!==0&&u!==x&&(u&P)===0&&(P=x&-x,E=u&-u,P>=E||P===16&&(E&4194240)!==0))return u;if((x&4)!==0&&(x|=m&16),u=s.entangledLanes,u!==0)for(s=s.entanglements,u&=x;0<u;)m=31-vn(u),P=1<<m,x|=s[m],u&=~P;return x}function Yz(s,u){switch(s){case 1:case 2:case 4:return u+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Xz(s,u){for(var m=s.suspendedLanes,x=s.pingedLanes,P=s.expirationTimes,E=s.pendingLanes;0<E;){var M=31-vn(E),B=1<<M,W=P[M];W===-1?((B&m)===0||(B&x)!==0)&&(P[M]=Yz(B,u)):W<=u&&(s.expiredLanes|=B),E&=~B}}function Bg(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function wA(){var s=ad;return ad<<=1,(ad&4194240)===0&&(ad=64),s}function Fg(s){for(var u=[],m=0;31>m;m++)u.push(s);return u}function lc(s,u,m){s.pendingLanes|=u,u!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,u=31-vn(u),s[u]=m}function Zz(s,u){var m=s.pendingLanes&~u;s.pendingLanes=u,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=u,s.mutableReadLanes&=u,s.entangledLanes&=u,u=s.entanglements;var x=s.eventTimes;for(s=s.expirationTimes;0<m;){var P=31-vn(m),E=1<<P;u[P]=0,x[P]=-1,s[P]=-1,m&=~E}}function zg(s,u){var m=s.entangledLanes|=u;for(s=s.entanglements;m;){var x=31-vn(m),P=1<<x;P&u|s[x]&u&&(s[x]|=u),m&=~P}}var ut=0;function SA(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var jA,Vg,_A,PA,AA,Ug=!1,ld=[],Ji=null,ea=null,ta=null,cc=new Map,uc=new Map,ra=[],Qz="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 submit".split(" ");function NA(s,u){switch(s){case"focusin":case"focusout":Ji=null;break;case"dragenter":case"dragleave":ea=null;break;case"mouseover":case"mouseout":ta=null;break;case"pointerover":case"pointerout":cc.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":uc.delete(u.pointerId)}}function fc(s,u,m,x,P,E){return s===null||s.nativeEvent!==E?(s={blockedOn:u,domEventName:m,eventSystemFlags:x,nativeEvent:E,targetContainers:[P]},u!==null&&(u=Pc(u),u!==null&&Vg(u)),s):(s.eventSystemFlags|=x,u=s.targetContainers,P!==null&&u.indexOf(P)===-1&&u.push(P),s)}function Jz(s,u,m,x,P){switch(u){case"focusin":return Ji=fc(Ji,s,u,m,x,P),!0;case"dragenter":return ea=fc(ea,s,u,m,x,P),!0;case"mouseover":return ta=fc(ta,s,u,m,x,P),!0;case"pointerover":var E=P.pointerId;return cc.set(E,fc(cc.get(E)||null,s,u,m,x,P)),!0;case"gotpointercapture":return E=P.pointerId,uc.set(E,fc(uc.get(E)||null,s,u,m,x,P)),!0}return!1}function EA(s){var u=Xa(s.target);if(u!==null){var m=Ya(u);if(m!==null){if(u=m.tag,u===13){if(u=hA(m),u!==null){s.blockedOn=u,AA(s.priority,function(){_A(m)});return}}else if(u===3&&m.stateNode.current.memoizedState.isDehydrated){s.blockedOn=m.tag===3?m.stateNode.containerInfo:null;return}}}s.blockedOn=null}function cd(s){if(s.blockedOn!==null)return!1;for(var u=s.targetContainers;0<u.length;){var m=Wg(s.domEventName,s.eventSystemFlags,u[0],s.nativeEvent);if(m===null){m=s.nativeEvent;var x=new m.constructor(m.type,m);Jl=x,m.target.dispatchEvent(x),Jl=null}else return u=Pc(m),u!==null&&Vg(u),s.blockedOn=m,!1;u.shift()}return!0}function OA(s,u,m){cd(s)&&m.delete(u)}function eV(){Ug=!1,Ji!==null&&cd(Ji)&&(Ji=null),ea!==null&&cd(ea)&&(ea=null),ta!==null&&cd(ta)&&(ta=null),cc.forEach(OA),uc.forEach(OA)}function dc(s,u){s.blockedOn===u&&(s.blockedOn=null,Ug||(Ug=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,eV)))}function hc(s){function u(P){return dc(P,s)}if(0<ld.length){dc(ld[0],s);for(var m=1;m<ld.length;m++){var x=ld[m];x.blockedOn===s&&(x.blockedOn=null)}}for(Ji!==null&&dc(Ji,s),ea!==null&&dc(ea,s),ta!==null&&dc(ta,s),cc.forEach(u),uc.forEach(u),m=0;m<ra.length;m++)x=ra[m],x.blockedOn===s&&(x.blockedOn=null);for(;0<ra.length&&(m=ra[0],m.blockedOn===null);)EA(m),m.blockedOn===null&&ra.shift()}var ns=C.ReactCurrentBatchConfig,ud=!0;function tV(s,u,m,x){var P=ut,E=ns.transition;ns.transition=null;try{ut=1,qg(s,u,m,x)}finally{ut=P,ns.transition=E}}function rV(s,u,m,x){var P=ut,E=ns.transition;ns.transition=null;try{ut=4,qg(s,u,m,x)}finally{ut=P,ns.transition=E}}function qg(s,u,m,x){if(ud){var P=Wg(s,u,m,x);if(P===null)lv(s,u,x,fd,m),NA(s,x);else if(Jz(P,s,u,m,x))x.stopPropagation();else if(NA(s,x),u&4&&-1<Qz.indexOf(s)){for(;P!==null;){var E=Pc(P);if(E!==null&&jA(E),E=Wg(s,u,m,x),E===null&&lv(s,u,x,fd,m),E===P)break;P=E}P!==null&&x.stopPropagation()}else lv(s,u,x,null,m)}}var fd=null;function Wg(s,u,m,x){if(fd=null,s=rs(x),s=Xa(s),s!==null)if(u=Ya(s),u===null)s=null;else if(m=u.tag,m===13){if(s=hA(u),s!==null)return s;s=null}else if(m===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;s=null}else u!==s&&(s=null);return fd=s,null}function CA(s){switch(s){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Uz()){case Lg:return 1;case xA:return 4;case nd:case qz:return 16;case bA:return 536870912;default:return 16}default:return 16}}var na=null,Hg=null,dd=null;function TA(){if(dd)return dd;var s,u=Hg,m=u.length,x,P="value"in na?na.value:na.textContent,E=P.length;for(s=0;s<m&&u[s]===P[s];s++);var M=m-s;for(x=1;x<=M&&u[m-x]===P[E-x];x++);return dd=P.slice(s,1<x?1-x:void 0)}function hd(s){var u=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&u===13&&(s=13)):s=u,s===10&&(s=13),32<=s||s===13?s:0}function pd(){return!0}function kA(){return!1}function Lr(s){function u(m,x,P,E,M){this._reactName=m,this._targetInst=P,this.type=x,this.nativeEvent=E,this.target=M,this.currentTarget=null;for(var B in s)s.hasOwnProperty(B)&&(m=s[B],this[B]=m?m(E):E[B]);return this.isDefaultPrevented=(E.defaultPrevented!=null?E.defaultPrevented:E.returnValue===!1)?pd:kA,this.isPropagationStopped=kA,this}return Q(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var m=this.nativeEvent;m&&(m.preventDefault?m.preventDefault():typeof m.returnValue!="unknown"&&(m.returnValue=!1),this.isDefaultPrevented=pd)},stopPropagation:function(){var m=this.nativeEvent;m&&(m.stopPropagation?m.stopPropagation():typeof m.cancelBubble!="unknown"&&(m.cancelBubble=!0),this.isPropagationStopped=pd)},persist:function(){},isPersistent:pd}),u}var is={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gg=Lr(is),pc=Q({},is,{view:0,detail:0}),nV=Lr(pc),Kg,Yg,mc,md=Q({},pc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zg,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==mc&&(mc&&s.type==="mousemove"?(Kg=s.screenX-mc.screenX,Yg=s.screenY-mc.screenY):Yg=Kg=0,mc=s),Kg)},movementY:function(s){return"movementY"in s?s.movementY:Yg}}),MA=Lr(md),iV=Q({},md,{dataTransfer:0}),aV=Lr(iV),oV=Q({},pc,{relatedTarget:0}),Xg=Lr(oV),sV=Q({},is,{animationName:0,elapsedTime:0,pseudoElement:0}),lV=Lr(sV),cV=Q({},is,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),uV=Lr(cV),fV=Q({},is,{data:0}),RA=Lr(fV),dV={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hV={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"},pV={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mV(s){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(s):(s=pV[s])?!!u[s]:!1}function Zg(){return mV}var gV=Q({},pc,{key:function(s){if(s.key){var u=dV[s.key]||s.key;if(u!=="Unidentified")return u}return s.type==="keypress"?(s=hd(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?hV[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zg,charCode:function(s){return s.type==="keypress"?hd(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?hd(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),vV=Lr(gV),yV=Q({},md,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),IA=Lr(yV),xV=Q({},pc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zg}),bV=Lr(xV),wV=Q({},is,{propertyName:0,elapsedTime:0,pseudoElement:0}),SV=Lr(wV),jV=Q({},md,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),_V=Lr(jV),PV=[9,13,27,32],Qg=l&&"CompositionEvent"in window,gc=null;l&&"documentMode"in document&&(gc=document.documentMode);var AV=l&&"TextEvent"in window&&!gc,DA=l&&(!Qg||gc&&8<gc&&11>=gc),$A=" ",LA=!1;function BA(s,u){switch(s){case"keyup":return PV.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function FA(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var as=!1;function NV(s,u){switch(s){case"compositionend":return FA(u);case"keypress":return u.which!==32?null:(LA=!0,$A);case"textInput":return s=u.data,s===$A&&LA?null:s;default:return null}}function EV(s,u){if(as)return s==="compositionend"||!Qg&&BA(s,u)?(s=TA(),dd=Hg=na=null,as=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return DA&&u.locale!=="ko"?null:u.data;default:return null}}var OV={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 zA(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u==="input"?!!OV[s.type]:u==="textarea"}function VA(s,u,m,x){Jf(x),u=bd(u,"onChange"),0<u.length&&(m=new Gg("onChange","change",null,m,x),s.push({event:m,listeners:u}))}var vc=null,yc=null;function CV(s){oN(s,0)}function gd(s){var u=us(s);if(Z(u))return s}function TV(s,u){if(s==="change")return u}var UA=!1;if(l){var Jg;if(l){var ev="oninput"in document;if(!ev){var qA=document.createElement("div");qA.setAttribute("oninput","return;"),ev=typeof qA.oninput=="function"}Jg=ev}else Jg=!1;UA=Jg&&(!document.documentMode||9<document.documentMode)}function WA(){vc&&(vc.detachEvent("onpropertychange",HA),yc=vc=null)}function HA(s){if(s.propertyName==="value"&&gd(yc)){var u=[];VA(u,yc,s,rs(s)),dA(CV,u)}}function kV(s,u,m){s==="focusin"?(WA(),vc=u,yc=m,vc.attachEvent("onpropertychange",HA)):s==="focusout"&&WA()}function MV(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return gd(yc)}function RV(s,u){if(s==="click")return gd(u)}function IV(s,u){if(s==="input"||s==="change")return gd(u)}function DV(s,u){return s===u&&(s!==0||1/s===1/u)||s!==s&&u!==u}var yn=typeof Object.is=="function"?Object.is:DV;function xc(s,u){if(yn(s,u))return!0;if(typeof s!="object"||s===null||typeof u!="object"||u===null)return!1;var m=Object.keys(s),x=Object.keys(u);if(m.length!==x.length)return!1;for(x=0;x<m.length;x++){var P=m[x];if(!c.call(u,P)||!yn(s[P],u[P]))return!1}return!0}function GA(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function KA(s,u){var m=GA(s);s=0;for(var x;m;){if(m.nodeType===3){if(x=s+m.textContent.length,s<=u&&x>=u)return{node:m,offset:u-s};s=x}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=GA(m)}}function YA(s,u){return s&&u?s===u?!0:s&&s.nodeType===3?!1:u&&u.nodeType===3?YA(s,u.parentNode):"contains"in s?s.contains(u):s.compareDocumentPosition?!!(s.compareDocumentPosition(u)&16):!1:!1}function XA(){for(var s=window,u=Se();u instanceof s.HTMLIFrameElement;){try{var m=typeof u.contentWindow.location.href=="string"}catch{m=!1}if(m)s=u.contentWindow;else break;u=Se(s.document)}return u}function tv(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u&&(u==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||u==="textarea"||s.contentEditable==="true")}function $V(s){var u=XA(),m=s.focusedElem,x=s.selectionRange;if(u!==m&&m&&m.ownerDocument&&YA(m.ownerDocument.documentElement,m)){if(x!==null&&tv(m)){if(u=x.start,s=x.end,s===void 0&&(s=u),"selectionStart"in m)m.selectionStart=u,m.selectionEnd=Math.min(s,m.value.length);else if(s=(u=m.ownerDocument||document)&&u.defaultView||window,s.getSelection){s=s.getSelection();var P=m.textContent.length,E=Math.min(x.start,P);x=x.end===void 0?E:Math.min(x.end,P),!s.extend&&E>x&&(P=x,x=E,E=P),P=KA(m,E);var M=KA(m,x);P&&M&&(s.rangeCount!==1||s.anchorNode!==P.node||s.anchorOffset!==P.offset||s.focusNode!==M.node||s.focusOffset!==M.offset)&&(u=u.createRange(),u.setStart(P.node,P.offset),s.removeAllRanges(),E>x?(s.addRange(u),s.extend(M.node,M.offset)):(u.setEnd(M.node,M.offset),s.addRange(u)))}}for(u=[],s=m;s=s.parentNode;)s.nodeType===1&&u.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<u.length;m++)s=u[m],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var LV=l&&"documentMode"in document&&11>=document.documentMode,os=null,rv=null,bc=null,nv=!1;function ZA(s,u,m){var x=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;nv||os==null||os!==Se(x)||(x=os,"selectionStart"in x&&tv(x)?x={start:x.selectionStart,end:x.selectionEnd}:(x=(x.ownerDocument&&x.ownerDocument.defaultView||window).getSelection(),x={anchorNode:x.anchorNode,anchorOffset:x.anchorOffset,focusNode:x.focusNode,focusOffset:x.focusOffset}),bc&&xc(bc,x)||(bc=x,x=bd(rv,"onSelect"),0<x.length&&(u=new Gg("onSelect","select",null,u,m),s.push({event:u,listeners:x}),u.target=os)))}function vd(s,u){var m={};return m[s.toLowerCase()]=u.toLowerCase(),m["Webkit"+s]="webkit"+u,m["Moz"+s]="moz"+u,m}var ss={animationend:vd("Animation","AnimationEnd"),animationiteration:vd("Animation","AnimationIteration"),animationstart:vd("Animation","AnimationStart"),transitionend:vd("Transition","TransitionEnd")},iv={},QA={};l&&(QA=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 yd(s){if(iv[s])return iv[s];if(!ss[s])return s;var u=ss[s],m;for(m in u)if(u.hasOwnProperty(m)&&m in QA)return iv[s]=u[m];return s}var JA=yd("animationend"),eN=yd("animationiteration"),tN=yd("animationstart"),rN=yd("transitionend"),nN=new Map,iN="abort auxClick 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(" ");function ia(s,u){nN.set(s,u),a(u,[s])}for(var av=0;av<iN.length;av++){var ov=iN[av],BV=ov.toLowerCase(),FV=ov[0].toUpperCase()+ov.slice(1);ia(BV,"on"+FV)}ia(JA,"onAnimationEnd"),ia(eN,"onAnimationIteration"),ia(tN,"onAnimationStart"),ia("dblclick","onDoubleClick"),ia("focusin","onFocus"),ia("focusout","onBlur"),ia(rN,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wc="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(" "),zV=new Set("cancel close invalid load scroll toggle".split(" ").concat(wc));function aN(s,u,m){var x=s.type||"unknown-event";s.currentTarget=m,Bz(x,u,void 0,s),s.currentTarget=null}function oN(s,u){u=(u&4)!==0;for(var m=0;m<s.length;m++){var x=s[m],P=x.event;x=x.listeners;e:{var E=void 0;if(u)for(var M=x.length-1;0<=M;M--){var B=x[M],W=B.instance,te=B.currentTarget;if(B=B.listener,W!==E&&P.isPropagationStopped())break e;aN(P,B,te),E=W}else for(M=0;M<x.length;M++){if(B=x[M],W=B.instance,te=B.currentTarget,B=B.listener,W!==E&&P.isPropagationStopped())break e;aN(P,B,te),E=W}}}if(rd)throw s=$g,rd=!1,$g=null,s}function xt(s,u){var m=u[pv];m===void 0&&(m=u[pv]=new Set);var x=s+"__bubble";m.has(x)||(sN(u,s,2,!1),m.add(x))}function sv(s,u,m){var x=0;u&&(x|=4),sN(m,s,x,u)}var xd="_reactListening"+Math.random().toString(36).slice(2);function Sc(s){if(!s[xd]){s[xd]=!0,n.forEach(function(m){m!=="selectionchange"&&(zV.has(m)||sv(m,!1,s),sv(m,!0,s))});var u=s.nodeType===9?s:s.ownerDocument;u===null||u[xd]||(u[xd]=!0,sv("selectionchange",!1,u))}}function sN(s,u,m,x){switch(CA(u)){case 1:var P=tV;break;case 4:P=rV;break;default:P=qg}m=P.bind(null,u,m,s),P=void 0,!Dg||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(P=!0),x?P!==void 0?s.addEventListener(u,m,{capture:!0,passive:P}):s.addEventListener(u,m,!0):P!==void 0?s.addEventListener(u,m,{passive:P}):s.addEventListener(u,m,!1)}function lv(s,u,m,x,P){var E=x;if((u&1)===0&&(u&2)===0&&x!==null)e:for(;;){if(x===null)return;var M=x.tag;if(M===3||M===4){var B=x.stateNode.containerInfo;if(B===P||B.nodeType===8&&B.parentNode===P)break;if(M===4)for(M=x.return;M!==null;){var W=M.tag;if((W===3||W===4)&&(W=M.stateNode.containerInfo,W===P||W.nodeType===8&&W.parentNode===P))return;M=M.return}for(;B!==null;){if(M=Xa(B),M===null)return;if(W=M.tag,W===5||W===6){x=E=M;continue e}B=B.parentNode}}x=x.return}dA(function(){var te=E,fe=rs(m),de=[];e:{var ue=nN.get(s);if(ue!==void 0){var je=Gg,Ne=s;switch(s){case"keypress":if(hd(m)===0)break e;case"keydown":case"keyup":je=vV;break;case"focusin":Ne="focus",je=Xg;break;case"focusout":Ne="blur",je=Xg;break;case"beforeblur":case"afterblur":je=Xg;break;case"click":if(m.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":je=MA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":je=aV;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":je=bV;break;case JA:case eN:case tN:je=lV;break;case rN:je=SV;break;case"scroll":je=nV;break;case"wheel":je=_V;break;case"copy":case"cut":case"paste":je=uV;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":je=IA}var Te=(u&4)!==0,$t=!Te&&s==="scroll",J=Te?ue!==null?ue+"Capture":null:ue;Te=[];for(var X=te,ee;X!==null;){ee=X;var me=ee.stateNode;if(ee.tag===5&&me!==null&&(ee=me,J!==null&&(me=ic(X,J),me!=null&&Te.push(jc(X,me,ee)))),$t)break;X=X.return}0<Te.length&&(ue=new je(ue,Ne,null,m,fe),de.push({event:ue,listeners:Te}))}}if((u&7)===0){e:{if(ue=s==="mouseover"||s==="pointerover",je=s==="mouseout"||s==="pointerout",ue&&m!==Jl&&(Ne=m.relatedTarget||m.fromElement)&&(Xa(Ne)||Ne[pi]))break e;if((je||ue)&&(ue=fe.window===fe?fe:(ue=fe.ownerDocument)?ue.defaultView||ue.parentWindow:window,je?(Ne=m.relatedTarget||m.toElement,je=te,Ne=Ne?Xa(Ne):null,Ne!==null&&($t=Ya(Ne),Ne!==$t||Ne.tag!==5&&Ne.tag!==6)&&(Ne=null)):(je=null,Ne=te),je!==Ne)){if(Te=MA,me="onMouseLeave",J="onMouseEnter",X="mouse",(s==="pointerout"||s==="pointerover")&&(Te=IA,me="onPointerLeave",J="onPointerEnter",X="pointer"),$t=je==null?ue:us(je),ee=Ne==null?ue:us(Ne),ue=new Te(me,X+"leave",je,m,fe),ue.target=$t,ue.relatedTarget=ee,me=null,Xa(fe)===te&&(Te=new Te(J,X+"enter",Ne,m,fe),Te.target=ee,Te.relatedTarget=$t,me=Te),$t=me,je&&Ne)t:{for(Te=je,J=Ne,X=0,ee=Te;ee;ee=ls(ee))X++;for(ee=0,me=J;me;me=ls(me))ee++;for(;0<X-ee;)Te=ls(Te),X--;for(;0<ee-X;)J=ls(J),ee--;for(;X--;){if(Te===J||J!==null&&Te===J.alternate)break t;Te=ls(Te),J=ls(J)}Te=null}else Te=null;je!==null&&lN(de,ue,je,Te,!1),Ne!==null&&$t!==null&&lN(de,$t,Ne,Te,!0)}}e:{if(ue=te?us(te):window,je=ue.nodeName&&ue.nodeName.toLowerCase(),je==="select"||je==="input"&&ue.type==="file")var ke=TV;else if(zA(ue))if(UA)ke=IV;else{ke=MV;var Re=kV}else(je=ue.nodeName)&&je.toLowerCase()==="input"&&(ue.type==="checkbox"||ue.type==="radio")&&(ke=RV);if(ke&&(ke=ke(s,te))){VA(de,ke,m,fe);break e}Re&&Re(s,ue,te),s==="focusout"&&(Re=ue._wrapperState)&&Re.controlled&&ue.type==="number"&&xe(ue,"number",ue.value)}switch(Re=te?us(te):window,s){case"focusin":(zA(Re)||Re.contentEditable==="true")&&(os=Re,rv=te,bc=null);break;case"focusout":bc=rv=os=null;break;case"mousedown":nv=!0;break;case"contextmenu":case"mouseup":case"dragend":nv=!1,ZA(de,m,fe);break;case"selectionchange":if(LV)break;case"keydown":case"keyup":ZA(de,m,fe)}var Ie;if(Qg)e:{switch(s){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else as?BA(s,m)&&(Ve="onCompositionEnd"):s==="keydown"&&m.keyCode===229&&(Ve="onCompositionStart");Ve&&(DA&&m.locale!=="ko"&&(as||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&as&&(Ie=TA()):(na=fe,Hg="value"in na?na.value:na.textContent,as=!0)),Re=bd(te,Ve),0<Re.length&&(Ve=new RA(Ve,s,null,m,fe),de.push({event:Ve,listeners:Re}),Ie?Ve.data=Ie:(Ie=FA(m),Ie!==null&&(Ve.data=Ie)))),(Ie=AV?NV(s,m):EV(s,m))&&(te=bd(te,"onBeforeInput"),0<te.length&&(fe=new RA("onBeforeInput","beforeinput",null,m,fe),de.push({event:fe,listeners:te}),fe.data=Ie))}oN(de,u)})}function jc(s,u,m){return{instance:s,listener:u,currentTarget:m}}function bd(s,u){for(var m=u+"Capture",x=[];s!==null;){var P=s,E=P.stateNode;P.tag===5&&E!==null&&(P=E,E=ic(s,m),E!=null&&x.unshift(jc(s,E,P)),E=ic(s,u),E!=null&&x.push(jc(s,E,P))),s=s.return}return x}function ls(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function lN(s,u,m,x,P){for(var E=u._reactName,M=[];m!==null&&m!==x;){var B=m,W=B.alternate,te=B.stateNode;if(W!==null&&W===x)break;B.tag===5&&te!==null&&(B=te,P?(W=ic(m,E),W!=null&&M.unshift(jc(m,W,B))):P||(W=ic(m,E),W!=null&&M.push(jc(m,W,B)))),m=m.return}M.length!==0&&s.push({event:u,listeners:M})}var VV=/\r\n?/g,UV=/\u0000|\uFFFD/g;function cN(s){return(typeof s=="string"?s:""+s).replace(VV,`
|
||
`).replace(UV,"")}function wd(s,u,m){if(u=cN(u),cN(s)!==u&&m)throw Error(r(425))}function Sd(){}var cv=null,uv=null;function fv(s,u){return s==="textarea"||s==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var dv=typeof setTimeout=="function"?setTimeout:void 0,qV=typeof clearTimeout=="function"?clearTimeout:void 0,uN=typeof Promise=="function"?Promise:void 0,WV=typeof queueMicrotask=="function"?queueMicrotask:typeof uN<"u"?function(s){return uN.resolve(null).then(s).catch(HV)}:dv;function HV(s){setTimeout(function(){throw s})}function hv(s,u){var m=u,x=0;do{var P=m.nextSibling;if(s.removeChild(m),P&&P.nodeType===8)if(m=P.data,m==="/$"){if(x===0){s.removeChild(P),hc(u);return}x--}else m!=="$"&&m!=="$?"&&m!=="$!"||x++;m=P}while(m);hc(u)}function aa(s){for(;s!=null;s=s.nextSibling){var u=s.nodeType;if(u===1||u===3)break;if(u===8){if(u=s.data,u==="$"||u==="$!"||u==="$?")break;if(u==="/$")return null}}return s}function fN(s){s=s.previousSibling;for(var u=0;s;){if(s.nodeType===8){var m=s.data;if(m==="$"||m==="$!"||m==="$?"){if(u===0)return s;u--}else m==="/$"&&u++}s=s.previousSibling}return null}var cs=Math.random().toString(36).slice(2),qn="__reactFiber$"+cs,_c="__reactProps$"+cs,pi="__reactContainer$"+cs,pv="__reactEvents$"+cs,GV="__reactListeners$"+cs,KV="__reactHandles$"+cs;function Xa(s){var u=s[qn];if(u)return u;for(var m=s.parentNode;m;){if(u=m[pi]||m[qn]){if(m=u.alternate,u.child!==null||m!==null&&m.child!==null)for(s=fN(s);s!==null;){if(m=s[qn])return m;s=fN(s)}return u}s=m,m=s.parentNode}return null}function Pc(s){return s=s[qn]||s[pi],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function us(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(r(33))}function jd(s){return s[_c]||null}var mv=[],fs=-1;function oa(s){return{current:s}}function bt(s){0>fs||(s.current=mv[fs],mv[fs]=null,fs--)}function mt(s,u){fs++,mv[fs]=s.current,s.current=u}var sa={},sr=oa(sa),Nr=oa(!1),Za=sa;function ds(s,u){var m=s.type.contextTypes;if(!m)return sa;var x=s.stateNode;if(x&&x.__reactInternalMemoizedUnmaskedChildContext===u)return x.__reactInternalMemoizedMaskedChildContext;var P={},E;for(E in m)P[E]=u[E];return x&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=u,s.__reactInternalMemoizedMaskedChildContext=P),P}function Er(s){return s=s.childContextTypes,s!=null}function _d(){bt(Nr),bt(sr)}function dN(s,u,m){if(sr.current!==sa)throw Error(r(168));mt(sr,u),mt(Nr,m)}function hN(s,u,m){var x=s.stateNode;if(u=u.childContextTypes,typeof x.getChildContext!="function")return m;x=x.getChildContext();for(var P in x)if(!(P in u))throw Error(r(108,ae(s)||"Unknown",P));return Q({},m,x)}function Pd(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||sa,Za=sr.current,mt(sr,s),mt(Nr,Nr.current),!0}function pN(s,u,m){var x=s.stateNode;if(!x)throw Error(r(169));m?(s=hN(s,u,Za),x.__reactInternalMemoizedMergedChildContext=s,bt(Nr),bt(sr),mt(sr,s)):bt(Nr),mt(Nr,m)}var mi=null,Ad=!1,gv=!1;function mN(s){mi===null?mi=[s]:mi.push(s)}function YV(s){Ad=!0,mN(s)}function la(){if(!gv&&mi!==null){gv=!0;var s=0,u=ut;try{var m=mi;for(ut=1;s<m.length;s++){var x=m[s];do x=x(!0);while(x!==null)}mi=null,Ad=!1}catch(P){throw mi!==null&&(mi=mi.slice(s+1)),vA(Lg,la),P}finally{ut=u,gv=!1}}return null}var hs=[],ps=0,Nd=null,Ed=0,Yr=[],Xr=0,Qa=null,gi=1,vi="";function Ja(s,u){hs[ps++]=Ed,hs[ps++]=Nd,Nd=s,Ed=u}function gN(s,u,m){Yr[Xr++]=gi,Yr[Xr++]=vi,Yr[Xr++]=Qa,Qa=s;var x=gi;s=vi;var P=32-vn(x)-1;x&=~(1<<P),m+=1;var E=32-vn(u)+P;if(30<E){var M=P-P%5;E=(x&(1<<M)-1).toString(32),x>>=M,P-=M,gi=1<<32-vn(u)+P|m<<P|x,vi=E+s}else gi=1<<E|m<<P|x,vi=s}function vv(s){s.return!==null&&(Ja(s,1),gN(s,1,0))}function yv(s){for(;s===Nd;)Nd=hs[--ps],hs[ps]=null,Ed=hs[--ps],hs[ps]=null;for(;s===Qa;)Qa=Yr[--Xr],Yr[Xr]=null,vi=Yr[--Xr],Yr[Xr]=null,gi=Yr[--Xr],Yr[Xr]=null}var Br=null,Fr=null,jt=!1,xn=null;function vN(s,u){var m=en(5,null,null,0);m.elementType="DELETED",m.stateNode=u,m.return=s,u=s.deletions,u===null?(s.deletions=[m],s.flags|=16):u.push(m)}function yN(s,u){switch(s.tag){case 5:var m=s.type;return u=u.nodeType!==1||m.toLowerCase()!==u.nodeName.toLowerCase()?null:u,u!==null?(s.stateNode=u,Br=s,Fr=aa(u.firstChild),!0):!1;case 6:return u=s.pendingProps===""||u.nodeType!==3?null:u,u!==null?(s.stateNode=u,Br=s,Fr=null,!0):!1;case 13:return u=u.nodeType!==8?null:u,u!==null?(m=Qa!==null?{id:gi,overflow:vi}:null,s.memoizedState={dehydrated:u,treeContext:m,retryLane:1073741824},m=en(18,null,null,0),m.stateNode=u,m.return=s,s.child=m,Br=s,Fr=null,!0):!1;default:return!1}}function xv(s){return(s.mode&1)!==0&&(s.flags&128)===0}function bv(s){if(jt){var u=Fr;if(u){var m=u;if(!yN(s,u)){if(xv(s))throw Error(r(418));u=aa(m.nextSibling);var x=Br;u&&yN(s,u)?vN(x,m):(s.flags=s.flags&-4097|2,jt=!1,Br=s)}}else{if(xv(s))throw Error(r(418));s.flags=s.flags&-4097|2,jt=!1,Br=s}}}function xN(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;Br=s}function Od(s){if(s!==Br)return!1;if(!jt)return xN(s),jt=!0,!1;var u;if((u=s.tag!==3)&&!(u=s.tag!==5)&&(u=s.type,u=u!=="head"&&u!=="body"&&!fv(s.type,s.memoizedProps)),u&&(u=Fr)){if(xv(s))throw bN(),Error(r(418));for(;u;)vN(s,u),u=aa(u.nextSibling)}if(xN(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));e:{for(s=s.nextSibling,u=0;s;){if(s.nodeType===8){var m=s.data;if(m==="/$"){if(u===0){Fr=aa(s.nextSibling);break e}u--}else m!=="$"&&m!=="$!"&&m!=="$?"||u++}s=s.nextSibling}Fr=null}}else Fr=Br?aa(s.stateNode.nextSibling):null;return!0}function bN(){for(var s=Fr;s;)s=aa(s.nextSibling)}function ms(){Fr=Br=null,jt=!1}function wv(s){xn===null?xn=[s]:xn.push(s)}var XV=C.ReactCurrentBatchConfig;function Ac(s,u,m){if(s=m.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(m._owner){if(m=m._owner,m){if(m.tag!==1)throw Error(r(309));var x=m.stateNode}if(!x)throw Error(r(147,s));var P=x,E=""+s;return u!==null&&u.ref!==null&&typeof u.ref=="function"&&u.ref._stringRef===E?u.ref:(u=function(M){var B=P.refs;M===null?delete B[E]:B[E]=M},u._stringRef=E,u)}if(typeof s!="string")throw Error(r(284));if(!m._owner)throw Error(r(290,s))}return s}function Cd(s,u){throw s=Object.prototype.toString.call(u),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":s))}function wN(s){var u=s._init;return u(s._payload)}function SN(s){function u(J,X){if(s){var ee=J.deletions;ee===null?(J.deletions=[X],J.flags|=16):ee.push(X)}}function m(J,X){if(!s)return null;for(;X!==null;)u(J,X),X=X.sibling;return null}function x(J,X){for(J=new Map;X!==null;)X.key!==null?J.set(X.key,X):J.set(X.index,X),X=X.sibling;return J}function P(J,X){return J=ga(J,X),J.index=0,J.sibling=null,J}function E(J,X,ee){return J.index=ee,s?(ee=J.alternate,ee!==null?(ee=ee.index,ee<X?(J.flags|=2,X):ee):(J.flags|=2,X)):(J.flags|=1048576,X)}function M(J){return s&&J.alternate===null&&(J.flags|=2),J}function B(J,X,ee,me){return X===null||X.tag!==6?(X=dy(ee,J.mode,me),X.return=J,X):(X=P(X,ee),X.return=J,X)}function W(J,X,ee,me){var ke=ee.type;return ke===T?fe(J,X,ee.props.children,me,ee.key):X!==null&&(X.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===z&&wN(ke)===X.type)?(me=P(X,ee.props),me.ref=Ac(J,X,ee),me.return=J,me):(me=eh(ee.type,ee.key,ee.props,null,J.mode,me),me.ref=Ac(J,X,ee),me.return=J,me)}function te(J,X,ee,me){return X===null||X.tag!==4||X.stateNode.containerInfo!==ee.containerInfo||X.stateNode.implementation!==ee.implementation?(X=hy(ee,J.mode,me),X.return=J,X):(X=P(X,ee.children||[]),X.return=J,X)}function fe(J,X,ee,me,ke){return X===null||X.tag!==7?(X=so(ee,J.mode,me,ke),X.return=J,X):(X=P(X,ee),X.return=J,X)}function de(J,X,ee){if(typeof X=="string"&&X!==""||typeof X=="number")return X=dy(""+X,J.mode,ee),X.return=J,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case N:return ee=eh(X.type,X.key,X.props,null,J.mode,ee),ee.ref=Ac(J,null,X),ee.return=J,ee;case O:return X=hy(X,J.mode,ee),X.return=J,X;case z:var me=X._init;return de(J,me(X._payload),ee)}if(Ke(X)||q(X))return X=so(X,J.mode,ee,null),X.return=J,X;Cd(J,X)}return null}function ue(J,X,ee,me){var ke=X!==null?X.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number")return ke!==null?null:B(J,X,""+ee,me);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case N:return ee.key===ke?W(J,X,ee,me):null;case O:return ee.key===ke?te(J,X,ee,me):null;case z:return ke=ee._init,ue(J,X,ke(ee._payload),me)}if(Ke(ee)||q(ee))return ke!==null?null:fe(J,X,ee,me,null);Cd(J,ee)}return null}function je(J,X,ee,me,ke){if(typeof me=="string"&&me!==""||typeof me=="number")return J=J.get(ee)||null,B(X,J,""+me,ke);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case N:return J=J.get(me.key===null?ee:me.key)||null,W(X,J,me,ke);case O:return J=J.get(me.key===null?ee:me.key)||null,te(X,J,me,ke);case z:var Re=me._init;return je(J,X,ee,Re(me._payload),ke)}if(Ke(me)||q(me))return J=J.get(ee)||null,fe(X,J,me,ke,null);Cd(X,me)}return null}function Ne(J,X,ee,me){for(var ke=null,Re=null,Ie=X,Ve=X=0,Jt=null;Ie!==null&&Ve<ee.length;Ve++){Ie.index>Ve?(Jt=Ie,Ie=null):Jt=Ie.sibling;var nt=ue(J,Ie,ee[Ve],me);if(nt===null){Ie===null&&(Ie=Jt);break}s&&Ie&&nt.alternate===null&&u(J,Ie),X=E(nt,X,Ve),Re===null?ke=nt:Re.sibling=nt,Re=nt,Ie=Jt}if(Ve===ee.length)return m(J,Ie),jt&&Ja(J,Ve),ke;if(Ie===null){for(;Ve<ee.length;Ve++)Ie=de(J,ee[Ve],me),Ie!==null&&(X=E(Ie,X,Ve),Re===null?ke=Ie:Re.sibling=Ie,Re=Ie);return jt&&Ja(J,Ve),ke}for(Ie=x(J,Ie);Ve<ee.length;Ve++)Jt=je(Ie,J,Ve,ee[Ve],me),Jt!==null&&(s&&Jt.alternate!==null&&Ie.delete(Jt.key===null?Ve:Jt.key),X=E(Jt,X,Ve),Re===null?ke=Jt:Re.sibling=Jt,Re=Jt);return s&&Ie.forEach(function(va){return u(J,va)}),jt&&Ja(J,Ve),ke}function Te(J,X,ee,me){var ke=q(ee);if(typeof ke!="function")throw Error(r(150));if(ee=ke.call(ee),ee==null)throw Error(r(151));for(var Re=ke=null,Ie=X,Ve=X=0,Jt=null,nt=ee.next();Ie!==null&&!nt.done;Ve++,nt=ee.next()){Ie.index>Ve?(Jt=Ie,Ie=null):Jt=Ie.sibling;var va=ue(J,Ie,nt.value,me);if(va===null){Ie===null&&(Ie=Jt);break}s&&Ie&&va.alternate===null&&u(J,Ie),X=E(va,X,Ve),Re===null?ke=va:Re.sibling=va,Re=va,Ie=Jt}if(nt.done)return m(J,Ie),jt&&Ja(J,Ve),ke;if(Ie===null){for(;!nt.done;Ve++,nt=ee.next())nt=de(J,nt.value,me),nt!==null&&(X=E(nt,X,Ve),Re===null?ke=nt:Re.sibling=nt,Re=nt);return jt&&Ja(J,Ve),ke}for(Ie=x(J,Ie);!nt.done;Ve++,nt=ee.next())nt=je(Ie,J,Ve,nt.value,me),nt!==null&&(s&&nt.alternate!==null&&Ie.delete(nt.key===null?Ve:nt.key),X=E(nt,X,Ve),Re===null?ke=nt:Re.sibling=nt,Re=nt);return s&&Ie.forEach(function(OU){return u(J,OU)}),jt&&Ja(J,Ve),ke}function $t(J,X,ee,me){if(typeof ee=="object"&&ee!==null&&ee.type===T&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case N:e:{for(var ke=ee.key,Re=X;Re!==null;){if(Re.key===ke){if(ke=ee.type,ke===T){if(Re.tag===7){m(J,Re.sibling),X=P(Re,ee.props.children),X.return=J,J=X;break e}}else if(Re.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===z&&wN(ke)===Re.type){m(J,Re.sibling),X=P(Re,ee.props),X.ref=Ac(J,Re,ee),X.return=J,J=X;break e}m(J,Re);break}else u(J,Re);Re=Re.sibling}ee.type===T?(X=so(ee.props.children,J.mode,me,ee.key),X.return=J,J=X):(me=eh(ee.type,ee.key,ee.props,null,J.mode,me),me.ref=Ac(J,X,ee),me.return=J,J=me)}return M(J);case O:e:{for(Re=ee.key;X!==null;){if(X.key===Re)if(X.tag===4&&X.stateNode.containerInfo===ee.containerInfo&&X.stateNode.implementation===ee.implementation){m(J,X.sibling),X=P(X,ee.children||[]),X.return=J,J=X;break e}else{m(J,X);break}else u(J,X);X=X.sibling}X=hy(ee,J.mode,me),X.return=J,J=X}return M(J);case z:return Re=ee._init,$t(J,X,Re(ee._payload),me)}if(Ke(ee))return Ne(J,X,ee,me);if(q(ee))return Te(J,X,ee,me);Cd(J,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"?(ee=""+ee,X!==null&&X.tag===6?(m(J,X.sibling),X=P(X,ee),X.return=J,J=X):(m(J,X),X=dy(ee,J.mode,me),X.return=J,J=X),M(J)):m(J,X)}return $t}var gs=SN(!0),jN=SN(!1),Td=oa(null),kd=null,vs=null,Sv=null;function jv(){Sv=vs=kd=null}function _v(s){var u=Td.current;bt(Td),s._currentValue=u}function Pv(s,u,m){for(;s!==null;){var x=s.alternate;if((s.childLanes&u)!==u?(s.childLanes|=u,x!==null&&(x.childLanes|=u)):x!==null&&(x.childLanes&u)!==u&&(x.childLanes|=u),s===m)break;s=s.return}}function ys(s,u){kd=s,Sv=vs=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&u)!==0&&(Or=!0),s.firstContext=null)}function Zr(s){var u=s._currentValue;if(Sv!==s)if(s={context:s,memoizedValue:u,next:null},vs===null){if(kd===null)throw Error(r(308));vs=s,kd.dependencies={lanes:0,firstContext:s}}else vs=vs.next=s;return u}var eo=null;function Av(s){eo===null?eo=[s]:eo.push(s)}function _N(s,u,m,x){var P=u.interleaved;return P===null?(m.next=m,Av(u)):(m.next=P.next,P.next=m),u.interleaved=m,yi(s,x)}function yi(s,u){s.lanes|=u;var m=s.alternate;for(m!==null&&(m.lanes|=u),m=s,s=s.return;s!==null;)s.childLanes|=u,m=s.alternate,m!==null&&(m.childLanes|=u),m=s,s=s.return;return m.tag===3?m.stateNode:null}var ca=!1;function Nv(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function PN(s,u){s=s.updateQueue,u.updateQueue===s&&(u.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function xi(s,u){return{eventTime:s,lane:u,tag:0,payload:null,callback:null,next:null}}function ua(s,u,m){var x=s.updateQueue;if(x===null)return null;if(x=x.shared,(rt&2)!==0){var P=x.pending;return P===null?u.next=u:(u.next=P.next,P.next=u),x.pending=u,yi(s,m)}return P=x.interleaved,P===null?(u.next=u,Av(x)):(u.next=P.next,P.next=u),x.interleaved=u,yi(s,m)}function Md(s,u,m){if(u=u.updateQueue,u!==null&&(u=u.shared,(m&4194240)!==0)){var x=u.lanes;x&=s.pendingLanes,m|=x,u.lanes=m,zg(s,m)}}function AN(s,u){var m=s.updateQueue,x=s.alternate;if(x!==null&&(x=x.updateQueue,m===x)){var P=null,E=null;if(m=m.firstBaseUpdate,m!==null){do{var M={eventTime:m.eventTime,lane:m.lane,tag:m.tag,payload:m.payload,callback:m.callback,next:null};E===null?P=E=M:E=E.next=M,m=m.next}while(m!==null);E===null?P=E=u:E=E.next=u}else P=E=u;m={baseState:x.baseState,firstBaseUpdate:P,lastBaseUpdate:E,shared:x.shared,effects:x.effects},s.updateQueue=m;return}s=m.lastBaseUpdate,s===null?m.firstBaseUpdate=u:s.next=u,m.lastBaseUpdate=u}function Rd(s,u,m,x){var P=s.updateQueue;ca=!1;var E=P.firstBaseUpdate,M=P.lastBaseUpdate,B=P.shared.pending;if(B!==null){P.shared.pending=null;var W=B,te=W.next;W.next=null,M===null?E=te:M.next=te,M=W;var fe=s.alternate;fe!==null&&(fe=fe.updateQueue,B=fe.lastBaseUpdate,B!==M&&(B===null?fe.firstBaseUpdate=te:B.next=te,fe.lastBaseUpdate=W))}if(E!==null){var de=P.baseState;M=0,fe=te=W=null,B=E;do{var ue=B.lane,je=B.eventTime;if((x&ue)===ue){fe!==null&&(fe=fe.next={eventTime:je,lane:0,tag:B.tag,payload:B.payload,callback:B.callback,next:null});e:{var Ne=s,Te=B;switch(ue=u,je=m,Te.tag){case 1:if(Ne=Te.payload,typeof Ne=="function"){de=Ne.call(je,de,ue);break e}de=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Te.payload,ue=typeof Ne=="function"?Ne.call(je,de,ue):Ne,ue==null)break e;de=Q({},de,ue);break e;case 2:ca=!0}}B.callback!==null&&B.lane!==0&&(s.flags|=64,ue=P.effects,ue===null?P.effects=[B]:ue.push(B))}else je={eventTime:je,lane:ue,tag:B.tag,payload:B.payload,callback:B.callback,next:null},fe===null?(te=fe=je,W=de):fe=fe.next=je,M|=ue;if(B=B.next,B===null){if(B=P.shared.pending,B===null)break;ue=B,B=ue.next,ue.next=null,P.lastBaseUpdate=ue,P.shared.pending=null}}while(!0);if(fe===null&&(W=de),P.baseState=W,P.firstBaseUpdate=te,P.lastBaseUpdate=fe,u=P.shared.interleaved,u!==null){P=u;do M|=P.lane,P=P.next;while(P!==u)}else E===null&&(P.shared.lanes=0);no|=M,s.lanes=M,s.memoizedState=de}}function NN(s,u,m){if(s=u.effects,u.effects=null,s!==null)for(u=0;u<s.length;u++){var x=s[u],P=x.callback;if(P!==null){if(x.callback=null,x=m,typeof P!="function")throw Error(r(191,P));P.call(x)}}}var Nc={},Wn=oa(Nc),Ec=oa(Nc),Oc=oa(Nc);function to(s){if(s===Nc)throw Error(r(174));return s}function Ev(s,u){switch(mt(Oc,u),mt(Ec,s),mt(Wn,Nc),s=u.nodeType,s){case 9:case 11:u=(u=u.documentElement)?u.namespaceURI:Jo(null,"");break;default:s=s===8?u.parentNode:u,u=s.namespaceURI||null,s=s.tagName,u=Jo(u,s)}bt(Wn),mt(Wn,u)}function xs(){bt(Wn),bt(Ec),bt(Oc)}function EN(s){to(Oc.current);var u=to(Wn.current),m=Jo(u,s.type);u!==m&&(mt(Ec,s),mt(Wn,m))}function Ov(s){Ec.current===s&&(bt(Wn),bt(Ec))}var Nt=oa(0);function Id(s){for(var u=s;u!==null;){if(u.tag===13){var m=u.memoizedState;if(m!==null&&(m=m.dehydrated,m===null||m.data==="$?"||m.data==="$!"))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var Cv=[];function Tv(){for(var s=0;s<Cv.length;s++)Cv[s]._workInProgressVersionPrimary=null;Cv.length=0}var Dd=C.ReactCurrentDispatcher,kv=C.ReactCurrentBatchConfig,ro=0,Et=null,Ut=null,Zt=null,$d=!1,Cc=!1,Tc=0,ZV=0;function lr(){throw Error(r(321))}function Mv(s,u){if(u===null)return!1;for(var m=0;m<u.length&&m<s.length;m++)if(!yn(s[m],u[m]))return!1;return!0}function Rv(s,u,m,x,P,E){if(ro=E,Et=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,Dd.current=s===null||s.memoizedState===null?tU:rU,s=m(x,P),Cc){E=0;do{if(Cc=!1,Tc=0,25<=E)throw Error(r(301));E+=1,Zt=Ut=null,u.updateQueue=null,Dd.current=nU,s=m(x,P)}while(Cc)}if(Dd.current=Fd,u=Ut!==null&&Ut.next!==null,ro=0,Zt=Ut=Et=null,$d=!1,u)throw Error(r(300));return s}function Iv(){var s=Tc!==0;return Tc=0,s}function Hn(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Zt===null?Et.memoizedState=Zt=s:Zt=Zt.next=s,Zt}function Qr(){if(Ut===null){var s=Et.alternate;s=s!==null?s.memoizedState:null}else s=Ut.next;var u=Zt===null?Et.memoizedState:Zt.next;if(u!==null)Zt=u,Ut=s;else{if(s===null)throw Error(r(310));Ut=s,s={memoizedState:Ut.memoizedState,baseState:Ut.baseState,baseQueue:Ut.baseQueue,queue:Ut.queue,next:null},Zt===null?Et.memoizedState=Zt=s:Zt=Zt.next=s}return Zt}function kc(s,u){return typeof u=="function"?u(s):u}function Dv(s){var u=Qr(),m=u.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=s;var x=Ut,P=x.baseQueue,E=m.pending;if(E!==null){if(P!==null){var M=P.next;P.next=E.next,E.next=M}x.baseQueue=P=E,m.pending=null}if(P!==null){E=P.next,x=x.baseState;var B=M=null,W=null,te=E;do{var fe=te.lane;if((ro&fe)===fe)W!==null&&(W=W.next={lane:0,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),x=te.hasEagerState?te.eagerState:s(x,te.action);else{var de={lane:fe,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null};W===null?(B=W=de,M=x):W=W.next=de,Et.lanes|=fe,no|=fe}te=te.next}while(te!==null&&te!==E);W===null?M=x:W.next=B,yn(x,u.memoizedState)||(Or=!0),u.memoizedState=x,u.baseState=M,u.baseQueue=W,m.lastRenderedState=x}if(s=m.interleaved,s!==null){P=s;do E=P.lane,Et.lanes|=E,no|=E,P=P.next;while(P!==s)}else P===null&&(m.lanes=0);return[u.memoizedState,m.dispatch]}function $v(s){var u=Qr(),m=u.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=s;var x=m.dispatch,P=m.pending,E=u.memoizedState;if(P!==null){m.pending=null;var M=P=P.next;do E=s(E,M.action),M=M.next;while(M!==P);yn(E,u.memoizedState)||(Or=!0),u.memoizedState=E,u.baseQueue===null&&(u.baseState=E),m.lastRenderedState=E}return[E,x]}function ON(){}function CN(s,u){var m=Et,x=Qr(),P=u(),E=!yn(x.memoizedState,P);if(E&&(x.memoizedState=P,Or=!0),x=x.queue,Lv(MN.bind(null,m,x,s),[s]),x.getSnapshot!==u||E||Zt!==null&&Zt.memoizedState.tag&1){if(m.flags|=2048,Mc(9,kN.bind(null,m,x,P,u),void 0,null),Qt===null)throw Error(r(349));(ro&30)!==0||TN(m,u,P)}return P}function TN(s,u,m){s.flags|=16384,s={getSnapshot:u,value:m},u=Et.updateQueue,u===null?(u={lastEffect:null,stores:null},Et.updateQueue=u,u.stores=[s]):(m=u.stores,m===null?u.stores=[s]:m.push(s))}function kN(s,u,m,x){u.value=m,u.getSnapshot=x,RN(u)&&IN(s)}function MN(s,u,m){return m(function(){RN(u)&&IN(s)})}function RN(s){var u=s.getSnapshot;s=s.value;try{var m=u();return!yn(s,m)}catch{return!0}}function IN(s){var u=yi(s,1);u!==null&&jn(u,s,1,-1)}function DN(s){var u=Hn();return typeof s=="function"&&(s=s()),u.memoizedState=u.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:kc,lastRenderedState:s},u.queue=s,s=s.dispatch=eU.bind(null,Et,s),[u.memoizedState,s]}function Mc(s,u,m,x){return s={tag:s,create:u,destroy:m,deps:x,next:null},u=Et.updateQueue,u===null?(u={lastEffect:null,stores:null},Et.updateQueue=u,u.lastEffect=s.next=s):(m=u.lastEffect,m===null?u.lastEffect=s.next=s:(x=m.next,m.next=s,s.next=x,u.lastEffect=s)),s}function $N(){return Qr().memoizedState}function Ld(s,u,m,x){var P=Hn();Et.flags|=s,P.memoizedState=Mc(1|u,m,void 0,x===void 0?null:x)}function Bd(s,u,m,x){var P=Qr();x=x===void 0?null:x;var E=void 0;if(Ut!==null){var M=Ut.memoizedState;if(E=M.destroy,x!==null&&Mv(x,M.deps)){P.memoizedState=Mc(u,m,E,x);return}}Et.flags|=s,P.memoizedState=Mc(1|u,m,E,x)}function LN(s,u){return Ld(8390656,8,s,u)}function Lv(s,u){return Bd(2048,8,s,u)}function BN(s,u){return Bd(4,2,s,u)}function FN(s,u){return Bd(4,4,s,u)}function zN(s,u){if(typeof u=="function")return s=s(),u(s),function(){u(null)};if(u!=null)return s=s(),u.current=s,function(){u.current=null}}function VN(s,u,m){return m=m!=null?m.concat([s]):null,Bd(4,4,zN.bind(null,u,s),m)}function Bv(){}function UN(s,u){var m=Qr();u=u===void 0?null:u;var x=m.memoizedState;return x!==null&&u!==null&&Mv(u,x[1])?x[0]:(m.memoizedState=[s,u],s)}function qN(s,u){var m=Qr();u=u===void 0?null:u;var x=m.memoizedState;return x!==null&&u!==null&&Mv(u,x[1])?x[0]:(s=s(),m.memoizedState=[s,u],s)}function WN(s,u,m){return(ro&21)===0?(s.baseState&&(s.baseState=!1,Or=!0),s.memoizedState=m):(yn(m,u)||(m=wA(),Et.lanes|=m,no|=m,s.baseState=!0),u)}function QV(s,u){var m=ut;ut=m!==0&&4>m?m:4,s(!0);var x=kv.transition;kv.transition={};try{s(!1),u()}finally{ut=m,kv.transition=x}}function HN(){return Qr().memoizedState}function JV(s,u,m){var x=pa(s);if(m={lane:x,action:m,hasEagerState:!1,eagerState:null,next:null},GN(s))KN(u,m);else if(m=_N(s,u,m,x),m!==null){var P=br();jn(m,s,x,P),YN(m,u,x)}}function eU(s,u,m){var x=pa(s),P={lane:x,action:m,hasEagerState:!1,eagerState:null,next:null};if(GN(s))KN(u,P);else{var E=s.alternate;if(s.lanes===0&&(E===null||E.lanes===0)&&(E=u.lastRenderedReducer,E!==null))try{var M=u.lastRenderedState,B=E(M,m);if(P.hasEagerState=!0,P.eagerState=B,yn(B,M)){var W=u.interleaved;W===null?(P.next=P,Av(u)):(P.next=W.next,W.next=P),u.interleaved=P;return}}catch{}finally{}m=_N(s,u,P,x),m!==null&&(P=br(),jn(m,s,x,P),YN(m,u,x))}}function GN(s){var u=s.alternate;return s===Et||u!==null&&u===Et}function KN(s,u){Cc=$d=!0;var m=s.pending;m===null?u.next=u:(u.next=m.next,m.next=u),s.pending=u}function YN(s,u,m){if((m&4194240)!==0){var x=u.lanes;x&=s.pendingLanes,m|=x,u.lanes=m,zg(s,m)}}var Fd={readContext:Zr,useCallback:lr,useContext:lr,useEffect:lr,useImperativeHandle:lr,useInsertionEffect:lr,useLayoutEffect:lr,useMemo:lr,useReducer:lr,useRef:lr,useState:lr,useDebugValue:lr,useDeferredValue:lr,useTransition:lr,useMutableSource:lr,useSyncExternalStore:lr,useId:lr,unstable_isNewReconciler:!1},tU={readContext:Zr,useCallback:function(s,u){return Hn().memoizedState=[s,u===void 0?null:u],s},useContext:Zr,useEffect:LN,useImperativeHandle:function(s,u,m){return m=m!=null?m.concat([s]):null,Ld(4194308,4,zN.bind(null,u,s),m)},useLayoutEffect:function(s,u){return Ld(4194308,4,s,u)},useInsertionEffect:function(s,u){return Ld(4,2,s,u)},useMemo:function(s,u){var m=Hn();return u=u===void 0?null:u,s=s(),m.memoizedState=[s,u],s},useReducer:function(s,u,m){var x=Hn();return u=m!==void 0?m(u):u,x.memoizedState=x.baseState=u,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:u},x.queue=s,s=s.dispatch=JV.bind(null,Et,s),[x.memoizedState,s]},useRef:function(s){var u=Hn();return s={current:s},u.memoizedState=s},useState:DN,useDebugValue:Bv,useDeferredValue:function(s){return Hn().memoizedState=s},useTransition:function(){var s=DN(!1),u=s[0];return s=QV.bind(null,s[1]),Hn().memoizedState=s,[u,s]},useMutableSource:function(){},useSyncExternalStore:function(s,u,m){var x=Et,P=Hn();if(jt){if(m===void 0)throw Error(r(407));m=m()}else{if(m=u(),Qt===null)throw Error(r(349));(ro&30)!==0||TN(x,u,m)}P.memoizedState=m;var E={value:m,getSnapshot:u};return P.queue=E,LN(MN.bind(null,x,E,s),[s]),x.flags|=2048,Mc(9,kN.bind(null,x,E,m,u),void 0,null),m},useId:function(){var s=Hn(),u=Qt.identifierPrefix;if(jt){var m=vi,x=gi;m=(x&~(1<<32-vn(x)-1)).toString(32)+m,u=":"+u+"R"+m,m=Tc++,0<m&&(u+="H"+m.toString(32)),u+=":"}else m=ZV++,u=":"+u+"r"+m.toString(32)+":";return s.memoizedState=u},unstable_isNewReconciler:!1},rU={readContext:Zr,useCallback:UN,useContext:Zr,useEffect:Lv,useImperativeHandle:VN,useInsertionEffect:BN,useLayoutEffect:FN,useMemo:qN,useReducer:Dv,useRef:$N,useState:function(){return Dv(kc)},useDebugValue:Bv,useDeferredValue:function(s){var u=Qr();return WN(u,Ut.memoizedState,s)},useTransition:function(){var s=Dv(kc)[0],u=Qr().memoizedState;return[s,u]},useMutableSource:ON,useSyncExternalStore:CN,useId:HN,unstable_isNewReconciler:!1},nU={readContext:Zr,useCallback:UN,useContext:Zr,useEffect:Lv,useImperativeHandle:VN,useInsertionEffect:BN,useLayoutEffect:FN,useMemo:qN,useReducer:$v,useRef:$N,useState:function(){return $v(kc)},useDebugValue:Bv,useDeferredValue:function(s){var u=Qr();return Ut===null?u.memoizedState=s:WN(u,Ut.memoizedState,s)},useTransition:function(){var s=$v(kc)[0],u=Qr().memoizedState;return[s,u]},useMutableSource:ON,useSyncExternalStore:CN,useId:HN,unstable_isNewReconciler:!1};function bn(s,u){if(s&&s.defaultProps){u=Q({},u),s=s.defaultProps;for(var m in s)u[m]===void 0&&(u[m]=s[m]);return u}return u}function Fv(s,u,m,x){u=s.memoizedState,m=m(x,u),m=m==null?u:Q({},u,m),s.memoizedState=m,s.lanes===0&&(s.updateQueue.baseState=m)}var zd={isMounted:function(s){return(s=s._reactInternals)?Ya(s)===s:!1},enqueueSetState:function(s,u,m){s=s._reactInternals;var x=br(),P=pa(s),E=xi(x,P);E.payload=u,m!=null&&(E.callback=m),u=ua(s,E,P),u!==null&&(jn(u,s,P,x),Md(u,s,P))},enqueueReplaceState:function(s,u,m){s=s._reactInternals;var x=br(),P=pa(s),E=xi(x,P);E.tag=1,E.payload=u,m!=null&&(E.callback=m),u=ua(s,E,P),u!==null&&(jn(u,s,P,x),Md(u,s,P))},enqueueForceUpdate:function(s,u){s=s._reactInternals;var m=br(),x=pa(s),P=xi(m,x);P.tag=2,u!=null&&(P.callback=u),u=ua(s,P,x),u!==null&&(jn(u,s,x,m),Md(u,s,x))}};function XN(s,u,m,x,P,E,M){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(x,E,M):u.prototype&&u.prototype.isPureReactComponent?!xc(m,x)||!xc(P,E):!0}function ZN(s,u,m){var x=!1,P=sa,E=u.contextType;return typeof E=="object"&&E!==null?E=Zr(E):(P=Er(u)?Za:sr.current,x=u.contextTypes,E=(x=x!=null)?ds(s,P):sa),u=new u(m,E),s.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=zd,s.stateNode=u,u._reactInternals=s,x&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=P,s.__reactInternalMemoizedMaskedChildContext=E),u}function QN(s,u,m,x){s=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(m,x),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(m,x),u.state!==s&&zd.enqueueReplaceState(u,u.state,null)}function zv(s,u,m,x){var P=s.stateNode;P.props=m,P.state=s.memoizedState,P.refs={},Nv(s);var E=u.contextType;typeof E=="object"&&E!==null?P.context=Zr(E):(E=Er(u)?Za:sr.current,P.context=ds(s,E)),P.state=s.memoizedState,E=u.getDerivedStateFromProps,typeof E=="function"&&(Fv(s,u,E,m),P.state=s.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof P.getSnapshotBeforeUpdate=="function"||typeof P.UNSAFE_componentWillMount!="function"&&typeof P.componentWillMount!="function"||(u=P.state,typeof P.componentWillMount=="function"&&P.componentWillMount(),typeof P.UNSAFE_componentWillMount=="function"&&P.UNSAFE_componentWillMount(),u!==P.state&&zd.enqueueReplaceState(P,P.state,null),Rd(s,m,P,x),P.state=s.memoizedState),typeof P.componentDidMount=="function"&&(s.flags|=4194308)}function bs(s,u){try{var m="",x=u;do m+=ge(x),x=x.return;while(x);var P=m}catch(E){P=`
|
||
Error generating stack: `+E.message+`
|
||
`+E.stack}return{value:s,source:u,stack:P,digest:null}}function Vv(s,u,m){return{value:s,source:null,stack:m??null,digest:u??null}}function Uv(s,u){try{console.error(u.value)}catch(m){setTimeout(function(){throw m})}}var iU=typeof WeakMap=="function"?WeakMap:Map;function JN(s,u,m){m=xi(-1,m),m.tag=3,m.payload={element:null};var x=u.value;return m.callback=function(){Kd||(Kd=!0,iy=x),Uv(s,u)},m}function eE(s,u,m){m=xi(-1,m),m.tag=3;var x=s.type.getDerivedStateFromError;if(typeof x=="function"){var P=u.value;m.payload=function(){return x(P)},m.callback=function(){Uv(s,u)}}var E=s.stateNode;return E!==null&&typeof E.componentDidCatch=="function"&&(m.callback=function(){Uv(s,u),typeof x!="function"&&(da===null?da=new Set([this]):da.add(this));var M=u.stack;this.componentDidCatch(u.value,{componentStack:M!==null?M:""})}),m}function tE(s,u,m){var x=s.pingCache;if(x===null){x=s.pingCache=new iU;var P=new Set;x.set(u,P)}else P=x.get(u),P===void 0&&(P=new Set,x.set(u,P));P.has(m)||(P.add(m),s=yU.bind(null,s,u,m),u.then(s,s))}function rE(s){do{var u;if((u=s.tag===13)&&(u=s.memoizedState,u=u!==null?u.dehydrated!==null:!0),u)return s;s=s.return}while(s!==null);return null}function nE(s,u,m,x,P){return(s.mode&1)===0?(s===u?s.flags|=65536:(s.flags|=128,m.flags|=131072,m.flags&=-52805,m.tag===1&&(m.alternate===null?m.tag=17:(u=xi(-1,1),u.tag=2,ua(m,u,1))),m.lanes|=1),s):(s.flags|=65536,s.lanes=P,s)}var aU=C.ReactCurrentOwner,Or=!1;function xr(s,u,m,x){u.child=s===null?jN(u,null,m,x):gs(u,s.child,m,x)}function iE(s,u,m,x,P){m=m.render;var E=u.ref;return ys(u,P),x=Rv(s,u,m,x,E,P),m=Iv(),s!==null&&!Or?(u.updateQueue=s.updateQueue,u.flags&=-2053,s.lanes&=~P,bi(s,u,P)):(jt&&m&&vv(u),u.flags|=1,xr(s,u,x,P),u.child)}function aE(s,u,m,x,P){if(s===null){var E=m.type;return typeof E=="function"&&!fy(E)&&E.defaultProps===void 0&&m.compare===null&&m.defaultProps===void 0?(u.tag=15,u.type=E,oE(s,u,E,x,P)):(s=eh(m.type,null,x,u,u.mode,P),s.ref=u.ref,s.return=u,u.child=s)}if(E=s.child,(s.lanes&P)===0){var M=E.memoizedProps;if(m=m.compare,m=m!==null?m:xc,m(M,x)&&s.ref===u.ref)return bi(s,u,P)}return u.flags|=1,s=ga(E,x),s.ref=u.ref,s.return=u,u.child=s}function oE(s,u,m,x,P){if(s!==null){var E=s.memoizedProps;if(xc(E,x)&&s.ref===u.ref)if(Or=!1,u.pendingProps=x=E,(s.lanes&P)!==0)(s.flags&131072)!==0&&(Or=!0);else return u.lanes=s.lanes,bi(s,u,P)}return qv(s,u,m,x,P)}function sE(s,u,m){var x=u.pendingProps,P=x.children,E=s!==null?s.memoizedState:null;if(x.mode==="hidden")if((u.mode&1)===0)u.memoizedState={baseLanes:0,cachePool:null,transitions:null},mt(Ss,zr),zr|=m;else{if((m&1073741824)===0)return s=E!==null?E.baseLanes|m:m,u.lanes=u.childLanes=1073741824,u.memoizedState={baseLanes:s,cachePool:null,transitions:null},u.updateQueue=null,mt(Ss,zr),zr|=s,null;u.memoizedState={baseLanes:0,cachePool:null,transitions:null},x=E!==null?E.baseLanes:m,mt(Ss,zr),zr|=x}else E!==null?(x=E.baseLanes|m,u.memoizedState=null):x=m,mt(Ss,zr),zr|=x;return xr(s,u,P,m),u.child}function lE(s,u){var m=u.ref;(s===null&&m!==null||s!==null&&s.ref!==m)&&(u.flags|=512,u.flags|=2097152)}function qv(s,u,m,x,P){var E=Er(m)?Za:sr.current;return E=ds(u,E),ys(u,P),m=Rv(s,u,m,x,E,P),x=Iv(),s!==null&&!Or?(u.updateQueue=s.updateQueue,u.flags&=-2053,s.lanes&=~P,bi(s,u,P)):(jt&&x&&vv(u),u.flags|=1,xr(s,u,m,P),u.child)}function cE(s,u,m,x,P){if(Er(m)){var E=!0;Pd(u)}else E=!1;if(ys(u,P),u.stateNode===null)Ud(s,u),ZN(u,m,x),zv(u,m,x,P),x=!0;else if(s===null){var M=u.stateNode,B=u.memoizedProps;M.props=B;var W=M.context,te=m.contextType;typeof te=="object"&&te!==null?te=Zr(te):(te=Er(m)?Za:sr.current,te=ds(u,te));var fe=m.getDerivedStateFromProps,de=typeof fe=="function"||typeof M.getSnapshotBeforeUpdate=="function";de||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||(B!==x||W!==te)&&QN(u,M,x,te),ca=!1;var ue=u.memoizedState;M.state=ue,Rd(u,x,M,P),W=u.memoizedState,B!==x||ue!==W||Nr.current||ca?(typeof fe=="function"&&(Fv(u,m,fe,x),W=u.memoizedState),(B=ca||XN(u,m,B,x,ue,W,te))?(de||typeof M.UNSAFE_componentWillMount!="function"&&typeof M.componentWillMount!="function"||(typeof M.componentWillMount=="function"&&M.componentWillMount(),typeof M.UNSAFE_componentWillMount=="function"&&M.UNSAFE_componentWillMount()),typeof M.componentDidMount=="function"&&(u.flags|=4194308)):(typeof M.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=x,u.memoizedState=W),M.props=x,M.state=W,M.context=te,x=B):(typeof M.componentDidMount=="function"&&(u.flags|=4194308),x=!1)}else{M=u.stateNode,PN(s,u),B=u.memoizedProps,te=u.type===u.elementType?B:bn(u.type,B),M.props=te,de=u.pendingProps,ue=M.context,W=m.contextType,typeof W=="object"&&W!==null?W=Zr(W):(W=Er(m)?Za:sr.current,W=ds(u,W));var je=m.getDerivedStateFromProps;(fe=typeof je=="function"||typeof M.getSnapshotBeforeUpdate=="function")||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||(B!==de||ue!==W)&&QN(u,M,x,W),ca=!1,ue=u.memoizedState,M.state=ue,Rd(u,x,M,P);var Ne=u.memoizedState;B!==de||ue!==Ne||Nr.current||ca?(typeof je=="function"&&(Fv(u,m,je,x),Ne=u.memoizedState),(te=ca||XN(u,m,te,x,ue,Ne,W)||!1)?(fe||typeof M.UNSAFE_componentWillUpdate!="function"&&typeof M.componentWillUpdate!="function"||(typeof M.componentWillUpdate=="function"&&M.componentWillUpdate(x,Ne,W),typeof M.UNSAFE_componentWillUpdate=="function"&&M.UNSAFE_componentWillUpdate(x,Ne,W)),typeof M.componentDidUpdate=="function"&&(u.flags|=4),typeof M.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof M.componentDidUpdate!="function"||B===s.memoizedProps&&ue===s.memoizedState||(u.flags|=4),typeof M.getSnapshotBeforeUpdate!="function"||B===s.memoizedProps&&ue===s.memoizedState||(u.flags|=1024),u.memoizedProps=x,u.memoizedState=Ne),M.props=x,M.state=Ne,M.context=W,x=te):(typeof M.componentDidUpdate!="function"||B===s.memoizedProps&&ue===s.memoizedState||(u.flags|=4),typeof M.getSnapshotBeforeUpdate!="function"||B===s.memoizedProps&&ue===s.memoizedState||(u.flags|=1024),x=!1)}return Wv(s,u,m,x,E,P)}function Wv(s,u,m,x,P,E){lE(s,u);var M=(u.flags&128)!==0;if(!x&&!M)return P&&pN(u,m,!1),bi(s,u,E);x=u.stateNode,aU.current=u;var B=M&&typeof m.getDerivedStateFromError!="function"?null:x.render();return u.flags|=1,s!==null&&M?(u.child=gs(u,s.child,null,E),u.child=gs(u,null,B,E)):xr(s,u,B,E),u.memoizedState=x.state,P&&pN(u,m,!0),u.child}function uE(s){var u=s.stateNode;u.pendingContext?dN(s,u.pendingContext,u.pendingContext!==u.context):u.context&&dN(s,u.context,!1),Ev(s,u.containerInfo)}function fE(s,u,m,x,P){return ms(),wv(P),u.flags|=256,xr(s,u,m,x),u.child}var Hv={dehydrated:null,treeContext:null,retryLane:0};function Gv(s){return{baseLanes:s,cachePool:null,transitions:null}}function dE(s,u,m){var x=u.pendingProps,P=Nt.current,E=!1,M=(u.flags&128)!==0,B;if((B=M)||(B=s!==null&&s.memoizedState===null?!1:(P&2)!==0),B?(E=!0,u.flags&=-129):(s===null||s.memoizedState!==null)&&(P|=1),mt(Nt,P&1),s===null)return bv(u),s=u.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((u.mode&1)===0?u.lanes=1:s.data==="$!"?u.lanes=8:u.lanes=1073741824,null):(M=x.children,s=x.fallback,E?(x=u.mode,E=u.child,M={mode:"hidden",children:M},(x&1)===0&&E!==null?(E.childLanes=0,E.pendingProps=M):E=th(M,x,0,null),s=so(s,x,m,null),E.return=u,s.return=u,E.sibling=s,u.child=E,u.child.memoizedState=Gv(m),u.memoizedState=Hv,s):Kv(u,M));if(P=s.memoizedState,P!==null&&(B=P.dehydrated,B!==null))return oU(s,u,M,x,B,P,m);if(E){E=x.fallback,M=u.mode,P=s.child,B=P.sibling;var W={mode:"hidden",children:x.children};return(M&1)===0&&u.child!==P?(x=u.child,x.childLanes=0,x.pendingProps=W,u.deletions=null):(x=ga(P,W),x.subtreeFlags=P.subtreeFlags&14680064),B!==null?E=ga(B,E):(E=so(E,M,m,null),E.flags|=2),E.return=u,x.return=u,x.sibling=E,u.child=x,x=E,E=u.child,M=s.child.memoizedState,M=M===null?Gv(m):{baseLanes:M.baseLanes|m,cachePool:null,transitions:M.transitions},E.memoizedState=M,E.childLanes=s.childLanes&~m,u.memoizedState=Hv,x}return E=s.child,s=E.sibling,x=ga(E,{mode:"visible",children:x.children}),(u.mode&1)===0&&(x.lanes=m),x.return=u,x.sibling=null,s!==null&&(m=u.deletions,m===null?(u.deletions=[s],u.flags|=16):m.push(s)),u.child=x,u.memoizedState=null,x}function Kv(s,u){return u=th({mode:"visible",children:u},s.mode,0,null),u.return=s,s.child=u}function Vd(s,u,m,x){return x!==null&&wv(x),gs(u,s.child,null,m),s=Kv(u,u.pendingProps.children),s.flags|=2,u.memoizedState=null,s}function oU(s,u,m,x,P,E,M){if(m)return u.flags&256?(u.flags&=-257,x=Vv(Error(r(422))),Vd(s,u,M,x)):u.memoizedState!==null?(u.child=s.child,u.flags|=128,null):(E=x.fallback,P=u.mode,x=th({mode:"visible",children:x.children},P,0,null),E=so(E,P,M,null),E.flags|=2,x.return=u,E.return=u,x.sibling=E,u.child=x,(u.mode&1)!==0&&gs(u,s.child,null,M),u.child.memoizedState=Gv(M),u.memoizedState=Hv,E);if((u.mode&1)===0)return Vd(s,u,M,null);if(P.data==="$!"){if(x=P.nextSibling&&P.nextSibling.dataset,x)var B=x.dgst;return x=B,E=Error(r(419)),x=Vv(E,x,void 0),Vd(s,u,M,x)}if(B=(M&s.childLanes)!==0,Or||B){if(x=Qt,x!==null){switch(M&-M){case 4:P=2;break;case 16:P=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:P=32;break;case 536870912:P=268435456;break;default:P=0}P=(P&(x.suspendedLanes|M))!==0?0:P,P!==0&&P!==E.retryLane&&(E.retryLane=P,yi(s,P),jn(x,s,P,-1))}return uy(),x=Vv(Error(r(421))),Vd(s,u,M,x)}return P.data==="$?"?(u.flags|=128,u.child=s.child,u=xU.bind(null,s),P._reactRetry=u,null):(s=E.treeContext,Fr=aa(P.nextSibling),Br=u,jt=!0,xn=null,s!==null&&(Yr[Xr++]=gi,Yr[Xr++]=vi,Yr[Xr++]=Qa,gi=s.id,vi=s.overflow,Qa=u),u=Kv(u,x.children),u.flags|=4096,u)}function hE(s,u,m){s.lanes|=u;var x=s.alternate;x!==null&&(x.lanes|=u),Pv(s.return,u,m)}function Yv(s,u,m,x,P){var E=s.memoizedState;E===null?s.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:x,tail:m,tailMode:P}:(E.isBackwards=u,E.rendering=null,E.renderingStartTime=0,E.last=x,E.tail=m,E.tailMode=P)}function pE(s,u,m){var x=u.pendingProps,P=x.revealOrder,E=x.tail;if(xr(s,u,x.children,m),x=Nt.current,(x&2)!==0)x=x&1|2,u.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=u.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&hE(s,m,u);else if(s.tag===19)hE(s,m,u);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===u)break e;for(;s.sibling===null;){if(s.return===null||s.return===u)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}x&=1}if(mt(Nt,x),(u.mode&1)===0)u.memoizedState=null;else switch(P){case"forwards":for(m=u.child,P=null;m!==null;)s=m.alternate,s!==null&&Id(s)===null&&(P=m),m=m.sibling;m=P,m===null?(P=u.child,u.child=null):(P=m.sibling,m.sibling=null),Yv(u,!1,P,m,E);break;case"backwards":for(m=null,P=u.child,u.child=null;P!==null;){if(s=P.alternate,s!==null&&Id(s)===null){u.child=P;break}s=P.sibling,P.sibling=m,m=P,P=s}Yv(u,!0,m,null,E);break;case"together":Yv(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function Ud(s,u){(u.mode&1)===0&&s!==null&&(s.alternate=null,u.alternate=null,u.flags|=2)}function bi(s,u,m){if(s!==null&&(u.dependencies=s.dependencies),no|=u.lanes,(m&u.childLanes)===0)return null;if(s!==null&&u.child!==s.child)throw Error(r(153));if(u.child!==null){for(s=u.child,m=ga(s,s.pendingProps),u.child=m,m.return=u;s.sibling!==null;)s=s.sibling,m=m.sibling=ga(s,s.pendingProps),m.return=u;m.sibling=null}return u.child}function sU(s,u,m){switch(u.tag){case 3:uE(u),ms();break;case 5:EN(u);break;case 1:Er(u.type)&&Pd(u);break;case 4:Ev(u,u.stateNode.containerInfo);break;case 10:var x=u.type._context,P=u.memoizedProps.value;mt(Td,x._currentValue),x._currentValue=P;break;case 13:if(x=u.memoizedState,x!==null)return x.dehydrated!==null?(mt(Nt,Nt.current&1),u.flags|=128,null):(m&u.child.childLanes)!==0?dE(s,u,m):(mt(Nt,Nt.current&1),s=bi(s,u,m),s!==null?s.sibling:null);mt(Nt,Nt.current&1);break;case 19:if(x=(m&u.childLanes)!==0,(s.flags&128)!==0){if(x)return pE(s,u,m);u.flags|=128}if(P=u.memoizedState,P!==null&&(P.rendering=null,P.tail=null,P.lastEffect=null),mt(Nt,Nt.current),x)break;return null;case 22:case 23:return u.lanes=0,sE(s,u,m)}return bi(s,u,m)}var mE,Xv,gE,vE;mE=function(s,u){for(var m=u.child;m!==null;){if(m.tag===5||m.tag===6)s.appendChild(m.stateNode);else if(m.tag!==4&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===u)break;for(;m.sibling===null;){if(m.return===null||m.return===u)return;m=m.return}m.sibling.return=m.return,m=m.sibling}},Xv=function(){},gE=function(s,u,m,x){var P=s.memoizedProps;if(P!==x){s=u.stateNode,to(Wn.current);var E=null;switch(m){case"input":P=we(s,P),x=we(s,x),E=[];break;case"select":P=Q({},P,{value:void 0}),x=Q({},x,{value:void 0}),E=[];break;case"textarea":P=_e(s,P),x=_e(s,x),E=[];break;default:typeof P.onClick!="function"&&typeof x.onClick=="function"&&(s.onclick=Sd)}Zl(m,x);var M;m=null;for(te in P)if(!x.hasOwnProperty(te)&&P.hasOwnProperty(te)&&P[te]!=null)if(te==="style"){var B=P[te];for(M in B)B.hasOwnProperty(M)&&(m||(m={}),m[M]="")}else te!=="dangerouslySetInnerHTML"&&te!=="children"&&te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&te!=="autoFocus"&&(i.hasOwnProperty(te)?E||(E=[]):(E=E||[]).push(te,null));for(te in x){var W=x[te];if(B=P!=null?P[te]:void 0,x.hasOwnProperty(te)&&W!==B&&(W!=null||B!=null))if(te==="style")if(B){for(M in B)!B.hasOwnProperty(M)||W&&W.hasOwnProperty(M)||(m||(m={}),m[M]="");for(M in W)W.hasOwnProperty(M)&&B[M]!==W[M]&&(m||(m={}),m[M]=W[M])}else m||(E||(E=[]),E.push(te,m)),m=W;else te==="dangerouslySetInnerHTML"?(W=W?W.__html:void 0,B=B?B.__html:void 0,W!=null&&B!==W&&(E=E||[]).push(te,W)):te==="children"?typeof W!="string"&&typeof W!="number"||(E=E||[]).push(te,""+W):te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&(i.hasOwnProperty(te)?(W!=null&&te==="onScroll"&&xt("scroll",s),E||B===W||(E=[])):(E=E||[]).push(te,W))}m&&(E=E||[]).push("style",m);var te=E;(u.updateQueue=te)&&(u.flags|=4)}},vE=function(s,u,m,x){m!==x&&(u.flags|=4)};function Rc(s,u){if(!jt)switch(s.tailMode){case"hidden":u=s.tail;for(var m=null;u!==null;)u.alternate!==null&&(m=u),u=u.sibling;m===null?s.tail=null:m.sibling=null;break;case"collapsed":m=s.tail;for(var x=null;m!==null;)m.alternate!==null&&(x=m),m=m.sibling;x===null?u||s.tail===null?s.tail=null:s.tail.sibling=null:x.sibling=null}}function cr(s){var u=s.alternate!==null&&s.alternate.child===s.child,m=0,x=0;if(u)for(var P=s.child;P!==null;)m|=P.lanes|P.childLanes,x|=P.subtreeFlags&14680064,x|=P.flags&14680064,P.return=s,P=P.sibling;else for(P=s.child;P!==null;)m|=P.lanes|P.childLanes,x|=P.subtreeFlags,x|=P.flags,P.return=s,P=P.sibling;return s.subtreeFlags|=x,s.childLanes=m,u}function lU(s,u,m){var x=u.pendingProps;switch(yv(u),u.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return cr(u),null;case 1:return Er(u.type)&&_d(),cr(u),null;case 3:return x=u.stateNode,xs(),bt(Nr),bt(sr),Tv(),x.pendingContext&&(x.context=x.pendingContext,x.pendingContext=null),(s===null||s.child===null)&&(Od(u)?u.flags|=4:s===null||s.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,xn!==null&&(sy(xn),xn=null))),Xv(s,u),cr(u),null;case 5:Ov(u);var P=to(Oc.current);if(m=u.type,s!==null&&u.stateNode!=null)gE(s,u,m,x,P),s.ref!==u.ref&&(u.flags|=512,u.flags|=2097152);else{if(!x){if(u.stateNode===null)throw Error(r(166));return cr(u),null}if(s=to(Wn.current),Od(u)){x=u.stateNode,m=u.type;var E=u.memoizedProps;switch(x[qn]=u,x[_c]=E,s=(u.mode&1)!==0,m){case"dialog":xt("cancel",x),xt("close",x);break;case"iframe":case"object":case"embed":xt("load",x);break;case"video":case"audio":for(P=0;P<wc.length;P++)xt(wc[P],x);break;case"source":xt("error",x);break;case"img":case"image":case"link":xt("error",x),xt("load",x);break;case"details":xt("toggle",x);break;case"input":ze(x,E),xt("invalid",x);break;case"select":x._wrapperState={wasMultiple:!!E.multiple},xt("invalid",x);break;case"textarea":ot(x,E),xt("invalid",x)}Zl(m,E),P=null;for(var M in E)if(E.hasOwnProperty(M)){var B=E[M];M==="children"?typeof B=="string"?x.textContent!==B&&(E.suppressHydrationWarning!==!0&&wd(x.textContent,B,s),P=["children",B]):typeof B=="number"&&x.textContent!==""+B&&(E.suppressHydrationWarning!==!0&&wd(x.textContent,B,s),P=["children",""+B]):i.hasOwnProperty(M)&&B!=null&&M==="onScroll"&&xt("scroll",x)}switch(m){case"input":ce(x),ye(x,E,!0);break;case"textarea":ce(x),Qi(x);break;case"select":case"option":break;default:typeof E.onClick=="function"&&(x.onclick=Sd)}x=P,u.updateQueue=x,x!==null&&(u.flags|=4)}else{M=P.nodeType===9?P:P.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=Zf(m)),s==="http://www.w3.org/1999/xhtml"?m==="script"?(s=M.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof x.is=="string"?s=M.createElement(m,{is:x.is}):(s=M.createElement(m),m==="select"&&(M=s,x.multiple?M.multiple=!0:x.size&&(M.size=x.size))):s=M.createElementNS(s,m),s[qn]=u,s[_c]=x,mE(s,u,!1,!1),u.stateNode=s;e:{switch(M=Ql(m,x),m){case"dialog":xt("cancel",s),xt("close",s),P=x;break;case"iframe":case"object":case"embed":xt("load",s),P=x;break;case"video":case"audio":for(P=0;P<wc.length;P++)xt(wc[P],s);P=x;break;case"source":xt("error",s),P=x;break;case"img":case"image":case"link":xt("error",s),xt("load",s),P=x;break;case"details":xt("toggle",s),P=x;break;case"input":ze(s,x),P=we(s,x),xt("invalid",s);break;case"option":P=x;break;case"select":s._wrapperState={wasMultiple:!!x.multiple},P=Q({},x,{value:void 0}),xt("invalid",s);break;case"textarea":ot(s,x),P=_e(s,x),xt("invalid",s);break;default:P=x}Zl(m,P),B=P;for(E in B)if(B.hasOwnProperty(E)){var W=B[E];E==="style"?Qf(s,W):E==="dangerouslySetInnerHTML"?(W=W?W.__html:void 0,W!=null&&ts(s,W)):E==="children"?typeof W=="string"?(m!=="textarea"||W!=="")&&Kr(s,W):typeof W=="number"&&Kr(s,""+W):E!=="suppressContentEditableWarning"&&E!=="suppressHydrationWarning"&&E!=="autoFocus"&&(i.hasOwnProperty(E)?W!=null&&E==="onScroll"&&xt("scroll",s):W!=null&&_(s,E,W,M))}switch(m){case"input":ce(s),ye(s,x,!1);break;case"textarea":ce(s),Qi(s);break;case"option":x.value!=null&&s.setAttribute("value",""+he(x.value));break;case"select":s.multiple=!!x.multiple,E=x.value,E!=null?pe(s,!!x.multiple,E,!1):x.defaultValue!=null&&pe(s,!!x.multiple,x.defaultValue,!0);break;default:typeof P.onClick=="function"&&(s.onclick=Sd)}switch(m){case"button":case"input":case"select":case"textarea":x=!!x.autoFocus;break e;case"img":x=!0;break e;default:x=!1}}x&&(u.flags|=4)}u.ref!==null&&(u.flags|=512,u.flags|=2097152)}return cr(u),null;case 6:if(s&&u.stateNode!=null)vE(s,u,s.memoizedProps,x);else{if(typeof x!="string"&&u.stateNode===null)throw Error(r(166));if(m=to(Oc.current),to(Wn.current),Od(u)){if(x=u.stateNode,m=u.memoizedProps,x[qn]=u,(E=x.nodeValue!==m)&&(s=Br,s!==null))switch(s.tag){case 3:wd(x.nodeValue,m,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&wd(x.nodeValue,m,(s.mode&1)!==0)}E&&(u.flags|=4)}else x=(m.nodeType===9?m:m.ownerDocument).createTextNode(x),x[qn]=u,u.stateNode=x}return cr(u),null;case 13:if(bt(Nt),x=u.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(jt&&Fr!==null&&(u.mode&1)!==0&&(u.flags&128)===0)bN(),ms(),u.flags|=98560,E=!1;else if(E=Od(u),x!==null&&x.dehydrated!==null){if(s===null){if(!E)throw Error(r(318));if(E=u.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(r(317));E[qn]=u}else ms(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;cr(u),E=!1}else xn!==null&&(sy(xn),xn=null),E=!0;if(!E)return u.flags&65536?u:null}return(u.flags&128)!==0?(u.lanes=m,u):(x=x!==null,x!==(s!==null&&s.memoizedState!==null)&&x&&(u.child.flags|=8192,(u.mode&1)!==0&&(s===null||(Nt.current&1)!==0?qt===0&&(qt=3):uy())),u.updateQueue!==null&&(u.flags|=4),cr(u),null);case 4:return xs(),Xv(s,u),s===null&&Sc(u.stateNode.containerInfo),cr(u),null;case 10:return _v(u.type._context),cr(u),null;case 17:return Er(u.type)&&_d(),cr(u),null;case 19:if(bt(Nt),E=u.memoizedState,E===null)return cr(u),null;if(x=(u.flags&128)!==0,M=E.rendering,M===null)if(x)Rc(E,!1);else{if(qt!==0||s!==null&&(s.flags&128)!==0)for(s=u.child;s!==null;){if(M=Id(s),M!==null){for(u.flags|=128,Rc(E,!1),x=M.updateQueue,x!==null&&(u.updateQueue=x,u.flags|=4),u.subtreeFlags=0,x=m,m=u.child;m!==null;)E=m,s=x,E.flags&=14680066,M=E.alternate,M===null?(E.childLanes=0,E.lanes=s,E.child=null,E.subtreeFlags=0,E.memoizedProps=null,E.memoizedState=null,E.updateQueue=null,E.dependencies=null,E.stateNode=null):(E.childLanes=M.childLanes,E.lanes=M.lanes,E.child=M.child,E.subtreeFlags=0,E.deletions=null,E.memoizedProps=M.memoizedProps,E.memoizedState=M.memoizedState,E.updateQueue=M.updateQueue,E.type=M.type,s=M.dependencies,E.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),m=m.sibling;return mt(Nt,Nt.current&1|2),u.child}s=s.sibling}E.tail!==null&&Dt()>js&&(u.flags|=128,x=!0,Rc(E,!1),u.lanes=4194304)}else{if(!x)if(s=Id(M),s!==null){if(u.flags|=128,x=!0,m=s.updateQueue,m!==null&&(u.updateQueue=m,u.flags|=4),Rc(E,!0),E.tail===null&&E.tailMode==="hidden"&&!M.alternate&&!jt)return cr(u),null}else 2*Dt()-E.renderingStartTime>js&&m!==1073741824&&(u.flags|=128,x=!0,Rc(E,!1),u.lanes=4194304);E.isBackwards?(M.sibling=u.child,u.child=M):(m=E.last,m!==null?m.sibling=M:u.child=M,E.last=M)}return E.tail!==null?(u=E.tail,E.rendering=u,E.tail=u.sibling,E.renderingStartTime=Dt(),u.sibling=null,m=Nt.current,mt(Nt,x?m&1|2:m&1),u):(cr(u),null);case 22:case 23:return cy(),x=u.memoizedState!==null,s!==null&&s.memoizedState!==null!==x&&(u.flags|=8192),x&&(u.mode&1)!==0?(zr&1073741824)!==0&&(cr(u),u.subtreeFlags&6&&(u.flags|=8192)):cr(u),null;case 24:return null;case 25:return null}throw Error(r(156,u.tag))}function cU(s,u){switch(yv(u),u.tag){case 1:return Er(u.type)&&_d(),s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 3:return xs(),bt(Nr),bt(sr),Tv(),s=u.flags,(s&65536)!==0&&(s&128)===0?(u.flags=s&-65537|128,u):null;case 5:return Ov(u),null;case 13:if(bt(Nt),s=u.memoizedState,s!==null&&s.dehydrated!==null){if(u.alternate===null)throw Error(r(340));ms()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 19:return bt(Nt),null;case 4:return xs(),null;case 10:return _v(u.type._context),null;case 22:case 23:return cy(),null;case 24:return null;default:return null}}var qd=!1,ur=!1,uU=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function ws(s,u){var m=s.ref;if(m!==null)if(typeof m=="function")try{m(null)}catch(x){Mt(s,u,x)}else m.current=null}function Zv(s,u,m){try{m()}catch(x){Mt(s,u,x)}}var yE=!1;function fU(s,u){if(cv=ud,s=XA(),tv(s)){if("selectionStart"in s)var m={start:s.selectionStart,end:s.selectionEnd};else e:{m=(m=s.ownerDocument)&&m.defaultView||window;var x=m.getSelection&&m.getSelection();if(x&&x.rangeCount!==0){m=x.anchorNode;var P=x.anchorOffset,E=x.focusNode;x=x.focusOffset;try{m.nodeType,E.nodeType}catch{m=null;break e}var M=0,B=-1,W=-1,te=0,fe=0,de=s,ue=null;t:for(;;){for(var je;de!==m||P!==0&&de.nodeType!==3||(B=M+P),de!==E||x!==0&&de.nodeType!==3||(W=M+x),de.nodeType===3&&(M+=de.nodeValue.length),(je=de.firstChild)!==null;)ue=de,de=je;for(;;){if(de===s)break t;if(ue===m&&++te===P&&(B=M),ue===E&&++fe===x&&(W=M),(je=de.nextSibling)!==null)break;de=ue,ue=de.parentNode}de=je}m=B===-1||W===-1?null:{start:B,end:W}}else m=null}m=m||{start:0,end:0}}else m=null;for(uv={focusedElem:s,selectionRange:m},ud=!1,Pe=u;Pe!==null;)if(u=Pe,s=u.child,(u.subtreeFlags&1028)!==0&&s!==null)s.return=u,Pe=s;else for(;Pe!==null;){u=Pe;try{var Ne=u.alternate;if((u.flags&1024)!==0)switch(u.tag){case 0:case 11:case 15:break;case 1:if(Ne!==null){var Te=Ne.memoizedProps,$t=Ne.memoizedState,J=u.stateNode,X=J.getSnapshotBeforeUpdate(u.elementType===u.type?Te:bn(u.type,Te),$t);J.__reactInternalSnapshotBeforeUpdate=X}break;case 3:var ee=u.stateNode.containerInfo;ee.nodeType===1?ee.textContent="":ee.nodeType===9&&ee.documentElement&&ee.removeChild(ee.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(me){Mt(u,u.return,me)}if(s=u.sibling,s!==null){s.return=u.return,Pe=s;break}Pe=u.return}return Ne=yE,yE=!1,Ne}function Ic(s,u,m){var x=u.updateQueue;if(x=x!==null?x.lastEffect:null,x!==null){var P=x=x.next;do{if((P.tag&s)===s){var E=P.destroy;P.destroy=void 0,E!==void 0&&Zv(u,m,E)}P=P.next}while(P!==x)}}function Wd(s,u){if(u=u.updateQueue,u=u!==null?u.lastEffect:null,u!==null){var m=u=u.next;do{if((m.tag&s)===s){var x=m.create;m.destroy=x()}m=m.next}while(m!==u)}}function Qv(s){var u=s.ref;if(u!==null){var m=s.stateNode;switch(s.tag){case 5:s=m;break;default:s=m}typeof u=="function"?u(s):u.current=s}}function xE(s){var u=s.alternate;u!==null&&(s.alternate=null,xE(u)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(u=s.stateNode,u!==null&&(delete u[qn],delete u[_c],delete u[pv],delete u[GV],delete u[KV])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function bE(s){return s.tag===5||s.tag===3||s.tag===4}function wE(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||bE(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Jv(s,u,m){var x=s.tag;if(x===5||x===6)s=s.stateNode,u?m.nodeType===8?m.parentNode.insertBefore(s,u):m.insertBefore(s,u):(m.nodeType===8?(u=m.parentNode,u.insertBefore(s,m)):(u=m,u.appendChild(s)),m=m._reactRootContainer,m!=null||u.onclick!==null||(u.onclick=Sd));else if(x!==4&&(s=s.child,s!==null))for(Jv(s,u,m),s=s.sibling;s!==null;)Jv(s,u,m),s=s.sibling}function ey(s,u,m){var x=s.tag;if(x===5||x===6)s=s.stateNode,u?m.insertBefore(s,u):m.appendChild(s);else if(x!==4&&(s=s.child,s!==null))for(ey(s,u,m),s=s.sibling;s!==null;)ey(s,u,m),s=s.sibling}var nr=null,wn=!1;function fa(s,u,m){for(m=m.child;m!==null;)SE(s,u,m),m=m.sibling}function SE(s,u,m){if(Un&&typeof Un.onCommitFiberUnmount=="function")try{Un.onCommitFiberUnmount(id,m)}catch{}switch(m.tag){case 5:ur||ws(m,u);case 6:var x=nr,P=wn;nr=null,fa(s,u,m),nr=x,wn=P,nr!==null&&(wn?(s=nr,m=m.stateNode,s.nodeType===8?s.parentNode.removeChild(m):s.removeChild(m)):nr.removeChild(m.stateNode));break;case 18:nr!==null&&(wn?(s=nr,m=m.stateNode,s.nodeType===8?hv(s.parentNode,m):s.nodeType===1&&hv(s,m),hc(s)):hv(nr,m.stateNode));break;case 4:x=nr,P=wn,nr=m.stateNode.containerInfo,wn=!0,fa(s,u,m),nr=x,wn=P;break;case 0:case 11:case 14:case 15:if(!ur&&(x=m.updateQueue,x!==null&&(x=x.lastEffect,x!==null))){P=x=x.next;do{var E=P,M=E.destroy;E=E.tag,M!==void 0&&((E&2)!==0||(E&4)!==0)&&Zv(m,u,M),P=P.next}while(P!==x)}fa(s,u,m);break;case 1:if(!ur&&(ws(m,u),x=m.stateNode,typeof x.componentWillUnmount=="function"))try{x.props=m.memoizedProps,x.state=m.memoizedState,x.componentWillUnmount()}catch(B){Mt(m,u,B)}fa(s,u,m);break;case 21:fa(s,u,m);break;case 22:m.mode&1?(ur=(x=ur)||m.memoizedState!==null,fa(s,u,m),ur=x):fa(s,u,m);break;default:fa(s,u,m)}}function jE(s){var u=s.updateQueue;if(u!==null){s.updateQueue=null;var m=s.stateNode;m===null&&(m=s.stateNode=new uU),u.forEach(function(x){var P=bU.bind(null,s,x);m.has(x)||(m.add(x),x.then(P,P))})}}function Sn(s,u){var m=u.deletions;if(m!==null)for(var x=0;x<m.length;x++){var P=m[x];try{var E=s,M=u,B=M;e:for(;B!==null;){switch(B.tag){case 5:nr=B.stateNode,wn=!1;break e;case 3:nr=B.stateNode.containerInfo,wn=!0;break e;case 4:nr=B.stateNode.containerInfo,wn=!0;break e}B=B.return}if(nr===null)throw Error(r(160));SE(E,M,P),nr=null,wn=!1;var W=P.alternate;W!==null&&(W.return=null),P.return=null}catch(te){Mt(P,u,te)}}if(u.subtreeFlags&12854)for(u=u.child;u!==null;)_E(u,s),u=u.sibling}function _E(s,u){var m=s.alternate,x=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(Sn(u,s),Gn(s),x&4){try{Ic(3,s,s.return),Wd(3,s)}catch(Te){Mt(s,s.return,Te)}try{Ic(5,s,s.return)}catch(Te){Mt(s,s.return,Te)}}break;case 1:Sn(u,s),Gn(s),x&512&&m!==null&&ws(m,m.return);break;case 5:if(Sn(u,s),Gn(s),x&512&&m!==null&&ws(m,m.return),s.flags&32){var P=s.stateNode;try{Kr(P,"")}catch(Te){Mt(s,s.return,Te)}}if(x&4&&(P=s.stateNode,P!=null)){var E=s.memoizedProps,M=m!==null?m.memoizedProps:E,B=s.type,W=s.updateQueue;if(s.updateQueue=null,W!==null)try{B==="input"&&E.type==="radio"&&E.name!=null&&Ue(P,E),Ql(B,M);var te=Ql(B,E);for(M=0;M<W.length;M+=2){var fe=W[M],de=W[M+1];fe==="style"?Qf(P,de):fe==="dangerouslySetInnerHTML"?ts(P,de):fe==="children"?Kr(P,de):_(P,fe,de,te)}switch(B){case"input":Je(P,E);break;case"textarea":Xt(P,E);break;case"select":var ue=P._wrapperState.wasMultiple;P._wrapperState.wasMultiple=!!E.multiple;var je=E.value;je!=null?pe(P,!!E.multiple,je,!1):ue!==!!E.multiple&&(E.defaultValue!=null?pe(P,!!E.multiple,E.defaultValue,!0):pe(P,!!E.multiple,E.multiple?[]:"",!1))}P[_c]=E}catch(Te){Mt(s,s.return,Te)}}break;case 6:if(Sn(u,s),Gn(s),x&4){if(s.stateNode===null)throw Error(r(162));P=s.stateNode,E=s.memoizedProps;try{P.nodeValue=E}catch(Te){Mt(s,s.return,Te)}}break;case 3:if(Sn(u,s),Gn(s),x&4&&m!==null&&m.memoizedState.isDehydrated)try{hc(u.containerInfo)}catch(Te){Mt(s,s.return,Te)}break;case 4:Sn(u,s),Gn(s);break;case 13:Sn(u,s),Gn(s),P=s.child,P.flags&8192&&(E=P.memoizedState!==null,P.stateNode.isHidden=E,!E||P.alternate!==null&&P.alternate.memoizedState!==null||(ny=Dt())),x&4&&jE(s);break;case 22:if(fe=m!==null&&m.memoizedState!==null,s.mode&1?(ur=(te=ur)||fe,Sn(u,s),ur=te):Sn(u,s),Gn(s),x&8192){if(te=s.memoizedState!==null,(s.stateNode.isHidden=te)&&!fe&&(s.mode&1)!==0)for(Pe=s,fe=s.child;fe!==null;){for(de=Pe=fe;Pe!==null;){switch(ue=Pe,je=ue.child,ue.tag){case 0:case 11:case 14:case 15:Ic(4,ue,ue.return);break;case 1:ws(ue,ue.return);var Ne=ue.stateNode;if(typeof Ne.componentWillUnmount=="function"){x=ue,m=ue.return;try{u=x,Ne.props=u.memoizedProps,Ne.state=u.memoizedState,Ne.componentWillUnmount()}catch(Te){Mt(x,m,Te)}}break;case 5:ws(ue,ue.return);break;case 22:if(ue.memoizedState!==null){NE(de);continue}}je!==null?(je.return=ue,Pe=je):NE(de)}fe=fe.sibling}e:for(fe=null,de=s;;){if(de.tag===5){if(fe===null){fe=de;try{P=de.stateNode,te?(E=P.style,typeof E.setProperty=="function"?E.setProperty("display","none","important"):E.display="none"):(B=de.stateNode,W=de.memoizedProps.style,M=W!=null&&W.hasOwnProperty("display")?W.display:null,B.style.display=Ka("display",M))}catch(Te){Mt(s,s.return,Te)}}}else if(de.tag===6){if(fe===null)try{de.stateNode.nodeValue=te?"":de.memoizedProps}catch(Te){Mt(s,s.return,Te)}}else if((de.tag!==22&&de.tag!==23||de.memoizedState===null||de===s)&&de.child!==null){de.child.return=de,de=de.child;continue}if(de===s)break e;for(;de.sibling===null;){if(de.return===null||de.return===s)break e;fe===de&&(fe=null),de=de.return}fe===de&&(fe=null),de.sibling.return=de.return,de=de.sibling}}break;case 19:Sn(u,s),Gn(s),x&4&&jE(s);break;case 21:break;default:Sn(u,s),Gn(s)}}function Gn(s){var u=s.flags;if(u&2){try{e:{for(var m=s.return;m!==null;){if(bE(m)){var x=m;break e}m=m.return}throw Error(r(160))}switch(x.tag){case 5:var P=x.stateNode;x.flags&32&&(Kr(P,""),x.flags&=-33);var E=wE(s);ey(s,E,P);break;case 3:case 4:var M=x.stateNode.containerInfo,B=wE(s);Jv(s,B,M);break;default:throw Error(r(161))}}catch(W){Mt(s,s.return,W)}s.flags&=-3}u&4096&&(s.flags&=-4097)}function dU(s,u,m){Pe=s,PE(s)}function PE(s,u,m){for(var x=(s.mode&1)!==0;Pe!==null;){var P=Pe,E=P.child;if(P.tag===22&&x){var M=P.memoizedState!==null||qd;if(!M){var B=P.alternate,W=B!==null&&B.memoizedState!==null||ur;B=qd;var te=ur;if(qd=M,(ur=W)&&!te)for(Pe=P;Pe!==null;)M=Pe,W=M.child,M.tag===22&&M.memoizedState!==null?EE(P):W!==null?(W.return=M,Pe=W):EE(P);for(;E!==null;)Pe=E,PE(E),E=E.sibling;Pe=P,qd=B,ur=te}AE(s)}else(P.subtreeFlags&8772)!==0&&E!==null?(E.return=P,Pe=E):AE(s)}}function AE(s){for(;Pe!==null;){var u=Pe;if((u.flags&8772)!==0){var m=u.alternate;try{if((u.flags&8772)!==0)switch(u.tag){case 0:case 11:case 15:ur||Wd(5,u);break;case 1:var x=u.stateNode;if(u.flags&4&&!ur)if(m===null)x.componentDidMount();else{var P=u.elementType===u.type?m.memoizedProps:bn(u.type,m.memoizedProps);x.componentDidUpdate(P,m.memoizedState,x.__reactInternalSnapshotBeforeUpdate)}var E=u.updateQueue;E!==null&&NN(u,E,x);break;case 3:var M=u.updateQueue;if(M!==null){if(m=null,u.child!==null)switch(u.child.tag){case 5:m=u.child.stateNode;break;case 1:m=u.child.stateNode}NN(u,M,m)}break;case 5:var B=u.stateNode;if(m===null&&u.flags&4){m=B;var W=u.memoizedProps;switch(u.type){case"button":case"input":case"select":case"textarea":W.autoFocus&&m.focus();break;case"img":W.src&&(m.src=W.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(u.memoizedState===null){var te=u.alternate;if(te!==null){var fe=te.memoizedState;if(fe!==null){var de=fe.dehydrated;de!==null&&hc(de)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}ur||u.flags&512&&Qv(u)}catch(ue){Mt(u,u.return,ue)}}if(u===s){Pe=null;break}if(m=u.sibling,m!==null){m.return=u.return,Pe=m;break}Pe=u.return}}function NE(s){for(;Pe!==null;){var u=Pe;if(u===s){Pe=null;break}var m=u.sibling;if(m!==null){m.return=u.return,Pe=m;break}Pe=u.return}}function EE(s){for(;Pe!==null;){var u=Pe;try{switch(u.tag){case 0:case 11:case 15:var m=u.return;try{Wd(4,u)}catch(W){Mt(u,m,W)}break;case 1:var x=u.stateNode;if(typeof x.componentDidMount=="function"){var P=u.return;try{x.componentDidMount()}catch(W){Mt(u,P,W)}}var E=u.return;try{Qv(u)}catch(W){Mt(u,E,W)}break;case 5:var M=u.return;try{Qv(u)}catch(W){Mt(u,M,W)}}}catch(W){Mt(u,u.return,W)}if(u===s){Pe=null;break}var B=u.sibling;if(B!==null){B.return=u.return,Pe=B;break}Pe=u.return}}var hU=Math.ceil,Hd=C.ReactCurrentDispatcher,ty=C.ReactCurrentOwner,Jr=C.ReactCurrentBatchConfig,rt=0,Qt=null,Ft=null,ir=0,zr=0,Ss=oa(0),qt=0,Dc=null,no=0,Gd=0,ry=0,$c=null,Cr=null,ny=0,js=1/0,wi=null,Kd=!1,iy=null,da=null,Yd=!1,ha=null,Xd=0,Lc=0,ay=null,Zd=-1,Qd=0;function br(){return(rt&6)!==0?Dt():Zd!==-1?Zd:Zd=Dt()}function pa(s){return(s.mode&1)===0?1:(rt&2)!==0&&ir!==0?ir&-ir:XV.transition!==null?(Qd===0&&(Qd=wA()),Qd):(s=ut,s!==0||(s=window.event,s=s===void 0?16:CA(s.type)),s)}function jn(s,u,m,x){if(50<Lc)throw Lc=0,ay=null,Error(r(185));lc(s,m,x),((rt&2)===0||s!==Qt)&&(s===Qt&&((rt&2)===0&&(Gd|=m),qt===4&&ma(s,ir)),Tr(s,x),m===1&&rt===0&&(u.mode&1)===0&&(js=Dt()+500,Ad&&la()))}function Tr(s,u){var m=s.callbackNode;Xz(s,u);var x=sd(s,s===Qt?ir:0);if(x===0)m!==null&&yA(m),s.callbackNode=null,s.callbackPriority=0;else if(u=x&-x,s.callbackPriority!==u){if(m!=null&&yA(m),u===1)s.tag===0?YV(CE.bind(null,s)):mN(CE.bind(null,s)),WV(function(){(rt&6)===0&&la()}),m=null;else{switch(SA(x)){case 1:m=Lg;break;case 4:m=xA;break;case 16:m=nd;break;case 536870912:m=bA;break;default:m=nd}m=LE(m,OE.bind(null,s))}s.callbackPriority=u,s.callbackNode=m}}function OE(s,u){if(Zd=-1,Qd=0,(rt&6)!==0)throw Error(r(327));var m=s.callbackNode;if(_s()&&s.callbackNode!==m)return null;var x=sd(s,s===Qt?ir:0);if(x===0)return null;if((x&30)!==0||(x&s.expiredLanes)!==0||u)u=Jd(s,x);else{u=x;var P=rt;rt|=2;var E=kE();(Qt!==s||ir!==u)&&(wi=null,js=Dt()+500,ao(s,u));do try{gU();break}catch(B){TE(s,B)}while(!0);jv(),Hd.current=E,rt=P,Ft!==null?u=0:(Qt=null,ir=0,u=qt)}if(u!==0){if(u===2&&(P=Bg(s),P!==0&&(x=P,u=oy(s,P))),u===1)throw m=Dc,ao(s,0),ma(s,x),Tr(s,Dt()),m;if(u===6)ma(s,x);else{if(P=s.current.alternate,(x&30)===0&&!pU(P)&&(u=Jd(s,x),u===2&&(E=Bg(s),E!==0&&(x=E,u=oy(s,E))),u===1))throw m=Dc,ao(s,0),ma(s,x),Tr(s,Dt()),m;switch(s.finishedWork=P,s.finishedLanes=x,u){case 0:case 1:throw Error(r(345));case 2:oo(s,Cr,wi);break;case 3:if(ma(s,x),(x&130023424)===x&&(u=ny+500-Dt(),10<u)){if(sd(s,0)!==0)break;if(P=s.suspendedLanes,(P&x)!==x){br(),s.pingedLanes|=s.suspendedLanes&P;break}s.timeoutHandle=dv(oo.bind(null,s,Cr,wi),u);break}oo(s,Cr,wi);break;case 4:if(ma(s,x),(x&4194240)===x)break;for(u=s.eventTimes,P=-1;0<x;){var M=31-vn(x);E=1<<M,M=u[M],M>P&&(P=M),x&=~E}if(x=P,x=Dt()-x,x=(120>x?120:480>x?480:1080>x?1080:1920>x?1920:3e3>x?3e3:4320>x?4320:1960*hU(x/1960))-x,10<x){s.timeoutHandle=dv(oo.bind(null,s,Cr,wi),x);break}oo(s,Cr,wi);break;case 5:oo(s,Cr,wi);break;default:throw Error(r(329))}}}return Tr(s,Dt()),s.callbackNode===m?OE.bind(null,s):null}function oy(s,u){var m=$c;return s.current.memoizedState.isDehydrated&&(ao(s,u).flags|=256),s=Jd(s,u),s!==2&&(u=Cr,Cr=m,u!==null&&sy(u)),s}function sy(s){Cr===null?Cr=s:Cr.push.apply(Cr,s)}function pU(s){for(var u=s;;){if(u.flags&16384){var m=u.updateQueue;if(m!==null&&(m=m.stores,m!==null))for(var x=0;x<m.length;x++){var P=m[x],E=P.getSnapshot;P=P.value;try{if(!yn(E(),P))return!1}catch{return!1}}}if(m=u.child,u.subtreeFlags&16384&&m!==null)m.return=u,u=m;else{if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function ma(s,u){for(u&=~ry,u&=~Gd,s.suspendedLanes|=u,s.pingedLanes&=~u,s=s.expirationTimes;0<u;){var m=31-vn(u),x=1<<m;s[m]=-1,u&=~x}}function CE(s){if((rt&6)!==0)throw Error(r(327));_s();var u=sd(s,0);if((u&1)===0)return Tr(s,Dt()),null;var m=Jd(s,u);if(s.tag!==0&&m===2){var x=Bg(s);x!==0&&(u=x,m=oy(s,x))}if(m===1)throw m=Dc,ao(s,0),ma(s,u),Tr(s,Dt()),m;if(m===6)throw Error(r(345));return s.finishedWork=s.current.alternate,s.finishedLanes=u,oo(s,Cr,wi),Tr(s,Dt()),null}function ly(s,u){var m=rt;rt|=1;try{return s(u)}finally{rt=m,rt===0&&(js=Dt()+500,Ad&&la())}}function io(s){ha!==null&&ha.tag===0&&(rt&6)===0&&_s();var u=rt;rt|=1;var m=Jr.transition,x=ut;try{if(Jr.transition=null,ut=1,s)return s()}finally{ut=x,Jr.transition=m,rt=u,(rt&6)===0&&la()}}function cy(){zr=Ss.current,bt(Ss)}function ao(s,u){s.finishedWork=null,s.finishedLanes=0;var m=s.timeoutHandle;if(m!==-1&&(s.timeoutHandle=-1,qV(m)),Ft!==null)for(m=Ft.return;m!==null;){var x=m;switch(yv(x),x.tag){case 1:x=x.type.childContextTypes,x!=null&&_d();break;case 3:xs(),bt(Nr),bt(sr),Tv();break;case 5:Ov(x);break;case 4:xs();break;case 13:bt(Nt);break;case 19:bt(Nt);break;case 10:_v(x.type._context);break;case 22:case 23:cy()}m=m.return}if(Qt=s,Ft=s=ga(s.current,null),ir=zr=u,qt=0,Dc=null,ry=Gd=no=0,Cr=$c=null,eo!==null){for(u=0;u<eo.length;u++)if(m=eo[u],x=m.interleaved,x!==null){m.interleaved=null;var P=x.next,E=m.pending;if(E!==null){var M=E.next;E.next=P,x.next=M}m.pending=x}eo=null}return s}function TE(s,u){do{var m=Ft;try{if(jv(),Dd.current=Fd,$d){for(var x=Et.memoizedState;x!==null;){var P=x.queue;P!==null&&(P.pending=null),x=x.next}$d=!1}if(ro=0,Zt=Ut=Et=null,Cc=!1,Tc=0,ty.current=null,m===null||m.return===null){qt=1,Dc=u,Ft=null;break}e:{var E=s,M=m.return,B=m,W=u;if(u=ir,B.flags|=32768,W!==null&&typeof W=="object"&&typeof W.then=="function"){var te=W,fe=B,de=fe.tag;if((fe.mode&1)===0&&(de===0||de===11||de===15)){var ue=fe.alternate;ue?(fe.updateQueue=ue.updateQueue,fe.memoizedState=ue.memoizedState,fe.lanes=ue.lanes):(fe.updateQueue=null,fe.memoizedState=null)}var je=rE(M);if(je!==null){je.flags&=-257,nE(je,M,B,E,u),je.mode&1&&tE(E,te,u),u=je,W=te;var Ne=u.updateQueue;if(Ne===null){var Te=new Set;Te.add(W),u.updateQueue=Te}else Ne.add(W);break e}else{if((u&1)===0){tE(E,te,u),uy();break e}W=Error(r(426))}}else if(jt&&B.mode&1){var $t=rE(M);if($t!==null){($t.flags&65536)===0&&($t.flags|=256),nE($t,M,B,E,u),wv(bs(W,B));break e}}E=W=bs(W,B),qt!==4&&(qt=2),$c===null?$c=[E]:$c.push(E),E=M;do{switch(E.tag){case 3:E.flags|=65536,u&=-u,E.lanes|=u;var J=JN(E,W,u);AN(E,J);break e;case 1:B=W;var X=E.type,ee=E.stateNode;if((E.flags&128)===0&&(typeof X.getDerivedStateFromError=="function"||ee!==null&&typeof ee.componentDidCatch=="function"&&(da===null||!da.has(ee)))){E.flags|=65536,u&=-u,E.lanes|=u;var me=eE(E,B,u);AN(E,me);break e}}E=E.return}while(E!==null)}RE(m)}catch(ke){u=ke,Ft===m&&m!==null&&(Ft=m=m.return);continue}break}while(!0)}function kE(){var s=Hd.current;return Hd.current=Fd,s===null?Fd:s}function uy(){(qt===0||qt===3||qt===2)&&(qt=4),Qt===null||(no&268435455)===0&&(Gd&268435455)===0||ma(Qt,ir)}function Jd(s,u){var m=rt;rt|=2;var x=kE();(Qt!==s||ir!==u)&&(wi=null,ao(s,u));do try{mU();break}catch(P){TE(s,P)}while(!0);if(jv(),rt=m,Hd.current=x,Ft!==null)throw Error(r(261));return Qt=null,ir=0,qt}function mU(){for(;Ft!==null;)ME(Ft)}function gU(){for(;Ft!==null&&!zz();)ME(Ft)}function ME(s){var u=$E(s.alternate,s,zr);s.memoizedProps=s.pendingProps,u===null?RE(s):Ft=u,ty.current=null}function RE(s){var u=s;do{var m=u.alternate;if(s=u.return,(u.flags&32768)===0){if(m=lU(m,u,zr),m!==null){Ft=m;return}}else{if(m=cU(m,u),m!==null){m.flags&=32767,Ft=m;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{qt=6,Ft=null;return}}if(u=u.sibling,u!==null){Ft=u;return}Ft=u=s}while(u!==null);qt===0&&(qt=5)}function oo(s,u,m){var x=ut,P=Jr.transition;try{Jr.transition=null,ut=1,vU(s,u,m,x)}finally{Jr.transition=P,ut=x}return null}function vU(s,u,m,x){do _s();while(ha!==null);if((rt&6)!==0)throw Error(r(327));m=s.finishedWork;var P=s.finishedLanes;if(m===null)return null;if(s.finishedWork=null,s.finishedLanes=0,m===s.current)throw Error(r(177));s.callbackNode=null,s.callbackPriority=0;var E=m.lanes|m.childLanes;if(Zz(s,E),s===Qt&&(Ft=Qt=null,ir=0),(m.subtreeFlags&2064)===0&&(m.flags&2064)===0||Yd||(Yd=!0,LE(nd,function(){return _s(),null})),E=(m.flags&15990)!==0,(m.subtreeFlags&15990)!==0||E){E=Jr.transition,Jr.transition=null;var M=ut;ut=1;var B=rt;rt|=4,ty.current=null,fU(s,m),_E(m,s),$V(uv),ud=!!cv,uv=cv=null,s.current=m,dU(m),Vz(),rt=B,ut=M,Jr.transition=E}else s.current=m;if(Yd&&(Yd=!1,ha=s,Xd=P),E=s.pendingLanes,E===0&&(da=null),Wz(m.stateNode),Tr(s,Dt()),u!==null)for(x=s.onRecoverableError,m=0;m<u.length;m++)P=u[m],x(P.value,{componentStack:P.stack,digest:P.digest});if(Kd)throw Kd=!1,s=iy,iy=null,s;return(Xd&1)!==0&&s.tag!==0&&_s(),E=s.pendingLanes,(E&1)!==0?s===ay?Lc++:(Lc=0,ay=s):Lc=0,la(),null}function _s(){if(ha!==null){var s=SA(Xd),u=Jr.transition,m=ut;try{if(Jr.transition=null,ut=16>s?16:s,ha===null)var x=!1;else{if(s=ha,ha=null,Xd=0,(rt&6)!==0)throw Error(r(331));var P=rt;for(rt|=4,Pe=s.current;Pe!==null;){var E=Pe,M=E.child;if((Pe.flags&16)!==0){var B=E.deletions;if(B!==null){for(var W=0;W<B.length;W++){var te=B[W];for(Pe=te;Pe!==null;){var fe=Pe;switch(fe.tag){case 0:case 11:case 15:Ic(8,fe,E)}var de=fe.child;if(de!==null)de.return=fe,Pe=de;else for(;Pe!==null;){fe=Pe;var ue=fe.sibling,je=fe.return;if(xE(fe),fe===te){Pe=null;break}if(ue!==null){ue.return=je,Pe=ue;break}Pe=je}}}var Ne=E.alternate;if(Ne!==null){var Te=Ne.child;if(Te!==null){Ne.child=null;do{var $t=Te.sibling;Te.sibling=null,Te=$t}while(Te!==null)}}Pe=E}}if((E.subtreeFlags&2064)!==0&&M!==null)M.return=E,Pe=M;else e:for(;Pe!==null;){if(E=Pe,(E.flags&2048)!==0)switch(E.tag){case 0:case 11:case 15:Ic(9,E,E.return)}var J=E.sibling;if(J!==null){J.return=E.return,Pe=J;break e}Pe=E.return}}var X=s.current;for(Pe=X;Pe!==null;){M=Pe;var ee=M.child;if((M.subtreeFlags&2064)!==0&&ee!==null)ee.return=M,Pe=ee;else e:for(M=X;Pe!==null;){if(B=Pe,(B.flags&2048)!==0)try{switch(B.tag){case 0:case 11:case 15:Wd(9,B)}}catch(ke){Mt(B,B.return,ke)}if(B===M){Pe=null;break e}var me=B.sibling;if(me!==null){me.return=B.return,Pe=me;break e}Pe=B.return}}if(rt=P,la(),Un&&typeof Un.onPostCommitFiberRoot=="function")try{Un.onPostCommitFiberRoot(id,s)}catch{}x=!0}return x}finally{ut=m,Jr.transition=u}}return!1}function IE(s,u,m){u=bs(m,u),u=JN(s,u,1),s=ua(s,u,1),u=br(),s!==null&&(lc(s,1,u),Tr(s,u))}function Mt(s,u,m){if(s.tag===3)IE(s,s,m);else for(;u!==null;){if(u.tag===3){IE(u,s,m);break}else if(u.tag===1){var x=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof x.componentDidCatch=="function"&&(da===null||!da.has(x))){s=bs(m,s),s=eE(u,s,1),u=ua(u,s,1),s=br(),u!==null&&(lc(u,1,s),Tr(u,s));break}}u=u.return}}function yU(s,u,m){var x=s.pingCache;x!==null&&x.delete(u),u=br(),s.pingedLanes|=s.suspendedLanes&m,Qt===s&&(ir&m)===m&&(qt===4||qt===3&&(ir&130023424)===ir&&500>Dt()-ny?ao(s,0):ry|=m),Tr(s,u)}function DE(s,u){u===0&&((s.mode&1)===0?u=1:(u=od,od<<=1,(od&130023424)===0&&(od=4194304)));var m=br();s=yi(s,u),s!==null&&(lc(s,u,m),Tr(s,m))}function xU(s){var u=s.memoizedState,m=0;u!==null&&(m=u.retryLane),DE(s,m)}function bU(s,u){var m=0;switch(s.tag){case 13:var x=s.stateNode,P=s.memoizedState;P!==null&&(m=P.retryLane);break;case 19:x=s.stateNode;break;default:throw Error(r(314))}x!==null&&x.delete(u),DE(s,m)}var $E;$E=function(s,u,m){if(s!==null)if(s.memoizedProps!==u.pendingProps||Nr.current)Or=!0;else{if((s.lanes&m)===0&&(u.flags&128)===0)return Or=!1,sU(s,u,m);Or=(s.flags&131072)!==0}else Or=!1,jt&&(u.flags&1048576)!==0&&gN(u,Ed,u.index);switch(u.lanes=0,u.tag){case 2:var x=u.type;Ud(s,u),s=u.pendingProps;var P=ds(u,sr.current);ys(u,m),P=Rv(null,u,x,s,P,m);var E=Iv();return u.flags|=1,typeof P=="object"&&P!==null&&typeof P.render=="function"&&P.$$typeof===void 0?(u.tag=1,u.memoizedState=null,u.updateQueue=null,Er(x)?(E=!0,Pd(u)):E=!1,u.memoizedState=P.state!==null&&P.state!==void 0?P.state:null,Nv(u),P.updater=zd,u.stateNode=P,P._reactInternals=u,zv(u,x,s,m),u=Wv(null,u,x,!0,E,m)):(u.tag=0,jt&&E&&vv(u),xr(null,u,P,m),u=u.child),u;case 16:x=u.elementType;e:{switch(Ud(s,u),s=u.pendingProps,P=x._init,x=P(x._payload),u.type=x,P=u.tag=SU(x),s=bn(x,s),P){case 0:u=qv(null,u,x,s,m);break e;case 1:u=cE(null,u,x,s,m);break e;case 11:u=iE(null,u,x,s,m);break e;case 14:u=aE(null,u,x,bn(x.type,s),m);break e}throw Error(r(306,x,""))}return u;case 0:return x=u.type,P=u.pendingProps,P=u.elementType===x?P:bn(x,P),qv(s,u,x,P,m);case 1:return x=u.type,P=u.pendingProps,P=u.elementType===x?P:bn(x,P),cE(s,u,x,P,m);case 3:e:{if(uE(u),s===null)throw Error(r(387));x=u.pendingProps,E=u.memoizedState,P=E.element,PN(s,u),Rd(u,x,null,m);var M=u.memoizedState;if(x=M.element,E.isDehydrated)if(E={element:x,isDehydrated:!1,cache:M.cache,pendingSuspenseBoundaries:M.pendingSuspenseBoundaries,transitions:M.transitions},u.updateQueue.baseState=E,u.memoizedState=E,u.flags&256){P=bs(Error(r(423)),u),u=fE(s,u,x,m,P);break e}else if(x!==P){P=bs(Error(r(424)),u),u=fE(s,u,x,m,P);break e}else for(Fr=aa(u.stateNode.containerInfo.firstChild),Br=u,jt=!0,xn=null,m=jN(u,null,x,m),u.child=m;m;)m.flags=m.flags&-3|4096,m=m.sibling;else{if(ms(),x===P){u=bi(s,u,m);break e}xr(s,u,x,m)}u=u.child}return u;case 5:return EN(u),s===null&&bv(u),x=u.type,P=u.pendingProps,E=s!==null?s.memoizedProps:null,M=P.children,fv(x,P)?M=null:E!==null&&fv(x,E)&&(u.flags|=32),lE(s,u),xr(s,u,M,m),u.child;case 6:return s===null&&bv(u),null;case 13:return dE(s,u,m);case 4:return Ev(u,u.stateNode.containerInfo),x=u.pendingProps,s===null?u.child=gs(u,null,x,m):xr(s,u,x,m),u.child;case 11:return x=u.type,P=u.pendingProps,P=u.elementType===x?P:bn(x,P),iE(s,u,x,P,m);case 7:return xr(s,u,u.pendingProps,m),u.child;case 8:return xr(s,u,u.pendingProps.children,m),u.child;case 12:return xr(s,u,u.pendingProps.children,m),u.child;case 10:e:{if(x=u.type._context,P=u.pendingProps,E=u.memoizedProps,M=P.value,mt(Td,x._currentValue),x._currentValue=M,E!==null)if(yn(E.value,M)){if(E.children===P.children&&!Nr.current){u=bi(s,u,m);break e}}else for(E=u.child,E!==null&&(E.return=u);E!==null;){var B=E.dependencies;if(B!==null){M=E.child;for(var W=B.firstContext;W!==null;){if(W.context===x){if(E.tag===1){W=xi(-1,m&-m),W.tag=2;var te=E.updateQueue;if(te!==null){te=te.shared;var fe=te.pending;fe===null?W.next=W:(W.next=fe.next,fe.next=W),te.pending=W}}E.lanes|=m,W=E.alternate,W!==null&&(W.lanes|=m),Pv(E.return,m,u),B.lanes|=m;break}W=W.next}}else if(E.tag===10)M=E.type===u.type?null:E.child;else if(E.tag===18){if(M=E.return,M===null)throw Error(r(341));M.lanes|=m,B=M.alternate,B!==null&&(B.lanes|=m),Pv(M,m,u),M=E.sibling}else M=E.child;if(M!==null)M.return=E;else for(M=E;M!==null;){if(M===u){M=null;break}if(E=M.sibling,E!==null){E.return=M.return,M=E;break}M=M.return}E=M}xr(s,u,P.children,m),u=u.child}return u;case 9:return P=u.type,x=u.pendingProps.children,ys(u,m),P=Zr(P),x=x(P),u.flags|=1,xr(s,u,x,m),u.child;case 14:return x=u.type,P=bn(x,u.pendingProps),P=bn(x.type,P),aE(s,u,x,P,m);case 15:return oE(s,u,u.type,u.pendingProps,m);case 17:return x=u.type,P=u.pendingProps,P=u.elementType===x?P:bn(x,P),Ud(s,u),u.tag=1,Er(x)?(s=!0,Pd(u)):s=!1,ys(u,m),ZN(u,x,P),zv(u,x,P,m),Wv(null,u,x,!0,s,m);case 19:return pE(s,u,m);case 22:return sE(s,u,m)}throw Error(r(156,u.tag))};function LE(s,u){return vA(s,u)}function wU(s,u,m,x){this.tag=s,this.key=m,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=x,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function en(s,u,m,x){return new wU(s,u,m,x)}function fy(s){return s=s.prototype,!(!s||!s.isReactComponent)}function SU(s){if(typeof s=="function")return fy(s)?1:0;if(s!=null){if(s=s.$$typeof,s===L)return 11;if(s===K)return 14}return 2}function ga(s,u){var m=s.alternate;return m===null?(m=en(s.tag,u,s.key,s.mode),m.elementType=s.elementType,m.type=s.type,m.stateNode=s.stateNode,m.alternate=s,s.alternate=m):(m.pendingProps=u,m.type=s.type,m.flags=0,m.subtreeFlags=0,m.deletions=null),m.flags=s.flags&14680064,m.childLanes=s.childLanes,m.lanes=s.lanes,m.child=s.child,m.memoizedProps=s.memoizedProps,m.memoizedState=s.memoizedState,m.updateQueue=s.updateQueue,u=s.dependencies,m.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},m.sibling=s.sibling,m.index=s.index,m.ref=s.ref,m}function eh(s,u,m,x,P,E){var M=2;if(x=s,typeof s=="function")fy(s)&&(M=1);else if(typeof s=="string")M=5;else e:switch(s){case T:return so(m.children,P,E,u);case k:M=8,P|=8;break;case R:return s=en(12,m,u,P|2),s.elementType=R,s.lanes=E,s;case V:return s=en(13,m,u,P),s.elementType=V,s.lanes=E,s;case Y:return s=en(19,m,u,P),s.elementType=Y,s.lanes=E,s;case G:return th(m,P,E,u);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case F:M=10;break e;case I:M=9;break e;case L:M=11;break e;case K:M=14;break e;case z:M=16,x=null;break e}throw Error(r(130,s==null?s:typeof s,""))}return u=en(M,m,u,P),u.elementType=s,u.type=x,u.lanes=E,u}function so(s,u,m,x){return s=en(7,s,x,u),s.lanes=m,s}function th(s,u,m,x){return s=en(22,s,x,u),s.elementType=G,s.lanes=m,s.stateNode={isHidden:!1},s}function dy(s,u,m){return s=en(6,s,null,u),s.lanes=m,s}function hy(s,u,m){return u=en(4,s.children!==null?s.children:[],s.key,u),u.lanes=m,u.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},u}function jU(s,u,m,x,P){this.tag=u,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Fg(0),this.expirationTimes=Fg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fg(0),this.identifierPrefix=x,this.onRecoverableError=P,this.mutableSourceEagerHydrationData=null}function py(s,u,m,x,P,E,M,B,W){return s=new jU(s,u,m,B,W),u===1?(u=1,E===!0&&(u|=8)):u=0,E=en(3,null,null,u),s.current=E,E.stateNode=s,E.memoizedState={element:x,isDehydrated:m,cache:null,transitions:null,pendingSuspenseBoundaries:null},Nv(E),s}function _U(s,u,m){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:O,key:x==null?null:""+x,children:s,containerInfo:u,implementation:m}}function BE(s){if(!s)return sa;s=s._reactInternals;e:{if(Ya(s)!==s||s.tag!==1)throw Error(r(170));var u=s;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(Er(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(u!==null);throw Error(r(171))}if(s.tag===1){var m=s.type;if(Er(m))return hN(s,m,u)}return u}function FE(s,u,m,x,P,E,M,B,W){return s=py(m,x,!0,s,P,E,M,B,W),s.context=BE(null),m=s.current,x=br(),P=pa(m),E=xi(x,P),E.callback=u??null,ua(m,E,P),s.current.lanes=P,lc(s,P,x),Tr(s,x),s}function rh(s,u,m,x){var P=u.current,E=br(),M=pa(P);return m=BE(m),u.context===null?u.context=m:u.pendingContext=m,u=xi(E,M),u.payload={element:s},x=x===void 0?null:x,x!==null&&(u.callback=x),s=ua(P,u,M),s!==null&&(jn(s,P,M,E),Md(s,P,M)),M}function nh(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function zE(s,u){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var m=s.retryLane;s.retryLane=m!==0&&m<u?m:u}}function my(s,u){zE(s,u),(s=s.alternate)&&zE(s,u)}function PU(){return null}var VE=typeof reportError=="function"?reportError:function(s){console.error(s)};function gy(s){this._internalRoot=s}ih.prototype.render=gy.prototype.render=function(s){var u=this._internalRoot;if(u===null)throw Error(r(409));rh(s,u,null,null)},ih.prototype.unmount=gy.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var u=s.containerInfo;io(function(){rh(null,s,null,null)}),u[pi]=null}};function ih(s){this._internalRoot=s}ih.prototype.unstable_scheduleHydration=function(s){if(s){var u=PA();s={blockedOn:null,target:s,priority:u};for(var m=0;m<ra.length&&u!==0&&u<ra[m].priority;m++);ra.splice(m,0,s),m===0&&EA(s)}};function vy(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function ah(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function UE(){}function AU(s,u,m,x,P){if(P){if(typeof x=="function"){var E=x;x=function(){var te=nh(M);E.call(te)}}var M=FE(u,x,s,0,null,!1,!1,"",UE);return s._reactRootContainer=M,s[pi]=M.current,Sc(s.nodeType===8?s.parentNode:s),io(),M}for(;P=s.lastChild;)s.removeChild(P);if(typeof x=="function"){var B=x;x=function(){var te=nh(W);B.call(te)}}var W=py(s,0,!1,null,null,!1,!1,"",UE);return s._reactRootContainer=W,s[pi]=W.current,Sc(s.nodeType===8?s.parentNode:s),io(function(){rh(u,W,m,x)}),W}function oh(s,u,m,x,P){var E=m._reactRootContainer;if(E){var M=E;if(typeof P=="function"){var B=P;P=function(){var W=nh(M);B.call(W)}}rh(u,M,s,P)}else M=AU(m,u,s,P,x);return nh(M)}jA=function(s){switch(s.tag){case 3:var u=s.stateNode;if(u.current.memoizedState.isDehydrated){var m=sc(u.pendingLanes);m!==0&&(zg(u,m|1),Tr(u,Dt()),(rt&6)===0&&(js=Dt()+500,la()))}break;case 13:io(function(){var x=yi(s,1);if(x!==null){var P=br();jn(x,s,1,P)}}),my(s,1)}},Vg=function(s){if(s.tag===13){var u=yi(s,134217728);if(u!==null){var m=br();jn(u,s,134217728,m)}my(s,134217728)}},_A=function(s){if(s.tag===13){var u=pa(s),m=yi(s,u);if(m!==null){var x=br();jn(m,s,u,x)}my(s,u)}},PA=function(){return ut},AA=function(s,u){var m=ut;try{return ut=s,u()}finally{ut=m}},ec=function(s,u,m){switch(u){case"input":if(Je(s,m),u=m.name,m.type==="radio"&&u!=null){for(m=s;m.parentNode;)m=m.parentNode;for(m=m.querySelectorAll("input[name="+JSON.stringify(""+u)+'][type="radio"]'),u=0;u<m.length;u++){var x=m[u];if(x!==s&&x.form===s.form){var P=jd(x);if(!P)throw Error(r(90));Z(x),Je(x,P)}}}break;case"textarea":Xt(s,m);break;case"select":u=m.value,u!=null&&pe(s,!!m.multiple,u,!1)}},nc=ly,ed=io;var NU={usingClientEntryPoint:!1,Events:[Pc,us,jd,Jf,rc,ly]},Bc={findFiberByHostInstance:Xa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},EU={bundleType:Bc.bundleType,version:Bc.version,rendererPackageName:Bc.rendererPackageName,rendererConfig:Bc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=mA(s),s===null?null:s.stateNode},findFiberByHostInstance:Bc.findFiberByHostInstance||PU,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var sh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sh.isDisabled&&sh.supportsFiber)try{id=sh.inject(EU),Un=sh}catch{}}return kr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=NU,kr.createPortal=function(s,u){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vy(u))throw Error(r(200));return _U(s,u,null,m)},kr.createRoot=function(s,u){if(!vy(s))throw Error(r(299));var m=!1,x="",P=VE;return u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(x=u.identifierPrefix),u.onRecoverableError!==void 0&&(P=u.onRecoverableError)),u=py(s,1,!1,null,null,m,!1,x,P),s[pi]=u.current,Sc(s.nodeType===8?s.parentNode:s),new gy(u)},kr.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var u=s._reactInternals;if(u===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=mA(u),s=s===null?null:s.stateNode,s},kr.flushSync=function(s){return io(s)},kr.hydrate=function(s,u,m){if(!ah(u))throw Error(r(200));return oh(null,s,u,!0,m)},kr.hydrateRoot=function(s,u,m){if(!vy(s))throw Error(r(405));var x=m!=null&&m.hydratedSources||null,P=!1,E="",M=VE;if(m!=null&&(m.unstable_strictMode===!0&&(P=!0),m.identifierPrefix!==void 0&&(E=m.identifierPrefix),m.onRecoverableError!==void 0&&(M=m.onRecoverableError)),u=FE(u,null,s,1,m??null,P,!1,E,M),s[pi]=u.current,Sc(s),x)for(s=0;s<x.length;s++)m=x[s],P=m._getVersion,P=P(m._source),u.mutableSourceEagerHydrationData==null?u.mutableSourceEagerHydrationData=[m,P]:u.mutableSourceEagerHydrationData.push(m,P);return new ih(u)},kr.render=function(s,u,m){if(!ah(u))throw Error(r(200));return oh(null,s,u,!1,m)},kr.unmountComponentAtNode=function(s){if(!ah(s))throw Error(r(40));return s._reactRootContainer?(io(function(){oh(null,null,s,!1,function(){s._reactRootContainer=null,s[pi]=null})}),!0):!1},kr.unstable_batchedUpdates=ly,kr.unstable_renderSubtreeIntoContainer=function(s,u,m,x){if(!ah(m))throw Error(r(200));if(s==null||s._reactInternals===void 0)throw Error(r(38));return oh(s,u,m,!1,x)},kr.version="18.3.1-next-f1338f8080-20240426",kr}var QE;function x$(){if(QE)return by.exports;QE=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(),by.exports=LU(),by.exports}var JE;function BU(){if(JE)return ch;JE=1;var e=x$();return ch.createRoot=e.createRoot,ch.hydrateRoot=e.hydrateRoot,ch}var FU=BU(),zc={},eO;function zU(){if(eO)return zc;eO=1,Object.defineProperty(zc,"__esModule",{value:!0}),zc.parse=o,zc.serialize=f;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,n=/^[\u0020-\u003A\u003D-\u007E]*$/,i=Object.prototype.toString,a=(()=>{const g=function(){};return g.prototype=Object.create(null),g})();function o(g,v){const w=new a,y=g.length;if(y<2)return w;const b=(v==null?void 0:v.decode)||h;let S=0;do{const A=g.indexOf("=",S);if(A===-1)break;const _=g.indexOf(";",S),C=_===-1?y:_;if(A>C){S=g.lastIndexOf(";",A-1)+1;continue}const N=l(g,S,A),O=c(g,A,N),T=g.slice(N,O);if(w[T]===void 0){let k=l(g,A+1,C),R=c(g,C,k);const F=b(g.slice(k,R));w[T]=F}S=C+1}while(S<y);return w}function l(g,v,w){do{const y=g.charCodeAt(v);if(y!==32&&y!==9)return v}while(++v<w);return w}function c(g,v,w){for(;v>w;){const y=g.charCodeAt(--v);if(y!==32&&y!==9)return v+1}return w}function f(g,v,w){const y=(w==null?void 0:w.encode)||encodeURIComponent;if(!e.test(g))throw new TypeError(`argument name is invalid: ${g}`);const b=y(v);if(!t.test(b))throw new TypeError(`argument val is invalid: ${v}`);let S=g+"="+b;if(!w)return S;if(w.maxAge!==void 0){if(!Number.isInteger(w.maxAge))throw new TypeError(`option maxAge is invalid: ${w.maxAge}`);S+="; Max-Age="+w.maxAge}if(w.domain){if(!r.test(w.domain))throw new TypeError(`option domain is invalid: ${w.domain}`);S+="; Domain="+w.domain}if(w.path){if(!n.test(w.path))throw new TypeError(`option path is invalid: ${w.path}`);S+="; Path="+w.path}if(w.expires){if(!p(w.expires)||!Number.isFinite(w.expires.valueOf()))throw new TypeError(`option expires is invalid: ${w.expires}`);S+="; Expires="+w.expires.toUTCString()}if(w.httpOnly&&(S+="; HttpOnly"),w.secure&&(S+="; Secure"),w.partitioned&&(S+="; Partitioned"),w.priority)switch(typeof w.priority=="string"?w.priority.toLowerCase():void 0){case"low":S+="; Priority=Low";break;case"medium":S+="; Priority=Medium";break;case"high":S+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${w.priority}`)}if(w.sameSite)switch(typeof w.sameSite=="string"?w.sameSite.toLowerCase():w.sameSite){case!0:case"strict":S+="; SameSite=Strict";break;case"lax":S+="; SameSite=Lax";break;case"none":S+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${w.sameSite}`)}return S}function h(g){if(g.indexOf("%")===-1)return g;try{return decodeURIComponent(g)}catch{return g}}function p(g){return i.call(g)==="[object Date]"}return zc}zU();var tO="popstate";function VU(e={}){function t(n,i){let{pathname:a,search:o,hash:l}=n.location;return n1("",{pathname:a,search:o,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:Su(i)}return qU(t,r,null,e)}function Pt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function dn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function UU(){return Math.random().toString(36).substring(2,10)}function rO(e,t){return{usr:e.state,key:e.key,idx:t}}function n1(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?jl(t):t,state:r,key:t&&t.key||n||UU()}}function Su({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function jl(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function qU(e,t,r,n={}){let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,l="POP",c=null,f=h();f==null&&(f=0,o.replaceState({...o.state,idx:f},""));function h(){return(o.state||{idx:null}).idx}function p(){l="POP";let b=h(),S=b==null?null:b-f;f=b,c&&c({action:l,location:y.location,delta:S})}function g(b,S){l="PUSH";let A=n1(y.location,b,S);f=h()+1;let _=rO(A,f),C=y.createHref(A);try{o.pushState(_,"",C)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;i.location.assign(C)}a&&c&&c({action:l,location:y.location,delta:1})}function v(b,S){l="REPLACE";let A=n1(y.location,b,S);f=h();let _=rO(A,f),C=y.createHref(A);o.replaceState(_,"",C),a&&c&&c({action:l,location:y.location,delta:0})}function w(b){return WU(b)}let y={get action(){return l},get location(){return e(i,o)},listen(b){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(tO,p),c=b,()=>{i.removeEventListener(tO,p),c=null}},createHref(b){return t(i,b)},createURL:w,encodeLocation(b){let S=w(b);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:g,replace:v,go(b){return o.go(b)}};return y}function WU(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Pt(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:Su(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function b$(e,t,r="/"){return HU(e,t,r,!1)}function HU(e,t,r,n){let i=typeof t=="string"?jl(t):t,a=$i(i.pathname||"/",r);if(a==null)return null;let o=w$(e);GU(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let f=iq(a);l=rq(o[c],f,n)}return l}function w$(e,t=[],r=[],n=""){let i=(a,o,l)=>{let c={relativePath:l===void 0?a.path||"":l,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};c.relativePath.startsWith("/")&&(Pt(c.relativePath.startsWith(n),`Absolute route path "${c.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(n.length));let f=Ti([n,c.relativePath]),h=r.concat(c);a.children&&a.children.length>0&&(Pt(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),w$(a.children,t,h,f)),!(a.path==null&&!a.index)&&t.push({path:f,score:eq(f,a.index),routesMeta:h})};return e.forEach((a,o)=>{var l;if(a.path===""||!((l=a.path)!=null&&l.includes("?")))i(a,o);else for(let c of S$(a.path))i(a,o,c)}),t}function S$(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=S$(n.join("/")),l=[];return l.push(...o.map(c=>c===""?a:[a,c].join("/"))),i&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function GU(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:tq(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var KU=/^:[\w-]+$/,YU=3,XU=2,ZU=1,QU=10,JU=-2,nO=e=>e==="*";function eq(e,t){let r=e.split("/"),n=r.length;return r.some(nO)&&(n+=JU),t&&(n+=XU),r.filter(i=>!nO(i)).reduce((i,a)=>i+(KU.test(a)?YU:a===""?ZU:QU),n)}function tq(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function rq(e,t,r=!1){let{routesMeta:n}=e,i={},a="/",o=[];for(let l=0;l<n.length;++l){let c=n[l],f=l===n.length-1,h=a==="/"?t:t.slice(a.length)||"/",p=Xh({path:c.relativePath,caseSensitive:c.caseSensitive,end:f},h),g=c.route;if(!p&&f&&r&&!n[n.length-1].route.index&&(p=Xh({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},h)),!p)return null;Object.assign(i,p.params),o.push({params:i,pathname:Ti([a,p.pathname]),pathnameBase:lq(Ti([a,p.pathnameBase])),route:g}),p.pathnameBase!=="/"&&(a=Ti([a,p.pathnameBase]))}return o}function Xh(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=nq(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:n.reduce((f,{paramName:h,isOptional:p},g)=>{if(h==="*"){let w=l[g]||"";o=a.slice(0,a.length-w.length).replace(/(.)\/+$/,"$1")}const v=l[g];return p&&!v?f[h]=void 0:f[h]=(v||"").replace(/%2F/g,"/"),f},{}),pathname:a,pathnameBase:o,pattern:e}}function nq(e,t=!1,r=!0){dn(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 n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(n.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function iq(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return dn(!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 $i(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function aq(e,t="/"){let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?jl(e):e;return{pathname:r?r.startsWith("/")?r:oq(r,t):t,search:cq(n),hash:uq(i)}}function oq(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function jy(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function sq(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Sj(e){let t=sq(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function jj(e,t,r,n=!1){let i;typeof e=="string"?i=jl(e):(i={...e},Pt(!i.pathname||!i.pathname.includes("?"),jy("?","pathname","search",i)),Pt(!i.pathname||!i.pathname.includes("#"),jy("#","pathname","hash",i)),Pt(!i.search||!i.search.includes("#"),jy("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,l;if(o==null)l=r;else{let p=t.length-1;if(!n&&o.startsWith("..")){let g=o.split("/");for(;g[0]==="..";)g.shift(),p-=1;i.pathname=g.join("/")}l=p>=0?t[p]:"/"}let c=aq(i,l),f=o&&o!=="/"&&o.endsWith("/"),h=(a||o===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(f||h)&&(c.pathname+="/"),c}var Ti=e=>e.join("/").replace(/\/\/+/g,"/"),lq=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),cq=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,uq=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function fq(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var j$=["POST","PUT","PATCH","DELETE"];new Set(j$);var dq=["GET",...j$];new Set(dq);var _l=j.createContext(null);_l.displayName="DataRouter";var dm=j.createContext(null);dm.displayName="DataRouterState";var _$=j.createContext({isTransitioning:!1});_$.displayName="ViewTransition";var hq=j.createContext(new Map);hq.displayName="Fetchers";var pq=j.createContext(null);pq.displayName="Await";var $n=j.createContext(null);$n.displayName="Navigation";var _f=j.createContext(null);_f.displayName="Location";var Ln=j.createContext({outlet:null,matches:[],isDataRoute:!1});Ln.displayName="Route";var _j=j.createContext(null);_j.displayName="RouteError";function mq(e,{relative:t}={}){Pt(Pl(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=j.useContext($n),{hash:i,pathname:a,search:o}=Pf(e,{relative:t}),l=a;return r!=="/"&&(l=a==="/"?r:Ti([r,a])),n.createHref({pathname:l,search:o,hash:i})}function Pl(){return j.useContext(_f)!=null}function Gi(){return Pt(Pl(),"useLocation() may be used only in the context of a <Router> component."),j.useContext(_f).location}var P$="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function A$(e){j.useContext($n).static||j.useLayoutEffect(e)}function pn(){let{isDataRoute:e}=j.useContext(Ln);return e?Eq():gq()}function gq(){Pt(Pl(),"useNavigate() may be used only in the context of a <Router> component.");let e=j.useContext(_l),{basename:t,navigator:r}=j.useContext($n),{matches:n}=j.useContext(Ln),{pathname:i}=Gi(),a=JSON.stringify(Sj(n)),o=j.useRef(!1);return A$(()=>{o.current=!0}),j.useCallback((c,f={})=>{if(dn(o.current,P$),!o.current)return;if(typeof c=="number"){r.go(c);return}let h=jj(c,JSON.parse(a),i,f.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Ti([t,h.pathname])),(f.replace?r.replace:r.push)(h,f.state,f)},[t,r,a,i,e])}j.createContext(null);function Pj(){let{matches:e}=j.useContext(Ln),t=e[e.length-1];return t?t.params:{}}function Pf(e,{relative:t}={}){let{matches:r}=j.useContext(Ln),{pathname:n}=Gi(),i=JSON.stringify(Sj(r));return j.useMemo(()=>jj(e,JSON.parse(i),n,t==="path"),[e,i,n,t])}function vq(e,t){return N$(e,t)}function N$(e,t,r,n){var A;Pt(Pl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i,static:a}=j.useContext($n),{matches:o}=j.useContext(Ln),l=o[o.length-1],c=l?l.params:{},f=l?l.pathname:"/",h=l?l.pathnameBase:"/",p=l&&l.route;{let _=p&&p.path||"";E$(f,!p||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${_}">) 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="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let g=Gi(),v;if(t){let _=typeof t=="string"?jl(t):t;Pt(h==="/"||((A=_.pathname)==null?void 0:A.startsWith(h)),`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 "${h}" but pathname "${_.pathname}" was given in the \`location\` prop.`),v=_}else v=g;let w=v.pathname||"/",y=w;if(h!=="/"){let _=h.replace(/^\//,"").split("/");y="/"+w.replace(/^\//,"").split("/").slice(_.length).join("/")}let b=!a&&r&&r.matches&&r.matches.length>0?r.matches:b$(e,{pathname:y});dn(p||b!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),dn(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.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 S=Sq(b&&b.map(_=>Object.assign({},_,{params:Object.assign({},c,_.params),pathname:Ti([h,i.encodeLocation?i.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?h:Ti([h,i.encodeLocation?i.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),o,r,n);return t&&S?j.createElement(_f.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},S):S}function yq(){let e=Nq(),t=fq(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=j.createElement(j.Fragment,null,j.createElement("p",null,"💿 Hey developer 👋"),j.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",j.createElement("code",{style:a},"ErrorBoundary")," or"," ",j.createElement("code",{style:a},"errorElement")," prop on your route.")),j.createElement(j.Fragment,null,j.createElement("h2",null,"Unexpected Application Error!"),j.createElement("h3",{style:{fontStyle:"italic"}},t),r?j.createElement("pre",{style:i},r):null,o)}var xq=j.createElement(yq,null),bq=class extends j.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){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?j.createElement(Ln.Provider,{value:this.props.routeContext},j.createElement(_j.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function wq({routeContext:e,match:t,children:r}){let n=j.useContext(_l);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),j.createElement(Ln.Provider,{value:e},r)}function Sq(e,t=[],r=null,n=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r==null?void 0:r.errors;if(a!=null){let c=i.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);Pt(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),i=i.slice(0,Math.min(i.length,c+1))}let o=!1,l=-1;if(r)for(let c=0;c<i.length;c++){let f=i[c];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(l=c),f.route.id){let{loaderData:h,errors:p}=r,g=f.route.loader&&!h.hasOwnProperty(f.route.id)&&(!p||p[f.route.id]===void 0);if(f.route.lazy||g){o=!0,l>=0?i=i.slice(0,l+1):i=[i[0]];break}}}return i.reduceRight((c,f,h)=>{let p,g=!1,v=null,w=null;r&&(p=a&&f.route.id?a[f.route.id]:void 0,v=f.route.errorElement||xq,o&&(l<0&&h===0?(E$("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,w=null):l===h&&(g=!0,w=f.route.hydrateFallbackElement||null)));let y=t.concat(i.slice(0,h+1)),b=()=>{let S;return p?S=v:g?S=w:f.route.Component?S=j.createElement(f.route.Component,null):f.route.element?S=f.route.element:S=c,j.createElement(wq,{match:f,routeContext:{outlet:c,matches:y,isDataRoute:r!=null},children:S})};return r&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?j.createElement(bq,{location:r.location,revalidation:r.revalidation,component:v,error:p,children:b(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):b()},null)}function Aj(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jq(e){let t=j.useContext(_l);return Pt(t,Aj(e)),t}function _q(e){let t=j.useContext(dm);return Pt(t,Aj(e)),t}function Pq(e){let t=j.useContext(Ln);return Pt(t,Aj(e)),t}function Nj(e){let t=Pq(e),r=t.matches[t.matches.length-1];return Pt(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Aq(){return Nj("useRouteId")}function Nq(){var n;let e=j.useContext(_j),t=_q("useRouteError"),r=Nj("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function Eq(){let{router:e}=jq("useNavigate"),t=Nj("useNavigate"),r=j.useRef(!1);return A$(()=>{r.current=!0}),j.useCallback(async(i,a={})=>{dn(r.current,P$),r.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...a}))},[e,t])}var iO={};function E$(e,t,r){!t&&!iO[e]&&(iO[e]=!0,dn(!1,r))}j.memo(Oq);function Oq({routes:e,future:t,state:r}){return N$(e,void 0,r,t)}function O$({to:e,replace:t,state:r,relative:n}){Pt(Pl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=j.useContext($n);dn(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=j.useContext(Ln),{pathname:o}=Gi(),l=pn(),c=jj(e,Sj(a),o,n==="path"),f=JSON.stringify(c);return j.useEffect(()=>{l(JSON.parse(f),{replace:t,state:r,relative:n})},[l,f,n,t,r]),null}function er(e){Pt(!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 Cq({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:i,static:a=!1}){Pt(!Pl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),l=j.useMemo(()=>({basename:o,navigator:i,static:a,future:{}}),[o,i,a]);typeof r=="string"&&(r=jl(r));let{pathname:c="/",search:f="",hash:h="",state:p=null,key:g="default"}=r,v=j.useMemo(()=>{let w=$i(c,o);return w==null?null:{location:{pathname:w,search:f,hash:h,state:p,key:g},navigationType:n}},[o,c,f,h,p,g,n]);return dn(v!=null,`<Router basename="${o}"> is not able to match the URL "${c}${f}${h}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:j.createElement($n.Provider,{value:l},j.createElement(_f.Provider,{children:t,value:v}))}function Tq({children:e,location:t}){return vq(i1(e),t)}function i1(e,t=[]){let r=[];return j.Children.forEach(e,(n,i)=>{if(!j.isValidElement(n))return;let a=[...t,i];if(n.type===j.Fragment){r.push.apply(r,i1(n.props.children,a));return}Pt(n.type===er,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Pt(!n.props.index||!n.props.children,"An index route cannot have child routes.");let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=i1(n.props.children,a)),r.push(o)}),r}var Dh="get",$h="application/x-www-form-urlencoded";function hm(e){return e!=null&&typeof e.tagName=="string"}function kq(e){return hm(e)&&e.tagName.toLowerCase()==="button"}function Mq(e){return hm(e)&&e.tagName.toLowerCase()==="form"}function Rq(e){return hm(e)&&e.tagName.toLowerCase()==="input"}function Iq(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Dq(e,t){return e.button===0&&(!t||t==="_self")&&!Iq(e)}function a1(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function $q(e,t){let r=a1(e);return t&&t.forEach((n,i)=>{r.has(i)||t.getAll(i).forEach(a=>{r.append(i,a)})}),r}var uh=null;function Lq(){if(uh===null)try{new FormData(document.createElement("form"),0),uh=!1}catch{uh=!0}return uh}var Bq=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function _y(e){return e!=null&&!Bq.has(e)?(dn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${$h}"`),null):e}function Fq(e,t){let r,n,i,a,o;if(Mq(e)){let l=e.getAttribute("action");n=l?$i(l,t):null,r=e.getAttribute("method")||Dh,i=_y(e.getAttribute("enctype"))||$h,a=new FormData(e)}else if(kq(e)||Rq(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||l.getAttribute("action");if(n=c?$i(c,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||Dh,i=_y(e.getAttribute("formenctype"))||_y(l.getAttribute("enctype"))||$h,a=new FormData(l,e),!Lq()){let{name:f,type:h,value:p}=e;if(h==="image"){let g=f?`${f}.`:"";a.append(`${g}x`,"0"),a.append(`${g}y`,"0")}else f&&a.append(f,p)}}else{if(hm(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Dh,n=null,i=$h,o=e}return a&&i==="text/plain"&&(o=a,a=void 0),{action:n,method:r.toLowerCase(),encType:i,formData:a,body:o}}function Ej(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function zq(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Vq(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 Uq(e,t,r){let n=await Promise.all(e.map(async i=>{let a=t.routes[i.route.id];if(a){let o=await zq(a,r);return o.links?o.links():[]}return[]}));return Gq(n.flat(1).filter(Vq).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function aO(e,t,r,n,i,a){let o=(c,f)=>r[f]?c.route.id!==r[f].route.id:!0,l=(c,f)=>{var h;return r[f].pathname!==c.pathname||((h=r[f].route.path)==null?void 0:h.endsWith("*"))&&r[f].params["*"]!==c.params["*"]};return a==="assets"?t.filter((c,f)=>o(c,f)||l(c,f)):a==="data"?t.filter((c,f)=>{var p;let h=n.routes[c.route.id];if(!h||!h.hasLoader)return!1;if(o(c,f)||l(c,f))return!0;if(c.route.shouldRevalidate){let g=c.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((p=r[0])==null?void 0:p.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function qq(e,t,{includeHydrateFallback:r}={}){return Wq(e.map(n=>{let i=t.routes[n.route.id];if(!i)return[];let a=[i.module];return i.clientActionModule&&(a=a.concat(i.clientActionModule)),i.clientLoaderModule&&(a=a.concat(i.clientLoaderModule)),r&&i.hydrateFallbackModule&&(a=a.concat(i.hydrateFallbackModule)),i.imports&&(a=a.concat(i.imports)),a}).flat(1))}function Wq(e){return[...new Set(e)]}function Hq(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function Gq(e,t){let r=new Set;return new Set(t),e.reduce((n,i)=>{let a=JSON.stringify(Hq(i));return r.has(a)||(r.add(a),n.push({key:a,link:i})),n},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Kq=new Set([100,101,204,205]);function Yq(e,t){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname="_root.data":t&&$i(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function C$(){let e=j.useContext(_l);return Ej(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Xq(){let e=j.useContext(dm);return Ej(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Oj=j.createContext(void 0);Oj.displayName="FrameworkContext";function T$(){let e=j.useContext(Oj);return Ej(e,"You must render this element inside a <HydratedRouter> element"),e}function Zq(e,t){let r=j.useContext(Oj),[n,i]=j.useState(!1),[a,o]=j.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:f,onMouseLeave:h,onTouchStart:p}=t,g=j.useRef(null);j.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let y=S=>{S.forEach(A=>{o(A.isIntersecting)})},b=new IntersectionObserver(y,{threshold:.5});return g.current&&b.observe(g.current),()=>{b.disconnect()}}},[e]),j.useEffect(()=>{if(n){let y=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(y)}}},[n]);let v=()=>{i(!0)},w=()=>{i(!1),o(!1)};return r?e!=="intent"?[a,g,{}]:[a,g,{onFocus:Vc(l,v),onBlur:Vc(c,w),onMouseEnter:Vc(f,v),onMouseLeave:Vc(h,w),onTouchStart:Vc(p,v)}]:[!1,g,{}]}function Vc(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Qq({page:e,...t}){let{router:r}=C$(),n=j.useMemo(()=>b$(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?j.createElement(e9,{page:e,matches:n,...t}):null}function Jq(e){let{manifest:t,routeModules:r}=T$(),[n,i]=j.useState([]);return j.useEffect(()=>{let a=!1;return Uq(e,t,r).then(o=>{a||i(o)}),()=>{a=!0}},[e,t,r]),n}function e9({page:e,matches:t,...r}){let n=Gi(),{manifest:i,routeModules:a}=T$(),{basename:o}=C$(),{loaderData:l,matches:c}=Xq(),f=j.useMemo(()=>aO(e,t,c,i,n,"data"),[e,t,c,i,n]),h=j.useMemo(()=>aO(e,t,c,i,n,"assets"),[e,t,c,i,n]),p=j.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let w=new Set,y=!1;if(t.forEach(S=>{var _;let A=i.routes[S.route.id];!A||!A.hasLoader||(!f.some(C=>C.route.id===S.route.id)&&S.route.id in l&&((_=a[S.route.id])!=null&&_.shouldRevalidate)||A.hasClientLoader?y=!0:w.add(S.route.id))}),w.size===0)return[];let b=Yq(e,o);return y&&w.size>0&&b.searchParams.set("_routes",t.filter(S=>w.has(S.route.id)).map(S=>S.route.id).join(",")),[b.pathname+b.search]},[o,l,n,i,f,t,e,a]),g=j.useMemo(()=>qq(h,i),[h,i]),v=Jq(h);return j.createElement(j.Fragment,null,p.map(w=>j.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...r})),g.map(w=>j.createElement("link",{key:w,rel:"modulepreload",href:w,...r})),v.map(({key:w,link:y})=>j.createElement("link",{key:w,...y})))}function t9(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var k$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{k$&&(window.__reactRouterVersion="7.6.0")}catch{}function r9({basename:e,children:t,window:r}){let n=j.useRef();n.current==null&&(n.current=VU({window:r,v5Compat:!0}));let i=n.current,[a,o]=j.useState({action:i.action,location:i.location}),l=j.useCallback(c=>{j.startTransition(()=>o(c))},[o]);return j.useLayoutEffect(()=>i.listen(l),[i,l]),j.createElement(Cq,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:i})}var M$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ge=j.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:i,reloadDocument:a,replace:o,state:l,target:c,to:f,preventScrollReset:h,viewTransition:p,...g},v){let{basename:w}=j.useContext($n),y=typeof f=="string"&&M$.test(f),b,S=!1;if(typeof f=="string"&&y&&(b=f,k$))try{let R=new URL(window.location.href),F=f.startsWith("//")?new URL(R.protocol+f):new URL(f),I=$i(F.pathname,w);F.origin===R.origin&&I!=null?f=I+F.search+F.hash:S=!0}catch{dn(!1,`<Link to="${f}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let A=mq(f,{relative:i}),[_,C,N]=Zq(n,g),O=o9(f,{replace:o,state:l,target:c,preventScrollReset:h,relative:i,viewTransition:p});function T(R){t&&t(R),R.defaultPrevented||O(R)}let k=j.createElement("a",{...g,...N,href:b||A,onClick:S||a?t:T,ref:t9(v,C),target:c,"data-discover":!y&&r==="render"?"true":void 0});return _&&!y?j.createElement(j.Fragment,null,k,j.createElement(Qq,{page:A})):k});Ge.displayName="Link";var n9=j.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:i=!1,style:a,to:o,viewTransition:l,children:c,...f},h){let p=Pf(o,{relative:f.relative}),g=Gi(),v=j.useContext(dm),{navigator:w,basename:y}=j.useContext($n),b=v!=null&&d9(p)&&l===!0,S=w.encodeLocation?w.encodeLocation(p).pathname:p.pathname,A=g.pathname,_=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(A=A.toLowerCase(),_=_?_.toLowerCase():null,S=S.toLowerCase()),_&&y&&(_=$i(_,y)||_);const C=S!=="/"&&S.endsWith("/")?S.length-1:S.length;let N=A===S||!i&&A.startsWith(S)&&A.charAt(C)==="/",O=_!=null&&(_===S||!i&&_.startsWith(S)&&_.charAt(S.length)==="/"),T={isActive:N,isPending:O,isTransitioning:b},k=N?t:void 0,R;typeof n=="function"?R=n(T):R=[n,N?"active":null,O?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let F=typeof a=="function"?a(T):a;return j.createElement(Ge,{...f,"aria-current":k,className:R,ref:h,style:F,to:o,viewTransition:l},typeof c=="function"?c(T):c)});n9.displayName="NavLink";var i9=j.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:i,state:a,method:o=Dh,action:l,onSubmit:c,relative:f,preventScrollReset:h,viewTransition:p,...g},v)=>{let w=u9(),y=f9(l,{relative:f}),b=o.toLowerCase()==="get"?"get":"post",S=typeof l=="string"&&M$.test(l),A=_=>{if(c&&c(_),_.defaultPrevented)return;_.preventDefault();let C=_.nativeEvent.submitter,N=(C==null?void 0:C.getAttribute("formmethod"))||o;w(C||_.currentTarget,{fetcherKey:t,method:N,navigate:r,replace:i,state:a,relative:f,preventScrollReset:h,viewTransition:p})};return j.createElement("form",{ref:v,method:b,action:y,onSubmit:n?c:A,...g,"data-discover":!S&&e==="render"?"true":void 0})});i9.displayName="Form";function a9(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function R$(e){let t=j.useContext(_l);return Pt(t,a9(e)),t}function o9(e,{target:t,replace:r,state:n,preventScrollReset:i,relative:a,viewTransition:o}={}){let l=pn(),c=Gi(),f=Pf(e,{relative:a});return j.useCallback(h=>{if(Dq(h,t)){h.preventDefault();let p=r!==void 0?r:Su(c)===Su(f);l(e,{replace:p,state:n,preventScrollReset:i,relative:a,viewTransition:o})}},[c,l,f,r,n,t,e,i,a,o])}function s9(e){dn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=j.useRef(a1(e)),r=j.useRef(!1),n=Gi(),i=j.useMemo(()=>$q(n.search,r.current?null:t.current),[n.search]),a=pn(),o=j.useCallback((l,c)=>{const f=a1(typeof l=="function"?l(i):l);r.current=!0,a("?"+f,c)},[a,i]);return[i,o]}var l9=0,c9=()=>`__${String(++l9)}__`;function u9(){let{router:e}=R$("useSubmit"),{basename:t}=j.useContext($n),r=Aq();return j.useCallback(async(n,i={})=>{let{action:a,method:o,encType:l,formData:c,body:f}=Fq(n,t);if(i.navigate===!1){let h=i.fetcherKey||c9();await e.fetch(h,r,i.action||a,{preventScrollReset:i.preventScrollReset,formData:c,body:f,formMethod:i.method||o,formEncType:i.encType||l,flushSync:i.flushSync})}else await e.navigate(i.action||a,{preventScrollReset:i.preventScrollReset,formData:c,body:f,formMethod:i.method||o,formEncType:i.encType||l,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,r])}function f9(e,{relative:t}={}){let{basename:r}=j.useContext($n),n=j.useContext(Ln);Pt(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),a={...Pf(e||".",{relative:t})},o=Gi();if(e==null){a.search=o.search;let l=new URLSearchParams(a.search),c=l.getAll("index");if(c.some(h=>h==="")){l.delete("index"),c.filter(p=>p).forEach(p=>l.append("index",p));let h=l.toString();a.search=h?`?${h}`:""}}return(!e||e===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(a.pathname=a.pathname==="/"?r:Ti([r,a.pathname])),Su(a)}function d9(e,t={}){let r=j.useContext(_$);Pt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=R$("useViewTransitionState"),i=Pf(e,{relative:t.relative});if(!r.isTransitioning)return!1;let a=$i(r.currentLocation.pathname,n)||r.currentLocation.pathname,o=$i(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Xh(i.pathname,o)!=null||Xh(i.pathname,a)!=null}[...Kq];var Af=x$();const h9=ct(Af);let p9={data:""},m9=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||p9,g9=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,v9=/\/\*[^]*?\*\/| +/g,oO=/\n+/g,Aa=(e,t)=>{let r="",n="",i="";for(let a in e){let o=e[a];a[0]=="@"?a[1]=="i"?r=a+" "+o+";":n+=a[1]=="f"?Aa(o,a):a+"{"+Aa(o,a[1]=="k"?"":t)+"}":typeof o=="object"?n+=Aa(o,t?t.replace(/([^,])+/g,l=>a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,l):l?l+" "+c:c)):a):o!=null&&(a=/^--/.test(a)?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=Aa.p?Aa.p(a,o):a+":"+o+";")}return r+(t&&i?t+"{"+i+"}":i)+n},Si={},I$=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+I$(e[r]);return t}return e},y9=(e,t,r,n,i)=>{let a=I$(e),o=Si[a]||(Si[a]=(c=>{let f=0,h=11;for(;f<c.length;)h=101*h+c.charCodeAt(f++)>>>0;return"go"+h})(a));if(!Si[o]){let c=a!==e?e:(f=>{let h,p,g=[{}];for(;h=g9.exec(f.replace(v9,""));)h[4]?g.shift():h[3]?(p=h[3].replace(oO," ").trim(),g.unshift(g[0][p]=g[0][p]||{})):g[0][h[1]]=h[2].replace(oO," ").trim();return g[0]})(e);Si[o]=Aa(i?{["@keyframes "+o]:c}:c,r?"":"."+o)}let l=r&&Si.g?Si.g:null;return r&&(Si.g=Si[o]),((c,f,h,p)=>{p?f.data=f.data.replace(p,c):f.data.indexOf(c)===-1&&(f.data=h?c+f.data:f.data+c)})(Si[o],t,n,l),o},x9=(e,t,r)=>e.reduce((n,i,a)=>{let o=t[a];if(o&&o.call){let l=o(r),c=l&&l.props&&l.props.className||/^go/.test(l)&&l;o=c?"."+c:l&&typeof l=="object"?l.props?"":Aa(l,""):l===!1?"":l}return n+i+(o??"")},"");function pm(e){let t=this||{},r=e.call?e(t.p):e;return y9(r.unshift?r.raw?x9(r,[].slice.call(arguments,1),t.p):r.reduce((n,i)=>Object.assign(n,i&&i.call?i(t.p):i),{}):r,m9(t.target),t.g,t.o,t.k)}let D$,o1,s1;pm.bind({g:1});let Li=pm.bind({k:1});function b9(e,t,r,n){Aa.p=t,D$=e,o1=r,s1=n}function Ba(e,t){let r=this||{};return function(){let n=arguments;function i(a,o){let l=Object.assign({},a),c=l.className||i.className;r.p=Object.assign({theme:o1&&o1()},l),r.o=/ *go\d+/.test(c),l.className=pm.apply(r,n)+(c?" "+c:"");let f=e;return e[0]&&(f=l.as||e,delete l.as),s1&&f[0]&&s1(l),D$(f,l)}return i}}var w9=e=>typeof e=="function",Zh=(e,t)=>w9(e)?e(t):e,S9=(()=>{let e=0;return()=>(++e).toString()})(),$$=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),j9=20,L$=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,j9)};case 1:return{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case 2:let{toast:r}=t;return L$(e,{type:e.toasts.find(a=>a.id===r.id)?1:0,toast:r});case 3:let{toastId:n}=t;return{...e,toasts:e.toasts.map(a=>a.id===n||n===void 0?{...a,dismissed:!0,visible:!1}:a)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(a=>({...a,pauseDuration:a.pauseDuration+i}))}}},Lh=[],yo={toasts:[],pausedAt:void 0},Wo=e=>{yo=L$(yo,e),Lh.forEach(t=>{t(yo)})},_9={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},P9=(e={})=>{let[t,r]=j.useState(yo),n=j.useRef(yo);j.useEffect(()=>(n.current!==yo&&r(yo),Lh.push(r),()=>{let a=Lh.indexOf(r);a>-1&&Lh.splice(a,1)}),[]);let i=t.toasts.map(a=>{var o,l,c;return{...e,...e[a.type],...a,removeDelay:a.removeDelay||((o=e[a.type])==null?void 0:o.removeDelay)||(e==null?void 0:e.removeDelay),duration:a.duration||((l=e[a.type])==null?void 0:l.duration)||(e==null?void 0:e.duration)||_9[a.type],style:{...e.style,...(c=e[a.type])==null?void 0:c.style,...a.style}}});return{...t,toasts:i}},A9=(e,t="blank",r)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:(r==null?void 0:r.id)||S9()}),Nf=e=>(t,r)=>{let n=A9(t,e,r);return Wo({type:2,toast:n}),n.id},St=(e,t)=>Nf("blank")(e,t);St.error=Nf("error");St.success=Nf("success");St.loading=Nf("loading");St.custom=Nf("custom");St.dismiss=e=>{Wo({type:3,toastId:e})};St.remove=e=>Wo({type:4,toastId:e});St.promise=(e,t,r)=>{let n=St.loading(t.loading,{...r,...r==null?void 0:r.loading});return typeof e=="function"&&(e=e()),e.then(i=>{let a=t.success?Zh(t.success,i):void 0;return a?St.success(a,{id:n,...r,...r==null?void 0:r.success}):St.dismiss(n),i}).catch(i=>{let a=t.error?Zh(t.error,i):void 0;a?St.error(a,{id:n,...r,...r==null?void 0:r.error}):St.dismiss(n)}),e};var N9=(e,t)=>{Wo({type:1,toast:{id:e,height:t}})},E9=()=>{Wo({type:5,time:Date.now()})},cu=new Map,O9=1e3,C9=(e,t=O9)=>{if(cu.has(e))return;let r=setTimeout(()=>{cu.delete(e),Wo({type:4,toastId:e})},t);cu.set(e,r)},T9=e=>{let{toasts:t,pausedAt:r}=P9(e);j.useEffect(()=>{if(r)return;let a=Date.now(),o=t.map(l=>{if(l.duration===1/0)return;let c=(l.duration||0)+l.pauseDuration-(a-l.createdAt);if(c<0){l.visible&&St.dismiss(l.id);return}return setTimeout(()=>St.dismiss(l.id),c)});return()=>{o.forEach(l=>l&&clearTimeout(l))}},[t,r]);let n=j.useCallback(()=>{r&&Wo({type:6,time:Date.now()})},[r]),i=j.useCallback((a,o)=>{let{reverseOrder:l=!1,gutter:c=8,defaultPosition:f}=o||{},h=t.filter(v=>(v.position||f)===(a.position||f)&&v.height),p=h.findIndex(v=>v.id===a.id),g=h.filter((v,w)=>w<p&&v.visible).length;return h.filter(v=>v.visible).slice(...l?[g+1]:[0,g]).reduce((v,w)=>v+(w.height||0)+c,0)},[t]);return j.useEffect(()=>{t.forEach(a=>{if(a.dismissed)C9(a.id,a.removeDelay);else{let o=cu.get(a.id);o&&(clearTimeout(o),cu.delete(a.id))}})},[t]),{toasts:t,handlers:{updateHeight:N9,startPause:E9,endPause:n,calculateOffset:i}}},k9=Li`
|
||
from {
|
||
transform: scale(0) rotate(45deg);
|
||
opacity: 0;
|
||
}
|
||
to {
|
||
transform: scale(1) rotate(45deg);
|
||
opacity: 1;
|
||
}`,M9=Li`
|
||
from {
|
||
transform: scale(0);
|
||
opacity: 0;
|
||
}
|
||
to {
|
||
transform: scale(1);
|
||
opacity: 1;
|
||
}`,R9=Li`
|
||
from {
|
||
transform: scale(0) rotate(90deg);
|
||
opacity: 0;
|
||
}
|
||
to {
|
||
transform: scale(1) rotate(90deg);
|
||
opacity: 1;
|
||
}`,I9=Ba("div")`
|
||
width: 20px;
|
||
opacity: 0;
|
||
height: 20px;
|
||
border-radius: 10px;
|
||
background: ${e=>e.primary||"#ff4b4b"};
|
||
position: relative;
|
||
transform: rotate(45deg);
|
||
|
||
animation: ${k9} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
||
forwards;
|
||
animation-delay: 100ms;
|
||
|
||
&:after,
|
||
&:before {
|
||
content: '';
|
||
animation: ${M9} 0.15s ease-out forwards;
|
||
animation-delay: 150ms;
|
||
position: absolute;
|
||
border-radius: 3px;
|
||
opacity: 0;
|
||
background: ${e=>e.secondary||"#fff"};
|
||
bottom: 9px;
|
||
left: 4px;
|
||
height: 2px;
|
||
width: 12px;
|
||
}
|
||
|
||
&:before {
|
||
animation: ${R9} 0.15s ease-out forwards;
|
||
animation-delay: 180ms;
|
||
transform: rotate(90deg);
|
||
}
|
||
`,D9=Li`
|
||
from {
|
||
transform: rotate(0deg);
|
||
}
|
||
to {
|
||
transform: rotate(360deg);
|
||
}
|
||
`,$9=Ba("div")`
|
||
width: 12px;
|
||
height: 12px;
|
||
box-sizing: border-box;
|
||
border: 2px solid;
|
||
border-radius: 100%;
|
||
border-color: ${e=>e.secondary||"#e0e0e0"};
|
||
border-right-color: ${e=>e.primary||"#616161"};
|
||
animation: ${D9} 1s linear infinite;
|
||
`,L9=Li`
|
||
from {
|
||
transform: scale(0) rotate(45deg);
|
||
opacity: 0;
|
||
}
|
||
to {
|
||
transform: scale(1) rotate(45deg);
|
||
opacity: 1;
|
||
}`,B9=Li`
|
||
0% {
|
||
height: 0;
|
||
width: 0;
|
||
opacity: 0;
|
||
}
|
||
40% {
|
||
height: 0;
|
||
width: 6px;
|
||
opacity: 1;
|
||
}
|
||
100% {
|
||
opacity: 1;
|
||
height: 10px;
|
||
}`,F9=Ba("div")`
|
||
width: 20px;
|
||
opacity: 0;
|
||
height: 20px;
|
||
border-radius: 10px;
|
||
background: ${e=>e.primary||"#61d345"};
|
||
position: relative;
|
||
transform: rotate(45deg);
|
||
|
||
animation: ${L9} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
||
forwards;
|
||
animation-delay: 100ms;
|
||
&:after {
|
||
content: '';
|
||
box-sizing: border-box;
|
||
animation: ${B9} 0.2s ease-out forwards;
|
||
opacity: 0;
|
||
animation-delay: 200ms;
|
||
position: absolute;
|
||
border-right: 2px solid;
|
||
border-bottom: 2px solid;
|
||
border-color: ${e=>e.secondary||"#fff"};
|
||
bottom: 6px;
|
||
left: 6px;
|
||
height: 10px;
|
||
width: 6px;
|
||
}
|
||
`,z9=Ba("div")`
|
||
position: absolute;
|
||
`,V9=Ba("div")`
|
||
position: relative;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
min-width: 20px;
|
||
min-height: 20px;
|
||
`,U9=Li`
|
||
from {
|
||
transform: scale(0.6);
|
||
opacity: 0.4;
|
||
}
|
||
to {
|
||
transform: scale(1);
|
||
opacity: 1;
|
||
}`,q9=Ba("div")`
|
||
position: relative;
|
||
transform: scale(0.6);
|
||
opacity: 0.4;
|
||
min-width: 20px;
|
||
animation: ${U9} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
||
forwards;
|
||
`,W9=({toast:e})=>{let{icon:t,type:r,iconTheme:n}=e;return t!==void 0?typeof t=="string"?j.createElement(q9,null,t):t:r==="blank"?null:j.createElement(V9,null,j.createElement($9,{...n}),r!=="loading"&&j.createElement(z9,null,r==="error"?j.createElement(I9,{...n}):j.createElement(F9,{...n})))},H9=e=>`
|
||
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
|
||
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
||
`,G9=e=>`
|
||
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
||
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
||
`,K9="0%{opacity:0;} 100%{opacity:1;}",Y9="0%{opacity:1;} 100%{opacity:0;}",X9=Ba("div")`
|
||
display: flex;
|
||
align-items: center;
|
||
background: #fff;
|
||
color: #363636;
|
||
line-height: 1.3;
|
||
will-change: transform;
|
||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
|
||
max-width: 350px;
|
||
pointer-events: auto;
|
||
padding: 8px 10px;
|
||
border-radius: 8px;
|
||
`,Z9=Ba("div")`
|
||
display: flex;
|
||
justify-content: center;
|
||
margin: 4px 10px;
|
||
color: inherit;
|
||
flex: 1 1 auto;
|
||
white-space: pre-line;
|
||
`,Q9=(e,t)=>{let r=e.includes("top")?1:-1,[n,i]=$$()?[K9,Y9]:[H9(r),G9(r)];return{animation:t?`${Li(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Li(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},J9=j.memo(({toast:e,position:t,style:r,children:n})=>{let i=e.height?Q9(e.position||t||"top-center",e.visible):{opacity:0},a=j.createElement(W9,{toast:e}),o=j.createElement(Z9,{...e.ariaProps},Zh(e.message,e));return j.createElement(X9,{className:e.className,style:{...i,...r,...e.style}},typeof n=="function"?n({icon:a,message:o}):j.createElement(j.Fragment,null,a,o))});b9(j.createElement);var e7=({id:e,className:t,style:r,onHeightUpdate:n,children:i})=>{let a=j.useCallback(o=>{if(o){let l=()=>{let c=o.getBoundingClientRect().height;n(e,c)};l(),new MutationObserver(l).observe(o,{subtree:!0,childList:!0,characterData:!0})}},[e,n]);return j.createElement("div",{ref:a,className:t,style:r},i)},t7=(e,t)=>{let r=e.includes("top"),n=r?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:$$()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(r?1:-1)}px)`,...n,...i}},r7=pm`
|
||
z-index: 9999;
|
||
> * {
|
||
pointer-events: auto;
|
||
}
|
||
`,fh=16,n7=({reverseOrder:e,position:t="top-center",toastOptions:r,gutter:n,children:i,containerStyle:a,containerClassName:o})=>{let{toasts:l,handlers:c}=T9(r);return j.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:fh,left:fh,right:fh,bottom:fh,pointerEvents:"none",...a},className:o,onMouseEnter:c.startPause,onMouseLeave:c.endPause},l.map(f=>{let h=f.position||t,p=c.calculateOffset(f,{reverseOrder:e,gutter:n,defaultPosition:t}),g=t7(h,p);return j.createElement(e7,{id:f.id,key:f.id,onHeightUpdate:c.updateHeight,className:f.visible?r7:"",style:g},f.type==="custom"?Zh(f.message,f):i?i(f):j.createElement(J9,{toast:f,position:h}))}))},Cn=St;/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const i7=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),a7=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),sO=e=>{const t=a7(e);return t.charAt(0).toUpperCase()+t.slice(1)},B$=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),o7=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/var s7={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const l7=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...l},c)=>j.createElement("svg",{ref:c,...s7,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:B$("lucide",i),...!a&&!o7(l)&&{"aria-hidden":"true"},...l},[...o.map(([f,h])=>j.createElement(f,h)),...Array.isArray(a)?a:[a]]));/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const $e=(e,t)=>{const r=j.forwardRef(({className:n,...i},a)=>j.createElement(l7,{ref:a,iconNode:t,className:B$(`lucide-${i7(sO(e))}`,`lucide-${e}`,n),...i}));return r.displayName=sO(e),r};/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const c7=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Cj=$e("arrow-left",c7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const u7=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],f7=$e("arrow-right",u7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const d7=[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]],h7=$e("award",d7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const p7=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],m7=$e("bell",p7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const g7=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],ks=$e("calendar",g7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const v7=[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],F$=$e("camera",v7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const y7=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],z$=$e("chart-column",y7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const x7=[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]],b7=$e("chart-no-axes-column",x7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const w7=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Tj=$e("check",w7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const S7=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],kj=$e("chevron-down",S7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const j7=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],_7=$e("chevron-left",j7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const P7=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],A7=$e("chevron-right",P7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const N7=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],V$=$e("chevron-up",N7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const E7=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],Mj=$e("circle-plus",E7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const O7=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],C7=$e("circle-x",O7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const T7=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],k7=$e("circle",T7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const M7=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],l1=$e("clock",M7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const R7=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],c1=$e("database",R7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const I7=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],U$=$e("eye-off",I7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const D7=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],q$=$e("eye",D7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const $7=[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]],L7=$e("facebook",$7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const B7=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Rj=$e("file-text",B7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const F7=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],z7=$e("funnel",F7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const V7=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],mm=$e("house",V7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const U7=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],W$=$e("image",U7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const q7=[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]],W7=$e("instagram",q7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const H7=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],H$=$e("loader-circle",H7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const G7=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Qh=$e("lock",G7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const K7=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],u1=$e("log-out",K7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Y7=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],ju=$e("mail",Y7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const X7=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],_u=$e("map-pin",X7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Z7=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],Q7=$e("menu",Z7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const J7=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],eW=$e("pencil",J7);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const tW=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],rW=$e("phone",tW);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const nW=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Ij=$e("save",nW);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const iW=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Pu=$e("search",iW);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const aW=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],oW=$e("settings",aW);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const sW=[["path",{d:"M12 10.189V14",key:"1p8cqu"}],["path",{d:"M12 2v3",key:"qbqxhf"}],["path",{d:"M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6",key:"qpkstq"}],["path",{d:"M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76",key:"7tigtc"}],["path",{d:"M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1924j5"}]],Py=$e("ship",sW);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const lW=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],G$=$e("shield",lW);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const cW=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],uW=$e("square-pen",cW);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const fW=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Au=$e("trash-2",fW);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const dW=[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]],hW=$e("trending-down",dW);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const pW=[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]],mW=$e("trending-up",pW);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const gW=[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]],vW=$e("twitter",gW);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const yW=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],Ay=$e("upload",yW);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const xW=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],Dj=$e("user-plus",xW);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const bW=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],hr=$e("user",bW);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const wW=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],gm=$e("users",wW);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const SW=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ma=$e("x",SW);/**
|
||
* @license lucide-react v0.510.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const jW=[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]],_W=$e("youtube",jW);function lO(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function vm(...e){return t=>{let r=!1;const n=e.map(i=>{const a=lO(i,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i<n.length;i++){const a=n[i];typeof a=="function"?a():lO(e[i],null)}}}}function it(...e){return j.useCallback(vm(...e),e)}function ko(e){const t=PW(e),r=j.forwardRef((n,i)=>{const{children:a,...o}=n,l=j.Children.toArray(a),c=l.find(NW);if(c){const f=c.props.children,h=l.map(p=>p===c?j.Children.count(f)>1?j.Children.only(null):j.isValidElement(f)?f.props.children:null:p);return d.jsx(t,{...o,ref:i,children:j.isValidElement(f)?j.cloneElement(f,void 0,h):null})}return d.jsx(t,{...o,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}var K$=ko("Slot");function PW(e){const t=j.forwardRef((r,n)=>{const{children:i,...a}=r;if(j.isValidElement(i)){const o=OW(i),l=EW(a,i.props);return i.type!==j.Fragment&&(l.ref=n?vm(n,o):o),j.cloneElement(i,l)}return j.Children.count(i)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var AW=Symbol("radix.slottable");function NW(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===AW}function EW(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...l)=>{const c=a(...l);return i(...l),c}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function OW(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Y$(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=Y$(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ye(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Y$(e))&&(n&&(n+=" "),n+=t);return n}const cO=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,uO=Ye,X$=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return uO(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(f=>{const h=r==null?void 0:r[f],p=a==null?void 0:a[f];if(h===null)return null;const g=cO(h)||cO(p);return i[f][g]}),l=r&&Object.entries(r).reduce((f,h)=>{let[p,g]=h;return g===void 0||(f[p]=g),f},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((f,h)=>{let{class:p,className:g,...v}=h;return Object.entries(v).every(w=>{let[y,b]=w;return Array.isArray(b)?b.includes({...a,...l}[y]):{...a,...l}[y]===b})?[...f,p,g]:f},[]);return uO(e,o,c,r==null?void 0:r.class,r==null?void 0:r.className)},$j="-",CW=e=>{const t=kW(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const l=o.split($j);return l[0]===""&&l.length!==1&&l.shift(),Z$(l,t)||TW(o)},getConflictingClassGroupIds:(o,l)=>{const c=r[o]||[];return l&&n[o]?[...c,...n[o]]:c}}},Z$=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?Z$(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join($j);return(o=t.validators.find(({validator:l})=>l(a)))==null?void 0:o.classGroupId},fO=/^\[(.+)\]$/,TW=e=>{if(fO.test(e)){const t=fO.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},kW=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const i in r)f1(r[i],n,i,t);return n},f1=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:dO(t,i);a.classGroupId=r;return}if(typeof i=="function"){if(MW(i)){f1(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([a,o])=>{f1(o,dO(t,a),r,n)})})},dO=(e,t)=>{let r=e;return t.split($j).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},MW=e=>e.isThemeGetter,RW=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(a,o)=>{r.set(a,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let o=r.get(a);if(o!==void 0)return o;if((o=n.get(a))!==void 0)return i(a,o),o},set(a,o){r.has(a)?r.set(a,o):i(a,o)}}},d1="!",h1=":",IW=h1.length,DW=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const a=[];let o=0,l=0,c=0,f;for(let w=0;w<i.length;w++){let y=i[w];if(o===0&&l===0){if(y===h1){a.push(i.slice(c,w)),c=w+IW;continue}if(y==="/"){f=w;continue}}y==="["?o++:y==="]"?o--:y==="("?l++:y===")"&&l--}const h=a.length===0?i:i.substring(c),p=$W(h),g=p!==h,v=f&&f>c?f-c:void 0;return{modifiers:a,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:v}};if(t){const i=t+h1,a=n;n=o=>o.startsWith(i)?a(o.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},$W=e=>e.endsWith(d1)?e.substring(0,e.length-1):e.startsWith(d1)?e.substring(1):e,LW=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const i=[];let a=[];return n.forEach(o=>{o[0]==="["||t[o]?(i.push(...a.sort(),o),a=[]):a.push(o)}),i.push(...a.sort()),i}},BW=e=>({cache:RW(e.cacheSize),parseClassName:DW(e),sortModifiers:LW(e),...CW(e)}),FW=/\s+/,zW=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],l=e.trim().split(FW);let c="";for(let f=l.length-1;f>=0;f-=1){const h=l[f],{isExternal:p,modifiers:g,hasImportantModifier:v,baseClassName:w,maybePostfixModifierPosition:y}=r(h);if(p){c=h+(c.length>0?" "+c:c);continue}let b=!!y,S=n(b?w.substring(0,y):w);if(!S){if(!b){c=h+(c.length>0?" "+c:c);continue}if(S=n(w),!S){c=h+(c.length>0?" "+c:c);continue}b=!1}const A=a(g).join(":"),_=v?A+d1:A,C=_+S;if(o.includes(C))continue;o.push(C);const N=i(S,b);for(let O=0;O<N.length;++O){const T=N[O];o.push(_+T)}c=h+(c.length>0?" "+c:c)}return c};function VW(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Q$(t))&&(n&&(n+=" "),n+=r);return n}const Q$=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Q$(e[n]))&&(r&&(r+=" "),r+=t);return r};function UW(e,...t){let r,n,i,a=o;function o(c){const f=t.reduce((h,p)=>p(h),e());return r=BW(f),n=r.cache.get,i=r.cache.set,a=l,l(c)}function l(c){const f=n(c);if(f)return f;const h=zW(c,r);return i(c,h),h}return function(){return a(VW.apply(null,arguments))}}const Wt=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},J$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,e3=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qW=/^\d+\/\d+$/,WW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,HW=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,GW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,KW=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,YW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ps=e=>qW.test(e),Xe=e=>!!e&&!Number.isNaN(Number(e)),ya=e=>!!e&&Number.isInteger(Number(e)),Ny=e=>e.endsWith("%")&&Xe(e.slice(0,-1)),ji=e=>WW.test(e),XW=()=>!0,ZW=e=>HW.test(e)&&!GW.test(e),t3=()=>!1,QW=e=>KW.test(e),JW=e=>YW.test(e),eH=e=>!Ee(e)&&!Oe(e),tH=e=>Al(e,i3,t3),Ee=e=>J$.test(e),lo=e=>Al(e,a3,ZW),Ey=e=>Al(e,oH,Xe),hO=e=>Al(e,r3,t3),rH=e=>Al(e,n3,JW),dh=e=>Al(e,o3,QW),Oe=e=>e3.test(e),Uc=e=>Nl(e,a3),nH=e=>Nl(e,sH),pO=e=>Nl(e,r3),iH=e=>Nl(e,i3),aH=e=>Nl(e,n3),hh=e=>Nl(e,o3,!0),Al=(e,t,r)=>{const n=J$.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Nl=(e,t,r=!1)=>{const n=e3.exec(e);return n?n[1]?t(n[1]):r:!1},r3=e=>e==="position"||e==="percentage",n3=e=>e==="image"||e==="url",i3=e=>e==="length"||e==="size"||e==="bg-size",a3=e=>e==="length",oH=e=>e==="number",sH=e=>e==="family-name",o3=e=>e==="shadow",lH=()=>{const e=Wt("color"),t=Wt("font"),r=Wt("text"),n=Wt("font-weight"),i=Wt("tracking"),a=Wt("leading"),o=Wt("breakpoint"),l=Wt("container"),c=Wt("spacing"),f=Wt("radius"),h=Wt("shadow"),p=Wt("inset-shadow"),g=Wt("text-shadow"),v=Wt("drop-shadow"),w=Wt("blur"),y=Wt("perspective"),b=Wt("aspect"),S=Wt("ease"),A=Wt("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...C(),Oe,Ee],O=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],k=()=>[Oe,Ee,c],R=()=>[Ps,"full","auto",...k()],F=()=>[ya,"none","subgrid",Oe,Ee],I=()=>["auto",{span:["full",ya,Oe,Ee]},ya,Oe,Ee],L=()=>[ya,"auto",Oe,Ee],V=()=>["auto","min","max","fr",Oe,Ee],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...k()],G=()=>[Ps,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],D=()=>[e,Oe,Ee],q=()=>[...C(),pO,hO,{position:[Oe,Ee]}],Q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$=()=>["auto","cover","contain",iH,tH,{size:[Oe,Ee]}],H=()=>[Ny,Uc,lo],re=()=>["","none","full",f,Oe,Ee],se=()=>["",Xe,Uc,lo],ge=()=>["solid","dashed","dotted","double"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[Xe,Ny,pO,hO],he=()=>["","none",w,Oe,Ee],ne=()=>["none",Xe,Oe,Ee],le=()=>["none",Xe,Oe,Ee],ce=()=>[Xe,Oe,Ee],Z=()=>[Ps,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ji],breakpoint:[ji],color:[XW],container:[ji],"drop-shadow":[ji],ease:["in","out","in-out"],font:[eH],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ji],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ji],shadow:[ji],spacing:["px",Xe],text:[ji],"text-shadow":[ji],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ps,Ee,Oe,b]}],container:["container"],columns:[{columns:[Xe,Ee,Oe,l]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{start:R()}],end:[{end:R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[ya,"auto",Oe,Ee]}],basis:[{basis:[Ps,"full","auto",l,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Xe,Ps,"auto","initial","none",Ee]}],grow:[{grow:["",Xe,Oe,Ee]}],shrink:[{shrink:["",Xe,Oe,Ee]}],order:[{order:[ya,"first","last","none",Oe,Ee]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],w:[{w:[l,"screen",...G()]}],"min-w":[{"min-w":[l,"screen","none",...G()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",r,Uc,lo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Oe,Ey]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ny,Ee]}],"font-family":[{font:[nH,Ee,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Oe,Ee]}],"line-clamp":[{"line-clamp":[Xe,"none",Oe,Ey]}],leading:[{leading:[a,...k()]}],"list-image":[{"list-image":["none",Oe,Ee]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Oe,Ee]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[Xe,"from-font","auto",Oe,lo]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[Xe,"auto",Oe,Ee]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Oe,Ee]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Oe,Ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:q()}],"bg-repeat":[{bg:Q()}],"bg-size":[{bg:$()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ya,Oe,Ee],radial:["",Oe,Ee],conic:[ya,Oe,Ee]},aH,rH]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:re()}],"rounded-s":[{"rounded-s":re()}],"rounded-e":[{"rounded-e":re()}],"rounded-t":[{"rounded-t":re()}],"rounded-r":[{"rounded-r":re()}],"rounded-b":[{"rounded-b":re()}],"rounded-l":[{"rounded-l":re()}],"rounded-ss":[{"rounded-ss":re()}],"rounded-se":[{"rounded-se":re()}],"rounded-ee":[{"rounded-ee":re()}],"rounded-es":[{"rounded-es":re()}],"rounded-tl":[{"rounded-tl":re()}],"rounded-tr":[{"rounded-tr":re()}],"rounded-br":[{"rounded-br":re()}],"rounded-bl":[{"rounded-bl":re()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ge(),"hidden","none"]}],"divide-style":[{divide:[...ge(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Xe,Oe,Ee]}],"outline-w":[{outline:["",Xe,Uc,lo]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",h,hh,dh]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",p,hh,dh]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[Xe,lo]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",g,hh,dh]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[Xe,Oe,Ee]}],"mix-blend":[{"mix-blend":[...be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":be()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Xe]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[Oe,Ee]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[Xe]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:q()}],"mask-repeat":[{mask:Q()}],"mask-size":[{mask:$()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Oe,Ee]}],filter:[{filter:["","none",Oe,Ee]}],blur:[{blur:he()}],brightness:[{brightness:[Xe,Oe,Ee]}],contrast:[{contrast:[Xe,Oe,Ee]}],"drop-shadow":[{"drop-shadow":["","none",v,hh,dh]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",Xe,Oe,Ee]}],"hue-rotate":[{"hue-rotate":[Xe,Oe,Ee]}],invert:[{invert:["",Xe,Oe,Ee]}],saturate:[{saturate:[Xe,Oe,Ee]}],sepia:[{sepia:["",Xe,Oe,Ee]}],"backdrop-filter":[{"backdrop-filter":["","none",Oe,Ee]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[Xe,Oe,Ee]}],"backdrop-contrast":[{"backdrop-contrast":[Xe,Oe,Ee]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Xe,Oe,Ee]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Xe,Oe,Ee]}],"backdrop-invert":[{"backdrop-invert":["",Xe,Oe,Ee]}],"backdrop-opacity":[{"backdrop-opacity":[Xe,Oe,Ee]}],"backdrop-saturate":[{"backdrop-saturate":[Xe,Oe,Ee]}],"backdrop-sepia":[{"backdrop-sepia":["",Xe,Oe,Ee]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Oe,Ee]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Xe,"initial",Oe,Ee]}],ease:[{ease:["linear","initial",S,Oe,Ee]}],delay:[{delay:[Xe,Oe,Ee]}],animate:[{animate:["none",A,Oe,Ee]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,Oe,Ee]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[Oe,Ee,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Z()}],"translate-x":[{"translate-x":Z()}],"translate-y":[{"translate-y":Z()}],"translate-z":[{"translate-z":Z()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Oe,Ee]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Oe,Ee]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[Xe,Uc,lo,Ey]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},cH=UW(lH);function We(...e){return cH(Ye(e))}const uH=X$("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),Me=j.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...i},a)=>{const o=n?K$:"button";return d.jsx(o,{"data-slot":"button",className:We(uH({variant:t,size:r,className:e})),ref:a,...i})});function fH(e){return Object.prototype.toString.call(e)==="[object Object]"}function mO(e){return fH(e)||Array.isArray(e)}function dH(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Lj(e,t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==a?!1:r.every(o=>{const l=e[o],c=t[o];return typeof l=="function"?`${l}`==`${c}`:!mO(l)||!mO(c)?l===c:Lj(l,c)})}function gO(e){return e.concat().sort((t,r)=>t.name>r.name?1:-1).map(t=>t.options)}function hH(e,t){if(e.length!==t.length)return!1;const r=gO(e),n=gO(t);return r.every((i,a)=>{const o=n[a];return Lj(i,o)})}function Bj(e){return typeof e=="number"}function p1(e){return typeof e=="string"}function ym(e){return typeof e=="boolean"}function vO(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ct(e){return Math.abs(e)}function Fj(e){return Math.sign(e)}function uu(e,t){return Ct(e-t)}function pH(e,t){if(e===0||t===0||Ct(e)<=Ct(t))return 0;const r=uu(Ct(e),Ct(t));return Ct(r/e)}function mH(e){return Math.round(e*100)/100}function Nu(e){return Eu(e).map(Number)}function Tn(e){return e[Ef(e)]}function Ef(e){return Math.max(0,e.length-1)}function zj(e,t){return t===Ef(e)}function yO(e,t=0){return Array.from(Array(e),(r,n)=>t+n)}function Eu(e){return Object.keys(e)}function s3(e,t){return[e,t].reduce((r,n)=>(Eu(n).forEach(i=>{const a=r[i],o=n[i],l=vO(a)&&vO(o);r[i]=l?s3(a,o):o}),r),{})}function m1(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function gH(e,t){const r={start:n,center:i,end:a};function n(){return 0}function i(c){return a(c)/2}function a(c){return t-c}function o(c,f){return p1(e)?r[e](c):e(t,c,f)}return{measure:o}}function Ou(){let e=[];function t(i,a,o,l={passive:!0}){let c;if("addEventListener"in i)i.addEventListener(a,o,l),c=()=>i.removeEventListener(a,o,l);else{const f=i;f.addListener(o),c=()=>f.removeListener(o)}return e.push(c),n}function r(){e=e.filter(i=>i())}const n={add:t,clear:r};return n}function vH(e,t,r,n){const i=Ou(),a=1e3/60;let o=null,l=0,c=0;function f(){i.add(e,"visibilitychange",()=>{e.hidden&&w()})}function h(){v(),i.clear()}function p(b){if(!c)return;o||(o=b,r(),r());const S=b-o;for(o=b,l+=S;l>=a;)r(),l-=a;const A=l/a;n(A),c&&(c=t.requestAnimationFrame(p))}function g(){c||(c=t.requestAnimationFrame(p))}function v(){t.cancelAnimationFrame(c),o=null,l=0,c=0}function w(){o=null,l=0}return{init:f,destroy:h,start:g,stop:v,update:r,render:n}}function yH(e,t){const r=t==="rtl",n=e==="y",i=n?"y":"x",a=n?"x":"y",o=!n&&r?-1:1,l=h(),c=p();function f(w){const{height:y,width:b}=w;return n?y:b}function h(){return n?"top":r?"right":"left"}function p(){return n?"bottom":r?"left":"right"}function g(w){return w*o}return{scroll:i,cross:a,startEdge:l,endEdge:c,measureSize:f,direction:g}}function Mo(e=0,t=0){const r=Ct(e-t);function n(f){return f<e}function i(f){return f>t}function a(f){return n(f)||i(f)}function o(f){return a(f)?n(f)?e:t:f}function l(f){return r?f-r*Math.ceil((f-t)/r):f}return{length:r,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:n,removeOffset:l}}function l3(e,t,r){const{constrain:n}=Mo(0,e),i=e+1;let a=o(t);function o(g){return r?Ct((i+g)%i):n(g)}function l(){return a}function c(g){return a=o(g),p}function f(g){return h().set(l()+g)}function h(){return l3(e,l(),r)}const p={get:l,set:c,add:f,clone:h};return p}function xH(e,t,r,n,i,a,o,l,c,f,h,p,g,v,w,y,b,S,A){const{cross:_,direction:C}=e,N=["INPUT","SELECT","TEXTAREA"],O={passive:!1},T=Ou(),k=Ou(),R=Mo(50,225).constrain(v.measure(20)),F={mouse:300,touch:400},I={mouse:500,touch:600},L=w?43:25;let V=!1,Y=0,K=0,z=!1,G=!1,D=!1,q=!1;function Q(Z){if(!A)return;function Se(ze){(ym(A)||A(Z,ze))&&be(ze)}const we=t;T.add(we,"dragstart",ze=>ze.preventDefault(),O).add(we,"touchmove",()=>{},O).add(we,"touchend",()=>{}).add(we,"touchstart",Se).add(we,"mousedown",Se).add(we,"touchcancel",he).add(we,"contextmenu",he).add(we,"click",ne,!0)}function $(){T.clear(),k.clear()}function H(){const Z=q?r:t;k.add(Z,"touchmove",ae,O).add(Z,"touchend",he).add(Z,"mousemove",ae,O).add(Z,"mouseup",he)}function re(Z){const Se=Z.nodeName||"";return N.includes(Se)}function se(){return(w?I:F)[q?"mouse":"touch"]}function ge(Z,Se){const we=p.add(Fj(Z)*-1),ze=h.byDistance(Z,!w).distance;return w||Ct(Z)<R?ze:b&&Se?ze*.5:h.byIndex(we.get(),0).distance}function be(Z){const Se=m1(Z,n);q=Se,D=w&&Se&&!Z.buttons&&V,V=uu(i.get(),o.get())>=2,!(Se&&Z.button!==0)&&(re(Z.target)||(z=!0,a.pointerDown(Z),f.useFriction(0).useDuration(0),i.set(o),H(),Y=a.readPoint(Z),K=a.readPoint(Z,_),g.emit("pointerDown")))}function ae(Z){if(!m1(Z,n)&&Z.touches.length>=2)return he(Z);const we=a.readPoint(Z),ze=a.readPoint(Z,_),Ue=uu(we,Y),Je=uu(ze,K);if(!G&&!q&&(!Z.cancelable||(G=Ue>Je,!G)))return he(Z);const ye=a.pointerMove(Z);Ue>y&&(D=!0),f.useFriction(.3).useDuration(.75),l.start(),i.add(C(ye)),Z.preventDefault()}function he(Z){const we=h.byDistance(0,!1).index!==p.get(),ze=a.pointerUp(Z)*se(),Ue=ge(C(ze),we),Je=pH(ze,Ue),ye=L-10*Je,xe=S+Je/50;G=!1,z=!1,k.clear(),f.useDuration(ye).useFriction(xe),c.distance(Ue,!w),q=!1,g.emit("pointerUp")}function ne(Z){D&&(Z.stopPropagation(),Z.preventDefault(),D=!1)}function le(){return z}return{init:Q,destroy:$,pointerDown:le}}function bH(e,t){let n,i;function a(p){return p.timeStamp}function o(p,g){const w=`client${(g||e.scroll)==="x"?"X":"Y"}`;return(m1(p,t)?p:p.touches[0])[w]}function l(p){return n=p,i=p,o(p)}function c(p){const g=o(p)-o(i),v=a(p)-a(n)>170;return i=p,v&&(n=p),g}function f(p){if(!n||!i)return 0;const g=o(i)-o(n),v=a(p)-a(n),w=a(p)-a(i)>170,y=g/v;return v&&!w&&Ct(y)>.1?y:0}return{pointerDown:l,pointerMove:c,pointerUp:f,readPoint:o}}function wH(){function e(r){const{offsetTop:n,offsetLeft:i,offsetWidth:a,offsetHeight:o}=r;return{top:n,right:i+a,bottom:n+o,left:i,width:a,height:o}}return{measure:e}}function SH(e){function t(n){return e*(n/100)}return{measure:t}}function jH(e,t,r,n,i,a,o){const l=[e].concat(n);let c,f,h=[],p=!1;function g(b){return i.measureSize(o.measure(b))}function v(b){if(!a)return;f=g(e),h=n.map(g);function S(A){for(const _ of A){if(p)return;const C=_.target===e,N=n.indexOf(_.target),O=C?f:h[N],T=g(C?e:n[N]);if(Ct(T-O)>=.5){b.reInit(),t.emit("resize");break}}}c=new ResizeObserver(A=>{(ym(a)||a(b,A))&&S(A)}),r.requestAnimationFrame(()=>{l.forEach(A=>c.observe(A))})}function w(){p=!0,c&&c.disconnect()}return{init:v,destroy:w}}function _H(e,t,r,n,i,a){let o=0,l=0,c=i,f=a,h=e.get(),p=0;function g(){const O=n.get()-e.get(),T=!c;let k=0;return T?(o=0,r.set(n),e.set(n),k=O):(r.set(e),o+=O/c,o*=f,h+=o,e.add(o),k=h-p),l=Fj(k),p=h,N}function v(){const O=n.get()-t.get();return Ct(O)<.001}function w(){return c}function y(){return l}function b(){return o}function S(){return _(i)}function A(){return C(a)}function _(O){return c=O,N}function C(O){return f=O,N}const N={direction:y,duration:w,velocity:b,seek:g,settled:v,useBaseFriction:A,useBaseDuration:S,useFriction:C,useDuration:_};return N}function PH(e,t,r,n,i){const a=i.measure(10),o=i.measure(50),l=Mo(.1,.99);let c=!1;function f(){return!(c||!e.reachedAny(r.get())||!e.reachedAny(t.get()))}function h(v){if(!f())return;const w=e.reachedMin(t.get())?"min":"max",y=Ct(e[w]-t.get()),b=r.get()-t.get(),S=l.constrain(y/o);r.subtract(b*S),!v&&Ct(b)<a&&(r.set(e.constrain(r.get())),n.useDuration(25).useBaseFriction())}function p(v){c=!v}return{shouldConstrain:f,constrain:h,toggleActive:p}}function AH(e,t,r,n,i){const a=Mo(-t+e,0),o=p(),l=h(),c=g();function f(w,y){return uu(w,y)<=1}function h(){const w=o[0],y=Tn(o),b=o.lastIndexOf(w),S=o.indexOf(y)+1;return Mo(b,S)}function p(){return r.map((w,y)=>{const{min:b,max:S}=a,A=a.constrain(w),_=!y,C=zj(r,y);return _?S:C||f(b,A)?b:f(S,A)?S:A}).map(w=>parseFloat(w.toFixed(3)))}function g(){if(t<=e+i)return[a.max];if(n==="keepSnaps")return o;const{min:w,max:y}=l;return o.slice(w,y)}return{snapsContained:c,scrollContainLimit:l}}function NH(e,t,r){const n=t[0],i=r?n-e:Tn(t);return{limit:Mo(i,n)}}function EH(e,t,r,n){const a=t.min+.1,o=t.max+.1,{reachedMin:l,reachedMax:c}=Mo(a,o);function f(g){return g===1?c(r.get()):g===-1?l(r.get()):!1}function h(g){if(!f(g))return;const v=e*(g*-1);n.forEach(w=>w.add(v))}return{loop:h}}function OH(e){const{max:t,length:r}=e;function n(a){const o=a-t;return r?o/-r:0}return{get:n}}function CH(e,t,r,n,i){const{startEdge:a,endEdge:o}=e,{groupSlides:l}=i,c=p().map(t.measure),f=g(),h=v();function p(){return l(n).map(y=>Tn(y)[o]-y[0][a]).map(Ct)}function g(){return n.map(y=>r[a]-y[a]).map(y=>-Ct(y))}function v(){return l(f).map(y=>y[0]).map((y,b)=>y+c[b])}return{snaps:f,snapsAligned:h}}function TH(e,t,r,n,i,a){const{groupSlides:o}=i,{min:l,max:c}=n,f=h();function h(){const g=o(a),v=!e||t==="keepSnaps";return r.length===1?[a]:v?g:g.slice(l,c).map((w,y,b)=>{const S=!y,A=zj(b,y);if(S){const _=Tn(b[0])+1;return yO(_)}if(A){const _=Ef(a)-Tn(b)[0]+1;return yO(_,Tn(b)[0])}return w})}return{slideRegistry:f}}function kH(e,t,r,n,i){const{reachedAny:a,removeOffset:o,constrain:l}=n;function c(w){return w.concat().sort((y,b)=>Ct(y)-Ct(b))[0]}function f(w){const y=e?o(w):l(w),b=t.map((A,_)=>({diff:h(A-y,0),index:_})).sort((A,_)=>Ct(A.diff)-Ct(_.diff)),{index:S}=b[0];return{index:S,distance:y}}function h(w,y){const b=[w,w+r,w-r];if(!e)return w;if(!y)return c(b);const S=b.filter(A=>Fj(A)===y);return S.length?c(S):Tn(b)-r}function p(w,y){const b=t[w]-i.get(),S=h(b,y);return{index:w,distance:S}}function g(w,y){const b=i.get()+w,{index:S,distance:A}=f(b),_=!e&&a(b);if(!y||_)return{index:S,distance:w};const C=t[S]-A,N=w+h(C,0);return{index:S,distance:N}}return{byDistance:g,byIndex:p,shortcut:h}}function MH(e,t,r,n,i,a,o){function l(p){const g=p.distance,v=p.index!==t.get();a.add(g),g&&(n.duration()?e.start():(e.update(),e.render(1),e.update())),v&&(r.set(t.get()),t.set(p.index),o.emit("select"))}function c(p,g){const v=i.byDistance(p,g);l(v)}function f(p,g){const v=t.clone().set(p),w=i.byIndex(v.get(),g);l(w)}return{distance:c,index:f}}function RH(e,t,r,n,i,a,o,l){const c={passive:!0,capture:!0};let f=0;function h(v){if(!l)return;function w(y){if(new Date().getTime()-f>10)return;o.emit("slideFocusStart"),e.scrollLeft=0;const A=r.findIndex(_=>_.includes(y));Bj(A)&&(i.useDuration(0),n.index(A,0),o.emit("slideFocus"))}a.add(document,"keydown",p,!1),t.forEach((y,b)=>{a.add(y,"focus",S=>{(ym(l)||l(v,S))&&w(b)},c)})}function p(v){v.code==="Tab"&&(f=new Date().getTime())}return{init:h}}function tu(e){let t=e;function r(){return t}function n(c){t=o(c)}function i(c){t+=o(c)}function a(c){t-=o(c)}function o(c){return Bj(c)?c:c.get()}return{get:r,set:n,add:i,subtract:a}}function c3(e,t){const r=e.scroll==="x"?o:l,n=t.style;let i=null,a=!1;function o(g){return`translate3d(${g}px,0px,0px)`}function l(g){return`translate3d(0px,${g}px,0px)`}function c(g){if(a)return;const v=mH(e.direction(g));v!==i&&(n.transform=r(v),i=v)}function f(g){a=!g}function h(){a||(n.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:h,to:c,toggleActive:f}}function IH(e,t,r,n,i,a,o,l,c){const h=Nu(i),p=Nu(i).reverse(),g=S().concat(A());function v(T,k){return T.reduce((R,F)=>R-i[F],k)}function w(T,k){return T.reduce((R,F)=>v(R,k)>0?R.concat([F]):R,[])}function y(T){return a.map((k,R)=>({start:k-n[R]+.5+T,end:k+t-.5+T}))}function b(T,k,R){const F=y(k);return T.map(I=>{const L=R?0:-r,V=R?r:0,Y=R?"end":"start",K=F[I][Y];return{index:I,loopPoint:K,slideLocation:tu(-1),translate:c3(e,c[I]),target:()=>l.get()>K?L:V}})}function S(){const T=o[0],k=w(p,T);return b(k,r,!1)}function A(){const T=t-o[0]-1,k=w(h,T);return b(k,-r,!0)}function _(){return g.every(({index:T})=>{const k=h.filter(R=>R!==T);return v(k,t)<=.1})}function C(){g.forEach(T=>{const{target:k,translate:R,slideLocation:F}=T,I=k();I!==F.get()&&(R.to(I),F.set(I))})}function N(){g.forEach(T=>T.translate.clear())}return{canLoop:_,clear:N,loop:C,loopPoints:g}}function DH(e,t,r){let n,i=!1;function a(c){if(!r)return;function f(h){for(const p of h)if(p.type==="childList"){c.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(h=>{i||(ym(r)||r(c,h))&&f(h)}),n.observe(e,{childList:!0})}function o(){n&&n.disconnect(),i=!0}return{init:a,destroy:o}}function $H(e,t,r,n){const i={};let a=null,o=null,l,c=!1;function f(){l=new IntersectionObserver(w=>{c||(w.forEach(y=>{const b=t.indexOf(y.target);i[b]=y}),a=null,o=null,r.emit("slidesInView"))},{root:e.parentElement,threshold:n}),t.forEach(w=>l.observe(w))}function h(){l&&l.disconnect(),c=!0}function p(w){return Eu(i).reduce((y,b)=>{const S=parseInt(b),{isIntersecting:A}=i[S];return(w&&A||!w&&!A)&&y.push(S),y},[])}function g(w=!0){if(w&&a)return a;if(!w&&o)return o;const y=p(w);return w&&(a=y),w||(o=y),y}return{init:f,destroy:h,get:g}}function LH(e,t,r,n,i,a){const{measureSize:o,startEdge:l,endEdge:c}=e,f=r[0]&&i,h=w(),p=y(),g=r.map(o),v=b();function w(){if(!f)return 0;const A=r[0];return Ct(t[l]-A[l])}function y(){if(!f)return 0;const A=a.getComputedStyle(Tn(n));return parseFloat(A.getPropertyValue(`margin-${c}`))}function b(){return r.map((A,_,C)=>{const N=!_,O=zj(C,_);return N?g[_]+h:O?g[_]+p:C[_+1][l]-A[l]}).map(Ct)}return{slideSizes:g,slideSizesWithGaps:v,startGap:h,endGap:p}}function BH(e,t,r,n,i,a,o,l,c){const{startEdge:f,endEdge:h,direction:p}=e,g=Bj(r);function v(S,A){return Nu(S).filter(_=>_%A===0).map(_=>S.slice(_,_+A))}function w(S){return S.length?Nu(S).reduce((A,_,C)=>{const N=Tn(A)||0,O=N===0,T=_===Ef(S),k=i[f]-a[N][f],R=i[f]-a[_][h],F=!n&&O?p(o):0,I=!n&&T?p(l):0,L=Ct(R-I-(k+F));return C&&L>t+c&&A.push(_),T&&A.push(S.length),A},[]).map((A,_,C)=>{const N=Math.max(C[_-1]||0);return S.slice(N,A)}):[]}function y(S){return g?v(S,r):w(S)}return{groupSlides:y}}function FH(e,t,r,n,i,a,o){const{align:l,axis:c,direction:f,startIndex:h,loop:p,duration:g,dragFree:v,dragThreshold:w,inViewThreshold:y,slidesToScroll:b,skipSnaps:S,containScroll:A,watchResize:_,watchSlides:C,watchDrag:N,watchFocus:O}=a,T=2,k=wH(),R=k.measure(t),F=r.map(k.measure),I=yH(c,f),L=I.measureSize(R),V=SH(L),Y=gH(l,L),K=!p&&!!A,z=p||!!A,{slideSizes:G,slideSizesWithGaps:D,startGap:q,endGap:Q}=LH(I,R,F,r,z,i),$=BH(I,L,b,p,R,F,q,Q,T),{snaps:H,snapsAligned:re}=CH(I,Y,R,F,$),se=-Tn(H)+Tn(D),{snapsContained:ge,scrollContainLimit:be}=AH(L,se,re,A,T),ae=K?ge:re,{limit:he}=NH(se,ae,p),ne=l3(Ef(ae),h,p),le=ne.clone(),ce=Nu(r),Z=({dragHandler:Kr,scrollBody:fi,scrollBounds:Xl,options:{loop:Ka}})=>{Ka||Xl.constrain(Kr.pointerDown()),fi.seek()},Se=({scrollBody:Kr,translate:fi,location:Xl,offsetLocation:Ka,previousLocation:Qf,scrollLooper:Rg,slideLooper:Zl,dragHandler:Ql,animation:Jl,eventHandler:rs,scrollBounds:ec,options:{loop:di}},hi)=>{const tc=Kr.settled(),Jf=!ec.shouldConstrain(),rc=di?tc:tc&&Jf,nc=rc&&!Ql.pointerDown();nc&&Jl.stop();const ed=Xl.get()*hi+Qf.get()*(1-hi);Ka.set(ed),di&&(Rg.loop(Kr.direction()),Zl.loop()),fi.to(Ka.get()),nc&&rs.emit("settle"),rc||rs.emit("scroll")},we=vH(n,i,()=>Z(ts),Kr=>Se(ts,Kr)),ze=.68,Ue=ae[ne.get()],Je=tu(Ue),ye=tu(Ue),xe=tu(Ue),Ke=tu(Ue),pe=_H(Je,xe,ye,Ke,g,ze),_e=kH(p,ae,se,he,Ke),ot=MH(we,ne,le,pe,_e,Ke,o),Xt=OH(he),Qi=Ou(),Zf=$H(t,r,o,y),{slideRegistry:Jo}=TH(K,A,ae,be,$,ce),es=RH(e,r,Jo,ot,pe,Qi,o,O),ts={ownerDocument:n,ownerWindow:i,eventHandler:o,containerRect:R,slideRects:F,animation:we,axis:I,dragHandler:xH(I,e,n,i,Ke,bH(I,i),Je,we,ot,pe,_e,ne,o,V,v,w,S,ze,N),eventStore:Qi,percentOfView:V,index:ne,indexPrevious:le,limit:he,location:Je,offsetLocation:xe,previousLocation:ye,options:a,resizeHandler:jH(t,o,i,r,I,_,k),scrollBody:pe,scrollBounds:PH(he,xe,Ke,pe,V),scrollLooper:EH(se,he,xe,[Je,xe,ye,Ke]),scrollProgress:Xt,scrollSnapList:ae.map(Xt.get),scrollSnaps:ae,scrollTarget:_e,scrollTo:ot,slideLooper:IH(I,L,se,G,D,H,ae,xe,r),slideFocus:es,slidesHandler:DH(t,o,C),slidesInView:Zf,slideIndexes:ce,slideRegistry:Jo,slidesToScroll:$,target:Ke,translate:c3(I,t)};return ts}function zH(){let e={},t;function r(f){t=f}function n(f){return e[f]||[]}function i(f){return n(f).forEach(h=>h(t,f)),c}function a(f,h){return e[f]=n(f).concat([h]),c}function o(f,h){return e[f]=n(f).filter(p=>p!==h),c}function l(){e={}}const c={init:r,emit:i,off:o,on:a,clear:l};return c}const VH={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function UH(e){function t(a,o){return s3(a,o||{})}function r(a){const o=a.breakpoints||{},l=Eu(o).filter(c=>e.matchMedia(c).matches).map(c=>o[c]).reduce((c,f)=>t(c,f),{});return t(a,l)}function n(a){return a.map(o=>Eu(o.breakpoints||{})).reduce((o,l)=>o.concat(l),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:r,optionsMediaQueries:n}}function qH(e){let t=[];function r(a,o){return t=o.filter(({options:l})=>e.optionsAtMedia(l).active!==!1),t.forEach(l=>l.init(a,e)),o.reduce((l,c)=>Object.assign(l,{[c.name]:c}),{})}function n(){t=t.filter(a=>a.destroy())}return{init:r,destroy:n}}function Jh(e,t,r){const n=e.ownerDocument,i=n.defaultView,a=UH(i),o=qH(a),l=Ou(),c=zH(),{mergeOptions:f,optionsAtMedia:h,optionsMediaQueries:p}=a,{on:g,off:v,emit:w}=c,y=I;let b=!1,S,A=f(VH,Jh.globalOptions),_=f(A),C=[],N,O,T;function k(){const{container:ce,slides:Z}=_;O=(p1(ce)?e.querySelector(ce):ce)||e.children[0];const we=p1(Z)?O.querySelectorAll(Z):Z;T=[].slice.call(we||O.children)}function R(ce){const Z=FH(e,O,T,n,i,ce,c);if(ce.loop&&!Z.slideLooper.canLoop()){const Se=Object.assign({},ce,{loop:!1});return R(Se)}return Z}function F(ce,Z){b||(A=f(A,ce),_=h(A),C=Z||C,k(),S=R(_),p([A,...C.map(({options:Se})=>Se)]).forEach(Se=>l.add(Se,"change",I)),_.active&&(S.translate.to(S.location.get()),S.animation.init(),S.slidesInView.init(),S.slideFocus.init(le),S.eventHandler.init(le),S.resizeHandler.init(le),S.slidesHandler.init(le),S.options.loop&&S.slideLooper.loop(),O.offsetParent&&T.length&&S.dragHandler.init(le),N=o.init(le,C)))}function I(ce,Z){const Se=$();L(),F(f({startIndex:Se},ce),Z),c.emit("reInit")}function L(){S.dragHandler.destroy(),S.eventStore.clear(),S.translate.clear(),S.slideLooper.clear(),S.resizeHandler.destroy(),S.slidesHandler.destroy(),S.slidesInView.destroy(),S.animation.destroy(),o.destroy(),l.clear()}function V(){b||(b=!0,l.clear(),L(),c.emit("destroy"),c.clear())}function Y(ce,Z,Se){!_.active||b||(S.scrollBody.useBaseFriction().useDuration(Z===!0?0:_.duration),S.scrollTo.index(ce,Se||0))}function K(ce){const Z=S.index.add(1).get();Y(Z,ce,-1)}function z(ce){const Z=S.index.add(-1).get();Y(Z,ce,1)}function G(){return S.index.add(1).get()!==$()}function D(){return S.index.add(-1).get()!==$()}function q(){return S.scrollSnapList}function Q(){return S.scrollProgress.get(S.offsetLocation.get())}function $(){return S.index.get()}function H(){return S.indexPrevious.get()}function re(){return S.slidesInView.get()}function se(){return S.slidesInView.get(!1)}function ge(){return N}function be(){return S}function ae(){return e}function he(){return O}function ne(){return T}const le={canScrollNext:G,canScrollPrev:D,containerNode:he,internalEngine:be,destroy:V,off:v,on:g,emit:w,plugins:ge,previousScrollSnap:H,reInit:y,rootNode:ae,scrollNext:K,scrollPrev:z,scrollProgress:Q,scrollSnapList:q,scrollTo:Y,selectedScrollSnap:$,slideNodes:ne,slidesInView:re,slidesNotInView:se};return F(t,r),setTimeout(()=>c.emit("init"),0),le}Jh.globalOptions=void 0;function Vj(e={},t=[]){const r=j.useRef(e),n=j.useRef(t),[i,a]=j.useState(),[o,l]=j.useState(),c=j.useCallback(()=>{i&&i.reInit(r.current,n.current)},[i]);return j.useEffect(()=>{Lj(r.current,e)||(r.current=e,c())},[e,c]),j.useEffect(()=>{hH(n.current,t)||(n.current=t,c())},[t,c]),j.useEffect(()=>{if(dH()&&o){Jh.globalOptions=Vj.globalOptions;const f=Jh(o,r.current,n.current);return a(f),()=>f.destroy()}else a(void 0)},[o,a]),[l,i]}Vj.globalOptions=void 0;const u3=j.createContext(null);function xm(){const e=j.useContext(u3);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function xO({orientation:e="horizontal",opts:t,setApi:r,plugins:n,className:i,children:a,...o}){const[l,c]=Vj({...t,axis:e==="horizontal"?"x":"y"},n),[f,h]=j.useState(!1),[p,g]=j.useState(!1),v=j.useCallback(S=>{S&&(h(S.canScrollPrev()),g(S.canScrollNext()))},[]),w=j.useCallback(()=>{c==null||c.scrollPrev()},[c]),y=j.useCallback(()=>{c==null||c.scrollNext()},[c]),b=j.useCallback(S=>{S.key==="ArrowLeft"?(S.preventDefault(),w()):S.key==="ArrowRight"&&(S.preventDefault(),y())},[w,y]);return j.useEffect(()=>{!c||!r||r(c)},[c,r]),j.useEffect(()=>{if(c)return v(c),c.on("reInit",v),c.on("select",v),()=>{c==null||c.off("select",v)}},[c,v]),d.jsx(u3.Provider,{value:{carouselRef:l,api:c,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:w,scrollNext:y,canScrollPrev:f,canScrollNext:p},children:d.jsx("div",{onKeyDownCapture:b,className:We("relative",i),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...o,children:a})})}function bO({className:e,...t}){const{carouselRef:r,orientation:n}=xm();return d.jsx("div",{ref:r,className:"overflow-hidden","data-slot":"carousel-content",children:d.jsx("div",{className:We("flex",n==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})}function wO({className:e,...t}){const{orientation:r}=xm();return d.jsx("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:We("min-w-0 shrink-0 grow-0 basis-full",r==="horizontal"?"pl-4":"pt-4",e),...t})}function SO({className:e,variant:t="outline",size:r="icon",...n}){const{orientation:i,scrollPrev:a,canScrollPrev:o}=xm();return d.jsxs(Me,{"data-slot":"carousel-previous",variant:t,size:r,className:We("absolute size-8 rounded-full",i==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!o,onClick:a,...n,children:[d.jsx(Cj,{}),d.jsx("span",{className:"sr-only",children:"Previous slide"})]})}function jO({className:e,variant:t="outline",size:r="icon",...n}){const{orientation:i,scrollNext:a,canScrollNext:o}=xm();return d.jsxs(Me,{"data-slot":"carousel-next",variant:t,size:r,className:We("absolute size-8 rounded-full",i==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!o,onClick:a,...n,children:[d.jsx(f7,{}),d.jsx("span",{className:"sr-only",children:"Next slide"})]})}function et({className:e,...t}){return d.jsx("div",{"data-slot":"card",className:We("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function Mn({className:e,...t}){return d.jsx("div",{"data-slot":"card-header",className:We("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function Rn({className:e,...t}){return d.jsx("div",{"data-slot":"card-title",className:We("leading-none font-semibold",e),...t})}function Ho({className:e,...t}){return d.jsx("div",{"data-slot":"card-description",className:We("text-muted-foreground text-sm",e),...t})}function tt({className:e,...t}){return d.jsx("div",{"data-slot":"card-content",className:We("px-6",e),...t})}function bm({className:e,...t}){return d.jsx("div",{"data-slot":"card-footer",className:We("flex items-center px-6 [.border-t]:",e),...t})}function Ot({className:e,type:t,...r}){return d.jsx("input",{type:t,"data-slot":"input",className:We("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}var WH=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Le=WH.reduce((e,t)=>{const r=ko(`Primitive.${t}`),n=j.forwardRef((i,a)=>{const{asChild:o,...l}=i,c=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function f3(e,t){e&&Af.flushSync(()=>e.dispatchEvent(t))}var HH="Label",d3=j.forwardRef((e,t)=>d.jsx(Le.label,{...e,ref:t,onMouseDown:r=>{var i;r.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));d3.displayName=HH;var GH=d3;function ht({className:e,...t}){return d.jsx(GH,{"data-slot":"label",className:We("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const _O={searchTerm:"",firstName:"",lastName:"",dateOfBirth:"",yearOfArrival:"",regionOfOrigin:"",settlementLocation:""},KH={searchTerm:"full_name",firstName:"christian_name",lastName:"surname",dateOfBirth:"date_of_birth",yearOfArrival:"date_of_arrival_nt",regionOfOrigin:"place_of_birth",settlementLocation:"town_or_city"};function YH(){const e=pn(),[t,r]=j.useState(_O),[n,i]=j.useState(!1),a=(v,w)=>{r(y=>({...y,[v]:w}))},o=()=>{const v=new URLSearchParams;return Object.entries(t).forEach(([w,y])=>{if(y.trim()){const b=KH[w];v.append(b,y.trim())}}),v},l=()=>{const v=o();e(`/search-results?${v.toString()}`)},c=()=>{r(_O)},f=()=>{i(v=>!v)},h=Object.values(t).some(Boolean),p=()=>Object.entries(t).filter(([v,w])=>!!w).map(([v,w])=>({key:v,value:w,label:g(v)})),g=v=>({searchTerm:"Name",firstName:"First",lastName:"Last",dateOfBirth:"Date of Birth",yearOfArrival:"Year of Arrival",regionOfOrigin:"Region",settlementLocation:"Settlement"})[v];return{fields:t,isAdvancedSearch:n,hasActiveFilters:h,handleFieldChange:a,executeSearch:l,clearAllFields:c,toggleAdvancedSearch:f,getActiveFilters:p}}const XH=[{id:"firstName",label:"First Name",placeholder:"First Name"},{id:"lastName",label:"Last Name",placeholder:"Last Name"},{id:"dateOfBirth",label:"Date of Birth",placeholder:"YYYY-MM-DD"},{id:"yearOfArrival",label:"Year of Arrival",placeholder:"YYYY"},{id:"regionOfOrigin",label:"Region of Origin",placeholder:"Region/Place of Birth"},{id:"settlementLocation",label:"Settlement Location",placeholder:"Town or City"}];function ZH(){const{fields:e,isAdvancedSearch:t,handleFieldChange:r,executeSearch:n,clearAllFields:i,toggleAdvancedSearch:a}=YH(),o=c=>{c.preventDefault(),n()},l=c=>{const{id:f,value:h}=c.target;r(f,h)};return d.jsx("div",{className:"w-full max-w-6xl mx-auto p-4 space-y-6",children:d.jsxs("form",{onSubmit:o,className:"space-y-4",children:[d.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[d.jsx(Ot,{className:"text-[#000] font-bold",id:"searchTerm",placeholder:"Search by name...",value:e.searchTerm,onChange:l}),d.jsxs(Me,{type:"submit",className:"bg-[#9B2335] hover:bg-[#7a1c2a] text-white",children:[d.jsx(Pu,{className:"mr-2 h-4 w-4"}),"Search"]})]}),d.jsx("div",{className:"flex items-center justify-center",children:d.jsx(Me,{type:"button",variant:"ghost",className:"text-[#01796F]",onClick:a,children:t?d.jsxs(d.Fragment,{children:[d.jsx(V$,{className:"mr-2 h-4 w-4"}),"Simple Search"]}):d.jsxs(d.Fragment,{children:[d.jsx(kj,{className:"mr-2 h-4 w-4"}),"Advanced Search"]})})}),t&&d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 pt-4",children:[XH.map(({id:c,label:f,placeholder:h})=>d.jsxs("div",{className:"space-y-2",children:[d.jsx(ht,{htmlFor:c,children:f}),d.jsx(Ot,{id:c,placeholder:h,value:e[c],onChange:l})]},c)),d.jsxs("div",{className:"space-y-2 md:col-span-2",children:[d.jsx(ht,{children:"Actions"}),d.jsx(Me,{type:"button",variant:"ghost",className:"w-full",onClick:i,children:"Clear All Filters"})]})]})]})})}function h3(e,t){return function(){return e.apply(t,arguments)}}const{toString:QH}=Object.prototype,{getPrototypeOf:Uj}=Object,{iterator:wm,toStringTag:p3}=Symbol,Sm=(e=>t=>{const r=QH.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Bn=e=>(e=e.toLowerCase(),t=>Sm(t)===e),jm=e=>t=>typeof t===e,{isArray:El}=Array,Cu=jm("undefined");function JH(e){return e!==null&&!Cu(e)&&e.constructor!==null&&!Cu(e.constructor)&&Ir(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const m3=Bn("ArrayBuffer");function eG(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&m3(e.buffer),t}const tG=jm("string"),Ir=jm("function"),g3=jm("number"),_m=e=>e!==null&&typeof e=="object",rG=e=>e===!0||e===!1,Bh=e=>{if(Sm(e)!=="object")return!1;const t=Uj(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(p3 in e)&&!(wm in e)},nG=Bn("Date"),iG=Bn("File"),aG=Bn("Blob"),oG=Bn("FileList"),sG=e=>_m(e)&&Ir(e.pipe),lG=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ir(e.append)&&((t=Sm(e))==="formdata"||t==="object"&&Ir(e.toString)&&e.toString()==="[object FormData]"))},cG=Bn("URLSearchParams"),[uG,fG,dG,hG]=["ReadableStream","Request","Response","Headers"].map(Bn),pG=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Of(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),El(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const a=r?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let l;for(n=0;n<o;n++)l=a[n],t.call(null,e[l],l,e)}}function v3(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,i;for(;n-- >0;)if(i=r[n],t===i.toLowerCase())return i;return null}const xo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,y3=e=>!Cu(e)&&e!==xo;function g1(){const{caseless:e}=y3(this)&&this||{},t={},r=(n,i)=>{const a=e&&v3(t,i)||i;Bh(t[a])&&Bh(n)?t[a]=g1(t[a],n):Bh(n)?t[a]=g1({},n):El(n)?t[a]=n.slice():t[a]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Of(arguments[n],r);return t}const mG=(e,t,r,{allOwnKeys:n}={})=>(Of(t,(i,a)=>{r&&Ir(i)?e[a]=h3(i,r):e[a]=i},{allOwnKeys:n}),e),gG=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),vG=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},yG=(e,t,r,n)=>{let i,a,o;const l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!n||n(o,e,t))&&!l[o]&&(t[o]=e[o],l[o]=!0);e=r!==!1&&Uj(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},xG=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},bG=e=>{if(!e)return null;if(El(e))return e;let t=e.length;if(!g3(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},wG=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Uj(Uint8Array)),SG=(e,t)=>{const n=(e&&e[wm]).call(e);let i;for(;(i=n.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},jG=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},_G=Bn("HTMLFormElement"),PG=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),PO=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),AG=Bn("RegExp"),x3=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Of(r,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(n[a]=o||i)}),Object.defineProperties(e,n)},NG=e=>{x3(e,(t,r)=>{if(Ir(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(Ir(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},EG=(e,t)=>{const r={},n=i=>{i.forEach(a=>{r[a]=!0})};return El(e)?n(e):n(String(e).split(t)),r},OG=()=>{},CG=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function TG(e){return!!(e&&Ir(e.append)&&e[p3]==="FormData"&&e[wm])}const kG=e=>{const t=new Array(10),r=(n,i)=>{if(_m(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[i]=n;const a=El(n)?[]:{};return Of(n,(o,l)=>{const c=r(o,i+1);!Cu(c)&&(a[l]=c)}),t[i]=void 0,a}}return n};return r(e,0)},MG=Bn("AsyncFunction"),RG=e=>e&&(_m(e)||Ir(e))&&Ir(e.then)&&Ir(e.catch),b3=((e,t)=>e?setImmediate:t?((r,n)=>(xo.addEventListener("message",({source:i,data:a})=>{i===xo&&a===r&&n.length&&n.shift()()},!1),i=>{n.push(i),xo.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Ir(xo.postMessage)),IG=typeof queueMicrotask<"u"?queueMicrotask.bind(xo):typeof process<"u"&&process.nextTick||b3,DG=e=>e!=null&&Ir(e[wm]),ie={isArray:El,isArrayBuffer:m3,isBuffer:JH,isFormData:lG,isArrayBufferView:eG,isString:tG,isNumber:g3,isBoolean:rG,isObject:_m,isPlainObject:Bh,isReadableStream:uG,isRequest:fG,isResponse:dG,isHeaders:hG,isUndefined:Cu,isDate:nG,isFile:iG,isBlob:aG,isRegExp:AG,isFunction:Ir,isStream:sG,isURLSearchParams:cG,isTypedArray:wG,isFileList:oG,forEach:Of,merge:g1,extend:mG,trim:pG,stripBOM:gG,inherits:vG,toFlatObject:yG,kindOf:Sm,kindOfTest:Bn,endsWith:xG,toArray:bG,forEachEntry:SG,matchAll:jG,isHTMLForm:_G,hasOwnProperty:PO,hasOwnProp:PO,reduceDescriptors:x3,freezeMethods:NG,toObjectSet:EG,toCamelCase:PG,noop:OG,toFiniteNumber:CG,findKey:v3,global:xo,isContextDefined:y3,isSpecCompliantForm:TG,toJSONObject:kG,isAsyncFn:MG,isThenable:RG,setImmediate:b3,asap:IG,isIterable:DG};function He(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}ie.inherits(He,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ie.toJSONObject(this.config),code:this.code,status:this.status}}});const w3=He.prototype,S3={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{S3[e]={value:e}});Object.defineProperties(He,S3);Object.defineProperty(w3,"isAxiosError",{value:!0});He.from=(e,t,r,n,i,a)=>{const o=Object.create(w3);return ie.toFlatObject(e,o,function(c){return c!==Error.prototype},l=>l!=="isAxiosError"),He.call(o,e.message,t,r,n,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};const $G=null;function v1(e){return ie.isPlainObject(e)||ie.isArray(e)}function j3(e){return ie.endsWith(e,"[]")?e.slice(0,-2):e}function AO(e,t,r){return e?e.concat(t).map(function(i,a){return i=j3(i),!r&&a?"["+i+"]":i}).join(r?".":""):t}function LG(e){return ie.isArray(e)&&!e.some(v1)}const BG=ie.toFlatObject(ie,{},null,function(t){return/^is[A-Z]/.test(t)});function Pm(e,t,r){if(!ie.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=ie.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,b){return!ie.isUndefined(b[y])});const n=r.metaTokens,i=r.visitor||h,a=r.dots,o=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&ie.isSpecCompliantForm(t);if(!ie.isFunction(i))throw new TypeError("visitor must be a function");function f(w){if(w===null)return"";if(ie.isDate(w))return w.toISOString();if(!c&&ie.isBlob(w))throw new He("Blob is not supported. Use a Buffer instead.");return ie.isArrayBuffer(w)||ie.isTypedArray(w)?c&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function h(w,y,b){let S=w;if(w&&!b&&typeof w=="object"){if(ie.endsWith(y,"{}"))y=n?y:y.slice(0,-2),w=JSON.stringify(w);else if(ie.isArray(w)&&LG(w)||(ie.isFileList(w)||ie.endsWith(y,"[]"))&&(S=ie.toArray(w)))return y=j3(y),S.forEach(function(_,C){!(ie.isUndefined(_)||_===null)&&t.append(o===!0?AO([y],C,a):o===null?y:y+"[]",f(_))}),!1}return v1(w)?!0:(t.append(AO(b,y,a),f(w)),!1)}const p=[],g=Object.assign(BG,{defaultVisitor:h,convertValue:f,isVisitable:v1});function v(w,y){if(!ie.isUndefined(w)){if(p.indexOf(w)!==-1)throw Error("Circular reference detected in "+y.join("."));p.push(w),ie.forEach(w,function(S,A){(!(ie.isUndefined(S)||S===null)&&i.call(t,S,ie.isString(A)?A.trim():A,y,g))===!0&&v(S,y?y.concat(A):[A])}),p.pop()}}if(!ie.isObject(e))throw new TypeError("data must be an object");return v(e),t}function NO(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function qj(e,t){this._pairs=[],e&&Pm(e,this,t)}const _3=qj.prototype;_3.append=function(t,r){this._pairs.push([t,r])};_3.toString=function(t){const r=t?function(n){return t.call(this,n,NO)}:NO;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function FG(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function P3(e,t,r){if(!t)return e;const n=r&&r.encode||FG;ie.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let a;if(i?a=i(t,r):a=ie.isURLSearchParams(t)?t.toString():new qj(t,r).toString(n),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class EO{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ie.forEach(this.handlers,function(n){n!==null&&t(n)})}}const A3={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},zG=typeof URLSearchParams<"u"?URLSearchParams:qj,VG=typeof FormData<"u"?FormData:null,UG=typeof Blob<"u"?Blob:null,qG={isBrowser:!0,classes:{URLSearchParams:zG,FormData:VG,Blob:UG},protocols:["http","https","file","blob","url","data"]},Wj=typeof window<"u"&&typeof document<"u",y1=typeof navigator=="object"&&navigator||void 0,WG=Wj&&(!y1||["ReactNative","NativeScript","NS"].indexOf(y1.product)<0),HG=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",GG=Wj&&window.location.href||"http://localhost",KG=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Wj,hasStandardBrowserEnv:WG,hasStandardBrowserWebWorkerEnv:HG,navigator:y1,origin:GG},Symbol.toStringTag,{value:"Module"})),mr={...KG,...qG};function YG(e,t){return Pm(e,new mr.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,a){return mr.isNode&&ie.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function XG(e){return ie.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function ZG(e){const t={},r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n<i;n++)a=r[n],t[a]=e[a];return t}function N3(e){function t(r,n,i,a){let o=r[a++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),c=a>=r.length;return o=!o&&ie.isArray(i)?i.length:o,c?(ie.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!l):((!i[o]||!ie.isObject(i[o]))&&(i[o]=[]),t(r,n,i[o],a)&&ie.isArray(i[o])&&(i[o]=ZG(i[o])),!l)}if(ie.isFormData(e)&&ie.isFunction(e.entries)){const r={};return ie.forEachEntry(e,(n,i)=>{t(XG(n),i,r,0)}),r}return null}function QG(e,t,r){if(ie.isString(e))try{return(t||JSON.parse)(e),ie.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Cf={transitional:A3,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,a=ie.isObject(t);if(a&&ie.isHTMLForm(t)&&(t=new FormData(t)),ie.isFormData(t))return i?JSON.stringify(N3(t)):t;if(ie.isArrayBuffer(t)||ie.isBuffer(t)||ie.isStream(t)||ie.isFile(t)||ie.isBlob(t)||ie.isReadableStream(t))return t;if(ie.isArrayBufferView(t))return t.buffer;if(ie.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return YG(t,this.formSerializer).toString();if((l=ie.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Pm(l?{"files[]":t}:t,c&&new c,this.formSerializer)}}return a||i?(r.setContentType("application/json",!1),QG(t)):t}],transformResponse:[function(t){const r=this.transitional||Cf.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(ie.isResponse(t)||ie.isReadableStream(t))return t;if(t&&ie.isString(t)&&(n&&!this.responseType||i)){const o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(l){if(o)throw l.name==="SyntaxError"?He.from(l,He.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:mr.classes.FormData,Blob:mr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ie.forEach(["delete","get","head","post","put","patch"],e=>{Cf.headers[e]={}});const JG=ie.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),eK=e=>{const t={};let r,n,i;return e&&e.split(`
|
||
`).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||t[r]&&JG[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},OO=Symbol("internals");function qc(e){return e&&String(e).trim().toLowerCase()}function Fh(e){return e===!1||e==null?e:ie.isArray(e)?e.map(Fh):String(e)}function tK(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const rK=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Oy(e,t,r,n,i){if(ie.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!ie.isString(t)){if(ie.isString(n))return t.indexOf(n)!==-1;if(ie.isRegExp(n))return n.test(t)}}function nK(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function iK(e,t){const r=ie.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,a,o){return this[n].call(this,t,i,a,o)},configurable:!0})})}let Dr=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function a(l,c,f){const h=qc(c);if(!h)throw new Error("header name must be a non-empty string");const p=ie.findKey(i,h);(!p||i[p]===void 0||f===!0||f===void 0&&i[p]!==!1)&&(i[p||c]=Fh(l))}const o=(l,c)=>ie.forEach(l,(f,h)=>a(f,h,c));if(ie.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(ie.isString(t)&&(t=t.trim())&&!rK(t))o(eK(t),r);else if(ie.isObject(t)&&ie.isIterable(t)){let l={},c,f;for(const h of t){if(!ie.isArray(h))throw TypeError("Object iterator must return a key-value pair");l[f=h[0]]=(c=l[f])?ie.isArray(c)?[...c,h[1]]:[c,h[1]]:h[1]}o(l,r)}else t!=null&&a(r,t,n);return this}get(t,r){if(t=qc(t),t){const n=ie.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return tK(i);if(ie.isFunction(r))return r.call(this,i,n);if(ie.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=qc(t),t){const n=ie.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Oy(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function a(o){if(o=qc(o),o){const l=ie.findKey(n,o);l&&(!r||Oy(n,n[l],l,r))&&(delete n[l],i=!0)}}return ie.isArray(t)?t.forEach(a):a(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const a=r[n];(!t||Oy(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const r=this,n={};return ie.forEach(this,(i,a)=>{const o=ie.findKey(n,a);if(o){r[o]=Fh(i),delete r[a];return}const l=t?nK(a):String(a).trim();l!==a&&delete r[a],r[l]=Fh(i),n[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return ie.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&ie.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
||
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[OO]=this[OO]={accessors:{}}).accessors,i=this.prototype;function a(o){const l=qc(o);n[l]||(iK(i,o),n[l]=!0)}return ie.isArray(t)?t.forEach(a):a(t),this}};Dr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ie.reduceDescriptors(Dr.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});ie.freezeMethods(Dr);function Cy(e,t){const r=this||Cf,n=t||r,i=Dr.from(n.headers);let a=n.data;return ie.forEach(e,function(l){a=l.call(r,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function E3(e){return!!(e&&e.__CANCEL__)}function Ol(e,t,r){He.call(this,e??"canceled",He.ERR_CANCELED,t,r),this.name="CanceledError"}ie.inherits(Ol,He,{__CANCEL__:!0});function O3(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new He("Request failed with status code "+r.status,[He.ERR_BAD_REQUEST,He.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function aK(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function oK(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(c){const f=Date.now(),h=n[a];o||(o=f),r[i]=c,n[i]=f;let p=a,g=0;for(;p!==i;)g+=r[p++],p=p%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),f-o<t)return;const v=h&&f-h;return v?Math.round(g*1e3/v):void 0}}function sK(e,t){let r=0,n=1e3/t,i,a;const o=(f,h=Date.now())=>{r=h,i=null,a&&(clearTimeout(a),a=null),e.apply(null,f)};return[(...f)=>{const h=Date.now(),p=h-r;p>=n?o(f,h):(i=f,a||(a=setTimeout(()=>{a=null,o(i)},n-p)))},()=>i&&o(i)]}const ep=(e,t,r=3)=>{let n=0;const i=oK(50,250);return sK(a=>{const o=a.loaded,l=a.lengthComputable?a.total:void 0,c=o-n,f=i(c),h=o<=l;n=o;const p={loaded:o,total:l,progress:l?o/l:void 0,bytes:c,rate:f||void 0,estimated:f&&l&&h?(l-o)/f:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(p)},r)},CO=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},TO=e=>(...t)=>ie.asap(()=>e(...t)),lK=mr.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,mr.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(mr.origin),mr.navigator&&/(msie|trident)/i.test(mr.navigator.userAgent)):()=>!0,cK=mr.hasStandardBrowserEnv?{write(e,t,r,n,i,a){const o=[e+"="+encodeURIComponent(t)];ie.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),ie.isString(n)&&o.push("path="+n),ie.isString(i)&&o.push("domain="+i),a===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function uK(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function fK(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function C3(e,t,r){let n=!uK(t);return e&&(n||r==!1)?fK(e,t):t}const kO=e=>e instanceof Dr?{...e}:e;function Ro(e,t){t=t||{};const r={};function n(f,h,p,g){return ie.isPlainObject(f)&&ie.isPlainObject(h)?ie.merge.call({caseless:g},f,h):ie.isPlainObject(h)?ie.merge({},h):ie.isArray(h)?h.slice():h}function i(f,h,p,g){if(ie.isUndefined(h)){if(!ie.isUndefined(f))return n(void 0,f,p,g)}else return n(f,h,p,g)}function a(f,h){if(!ie.isUndefined(h))return n(void 0,h)}function o(f,h){if(ie.isUndefined(h)){if(!ie.isUndefined(f))return n(void 0,f)}else return n(void 0,h)}function l(f,h,p){if(p in t)return n(f,h);if(p in e)return n(void 0,f)}const c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(f,h,p)=>i(kO(f),kO(h),p,!0)};return ie.forEach(Object.keys(Object.assign({},e,t)),function(h){const p=c[h]||i,g=p(e[h],t[h],h);ie.isUndefined(g)&&p!==l||(r[h]=g)}),r}const T3=e=>{const t=Ro({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:l}=t;t.headers=o=Dr.from(o),t.url=P3(C3(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(ie.isFormData(r)){if(mr.hasStandardBrowserEnv||mr.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[f,...h]=c?c.split(";").map(p=>p.trim()).filter(Boolean):[];o.setContentType([f||"multipart/form-data",...h].join("; "))}}if(mr.hasStandardBrowserEnv&&(n&&ie.isFunction(n)&&(n=n(t)),n||n!==!1&&lK(t.url))){const f=i&&a&&cK.read(a);f&&o.set(i,f)}return t},dK=typeof XMLHttpRequest<"u",hK=dK&&function(e){return new Promise(function(r,n){const i=T3(e);let a=i.data;const o=Dr.from(i.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:f}=i,h,p,g,v,w;function y(){v&&v(),w&&w(),i.cancelToken&&i.cancelToken.unsubscribe(h),i.signal&&i.signal.removeEventListener("abort",h)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function S(){if(!b)return;const _=Dr.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),N={data:!l||l==="text"||l==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:_,config:e,request:b};O3(function(T){r(T),y()},function(T){n(T),y()},N),b=null}"onloadend"in b?b.onloadend=S:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(S)},b.onabort=function(){b&&(n(new He("Request aborted",He.ECONNABORTED,e,b)),b=null)},b.onerror=function(){n(new He("Network Error",He.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let C=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const N=i.transitional||A3;i.timeoutErrorMessage&&(C=i.timeoutErrorMessage),n(new He(C,N.clarifyTimeoutError?He.ETIMEDOUT:He.ECONNABORTED,e,b)),b=null},a===void 0&&o.setContentType(null),"setRequestHeader"in b&&ie.forEach(o.toJSON(),function(C,N){b.setRequestHeader(N,C)}),ie.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),l&&l!=="json"&&(b.responseType=i.responseType),f&&([g,w]=ep(f,!0),b.addEventListener("progress",g)),c&&b.upload&&([p,v]=ep(c),b.upload.addEventListener("progress",p),b.upload.addEventListener("loadend",v)),(i.cancelToken||i.signal)&&(h=_=>{b&&(n(!_||_.type?new Ol(null,e,b):_),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(h),i.signal&&(i.signal.aborted?h():i.signal.addEventListener("abort",h)));const A=aK(i.url);if(A&&mr.protocols.indexOf(A)===-1){n(new He("Unsupported protocol "+A+":",He.ERR_BAD_REQUEST,e));return}b.send(a||null)})},pK=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,i;const a=function(f){if(!i){i=!0,l();const h=f instanceof Error?f:this.reason;n.abort(h instanceof He?h:new Ol(h instanceof Error?h.message:h))}};let o=t&&setTimeout(()=>{o=null,a(new He(`timeout ${t} of ms exceeded`,He.ETIMEDOUT))},t);const l=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(a):f.removeEventListener("abort",a)}),e=null)};e.forEach(f=>f.addEventListener("abort",a));const{signal:c}=n;return c.unsubscribe=()=>ie.asap(l),c}},mK=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,i;for(;n<r;)i=n+t,yield e.slice(n,i),n=i},gK=async function*(e,t){for await(const r of vK(e))yield*mK(r,t)},vK=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},MO=(e,t,r,n)=>{const i=gK(e,t);let a=0,o,l=c=>{o||(o=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:f,value:h}=await i.next();if(f){l(),c.close();return}let p=h.byteLength;if(r){let g=a+=p;r(g)}c.enqueue(new Uint8Array(h))}catch(f){throw l(f),f}},cancel(c){return l(c),i.return()}},{highWaterMark:2})},Am=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",k3=Am&&typeof ReadableStream=="function",yK=Am&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),M3=(e,...t)=>{try{return!!e(...t)}catch{return!1}},xK=k3&&M3(()=>{let e=!1;const t=new Request(mr.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),RO=64*1024,x1=k3&&M3(()=>ie.isReadableStream(new Response("").body)),tp={stream:x1&&(e=>e.body)};Am&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!tp[t]&&(tp[t]=ie.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new He(`Response type '${t}' is not supported`,He.ERR_NOT_SUPPORT,n)})})})(new Response);const bK=async e=>{if(e==null)return 0;if(ie.isBlob(e))return e.size;if(ie.isSpecCompliantForm(e))return(await new Request(mr.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(ie.isArrayBufferView(e)||ie.isArrayBuffer(e))return e.byteLength;if(ie.isURLSearchParams(e)&&(e=e+""),ie.isString(e))return(await yK(e)).byteLength},wK=async(e,t)=>{const r=ie.toFiniteNumber(e.getContentLength());return r??bK(t)},SK=Am&&(async e=>{let{url:t,method:r,data:n,signal:i,cancelToken:a,timeout:o,onDownloadProgress:l,onUploadProgress:c,responseType:f,headers:h,withCredentials:p="same-origin",fetchOptions:g}=T3(e);f=f?(f+"").toLowerCase():"text";let v=pK([i,a&&a.toAbortSignal()],o),w;const y=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let b;try{if(c&&xK&&r!=="get"&&r!=="head"&&(b=await wK(h,n))!==0){let N=new Request(t,{method:"POST",body:n,duplex:"half"}),O;if(ie.isFormData(n)&&(O=N.headers.get("content-type"))&&h.setContentType(O),N.body){const[T,k]=CO(b,ep(TO(c)));n=MO(N.body,RO,T,k)}}ie.isString(p)||(p=p?"include":"omit");const S="credentials"in Request.prototype;w=new Request(t,{...g,signal:v,method:r.toUpperCase(),headers:h.normalize().toJSON(),body:n,duplex:"half",credentials:S?p:void 0});let A=await fetch(w);const _=x1&&(f==="stream"||f==="response");if(x1&&(l||_&&y)){const N={};["status","statusText","headers"].forEach(R=>{N[R]=A[R]});const O=ie.toFiniteNumber(A.headers.get("content-length")),[T,k]=l&&CO(O,ep(TO(l),!0))||[];A=new Response(MO(A.body,RO,T,()=>{k&&k(),y&&y()}),N)}f=f||"text";let C=await tp[ie.findKey(tp,f)||"text"](A,e);return!_&&y&&y(),await new Promise((N,O)=>{O3(N,O,{data:C,headers:Dr.from(A.headers),status:A.status,statusText:A.statusText,config:e,request:w})})}catch(S){throw y&&y(),S&&S.name==="TypeError"&&/Load failed|fetch/i.test(S.message)?Object.assign(new He("Network Error",He.ERR_NETWORK,e,w),{cause:S.cause||S}):He.from(S,S&&S.code,e,w)}}),b1={http:$G,xhr:hK,fetch:SK};ie.forEach(b1,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const IO=e=>`- ${e}`,jK=e=>ie.isFunction(e)||e===null||e===!1,R3={getAdapter:e=>{e=ie.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let a=0;a<t;a++){r=e[a];let o;if(n=r,!jK(r)&&(n=b1[(o=String(r)).toLowerCase()],n===void 0))throw new He(`Unknown adapter '${o}'`);if(n)break;i[o||"#"+a]=n}if(!n){const a=Object.entries(i).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=t?a.length>1?`since :
|
||
`+a.map(IO).join(`
|
||
`):" "+IO(a[0]):"as no adapter specified";throw new He("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:b1};function Ty(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ol(null,e)}function DO(e){return Ty(e),e.headers=Dr.from(e.headers),e.data=Cy.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),R3.getAdapter(e.adapter||Cf.adapter)(e).then(function(n){return Ty(e),n.data=Cy.call(e,e.transformResponse,n),n.headers=Dr.from(n.headers),n},function(n){return E3(n)||(Ty(e),n&&n.response&&(n.response.data=Cy.call(e,e.transformResponse,n.response),n.response.headers=Dr.from(n.response.headers))),Promise.reject(n)})}const I3="1.9.0",Nm={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Nm[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const $O={};Nm.transitional=function(t,r,n){function i(a,o){return"[Axios v"+I3+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,l)=>{if(t===!1)throw new He(i(o," has been removed"+(r?" in "+r:"")),He.ERR_DEPRECATED);return r&&!$O[o]&&($O[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,o,l):!0}};Nm.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function _K(e,t,r){if(typeof e!="object")throw new He("options must be an object",He.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const a=n[i],o=t[a];if(o){const l=e[a],c=l===void 0||o(l,a,e);if(c!==!0)throw new He("option "+a+" must be "+c,He.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new He("Unknown option "+a,He.ERR_BAD_OPTION)}}const zh={assertOptions:_K,validators:Nm},Kn=zh.validators;let No=class{constructor(t){this.defaults=t||{},this.interceptors={request:new EO,response:new EO}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?a&&!String(n.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
||
`+a):n.stack=a}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ro(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:a}=r;n!==void 0&&zh.assertOptions(n,{silentJSONParsing:Kn.transitional(Kn.boolean),forcedJSONParsing:Kn.transitional(Kn.boolean),clarifyTimeoutError:Kn.transitional(Kn.boolean)},!1),i!=null&&(ie.isFunction(i)?r.paramsSerializer={serialize:i}:zh.assertOptions(i,{encode:Kn.function,serialize:Kn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),zh.assertOptions(r,{baseUrl:Kn.spelling("baseURL"),withXsrfToken:Kn.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=a&&ie.merge(a.common,a[r.method]);a&&ie.forEach(["delete","get","head","post","put","patch","common"],w=>{delete a[w]}),r.headers=Dr.concat(o,a);const l=[];let c=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(c=c&&y.synchronous,l.unshift(y.fulfilled,y.rejected))});const f=[];this.interceptors.response.forEach(function(y){f.push(y.fulfilled,y.rejected)});let h,p=0,g;if(!c){const w=[DO.bind(this),void 0];for(w.unshift.apply(w,l),w.push.apply(w,f),g=w.length,h=Promise.resolve(r);p<g;)h=h.then(w[p++],w[p++]);return h}g=l.length;let v=r;for(p=0;p<g;){const w=l[p++],y=l[p++];try{v=w(v)}catch(b){y.call(this,b);break}}try{h=DO.call(this,v)}catch(w){return Promise.reject(w)}for(p=0,g=f.length;p<g;)h=h.then(f[p++],f[p++]);return h}getUri(t){t=Ro(this.defaults,t);const r=C3(t.baseURL,t.url,t.allowAbsoluteUrls);return P3(r,t.params,t.paramsSerializer)}};ie.forEach(["delete","get","head","options"],function(t){No.prototype[t]=function(r,n){return this.request(Ro(n||{},{method:t,url:r,data:(n||{}).data}))}});ie.forEach(["post","put","patch"],function(t){function r(n){return function(a,o,l){return this.request(Ro(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}No.prototype[t]=r(),No.prototype[t+"Form"]=r(!0)});let PK=class D3{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const n=this;this.promise.then(i=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](i);n._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(l=>{n.subscribe(l),a=l}).then(i);return o.cancel=function(){n.unsubscribe(a)},o},t(function(a,o,l){n.reason||(n.reason=new Ol(a,o,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new D3(function(i){t=i}),cancel:t}}};function AK(e){return function(r){return e.apply(null,r)}}function NK(e){return ie.isObject(e)&&e.isAxiosError===!0}const w1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(w1).forEach(([e,t])=>{w1[t]=e});function $3(e){const t=new No(e),r=h3(No.prototype.request,t);return ie.extend(r,No.prototype,t,{allOwnKeys:!0}),ie.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return $3(Ro(e,i))},r}const Bt=$3(Cf);Bt.Axios=No;Bt.CanceledError=Ol;Bt.CancelToken=PK;Bt.isCancel=E3;Bt.VERSION=I3;Bt.toFormData=Pm;Bt.AxiosError=He;Bt.Cancel=Bt.CanceledError;Bt.all=function(t){return Promise.all(t)};Bt.spread=AK;Bt.isAxiosError=NK;Bt.mergeConfig=Ro;Bt.AxiosHeaders=Dr;Bt.formToJSON=e=>N3(ie.isHTMLForm(e)?new FormData(e):e);Bt.getAdapter=R3.getAdapter;Bt.HttpStatusCode=w1;Bt.default=Bt;const{Axios:e1e,AxiosError:t1e,CanceledError:r1e,isCancel:n1e,CancelToken:i1e,VERSION:a1e,all:o1e,Cancel:s1e,isAxiosError:l1e,spread:c1e,toFormData:u1e,AxiosHeaders:f1e,HttpStatusCode:d1e,formToJSON:h1e,getAdapter:p1e,mergeConfig:m1e}=Bt;class EK{constructor(){qE(this,"api");this.api=Bt.create({baseURL:"http://127.0.0.1:8000",headers:{"Content-Type":"application/json"},withCredentials:!0}),this.api.interceptors.request.use(t=>{const r=localStorage.getItem("token");return r&&(t.headers.Authorization=`Bearer ${r}`),t}),this.api.interceptors.response.use(t=>t,t=>{var r;return((r=t.response)==null?void 0:r.status)===401&&(localStorage.removeItem("token"),localStorage.removeItem("user"),window.location.href="/login"),Promise.reject(t)})}get baseURL(){return this.api.defaults.baseURL||""}async login(t){return await this.api.get("/sanctum/csrf-cookie"),this.api.post("/api/login",t).then(r=>(console.log("Token:",r.data.token),localStorage.setItem("token",r.data.token),localStorage.setItem("user",JSON.stringify(r.data.user)),r.data))}async register(t){return this.api.post("/api/register",t).then(r=>r.data)}async createUser(t){return this.api.post("/api/register",t).then(r=>r.data)}async updateUser(t){return this.api.put("/api/user/account",t).then(r=>r.data)}async displayAllUsers(){return this.api.get("/api/users").then(t=>t.data.data)}async logout(){return this.api.post("/api/logout").then(t=>(localStorage.removeItem("token"),localStorage.removeItem("user"),t.data))}async fetchCurrentUser(){return this.api.get("/api/user").then(t=>t.data.data.user)}async getMigrants(t=1,r=10,n={}){return this.api.get("/api/migrants",{params:{page:t,per_page:r,...n}}).then(i=>i.data.data)}async getMigrantsByUrl(t){return this.api.get(t).then(r=>r.data)}async getMigrantById(t){return this.api.get(`/api/migrants/${t}`).then(r=>r.data.data)}async createMigrant(t){return this.api.post("/api/migrants",t,{headers:{"Content-Type":"multipart/form-data"}}).then(r=>r.data.data)}async updateMigrant(t,r){return r.append("_method","PUT"),this.api.post(`/api/migrants/${t}`,r,{headers:{"Content-Type":"multipart/form-data"}}).then(n=>n.data.data).catch(n=>{throw n})}async deleteMigrant(t){return this.api.delete(`/api/migrants/${t}`).then(r=>r.data)}async getPhotos(t){return this.api.get(`/api/migrants/${t}/photos`).then(r=>{const n=r.data.data.photos;return Array.isArray(n)?n:n?[n]:[]})}async getDashboardStats(){return(await this.api.get("/api/dashboard/stats")).data}async getRecentActivityLogs(){return this.api.get("/api/activity-logs").then(t=>t.data.data)}}const At=new EK;function OK(){const[e,t]=j.useState(0),r=pn(),[n,i]=j.useState(0),[a,o]=j.useState([]),l="http://localhost:8000";j.useEffect(()=>{async function p(){const g=await At.getMigrants(1,10);o(g.data||[]),i(g.total||0)}p()},[]);const c=[{src:"/assets/slide1.avif",alt:"Italian countryside landscape"},{src:"/assets/slide2.avif",alt:"Vintage Italian architecture"},{src:"/assets/slide3.avif",alt:"Italian coastal town"},{src:"/assets/slide4.avif",alt:"Italian countryside with vineyards"}],f=[{src:"https://images.unsplash.com/photo-1523906834658-6e24ef2386f9?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80",alt:"Italian countryside village"},{src:"https://images.unsplash.com/photo-1515542622106-78bda8ba0e5b?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80",alt:"Italian landscape"},{src:"https://images.unsplash.com/photo-1552832230-c0197dd311b5?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80",alt:"Italian vineyards"},{src:"https://images.unsplash.com/photo-1516483638261-f4dbaf036963?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80",alt:"Italian coastal town"},{src:"https://images.unsplash.com/photo-1581833971358-2c8b550f87b3?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80",alt:"Italian traditional building"}];j.useEffect(()=>{const p=setInterval(()=>{t(g=>(g+1)%c.length)},5e3);return()=>clearInterval(p)},[c.length]);const h=p=>{p.preventDefault();const g=document.getElementById("contact");g&&g.scrollIntoView({behavior:"smooth",block:"start"})};return d.jsxs("div",{className:"flex flex-col min-h-screen",children:[d.jsx("header",{className:"absolute top-0 left-0 right-0 z-50 border-b border-white/20 bg-black/20 backdrop-blur-sm",children:d.jsxs("div",{className:"container flex h-16 items-center justify-between px-4 md:px-6",children:[d.jsx(Ge,{to:"/",className:"flex items-center gap-2",children:d.jsx("span",{className:"text-xl font-bold text-white",children:"Italian Migrants NT"})}),d.jsxs("nav",{className:"hidden md:flex gap-6",children:[d.jsx(Ge,{to:"/",className:"text-sm font-medium text-white hover:text-white/80 transition-colors",children:"Home"}),d.jsx("a",{href:"#about",className:"text-sm font-medium text-white hover:text-white/80 transition-colors",children:"About"}),d.jsx("a",{href:"#stories",className:"text-sm font-medium text-white hover:text-white/80 transition-colors",children:"Stories"}),d.jsx("a",{href:"#contact",onClick:h,className:"text-sm font-medium text-white hover:text-white/80 transition-colors",children:"Contact"})]}),d.jsxs(Me,{variant:"outline",size:"icon",className:"md:hidden border-white/20 text-white hover:bg-white/10",children:[d.jsx(Pu,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Search"})]})]})}),d.jsxs("main",{className:"flex-1",children:[d.jsxs("section",{className:"relative w-full h-screen flex items-center justify-center overflow-hidden",children:[d.jsx("div",{className:"absolute inset-0",children:c.map((p,g)=>d.jsxs("div",{className:`absolute inset-0 transition-opacity duration-1000 ${g===e?"opacity-100":"opacity-0"}`,children:[d.jsx("img",{src:p.src||"/assets/placeholder.svg",alt:p.alt,className:"w-full h-full object-cover"}),d.jsx("div",{className:"absolute inset-0 bg-black/60"})]},g))}),d.jsxs("div",{className:"relative z-10 text-center text-white px-4 md:px-6 max-w-5xl mx-auto",children:[d.jsx("h1",{className:"text-4xl md:text-6xl lg:text-7xl font-bold tracking-tighter font-serif mb-4",children:"Find Your Italian Heritage"}),d.jsx("p",{className:"text-lg md:text-xl lg:text-2xl mb-8 text-white/90 max-w-3xl mx-auto leading-relaxed",children:"Search our comprehensive database of Italian migrants to the Northern Territory. Discover family histories, personal stories, and cultural contributions spanning over a century."}),d.jsxs("div",{className:"bg-white/95 backdrop-blur-sm rounded-2xl p-6 md:p-8 shadow-2xl mb-8 max-w-4xl mx-auto",children:[d.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-[#9B2335] mb-6 font-serif",children:"Search Migrant Database"}),d.jsx(ZH,{})]}),d.jsx(Me,{size:"lg",variant:"outline",onClick:()=>r("/search-results"),className:"border-white text-black hover:bg-white hover:text-black px-8 py-3 text-lg",children:"Browse All Records"}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mt-12 text-center",children:[d.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-lg p-4",children:[d.jsx("div",{className:"text-3xl font-bold text-white",children:n.toLocaleString()}),d.jsx("div",{className:"text-white/80",children:"Migrant Records"})]}),d.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-lg p-4",children:[d.jsx("div",{className:"text-3xl font-bold text-white",children:"1880-1980"}),d.jsx("div",{className:"text-white/80",children:"Years Covered"})]}),d.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-lg p-4",children:[d.jsx("div",{className:"text-3xl font-bold text-white",children:"156"}),d.jsx("div",{className:"text-white/80",children:"Italian Regions"})]})]})]}),d.jsx("div",{className:"absolute bottom-8 left-1/2 transform -translate-x-1/2 flex space-x-2",children:c.map((p,g)=>d.jsx("button",{onClick:()=>t(g),className:`w-3 h-3 rounded-full transition-all ${g===e?"bg-white":"bg-white/50"}`},g))})]}),d.jsx("section",{className:"w-full py-12 bg-[#E8DCCA]",children:d.jsxs("div",{className:"container px-4 md:px-6",children:[d.jsxs("div",{className:"text-center mb-8",children:[d.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-[#9B2335] font-serif mb-4",children:"Search Tips"}),d.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Get the most out of your search with these helpful tips"})]}),d.jsxs("div",{className:"grid md:grid-cols-3 gap-6 max-w-4xl mx-auto",children:[d.jsxs("div",{className:"text-center p-6 bg-white rounded-lg shadow-sm",children:[d.jsx("div",{className:"w-12 h-12 bg-[#01796F] rounded-full flex items-center justify-center mx-auto mb-4",children:d.jsx(Pu,{className:"h-6 w-6 text-white"})}),d.jsx("h3",{className:"font-semibold text-[#9B2335] mb-2",children:"Name Variations"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"Try different spellings and shortened versions of names as they may have been anglicized upon arrival."})]}),d.jsxs("div",{className:"text-center p-6 bg-white rounded-lg shadow-sm",children:[d.jsx("div",{className:"w-12 h-12 bg-[#01796F] rounded-full flex items-center justify-center mx-auto mb-4",children:d.jsx("span",{className:"text-white font-bold",children:"📅"})}),d.jsx("h3",{className:"font-semibold text-[#9B2335] mb-2",children:"Date Ranges"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"Use broader date ranges as exact arrival dates may not always be recorded accurately."})]}),d.jsxs("div",{className:"text-center p-6 bg-white rounded-lg shadow-sm",children:[d.jsx("div",{className:"w-12 h-12 bg-[#01796F] rounded-full flex items-center justify-center mx-auto mb-4",children:d.jsx("span",{className:"text-white font-bold",children:"🗺️"})}),d.jsx("h3",{className:"font-semibold text-[#9B2335] mb-2",children:"Regional Search"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"Search by Italian region or province if you know your family's origin to narrow results."})]})]})]})}),d.jsx("section",{id:"stories",className:"w-full py-12 md:py-24 lg:py-32",children:d.jsxs("div",{className:"container px-4 md:px-6",children:[d.jsx("div",{className:"flex flex-col items-center justify-center space-y-4 text-center",children:d.jsxs("div",{className:"space-y-2",children:[d.jsx("h2",{className:"text-3xl font-bold tracking-tighter sm:text-5xl font-serif text-[#1A2A57]",children:"Featured Stories"}),d.jsx("p",{className:"max-w-[900px] text-muted-foreground md:text-xl/relaxed lg:text-base/relaxed xl:text-xl/relaxed",children:"Discover some of the remarkable personal journeys found in our database. Each story represents courage, determination, and the pursuit of a better life."})]})}),d.jsx("div",{className:"mx-auto max-w-5xl py-12",children:d.jsxs(xO,{className:"w-full",children:[d.jsx(bO,{children:a.map(p=>{var v,w;const g=(v=p.photos)==null?void 0:v.find(y=>y.is_profile_photo);return d.jsx(wO,{className:"md:basis-1/2 lg:basis-1/2",children:d.jsx("div",{className:"p-2",children:d.jsx(et,{className:"h-full",children:d.jsx(tt,{className:"p-6",children:d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"aspect-video overflow-hidden rounded-lg",children:d.jsx("img",{src:g?`${l}${g.file_path}`:"https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80",alt:`Portrait of ${p.full_name||p.surname||"Unnamed"}`,className:"object-cover w-full h-full"})}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("h3",{className:"text-xl font-bold font-serif text-[#9B2335]",children:p.full_name||p.surname||"Unnamed"}),d.jsxs("p",{className:"text-sm text-[#01796F] font-medium",children:["Arrived"," ",(w=p.migration)!=null&&w.date_of_arrival_nt?new Date(p.migration.date_of_arrival_nt).getFullYear():"Unknown"]}),d.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:p.additional_notes||"No story available."}),d.jsx(Me,{size:"sm",variant:"outline",className:"mt-3 border-[#9B2335] text-[#9B2335] hover:bg-[#9B2335] hover:text-white",onClick:()=>r(`/migrant-profile/${p.person_id}`),children:"View Full Record"})]})]})})})})},p.person_id)})}),d.jsx(SO,{}),d.jsx(jO,{})]})})]})}),d.jsx("section",{id:"about",className:"w-full py-12 md:py-24 lg:py-32 bg-gray-50",children:d.jsx("div",{className:"container px-4 md:px-6",children:d.jsxs("div",{className:"grid gap-6 lg:grid-cols-2 lg:gap-12 items-center",children:[d.jsxs("div",{className:"space-y-4 text-center lg:text-left",children:[d.jsx("h2",{className:"text-3xl font-bold tracking-tighter sm:text-4xl md:text-5xl font-serif text-[#1A2A57]",children:"Preserving Our Heritage"}),d.jsx("p",{className:"max-w-[600px] text-muted-foreground md:text-xl/relaxed lg:text-base/relaxed xl:text-xl/relaxed mx-auto lg:mx-0",children:"This digital archive aims to preserve and celebrate the contributions of Italian migrants to the Northern Territory. By documenting their stories, photographs, and historical records, we ensure that their legacy continues for generations to come."}),d.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center lg:justify-start",children:[d.jsx(Me,{className:"bg-[#01796F] hover:bg-[#015a54] text-white",children:"Contribute a Story"}),d.jsx(Me,{variant:"outline",className:"border-[#9B2335] text-[#9B2335] hover:bg-[#9B2335] hover:text-white",children:"View Gallery"})]})]}),d.jsx("div",{className:"w-full max-w-[500px] mx-auto",children:d.jsxs(xO,{className:"w-full",children:[d.jsx(bO,{children:f.map((p,g)=>d.jsx(wO,{className:"md:basis-1/2",children:d.jsx("div",{className:"p-1",children:d.jsx("div",{className:"overflow-hidden rounded-xl aspect-square",children:d.jsx("img",{src:p.src||"/assets/placeholder.svg",alt:p.alt,className:"object-cover w-full h-full hover:scale-105 transition-transform duration-300"})})})},g))}),d.jsx(SO,{}),d.jsx(jO,{})]})})]})})})]}),d.jsx("footer",{id:"contact",className:"bg-[#1A2A57] text-white",children:d.jsxs("div",{className:"container px-4 md:px-6",children:[d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8 py-12",children:[d.jsxs("div",{className:"space-y-4",children:[d.jsx("h3",{className:"text-lg font-bold font-serif text-[#E8DCCA]",children:"Italian Migrants NT"}),d.jsx("p",{className:"text-sm text-gray-300 leading-relaxed",children:"Preserving and celebrating the rich heritage of Italian migrants to the Northern Territory through digital archives, personal stories, and historical documentation."}),d.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-300",children:[d.jsx(h7,{className:"h-4 w-4 text-[#01796F]"}),d.jsx("span",{children:"Heritage Australia Recognition"})]})]}),d.jsxs("div",{className:"space-y-4",children:[d.jsx("h3",{className:"text-lg font-bold font-serif text-[#E8DCCA]",children:"Contact Us"}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(_u,{className:"h-4 w-4 text-[#01796F] mt-0.5 flex-shrink-0"}),d.jsxs("div",{className:"text-sm text-gray-300",children:[d.jsx("p",{children:"Northern Territory Archives Centre"}),d.jsx("p",{children:"Kelsey Crescent, Millner NT 0810"}),d.jsx("p",{children:"Australia"})]})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(rW,{className:"h-4 w-4 text-[#01796F]"}),d.jsx("span",{className:"text-sm text-gray-300",children:"+61 8 8924 7677"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(ju,{className:"h-4 w-4 text-[#01796F]"}),d.jsx("a",{href:"mailto:heritage@italianmigrantsnt.org.au",className:"text-sm text-gray-300 hover:text-[#E8DCCA] transition-colors",children:"heritage@italianmigrantsnt.org.au"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(l1,{className:"h-4 w-4 text-[#01796F]"}),d.jsxs("div",{className:"text-sm text-gray-300",children:[d.jsx("p",{children:"Mon-Fri: 9:00 AM - 5:00 PM"}),d.jsx("p",{children:"Sat: 10:00 AM - 2:00 PM"})]})]})]})]}),d.jsxs("div",{className:"space-y-4",children:[d.jsx("h3",{className:"text-lg font-bold font-serif text-[#E8DCCA]",children:"Quick Links"}),d.jsxs("nav",{className:"space-y-2",children:[d.jsx(Ge,{to:"/search-results",className:"block text-sm text-gray-300 hover:text-[#E8DCCA] transition-colors",children:"Search Database"}),d.jsx(Ge,{to:"#",className:"block text-sm text-gray-300 hover:text-[#E8DCCA] transition-colors",children:"Contribute a Story"}),d.jsx(Ge,{to:"/",className:"block text-sm text-gray-300 hover:text-[#E8DCCA] transition-colors",children:"Photo Gallery"}),d.jsx(Ge,{to:"/",className:"block text-sm text-gray-300 hover:text-[#E8DCCA] transition-colors",children:"Research Help"}),d.jsx(Ge,{to:"/",className:"block text-sm text-gray-300 hover:text-[#E8DCCA] transition-colors",children:"Volunteer"}),d.jsx(Ge,{to:"/",className:"block text-sm text-gray-300 hover:text-[#E8DCCA] transition-colors",children:"Support Us"})]})]}),d.jsxs("div",{className:"space-y-4",children:[d.jsx("h3",{className:"text-lg font-bold font-serif text-[#E8DCCA]",children:"Resources"}),d.jsxs("nav",{className:"space-y-2",children:[d.jsx(Ge,{to:"/",className:"block text-sm text-gray-300 hover:text-[#E8DCCA] transition-colors",children:"FAQ"}),d.jsx(Ge,{to:"/",className:"block text-sm text-gray-300 hover:text-[#E8DCCA] transition-colors",children:"Research Guides"}),d.jsx(Ge,{to:"/",className:"block text-sm text-gray-300 hover:text-[#E8DCCA] transition-colors",children:"Historical Timeline"}),d.jsx(Ge,{to:"/",className:"block text-sm text-gray-300 hover:text-[#E8DCCA] transition-colors",children:"Partnerships"})]}),d.jsxs("div",{className:"pt-4",children:[d.jsx("h4",{className:"text-sm font-semibold text-[#E8DCCA] mb-3",children:"Follow Us"}),d.jsxs("div",{className:"flex gap-3",children:[d.jsx("a",{href:"https://facebook.com/italianmigrantsnt",className:"text-gray-300 hover:text-[#E8DCCA] transition-colors","aria-label":"Follow us on Facebook",children:d.jsx(L7,{className:"h-5 w-5"})}),d.jsx("a",{href:"https://twitter.com/italianmigrantsnt",className:"text-gray-300 hover:text-[#E8DCCA] transition-colors","aria-label":"Follow us on Twitter",children:d.jsx(vW,{className:"h-5 w-5"})}),d.jsx("a",{href:"https://instagram.com/italianmigrantsnt",className:"text-gray-300 hover:text-[#E8DCCA] transition-colors","aria-label":"Follow us on Instagram",children:d.jsx(W7,{className:"h-5 w-5"})}),d.jsx("a",{href:"https://youtube.com/italianmigrantsnt",className:"text-gray-300 hover:text-[#E8DCCA] transition-colors","aria-label":"Subscribe to our YouTube channel",children:d.jsx(_W,{className:"h-5 w-5"})})]})]})]})]}),d.jsx("div",{className:"border-t border-gray-600 py-8",children:d.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 text-center",children:[d.jsxs("div",{className:"space-y-1",children:[d.jsxs("div",{className:"flex items-center justify-center gap-2",children:[d.jsx(c1,{className:"h-5 w-5 text-[#01796F]"}),d.jsx("span",{className:"text-2xl font-bold text-[#E8DCCA]",children:n.toLocaleString()})]}),d.jsx("p",{className:"text-sm text-gray-300",children:"Total Records"})]}),d.jsxs("div",{className:"space-y-1",children:[d.jsxs("div",{className:"flex items-center justify-center gap-2",children:[d.jsx(gm,{className:"h-5 w-5 text-[#01796F]"}),d.jsx("span",{className:"text-2xl font-bold text-[#E8DCCA]",children:"2,847"})]}),d.jsx("p",{className:"text-sm text-gray-300",children:"Families Documented"})]}),d.jsxs("div",{className:"space-y-1",children:[d.jsxs("div",{className:"flex items-center justify-center gap-2",children:[d.jsx(_u,{className:"h-5 w-5 text-[#01796F]"}),d.jsx("span",{className:"text-2xl font-bold text-[#E8DCCA]",children:"156"})]}),d.jsx("p",{className:"text-sm text-gray-300",children:"Italian Regions"})]}),d.jsxs("div",{className:"space-y-1",children:[d.jsxs("div",{className:"flex items-center justify-center gap-2",children:[d.jsx(l1,{className:"h-5 w-5 text-[#01796F]"}),d.jsx("span",{className:"text-2xl font-bold text-[#E8DCCA]",children:"100+"})]}),d.jsx("p",{className:"text-sm text-gray-300",children:"Years of History"})]})]})}),d.jsx("div",{className:"border-t border-gray-600 py-6",children:d.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-center gap-4",children:[d.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-4 text-sm text-gray-300",children:[d.jsxs("p",{children:["© ",new Date().getFullYear()," Italian Migrants NT. All rights reserved."]}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsx("span",{children:"Powered by"}),d.jsx("span",{className:"text-[#E8DCCA] font-semibold",children:"Heritage Digital Archives"})]})]}),d.jsxs("nav",{className:"flex gap-6",children:[d.jsx("a",{href:"#",className:"text-sm text-gray-300 hover:text-[#E8DCCA] transition-colors",children:"Terms of Service"}),d.jsx("a",{href:"#",className:"text-sm text-gray-300 hover:text-[#E8DCCA] transition-colors",children:"Privacy Policy"}),d.jsx("a",{href:"#",className:"text-sm text-gray-300 hover:text-[#E8DCCA] transition-colors",children:"Accessibility"}),d.jsx("a",{href:"/login",className:"text-sm text-gray-300 hover:text-[#E8DCCA] transition-colors",children:"Admin"})]})]})})]})})]})}const CK=()=>d.jsx("main",{children:d.jsx(OK,{})}),TK=()=>d.jsxs("div",{className:"flex flex-col items-center justify-center min-h-screen px-4 text-center",children:[d.jsx("h1",{className:"text-6xl font-bold mb-4",children:"404"}),d.jsx("h2",{className:"text-2xl font-semibold mb-6",children:"Record Not Found"}),d.jsx("p",{className:"text-gray-600 mb-8 max-w-md",children:"We couldn't find the migrant record you're looking for. It may have been removed or never existed."}),d.jsx(Ge,{to:"/",className:"btn btn-primary",children:"Return to Homepage"})]});function Ce(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function kK(e,t){const r=j.createContext(t),n=a=>{const{children:o,...l}=a,c=j.useMemo(()=>l,Object.values(l));return d.jsx(r.Provider,{value:c,children:o})};n.displayName=e+"Provider";function i(a){const o=j.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,i]}function mn(e,t=[]){let r=[];function n(a,o){const l=j.createContext(o),c=r.length;r=[...r,o];const f=p=>{var S;const{scope:g,children:v,...w}=p,y=((S=g==null?void 0:g[e])==null?void 0:S[c])||l,b=j.useMemo(()=>w,Object.values(w));return d.jsx(y.Provider,{value:b,children:v})};f.displayName=a+"Provider";function h(p,g){var y;const v=((y=g==null?void 0:g[e])==null?void 0:y[c])||l,w=j.useContext(v);if(w)return w;if(o!==void 0)return o;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[f,h]}const i=()=>{const a=r.map(o=>j.createContext(o));return function(l){const c=(l==null?void 0:l[e])||a;return j.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[n,MK(i,...t)]}function MK(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=n.reduce((l,{useScope:c,scopeName:f})=>{const p=c(a)[`__scope${f}`];return{...l,...p}},{});return j.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function Hj(e){const t=e+"CollectionProvider",[r,n]=mn(t),[i,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=y=>{const{scope:b,children:S}=y,A=U.useRef(null),_=U.useRef(new Map).current;return d.jsx(i,{scope:b,itemMap:_,collectionRef:A,children:S})};o.displayName=t;const l=e+"CollectionSlot",c=ko(l),f=U.forwardRef((y,b)=>{const{scope:S,children:A}=y,_=a(l,S),C=it(b,_.collectionRef);return d.jsx(c,{ref:C,children:A})});f.displayName=l;const h=e+"CollectionItemSlot",p="data-radix-collection-item",g=ko(h),v=U.forwardRef((y,b)=>{const{scope:S,children:A,..._}=y,C=U.useRef(null),N=it(b,C),O=a(h,S);return U.useEffect(()=>(O.itemMap.set(C,{ref:C,..._}),()=>void O.itemMap.delete(C))),d.jsx(g,{[p]:"",ref:N,children:A})});v.displayName=h;function w(y){const b=a(e+"CollectionConsumer",y);return U.useCallback(()=>{const A=b.collectionRef.current;if(!A)return[];const _=Array.from(A.querySelectorAll(`[${p}]`));return Array.from(b.itemMap.values()).sort((O,T)=>_.indexOf(O.ref.current)-_.indexOf(T.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:o,Slot:f,ItemSlot:v},w,n]}var yr=globalThis!=null&&globalThis.document?j.useLayoutEffect:()=>{},RK=y$[" useId ".trim().toString()]||(()=>{}),IK=0;function Qn(e){const[t,r]=j.useState(RK());return yr(()=>{r(n=>n??String(IK++))},[e]),e||(t?`radix-${t}`:"")}function ai(e){const t=j.useRef(e);return j.useEffect(()=>{t.current=e}),j.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}var DK=y$[" useInsertionEffect ".trim().toString()]||yr;function Ra({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,a,o]=$K({defaultProp:t,onChange:r}),l=e!==void 0,c=l?e:i;{const h=j.useRef(e!==void 0);j.useEffect(()=>{const p=h.current;p!==l&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=l},[l,n])}const f=j.useCallback(h=>{var p;if(l){const g=LK(h)?h(e):h;g!==e&&((p=o.current)==null||p.call(o,g))}else a(h)},[l,e,a,o]);return[c,f]}function $K({defaultProp:e,onChange:t}){const[r,n]=j.useState(e),i=j.useRef(r),a=j.useRef(t);return DK(()=>{a.current=t},[t]),j.useEffect(()=>{var o;i.current!==r&&((o=a.current)==null||o.call(a,r),i.current=r)},[r,i]),[r,n,a]}function LK(e){return typeof e=="function"}var BK=j.createContext(void 0);function Tf(e){const t=j.useContext(BK);return e||t||"ltr"}var ky="rovingFocusGroup.onEntryFocus",FK={bubbles:!1,cancelable:!0},kf="RovingFocusGroup",[S1,L3,zK]=Hj(kf),[VK,Cl]=mn(kf,[zK]),[UK,qK]=VK(kf),B3=j.forwardRef((e,t)=>d.jsx(S1.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(S1.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(WK,{...e,ref:t})})}));B3.displayName=kf;var WK=j.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:f,preventScrollOnEntryFocus:h=!1,...p}=e,g=j.useRef(null),v=it(t,g),w=Tf(a),[y,b]=Ra({prop:o,defaultProp:l??null,onChange:c,caller:kf}),[S,A]=j.useState(!1),_=ai(f),C=L3(r),N=j.useRef(!1),[O,T]=j.useState(0);return j.useEffect(()=>{const k=g.current;if(k)return k.addEventListener(ky,_),()=>k.removeEventListener(ky,_)},[_]),d.jsx(UK,{scope:r,orientation:n,dir:w,loop:i,currentTabStopId:y,onItemFocus:j.useCallback(k=>b(k),[b]),onItemShiftTab:j.useCallback(()=>A(!0),[]),onFocusableItemAdd:j.useCallback(()=>T(k=>k+1),[]),onFocusableItemRemove:j.useCallback(()=>T(k=>k-1),[]),children:d.jsx(Le.div,{tabIndex:S||O===0?-1:0,"data-orientation":n,...p,ref:v,style:{outline:"none",...e.style},onMouseDown:Ce(e.onMouseDown,()=>{N.current=!0}),onFocus:Ce(e.onFocus,k=>{const R=!N.current;if(k.target===k.currentTarget&&R&&!S){const F=new CustomEvent(ky,FK);if(k.currentTarget.dispatchEvent(F),!F.defaultPrevented){const I=C().filter(z=>z.focusable),L=I.find(z=>z.active),V=I.find(z=>z.id===y),K=[L,V,...I].filter(Boolean).map(z=>z.ref.current);V3(K,h)}}N.current=!1}),onBlur:Ce(e.onBlur,()=>A(!1))})})}),F3="RovingFocusGroupItem",z3=j.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:a,children:o,...l}=e,c=Qn(),f=a||c,h=qK(F3,r),p=h.currentTabStopId===f,g=L3(r),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:y}=h;return j.useEffect(()=>{if(n)return v(),()=>w()},[n,v,w]),d.jsx(S1.ItemSlot,{scope:r,id:f,focusable:n,active:i,children:d.jsx(Le.span,{tabIndex:p?0:-1,"data-orientation":h.orientation,...l,ref:t,onMouseDown:Ce(e.onMouseDown,b=>{n?h.onItemFocus(f):b.preventDefault()}),onFocus:Ce(e.onFocus,()=>h.onItemFocus(f)),onKeyDown:Ce(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){h.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const S=KK(b,h.orientation,h.dir);if(S!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let _=g().filter(C=>C.focusable).map(C=>C.ref.current);if(S==="last")_.reverse();else if(S==="prev"||S==="next"){S==="prev"&&_.reverse();const C=_.indexOf(b.currentTarget);_=h.loop?YK(_,C+1):_.slice(C+1)}setTimeout(()=>V3(_))}}),children:typeof o=="function"?o({isCurrentTabStop:p,hasTabStop:y!=null}):o})})});z3.displayName=F3;var HK={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function GK(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function KK(e,t,r){const n=GK(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return HK[n]}function V3(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function YK(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Gj=B3,Kj=z3;function XK(e,t){return j.useReducer((r,n)=>t[r][n]??r,e)}var Fn=e=>{const{present:t,children:r}=e,n=ZK(t),i=typeof r=="function"?r({present:n.isPresent}):j.Children.only(r),a=it(n.ref,QK(i));return typeof r=="function"||n.isPresent?j.cloneElement(i,{ref:a}):null};Fn.displayName="Presence";function ZK(e){const[t,r]=j.useState(),n=j.useRef(null),i=j.useRef(e),a=j.useRef("none"),o=e?"mounted":"unmounted",[l,c]=XK(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return j.useEffect(()=>{const f=ph(n.current);a.current=l==="mounted"?f:"none"},[l]),yr(()=>{const f=n.current,h=i.current;if(h!==e){const g=a.current,v=ph(f);e?c("MOUNT"):v==="none"||(f==null?void 0:f.display)==="none"?c("UNMOUNT"):c(h&&g!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),yr(()=>{if(t){let f;const h=t.ownerDocument.defaultView??window,p=v=>{const y=ph(n.current).includes(v.animationName);if(v.target===t&&y&&(c("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",f=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},g=v=>{v.target===t&&(a.current=ph(n.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{h.clearTimeout(f),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:j.useCallback(f=>{n.current=f?getComputedStyle(f):null,r(f)},[])}}function ph(e){return(e==null?void 0:e.animationName)||"none"}function QK(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Em="Tabs",[JK,g1e]=mn(Em,[Cl]),U3=Cl(),[eY,Yj]=JK(Em),q3=j.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:i,defaultValue:a,orientation:o="horizontal",dir:l,activationMode:c="automatic",...f}=e,h=Tf(l),[p,g]=Ra({prop:n,onChange:i,defaultProp:a??"",caller:Em});return d.jsx(eY,{scope:r,baseId:Qn(),value:p,onValueChange:g,orientation:o,dir:h,activationMode:c,children:d.jsx(Le.div,{dir:h,"data-orientation":o,...f,ref:t})})});q3.displayName=Em;var W3="TabsList",H3=j.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...i}=e,a=Yj(W3,r),o=U3(r);return d.jsx(Gj,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:n,children:d.jsx(Le.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});H3.displayName=W3;var G3="TabsTrigger",K3=j.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:i=!1,...a}=e,o=Yj(G3,r),l=U3(r),c=Z3(o.baseId,n),f=Q3(o.baseId,n),h=n===o.value;return d.jsx(Kj,{asChild:!0,...l,focusable:!i,active:h,children:d.jsx(Le.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":f,"data-state":h?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...a,ref:t,onMouseDown:Ce(e.onMouseDown,p=>{!i&&p.button===0&&p.ctrlKey===!1?o.onValueChange(n):p.preventDefault()}),onKeyDown:Ce(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&o.onValueChange(n)}),onFocus:Ce(e.onFocus,()=>{const p=o.activationMode!=="manual";!h&&!i&&p&&o.onValueChange(n)})})})});K3.displayName=G3;var Y3="TabsContent",X3=j.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:i,children:a,...o}=e,l=Yj(Y3,r),c=Z3(l.baseId,n),f=Q3(l.baseId,n),h=n===l.value,p=j.useRef(h);return j.useEffect(()=>{const g=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(g)},[]),d.jsx(Fn,{present:i||h,children:({present:g})=>d.jsx(Le.div,{"data-state":h?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!g,id:f,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:g&&a})})});X3.displayName=Y3;function Z3(e,t){return`${e}-trigger-${t}`}function Q3(e,t){return`${e}-content-${t}`}var tY=q3,rY=H3,nY=K3,iY=X3;function Xj({className:e,...t}){return d.jsx(tY,{"data-slot":"tabs",className:We("flex flex-col gap-2",e),...t})}function J3({className:e,...t}){return d.jsx(rY,{"data-slot":"tabs-list",className:We("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Ms({className:e,...t}){return d.jsx(nY,{"data-slot":"tabs-trigger",className:We("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function bo({className:e,...t}){return d.jsx(iY,{"data-slot":"tabs-content",className:We("flex-1 outline-none",e),...t})}const Ni=(e,t="medium")=>{if(!e)return"";try{const r=e.includes(".")?e.split(".")[0]+"Z":e,n=new Date(r);if(isNaN(n.getTime()))return"";switch(t){case"short":return n.toLocaleDateString("en-AU",{year:"numeric"});case"medium":return n.toLocaleDateString("en-AU",{day:"numeric",month:"short",year:"numeric"});case"long":return n.toLocaleDateString("en-AU",{day:"numeric",month:"long",year:"numeric"});case"year":return n.getFullYear().toString();default:return n.toLocaleDateString()}}catch(r){return console.error(`Error formatting date: ${e}`,r),""}},LO="http://localhost:8000";function aY(){var c,f,h,p,g,v,w,y,b,S,A;const{id:e}=Pj(),[t,r]=j.useState(null),[n,i]=j.useState(!0),[a,o]=j.useState(null),l=(c=t==null?void 0:t.photos)==null?void 0:c.find(_=>_.is_profile_photo);return j.useEffect(()=>{(async()=>{try{if(!e){o("No ID provided in URL."),i(!1);return}const C=await At.getMigrantById(e);r(C)}catch{o("Failed to load migrant data.")}finally{i(!1)}})()},[e]),n?d.jsx("p",{className:"text-gray-500 p-4",children:"Loading..."}):a?d.jsx("p",{className:"text-red-500 p-4",children:a}):t?d.jsxs("div",{className:"flex flex-col min-h-screen",children:[d.jsx("header",{className:"border-b",children:d.jsxs("div",{className:"container flex h-16 items-center justify-between px-4 md:px-6",children:[d.jsx(Ge,{to:"/",className:"flex items-center gap-2",children:d.jsx("span",{className:"text-xl font-bold text-[#9B2335]",children:"Italian Migrants NT"})}),d.jsx("nav",{className:"hidden md:flex gap-6",children:["home","about","search","stories","contact"].map(_=>d.jsx(Ge,{to:"/",className:"text-sm font-medium hover:underline underline-offset-4 capitalize",children:_},_))})]})}),d.jsxs("main",{className:"flex-1",children:[d.jsx("section",{className:"w-full py-12 md:py-16 lg:py-20 bg-[#E8DCCA]",children:d.jsx("div",{className:"container px-4 md:px-6",children:d.jsxs("div",{className:"flex flex-col md:flex-row gap-8 items-start",children:[d.jsx("div",{className:"w-full md:w-1/3 lg:w-1/4",children:d.jsxs("div",{className:"sticky top-20 space-y-4",children:[d.jsx("div",{className:"overflow-hidden rounded-xl border-4 border-white shadow-lg",children:d.jsx("img",{src:l&&l.file_path?l.file_path.startsWith("http")?l.file_path:`${LO}${l.file_path}`:"/assets/placeholder.svg?height=600&width=450",alt:`${t.full_name||"Migrant photo"}`,className:"aspect-[3/4] object-cover w-full",onError:_=>{_.currentTarget.src="/assets/placeholder.svg?height=600&width=450"}})}),d.jsx("div",{className:"flex justify-between",children:d.jsxs(Me,{variant:"outline",size:"sm",className:"w-full",children:[d.jsx(W$,{className:"mr-2 h-4 w-4"}),"View All Photos"]})})]})}),d.jsxs("div",{className:"w-full md:w-2/3 lg:w-3/4 space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-3xl font-bold tracking-tighter sm:text-4xl md:text-5xl font-serif text-[#9B2335]",children:t.full_name}),d.jsxs("div",{className:"flex flex-wrap gap-4 mt-4",children:[d.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[d.jsx(ks,{className:"mr-1 h-4 w-4"}),d.jsxs("span",{children:["Arrived ",Ni(((f=t.migration)==null?void 0:f.date_of_arrival_nt)||((h=t.migration)==null?void 0:h.date_of_arrival_aus)||"Unknown","short")]})]}),d.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[d.jsx(hr,{className:"mr-1 h-4 w-4"}),d.jsx("span",{children:(p=t.migration)!=null&&p.arrival_period?`Age ${t.migration.arrival_period} at migration`:"Age unknown at migration"})]}),d.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[d.jsx(mm,{className:"mr-1 h-4 w-4"}),d.jsxs("span",{children:["From ",((g=t.migration)==null?void 0:g.arrival_period)||"Unknown location"]})]}),d.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[d.jsx(_u,{className:"mr-1 h-4 w-4"}),d.jsxs("span",{children:["Settled in ",((v=t.residence)==null?void 0:v.town_or_city)||"Northern Territory"]})]})]})]}),d.jsxs(Xj,{defaultValue:"biography",className:"w-full",children:[d.jsxs(J3,{className:"grid w-full grid-cols-4",children:[d.jsx(Ms,{value:"biography",children:"Biography"}),d.jsx(Ms,{value:"photos",children:"Photos"}),d.jsx(Ms,{value:"documents",children:"Documents"}),d.jsx(Ms,{value:"family",children:"Family"})]}),d.jsx(bo,{value:"biography",className:"mt-6",children:d.jsx(et,{children:d.jsx(tt,{className:"pt-6",children:d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx("h3",{className:"font-medium text-[#01796F]",children:"Personal Information"}),d.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[d.jsx("span",{className:"font-medium",children:"Birth Date:"}),d.jsx("span",{children:Ni(t.date_of_birth||"Unknown","long")}),d.jsx("span",{className:"font-medium",children:"Birth Place:"}),d.jsx("span",{children:t.place_of_birth}),d.jsx("span",{className:"font-medium",children:"Occupation:"}),d.jsx("span",{children:t.occupation})]})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("h3",{className:"font-medium text-[#01796F]",children:"Migration Details"}),d.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[d.jsx("span",{className:"font-medium",children:"Year of Arrival:"}),d.jsx("span",{children:Ni(((w=t.migration)==null?void 0:w.date_of_arrival_nt)||"Unknown","long")}),d.jsx("span",{className:"font-medium",children:"Age at Migration:"}),d.jsx("span",{children:((y=t.migration)==null?void 0:y.arrival_period)||"Unknown"}),d.jsx("span",{className:"font-medium",children:"Region of Origin:"}),d.jsx("span",{children:t.place_of_birth}),d.jsx("span",{className:"font-medium",children:"Settlement:"}),d.jsx("span",{children:((b=t.residence)==null?void 0:b.town_or_city)||"Northern Territory"})]})]})]}),d.jsxs("div",{className:"pt-4",children:[d.jsx("h3",{className:"font-medium text-[#01796F] mb-2",children:"Biography"}),d.jsx("div",{className:" max-w-none text-[#747474]",children:t.additional_notes?t.additional_notes.split(`
|
||
|
||
`).map((_,C)=>d.jsx("p",{className:"mb-4",children:_},C)):d.jsxs("p",{className:"mb-4",children:[t.full_name," was an Italian migrant who made the journey to the Northern Territory of Australia. Born in ",t.place_of_birth||"Italy",", ",t.full_name," sought new opportunities and a better life abroad. This migrant arrived in the Northern Territory in ",Ni(((S=t.migration)==null?void 0:S.date_of_arrival_nt)||"Unknown","year")||"the early 20th century",". In Australia, ",t.full_name," worked as ",t.occupation||"a laborer"," and contributed to the growing Italian community.",t.full_name,"'s story represents the courage and determination of Italian migrants who helped shape the Northern Territory's rich multicultural heritage."]})})]})]})})})}),d.jsx(bo,{value:"photos",className:"mt-6",children:d.jsx(et,{children:d.jsxs(tt,{className:"pt-6",children:[d.jsx("h3",{className:"font-medium text-[#01796F] mb-4",children:"Photos"}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(A=t.photos)==null?void 0:A.map(_=>d.jsxs("div",{className:"space-y-2",children:[d.jsx("div",{className:"overflow-hidden rounded-lg border",children:d.jsx("img",{src:_.file_path?_.file_path.startsWith("http")?_.file_path:`${LO}${_.file_path}`:"/assets/placeholder.svg?height=400&width=600",alt:_.caption||"Migrant photo",className:"aspect-video object-cover w-full",onError:C=>{C.currentTarget.src="/assets/placeholder.svg?height=400&width=600"}})}),d.jsx("p",{className:"text-sm text-muted-foreground",children:_.caption||"No caption available"})]},_.id)),d.jsx("p",{className:"text-muted-foreground italic",children:"No information available"})]})]})})}),d.jsx(bo,{value:"documents",className:"mt-6",children:d.jsx(et,{children:d.jsxs(tt,{className:"pt-6",children:[d.jsx("h3",{className:"font-medium text-[#01796F] mb-4",children:"Documents"}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:t.naturalization?d.jsxs("div",{className:"flex items-center p-4 border rounded-lg",children:[d.jsx(Rj,{className:"h-8 w-8 text-[#9B2335] mr-4"}),d.jsxs("div",{children:[d.jsx("h4",{className:"font-medium",children:"Naturalization Certificate"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:Ni(t.naturalization.date_of_naturalisation,"long")}),d.jsxs("p",{className:"text-sm text-muted-foreground",children:["Certificate No: ",t.naturalization.no_of_cert||"N/A"]})]}),d.jsx(Me,{variant:"ghost",size:"sm",className:"ml-auto",children:"View"})]}):d.jsx("p",{className:"text-muted-foreground italic",children:"No information available"})})]})})}),d.jsx(bo,{value:"family",className:"mt-6",children:d.jsx(et,{children:d.jsxs(tt,{className:"pt-6",children:[d.jsx("h3",{className:"font-medium text-[#01796F] mb-4",children:"Family Information"}),d.jsx("div",{className:"space-y-4",children:t.family?d.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[t.family.names_of_parents&&d.jsxs("div",{className:"p-4 border rounded-lg",children:[d.jsxs("h4",{className:"font-medium flex items-center",children:[d.jsx(hr,{className:"h-5 w-5 text-[#9B2335] mr-2"}),"Parents"]}),d.jsx("p",{className:"mt-2 text-sm text-gray-600",children:t.family.names_of_parents})]}),t.family.names_of_children&&d.jsxs("div",{className:"p-4 border rounded-lg",children:[d.jsxs("h4",{className:"font-medium flex items-center",children:[d.jsx(hr,{className:"h-5 w-5 text-[#9B2335] mr-2"}),"Children"]}),d.jsx("p",{className:"mt-2 text-sm text-gray-600",children:t.family.names_of_children})]})]}):d.jsx("p",{className:"text-muted-foreground italic",children:"No information available"})})]})})})]})]})]})})}),d.jsx("section",{className:"w-full py-12 md:py-24 lg:py-32",children:d.jsxs("div",{className:"container px-4 md:px-6",children:[d.jsx("div",{className:"flex flex-col items-center justify-center space-y-4 text-center",children:d.jsxs("div",{className:"space-y-2",children:[d.jsx("h2",{className:"text-3xl font-bold tracking-tighter sm:text-4xl font-serif text-[#1A2A57]",children:"Historical Context"}),d.jsxs("p",{className:"max-w-[900px] text-muted-foreground md:text-xl/relaxed lg:text-base/relaxed xl:text-xl/relaxed",children:["Understanding the historical context of ",t.full_name,"'s migration journey."]})]})}),d.jsxs("div",{className:"mt-12 grid grid-cols-1 md:grid-cols-3 gap-8",children:[d.jsx(et,{children:d.jsx(tt,{className:"pt-6",children:d.jsxs("div",{className:"text-center space-y-4",children:[d.jsx("div",{className:"inline-flex h-12 w-12 items-center justify-center rounded-full bg-[#E8DCCA]",children:d.jsx(Py,{className:"h-6 w-6 text-[#9B2335]"})}),d.jsx("h3",{className:"text-xl font-bold font-serif text-[#9B2335]",children:"Italy in the 1920s"}),d.jsx("p",{className:"text-muted-foreground",children:"Post-World War I Italy faced economic hardship, political instability, and the rise of fascism under Mussolini, prompting many Italians to seek opportunities abroad."})]})})}),d.jsx(et,{children:d.jsx(tt,{className:"pt-6",children:d.jsxs("div",{className:"text-center space-y-4",children:[d.jsx("div",{className:"inline-flex h-12 w-12 items-center justify-center rounded-full bg-[#E8DCCA]",children:d.jsx(Py,{className:"h-6 w-6 text-[#9B2335]"})}),d.jsx("h3",{className:"text-xl font-bold font-serif text-[#9B2335]",children:"Migration Journey"}),d.jsx("p",{className:"text-muted-foreground",children:"The journey from Italy to Australia was long and arduous, typically involving multiple ships and taking several weeks or even months to complete."})]})})}),d.jsx(et,{children:d.jsx(tt,{className:"pt-6",children:d.jsxs("div",{className:"text-center space-y-4",children:[d.jsx("div",{className:"inline-flex h-12 w-12 items-center justify-center rounded-full bg-[#E8DCCA]",children:d.jsx(Py,{className:"h-6 w-6 text-[#9B2335]"})}),d.jsx("h3",{className:"text-xl font-bold font-serif text-[#9B2335]",children:"Northern Territory in the 1920s"}),d.jsx("p",{className:"text-muted-foreground",children:"The Northern Territory in the 1920s was sparsely populated and developing, with opportunities in fishing, agriculture, and infrastructure projects attracting migrants."})]})})})]})]})})]}),d.jsx("footer",{className:"border-t bg-[#1A2A57] text-white",children:d.jsxs("div",{className:"container flex flex-col gap-2 sm:flex-row py-6 w-full items-center px-4 md:px-6",children:[d.jsxs("p",{className:"text-xs",children:["© ",new Date().getFullYear()," Italian Migrants NT. All rights reserved."]}),d.jsxs("nav",{className:"sm:ml-auto flex gap-4 sm:gap-6",children:[d.jsx(Ge,{to:"/terms",className:"text-xs hover:underline underline-offset-4",children:"Terms of Service"}),d.jsx(Ge,{to:"/privacy",className:"text-xs hover:underline underline-offset-4",children:"Privacy"}),d.jsx(Ge,{to:"/admin",className:"text-xs hover:underline underline-offset-4",children:"Admin"})]})]})})]}):d.jsx("p",{className:"p-4",children:"No data found."})}const oY=()=>{const{id:e}=Pj(),[t,r]=j.useState(null),[n,i]=j.useState(!0),[a,o]=j.useState(null);return j.useEffect(()=>{if(!e){o("No ID provided in the URL."),i(!1);return}(async()=>{try{const c=await At.getMigrantById(e);r(c)}catch{o("Failed to load migrant data.")}finally{i(!1)}})()},[e]),n?d.jsx("p",{className:"text-gray-500",children:"Loading..."}):a?d.jsx("p",{className:"text-red-500",children:a}):t?d.jsx(aY,{}):d.jsx("p",{children:"No data found."})};function sY(){const[e,t]=j.useState(""),[r,n]=j.useState(""),[i,a]=j.useState(!1),[o,l]=j.useState(!1),[c,f]=j.useState(""),h=pn(),p=async g=>{var v,w;g.preventDefault(),f(""),l(!0);try{const y=await At.login({email:e,password:r});console.log("Response:",y),h("/admin")}catch(y){console.error("Login error:",y),(w=(v=y.response)==null?void 0:v.data)!=null&&w.message?f(y.response.data.message):f("Login failed. Please check your input and try again.")}finally{l(!1)}};return d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100 p-4",children:d.jsx("div",{className:"w-full max-w-md",children:d.jsxs(et,{children:[d.jsx(Mn,{children:d.jsx(Rn,{className:"text-center text-xl font-semibold",children:"Login"})}),d.jsxs("form",{onSubmit:p,children:[d.jsxs(tt,{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx(ht,{htmlFor:"email",children:"Email"}),d.jsxs("div",{className:"relative",children:[d.jsx(ju,{className:"absolute left-3 top-2.5 size-5 text-gray-400"}),d.jsx(Ot,{id:"email",type:"email",placeholder:"admin@example.com",className:"pl-10",value:e,onChange:g=>t(g.target.value),required:!0,autoComplete:"username"})]})]}),d.jsxs("div",{children:[d.jsx(ht,{htmlFor:"password",children:"Password"}),d.jsxs("div",{className:"relative",children:[d.jsx(Qh,{className:"absolute left-3 top-2.5 size-5 text-gray-400"}),d.jsx(Ot,{id:"password",type:i?"text":"password",className:"pl-10 pr-10",value:r,onChange:g=>n(g.target.value),required:!0,autoComplete:"current-password"}),d.jsx("button",{type:"button",className:"absolute right-3 top-2.5 text-gray-500 hover:text-gray-700",onClick:()=>a(!i),"aria-label":i?"Hide password":"Show password",children:i?d.jsx(U$,{className:"size-5"}):d.jsx(q$,{className:"size-5"})})]})]}),c&&d.jsx("div",{className:"rounded-md bg-red-100 px-4 py-2 text-sm text-red-700 border border-red-300 animate-fade-in",children:c})]}),d.jsx(bm,{children:d.jsx(Me,{type:"submit",className:"w-full mt-4",disabled:o,children:o?"Authenticating...":"Sign In"})})]})]})})})}const eL=j.createContext({});function lY(e){const t=j.useRef(null);return t.current===null&&(t.current=e()),t.current}const Zj=typeof window<"u",cY=Zj?j.useLayoutEffect:j.useEffect,Qj=j.createContext(null);function Jj(e,t){e.indexOf(t)===-1&&e.push(t)}function e_(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const Bi=(e,t,r)=>r>t?t:r<e?e:r;let t_=()=>{};const Fi={},tL=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function rL(e){return typeof e=="object"&&e!==null}const nL=e=>/^0[^.\s]+$/u.test(e);function r_(e){let t;return()=>(t===void 0&&(t=e()),t)}const cn=e=>e,uY=(e,t)=>r=>t(e(r)),Mf=(...e)=>e.reduce(uY),Tu=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n};class n_{constructor(){this.subscriptions=[]}add(t){return Jj(this.subscriptions,t),()=>e_(this.subscriptions,t)}notify(t,r,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,r,n);else for(let a=0;a<i;a++){const o=this.subscriptions[a];o&&o(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Jn=e=>e*1e3,ei=e=>e/1e3;function iL(e,t){return t?e*(1e3/t):0}const aL=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,fY=1e-7,dY=12;function hY(e,t,r,n,i){let a,o,l=0;do o=t+(r-t)/2,a=aL(o,n,i)-e,a>0?r=o:t=o;while(Math.abs(a)>fY&&++l<dY);return o}function Rf(e,t,r,n){if(e===t&&r===n)return cn;const i=a=>hY(a,0,1,e,r);return a=>a===0||a===1?a:aL(i(a),t,n)}const oL=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,sL=e=>t=>1-e(1-t),lL=Rf(.33,1.53,.69,.99),i_=sL(lL),cL=oL(i_),uL=e=>(e*=2)<1?.5*i_(e):.5*(2-Math.pow(2,-10*(e-1))),a_=e=>1-Math.sin(Math.acos(e)),fL=sL(a_),dL=oL(a_),pY=Rf(.42,0,1,1),mY=Rf(0,0,.58,1),hL=Rf(.42,0,.58,1),gY=e=>Array.isArray(e)&&typeof e[0]!="number",pL=e=>Array.isArray(e)&&typeof e[0]=="number",vY={linear:cn,easeIn:pY,easeInOut:hL,easeOut:mY,circIn:a_,circInOut:dL,circOut:fL,backIn:i_,backInOut:cL,backOut:lL,anticipate:uL},yY=e=>typeof e=="string",BO=e=>{if(pL(e)){t_(e.length===4);const[t,r,n,i]=e;return Rf(t,r,n,i)}else if(yY(e))return vY[e];return e},mh=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],FO={value:null};function xY(e,t){let r=new Set,n=new Set,i=!1,a=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function f(p){o.has(p)&&(h.schedule(p),e()),c++,p(l)}const h={schedule:(p,g=!1,v=!1)=>{const y=v&&i?r:n;return g&&o.add(p),y.has(p)||y.add(p),p},cancel:p=>{n.delete(p),o.delete(p)},process:p=>{if(l=p,i){a=!0;return}i=!0,[r,n]=[n,r],r.forEach(f),t&&FO.value&&FO.value.frameloop[t].push(c),c=0,r.clear(),i=!1,a&&(a=!1,h.process(p))}};return h}const bY=40;function mL(e,t){let r=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,o=mh.reduce((_,C)=>(_[C]=xY(a,t?C:void 0),_),{}),{setup:l,read:c,resolveKeyframes:f,preUpdate:h,update:p,preRender:g,render:v,postRender:w}=o,y=()=>{const _=Fi.useManualTiming?i.timestamp:performance.now();r=!1,Fi.useManualTiming||(i.delta=n?1e3/60:Math.max(Math.min(_-i.timestamp,bY),1)),i.timestamp=_,i.isProcessing=!0,l.process(i),c.process(i),f.process(i),h.process(i),p.process(i),g.process(i),v.process(i),w.process(i),i.isProcessing=!1,r&&t&&(n=!1,e(y))},b=()=>{r=!0,n=!0,i.isProcessing||e(y)};return{schedule:mh.reduce((_,C)=>{const N=o[C];return _[C]=(O,T=!1,k=!1)=>(r||b(),N.schedule(O,T,k)),_},{}),cancel:_=>{for(let C=0;C<mh.length;C++)o[mh[C]].cancel(_)},state:i,steps:o}}const{schedule:kt,cancel:Ia,state:or,steps:My}=mL(typeof requestAnimationFrame<"u"?requestAnimationFrame:cn,!0);let Vh;function wY(){Vh=void 0}const Mr={now:()=>(Vh===void 0&&Mr.set(or.isProcessing||Fi.useManualTiming?or.timestamp:performance.now()),Vh),set:e=>{Vh=e,queueMicrotask(wY)}},gL=e=>t=>typeof t=="string"&&t.startsWith(e),o_=gL("--"),SY=gL("var(--"),s_=e=>SY(e)?jY.test(e.split("/*")[0].trim()):!1,jY=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Tl={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ku={...Tl,transform:e=>Bi(0,1,e)},gh={...Tl,default:1},fu=e=>Math.round(e*1e5)/1e5,l_=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function _Y(e){return e==null}const PY=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,c_=(e,t)=>r=>!!(typeof r=="string"&&PY.test(r)&&r.startsWith(e)||t&&!_Y(r)&&Object.prototype.hasOwnProperty.call(r,t)),vL=(e,t,r)=>n=>{if(typeof n!="string")return n;const[i,a,o,l]=n.match(l_);return{[e]:parseFloat(i),[t]:parseFloat(a),[r]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},AY=e=>Bi(0,255,e),Ry={...Tl,transform:e=>Math.round(AY(e))},wo={test:c_("rgb","red"),parse:vL("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Ry.transform(e)+", "+Ry.transform(t)+", "+Ry.transform(r)+", "+fu(ku.transform(n))+")"};function NY(e){let t="",r="",n="",i="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const j1={test:c_("#"),parse:NY,transform:wo.transform},If=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Sa=If("deg"),ti=If("%"),Be=If("px"),EY=If("vh"),OY=If("vw"),zO={...ti,parse:e=>ti.parse(e)/100,transform:e=>ti.transform(e*100)},Rs={test:c_("hsl","hue"),parse:vL("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+ti.transform(fu(t))+", "+ti.transform(fu(r))+", "+fu(ku.transform(n))+")"},fr={test:e=>wo.test(e)||j1.test(e)||Rs.test(e),parse:e=>wo.test(e)?wo.parse(e):Rs.test(e)?Rs.parse(e):j1.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?wo.transform(e):Rs.transform(e)},CY=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function TY(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(l_))==null?void 0:t.length)||0)+(((r=e.match(CY))==null?void 0:r.length)||0)>0}const yL="number",xL="color",kY="var",MY="var(",VO="${}",RY=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Mu(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},i=[];let a=0;const l=t.replace(RY,c=>(fr.test(c)?(n.color.push(a),i.push(xL),r.push(fr.parse(c))):c.startsWith(MY)?(n.var.push(a),i.push(kY),r.push(c)):(n.number.push(a),i.push(yL),r.push(parseFloat(c))),++a,VO)).split(VO);return{values:r,split:l,indexes:n,types:i}}function bL(e){return Mu(e).values}function wL(e){const{split:t,types:r}=Mu(e),n=t.length;return i=>{let a="";for(let o=0;o<n;o++)if(a+=t[o],i[o]!==void 0){const l=r[o];l===yL?a+=fu(i[o]):l===xL?a+=fr.transform(i[o]):a+=i[o]}return a}}const IY=e=>typeof e=="number"?0:e;function DY(e){const t=bL(e);return wL(e)(t.map(IY))}const Da={test:TY,parse:bL,createTransformer:wL,getAnimatableNone:DY};function Iy(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function $Y({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,a=0,o=0;if(!t)i=a=o=r;else{const l=r<.5?r*(1+t):r+t-r*t,c=2*r-l;i=Iy(c,l,e+1/3),a=Iy(c,l,e),o=Iy(c,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:n}}function rp(e,t){return r=>r>0?t:e}const Tt=(e,t,r)=>e+(t-e)*r,Dy=(e,t,r)=>{const n=e*e,i=r*(t*t-n)+n;return i<0?0:Math.sqrt(i)},LY=[j1,wo,Rs],BY=e=>LY.find(t=>t.test(e));function UO(e){const t=BY(e);if(!t)return!1;let r=t.parse(e);return t===Rs&&(r=$Y(r)),r}const qO=(e,t)=>{const r=UO(e),n=UO(t);if(!r||!n)return rp(e,t);const i={...r};return a=>(i.red=Dy(r.red,n.red,a),i.green=Dy(r.green,n.green,a),i.blue=Dy(r.blue,n.blue,a),i.alpha=Tt(r.alpha,n.alpha,a),wo.transform(i))},_1=new Set(["none","hidden"]);function FY(e,t){return _1.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function zY(e,t){return r=>Tt(e,t,r)}function u_(e){return typeof e=="number"?zY:typeof e=="string"?s_(e)?rp:fr.test(e)?qO:qY:Array.isArray(e)?SL:typeof e=="object"?fr.test(e)?qO:VY:rp}function SL(e,t){const r=[...e],n=r.length,i=e.map((a,o)=>u_(a)(a,t[o]));return a=>{for(let o=0;o<n;o++)r[o]=i[o](a);return r}}function VY(e,t){const r={...e,...t},n={};for(const i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=u_(e[i])(e[i],t[i]));return i=>{for(const a in n)r[a]=n[a](i);return r}}function UY(e,t){const r=[],n={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],o=e.indexes[a][n[a]],l=e.values[o]??0;r[i]=l,n[a]++}return r}const qY=(e,t)=>{const r=Da.createTransformer(t),n=Mu(e),i=Mu(t);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?_1.has(e)&&!i.values.length||_1.has(t)&&!n.values.length?FY(e,t):Mf(SL(UY(n,i),i.values),r):rp(e,t)};function jL(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Tt(e,t,r):u_(e)(e,t)}const WY=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>kt.update(t,r),stop:()=>Ia(t),now:()=>or.isProcessing?or.timestamp:Mr.now()}},_L=(e,t,r=10)=>{let n="";const i=Math.max(Math.round(t/r),2);for(let a=0;a<i;a++)n+=e(a/(i-1))+", ";return`linear(${n.substring(0,n.length-2)})`},np=2e4;function f_(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t<np;)t+=r,n=e.next(t);return t>=np?1/0:t}function HY(e,t=100,r){const n=r({...e,keyframes:[0,t]}),i=Math.min(f_(n),np);return{type:"keyframes",ease:a=>n.next(i*a).value/t,duration:ei(i)}}const GY=5;function PL(e,t,r){const n=Math.max(t-GY,0);return iL(r-e(n),t-n)}const Rt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},WO=.001;function KY({duration:e=Rt.duration,bounce:t=Rt.bounce,velocity:r=Rt.velocity,mass:n=Rt.mass}){let i,a,o=1-t;o=Bi(Rt.minDamping,Rt.maxDamping,o),e=Bi(Rt.minDuration,Rt.maxDuration,ei(e)),o<1?(i=f=>{const h=f*o,p=h*e,g=h-r,v=P1(f,o),w=Math.exp(-p);return WO-g/v*w},a=f=>{const p=f*o*e,g=p*r+r,v=Math.pow(o,2)*Math.pow(f,2)*e,w=Math.exp(-p),y=P1(Math.pow(f,2),o);return(-i(f)+WO>0?-1:1)*((g-v)*w)/y}):(i=f=>{const h=Math.exp(-f*e),p=(f-r)*e+1;return-.001+h*p},a=f=>{const h=Math.exp(-f*e),p=(r-f)*(e*e);return h*p});const l=5/e,c=XY(i,a,l);if(e=Jn(e),isNaN(c))return{stiffness:Rt.stiffness,damping:Rt.damping,duration:e};{const f=Math.pow(c,2)*n;return{stiffness:f,damping:o*2*Math.sqrt(n*f),duration:e}}}const YY=12;function XY(e,t,r){let n=r;for(let i=1;i<YY;i++)n=n-e(n)/t(n);return n}function P1(e,t){return e*Math.sqrt(1-t*t)}const ZY=["duration","bounce"],QY=["stiffness","damping","mass"];function HO(e,t){return t.some(r=>e[r]!==void 0)}function JY(e){let t={velocity:Rt.velocity,stiffness:Rt.stiffness,damping:Rt.damping,mass:Rt.mass,isResolvedFromDuration:!1,...e};if(!HO(e,QY)&&HO(e,ZY))if(e.visualDuration){const r=e.visualDuration,n=2*Math.PI/(r*1.2),i=n*n,a=2*Bi(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Rt.mass,stiffness:i,damping:a}}else{const r=KY(e);t={...t,...r,mass:Rt.mass},t.isResolvedFromDuration=!0}return t}function ip(e=Rt.visualDuration,t=Rt.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:i}=r;const a=r.keyframes[0],o=r.keyframes[r.keyframes.length-1],l={done:!1,value:a},{stiffness:c,damping:f,mass:h,duration:p,velocity:g,isResolvedFromDuration:v}=JY({...r,velocity:-ei(r.velocity||0)}),w=g||0,y=f/(2*Math.sqrt(c*h)),b=o-a,S=ei(Math.sqrt(c/h)),A=Math.abs(b)<5;n||(n=A?Rt.restSpeed.granular:Rt.restSpeed.default),i||(i=A?Rt.restDelta.granular:Rt.restDelta.default);let _;if(y<1){const N=P1(S,y);_=O=>{const T=Math.exp(-y*S*O);return o-T*((w+y*S*b)/N*Math.sin(N*O)+b*Math.cos(N*O))}}else if(y===1)_=N=>o-Math.exp(-S*N)*(b+(w+S*b)*N);else{const N=S*Math.sqrt(y*y-1);_=O=>{const T=Math.exp(-y*S*O),k=Math.min(N*O,300);return o-T*((w+y*S*b)*Math.sinh(k)+N*b*Math.cosh(k))/N}}const C={calculatedDuration:v&&p||null,next:N=>{const O=_(N);if(v)l.done=N>=p;else{let T=N===0?w:0;y<1&&(T=N===0?Jn(w):PL(_,N,O));const k=Math.abs(T)<=n,R=Math.abs(o-O)<=i;l.done=k&&R}return l.value=l.done?o:O,l},toString:()=>{const N=Math.min(f_(C),np),O=_L(T=>C.next(N*T).value,N,30);return N+"ms "+O},toTransition:()=>{}};return C}ip.applyToOptions=e=>{const t=HY(e,100,ip);return e.ease=t.ease,e.duration=Jn(t.duration),e.type="keyframes",e};function A1({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:l,max:c,restDelta:f=.5,restSpeed:h}){const p=e[0],g={done:!1,value:p},v=k=>l!==void 0&&k<l||c!==void 0&&k>c,w=k=>l===void 0?c:c===void 0||Math.abs(l-k)<Math.abs(c-k)?l:c;let y=r*t;const b=p+y,S=o===void 0?b:o(b);S!==b&&(y=S-p);const A=k=>-y*Math.exp(-k/n),_=k=>S+A(k),C=k=>{const R=A(k),F=_(k);g.done=Math.abs(R)<=f,g.value=g.done?S:F};let N,O;const T=k=>{v(g.value)&&(N=k,O=ip({keyframes:[g.value,w(g.value)],velocity:PL(_,k,g.value),damping:i,stiffness:a,restDelta:f,restSpeed:h}))};return T(0),{calculatedDuration:null,next:k=>{let R=!1;return!O&&N===void 0&&(R=!0,C(k),T(k)),N!==void 0&&k>=N?O.next(k-N):(!R&&C(k),g)}}}function eX(e,t,r){const n=[],i=r||Fi.mix||jL,a=e.length-1;for(let o=0;o<a;o++){let l=i(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||cn:t;l=Mf(c,l)}n.push(l)}return n}function tX(e,t,{clamp:r=!0,ease:n,mixer:i}={}){const a=e.length;if(t_(a===t.length),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=eX(t,n,i),c=l.length,f=h=>{if(o&&h<e[0])return t[0];let p=0;if(c>1)for(;p<e.length-2&&!(h<e[p+1]);p++);const g=Tu(e[p],e[p+1],h);return l[p](g)};return r?h=>f(Bi(e[0],e[a-1],h)):f}function rX(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const i=Tu(0,t,n);e.push(Tt(r,1,i))}}function nX(e){const t=[0];return rX(t,e.length-1),t}function iX(e,t){return e.map(r=>r*t)}function aX(e,t){return e.map(()=>t||hL).splice(0,e.length-1)}function du({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const i=gY(n)?n.map(BO):BO(n),a={done:!1,value:t[0]},o=iX(r&&r.length===t.length?r:nX(t),e),l=tX(o,t,{ease:Array.isArray(i)?i:aX(t,i)});return{calculatedDuration:e,next:c=>(a.value=l(c),a.done=c>=e,a)}}const oX=e=>e!==null;function d_(e,{repeat:t,repeatType:r="loop"},n,i=1){const a=e.filter(oX),l=i<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!l||n===void 0?a[l]:n}const sX={decay:A1,inertia:A1,tween:du,keyframes:du,spring:ip};function AL(e){typeof e.type=="string"&&(e.type=sX[e.type])}class h_{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}}const lX=e=>e/100;class p_ extends h_{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=(r=!0)=>{var n,i;if(r){const{motionValue:a}=this.options;a&&a.updatedAt!==Mr.now()&&this.tick(Mr.now())}this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(n=this.options).onStop)==null||i.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;AL(t);const{type:r=du,repeat:n=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=t;let{keyframes:l}=t;const c=r||du;c!==du&&typeof l[0]!="number"&&(this.mixKeyframes=Mf(lX,jL(l[0],l[1])),l=[0,100]);const f=c({...t,keyframes:l});a==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=f_(f));const{calculatedDuration:h}=f;this.calculatedDuration=h,this.resolvedDuration=h+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=f}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:n,totalDuration:i,mixKeyframes:a,mirroredGenerator:o,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:f=0,keyframes:h,repeat:p,repeatType:g,repeatDelay:v,type:w,onUpdate:y,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);const S=this.currentTime-f*(this.playbackSpeed>=0?1:-1),A=this.playbackSpeed>=0?S<0:S>i;this.currentTime=Math.max(S,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let _=this.currentTime,C=n;if(p){const k=Math.min(this.currentTime,i)/l;let R=Math.floor(k),F=k%1;!F&&k>=1&&(F=1),F===1&&R--,R=Math.min(R,p+1),!!(R%2)&&(g==="reverse"?(F=1-F,v&&(F-=v/l)):g==="mirror"&&(C=o)),_=Bi(0,1,F)*l}const N=A?{done:!1,value:h[0]}:C.next(_);a&&(N.value=a(N.value));let{done:O}=N;!A&&c!==null&&(O=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&O);return T&&w!==A1&&(N.value=d_(h,this.options,b,this.speed)),y&&y(N.value),T&&this.finish(),N}then(t,r){return this.finished.then(t,r)}get duration(){return ei(this.calculatedDuration)}get time(){return ei(this.currentTime)}set time(t){var r;t=Jn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(r=this.driver)==null||r.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Mr.now());const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=ei(this.currentTime))}play(){var i,a;if(this.isStopped)return;const{driver:t=WY,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(a=(i=this.options).onPlay)==null||a.call(i);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Mr.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,r;this.notifyFinished(),this.teardown(),this.state="finished",(r=(t=this.options).onComplete)==null||r.call(t)}cancel(){var t,r;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(r=(t=this.options).onCancel)==null||r.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var r;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(r=this.driver)==null||r.stop(),t.observe(this)}}function cX(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const So=e=>e*180/Math.PI,N1=e=>{const t=So(Math.atan2(e[1],e[0]));return E1(t)},uX={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:N1,rotateZ:N1,skewX:e=>So(Math.atan(e[1])),skewY:e=>So(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},E1=e=>(e=e%360,e<0&&(e+=360),e),GO=N1,KO=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),YO=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),fX={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:KO,scaleY:YO,scale:e=>(KO(e)+YO(e))/2,rotateX:e=>E1(So(Math.atan2(e[6],e[5]))),rotateY:e=>E1(So(Math.atan2(-e[2],e[0]))),rotateZ:GO,rotate:GO,skewX:e=>So(Math.atan(e[4])),skewY:e=>So(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function O1(e){return e.includes("scale")?1:0}function C1(e,t){if(!e||e==="none")return O1(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(r)n=fX,i=r;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=uX,i=l}if(!i)return O1(t);const a=n[t],o=i[1].split(",").map(hX);return typeof a=="function"?a(o):o[a]}const dX=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return C1(r,t)};function hX(e){return parseFloat(e.trim())}const kl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ml=new Set(kl),XO=e=>e===Tl||e===Be,pX=new Set(["x","y","z"]),mX=kl.filter(e=>!pX.has(e));function gX(e){const t=[];return mX.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}const Eo={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>C1(t,"x"),y:(e,{transform:t})=>C1(t,"y")};Eo.translateX=Eo.x;Eo.translateY=Eo.y;const Oo=new Set;let T1=!1,k1=!1,M1=!1;function NL(){if(k1){const e=Array.from(Oo).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{const i=gX(n);i.length&&(r.set(n,i),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const i=r.get(n);i&&i.forEach(([a,o])=>{var l;(l=n.getValue(a))==null||l.set(o)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}k1=!1,T1=!1,Oo.forEach(e=>e.complete(M1)),Oo.clear()}function EL(){Oo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(k1=!0)})}function vX(){M1=!0,EL(),NL(),M1=!1}class m_{constructor(t,r,n,i,a,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=i,this.element=a,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Oo.add(this),T1||(T1=!0,kt.read(EL),kt.resolveKeyframes(NL))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:n,motionValue:i}=this;if(t[0]===null){const a=i==null?void 0:i.get(),o=t[t.length-1];if(a!==void 0)t[0]=a;else if(n&&r){const l=n.readValue(r,o);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=o),i&&a===void 0&&i.set(t[0])}cX(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Oo.delete(this)}cancel(){this.state==="scheduled"&&(Oo.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const yX=e=>e.startsWith("--");function xX(e,t,r){yX(t)?e.style.setProperty(t,r):e.style[t]=r}const bX=r_(()=>window.ScrollTimeline!==void 0),wX={};function SX(e,t){const r=r_(e);return()=>wX[t]??r()}const OL=SX(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ru=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,ZO={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ru([0,.65,.55,1]),circOut:ru([.55,0,1,.45]),backIn:ru([.31,.01,.66,-.59]),backOut:ru([.33,1.53,.69,.99])};function CL(e,t){if(e)return typeof e=="function"?OL()?_L(e,t):"ease-out":pL(e)?ru(e):Array.isArray(e)?e.map(r=>CL(r,t)||ZO.easeOut):ZO[e]}function jX(e,t,r,{delay:n=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:l="easeOut",times:c}={},f=void 0){const h={[t]:r};c&&(h.offset=c);const p=CL(l,i);Array.isArray(p)&&(h.easing=p);const g={delay:n,duration:i,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"};return f&&(g.pseudoElement=f),e.animate(h,g)}function TL(e){return typeof e=="function"&&"applyToOptions"in e}function _X({type:e,...t}){return TL(e)&&OL()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class PX extends h_{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:r,name:n,keyframes:i,pseudoElement:a,allowFlatten:o=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!a,this.allowFlatten=o,this.options=t,t_(typeof t.type!="string");const f=_X(t);this.animation=jX(r,n,i,f,a),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const h=d_(i,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(h):xX(r,n,h),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,r;(r=(t=this.animation).finish)==null||r.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,r;this.isPseudoElement||(r=(t=this.animation).commitStyles)==null||r.call(t)}get duration(){var r,n;const t=((n=(r=this.animation.effect)==null?void 0:r.getComputedTiming)==null?void 0:n.call(r).duration)||0;return ei(Number(t))}get time(){return ei(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Jn(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&bX()?(this.animation.timeline=t,cn):r(this)}}const kL={anticipate:uL,backInOut:cL,circInOut:dL};function AX(e){return e in kL}function NX(e){typeof e.ease=="string"&&AX(e.ease)&&(e.ease=kL[e.ease])}const QO=10;class EX extends PX{constructor(t){NX(t),AL(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:n,onComplete:i,element:a,...o}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const l=new p_({...o,autoplay:!1}),c=Jn(this.finishedTime??this.time);r.setWithVelocity(l.sample(c-QO).value,l.sample(c).value,QO),l.stop()}}const JO=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Da.test(e)||e==="0")&&!e.startsWith("url("));function OX(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function CX(e,t,r,n){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=JO(i,t),l=JO(a,t);return!o||!l?!1:OX(e)||(r==="spring"||TL(r))&&n}function ML(e){return rL(e)&&"offsetHeight"in e}const TX=new Set(["opacity","clipPath","filter","transform"]),kX=r_(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function MX(e){var f;const{motionValue:t,name:r,repeatDelay:n,repeatType:i,damping:a,type:o}=e;if(!ML((f=t==null?void 0:t.owner)==null?void 0:f.current))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return kX()&&r&&TX.has(r)&&(r!=="transform"||!c)&&!l&&!n&&i!=="mirror"&&a!==0&&o!=="inertia"}const RX=40;class IX extends h_{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:o="loop",keyframes:l,name:c,motionValue:f,element:h,...p}){var w;super(),this.stop=()=>{var y,b;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=Mr.now();const g={autoplay:t,delay:r,type:n,repeat:i,repeatDelay:a,repeatType:o,name:c,motionValue:f,element:h,...p},v=(h==null?void 0:h.KeyframeResolver)||m_;this.keyframeResolver=new v(l,(y,b,S)=>this.onKeyframesResolved(y,b,g,!S),c,f,h),(w=this.keyframeResolver)==null||w.scheduleResolve()}onKeyframesResolved(t,r,n,i){this.keyframeResolver=void 0;const{name:a,type:o,velocity:l,delay:c,isHandoff:f,onUpdate:h}=n;this.resolvedAt=Mr.now(),CX(t,a,o,l)||((Fi.instantAnimations||!c)&&(h==null||h(d_(t,n,r))),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const g={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>RX?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:t},v=!f&&MX(g)?new EX({...g,element:g.motionValue.owner.current}):new p_(g);v.finished.then(()=>this.notifyFinished()).catch(cn),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),vX()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const DX=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $X(e){const t=DX.exec(e);if(!t)return[,];const[,r,n,i]=t;return[`--${r??n}`,i]}function RL(e,t,r=1){const[n,i]=$X(e);if(!n)return;const a=window.getComputedStyle(t).getPropertyValue(n);if(a){const o=a.trim();return tL(o)?parseFloat(o):o}return s_(i)?RL(i,t,r+1):i}function g_(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const IL=new Set(["width","height","top","left","right","bottom",...kl]),LX={test:e=>e==="auto",parse:e=>e},DL=e=>t=>t.test(e),$L=[Tl,Be,ti,Sa,OY,EY,LX],eC=e=>$L.find(DL(e));function BX(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||nL(e):!0}const FX=new Set(["brightness","contrast","saturate","opacity"]);function zX(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(l_)||[];if(!n)return e;const i=r.replace(n,"");let a=FX.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+i+")"}const VX=/\b([a-z-]*)\(.*?\)/gu,R1={...Da,getAnimatableNone:e=>{const t=e.match(VX);return t?t.map(zX).join(" "):e}},tC={...Tl,transform:Math.round},UX={rotate:Sa,rotateX:Sa,rotateY:Sa,rotateZ:Sa,scale:gh,scaleX:gh,scaleY:gh,scaleZ:gh,skew:Sa,skewX:Sa,skewY:Sa,distance:Be,translateX:Be,translateY:Be,translateZ:Be,x:Be,y:Be,z:Be,perspective:Be,transformPerspective:Be,opacity:ku,originX:zO,originY:zO,originZ:Be},v_={borderWidth:Be,borderTopWidth:Be,borderRightWidth:Be,borderBottomWidth:Be,borderLeftWidth:Be,borderRadius:Be,radius:Be,borderTopLeftRadius:Be,borderTopRightRadius:Be,borderBottomRightRadius:Be,borderBottomLeftRadius:Be,width:Be,maxWidth:Be,height:Be,maxHeight:Be,top:Be,right:Be,bottom:Be,left:Be,padding:Be,paddingTop:Be,paddingRight:Be,paddingBottom:Be,paddingLeft:Be,margin:Be,marginTop:Be,marginRight:Be,marginBottom:Be,marginLeft:Be,backgroundPositionX:Be,backgroundPositionY:Be,...UX,zIndex:tC,fillOpacity:ku,strokeOpacity:ku,numOctaves:tC},qX={...v_,color:fr,backgroundColor:fr,outlineColor:fr,fill:fr,stroke:fr,borderColor:fr,borderTopColor:fr,borderRightColor:fr,borderBottomColor:fr,borderLeftColor:fr,filter:R1,WebkitFilter:R1},LL=e=>qX[e];function BL(e,t){let r=LL(e);return r!==R1&&(r=Da),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const WX=new Set(["auto","none","0"]);function HX(e,t,r){let n=0,i;for(;n<e.length&&!i;){const a=e[n];typeof a=="string"&&!WX.has(a)&&Mu(a).values.length&&(i=e[n]),n++}if(i&&r)for(const a of t)e[a]=BL(r,i)}class GX extends m_{constructor(t,r,n,i,a){super(t,r,n,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let f=t[c];if(typeof f=="string"&&(f=f.trim(),s_(f))){const h=RL(f,r.current);h!==void 0&&(t[c]=h),c===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!IL.has(n)||t.length!==2)return;const[i,a]=t,o=eC(i),l=eC(a);if(o!==l)if(XO(o)&&XO(l))for(let c=0;c<t.length;c++){const f=t[c];typeof f=="string"&&(t[c]=parseFloat(f))}else Eo[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,n=[];for(let i=0;i<t.length;i++)(t[i]===null||BX(t[i]))&&n.push(i);n.length&&HX(t,n,r)}measureInitialState(){const{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Eo[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;const i=r[r.length-1];i!==void 0&&t.getValue(n,i).jump(i,!1)}measureEndState(){var l;const{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(r);i&&i.jump(this.measuredOrigin,!1);const a=n.length-1,o=n[a];n[a]=Eo[r](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,f])=>{t.getValue(c).set(f)}),this.resolveNoneKeyframes()}}function KX(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;const i=(r==null?void 0:r[e])??n.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const rC=30,YX=e=>!isNaN(parseFloat(e));class XX{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,i=!0)=>{var o,l;const a=Mr.now();if(this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty();i&&((l=this.events.renderRequest)==null||l.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=Mr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=YX(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new n_);const n=this.events[t].add(r);return t==="change"?()=>{n(),kt.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t,r=!0){!r||!this.passiveEffect?this.updateAndNotify(t,r):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Mr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>rC)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,rC);return iL(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,r;(t=this.dependents)==null||t.clear(),(r=this.events.destroy)==null||r.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Xs(e,t){return new XX(e,t)}const FL=(e,t)=>t&&typeof e=="number"?t.transform(e):e,{schedule:y_}=mL(queueMicrotask,!1),An={x:!1,y:!1};function zL(){return An.x||An.y}function ZX(e){return e==="x"||e==="y"?An[e]?null:(An[e]=!0,()=>{An[e]=!1}):An.x||An.y?null:(An.x=An.y=!0,()=>{An.x=An.y=!1})}function VL(e,t){const r=KX(e),n=new AbortController,i={passive:!0,...t,signal:n.signal};return[r,i,()=>n.abort()]}function nC(e){return!(e.pointerType==="touch"||zL())}function QX(e,t,r={}){const[n,i,a]=VL(e,r),o=l=>{if(!nC(l))return;const{target:c}=l,f=t(c,l);if(typeof f!="function"||!c)return;const h=p=>{nC(p)&&(f(p),c.removeEventListener("pointerleave",h))};c.addEventListener("pointerleave",h,i)};return n.forEach(l=>{l.addEventListener("pointerenter",o,i)}),a}const UL=(e,t)=>t?e===t?!0:UL(e,t.parentElement):!1,x_=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,JX=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function eZ(e){return JX.has(e.tagName)||e.tabIndex!==-1}const Uh=new WeakSet;function iC(e){return t=>{t.key==="Enter"&&e(t)}}function $y(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const tZ=(e,t)=>{const r=e.currentTarget;if(!r)return;const n=iC(()=>{if(Uh.has(r))return;$y(r,"down");const i=iC(()=>{$y(r,"up")}),a=()=>$y(r,"cancel");r.addEventListener("keyup",i,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function aC(e){return x_(e)&&!zL()}function rZ(e,t,r={}){const[n,i,a]=VL(e,r),o=l=>{const c=l.currentTarget;if(!aC(l))return;Uh.add(c);const f=t(c,l),h=(v,w)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",g),Uh.has(c)&&Uh.delete(c),aC(v)&&typeof f=="function"&&f(v,{success:w})},p=v=>{h(v,c===window||c===document||r.useGlobalTarget||UL(c,v.target))},g=v=>{h(v,!1)};window.addEventListener("pointerup",p,i),window.addEventListener("pointercancel",g,i)};return n.forEach(l=>{(r.useGlobalTarget?window:l).addEventListener("pointerdown",o,i),ML(l)&&(l.addEventListener("focus",f=>tZ(f,i)),!eZ(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),a}function qL(e){return rL(e)&&"ownerSVGElement"in e}function nZ(e){return qL(e)&&e.tagName==="svg"}const vr=e=>!!(e&&e.getVelocity),iZ=[...$L,fr,Da],aZ=e=>iZ.find(DL(e)),WL=j.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function oZ(e=!0){const t=j.useContext(Qj);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:n,register:i}=t,a=j.useId();j.useEffect(()=>{if(e)return i(a)},[e]);const o=j.useCallback(()=>e&&n&&n(a),[a,n,e]);return!r&&n?[!1,o]:[!0]}const HL=j.createContext({strict:!1}),oC={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Zs={};for(const e in oC)Zs[e]={isEnabled:t=>oC[e].some(r=>!!t[r])};function sZ(e){for(const t in e)Zs[t]={...Zs[t],...e[t]}}const lZ=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ap(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||lZ.has(e)}let GL=e=>!ap(e);function cZ(e){e&&(GL=t=>t.startsWith("on")?!ap(t):e(t))}try{cZ(require("@emotion/is-prop-valid").default)}catch{}function uZ(e,t,r){const n={};for(const i in e)i==="values"&&typeof e.values=="object"||(GL(i)||r===!0&&ap(i)||!t&&!ap(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}function fZ(e){if(typeof Proxy>"u")return e;const t=new Map,r=(...n)=>e(...n);return new Proxy(r,{get:(n,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const Om=j.createContext({});function Cm(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ru(e){return typeof e=="string"||Array.isArray(e)}const b_=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],w_=["initial",...b_];function Tm(e){return Cm(e.animate)||w_.some(t=>Ru(e[t]))}function KL(e){return!!(Tm(e)||e.variants)}function dZ(e,t){if(Tm(e)){const{initial:r,animate:n}=e;return{initial:r===!1||Ru(r)?r:void 0,animate:Ru(n)?n:void 0}}return e.inherit!==!1?t:{}}function hZ(e){const{initial:t,animate:r}=dZ(e,j.useContext(Om));return j.useMemo(()=>({initial:t,animate:r}),[sC(t),sC(r)])}function sC(e){return Array.isArray(e)?e.join(" "):e}const pZ=Symbol.for("motionComponentSymbol");function Is(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function mZ(e,t,r){return j.useCallback(n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):Is(r)&&(r.current=n))},[t])}const S_=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),gZ="framerAppearId",YL="data-"+S_(gZ),XL=j.createContext({});function vZ(e,t,r,n,i){var y,b;const{visualElement:a}=j.useContext(Om),o=j.useContext(HL),l=j.useContext(Qj),c=j.useContext(WL).reducedMotion,f=j.useRef(null);n=n||o.renderer,!f.current&&n&&(f.current=n(e,{visualState:t,parent:a,props:r,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const h=f.current,p=j.useContext(XL);h&&!h.projection&&i&&(h.type==="html"||h.type==="svg")&&yZ(f.current,r,i,p);const g=j.useRef(!1);j.useInsertionEffect(()=>{h&&g.current&&h.update(r,l)});const v=r[YL],w=j.useRef(!!v&&!((y=window.MotionHandoffIsComplete)!=null&&y.call(window,v))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,v)));return cY(()=>{h&&(g.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),y_.render(h.render),w.current&&h.animationState&&h.animationState.animateChanges())}),j.useEffect(()=>{h&&(!w.current&&h.animationState&&h.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,v)}),w.current=!1))}),h}function yZ(e,t,r,n){const{layoutId:i,layout:a,drag:o,dragConstraints:l,layoutScroll:c,layoutRoot:f,layoutCrossfade:h}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:ZL(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||l&&Is(l),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:n,crossfade:h,layoutScroll:c,layoutRoot:f})}function ZL(e){if(e)return e.options.allowProjection!==!1?e.projection:ZL(e.parent)}function xZ({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:i}){e&&sZ(e);function a(l,c){let f;const h={...j.useContext(WL),...l,layoutId:bZ(l)},{isStatic:p}=h,g=hZ(l),v=n(l,p);if(!p&&Zj){wZ();const w=SZ(h);f=w.MeasureLayout,g.visualElement=vZ(i,v,h,t,w.ProjectionNode)}return d.jsxs(Om.Provider,{value:g,children:[f&&g.visualElement?d.jsx(f,{visualElement:g.visualElement,...h}):null,r(i,l,mZ(v,g.visualElement,c),v,p,g.visualElement)]})}a.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=j.forwardRef(a);return o[pZ]=i,o}function bZ({layoutId:e}){const t=j.useContext(eL).id;return t&&e!==void 0?t+"-"+e:e}function wZ(e,t){j.useContext(HL).strict}function SZ(e){const{drag:t,layout:r}=Zs;if(!t&&!r)return{};const n={...t,...r};return{MeasureLayout:t!=null&&t.isEnabled(e)||r!=null&&r.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}const Iu={};function jZ(e){for(const t in e)Iu[t]=e[t],o_(t)&&(Iu[t].isCSSVariable=!0)}function QL(e,{layout:t,layoutId:r}){return Ml.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Iu[e]||e==="opacity")}const _Z={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},PZ=kl.length;function AZ(e,t,r){let n="",i=!0;for(let a=0;a<PZ;a++){const o=kl[a],l=e[o];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(o.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||r){const f=FL(l,v_[o]);if(!c){i=!1;const h=_Z[o]||o;n+=`${h}(${f}) `}r&&(t[o]=f)}}return n=n.trim(),r?n=r(t,i?"":n):i&&(n="none"),n}function j_(e,t,r){const{style:n,vars:i,transformOrigin:a}=e;let o=!1,l=!1;for(const c in t){const f=t[c];if(Ml.has(c)){o=!0;continue}else if(o_(c)){i[c]=f;continue}else{const h=FL(f,v_[c]);c.startsWith("origin")?(l=!0,a[c]=h):n[c]=h}}if(t.transform||(o||r?n.transform=AZ(t,e.transform,r):n.transform&&(n.transform="none")),l){const{originX:c="50%",originY:f="50%",originZ:h=0}=a;n.transformOrigin=`${c} ${f} ${h}`}}const __=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function JL(e,t,r){for(const n in t)!vr(t[n])&&!QL(n,r)&&(e[n]=t[n])}function NZ({transformTemplate:e},t){return j.useMemo(()=>{const r=__();return j_(r,t,e),Object.assign({},r.vars,r.style)},[t])}function EZ(e,t){const r=e.style||{},n={};return JL(n,r,e),Object.assign(n,NZ(e,t)),n}function OZ(e,t){const r={},n=EZ(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}const CZ={offset:"stroke-dashoffset",array:"stroke-dasharray"},TZ={offset:"strokeDashoffset",array:"strokeDasharray"};function kZ(e,t,r=1,n=0,i=!0){e.pathLength=1;const a=i?CZ:TZ;e[a.offset]=Be.transform(-n);const o=Be.transform(t),l=Be.transform(r);e[a.array]=`${o} ${l}`}function e4(e,{attrX:t,attrY:r,attrScale:n,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...l},c,f,h){if(j_(e,l,f),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:g}=e;p.transform&&(g.transform=p.transform,delete p.transform),(g.transform||p.transformOrigin)&&(g.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),g.transform&&(g.transformBox=(h==null?void 0:h.transformBox)??"fill-box",delete p.transformBox),t!==void 0&&(p.x=t),r!==void 0&&(p.y=r),n!==void 0&&(p.scale=n),i!==void 0&&kZ(p,i,a,o,!1)}const t4=()=>({...__(),attrs:{}}),r4=e=>typeof e=="string"&&e.toLowerCase()==="svg";function MZ(e,t,r,n){const i=j.useMemo(()=>{const a=t4();return e4(a,t,r4(n),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};JL(a,e.style,e),i.style={...a,...i.style}}return i}const RZ=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function P_(e){return typeof e!="string"||e.includes("-")?!1:!!(RZ.indexOf(e)>-1||/[A-Z]/u.test(e))}function IZ(e=!1){return(r,n,i,{latestValues:a},o)=>{const c=(P_(r)?MZ:OZ)(n,a,o,r),f=uZ(n,typeof r=="string",e),h=r!==j.Fragment?{...f,...c,ref:i}:{},{children:p}=n,g=j.useMemo(()=>vr(p)?p.get():p,[p]);return j.createElement(r,{...h,children:g})}}function lC(e){const t=[{},{}];return e==null||e.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function A_(e,t,r,n){if(typeof t=="function"){const[i,a]=lC(n);t=t(r!==void 0?r:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=lC(n);t=t(r!==void 0?r:e.custom,i,a)}return t}function qh(e){return vr(e)?e.get():e}function DZ({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,i){return{latestValues:$Z(r,n,i,e),renderState:t()}}const n4=e=>(t,r)=>{const n=j.useContext(Om),i=j.useContext(Qj),a=()=>DZ(e,t,n,i);return r?a():lY(a)};function $Z(e,t,r,n){const i={},a=n(e,{});for(const g in a)i[g]=qh(a[g]);let{initial:o,animate:l}=e;const c=Tm(e),f=KL(e);t&&f&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let h=r?r.initial===!1:!1;h=h||o===!1;const p=h?l:o;if(p&&typeof p!="boolean"&&!Cm(p)){const g=Array.isArray(p)?p:[p];for(let v=0;v<g.length;v++){const w=A_(e,g[v]);if(w){const{transitionEnd:y,transition:b,...S}=w;for(const A in S){let _=S[A];if(Array.isArray(_)){const C=h?_.length-1:0;_=_[C]}_!==null&&(i[A]=_)}for(const A in y)i[A]=y[A]}}}return i}function N_(e,t,r){var a;const{style:n}=e,i={};for(const o in n)(vr(n[o])||t.style&&vr(t.style[o])||QL(o,e)||((a=r==null?void 0:r.getValue(o))==null?void 0:a.liveStyle)!==void 0)&&(i[o]=n[o]);return i}const LZ={useVisualState:n4({scrapeMotionValuesFromProps:N_,createRenderState:__})};function i4(e,t,r){const n=N_(e,t,r);for(const i in e)if(vr(e[i])||vr(t[i])){const a=kl.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[a]=e[i]}return n}const BZ={useVisualState:n4({scrapeMotionValuesFromProps:i4,createRenderState:t4})};function FZ(e,t){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...P_(n)?BZ:LZ,preloadedFeatures:e,useRender:IZ(i),createVisualElement:t,Component:n};return xZ(o)}}function Du(e,t,r){const n=e.getProps();return A_(n,t,r!==void 0?r:n.custom,e)}const I1=e=>Array.isArray(e);function zZ(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Xs(r))}function VZ(e){return I1(e)?e[e.length-1]||0:e}function UZ(e,t){const r=Du(e,t);let{transitionEnd:n={},transition:i={},...a}=r||{};a={...a,...n};for(const o in a){const l=VZ(a[o]);zZ(e,o,l)}}function qZ(e){return!!(vr(e)&&e.add)}function D1(e,t){const r=e.getValue("willChange");if(qZ(r))return r.add(t);if(!r&&Fi.WillChange){const n=new Fi.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function a4(e){return e.props[YL]}const WZ=e=>e!==null;function HZ(e,{repeat:t,repeatType:r="loop"},n){const i=e.filter(WZ),a=t&&r!=="loop"&&t%2===1?0:i.length-1;return i[a]}const GZ={type:"spring",stiffness:500,damping:25,restSpeed:10},KZ=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),YZ={type:"keyframes",duration:.8},XZ={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ZZ=(e,{keyframes:t})=>t.length>2?YZ:Ml.has(e)?e.startsWith("scale")?KZ(t[1]):GZ:XZ;function QZ({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:l,from:c,elapsed:f,...h}){return!!Object.keys(h).length}const E_=(e,t,r,n={},i,a)=>o=>{const l=g_(n,e)||{},c=l.delay||n.delay||0;let{elapsed:f=0}=n;f=f-Jn(c);const h={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-f,onUpdate:g=>{t.set(g),l.onUpdate&&l.onUpdate(g)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:a?void 0:i};QZ(l)||Object.assign(h,ZZ(e,h)),h.duration&&(h.duration=Jn(h.duration)),h.repeatDelay&&(h.repeatDelay=Jn(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let p=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(h.duration=0,h.delay===0&&(p=!0)),(Fi.instantAnimations||Fi.skipAnimations)&&(p=!0,h.duration=0,h.delay=0),h.allowFlatten=!l.type&&!l.ease,p&&!a&&t.get()!==void 0){const g=HZ(h.keyframes,l);if(g!==void 0){kt.update(()=>{h.onUpdate(g),h.onComplete()});return}}return l.isSync?new p_(h):new IX(h)};function JZ({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function o4(e,t,{delay:r=0,transitionOverride:n,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...l}=t;n&&(a=n);const c=[],f=i&&e.animationState&&e.animationState.getState()[i];for(const h in l){const p=e.getValue(h,e.latestValues[h]??null),g=l[h];if(g===void 0||f&&JZ(f,h))continue;const v={delay:r,...g_(a||{},h)},w=p.get();if(w!==void 0&&!p.isAnimating&&!Array.isArray(g)&&g===w&&!v.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const S=a4(e);if(S){const A=window.MotionHandoffAnimation(S,h,kt);A!==null&&(v.startTime=A,y=!0)}}D1(e,h),p.start(E_(h,p,g,e.shouldReduceMotion&&IL.has(h)?{type:!1}:v,e,y));const b=p.animation;b&&c.push(b)}return o&&Promise.all(c).then(()=>{kt.update(()=>{o&&UZ(e,o)})}),c}function $1(e,t,r={}){var c;const n=Du(e,t,r.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(i=r.transitionOverride);const a=n?()=>Promise.all(o4(e,n,r)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:g}=i;return eQ(e,t,h+f,p,g,r)}:()=>Promise.resolve(),{when:l}=i;if(l){const[f,h]=l==="beforeChildren"?[a,o]:[o,a];return f().then(()=>h())}else return Promise.all([a(),o(r.delay)])}function eQ(e,t,r=0,n=0,i=1,a){const o=[],l=(e.variantChildren.size-1)*n,c=i===1?(f=0)=>f*n:(f=0)=>l-f*n;return Array.from(e.variantChildren).sort(tQ).forEach((f,h)=>{f.notify("AnimationStart",t),o.push($1(f,t,{...a,delay:r+c(h)}).then(()=>f.notify("AnimationComplete",t)))}),Promise.all(o)}function tQ(e,t){return e.sortNodePosition(t)}function rQ(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const i=t.map(a=>$1(e,a,r));n=Promise.all(i)}else if(typeof t=="string")n=$1(e,t,r);else{const i=typeof t=="function"?Du(e,t,r.custom):t;n=Promise.all(o4(e,i,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}function s4(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}const nQ=w_.length;function l4(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?l4(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<nQ;r++){const n=w_[r],i=e.props[n];(Ru(i)||i===!1)&&(t[n]=i)}return t}const iQ=[...b_].reverse(),aQ=b_.length;function oQ(e){return t=>Promise.all(t.map(({animation:r,options:n})=>rQ(e,r,n)))}function sQ(e){let t=oQ(e),r=cC(),n=!0;const i=c=>(f,h)=>{var g;const p=Du(e,h,c==="exit"?(g=e.presenceContext)==null?void 0:g.custom:void 0);if(p){const{transition:v,transitionEnd:w,...y}=p;f={...f,...y,...w}}return f};function a(c){t=c(e)}function o(c){const{props:f}=e,h=l4(e.parent)||{},p=[],g=new Set;let v={},w=1/0;for(let b=0;b<aQ;b++){const S=iQ[b],A=r[S],_=f[S]!==void 0?f[S]:h[S],C=Ru(_),N=S===c?A.isActive:null;N===!1&&(w=b);let O=_===h[S]&&_!==f[S]&&C;if(O&&n&&e.manuallyAnimateOnMount&&(O=!1),A.protectedKeys={...v},!A.isActive&&N===null||!_&&!A.prevProp||Cm(_)||typeof _=="boolean")continue;const T=lQ(A.prevProp,_);let k=T||S===c&&A.isActive&&!O&&C||b>w&&C,R=!1;const F=Array.isArray(_)?_:[_];let I=F.reduce(i(S),{});N===!1&&(I={});const{prevResolvedValues:L={}}=A,V={...L,...I},Y=G=>{k=!0,g.has(G)&&(R=!0,g.delete(G)),A.needsAnimating[G]=!0;const D=e.getValue(G);D&&(D.liveStyle=!1)};for(const G in V){const D=I[G],q=L[G];if(v.hasOwnProperty(G))continue;let Q=!1;I1(D)&&I1(q)?Q=!s4(D,q):Q=D!==q,Q?D!=null?Y(G):g.add(G):D!==void 0&&g.has(G)?Y(G):A.protectedKeys[G]=!0}A.prevProp=_,A.prevResolvedValues=I,A.isActive&&(v={...v,...I}),n&&e.blockInitialAnimation&&(k=!1),k&&(!(O&&T)||R)&&p.push(...F.map(G=>({animation:G,options:{type:S}})))}if(g.size){const b={};if(typeof f.initial!="boolean"){const S=Du(e,Array.isArray(f.initial)?f.initial[0]:f.initial);S&&S.transition&&(b.transition=S.transition)}g.forEach(S=>{const A=e.getBaseTarget(S),_=e.getValue(S);_&&(_.liveStyle=!0),b[S]=A??null}),p.push({animation:b})}let y=!!p.length;return n&&(f.initial===!1||f.initial===f.animate)&&!e.manuallyAnimateOnMount&&(y=!1),n=!1,y?t(p):Promise.resolve()}function l(c,f){var p;if(r[c].isActive===f)return Promise.resolve();(p=e.variantChildren)==null||p.forEach(g=>{var v;return(v=g.animationState)==null?void 0:v.setActive(c,f)}),r[c].isActive=f;const h=o(c);for(const g in r)r[g].protectedKeys={};return h}return{animateChanges:o,setActive:l,setAnimateFunction:a,getState:()=>r,reset:()=>{r=cC(),n=!0}}}function lQ(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!s4(t,e):!1}function co(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function cC(){return{animate:co(!0),whileInView:co(),whileHover:co(),whileTap:co(),whileDrag:co(),whileFocus:co(),exit:co()}}class Fa{constructor(t){this.isMounted=!1,this.node=t}update(){}}class cQ extends Fa{constructor(t){super(t),t.animationState||(t.animationState=sQ(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Cm(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let uQ=0;class fQ extends Fa{constructor(){super(...arguments),this.id=uQ++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);r&&!t&&i.then(()=>{r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const dQ={animation:{Feature:cQ},exit:{Feature:fQ}};function $u(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function Df(e){return{point:{x:e.pageX,y:e.pageY}}}const hQ=e=>t=>x_(t)&&e(t,Df(t));function hu(e,t,r,n){return $u(e,t,hQ(r),n)}function c4({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function pQ({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function mQ(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}const u4=1e-4,gQ=1-u4,vQ=1+u4,f4=.01,yQ=0-f4,xQ=0+f4;function Sr(e){return e.max-e.min}function bQ(e,t,r){return Math.abs(e-t)<=r}function uC(e,t,r,n=.5){e.origin=n,e.originPoint=Tt(t.min,t.max,e.origin),e.scale=Sr(r)/Sr(t),e.translate=Tt(r.min,r.max,e.origin)-e.originPoint,(e.scale>=gQ&&e.scale<=vQ||isNaN(e.scale))&&(e.scale=1),(e.translate>=yQ&&e.translate<=xQ||isNaN(e.translate))&&(e.translate=0)}function pu(e,t,r,n){uC(e.x,t.x,r.x,n?n.originX:void 0),uC(e.y,t.y,r.y,n?n.originY:void 0)}function fC(e,t,r){e.min=r.min+t.min,e.max=e.min+Sr(t)}function wQ(e,t,r){fC(e.x,t.x,r.x),fC(e.y,t.y,r.y)}function dC(e,t,r){e.min=t.min-r.min,e.max=e.min+Sr(t)}function mu(e,t,r){dC(e.x,t.x,r.x),dC(e.y,t.y,r.y)}const hC=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ds=()=>({x:hC(),y:hC()}),pC=()=>({min:0,max:0}),Lt=()=>({x:pC(),y:pC()});function an(e){return[e("x"),e("y")]}function Ly(e){return e===void 0||e===1}function L1({scale:e,scaleX:t,scaleY:r}){return!Ly(e)||!Ly(t)||!Ly(r)}function po(e){return L1(e)||d4(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function d4(e){return mC(e.x)||mC(e.y)}function mC(e){return e&&e!=="0%"}function op(e,t,r){const n=e-r,i=t*n;return r+i}function gC(e,t,r,n,i){return i!==void 0&&(e=op(e,i,n)),op(e,r,n)+t}function B1(e,t=0,r=1,n,i){e.min=gC(e.min,t,r,n,i),e.max=gC(e.max,t,r,n,i)}function h4(e,{x:t,y:r}){B1(e.x,t.translate,t.scale,t.originPoint),B1(e.y,r.translate,r.scale,r.originPoint)}const vC=.999999999999,yC=1.0000000000001;function SQ(e,t,r,n=!1){const i=r.length;if(!i)return;t.x=t.y=1;let a,o;for(let l=0;l<i;l++){a=r[l],o=a.projectionDelta;const{visualElement:c}=a.options;c&&c.props.style&&c.props.style.display==="contents"||(n&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Ls(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,h4(e,o)),n&&po(a.latestValues)&&Ls(e,a.latestValues))}t.x<yC&&t.x>vC&&(t.x=1),t.y<yC&&t.y>vC&&(t.y=1)}function $s(e,t){e.min=e.min+t,e.max=e.max+t}function xC(e,t,r,n,i=.5){const a=Tt(e.min,e.max,i);B1(e,t,r,a,n)}function Ls(e,t){xC(e.x,t.x,t.scaleX,t.scale,t.originX),xC(e.y,t.y,t.scaleY,t.scale,t.originY)}function p4(e,t){return c4(mQ(e.getBoundingClientRect(),t))}function jQ(e,t,r){const n=p4(e,r),{scroll:i}=t;return i&&($s(n.x,i.offset.x),$s(n.y,i.offset.y)),n}const m4=({current:e})=>e?e.ownerDocument.defaultView:null,bC=(e,t)=>Math.abs(e-t);function _Q(e,t){const r=bC(e.x,t.x),n=bC(e.y,t.y);return Math.sqrt(r**2+n**2)}class g4{constructor(t,r,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:a=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Fy(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,v=_Q(p.offset,{x:0,y:0})>=3;if(!g&&!v)return;const{point:w}=p,{timestamp:y}=or;this.history.push({...w,timestamp:y});const{onStart:b,onMove:S}=this.handlers;g||(b&&b(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,p)},this.handlePointerMove=(p,g)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=By(g,this.transformPagePoint),kt.update(this.updatePoint,!0)},this.handlePointerUp=(p,g)=>{this.end();const{onEnd:v,onSessionEnd:w,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Fy(p.type==="pointercancel"?this.lastMoveEventInfo:By(g,this.transformPagePoint),this.history);this.startEvent&&v&&v(p,b),w&&w(p,b)},!x_(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=n,this.contextWindow=i||window;const o=Df(t),l=By(o,this.transformPagePoint),{point:c}=l,{timestamp:f}=or;this.history=[{...c,timestamp:f}];const{onSessionStart:h}=r;h&&h(t,Fy(l,this.history)),this.removeListeners=Mf(hu(this.contextWindow,"pointermove",this.handlePointerMove),hu(this.contextWindow,"pointerup",this.handlePointerUp),hu(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ia(this.updatePoint)}}function By(e,t){return t?{point:t(e.point)}:e}function wC(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Fy({point:e},t){return{point:e,delta:wC(e,v4(t)),offset:wC(e,PQ(t)),velocity:AQ(t,.1)}}function PQ(e){return e[0]}function v4(e){return e[e.length-1]}function AQ(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const i=v4(e);for(;r>=0&&(n=e[r],!(i.timestamp-n.timestamp>Jn(t)));)r--;if(!n)return{x:0,y:0};const a=ei(i.timestamp-n.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-n.x)/a,y:(i.y-n.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function NQ(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?Tt(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?Tt(r,e,n.max):Math.min(e,r)),e}function SC(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function EQ(e,{top:t,left:r,bottom:n,right:i}){return{x:SC(e.x,r,i),y:SC(e.y,t,n)}}function jC(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function OQ(e,t){return{x:jC(e.x,t.x),y:jC(e.y,t.y)}}function CQ(e,t){let r=.5;const n=Sr(e),i=Sr(t);return i>n?r=Tu(t.min,t.max-n,e.min):n>i&&(r=Tu(e.min,e.max-i,t.min)),Bi(0,1,r)}function TQ(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const F1=.35;function kQ(e=F1){return e===!1?e=0:e===!0&&(e=F1),{x:_C(e,"left","right"),y:_C(e,"top","bottom")}}function _C(e,t,r){return{min:PC(e,t),max:PC(e,r)}}function PC(e,t){return typeof e=="number"?e:e[t]||0}const MQ=new WeakMap;class RQ{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Lt(),this.visualElement=t}start(t,{snapToCursor:r=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const i=h=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(Df(h).point)},a=(h,p)=>{const{drag:g,dragPropagation:v,onDragStart:w}=this.getProps();if(g&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ZX(g),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),an(b=>{let S=this.getAxisMotionValue(b).get()||0;if(ti.test(S)){const{projection:A}=this.visualElement;if(A&&A.layout){const _=A.layout.layoutBox[b];_&&(S=Sr(_)*(parseFloat(S)/100))}}this.originPoint[b]=S}),w&&kt.postRender(()=>w(h,p)),D1(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},o=(h,p)=>{const{dragPropagation:g,dragDirectionLock:v,onDirectionLock:w,onDrag:y}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:b}=p;if(v&&this.currentDirection===null){this.currentDirection=IQ(b),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",p.point,b),this.updateAxis("y",p.point,b),this.visualElement.render(),y&&y(h,p)},l=(h,p)=>this.stop(h,p),c=()=>an(h=>{var p;return this.getAnimationState(h)==="paused"&&((p=this.getAxisMotionValue(h).animation)==null?void 0:p.play())}),{dragSnapToOrigin:f}=this.getProps();this.panSession=new g4(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:f,contextWindow:m4(this.visualElement)})}stop(t,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&kt.postRender(()=>a(t,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,n){const{drag:i}=this.getProps();if(!n||!vh(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=NQ(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var a;const{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,i=this.constraints;t&&Is(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=EQ(n.layoutBox,t):this.constraints=!1,this.elastic=kQ(r),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&an(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=TQ(n.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Is(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=jQ(n,i.root,this.visualElement.getTransformPagePoint());let o=OQ(i.layout.layoutBox,a);if(r){const l=r(pQ(o));this.hasMutatedConstraints=!!l,l&&(o=c4(l))}return o}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},f=an(h=>{if(!vh(h,r,this.currentDirection))return;let p=c&&c[h]||{};o&&(p={min:0,max:0});const g=i?200:1e6,v=i?40:1e7,w={type:"inertia",velocity:n?t[h]:0,bounceStiffness:g,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...a,...p};return this.startAxisValueAnimation(h,w)});return Promise.all(f).then(l)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return D1(this.visualElement,t),n.start(E_(t,n,0,r,this.visualElement,!1))}stopAnimation(){an(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){an(t=>{var r;return(r=this.getAxisMotionValue(t).animation)==null?void 0:r.pause()})}getAnimationState(t){var r;return(r=this.getAxisMotionValue(t).animation)==null?void 0:r.state}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),i=n[r];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){an(r=>{const{drag:n}=this.getProps();if(!vh(r,n,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(r);if(i&&i.layout){const{min:o,max:l}=i.layout.layoutBox[r];a.set(t[r]-Tt(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!Is(r)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};an(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const c=l.get();i[o]=CQ({min:c,max:c},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),an(o=>{if(!vh(o,t,null))return;const l=this.getAxisMotionValue(o),{min:c,max:f}=this.constraints[o];l.set(Tt(c,f,i[o]))})}addListeners(){if(!this.visualElement.current)return;MQ.set(this.visualElement,this);const t=this.visualElement.current,r=hu(t,"pointerdown",c=>{const{drag:f,dragListener:h=!0}=this.getProps();f&&h&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();Is(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",n);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),kt.read(n);const o=$u(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f})=>{this.isDragging&&f&&(an(h=>{const p=this.getAxisMotionValue(h);p&&(this.originPoint[h]+=c[h].translate,p.set(p.get()+c[h].translate))}),this.visualElement.render())});return()=>{o(),r(),a(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=F1,dragMomentum:l=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:l}}}function vh(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function IQ(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class DQ extends Fa{constructor(t){super(t),this.removeGroupControls=cn,this.removeListeners=cn,this.controls=new RQ(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||cn}unmount(){this.removeGroupControls(),this.removeListeners()}}const AC=e=>(t,r)=>{e&&kt.postRender(()=>e(t,r))};class $Q extends Fa{constructor(){super(...arguments),this.removePointerDownListener=cn}onPointerDown(t){this.session=new g4(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:m4(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:AC(t),onStart:AC(r),onMove:n,onEnd:(a,o)=>{delete this.session,i&&kt.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=hu(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Wh={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function NC(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Wc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Be.test(e))e=parseFloat(e);else return e;const r=NC(e,t.target.x),n=NC(e,t.target.y);return`${r}% ${n}%`}},LQ={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,i=Da.parse(e);if(i.length>5)return n;const a=Da.createTransformer(e),o=typeof i[0]!="number"?1:0,l=r.x.scale*t.x,c=r.y.scale*t.y;i[0+o]/=l,i[1+o]/=c;const f=Tt(l,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=f),typeof i[3+o]=="number"&&(i[3+o]/=f),a(i)}};class BQ extends j.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:a}=t;jZ(FQ),a&&(r.group&&r.group.add(a),n&&n.register&&i&&n.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Wh.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:i,isPresent:a}=this.props,{projection:o}=n;return o&&(o.isPresent=a,i||t.layoutDependency!==r||r===void 0||t.isPresent!==a?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||kt.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),y_.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function y4(e){const[t,r]=oZ(),n=j.useContext(eL);return d.jsx(BQ,{...e,layoutGroup:n,switchLayoutGroup:j.useContext(XL),isPresent:t,safeToRemove:r})}const FQ={borderRadius:{...Wc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wc,borderTopRightRadius:Wc,borderBottomLeftRadius:Wc,borderBottomRightRadius:Wc,boxShadow:LQ};function zQ(e,t,r){const n=vr(e)?e:Xs(e);return n.start(E_("",n,t,r)),n.animation}const VQ=(e,t)=>e.depth-t.depth;class UQ{constructor(){this.children=[],this.isDirty=!1}add(t){Jj(this.children,t),this.isDirty=!0}remove(t){e_(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(VQ),this.isDirty=!1,this.children.forEach(t)}}function qQ(e,t){const r=Mr.now(),n=({timestamp:i})=>{const a=i-r;a>=t&&(Ia(n),e(a-t))};return kt.setup(n,!0),()=>Ia(n)}const x4=["TopLeft","TopRight","BottomLeft","BottomRight"],WQ=x4.length,EC=e=>typeof e=="string"?parseFloat(e):e,OC=e=>typeof e=="number"||Be.test(e);function HQ(e,t,r,n,i,a){i?(e.opacity=Tt(0,r.opacity??1,GQ(n)),e.opacityExit=Tt(t.opacity??1,0,KQ(n))):a&&(e.opacity=Tt(t.opacity??1,r.opacity??1,n));for(let o=0;o<WQ;o++){const l=`border${x4[o]}Radius`;let c=CC(t,l),f=CC(r,l);if(c===void 0&&f===void 0)continue;c||(c=0),f||(f=0),c===0||f===0||OC(c)===OC(f)?(e[l]=Math.max(Tt(EC(c),EC(f),n),0),(ti.test(f)||ti.test(c))&&(e[l]+="%")):e[l]=f}(t.rotate||r.rotate)&&(e.rotate=Tt(t.rotate||0,r.rotate||0,n))}function CC(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const GQ=b4(0,.5,fL),KQ=b4(.5,.95,cn);function b4(e,t,r){return n=>n<e?0:n>t?1:r(Tu(e,t,n))}function TC(e,t){e.min=t.min,e.max=t.max}function tn(e,t){TC(e.x,t.x),TC(e.y,t.y)}function kC(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function MC(e,t,r,n,i){return e-=t,e=op(e,1/r,n),i!==void 0&&(e=op(e,1/i,n)),e}function YQ(e,t=0,r=1,n=.5,i,a=e,o=e){if(ti.test(t)&&(t=parseFloat(t),t=Tt(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=Tt(a.min,a.max,n);e===a&&(l-=t),e.min=MC(e.min,t,r,l,i),e.max=MC(e.max,t,r,l,i)}function RC(e,t,[r,n,i],a,o){YQ(e,t[r],t[n],t[i],t.scale,a,o)}const XQ=["x","scaleX","originX"],ZQ=["y","scaleY","originY"];function IC(e,t,r,n){RC(e.x,t,XQ,r?r.x:void 0,n?n.x:void 0),RC(e.y,t,ZQ,r?r.y:void 0,n?n.y:void 0)}function DC(e){return e.translate===0&&e.scale===1}function w4(e){return DC(e.x)&&DC(e.y)}function $C(e,t){return e.min===t.min&&e.max===t.max}function QQ(e,t){return $C(e.x,t.x)&&$C(e.y,t.y)}function LC(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function S4(e,t){return LC(e.x,t.x)&&LC(e.y,t.y)}function BC(e){return Sr(e.x)/Sr(e.y)}function FC(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class JQ{constructor(){this.members=[]}add(t){Jj(this.members,t),t.scheduleRender()}remove(t){if(e_(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(i=>t===i);if(r===0)return!1;let n;for(let i=r;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){n=a;break}}return n?(this.promote(n),!0):!1}promote(t,r){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function eJ(e,t,r){let n="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=(r==null?void 0:r.z)||0;if((i||a||o)&&(n=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:f,rotate:h,rotateX:p,rotateY:g,skewX:v,skewY:w}=r;f&&(n=`perspective(${f}px) ${n}`),h&&(n+=`rotate(${h}deg) `),p&&(n+=`rotateX(${p}deg) `),g&&(n+=`rotateY(${g}deg) `),v&&(n+=`skewX(${v}deg) `),w&&(n+=`skewY(${w}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(n+=`scale(${l}, ${c})`),n||"none"}const zy=["","X","Y","Z"],tJ={visibility:"hidden"},rJ=1e3;let nJ=0;function Vy(e,t,r,n){const{latestValues:i}=t;i[e]&&(r[e]=i[e],t.setStaticValue(e,0),n&&(n[e]=0))}function j4(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=a4(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",kt,!(i||a))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&j4(n)}function _4({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o={},l=t==null?void 0:t()){this.id=nJ++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(oJ),this.nodes.forEach(fJ),this.nodes.forEach(dJ),this.nodes.forEach(sJ)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new UQ)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new n_),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const c=this.eventHandlers.get(o);c&&c.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=qL(o)&&!nZ(o),this.instance=o;const{layoutId:l,layout:c,visualElement:f}=this.options;if(f&&!f.current&&f.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let h;const p=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=qQ(p,250),Wh.hasAnimatedSinceResize&&(Wh.hasAnimatedSinceResize=!1,this.nodes.forEach(VC))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||c)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:p,hasRelativeLayoutChanged:g,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||f.getDefaultTransition()||vJ,{onLayoutAnimationStart:y,onLayoutAnimationComplete:b}=f.getProps(),S=!this.targetLayout||!S4(this.targetLayout,v),A=!p&&g;if(this.options.layoutRoot||this.resumeFrom||A||p&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,A);const _={...g_(w,"layout"),onPlay:y,onComplete:b};(f.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_)}else p||VC(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ia(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(hJ),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&j4(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const p=this.path[h];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(zC);return}this.isUpdating||this.nodes.forEach(cJ),this.isUpdating=!1,this.nodes.forEach(uJ),this.nodes.forEach(iJ),this.nodes.forEach(aJ),this.clearAllSnapshots();const l=Mr.now();or.delta=Bi(0,1e3/60,l-or.timestamp),or.timestamp=l,or.isProcessing=!0,My.update.process(or),My.preRender.process(or),My.render.process(or),or.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,y_.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(lJ),this.sharedNodes.forEach(pJ)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,kt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){kt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Sr(this.snapshot.measuredBox.x)&&!Sr(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Lt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l&&this.instance){const c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!w4(this.projectionDelta),c=this.getTransformTemplate(),f=c?c(this.latestValues,""):void 0,h=f!==this.prevTransformTemplateValue;o&&this.instance&&(l||po(this.latestValues)||h)&&(i(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return o&&(c=this.removeTransform(c)),yJ(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:o}=this.options;if(!o)return Lt();const l=o.measureViewportBox();if(!(((f=this.scroll)==null?void 0:f.wasRoot)||this.path.some(xJ))){const{scroll:h}=this.root;h&&($s(l.x,h.offset.x),$s(l.y,h.offset.y))}return l}removeElementScroll(o){var c;const l=Lt();if(tn(l,o),(c=this.scroll)!=null&&c.wasRoot)return l;for(let f=0;f<this.path.length;f++){const h=this.path[f],{scroll:p,options:g}=h;h!==this.root&&p&&g.layoutScroll&&(p.wasRoot&&tn(l,o),$s(l.x,p.offset.x),$s(l.y,p.offset.y))}return l}applyTransform(o,l=!1){const c=Lt();tn(c,o);for(let f=0;f<this.path.length;f++){const h=this.path[f];!l&&h.options.layoutScroll&&h.scroll&&h!==h.root&&Ls(c,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),po(h.latestValues)&&Ls(c,h.latestValues)}return po(this.latestValues)&&Ls(c,this.latestValues),c}removeTransform(o){const l=Lt();tn(l,o);for(let c=0;c<this.path.length;c++){const f=this.path[c];if(!f.instance||!po(f.latestValues))continue;L1(f.latestValues)&&f.updateSnapshot();const h=Lt(),p=f.measurePageBox();tn(h,p),IC(l,f.latestValues,f.snapshot?f.snapshot.layoutBox:void 0,h)}return po(this.latestValues)&&IC(l,this.latestValues),l}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==or.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var g;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:p}=this.options;if(!(!this.layout||!(h||p))){if(this.resolvedRelativeTargetAt=or.timestamp,!this.targetDelta&&!this.relativeTarget){const v=this.getClosestProjectingParent();v&&v.layout&&this.animationProgress!==1?(this.relativeParent=v,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Lt(),this.relativeTargetOrigin=Lt(),mu(this.relativeTargetOrigin,this.layout.layoutBox,v.layout.layoutBox),tn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Lt(),this.targetWithTransforms=Lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),wQ(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):tn(this.target,this.layout.layoutBox),h4(this.target,this.targetDelta)):tn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const v=this.getClosestProjectingParent();v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?(this.relativeParent=v,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Lt(),this.relativeTargetOrigin=Lt(),mu(this.relativeTargetOrigin,this.target,v.target),tn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||L1(this.parent.latestValues)||d4(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var w;const o=this.getLead(),l=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||(w=this.parent)!=null&&w.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===or.timestamp&&(c=!1),c)return;const{layout:f,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||h))return;tn(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,g=this.treeScale.y;SQ(this.layoutCorrected,this.treeScale,this.path,l),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Lt());const{target:v}=o;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(kC(this.prevProjectionDelta.x,this.projectionDelta.x),kC(this.prevProjectionDelta.y,this.projectionDelta.y)),pu(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==g||!FC(this.projectionDelta.x,this.prevProjectionDelta.x)||!FC(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ds(),this.projectionDelta=Ds(),this.projectionDeltaWithTransform=Ds()}setAnimationOrigin(o,l=!1){const c=this.snapshot,f=c?c.latestValues:{},h={...this.latestValues},p=Ds();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const g=Lt(),v=c?c.source:void 0,w=this.layout?this.layout.source:void 0,y=v!==w,b=this.getStack(),S=!b||b.members.length<=1,A=!!(y&&!S&&this.options.crossfade===!0&&!this.path.some(gJ));this.animationProgress=0;let _;this.mixTargetDelta=C=>{const N=C/1e3;UC(p.x,o.x,N),UC(p.y,o.y,N),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(mu(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mJ(this.relativeTarget,this.relativeTargetOrigin,g,N),_&&QQ(this.relativeTarget,_)&&(this.isProjectionDirty=!1),_||(_=Lt()),tn(_,this.relativeTarget)),y&&(this.animationValues=h,HQ(h,f,this.latestValues,N,A,S)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=N},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var l,c,f;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(!1),(f=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||f.stop(!1),this.pendingAnimation&&(Ia(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=kt.update(()=>{Wh.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Xs(0)),this.currentAnimation=zQ(this.motionValue,[0,1e3],{...o,isSync:!0,onUpdate:h=>{this.mixTargetDelta(h),o.onUpdate&&o.onUpdate(h)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(rJ),this.currentAnimation.stop(!1)),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:c,layout:f,latestValues:h}=o;if(!(!l||!c||!f)){if(this!==o&&this.layout&&f&&P4(this.options.animationType,this.layout.layoutBox,f.layoutBox)){c=this.target||Lt();const p=Sr(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+p;const g=Sr(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+g}tn(l,c),Ls(l,h),pu(this.projectionDeltaWithTransform,this.layoutCorrected,l,h)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new JQ),this.sharedNodes.get(o).add(l);const f=l.options.initialPromotionConfig;l.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var l;const{layoutId:o}=this.options;return o?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:o}=this.options;return o?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:c}={}){const f=this.getStack();f&&f.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const f={};c.z&&Vy("z",o,f,this.animationValues);for(let h=0;h<zy.length;h++)Vy(`rotate${zy[h]}`,o,f,this.animationValues),Vy(`skew${zy[h]}`,o,f,this.animationValues);o.render();for(const h in f)o.setStaticValue(h,f[h]),this.animationValues&&(this.animationValues[h]=f[h]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return tJ;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=qh(o==null?void 0:o.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const v={};return this.options.layoutId&&(v.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,v.pointerEvents=qh(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!po(this.latestValues)&&(v.transform=c?c({},""):"none",this.hasProjected=!1),v}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),l.transform=eJ(this.projectionDeltaWithTransform,this.treeScale,h),c&&(l.transform=c(h,l.transform));const{x:p,y:g}=this.projectionDelta;l.transformOrigin=`${p.origin*100}% ${g.origin*100}% 0`,f.animationValues?l.opacity=f===this?h.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:l.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const v in Iu){if(h[v]===void 0)continue;const{correct:w,applyTo:y,isCSSVariable:b}=Iu[v],S=l.transform==="none"?h[v]:w(h[v],f);if(y){const A=y.length;for(let _=0;_<A;_++)l[y[_]]=S}else b?this.options.visualElement.renderState.vars[v]=S:l[v]=S}return this.options.layoutId&&(l.pointerEvents=f===this?qh(o==null?void 0:o.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)==null?void 0:l.stop(!1)}),this.root.nodes.forEach(zC),this.root.sharedNodes.clear()}}}function iJ(e){e.updateLayout()}function aJ(e){var r;const t=((r=e.resumeFrom)==null?void 0:r.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:a}=e.options,o=t.source!==e.layout.source;a==="size"?an(p=>{const g=o?t.measuredBox[p]:t.layoutBox[p],v=Sr(g);g.min=n[p].min,g.max=g.min+v}):P4(a,t.layoutBox,n)&&an(p=>{const g=o?t.measuredBox[p]:t.layoutBox[p],v=Sr(n[p]);g.max=g.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+v)});const l=Ds();pu(l,n,t.layoutBox);const c=Ds();o?pu(c,e.applyTransform(i,!0),t.measuredBox):pu(c,n,t.layoutBox);const f=!w4(l);let h=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:g,layout:v}=p;if(g&&v){const w=Lt();mu(w,t.layoutBox,g.layoutBox);const y=Lt();mu(y,n,v.layoutBox),S4(w,y)||(h=!0),p.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=w,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:f,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function oJ(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function sJ(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function lJ(e){e.clearSnapshot()}function zC(e){e.clearMeasurements()}function cJ(e){e.isLayoutDirty=!1}function uJ(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function VC(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function fJ(e){e.resolveTargetDelta()}function dJ(e){e.calcProjection()}function hJ(e){e.resetSkewAndRotation()}function pJ(e){e.removeLeadSnapshot()}function UC(e,t,r){e.translate=Tt(t.translate,0,r),e.scale=Tt(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function qC(e,t,r,n){e.min=Tt(t.min,r.min,n),e.max=Tt(t.max,r.max,n)}function mJ(e,t,r,n){qC(e.x,t.x,r.x,n),qC(e.y,t.y,r.y,n)}function gJ(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const vJ={duration:.45,ease:[.4,0,.1,1]},WC=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),HC=WC("applewebkit/")&&!WC("chrome/")?Math.round:cn;function GC(e){e.min=HC(e.min),e.max=HC(e.max)}function yJ(e){GC(e.x),GC(e.y)}function P4(e,t,r){return e==="position"||e==="preserve-aspect"&&!bQ(BC(t),BC(r),.2)}function xJ(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const bJ=_4({attachResizeListener:(e,t)=>$u(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Uy={current:void 0},A4=_4({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Uy.current){const e=new bJ({});e.mount(window),e.setOptions({layoutScroll:!0}),Uy.current=e}return Uy.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),wJ={pan:{Feature:$Q},drag:{Feature:DQ,ProjectionNode:A4,MeasureLayout:y4}};function KC(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");const i="onHover"+r,a=n[i];a&&kt.postRender(()=>a(t,Df(t)))}class SJ extends Fa{mount(){const{current:t}=this.node;t&&(this.unmount=QX(t,(r,n)=>(KC(this.node,n,"Start"),i=>KC(this.node,i,"End"))))}unmount(){}}class jJ extends Fa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Mf($u(this.node.current,"focus",()=>this.onFocus()),$u(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function YC(e,t,r){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");const i="onTap"+(r==="End"?"":r),a=n[i];a&&kt.postRender(()=>a(t,Df(t)))}class _J extends Fa{mount(){const{current:t}=this.node;t&&(this.unmount=rZ(t,(r,n)=>(YC(this.node,n,"Start"),(i,{success:a})=>YC(this.node,i,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const z1=new WeakMap,qy=new WeakMap,PJ=e=>{const t=z1.get(e.target);t&&t(e)},AJ=e=>{e.forEach(PJ)};function NJ({root:e,...t}){const r=e||document;qy.has(r)||qy.set(r,{});const n=qy.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(AJ,{root:e,...t})),n[i]}function EJ(e,t,r){const n=NJ(t);return z1.set(e,r),n.observe(e),()=>{z1.delete(e),n.unobserve(e)}}const OJ={some:0,all:1};class CJ extends Fa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:i="some",once:a}=t,o={root:r?r.current:void 0,rootMargin:n,threshold:typeof i=="number"?i:OJ[i]},l=c=>{const{isIntersecting:f}=c;if(this.isInView===f||(this.isInView=f,a&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:h,onViewportLeave:p}=this.node.getProps(),g=f?h:p;g&&g(c)};return EJ(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(TJ(t,r))&&this.startObserver()}unmount(){}}function TJ({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const kJ={inView:{Feature:CJ},tap:{Feature:_J},focus:{Feature:jJ},hover:{Feature:SJ}},MJ={layout:{ProjectionNode:A4,MeasureLayout:y4}},V1={current:null},N4={current:!1};function RJ(){if(N4.current=!0,!!Zj)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>V1.current=e.matches;e.addListener(t),t()}else V1.current=!1}const IJ=new WeakMap;function DJ(e,t,r){for(const n in t){const i=t[n],a=r[n];if(vr(i))e.addValue(n,i);else if(vr(a))e.addValue(n,Xs(i,{owner:e}));else if(a!==i)if(e.hasValue(n)){const o=e.getValue(n);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(n);e.addValue(n,Xs(o!==void 0?o:i,{owner:e}))}}for(const n in r)t[n]===void 0&&e.removeValue(n);return t}const XC=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class $J{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:a,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=m_,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=Mr.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,kt.render(this.render,!1,!0))};const{latestValues:c,renderState:f}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=r.initial?{...c}:{},this.renderState=f,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=l,this.blockInitialAnimation=!!a,this.isControllingVariants=Tm(r),this.isVariantNode=KL(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...p}=this.scrapeMotionValuesFromProps(r,{},this);for(const g in p){const v=p[g];c[g]!==void 0&&vr(v)&&v.set(c[g],!1)}}mount(t){this.current=t,IJ.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,n)=>this.bindToMotionValue(n,r)),N4.current||RJ(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:V1.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ia(this.notifyUpdate),Ia(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Ml.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=r.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&kt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),a=r.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{i(),a(),o&&o(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Zs){const r=Zs[t];if(!r)continue;const{isEnabled:n,Feature:i}=r;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Lt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<XC.length;n++){const i=XC[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,o=t[a];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=DJ(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){const n=this.values.get(t);r!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=Xs(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(tL(n)||nL(n))?n=parseFloat(n):!aZ(n)&&Da.test(r)&&(n=BL(t,r)),this.setBaseTarget(t,vr(n)?n.get():n)),vr(n)?n.get():n}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var a;const{initial:r}=this.props;let n;if(typeof r=="string"||typeof r=="object"){const o=A_(this.props,r,(a=this.presenceContext)==null?void 0:a.custom);o&&(n=o[t])}if(r&&n!==void 0)return n;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!vr(i)?i:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new n_),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}}class E4 extends $J{constructor(){super(...arguments),this.KeyframeResolver=GX}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;vr(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}function O4(e,{style:t,vars:r},n,i){Object.assign(e.style,t,i&&i.getProjectionStyles(n));for(const a in r)e.style.setProperty(a,r[a])}function LJ(e){return window.getComputedStyle(e)}class BJ extends E4{constructor(){super(...arguments),this.type="html",this.renderInstance=O4}readValueFromInstance(t,r){var n;if(Ml.has(r))return(n=this.projection)!=null&&n.isProjecting?O1(r):dX(t,r);{const i=LJ(t),a=(o_(r)?i.getPropertyValue(r):i[r])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:r}){return p4(t,r)}build(t,r,n){j_(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return N_(t,r,n)}}const C4=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function FJ(e,t,r,n){O4(e,t,void 0,n);for(const i in t.attrs)e.setAttribute(C4.has(i)?i:S_(i),t.attrs[i])}class zJ extends E4{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Lt}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Ml.has(r)){const n=LL(r);return n&&n.default||0}return r=C4.has(r)?r:S_(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return i4(t,r,n)}build(t,r,n){e4(t,r,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,r,n,i){FJ(t,r,n,i)}mount(t){this.isSVGTag=r4(t.tagName),super.mount(t)}}const VJ=(e,t)=>P_(e)?new zJ(t):new BJ(t,{allowProjection:e!==j.Fragment}),UJ=FZ({...dQ,...kJ,...wJ,...MJ},VJ),Yn=fZ(UJ);function qJ(){const[e,t]=j.useState(""),[r,n]=j.useState(!1),[i,a]=j.useState(!1),[o,l]=j.useState(""),[c,f]=j.useState(""),[h,p]=j.useState(""),g=pn(),v=async w=>{w.preventDefault(),a(!0),t("");try{const y=await At.register({name:h,email:o,password:c});console.log("Response:",y.data),alert("Registration successful!"),p(""),l(""),f("")}catch(y){console.error("Error submitting form:",y),y.response&&y.response.data&&y.response.data.message?t(y.response.data.message):t("Registration failed. Please check your input and try again.")}finally{a(!1),g("/login")}};return d.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-[#E8DCCA] bg-opacity-30",children:[d.jsxs("div",{className:"absolute inset-0 overflow-hidden z-0",children:[d.jsx(Yn.div,{className:"absolute inset-0 bg-[url('/italian-migrants-historical.jpg')] bg-cover bg-center",initial:{opacity:0},animate:{opacity:.15},transition:{duration:1.5}}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-[#9B2335]/20 to-[#01796F]/20"})]}),d.jsxs(Yn.div,{className:"max-w-md w-full mx-4 bg-white rounded-lg shadow-xl overflow-hidden z-10",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},children:[d.jsx("div",{className:"h-2 bg-gradient-to-r from-[#9B2335] via-[#E8DCCA] to-[#01796F]"}),d.jsx("div",{className:"px-8 pt-8 pb-6",children:d.jsxs(Yn.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.3,duration:.6},className:"text-center",children:[d.jsx("h2",{className:"text-2xl font-serif font-bold text-[#1A2A57]",children:"Admin Access"}),d.jsx("p",{className:"text-gray-600 mt-1 italic",children:"Northern Territory Italian Migration History"})]})}),d.jsxs(Yn.div,{className:"px-8 pb-8",initial:{opacity:0},animate:{opacity:1},transition:{delay:.5,duration:.6},children:[e&&d.jsx(Yn.div,{className:"mb-4 p-3 bg-red-50 border-l-4 border-[#9B2335] text-[#9B2335]",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},children:e}),d.jsxs("form",{onSubmit:v,children:[d.jsxs("div",{className:"mb-6",children:[d.jsx("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-1",children:"Name"}),d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:d.jsx(ju,{className:"h-5 w-5 text-gray-400"})}),d.jsx("input",{id:"name",type:"text",value:h,onChange:w=>p(w.target.value),className:"block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#01796F] focus:border-[#01796F]",placeholder:"John Doe",required:!0})]})]}),d.jsxs("div",{className:"mb-6",children:[d.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-1",children:"Email"}),d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:d.jsx(ju,{className:"h-5 w-5 text-gray-400"})}),d.jsx("input",{id:"email",type:"email",value:o,onChange:w=>l(w.target.value),className:"block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#01796F] focus:border-[#01796F]",placeholder:"admin@example.com",required:!0})]})]}),d.jsxs("div",{className:"mb-6",children:[d.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700 mb-1",children:"Password"}),d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:d.jsx(Qh,{className:"h-5 w-5 text-gray-400"})}),d.jsx("input",{id:"password",type:r?"text":"password",value:c,onChange:w=>f(w.target.value),className:"block w-full pl-10 pr-10 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#01796F] focus:border-[#01796F]",placeholder:"••••••••",required:!0}),d.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center",children:d.jsx("button",{type:"button",onClick:()=>n(!r),className:"text-gray-400 hover:text-gray-500 focus:outline-none",children:r?d.jsx(U$,{className:"h-5 w-5"}):d.jsx(q$,{className:"h-5 w-5"})})})]})]}),d.jsx(Yn.button,{type:"submit",disabled:i,className:"w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-white bg-[#9B2335] hover:bg-[#9B2335]/90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[#9B2335] disabled:opacity-50 disabled:cursor-not-allowed",whileHover:{scale:1.02},whileTap:{scale:.98},children:i?d.jsxs("div",{className:"flex items-center",children:[d.jsxs("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[d.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),d.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Signing in..."]}):"Sign in"})]}),d.jsxs("div",{className:"mt-6 flex items-center justify-center",children:[d.jsx("div",{className:"h-px bg-gray-300 w-full"}),d.jsx("span",{className:"px-2 text-sm text-gray-500",children:"or"}),d.jsx("div",{className:"h-px bg-gray-300 w-full"})]}),d.jsx("div",{className:"mt-6 text-center",children:d.jsx(Ge,{to:"/",className:"text-sm font-medium text-[#1A2A57] hover:text-[#1A2A57]/80",children:"Return to public site"})})]})]}),d.jsxs(Yn.div,{className:"absolute bottom-4 text-center text-xs text-gray-500",initial:{opacity:0},animate:{opacity:1},transition:{delay:1,duration:.6},children:["© ",new Date().getFullYear()," Northern Territory Italian Migration History Project"]})]})}const WJ=e=>{var r;const t={};for(const n of e){const i=(r=n.migration)==null?void 0:r.date_of_arrival_nt;if(i){const a=i.slice(0,4);t[a]=(t[a]||0)+1}}return Object.entries(t).map(([n,i])=>({year:parseInt(n,10),count:i})).sort((n,i)=>n.year-i.year)},HJ=e=>{var r;const t={};for(const n of e){const i=((r=n.residence)==null?void 0:r.town_or_city)||"Unknown";t[i]=(t[i]||0)+1}return Object.entries(t).map(([n,i])=>({name:n,value:i}))},GJ=e=>{const t={};for(const r of e){const n=r.occupation||"Unknown";t[n]=(t[n]||0)+1}return Object.entries(t).map(([r,n])=>({occupation:r,value:n}))},O_=()=>{const[e,t]=j.useState([]),[r,n]=j.useState([]),[i,a]=j.useState([]),[o,l]=j.useState(!0),[c,f]=j.useState(null);return j.useEffect(()=>{(async()=>{try{const g=(await At.getMigrants(1,1e3)).data??[],v=WJ(g),w=HJ(g),y=GJ(g);t(v),n(w),a(y)}catch{f("Error fetching data")}finally{l(!1)}})()},[]),{migrationData:e,residenceData:r,occupationData:i,loading:o,error:c}};var Wy,ZC;function $r(){if(ZC)return Wy;ZC=1;var e=Array.isArray;return Wy=e,Wy}var Hy,QC;function T4(){if(QC)return Hy;QC=1;var e=typeof lh=="object"&&lh&&lh.Object===Object&&lh;return Hy=e,Hy}var Gy,JC;function li(){if(JC)return Gy;JC=1;var e=T4(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Gy=r,Gy}var Ky,eT;function $f(){if(eT)return Ky;eT=1;var e=li(),t=e.Symbol;return Ky=t,Ky}var Yy,tT;function KJ(){if(tT)return Yy;tT=1;var e=$f(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function a(o){var l=r.call(o,i),c=o[i];try{o[i]=void 0;var f=!0}catch{}var h=n.call(o);return f&&(l?o[i]=c:delete o[i]),h}return Yy=a,Yy}var Xy,rT;function YJ(){if(rT)return Xy;rT=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return Xy=r,Xy}var Zy,nT;function Ki(){if(nT)return Zy;nT=1;var e=$f(),t=KJ(),r=YJ(),n="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?i:n:a&&a in Object(l)?t(l):r(l)}return Zy=o,Zy}var Qy,iT;function Yi(){if(iT)return Qy;iT=1;function e(t){return t!=null&&typeof t=="object"}return Qy=e,Qy}var Jy,aT;function Rl(){if(aT)return Jy;aT=1;var e=Ki(),t=Yi(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return Jy=n,Jy}var ex,oT;function C_(){if(oT)return ex;oT=1;var e=$r(),t=Rl(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,o){if(e(a))return!1;var l=typeof a;return l=="number"||l=="symbol"||l=="boolean"||a==null||t(a)?!0:n.test(a)||!r.test(a)||o!=null&&a in Object(o)}return ex=i,ex}var tx,sT;function za(){if(sT)return tx;sT=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return tx=e,tx}var rx,lT;function T_(){if(lT)return rx;lT=1;var e=Ki(),t=za(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(l){if(!t(l))return!1;var c=e(l);return c==n||c==i||c==r||c==a}return rx=o,rx}var nx,cT;function XJ(){if(cT)return nx;cT=1;var e=li(),t=e["__core-js_shared__"];return nx=t,nx}var ix,uT;function ZJ(){if(uT)return ix;uT=1;var e=XJ(),t=function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function r(n){return!!t&&t in n}return ix=r,ix}var ax,fT;function k4(){if(fT)return ax;fT=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return ax=r,ax}var ox,dT;function QJ(){if(dT)return ox;dT=1;var e=T_(),t=ZJ(),r=za(),n=k4(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,c=o.toString,f=l.hasOwnProperty,h=RegExp("^"+c.call(f).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p(g){if(!r(g)||t(g))return!1;var v=e(g)?h:a;return v.test(n(g))}return ox=p,ox}var sx,hT;function JJ(){if(hT)return sx;hT=1;function e(t,r){return t==null?void 0:t[r]}return sx=e,sx}var lx,pT;function Go(){if(pT)return lx;pT=1;var e=QJ(),t=JJ();function r(n,i){var a=t(n,i);return e(a)?a:void 0}return lx=r,lx}var cx,mT;function km(){if(mT)return cx;mT=1;var e=Go(),t=e(Object,"create");return cx=t,cx}var ux,gT;function eee(){if(gT)return ux;gT=1;var e=km();function t(){this.__data__=e?e(null):{},this.size=0}return ux=t,ux}var fx,vT;function tee(){if(vT)return fx;vT=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return fx=e,fx}var dx,yT;function ree(){if(yT)return dx;yT=1;var e=km(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var o=this.__data__;if(e){var l=o[a];return l===t?void 0:l}return n.call(o,a)?o[a]:void 0}return dx=i,dx}var hx,xT;function nee(){if(xT)return hx;xT=1;var e=km(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var a=this.__data__;return e?a[i]!==void 0:r.call(a,i)}return hx=n,hx}var px,bT;function iee(){if(bT)return px;bT=1;var e=km(),t="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=e&&i===void 0?t:i,this}return px=r,px}var mx,wT;function aee(){if(wT)return mx;wT=1;var e=eee(),t=tee(),r=ree(),n=nee(),i=iee();function a(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var f=o[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,mx=a,mx}var gx,ST;function oee(){if(ST)return gx;ST=1;function e(){this.__data__=[],this.size=0}return gx=e,gx}var vx,jT;function k_(){if(jT)return vx;jT=1;function e(t,r){return t===r||t!==t&&r!==r}return vx=e,vx}var yx,_T;function Mm(){if(_T)return yx;_T=1;var e=k_();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return yx=t,yx}var xx,PT;function see(){if(PT)return xx;PT=1;var e=Mm(),t=Array.prototype,r=t.splice;function n(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var l=a.length-1;return o==l?a.pop():r.call(a,o,1),--this.size,!0}return xx=n,xx}var bx,AT;function lee(){if(AT)return bx;AT=1;var e=Mm();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return bx=t,bx}var wx,NT;function cee(){if(NT)return wx;NT=1;var e=Mm();function t(r){return e(this.__data__,r)>-1}return wx=t,wx}var Sx,ET;function uee(){if(ET)return Sx;ET=1;var e=Mm();function t(r,n){var i=this.__data__,a=e(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return Sx=t,Sx}var jx,OT;function Rm(){if(OT)return jx;OT=1;var e=oee(),t=see(),r=lee(),n=cee(),i=uee();function a(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var f=o[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,jx=a,jx}var _x,CT;function M_(){if(CT)return _x;CT=1;var e=Go(),t=li(),r=e(t,"Map");return _x=r,_x}var Px,TT;function fee(){if(TT)return Px;TT=1;var e=aee(),t=Rm(),r=M_();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Px=n,Px}var Ax,kT;function dee(){if(kT)return Ax;kT=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Ax=e,Ax}var Nx,MT;function Im(){if(MT)return Nx;MT=1;var e=dee();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return Nx=t,Nx}var Ex,RT;function hee(){if(RT)return Ex;RT=1;var e=Im();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Ex=t,Ex}var Ox,IT;function pee(){if(IT)return Ox;IT=1;var e=Im();function t(r){return e(this,r).get(r)}return Ox=t,Ox}var Cx,DT;function mee(){if(DT)return Cx;DT=1;var e=Im();function t(r){return e(this,r).has(r)}return Cx=t,Cx}var Tx,$T;function gee(){if($T)return Tx;$T=1;var e=Im();function t(r,n){var i=e(this,r),a=i.size;return i.set(r,n),this.size+=i.size==a?0:1,this}return Tx=t,Tx}var kx,LT;function R_(){if(LT)return kx;LT=1;var e=fee(),t=hee(),r=pee(),n=mee(),i=gee();function a(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var f=o[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,kx=a,kx}var Mx,BT;function M4(){if(BT)return Mx;BT=1;var e=R_(),t="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var o=arguments,l=i?i.apply(this,o):o[0],c=a.cache;if(c.has(l))return c.get(l);var f=n.apply(this,o);return a.cache=c.set(l,f)||c,f};return a.cache=new(r.Cache||e),a}return r.Cache=e,Mx=r,Mx}var Rx,FT;function vee(){if(FT)return Rx;FT=1;var e=M4(),t=500;function r(n){var i=e(n,function(o){return a.size===t&&a.clear(),o}),a=i.cache;return i}return Rx=r,Rx}var Ix,zT;function yee(){if(zT)return Ix;zT=1;var e=vee(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(o,l,c,f){a.push(c?f.replace(r,"$1"):l||o)}),a});return Ix=n,Ix}var Dx,VT;function I_(){if(VT)return Dx;VT=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,a=Array(i);++n<i;)a[n]=r(t[n],n,t);return a}return Dx=e,Dx}var $x,UT;function xee(){if(UT)return $x;UT=1;var e=$f(),t=I_(),r=$r(),n=Rl(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function o(l){if(typeof l=="string")return l;if(r(l))return t(l,o)+"";if(n(l))return a?a.call(l):"";var c=l+"";return c=="0"&&1/l==-1/0?"-0":c}return $x=o,$x}var Lx,qT;function R4(){if(qT)return Lx;qT=1;var e=xee();function t(r){return r==null?"":e(r)}return Lx=t,Lx}var Bx,WT;function I4(){if(WT)return Bx;WT=1;var e=$r(),t=C_(),r=yee(),n=R4();function i(a,o){return e(a)?a:t(a,o)?[a]:r(n(a))}return Bx=i,Bx}var Fx,HT;function Dm(){if(HT)return Fx;HT=1;var e=Rl();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Fx=t,Fx}var zx,GT;function D_(){if(GT)return zx;GT=1;var e=I4(),t=Dm();function r(n,i){i=e(i,n);for(var a=0,o=i.length;n!=null&&a<o;)n=n[t(i[a++])];return a&&a==o?n:void 0}return zx=r,zx}var Vx,KT;function D4(){if(KT)return Vx;KT=1;var e=D_();function t(r,n,i){var a=r==null?void 0:e(r,n);return a===void 0?i:a}return Vx=t,Vx}var bee=D4();const Hr=ct(bee);var Ux,YT;function wee(){if(YT)return Ux;YT=1;function e(t){return t==null}return Ux=e,Ux}var See=wee();const Qe=ct(See);var qx,XT;function jee(){if(XT)return qx;XT=1;var e=Ki(),t=$r(),r=Yi(),n="[object String]";function i(a){return typeof a=="string"||!t(a)&&r(a)&&e(a)==n}return qx=i,qx}var _ee=jee();const Io=ct(_ee);var Pee=T_();const qe=ct(Pee);var Aee=za();const Il=ct(Aee);var Wx={exports:{}},st={};/**
|
||
* @license React
|
||
* react-is.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var ZT;function Nee(){if(ZT)return st;ZT=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),w;w=Symbol.for("react.module.reference");function y(b){if(typeof b=="object"&&b!==null){var S=b.$$typeof;switch(S){case e:switch(b=b.type,b){case r:case i:case n:case f:case h:return b;default:switch(b=b&&b.$$typeof,b){case l:case o:case c:case g:case p:case a:return b;default:return S}}case t:return S}}}return st.ContextConsumer=o,st.ContextProvider=a,st.Element=e,st.ForwardRef=c,st.Fragment=r,st.Lazy=g,st.Memo=p,st.Portal=t,st.Profiler=i,st.StrictMode=n,st.Suspense=f,st.SuspenseList=h,st.isAsyncMode=function(){return!1},st.isConcurrentMode=function(){return!1},st.isContextConsumer=function(b){return y(b)===o},st.isContextProvider=function(b){return y(b)===a},st.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},st.isForwardRef=function(b){return y(b)===c},st.isFragment=function(b){return y(b)===r},st.isLazy=function(b){return y(b)===g},st.isMemo=function(b){return y(b)===p},st.isPortal=function(b){return y(b)===t},st.isProfiler=function(b){return y(b)===i},st.isStrictMode=function(b){return y(b)===n},st.isSuspense=function(b){return y(b)===f},st.isSuspenseList=function(b){return y(b)===h},st.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===r||b===i||b===n||b===f||b===h||b===v||typeof b=="object"&&b!==null&&(b.$$typeof===g||b.$$typeof===p||b.$$typeof===a||b.$$typeof===o||b.$$typeof===c||b.$$typeof===w||b.getModuleId!==void 0)},st.typeOf=y,st}var QT;function Eee(){return QT||(QT=1,Wx.exports=Nee()),Wx.exports}var Oee=Eee(),Hx,JT;function $4(){if(JT)return Hx;JT=1;var e=Ki(),t=Yi(),r="[object Number]";function n(i){return typeof i=="number"||t(i)&&e(i)==r}return Hx=n,Hx}var Gx,e2;function Cee(){if(e2)return Gx;e2=1;var e=$4();function t(r){return e(r)&&r!=+r}return Gx=t,Gx}var Tee=Cee();const Lf=ct(Tee);var kee=$4();const Mee=ct(kee);var jr=function(t){return t===0?0:t>0?1:-1},jo=function(t){return Io(t)&&t.indexOf("%")===t.length-1},ve=function(t){return Mee(t)&&!Lf(t)},Kt=function(t){return ve(t)||Io(t)},Ree=0,Bf=function(t){var r=++Ree;return"".concat(t||"").concat(r)},_r=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ve(t)&&!Io(t))return n;var a;if(jo(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return Lf(a)&&(a=n),i&&a>r&&(a=r),a},Na=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},Iee=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i<r;i++)if(!n[t[i]])n[t[i]]=!0;else return!0;return!1},_a=function(t,r){return ve(t)&&ve(r)?function(n){return t+n*(r-t)}:function(){return r}};function U1(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):Hr(n,t))===r})}var Dee=function(t,r){return ve(t)&&ve(r)?t-r:Io(t)&&Io(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function Ws(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function q1(e){"@babel/helpers - typeof";return q1=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},q1(e)}var $ee=["viewBox","children"],Lee=["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"],t2=["points","pathLength"],Kx={svg:$ee,polygon:t2,polyline:t2},$_=["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"],sp=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(j.isValidElement(t)&&(n=t.props),!Il(n))return null;var i={};return Object.keys(n).forEach(function(a){$_.includes(a)&&(i[a]=r||function(o){return n[a](n,o)})}),i},Bee=function(t,r,n){return function(i){return t(r,n,i),null}},Do=function(t,r,n){if(!Il(t)||q1(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];$_.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=Bee(o,r,n))}),i},Fee=["children"],zee=["children"];function r2(e,t){if(e==null)return{};var r=Vee(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Vee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var n2={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},ki=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},i2=null,Yx=null,L_=function e(t){if(t===i2&&Array.isArray(Yx))return Yx;var r=[];return j.Children.forEach(t,function(n){Qe(n)||(Oee.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Yx=r,i2=t,r};function un(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return ki(i)}):n=[ki(t)],L_(e).forEach(function(i){var a=Hr(i,"type.displayName")||Hr(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function Ur(e,t){var r=un(e,t);return r&&r[0]}var a2=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!ve(n)||n<=0||!ve(i)||i<=0)},Uee=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],qee=function(t){return t&&t.type&&Io(t.type)&&Uee.indexOf(t.type)>=0},Wee=function(t,r,n,i){var a,o=(a=Kx==null?void 0:Kx[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!qe(t)&&(i&&o.includes(r)||Lee.includes(r))||n&&$_.includes(r)},Fe=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(j.isValidElement(t)&&(i=t.props),!Il(i))return null;var a={};return Object.keys(i).forEach(function(o){var l;Wee((l=i)===null||l===void 0?void 0:l[o],o,r,n)&&(a[o]=i[o])}),a},W1=function e(t,r){if(t===r)return!0;var n=j.Children.count(t);if(n!==j.Children.count(r))return!1;if(n===0)return!0;if(n===1)return o2(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var a=t[i],o=r[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!o2(a,o))return!1}return!0},o2=function(t,r){if(Qe(t)&&Qe(r))return!0;if(!Qe(t)&&!Qe(r)){var n=t.props||{},i=n.children,a=r2(n,Fee),o=r.props||{},l=o.children,c=r2(o,zee);return i&&l?Ws(a,c)&&W1(i,l):!i&&!l?Ws(a,c):!1}return!1},s2=function(t,r){var n=[],i={};return L_(t).forEach(function(a,o){if(qee(a))n.push(a);else if(a){var l=ki(a.type),c=r[l]||{},f=c.handler,h=c.once;if(f&&(!h||!i[l])){var p=f(a,l,o);n.push(p),i[l]=!0}}}),n},Hee=function(t){var r=t&&t.type;return r&&n2[r]?n2[r]:null},Gee=function(t,r){return L_(r).indexOf(t)},Kee=["children","width","height","viewBox","className","style","title","desc"];function H1(){return H1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},H1.apply(this,arguments)}function Yee(e,t){if(e==null)return{};var r=Xee(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Xee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function G1(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,l=e.title,c=e.desc,f=Yee(e,Kee),h=i||{width:r,height:n,x:0,y:0},p=Ye("recharts-surface",a);return U.createElement("svg",H1({},Fe(f,!0,"svg"),{className:p,width:r,height:n,style:o,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height)}),U.createElement("title",null,l),U.createElement("desc",null,c),t)}var Zee=["children","className"];function K1(){return K1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},K1.apply(this,arguments)}function Qee(e,t){if(e==null)return{};var r=Jee(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Jee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var ft=U.forwardRef(function(e,t){var r=e.children,n=e.className,i=Qee(e,Zee),a=Ye("recharts-layer",n);return U.createElement("g",K1({className:a},Fe(i,!0),{ref:t}),r)}),kn=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a]},Xx,l2;function ete(){if(l2)return Xx;l2=1;function e(t,r,n){var i=-1,a=t.length;r<0&&(r=-r>a?0:a+r),n=n>a?a:n,n<0&&(n+=a),a=r>n?0:n-r>>>0,r>>>=0;for(var o=Array(a);++i<a;)o[i]=t[i+r];return o}return Xx=e,Xx}var Zx,c2;function tte(){if(c2)return Zx;c2=1;var e=ete();function t(r,n,i){var a=r.length;return i=i===void 0?a:i,!n&&i>=a?r:e(r,n,i)}return Zx=t,Zx}var Qx,u2;function L4(){if(u2)return Qx;u2=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,a="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+i+a+"]");function c(f){return l.test(f)}return Qx=c,Qx}var Jx,f2;function rte(){if(f2)return Jx;f2=1;function e(t){return t.split("")}return Jx=e,Jx}var e0,d2;function nte(){if(d2)return e0;d2=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,a="\\ufe0e\\ufe0f",o="["+e+"]",l="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",f="(?:"+l+"|"+c+")",h="[^"+e+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",w=f+"?",y="["+a+"]?",b="(?:"+v+"(?:"+[h,p,g].join("|")+")"+y+w+")*",S=y+w+b,A="(?:"+[h+l+"?",l,p,g,o].join("|")+")",_=RegExp(c+"(?="+c+")|"+A+S,"g");function C(N){return N.match(_)||[]}return e0=C,e0}var t0,h2;function ite(){if(h2)return t0;h2=1;var e=rte(),t=L4(),r=nte();function n(i){return t(i)?r(i):e(i)}return t0=n,t0}var r0,p2;function ate(){if(p2)return r0;p2=1;var e=tte(),t=L4(),r=ite(),n=R4();function i(a){return function(o){o=n(o);var l=t(o)?r(o):void 0,c=l?l[0]:o.charAt(0),f=l?e(l,1).join(""):o.slice(1);return c[a]()+f}}return r0=i,r0}var n0,m2;function ote(){if(m2)return n0;m2=1;var e=ate(),t=e("toUpperCase");return n0=t,n0}var ste=ote();const $m=ct(ste);function vt(e){return function(){return e}}const B4=Math.cos,lp=Math.sin,zn=Math.sqrt,cp=Math.PI,Lm=2*cp,Y1=Math.PI,X1=2*Y1,mo=1e-6,lte=X1-mo;function F4(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function cte(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return F4;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class ute{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?F4:cte(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,l=this._y1,c=n-t,f=i-r,h=o-t,p=l-r,g=h*h+p*p;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(g>mo)if(!(Math.abs(p*c-f*h)>mo)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let v=n-o,w=i-l,y=c*c+f*f,b=v*v+w*w,S=Math.sqrt(y),A=Math.sqrt(g),_=a*Math.tan((Y1-Math.acos((y+g-b)/(2*S*A)))/2),C=_/A,N=_/S;Math.abs(C-1)>mo&&this._append`L${t+C*h},${r+C*p}`,this._append`A${a},${a},0,0,${+(p*v>h*w)},${this._x1=t+N*c},${this._y1=r+N*f}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),c=n*Math.sin(i),f=t+l,h=r+c,p=1^o,g=o?i-a:a-i;this._x1===null?this._append`M${f},${h}`:(Math.abs(this._x1-f)>mo||Math.abs(this._y1-h)>mo)&&this._append`L${f},${h}`,n&&(g<0&&(g=g%X1+X1),g>lte?this._append`A${n},${n},0,1,${p},${t-l},${r-c}A${n},${n},0,1,${p},${this._x1=f},${this._y1=h}`:g>mo&&this._append`A${n},${n},0,${+(g>=Y1)},${p},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function B_(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new ute(t)}function F_(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function z4(e){this._context=e}z4.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 Bm(e){return new z4(e)}function V4(e){return e[0]}function U4(e){return e[1]}function q4(e,t){var r=vt(!0),n=null,i=Bm,a=null,o=B_(l);e=typeof e=="function"?e:e===void 0?V4:vt(e),t=typeof t=="function"?t:t===void 0?U4:vt(t);function l(c){var f,h=(c=F_(c)).length,p,g=!1,v;for(n==null&&(a=i(v=o())),f=0;f<=h;++f)!(f<h&&r(p=c[f],f,c))===g&&((g=!g)?a.lineStart():a.lineEnd()),g&&a.point(+e(p,f,c),+t(p,f,c));if(v)return a=null,v+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:vt(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:vt(+c),l):t},l.defined=function(c){return arguments.length?(r=typeof c=="function"?c:vt(!!c),l):r},l.curve=function(c){return arguments.length?(i=c,n!=null&&(a=i(n)),l):i},l.context=function(c){return arguments.length?(c==null?n=a=null:a=i(n=c),l):n},l}function yh(e,t,r){var n=null,i=vt(!0),a=null,o=Bm,l=null,c=B_(f);e=typeof e=="function"?e:e===void 0?V4:vt(+e),t=typeof t=="function"?t:vt(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?U4:vt(+r);function f(p){var g,v,w,y=(p=F_(p)).length,b,S=!1,A,_=new Array(y),C=new Array(y);for(a==null&&(l=o(A=c())),g=0;g<=y;++g){if(!(g<y&&i(b=p[g],g,p))===S)if(S=!S)v=g,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),w=g-1;w>=v;--w)l.point(_[w],C[w]);l.lineEnd(),l.areaEnd()}S&&(_[g]=+e(b,g,p),C[g]=+t(b,g,p),l.point(n?+n(b,g,p):_[g],r?+r(b,g,p):C[g]))}if(A)return l=null,A+""||null}function h(){return q4().defined(i).curve(o).context(a)}return f.x=function(p){return arguments.length?(e=typeof p=="function"?p:vt(+p),n=null,f):e},f.x0=function(p){return arguments.length?(e=typeof p=="function"?p:vt(+p),f):e},f.x1=function(p){return arguments.length?(n=p==null?null:typeof p=="function"?p:vt(+p),f):n},f.y=function(p){return arguments.length?(t=typeof p=="function"?p:vt(+p),r=null,f):t},f.y0=function(p){return arguments.length?(t=typeof p=="function"?p:vt(+p),f):t},f.y1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:vt(+p),f):r},f.lineX0=f.lineY0=function(){return h().x(e).y(t)},f.lineY1=function(){return h().x(e).y(r)},f.lineX1=function(){return h().x(n).y(t)},f.defined=function(p){return arguments.length?(i=typeof p=="function"?p:vt(!!p),f):i},f.curve=function(p){return arguments.length?(o=p,a!=null&&(l=o(a)),f):o},f.context=function(p){return arguments.length?(p==null?a=l=null:l=o(a=p),f):a},f}class W4{constructor(t,r){this._context=t,this._x=r}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,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function fte(e){return new W4(e,!0)}function dte(e){return new W4(e,!1)}const z_={draw(e,t){const r=zn(t/cp);e.moveTo(r,0),e.arc(0,0,r,0,Lm)}},hte={draw(e,t){const r=zn(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},H4=zn(1/3),pte=H4*2,mte={draw(e,t){const r=zn(t/pte),n=r*H4;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},gte={draw(e,t){const r=zn(t),n=-r/2;e.rect(n,n,r,r)}},vte=.8908130915292852,G4=lp(cp/10)/lp(7*cp/10),yte=lp(Lm/10)*G4,xte=-B4(Lm/10)*G4,bte={draw(e,t){const r=zn(t*vte),n=yte*r,i=xte*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=Lm*a/5,l=B4(o),c=lp(o);e.lineTo(c*r,-l*r),e.lineTo(l*n-c*i,c*n+l*i)}e.closePath()}},i0=zn(3),wte={draw(e,t){const r=-zn(t/(i0*3));e.moveTo(0,r*2),e.lineTo(-i0*r,-r),e.lineTo(i0*r,-r),e.closePath()}},rn=-.5,nn=zn(3)/2,Z1=1/zn(12),Ste=(Z1/2+1)*3,jte={draw(e,t){const r=zn(t/Ste),n=r/2,i=r*Z1,a=n,o=r*Z1+r,l=-a,c=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(l,c),e.lineTo(rn*n-nn*i,nn*n+rn*i),e.lineTo(rn*a-nn*o,nn*a+rn*o),e.lineTo(rn*l-nn*c,nn*l+rn*c),e.lineTo(rn*n+nn*i,rn*i-nn*n),e.lineTo(rn*a+nn*o,rn*o-nn*a),e.lineTo(rn*l+nn*c,rn*c-nn*l),e.closePath()}};function _te(e,t){let r=null,n=B_(i);e=typeof e=="function"?e:vt(e||z_),t=typeof t=="function"?t:vt(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:vt(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:vt(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function up(){}function fp(e,t,r){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+r)/6)}function K4(e){this._context=e}K4.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:fp(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:fp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Pte(e){return new K4(e)}function Y4(e){this._context=e}Y4.prototype={areaStart:up,areaEnd:up,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:fp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ate(e){return new Y4(e)}function X4(e){this._context=e}X4.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 r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:fp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Nte(e){return new X4(e)}function Z4(e){this._context=e}Z4.prototype={areaStart:up,areaEnd:up,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 Ete(e){return new Z4(e)}function g2(e){return e<0?-1:1}function v2(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),l=(a*i+o*n)/(n+i);return(g2(a)+g2(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function y2(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function a0(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,l=(a-n)/3;e._context.bezierCurveTo(n+l,i+l*t,a-l,o-l*r,a,o)}function dp(e){this._context=e}dp.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:a0(this,this._t0,y2(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 r=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,a0(this,y2(this,r=v2(this,e,t)),r);break;default:a0(this,this._t0,r=v2(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Q4(e){this._context=new J4(e)}(Q4.prototype=Object.create(dp.prototype)).point=function(e,t){dp.prototype.point.call(this,t,e)};function J4(e){this._context=e}J4.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,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function Ote(e){return new dp(e)}function Cte(e){return new Q4(e)}function e5(e){this._context=e}e5.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,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=x2(e),i=x2(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===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 x2(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Tte(e){return new e5(e)}function Fm(e,t){this._context=e,this._t=t}Fm.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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function kte(e){return new Fm(e,.5)}function Mte(e){return new Fm(e,0)}function Rte(e){return new Fm(e,1)}function Qs(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,l=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<l;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Q1(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function Ite(e,t){return e[t]}function Dte(e){const t=[];return t.key=e,t}function $te(){var e=vt([]),t=Q1,r=Qs,n=Ite;function i(a){var o=Array.from(e.apply(this,arguments),Dte),l,c=o.length,f=-1,h;for(const p of a)for(l=0,++f;l<c;++l)(o[l][f]=[0,+n(p,o[l].key,f,a)]).data=p;for(l=0,h=F_(t(o));l<c;++l)o[h[l]].index=l;return r(o,h),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:vt(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:vt(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?Q1:typeof a=="function"?a:vt(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??Qs,i):r},i}function Lte(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}Qs(e,t)}}function Bte(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,l=0;o<i;++o)l+=e[o][r][1]||0;n[r][1]+=n[r][0]=-l/2}Qs(e,t)}}function Fte(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var l=0,c=0,f=0;l<o;++l){for(var h=e[t[l]],p=h[n][1]||0,g=h[n-1][1]||0,v=(p-g)/2,w=0;w<l;++w){var y=e[t[w]],b=y[n][1]||0,S=y[n-1][1]||0;v+=b-S}c+=p,f+=v*p}i[n-1][1]+=i[n-1][0]=r,c&&(r-=f/c)}i[n-1][1]+=i[n-1][0]=r,Qs(e,t)}}function Lu(e){"@babel/helpers - typeof";return Lu=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},Lu(e)}var zte=["type","size","sizeType"];function J1(){return J1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},J1.apply(this,arguments)}function b2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function w2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?b2(Object(r),!0).forEach(function(n){Vte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vte(e,t,r){return t=Ute(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ute(e){var t=qte(e,"string");return Lu(t)=="symbol"?t:t+""}function qte(e,t){if(Lu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Lu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wte(e,t){if(e==null)return{};var r=Hte(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Hte(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var t5={symbolCircle:z_,symbolCross:hte,symbolDiamond:mte,symbolSquare:gte,symbolStar:bte,symbolTriangle:wte,symbolWye:jte},Gte=Math.PI/180,Kte=function(t){var r="symbol".concat($m(t));return t5[r]||z_},Yte=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*Gte;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},Xte=function(t,r){t5["symbol".concat($m(t))]=r},V_=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,l=o===void 0?"area":o,c=Wte(t,zte),f=w2(w2({},c),{},{type:n,size:a,sizeType:l}),h=function(){var b=Kte(n),S=_te().type(b).size(Yte(a,l,n));return S()},p=f.className,g=f.cx,v=f.cy,w=Fe(f,!0);return g===+g&&v===+v&&a===+a?U.createElement("path",J1({},w,{className:Ye("recharts-symbols",p),transform:"translate(".concat(g,", ").concat(v,")"),d:h()})):null};V_.registerSymbol=Xte;function Js(e){"@babel/helpers - typeof";return Js=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},Js(e)}function eS(){return eS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},eS.apply(this,arguments)}function S2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Zte(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?S2(Object(r),!0).forEach(function(n){Bu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jte(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n5(n.key),n)}}function ere(e,t,r){return t&&Jte(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function tre(e,t,r){return t=hp(t),rre(e,r5()?Reflect.construct(t,r||[],hp(e).constructor):t.apply(e,r))}function rre(e,t){if(t&&(Js(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nre(e)}function nre(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(r5=function(){return!!e})()}function hp(e){return hp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},hp(e)}function ire(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tS(e,t)}function tS(e,t){return tS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},tS(e,t)}function Bu(e,t,r){return t=n5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n5(e){var t=are(e,"string");return Js(t)=="symbol"?t:t+""}function are(e,t){if(Js(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Js(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var _n=32,U_=function(e){function t(){return Qte(this,t),tre(this,t,arguments)}return ire(t,e),ere(t,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=_n/2,o=_n/6,l=_n/3,c=n.inactive?i:n.color;if(n.type==="plainline")return U.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:_n,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return U.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(a,"h").concat(l,`
|
||
A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(a,`
|
||
H`).concat(_n,"M").concat(2*l,",").concat(a,`
|
||
A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return U.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(_n/8,"h").concat(_n,"v").concat(_n*3/4,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(U.isValidElement(n.legendIcon)){var f=Zte({},n);return delete f.legendIcon,U.cloneElement(n.legendIcon,f)}return U.createElement(V_,{fill:c,cx:a,cy:a,size:_n,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,a=i.payload,o=i.iconSize,l=i.layout,c=i.formatter,f=i.inactiveColor,h={x:0,y:0,width:_n,height:_n},p={display:l==="horizontal"?"inline-block":"block",marginRight:10},g={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(v,w){var y=v.formatter||c,b=Ye(Bu(Bu({"recharts-legend-item":!0},"legend-item-".concat(w),!0),"inactive",v.inactive));if(v.type==="none")return null;var S=qe(v.value)?null:v.value;kn(!qe(v.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var A=v.inactive?f:v.color;return U.createElement("li",eS({className:b,style:p,key:"legend-item-".concat(w)},Do(n.props,v,w)),U.createElement(G1,{width:o,height:o,viewBox:h,style:g},n.renderIcon(v)),U.createElement("span",{className:"recharts-legend-item-text",style:{color:A}},y?y(S,v,w):S))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var l={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return U.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])}(j.PureComponent);Bu(U_,"displayName","Legend");Bu(U_,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var o0,j2;function ore(){if(j2)return o0;j2=1;var e=Rm();function t(){this.__data__=new e,this.size=0}return o0=t,o0}var s0,_2;function sre(){if(_2)return s0;_2=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return s0=e,s0}var l0,P2;function lre(){if(P2)return l0;P2=1;function e(t){return this.__data__.get(t)}return l0=e,l0}var c0,A2;function cre(){if(A2)return c0;A2=1;function e(t){return this.__data__.has(t)}return c0=e,c0}var u0,N2;function ure(){if(N2)return u0;N2=1;var e=Rm(),t=M_(),r=R_(),n=200;function i(a,o){var l=this.__data__;if(l instanceof e){var c=l.__data__;if(!t||c.length<n-1)return c.push([a,o]),this.size=++l.size,this;l=this.__data__=new r(c)}return l.set(a,o),this.size=l.size,this}return u0=i,u0}var f0,E2;function i5(){if(E2)return f0;E2=1;var e=Rm(),t=ore(),r=sre(),n=lre(),i=cre(),a=ure();function o(l){var c=this.__data__=new e(l);this.size=c.size}return o.prototype.clear=t,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=i,o.prototype.set=a,f0=o,f0}var d0,O2;function fre(){if(O2)return d0;O2=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return d0=t,d0}var h0,C2;function dre(){if(C2)return h0;C2=1;function e(t){return this.__data__.has(t)}return h0=e,h0}var p0,T2;function a5(){if(T2)return p0;T2=1;var e=R_(),t=fre(),r=dre();function n(i){var a=-1,o=i==null?0:i.length;for(this.__data__=new e;++a<o;)this.add(i[a])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,p0=n,p0}var m0,k2;function o5(){if(k2)return m0;k2=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(t[n],n,t))return!0;return!1}return m0=e,m0}var g0,M2;function s5(){if(M2)return g0;M2=1;function e(t,r){return t.has(r)}return g0=e,g0}var v0,R2;function l5(){if(R2)return v0;R2=1;var e=a5(),t=o5(),r=s5(),n=1,i=2;function a(o,l,c,f,h,p){var g=c&n,v=o.length,w=l.length;if(v!=w&&!(g&&w>v))return!1;var y=p.get(o),b=p.get(l);if(y&&b)return y==l&&b==o;var S=-1,A=!0,_=c&i?new e:void 0;for(p.set(o,l),p.set(l,o);++S<v;){var C=o[S],N=l[S];if(f)var O=g?f(N,C,S,l,o,p):f(C,N,S,o,l,p);if(O!==void 0){if(O)continue;A=!1;break}if(_){if(!t(l,function(T,k){if(!r(_,k)&&(C===T||h(C,T,c,f,p)))return _.push(k)})){A=!1;break}}else if(!(C===N||h(C,N,c,f,p))){A=!1;break}}return p.delete(o),p.delete(l),A}return v0=a,v0}var y0,I2;function hre(){if(I2)return y0;I2=1;var e=li(),t=e.Uint8Array;return y0=t,y0}var x0,D2;function pre(){if(D2)return x0;D2=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,a){n[++r]=[a,i]}),n}return x0=e,x0}var b0,$2;function q_(){if($2)return b0;$2=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return b0=e,b0}var w0,L2;function mre(){if(L2)return w0;L2=1;var e=$f(),t=hre(),r=k_(),n=l5(),i=pre(),a=q_(),o=1,l=2,c="[object Boolean]",f="[object Date]",h="[object Error]",p="[object Map]",g="[object Number]",v="[object RegExp]",w="[object Set]",y="[object String]",b="[object Symbol]",S="[object ArrayBuffer]",A="[object DataView]",_=e?e.prototype:void 0,C=_?_.valueOf:void 0;function N(O,T,k,R,F,I,L){switch(k){case A:if(O.byteLength!=T.byteLength||O.byteOffset!=T.byteOffset)return!1;O=O.buffer,T=T.buffer;case S:return!(O.byteLength!=T.byteLength||!I(new t(O),new t(T)));case c:case f:case g:return r(+O,+T);case h:return O.name==T.name&&O.message==T.message;case v:case y:return O==T+"";case p:var V=i;case w:var Y=R&o;if(V||(V=a),O.size!=T.size&&!Y)return!1;var K=L.get(O);if(K)return K==T;R|=l,L.set(O,T);var z=n(V(O),V(T),R,F,I,L);return L.delete(O),z;case b:if(C)return C.call(O)==C.call(T)}return!1}return w0=N,w0}var S0,B2;function c5(){if(B2)return S0;B2=1;function e(t,r){for(var n=-1,i=r.length,a=t.length;++n<i;)t[a+n]=r[n];return t}return S0=e,S0}var j0,F2;function gre(){if(F2)return j0;F2=1;var e=c5(),t=$r();function r(n,i,a){var o=i(n);return t(n)?o:e(o,a(n))}return j0=r,j0}var _0,z2;function vre(){if(z2)return _0;z2=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,a=0,o=[];++n<i;){var l=t[n];r(l,n,t)&&(o[a++]=l)}return o}return _0=e,_0}var P0,V2;function yre(){if(V2)return P0;V2=1;function e(){return[]}return P0=e,P0}var A0,U2;function xre(){if(U2)return A0;U2=1;var e=vre(),t=yre(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(o){return o==null?[]:(o=Object(o),e(i(o),function(l){return n.call(o,l)}))}:t;return A0=a,A0}var N0,q2;function bre(){if(q2)return N0;q2=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return N0=e,N0}var E0,W2;function wre(){if(W2)return E0;W2=1;var e=Ki(),t=Yi(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return E0=n,E0}var O0,H2;function W_(){if(H2)return O0;H2=1;var e=wre(),t=Yi(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,a=e(function(){return arguments}())?e:function(o){return t(o)&&n.call(o,"callee")&&!i.call(o,"callee")};return O0=a,O0}var nu={exports:{}},C0,G2;function Sre(){if(G2)return C0;G2=1;function e(){return!1}return C0=e,C0}nu.exports;var K2;function u5(){return K2||(K2=1,function(e,t){var r=li(),n=Sre(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,l=o?r.Buffer:void 0,c=l?l.isBuffer:void 0,f=c||n;e.exports=f}(nu,nu.exports)),nu.exports}var T0,Y2;function H_(){if(Y2)return T0;Y2=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,i){var a=typeof n;return i=i??e,!!i&&(a=="number"||a!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<i}return T0=r,T0}var k0,X2;function G_(){if(X2)return k0;X2=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return k0=t,k0}var M0,Z2;function jre(){if(Z2)return M0;Z2=1;var e=Ki(),t=G_(),r=Yi(),n="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",l="[object Error]",c="[object Function]",f="[object Map]",h="[object Number]",p="[object Object]",g="[object RegExp]",v="[object Set]",w="[object String]",y="[object WeakMap]",b="[object ArrayBuffer]",S="[object DataView]",A="[object Float32Array]",_="[object Float64Array]",C="[object Int8Array]",N="[object Int16Array]",O="[object Int32Array]",T="[object Uint8Array]",k="[object Uint8ClampedArray]",R="[object Uint16Array]",F="[object Uint32Array]",I={};I[A]=I[_]=I[C]=I[N]=I[O]=I[T]=I[k]=I[R]=I[F]=!0,I[n]=I[i]=I[b]=I[a]=I[S]=I[o]=I[l]=I[c]=I[f]=I[h]=I[p]=I[g]=I[v]=I[w]=I[y]=!1;function L(V){return r(V)&&t(V.length)&&!!I[e(V)]}return M0=L,M0}var R0,Q2;function f5(){if(Q2)return R0;Q2=1;function e(t){return function(r){return t(r)}}return R0=e,R0}var iu={exports:{}};iu.exports;var J2;function _re(){return J2||(J2=1,function(e,t){var r=T4(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,l=function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();e.exports=l}(iu,iu.exports)),iu.exports}var I0,ek;function d5(){if(ek)return I0;ek=1;var e=jre(),t=f5(),r=_re(),n=r&&r.isTypedArray,i=n?t(n):e;return I0=i,I0}var D0,tk;function Pre(){if(tk)return D0;tk=1;var e=bre(),t=W_(),r=$r(),n=u5(),i=H_(),a=d5(),o=Object.prototype,l=o.hasOwnProperty;function c(f,h){var p=r(f),g=!p&&t(f),v=!p&&!g&&n(f),w=!p&&!g&&!v&&a(f),y=p||g||v||w,b=y?e(f.length,String):[],S=b.length;for(var A in f)(h||l.call(f,A))&&!(y&&(A=="length"||v&&(A=="offset"||A=="parent")||w&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||i(A,S)))&&b.push(A);return b}return D0=c,D0}var $0,rk;function Are(){if(rk)return $0;rk=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return $0=t,$0}var L0,nk;function h5(){if(nk)return L0;nk=1;function e(t,r){return function(n){return t(r(n))}}return L0=e,L0}var B0,ik;function Nre(){if(ik)return B0;ik=1;var e=h5(),t=e(Object.keys,Object);return B0=t,B0}var F0,ak;function Ere(){if(ak)return F0;ak=1;var e=Are(),t=Nre(),r=Object.prototype,n=r.hasOwnProperty;function i(a){if(!e(a))return t(a);var o=[];for(var l in Object(a))n.call(a,l)&&l!="constructor"&&o.push(l);return o}return F0=i,F0}var z0,ok;function Ff(){if(ok)return z0;ok=1;var e=T_(),t=G_();function r(n){return n!=null&&t(n.length)&&!e(n)}return z0=r,z0}var V0,sk;function zm(){if(sk)return V0;sk=1;var e=Pre(),t=Ere(),r=Ff();function n(i){return r(i)?e(i):t(i)}return V0=n,V0}var U0,lk;function Ore(){if(lk)return U0;lk=1;var e=gre(),t=xre(),r=zm();function n(i){return e(i,r,t)}return U0=n,U0}var q0,ck;function Cre(){if(ck)return q0;ck=1;var e=Ore(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(a,o,l,c,f,h){var p=l&t,g=e(a),v=g.length,w=e(o),y=w.length;if(v!=y&&!p)return!1;for(var b=v;b--;){var S=g[b];if(!(p?S in o:n.call(o,S)))return!1}var A=h.get(a),_=h.get(o);if(A&&_)return A==o&&_==a;var C=!0;h.set(a,o),h.set(o,a);for(var N=p;++b<v;){S=g[b];var O=a[S],T=o[S];if(c)var k=p?c(T,O,S,o,a,h):c(O,T,S,a,o,h);if(!(k===void 0?O===T||f(O,T,l,c,h):k)){C=!1;break}N||(N=S=="constructor")}if(C&&!N){var R=a.constructor,F=o.constructor;R!=F&&"constructor"in a&&"constructor"in o&&!(typeof R=="function"&&R instanceof R&&typeof F=="function"&&F instanceof F)&&(C=!1)}return h.delete(a),h.delete(o),C}return q0=i,q0}var W0,uk;function Tre(){if(uk)return W0;uk=1;var e=Go(),t=li(),r=e(t,"DataView");return W0=r,W0}var H0,fk;function kre(){if(fk)return H0;fk=1;var e=Go(),t=li(),r=e(t,"Promise");return H0=r,H0}var G0,dk;function p5(){if(dk)return G0;dk=1;var e=Go(),t=li(),r=e(t,"Set");return G0=r,G0}var K0,hk;function Mre(){if(hk)return K0;hk=1;var e=Go(),t=li(),r=e(t,"WeakMap");return K0=r,K0}var Y0,pk;function Rre(){if(pk)return Y0;pk=1;var e=Tre(),t=M_(),r=kre(),n=p5(),i=Mre(),a=Ki(),o=k4(),l="[object Map]",c="[object Object]",f="[object Promise]",h="[object Set]",p="[object WeakMap]",g="[object DataView]",v=o(e),w=o(t),y=o(r),b=o(n),S=o(i),A=a;return(e&&A(new e(new ArrayBuffer(1)))!=g||t&&A(new t)!=l||r&&A(r.resolve())!=f||n&&A(new n)!=h||i&&A(new i)!=p)&&(A=function(_){var C=a(_),N=C==c?_.constructor:void 0,O=N?o(N):"";if(O)switch(O){case v:return g;case w:return l;case y:return f;case b:return h;case S:return p}return C}),Y0=A,Y0}var X0,mk;function Ire(){if(mk)return X0;mk=1;var e=i5(),t=l5(),r=mre(),n=Cre(),i=Rre(),a=$r(),o=u5(),l=d5(),c=1,f="[object Arguments]",h="[object Array]",p="[object Object]",g=Object.prototype,v=g.hasOwnProperty;function w(y,b,S,A,_,C){var N=a(y),O=a(b),T=N?h:i(y),k=O?h:i(b);T=T==f?p:T,k=k==f?p:k;var R=T==p,F=k==p,I=T==k;if(I&&o(y)){if(!o(b))return!1;N=!0,R=!1}if(I&&!R)return C||(C=new e),N||l(y)?t(y,b,S,A,_,C):r(y,b,T,S,A,_,C);if(!(S&c)){var L=R&&v.call(y,"__wrapped__"),V=F&&v.call(b,"__wrapped__");if(L||V){var Y=L?y.value():y,K=V?b.value():b;return C||(C=new e),_(Y,K,S,A,C)}}return I?(C||(C=new e),n(y,b,S,A,_,C)):!1}return X0=w,X0}var Z0,gk;function K_(){if(gk)return Z0;gk=1;var e=Ire(),t=Yi();function r(n,i,a,o,l){return n===i?!0:n==null||i==null||!t(n)&&!t(i)?n!==n&&i!==i:e(n,i,a,o,r,l)}return Z0=r,Z0}var Q0,vk;function Dre(){if(vk)return Q0;vk=1;var e=i5(),t=K_(),r=1,n=2;function i(a,o,l,c){var f=l.length,h=f,p=!c;if(a==null)return!h;for(a=Object(a);f--;){var g=l[f];if(p&&g[2]?g[1]!==a[g[0]]:!(g[0]in a))return!1}for(;++f<h;){g=l[f];var v=g[0],w=a[v],y=g[1];if(p&&g[2]){if(w===void 0&&!(v in a))return!1}else{var b=new e;if(c)var S=c(w,y,v,a,o,b);if(!(S===void 0?t(y,w,r|n,c,b):S))return!1}}return!0}return Q0=i,Q0}var J0,yk;function m5(){if(yk)return J0;yk=1;var e=za();function t(r){return r===r&&!e(r)}return J0=t,J0}var eb,xk;function $re(){if(xk)return eb;xk=1;var e=m5(),t=zm();function r(n){for(var i=t(n),a=i.length;a--;){var o=i[a],l=n[o];i[a]=[o,l,e(l)]}return i}return eb=r,eb}var tb,bk;function g5(){if(bk)return tb;bk=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return tb=e,tb}var rb,wk;function Lre(){if(wk)return rb;wk=1;var e=Dre(),t=$re(),r=g5();function n(i){var a=t(i);return a.length==1&&a[0][2]?r(a[0][0],a[0][1]):function(o){return o===i||e(o,i,a)}}return rb=n,rb}var nb,Sk;function Bre(){if(Sk)return nb;Sk=1;function e(t,r){return t!=null&&r in Object(t)}return nb=e,nb}var ib,jk;function Fre(){if(jk)return ib;jk=1;var e=I4(),t=W_(),r=$r(),n=H_(),i=G_(),a=Dm();function o(l,c,f){c=e(c,l);for(var h=-1,p=c.length,g=!1;++h<p;){var v=a(c[h]);if(!(g=l!=null&&f(l,v)))break;l=l[v]}return g||++h!=p?g:(p=l==null?0:l.length,!!p&&i(p)&&n(v,p)&&(r(l)||t(l)))}return ib=o,ib}var ab,_k;function zre(){if(_k)return ab;_k=1;var e=Bre(),t=Fre();function r(n,i){return n!=null&&t(n,i,e)}return ab=r,ab}var ob,Pk;function Vre(){if(Pk)return ob;Pk=1;var e=K_(),t=D4(),r=zre(),n=C_(),i=m5(),a=g5(),o=Dm(),l=1,c=2;function f(h,p){return n(h)&&i(p)?a(o(h),p):function(g){var v=t(g,h);return v===void 0&&v===p?r(g,h):e(p,v,l|c)}}return ob=f,ob}var sb,Ak;function Dl(){if(Ak)return sb;Ak=1;function e(t){return t}return sb=e,sb}var lb,Nk;function Ure(){if(Nk)return lb;Nk=1;function e(t){return function(r){return r==null?void 0:r[t]}}return lb=e,lb}var cb,Ek;function qre(){if(Ek)return cb;Ek=1;var e=D_();function t(r){return function(n){return e(n,r)}}return cb=t,cb}var ub,Ok;function Wre(){if(Ok)return ub;Ok=1;var e=Ure(),t=qre(),r=C_(),n=Dm();function i(a){return r(a)?e(n(a)):t(a)}return ub=i,ub}var fb,Ck;function ci(){if(Ck)return fb;Ck=1;var e=Lre(),t=Vre(),r=Dl(),n=$r(),i=Wre();function a(o){return typeof o=="function"?o:o==null?r:typeof o=="object"?n(o)?t(o[0],o[1]):e(o):i(o)}return fb=a,fb}var db,Tk;function v5(){if(Tk)return db;Tk=1;function e(t,r,n,i){for(var a=t.length,o=n+(i?1:-1);i?o--:++o<a;)if(r(t[o],o,t))return o;return-1}return db=e,db}var hb,kk;function Hre(){if(kk)return hb;kk=1;function e(t){return t!==t}return hb=e,hb}var pb,Mk;function Gre(){if(Mk)return pb;Mk=1;function e(t,r,n){for(var i=n-1,a=t.length;++i<a;)if(t[i]===r)return i;return-1}return pb=e,pb}var mb,Rk;function Kre(){if(Rk)return mb;Rk=1;var e=v5(),t=Hre(),r=Gre();function n(i,a,o){return a===a?r(i,a,o):e(i,t,o)}return mb=n,mb}var gb,Ik;function Yre(){if(Ik)return gb;Ik=1;var e=Kre();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return gb=t,gb}var vb,Dk;function Xre(){if(Dk)return vb;Dk=1;function e(t,r,n){for(var i=-1,a=t==null?0:t.length;++i<a;)if(n(r,t[i]))return!0;return!1}return vb=e,vb}var yb,$k;function Zre(){if($k)return yb;$k=1;function e(){}return yb=e,yb}var xb,Lk;function Qre(){if(Lk)return xb;Lk=1;var e=p5(),t=Zre(),r=q_(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(a){return new e(a)}:t;return xb=i,xb}var bb,Bk;function Jre(){if(Bk)return bb;Bk=1;var e=a5(),t=Yre(),r=Xre(),n=s5(),i=Qre(),a=q_(),o=200;function l(c,f,h){var p=-1,g=t,v=c.length,w=!0,y=[],b=y;if(h)w=!1,g=r;else if(v>=o){var S=f?null:i(c);if(S)return a(S);w=!1,g=n,b=new e}else b=f?[]:y;e:for(;++p<v;){var A=c[p],_=f?f(A):A;if(A=h||A!==0?A:0,w&&_===_){for(var C=b.length;C--;)if(b[C]===_)continue e;f&&b.push(_),y.push(A)}else g(b,_,h)||(b!==y&&b.push(_),y.push(A))}return y}return bb=l,bb}var wb,Fk;function ene(){if(Fk)return wb;Fk=1;var e=ci(),t=Jre();function r(n,i){return n&&n.length?t(n,e(i,2)):[]}return wb=r,wb}var tne=ene();const zk=ct(tne);function y5(e,t,r){return t===!0?zk(e,r):qe(t)?zk(e,t):e}function el(e){"@babel/helpers - typeof";return el=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},el(e)}var rne=["ref"];function Vk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _i(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vk(Object(r),!0).forEach(function(n){Vm(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uk(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,b5(n.key),n)}}function ine(e,t,r){return t&&Uk(e.prototype,t),r&&Uk(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ane(e,t,r){return t=pp(t),one(e,x5()?Reflect.construct(t,r||[],pp(e).constructor):t.apply(e,r))}function one(e,t){if(t&&(el(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sne(e)}function sne(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(x5=function(){return!!e})()}function pp(e){return pp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},pp(e)}function lne(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rS(e,t)}function rS(e,t){return rS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},rS(e,t)}function Vm(e,t,r){return t=b5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b5(e){var t=cne(e,"string");return el(t)=="symbol"?t:t+""}function cne(e,t){if(el(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(el(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function une(e,t){if(e==null)return{};var r=fne(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function fne(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function dne(e){return e.value}function hne(e,t){if(U.isValidElement(e))return U.cloneElement(e,t);if(typeof e=="function")return U.createElement(e,t);t.ref;var r=une(t,rne);return U.createElement(U_,r)}var qk=1,Oa=function(e){function t(){var r;nne(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=ane(this,t,[].concat(i)),Vm(r,"lastBoundingBox",{width:-1,height:-1}),r}return lne(t,e),ine(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>qk||Math.abs(i.height-this.lastBoundingBox.height)>qk)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?_i({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,l=i.verticalAlign,c=i.margin,f=i.chartWidth,h=i.chartHeight,p,g;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var v=this.getBBoxSnapshot();p={left:((f||0)-v.width)/2}}else p=o==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(l==="middle"){var w=this.getBBoxSnapshot();g={top:((h||0)-w.height)/2}}else g=l==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return _i(_i({},p),g)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,l=i.height,c=i.wrapperStyle,f=i.payloadUniqBy,h=i.payload,p=_i(_i({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(c)),c);return U.createElement("div",{className:"recharts-legend-wrapper",style:p,ref:function(v){n.wrapperNode=v}},hne(a,_i(_i({},this.props),{},{payload:y5(h,f,dne)})))}}],[{key:"getWithHeight",value:function(n,i){var a=_i(_i({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&ve(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(j.PureComponent);Vm(Oa,"displayName","Legend");Vm(Oa,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Sb,Wk;function pne(){if(Wk)return Sb;Wk=1;var e=$f(),t=W_(),r=$r(),n=e?e.isConcatSpreadable:void 0;function i(a){return r(a)||t(a)||!!(n&&a&&a[n])}return Sb=i,Sb}var jb,Hk;function w5(){if(Hk)return jb;Hk=1;var e=c5(),t=pne();function r(n,i,a,o,l){var c=-1,f=n.length;for(a||(a=t),l||(l=[]);++c<f;){var h=n[c];i>0&&a(h)?i>1?r(h,i-1,a,o,l):e(l,h):o||(l[l.length]=h)}return l}return jb=r,jb}var _b,Gk;function mne(){if(Gk)return _b;Gk=1;function e(t){return function(r,n,i){for(var a=-1,o=Object(r),l=i(r),c=l.length;c--;){var f=l[t?c:++a];if(n(o[f],f,o)===!1)break}return r}}return _b=e,_b}var Pb,Kk;function gne(){if(Kk)return Pb;Kk=1;var e=mne(),t=e();return Pb=t,Pb}var Ab,Yk;function S5(){if(Yk)return Ab;Yk=1;var e=gne(),t=zm();function r(n,i){return n&&e(n,i,t)}return Ab=r,Ab}var Nb,Xk;function vne(){if(Xk)return Nb;Xk=1;var e=Ff();function t(r,n){return function(i,a){if(i==null)return i;if(!e(i))return r(i,a);for(var o=i.length,l=n?o:-1,c=Object(i);(n?l--:++l<o)&&a(c[l],l,c)!==!1;);return i}}return Nb=t,Nb}var Eb,Zk;function Y_(){if(Zk)return Eb;Zk=1;var e=S5(),t=vne(),r=t(e);return Eb=r,Eb}var Ob,Qk;function j5(){if(Qk)return Ob;Qk=1;var e=Y_(),t=Ff();function r(n,i){var a=-1,o=t(n)?Array(n.length):[];return e(n,function(l,c,f){o[++a]=i(l,c,f)}),o}return Ob=r,Ob}var Cb,Jk;function yne(){if(Jk)return Cb;Jk=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return Cb=e,Cb}var Tb,eM;function xne(){if(eM)return Tb;eM=1;var e=Rl();function t(r,n){if(r!==n){var i=r!==void 0,a=r===null,o=r===r,l=e(r),c=n!==void 0,f=n===null,h=n===n,p=e(n);if(!f&&!p&&!l&&r>n||l&&c&&h&&!f&&!p||a&&c&&h||!i&&h||!o)return 1;if(!a&&!l&&!p&&r<n||p&&i&&o&&!a&&!l||f&&i&&o||!c&&o||!h)return-1}return 0}return Tb=t,Tb}var kb,tM;function bne(){if(tM)return kb;tM=1;var e=xne();function t(r,n,i){for(var a=-1,o=r.criteria,l=n.criteria,c=o.length,f=i.length;++a<c;){var h=e(o[a],l[a]);if(h){if(a>=f)return h;var p=i[a];return h*(p=="desc"?-1:1)}}return r.index-n.index}return kb=t,kb}var Mb,rM;function wne(){if(rM)return Mb;rM=1;var e=I_(),t=D_(),r=ci(),n=j5(),i=yne(),a=f5(),o=bne(),l=Dl(),c=$r();function f(h,p,g){p.length?p=e(p,function(y){return c(y)?function(b){return t(b,y.length===1?y[0]:y)}:y}):p=[l];var v=-1;p=e(p,a(r));var w=n(h,function(y,b,S){var A=e(p,function(_){return _(y)});return{criteria:A,index:++v,value:y}});return i(w,function(y,b){return o(y,b,g)})}return Mb=f,Mb}var Rb,nM;function Sne(){if(nM)return Rb;nM=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return Rb=e,Rb}var Ib,iM;function jne(){if(iM)return Ib;iM=1;var e=Sne(),t=Math.max;function r(n,i,a){return i=t(i===void 0?n.length-1:i,0),function(){for(var o=arguments,l=-1,c=t(o.length-i,0),f=Array(c);++l<c;)f[l]=o[i+l];l=-1;for(var h=Array(i+1);++l<i;)h[l]=o[l];return h[i]=a(f),e(n,this,h)}}return Ib=r,Ib}var Db,aM;function _ne(){if(aM)return Db;aM=1;function e(t){return function(){return t}}return Db=e,Db}var $b,oM;function _5(){if(oM)return $b;oM=1;var e=Go(),t=function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}}();return $b=t,$b}var Lb,sM;function Pne(){if(sM)return Lb;sM=1;var e=_ne(),t=_5(),r=Dl(),n=t?function(i,a){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:r;return Lb=n,Lb}var Bb,lM;function Ane(){if(lM)return Bb;lM=1;var e=800,t=16,r=Date.now;function n(i){var a=0,o=0;return function(){var l=r(),c=t-(l-o);if(o=l,c>0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return Bb=n,Bb}var Fb,cM;function Nne(){if(cM)return Fb;cM=1;var e=Pne(),t=Ane(),r=t(e);return Fb=r,Fb}var zb,uM;function Ene(){if(uM)return zb;uM=1;var e=Dl(),t=jne(),r=Nne();function n(i,a){return r(t(i,a,e),i+"")}return zb=n,zb}var Vb,fM;function Um(){if(fM)return Vb;fM=1;var e=k_(),t=Ff(),r=H_(),n=za();function i(a,o,l){if(!n(l))return!1;var c=typeof o;return(c=="number"?t(l)&&r(o,l.length):c=="string"&&o in l)?e(l[o],a):!1}return Vb=i,Vb}var Ub,dM;function One(){if(dM)return Ub;dM=1;var e=w5(),t=wne(),r=Ene(),n=Um(),i=r(function(a,o){if(a==null)return[];var l=o.length;return l>1&&n(a,o[0],o[1])?o=[]:l>2&&n(o[0],o[1],o[2])&&(o=[o[0]]),t(a,e(o,1),[])});return Ub=i,Ub}var Cne=One();const X_=ct(Cne);function Fu(e){"@babel/helpers - typeof";return Fu=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},Fu(e)}function nS(){return nS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nS.apply(this,arguments)}function Tne(e,t){return Ine(e)||Rne(e,t)||Mne(e,t)||kne()}function kne(){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 Mne(e,t){if(e){if(typeof e=="string")return hM(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hM(e,t)}}function hM(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Rne(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function Ine(e){if(Array.isArray(e))return e}function pM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pM(Object(r),!0).forEach(function(n){Dne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Dne(e,t,r){return t=$ne(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $ne(e){var t=Lne(e,"string");return Fu(t)=="symbol"?t:t+""}function Lne(e,t){if(Fu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Fu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bne(e){return Array.isArray(e)&&Kt(e[0])&&Kt(e[1])?e.join(" ~ "):e}var Fne=function(t){var r=t.separator,n=r===void 0?" : ":r,i=t.contentStyle,a=i===void 0?{}:i,o=t.itemStyle,l=o===void 0?{}:o,c=t.labelStyle,f=c===void 0?{}:c,h=t.payload,p=t.formatter,g=t.itemSorter,v=t.wrapperClassName,w=t.labelClassName,y=t.label,b=t.labelFormatter,S=t.accessibilityLayer,A=S===void 0?!1:S,_=function(){if(h&&h.length){var L={padding:0,margin:0},V=(g?X_(h,g):h).map(function(Y,K){if(Y.type==="none")return null;var z=qb({display:"block",paddingTop:4,paddingBottom:4,color:Y.color||"#000"},l),G=Y.formatter||p||Bne,D=Y.value,q=Y.name,Q=D,$=q;if(G&&Q!=null&&$!=null){var H=G(D,q,Y,K,h);if(Array.isArray(H)){var re=Tne(H,2);Q=re[0],$=re[1]}else Q=H}return U.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(K),style:z},Kt($)?U.createElement("span",{className:"recharts-tooltip-item-name"},$):null,Kt($)?U.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,U.createElement("span",{className:"recharts-tooltip-item-value"},Q),U.createElement("span",{className:"recharts-tooltip-item-unit"},Y.unit||""))});return U.createElement("ul",{className:"recharts-tooltip-item-list",style:L},V)}return null},C=qb({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),N=qb({margin:0},f),O=!Qe(y),T=O?y:"",k=Ye("recharts-default-tooltip",v),R=Ye("recharts-tooltip-label",w);O&&b&&h!==void 0&&h!==null&&(T=b(y,h));var F=A?{role:"status","aria-live":"assertive"}:{};return U.createElement("div",nS({className:k,style:C},F),U.createElement("p",{className:R,style:N},U.isValidElement(T)?T:"".concat(T)),_())};function zu(e){"@babel/helpers - typeof";return zu=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},zu(e)}function xh(e,t,r){return t=zne(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zne(e){var t=Vne(e,"string");return zu(t)=="symbol"?t:t+""}function Vne(e,t){if(zu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(zu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Hc="recharts-tooltip-wrapper",Une={visibility:"hidden"};function qne(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return Ye(Hc,xh(xh(xh(xh({},"".concat(Hc,"-right"),ve(r)&&t&&ve(t.x)&&r>=t.x),"".concat(Hc,"-left"),ve(r)&&t&&ve(t.x)&&r<t.x),"".concat(Hc,"-bottom"),ve(n)&&t&&ve(t.y)&&n>=t.y),"".concat(Hc,"-top"),ve(n)&&t&&ve(t.y)&&n<t.y))}function mM(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,l=e.tooltipDimension,c=e.viewBox,f=e.viewBoxDimension;if(a&&ve(a[n]))return a[n];var h=r[n]-l-i,p=r[n]+i;if(t[n])return o[n]?h:p;if(o[n]){var g=h,v=c[n];return g<v?Math.max(p,c[n]):Math.max(h,c[n])}var w=p+l,y=c[n]+f;return w>y?Math.max(h,c[n]):Math.max(p,c[n])}function Wne(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function Hne(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,c=e.viewBox,f,h,p;return o.height>0&&o.width>0&&r?(h=mM({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),p=mM({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),f=Wne({translateX:h,translateY:p,useTranslate3d:l})):f=Une,{cssProperties:f,cssClasses:qne({translateX:h,translateY:p,coordinate:r})}}function tl(e){"@babel/helpers - typeof";return tl=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},tl(e)}function gM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gM(Object(r),!0).forEach(function(n){aS(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Gne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kne(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,A5(n.key),n)}}function Yne(e,t,r){return t&&Kne(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xne(e,t,r){return t=mp(t),Zne(e,P5()?Reflect.construct(t,r||[],mp(e).constructor):t.apply(e,r))}function Zne(e,t){if(t&&(tl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qne(e)}function Qne(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(P5=function(){return!!e})()}function mp(e){return mp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},mp(e)}function Jne(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&iS(e,t)}function iS(e,t){return iS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},iS(e,t)}function aS(e,t,r){return t=A5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A5(e){var t=eie(e,"string");return tl(t)=="symbol"?t:t+""}function eie(e,t){if(tl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(tl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var yM=1,tie=function(e){function t(){var r;Gne(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=Xne(this,t,[].concat(i)),aS(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),aS(r,"handleKeyDown",function(o){if(o.key==="Escape"){var l,c,f,h;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(l=(c=r.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&l!==void 0?l:0,y:(f=(h=r.props.coordinate)===null||h===void 0?void 0:h.y)!==null&&f!==void 0?f:0}})}}),r}return Jne(t,e),Yne(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>yM||Math.abs(n.height-this.state.lastBoundingBox.height)>yM)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,l=i.animationDuration,c=i.animationEasing,f=i.children,h=i.coordinate,p=i.hasPayload,g=i.isAnimationActive,v=i.offset,w=i.position,y=i.reverseDirection,b=i.useTranslate3d,S=i.viewBox,A=i.wrapperStyle,_=Hne({allowEscapeViewBox:o,coordinate:h,offsetTopLeft:v,position:w,reverseDirection:y,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:S}),C=_.cssClasses,N=_.cssProperties,O=vM(vM({transition:g&&a?"transform ".concat(l,"ms ").concat(c):void 0},N),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&p?"visible":"hidden",position:"absolute",top:0,left:0},A);return U.createElement("div",{tabIndex:-1,className:C,style:O,ref:function(k){n.wrapperNode=k}},f)}}])}(j.PureComponent),rie=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},$l={isSsr:rie()};function rl(e){"@babel/helpers - typeof";return rl=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},rl(e)}function xM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xM(Object(r),!0).forEach(function(n){Z_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iie(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,E5(n.key),n)}}function aie(e,t,r){return t&&iie(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oie(e,t,r){return t=gp(t),sie(e,N5()?Reflect.construct(t,r||[],gp(e).constructor):t.apply(e,r))}function sie(e,t){if(t&&(rl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lie(e)}function lie(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function N5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(N5=function(){return!!e})()}function gp(e){return gp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},gp(e)}function cie(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oS(e,t)}function oS(e,t){return oS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},oS(e,t)}function Z_(e,t,r){return t=E5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E5(e){var t=uie(e,"string");return rl(t)=="symbol"?t:t+""}function uie(e,t){if(rl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(rl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function fie(e){return e.dataKey}function die(e,t){return U.isValidElement(e)?U.cloneElement(e,t):typeof e=="function"?U.createElement(e,t):U.createElement(Fne,t)}var on=function(e){function t(){return nie(this,t),oie(this,t,arguments)}return cie(t,e),aie(t,[{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,l=i.animationDuration,c=i.animationEasing,f=i.content,h=i.coordinate,p=i.filterNull,g=i.isAnimationActive,v=i.offset,w=i.payload,y=i.payloadUniqBy,b=i.position,S=i.reverseDirection,A=i.useTranslate3d,_=i.viewBox,C=i.wrapperStyle,N=w??[];p&&N.length&&(N=y5(w.filter(function(T){return T.value!=null&&(T.hide!==!0||n.props.includeHidden)}),y,fie));var O=N.length>0;return U.createElement(tie,{allowEscapeViewBox:o,animationDuration:l,animationEasing:c,isAnimationActive:g,active:a,coordinate:h,hasPayload:O,offset:v,position:b,reverseDirection:S,useTranslate3d:A,viewBox:_,wrapperStyle:C},die(f,bM(bM({},this.props),{},{payload:N})))}}])}(j.PureComponent);Z_(on,"displayName","Tooltip");Z_(on,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!$l.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Wb,wM;function hie(){if(wM)return Wb;wM=1;var e=li(),t=function(){return e.Date.now()};return Wb=t,Wb}var Hb,SM;function pie(){if(SM)return Hb;SM=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Hb=t,Hb}var Gb,jM;function mie(){if(jM)return Gb;jM=1;var e=pie(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Gb=r,Gb}var Kb,_M;function O5(){if(_M)return Kb;_M=1;var e=mie(),t=za(),r=Rl(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function c(f){if(typeof f=="number")return f;if(r(f))return n;if(t(f)){var h=typeof f.valueOf=="function"?f.valueOf():f;f=t(h)?h+"":h}if(typeof f!="string")return f===0?f:+f;f=e(f);var p=a.test(f);return p||o.test(f)?l(f.slice(2),p?2:8):i.test(f)?n:+f}return Kb=c,Kb}var Yb,PM;function gie(){if(PM)return Yb;PM=1;var e=za(),t=hie(),r=O5(),n="Expected a function",i=Math.max,a=Math.min;function o(l,c,f){var h,p,g,v,w,y,b=0,S=!1,A=!1,_=!0;if(typeof l!="function")throw new TypeError(n);c=r(c)||0,e(f)&&(S=!!f.leading,A="maxWait"in f,g=A?i(r(f.maxWait)||0,c):g,_="trailing"in f?!!f.trailing:_);function C(V){var Y=h,K=p;return h=p=void 0,b=V,v=l.apply(K,Y),v}function N(V){return b=V,w=setTimeout(k,c),S?C(V):v}function O(V){var Y=V-y,K=V-b,z=c-Y;return A?a(z,g-K):z}function T(V){var Y=V-y,K=V-b;return y===void 0||Y>=c||Y<0||A&&K>=g}function k(){var V=t();if(T(V))return R(V);w=setTimeout(k,O(V))}function R(V){return w=void 0,_&&h?C(V):(h=p=void 0,v)}function F(){w!==void 0&&clearTimeout(w),b=0,h=y=p=w=void 0}function I(){return w===void 0?v:R(t())}function L(){var V=t(),Y=T(V);if(h=arguments,p=this,y=V,Y){if(w===void 0)return N(y);if(A)return clearTimeout(w),w=setTimeout(k,c),C(y)}return w===void 0&&(w=setTimeout(k,c)),v}return L.cancel=F,L.flush=I,L}return Yb=o,Yb}var Xb,AM;function vie(){if(AM)return Xb;AM=1;var e=gie(),t=za(),r="Expected a function";function n(i,a,o){var l=!0,c=!0;if(typeof i!="function")throw new TypeError(r);return t(o)&&(l="leading"in o?!!o.leading:l,c="trailing"in o?!!o.trailing:c),e(i,a,{leading:l,maxWait:a,trailing:c})}return Xb=n,Xb}var yie=vie();const C5=ct(yie);function Vu(e){"@babel/helpers - typeof";return Vu=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},Vu(e)}function NM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?NM(Object(r),!0).forEach(function(n){xie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xie(e,t,r){return t=bie(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bie(e){var t=wie(e,"string");return Vu(t)=="symbol"?t:t+""}function wie(e,t){if(Vu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Vu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sie(e,t){return Aie(e)||Pie(e,t)||_ie(e,t)||jie()}function jie(){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 _ie(e,t){if(e){if(typeof e=="string")return EM(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return EM(e,t)}}function EM(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Pie(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function Aie(e){if(Array.isArray(e))return e}var Q_=j.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,i=n===void 0?{width:-1,height:-1}:n,a=e.width,o=a===void 0?"100%":a,l=e.height,c=l===void 0?"100%":l,f=e.minWidth,h=f===void 0?0:f,p=e.minHeight,g=e.maxHeight,v=e.children,w=e.debounce,y=w===void 0?0:w,b=e.id,S=e.className,A=e.onResize,_=e.style,C=_===void 0?{}:_,N=j.useRef(null),O=j.useRef();O.current=A,j.useImperativeHandle(t,function(){return Object.defineProperty(N.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),N.current},configurable:!0})});var T=j.useState({containerWidth:i.width,containerHeight:i.height}),k=Sie(T,2),R=k[0],F=k[1],I=j.useCallback(function(V,Y){F(function(K){var z=Math.round(V),G=Math.round(Y);return K.containerWidth===z&&K.containerHeight===G?K:{containerWidth:z,containerHeight:G}})},[]);j.useEffect(function(){var V=function(q){var Q,$=q[0].contentRect,H=$.width,re=$.height;I(H,re),(Q=O.current)===null||Q===void 0||Q.call(O,H,re)};y>0&&(V=C5(V,y,{trailing:!0,leading:!1}));var Y=new ResizeObserver(V),K=N.current.getBoundingClientRect(),z=K.width,G=K.height;return I(z,G),Y.observe(N.current),function(){Y.disconnect()}},[I,y]);var L=j.useMemo(function(){var V=R.containerWidth,Y=R.containerHeight;if(V<0||Y<0)return null;kn(jo(o)||jo(c),`The width(%s) and height(%s) are both fixed numbers,
|
||
maybe you don't need to use a ResponsiveContainer.`,o,c),kn(!r||r>0,"The aspect(%s) must be greater than zero.",r);var K=jo(o)?V:o,z=jo(c)?Y:c;r&&r>0&&(K?z=K/r:z&&(K=z*r),g&&z>g&&(z=g)),kn(K>0||z>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.`,K,z,o,c,h,p,r);var G=!Array.isArray(v)&&ki(v.type).endsWith("Chart");return U.Children.map(v,function(D){return U.isValidElement(D)?j.cloneElement(D,bh({width:K,height:z},G?{style:bh({height:"100%",width:"100%",maxHeight:z,maxWidth:K},D.props.style)}:{})):D})},[r,v,c,g,p,h,R,o]);return U.createElement("div",{id:b?"".concat(b):void 0,className:Ye("recharts-responsive-container",S),style:bh(bh({},C),{},{width:o,height:c,minWidth:h,minHeight:p,maxHeight:g}),ref:N},L)}),qm=function(t){return null};qm.displayName="Cell";function Uu(e){"@babel/helpers - typeof";return Uu=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},Uu(e)}function OM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function sS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OM(Object(r),!0).forEach(function(n){Nie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Nie(e,t,r){return t=Eie(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Eie(e){var t=Oie(e,"string");return Uu(t)=="symbol"?t:t+""}function Oie(e,t){if(Uu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Uu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var As={widthCache:{},cacheCount:0},Cie=2e3,Tie={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},CM="recharts_measurement_span";function kie(e){var t=sS({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var gu=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||$l.isSsr)return{width:0,height:0};var n=kie(r),i=JSON.stringify({text:t,copyStyle:n});if(As.widthCache[i])return As.widthCache[i];try{var a=document.getElementById(CM);a||(a=document.createElement("span"),a.setAttribute("id",CM),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=sS(sS({},Tie),n);Object.assign(a.style,o),a.textContent="".concat(t);var l=a.getBoundingClientRect(),c={width:l.width,height:l.height};return As.widthCache[i]=c,++As.cacheCount>Cie&&(As.cacheCount=0,As.widthCache={}),c}catch{return{width:0,height:0}}},Mie=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function qu(e){"@babel/helpers - typeof";return qu=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},qu(e)}function vp(e,t){return $ie(e)||Die(e,t)||Iie(e,t)||Rie()}function Rie(){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 Iie(e,t){if(e){if(typeof e=="string")return TM(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return TM(e,t)}}function TM(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Die(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,f=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function $ie(e){if(Array.isArray(e))return e}function Lie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kM(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Fie(n.key),n)}}function Bie(e,t,r){return t&&kM(e.prototype,t),r&&kM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fie(e){var t=zie(e,"string");return qu(t)=="symbol"?t:t+""}function zie(e,t){if(qu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var MM=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,RM=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Vie=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Uie=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,T5={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},qie=Object.keys(T5),Bs="NaN";function Wie(e,t){return e*T5[t]}var wh=function(){function e(t,r){Lie(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!Vie.test(r)&&(this.num=NaN,this.unit=""),qie.includes(r)&&(this.num=Wie(t,r),this.unit="px")}return Bie(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,i=(n=Uie.exec(r))!==null&&n!==void 0?n:[],a=vp(i,3),o=a[1],l=a[2];return new e(parseFloat(o),l??"")}}])}();function k5(e){if(e.includes(Bs))return Bs;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=MM.exec(t))!==null&&r!==void 0?r:[],i=vp(n,4),a=i[1],o=i[2],l=i[3],c=wh.parse(a??""),f=wh.parse(l??""),h=o==="*"?c.multiply(f):c.divide(f);if(h.isNaN())return Bs;t=t.replace(MM,h.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var p,g=(p=RM.exec(t))!==null&&p!==void 0?p:[],v=vp(g,4),w=v[1],y=v[2],b=v[3],S=wh.parse(w??""),A=wh.parse(b??""),_=y==="+"?S.add(A):S.subtract(A);if(_.isNaN())return Bs;t=t.replace(RM,_.toString())}return t}var IM=/\(([^()]*)\)/;function Hie(e){for(var t=e;t.includes("(");){var r=IM.exec(t),n=vp(r,2),i=n[1];t=t.replace(IM,k5(i))}return t}function Gie(e){var t=e.replace(/\s+/g,"");return t=Hie(t),t=k5(t),t}function Kie(e){try{return Gie(e)}catch{return Bs}}function Zb(e){var t=Kie(e.slice(5,-1));return t===Bs?"":t}var Yie=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Xie=["dx","dy","angle","className","breakAll"];function lS(){return lS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lS.apply(this,arguments)}function DM(e,t){if(e==null)return{};var r=Zie(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Zie(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function $M(e,t){return tae(e)||eae(e,t)||Jie(e,t)||Qie()}function Qie(){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 Jie(e,t){if(e){if(typeof e=="string")return LM(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return LM(e,t)}}function LM(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function eae(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,f=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function tae(e){if(Array.isArray(e))return e}var M5=/[ \f\n\r\t\v\u2028\u2029]+/,R5=function(t){var r=t.children,n=t.breakAll,i=t.style;try{var a=[];Qe(r)||(n?a=r.toString().split(""):a=r.toString().split(M5));var o=a.map(function(c){return{word:c,width:gu(c,i).width}}),l=n?0:gu(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}},rae=function(t,r,n,i,a){var o=t.maxLines,l=t.children,c=t.style,f=t.breakAll,h=ve(o),p=l,g=function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return K.reduce(function(z,G){var D=G.word,q=G.width,Q=z[z.length-1];if(Q&&(i==null||a||Q.width+q+n<Number(i)))Q.words.push(D),Q.width+=q+n;else{var $={words:[D],width:q};z.push($)}return z},[])},v=g(r),w=function(K){return K.reduce(function(z,G){return z.width>G.width?z:G})};if(!h)return v;for(var y="…",b=function(K){var z=p.slice(0,K),G=R5({breakAll:f,style:c,children:z+y}).wordsWithComputedWidth,D=g(G),q=D.length>o||w(D).width>Number(i);return[q,D]},S=0,A=p.length-1,_=0,C;S<=A&&_<=p.length-1;){var N=Math.floor((S+A)/2),O=N-1,T=b(O),k=$M(T,2),R=k[0],F=k[1],I=b(N),L=$M(I,1),V=L[0];if(!R&&!V&&(S=N+1),R&&V&&(A=N-1),!R&&V){C=F;break}_++}return C||v},BM=function(t){var r=Qe(t)?[]:t.toString().split(M5);return[{words:r}]},nae=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,l=t.maxLines;if((r||n)&&!$l.isSsr){var c,f,h=R5({breakAll:o,children:i,style:a});if(h){var p=h.wordsWithComputedWidth,g=h.spaceWidth;c=p,f=g}else return BM(i);return rae({breakAll:o,children:i,maxLines:l,style:a},c,f,r,n)}return BM(i)},FM="#808080",$o=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,l=o===void 0?"1em":o,c=t.capHeight,f=c===void 0?"0.71em":c,h=t.scaleToFit,p=h===void 0?!1:h,g=t.textAnchor,v=g===void 0?"start":g,w=t.verticalAnchor,y=w===void 0?"end":w,b=t.fill,S=b===void 0?FM:b,A=DM(t,Yie),_=j.useMemo(function(){return nae({breakAll:A.breakAll,children:A.children,maxLines:A.maxLines,scaleToFit:p,style:A.style,width:A.width})},[A.breakAll,A.children,A.maxLines,p,A.style,A.width]),C=A.dx,N=A.dy,O=A.angle,T=A.className,k=A.breakAll,R=DM(A,Xie);if(!Kt(n)||!Kt(a))return null;var F=n+(ve(C)?C:0),I=a+(ve(N)?N:0),L;switch(y){case"start":L=Zb("calc(".concat(f,")"));break;case"middle":L=Zb("calc(".concat((_.length-1)/2," * -").concat(l," + (").concat(f," / 2))"));break;default:L=Zb("calc(".concat(_.length-1," * -").concat(l,")"));break}var V=[];if(p){var Y=_[0].width,K=A.width;V.push("scale(".concat((ve(K)?K/Y:1)/Y,")"))}return O&&V.push("rotate(".concat(O,", ").concat(F,", ").concat(I,")")),V.length&&(R.transform=V.join(" ")),U.createElement("text",lS({},Fe(R,!0),{x:F,y:I,className:Ye("recharts-text",T),textAnchor:v,fill:S.includes("url")?FM:S}),_.map(function(z,G){var D=z.words.join(k?"":" ");return U.createElement("tspan",{x:F,dy:G===0?L:l,key:"".concat(D,"-").concat(G)},D)}))};function Ca(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function iae(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function J_(e){let t,r,n;e.length!==2?(t=Ca,r=(l,c)=>Ca(e(l),c),n=(l,c)=>e(l)-c):(t=e===Ca||e===iae?e:aae,r=e,n=e);function i(l,c,f=0,h=l.length){if(f<h){if(t(c,c)!==0)return h;do{const p=f+h>>>1;r(l[p],c)<0?f=p+1:h=p}while(f<h)}return f}function a(l,c,f=0,h=l.length){if(f<h){if(t(c,c)!==0)return h;do{const p=f+h>>>1;r(l[p],c)<=0?f=p+1:h=p}while(f<h)}return f}function o(l,c,f=0,h=l.length){const p=i(l,c,f,h-1);return p>f&&n(l[p-1],c)>-n(l[p],c)?p-1:p}return{left:i,center:o,right:a}}function aae(){return 0}function I5(e){return e===null?NaN:+e}function*oae(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const sae=J_(Ca),zf=sae.right;J_(I5).center;class zM extends Map{constructor(t,r=uae){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(VM(this,t))}has(t){return super.has(VM(this,t))}set(t,r){return super.set(lae(this,t),r)}delete(t){return super.delete(cae(this,t))}}function VM({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function lae({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function cae({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function uae(e){return e!==null&&typeof e=="object"?e.valueOf():e}function fae(e=Ca){if(e===Ca)return D5;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function D5(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const dae=Math.sqrt(50),hae=Math.sqrt(10),pae=Math.sqrt(2);function yp(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=dae?10:a>=hae?5:a>=pae?2:1;let l,c,f;return i<0?(f=Math.pow(10,-i)/o,l=Math.round(e*f),c=Math.round(t*f),l/f<e&&++l,c/f>t&&--c,f=-f):(f=Math.pow(10,i)*o,l=Math.round(e/f),c=Math.round(t/f),l*f<e&&++l,c*f>t&&--c),c<l&&.5<=r&&r<2?yp(e,t,r*2):[l,c,f]}function cS(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,o]=n?yp(t,e,r):yp(e,t,r);if(!(a>=i))return[];const l=a-i+1,c=new Array(l);if(n)if(o<0)for(let f=0;f<l;++f)c[f]=(a-f)/-o;else for(let f=0;f<l;++f)c[f]=(a-f)*o;else if(o<0)for(let f=0;f<l;++f)c[f]=(i+f)/-o;else for(let f=0;f<l;++f)c[f]=(i+f)*o;return c}function uS(e,t,r){return t=+t,e=+e,r=+r,yp(e,t,r)[2]}function fS(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?uS(t,e,r):uS(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function UM(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function qM(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function $5(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?D5:fae(i);n>r;){if(n-r>600){const c=n-r+1,f=t-r+1,h=Math.log(c),p=.5*Math.exp(2*h/3),g=.5*Math.sqrt(h*p*(c-p)/c)*(f-c/2<0?-1:1),v=Math.max(r,Math.floor(t-f*p/c+g)),w=Math.min(n,Math.floor(t+(c-f)*p/c+g));$5(e,t,v,w,i)}const a=e[t];let o=r,l=n;for(Gc(e,r,t),i(e[n],a)>0&&Gc(e,r,n);o<l;){for(Gc(e,o,l),++o,--l;i(e[o],a)<0;)++o;for(;i(e[l],a)>0;)--l}i(e[r],a)===0?Gc(e,r,l):(++l,Gc(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function Gc(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function mae(e,t,r){if(e=Float64Array.from(oae(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return qM(e);if(t>=1)return UM(e);var n,i=(n-1)*t,a=Math.floor(i),o=UM($5(e,a).subarray(0,a+1)),l=qM(e.subarray(a+1));return o+(l-o)*(i-a)}}function gae(e,t,r=I5){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),l=+r(e[a+1],a+1,e);return o+(l-o)*(i-a)}}function vae(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n<i;)a[n]=e+n*r;return a}function gn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Xi(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 dS=Symbol("implicit");function eP(){var e=new zM,t=[],r=[],n=dS;function i(a){let o=e.get(a);if(o===void 0){if(n!==dS)return n;e.set(a,o=t.push(a)-1)}return r[o%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new zM;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return eP(t,r).unknown(n)},gn.apply(i,arguments),i}function Wu(){var e=eP().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,o,l=!1,c=0,f=0,h=.5;delete e.unknown;function p(){var g=t().length,v=i<n,w=v?i:n,y=v?n:i;a=(y-w)/Math.max(1,g-c+f*2),l&&(a=Math.floor(a)),w+=(y-w-a*(g-c))*h,o=a*(1-c),l&&(w=Math.round(w),o=Math.round(o));var b=vae(g).map(function(S){return w+a*S});return r(v?b.reverse():b)}return e.domain=function(g){return arguments.length?(t(g),p()):t()},e.range=function(g){return arguments.length?([n,i]=g,n=+n,i=+i,p()):[n,i]},e.rangeRound=function(g){return[n,i]=g,n=+n,i=+i,l=!0,p()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(g){return arguments.length?(l=!!g,p()):l},e.padding=function(g){return arguments.length?(c=Math.min(1,f=+g),p()):c},e.paddingInner=function(g){return arguments.length?(c=Math.min(1,g),p()):c},e.paddingOuter=function(g){return arguments.length?(f=+g,p()):f},e.align=function(g){return arguments.length?(h=Math.max(0,Math.min(1,g)),p()):h},e.copy=function(){return Wu(t(),[n,i]).round(l).paddingInner(c).paddingOuter(f).align(h)},gn.apply(p(),arguments)}function L5(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return L5(t())},e}function vu(){return L5(Wu.apply(null,arguments).paddingInner(1))}function tP(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function B5(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Vf(){}var Hu=.7,xp=1/Hu,Hs="\\s*([+-]?\\d+)\\s*",Gu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ri="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",yae=/^#([0-9a-f]{3,8})$/,xae=new RegExp(`^rgb\\(${Hs},${Hs},${Hs}\\)$`),bae=new RegExp(`^rgb\\(${ri},${ri},${ri}\\)$`),wae=new RegExp(`^rgba\\(${Hs},${Hs},${Hs},${Gu}\\)$`),Sae=new RegExp(`^rgba\\(${ri},${ri},${ri},${Gu}\\)$`),jae=new RegExp(`^hsl\\(${Gu},${ri},${ri}\\)$`),_ae=new RegExp(`^hsla\\(${Gu},${ri},${ri},${Gu}\\)$`),WM={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};tP(Vf,Ku,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:HM,formatHex:HM,formatHex8:Pae,formatHsl:Aae,formatRgb:GM,toString:GM});function HM(){return this.rgb().formatHex()}function Pae(){return this.rgb().formatHex8()}function Aae(){return F5(this).formatHsl()}function GM(){return this.rgb().formatRgb()}function Ku(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=yae.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?KM(t):r===3?new Rr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Sh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Sh(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=xae.exec(e))?new Rr(t[1],t[2],t[3],1):(t=bae.exec(e))?new Rr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=wae.exec(e))?Sh(t[1],t[2],t[3],t[4]):(t=Sae.exec(e))?Sh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=jae.exec(e))?ZM(t[1],t[2]/100,t[3]/100,1):(t=_ae.exec(e))?ZM(t[1],t[2]/100,t[3]/100,t[4]):WM.hasOwnProperty(e)?KM(WM[e]):e==="transparent"?new Rr(NaN,NaN,NaN,0):null}function KM(e){return new Rr(e>>16&255,e>>8&255,e&255,1)}function Sh(e,t,r,n){return n<=0&&(e=t=r=NaN),new Rr(e,t,r,n)}function Nae(e){return e instanceof Vf||(e=Ku(e)),e?(e=e.rgb(),new Rr(e.r,e.g,e.b,e.opacity)):new Rr}function hS(e,t,r,n){return arguments.length===1?Nae(e):new Rr(e,t,r,n??1)}function Rr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}tP(Rr,hS,B5(Vf,{brighter(e){return e=e==null?xp:Math.pow(xp,e),new Rr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Hu:Math.pow(Hu,e),new Rr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Rr(Co(this.r),Co(this.g),Co(this.b),bp(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:YM,formatHex:YM,formatHex8:Eae,formatRgb:XM,toString:XM}));function YM(){return`#${_o(this.r)}${_o(this.g)}${_o(this.b)}`}function Eae(){return`#${_o(this.r)}${_o(this.g)}${_o(this.b)}${_o((isNaN(this.opacity)?1:this.opacity)*255)}`}function XM(){const e=bp(this.opacity);return`${e===1?"rgb(":"rgba("}${Co(this.r)}, ${Co(this.g)}, ${Co(this.b)}${e===1?")":`, ${e})`}`}function bp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Co(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _o(e){return e=Co(e),(e<16?"0":"")+e.toString(16)}function ZM(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new On(e,t,r,n)}function F5(e){if(e instanceof On)return new On(e.h,e.s,e.l,e.opacity);if(e instanceof Vf||(e=Ku(e)),!e)return new On;if(e instanceof On)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,l=a-i,c=(a+i)/2;return l?(t===a?o=(r-n)/l+(r<n)*6:r===a?o=(n-t)/l+2:o=(t-r)/l+4,l/=c<.5?a+i:2-a-i,o*=60):l=c>0&&c<1?0:o,new On(o,l,c,e.opacity)}function Oae(e,t,r,n){return arguments.length===1?F5(e):new On(e,t,r,n??1)}function On(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}tP(On,Oae,B5(Vf,{brighter(e){return e=e==null?xp:Math.pow(xp,e),new On(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Hu:Math.pow(Hu,e),new On(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,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Rr(Qb(e>=240?e-240:e+120,i,n),Qb(e,i,n),Qb(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new On(QM(this.h),jh(this.s),jh(this.l),bp(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=bp(this.opacity);return`${e===1?"hsl(":"hsla("}${QM(this.h)}, ${jh(this.s)*100}%, ${jh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function QM(e){return e=(e||0)%360,e<0?e+360:e}function jh(e){return Math.max(0,Math.min(1,e||0))}function Qb(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const rP=e=>()=>e;function Cae(e,t){return function(r){return e+r*t}}function Tae(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function kae(e){return(e=+e)==1?z5:function(t,r){return r-t?Tae(t,r,e):rP(isNaN(t)?r:t)}}function z5(e,t){var r=t-e;return r?Cae(e,r):rP(isNaN(e)?t:e)}const JM=function e(t){var r=kae(t);function n(i,a){var o=r((i=hS(i)).r,(a=hS(a)).r),l=r(i.g,a.g),c=r(i.b,a.b),f=z5(i.opacity,a.opacity);return function(h){return i.r=o(h),i.g=l(h),i.b=c(h),i.opacity=f(h),i+""}}return n.gamma=e,n}(1);function Mae(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function Rae(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Iae(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o<n;++o)i[o]=Ll(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(l){for(o=0;o<n;++o)a[o]=i[o](l);return a}}function Dae(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function wp(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function $ae(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=Ll(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var pS=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Jb=new RegExp(pS.source,"g");function Lae(e){return function(){return e}}function Bae(e){return function(t){return e(t)+""}}function Fae(e,t){var r=pS.lastIndex=Jb.lastIndex=0,n,i,a,o=-1,l=[],c=[];for(e=e+"",t=t+"";(n=pS.exec(e))&&(i=Jb.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),l[o]?l[o]+=a:l[++o]=a),(n=n[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,c.push({i:o,x:wp(n,i)})),r=Jb.lastIndex;return r<t.length&&(a=t.slice(r),l[o]?l[o]+=a:l[++o]=a),l.length<2?c[0]?Bae(c[0].x):Lae(t):(t=c.length,function(f){for(var h=0,p;h<t;++h)l[(p=c[h]).i]=p.x(f);return l.join("")})}function Ll(e,t){var r=typeof t,n;return t==null||r==="boolean"?rP(t):(r==="number"?wp:r==="string"?(n=Ku(t))?(t=n,JM):Fae:t instanceof Ku?JM:t instanceof Date?Dae:Rae(t)?Mae:Array.isArray(t)?Iae:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?$ae:wp)(e,t)}function nP(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function zae(e,t){t===void 0&&(t=e,e=Ll);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var l=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[l](o-l)}}function Vae(e){return function(){return e}}function Sp(e){return+e}var eR=[0,1];function Pr(e){return e}function mS(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:Vae(isNaN(t)?NaN:.5)}function Uae(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function qae(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i<n?(n=mS(i,n),a=r(o,a)):(n=mS(n,i),a=r(a,o)),function(l){return a(n(l))}}function Wae(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=mS(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(l){var c=zf(e,l,1,n)-1;return a[c](i[c](l))}}function Uf(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Wm(){var e=eR,t=eR,r=Ll,n,i,a,o=Pr,l,c,f;function h(){var g=Math.min(e.length,t.length);return o!==Pr&&(o=Uae(e[0],e[g-1])),l=g>2?Wae:qae,c=f=null,p}function p(g){return g==null||isNaN(g=+g)?a:(c||(c=l(e.map(n),t,r)))(n(o(g)))}return p.invert=function(g){return o(i((f||(f=l(t,e.map(n),wp)))(g)))},p.domain=function(g){return arguments.length?(e=Array.from(g,Sp),h()):e.slice()},p.range=function(g){return arguments.length?(t=Array.from(g),h()):t.slice()},p.rangeRound=function(g){return t=Array.from(g),r=nP,h()},p.clamp=function(g){return arguments.length?(o=g?!0:Pr,h()):o!==Pr},p.interpolate=function(g){return arguments.length?(r=g,h()):r},p.unknown=function(g){return arguments.length?(a=g,p):a},function(g,v){return n=g,i=v,h()}}function iP(){return Wm()(Pr,Pr)}function Hae(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function jp(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function nl(e){return e=jp(Math.abs(e)),e?e[1]:NaN}function Gae(e,t){return function(r,n){for(var i=r.length,a=[],o=0,l=e[0],c=0;i>0&&l>0&&(c+l+1>n&&(l=Math.max(1,n-c)),a.push(r.substring(i-=l,i+l)),!((c+=l+1)>n));)l=e[o=(o+1)%e.length];return a.reverse().join(t)}}function Kae(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var Yae=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Yu(e){if(!(t=Yae.exec(e)))throw new Error("invalid format: "+e);var t;return new aP({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]})}Yu.prototype=aP.prototype;function aP(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+""}aP.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 Xae(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var V5;function Zae(e,t){var r=jp(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(V5=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+jp(e,Math.max(0,t+a-1))[0]}function tR(e,t){var r=jp(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const rR={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Hae,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)=>tR(e*100,t),r:tR,s:Zae,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function nR(e){return e}var iR=Array.prototype.map,aR=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Qae(e){var t=e.grouping===void 0||e.thousands===void 0?nR:Gae(iR.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?nR:Kae(iR.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function f(p){p=Yu(p);var g=p.fill,v=p.align,w=p.sign,y=p.symbol,b=p.zero,S=p.width,A=p.comma,_=p.precision,C=p.trim,N=p.type;N==="n"?(A=!0,N="g"):rR[N]||(_===void 0&&(_=12),C=!0,N="g"),(b||g==="0"&&v==="=")&&(b=!0,g="0",v="=");var O=y==="$"?r:y==="#"&&/[boxX]/.test(N)?"0"+N.toLowerCase():"",T=y==="$"?n:/[%p]/.test(N)?o:"",k=rR[N],R=/[defgprs%]/.test(N);_=_===void 0?6:/[gprs]/.test(N)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function F(I){var L=O,V=T,Y,K,z;if(N==="c")V=k(I)+V,I="";else{I=+I;var G=I<0||1/I<0;if(I=isNaN(I)?c:k(Math.abs(I),_),C&&(I=Xae(I)),G&&+I==0&&w!=="+"&&(G=!1),L=(G?w==="("?w:l:w==="-"||w==="("?"":w)+L,V=(N==="s"?aR[8+V5/3]:"")+V+(G&&w==="("?")":""),R){for(Y=-1,K=I.length;++Y<K;)if(z=I.charCodeAt(Y),48>z||z>57){V=(z===46?i+I.slice(Y+1):I.slice(Y))+V,I=I.slice(0,Y);break}}}A&&!b&&(I=t(I,1/0));var D=L.length+I.length+V.length,q=D<S?new Array(S-D+1).join(g):"";switch(A&&b&&(I=t(q+I,q.length?S-V.length:1/0),q=""),v){case"<":I=L+I+V+q;break;case"=":I=L+q+I+V;break;case"^":I=q.slice(0,D=q.length>>1)+L+I+V+q.slice(D);break;default:I=q+L+I+V;break}return a(I)}return F.toString=function(){return p+""},F}function h(p,g){var v=f((p=Yu(p),p.type="f",p)),w=Math.max(-8,Math.min(8,Math.floor(nl(g)/3)))*3,y=Math.pow(10,-w),b=aR[8+w/3];return function(S){return v(y*S)+b}}return{format:f,formatPrefix:h}}var _h,oP,U5;Jae({thousands:",",grouping:[3],currency:["$",""]});function Jae(e){return _h=Qae(e),oP=_h.format,U5=_h.formatPrefix,_h}function eoe(e){return Math.max(0,-nl(Math.abs(e)))}function toe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(nl(t)/3)))*3-nl(Math.abs(e)))}function roe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,nl(t)-nl(e))+1}function q5(e,t,r,n){var i=fS(e,t,r),a;switch(n=Yu(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=toe(i,o))&&(n.precision=a),U5(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=roe(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=eoe(i))&&(n.precision=a-(n.type==="%")*2);break}}return oP(n)}function Va(e){var t=e.domain;return e.ticks=function(r){var n=t();return cS(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return q5(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],l=n[a],c,f,h=10;for(l<o&&(f=o,o=l,l=f,f=i,i=a,a=f);h-- >0;){if(f=uS(o,l,r),f===c)return n[i]=o,n[a]=l,t(n);if(f>0)o=Math.floor(o/f)*f,l=Math.ceil(l/f)*f;else if(f<0)o=Math.ceil(o*f)/f,l=Math.floor(l*f)/f;else break;c=f}return e},e}function _p(){var e=iP();return e.copy=function(){return Uf(e,_p())},gn.apply(e,arguments),Va(e)}function W5(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Sp),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return W5(e).unknown(t)},e=arguments.length?Array.from(e,Sp):[0,1],Va(r)}function H5(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return a<i&&(o=r,r=n,n=o,o=i,i=a,a=o),e[r]=t.floor(i),e[n]=t.ceil(a),e}function oR(e){return Math.log(e)}function sR(e){return Math.exp(e)}function noe(e){return-Math.log(-e)}function ioe(e){return-Math.exp(-e)}function aoe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function ooe(e){return e===10?aoe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function soe(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 lR(e){return(t,r)=>-e(-t,r)}function sP(e){const t=e(oR,sR),r=t.domain;let n=10,i,a;function o(){return i=soe(n),a=ooe(n),r()[0]<0?(i=lR(i),a=lR(a),e(noe,ioe)):e(oR,sR),t}return t.base=function(l){return arguments.length?(n=+l,o()):n},t.domain=function(l){return arguments.length?(r(l),o()):r()},t.ticks=l=>{const c=r();let f=c[0],h=c[c.length-1];const p=h<f;p&&([f,h]=[h,f]);let g=i(f),v=i(h),w,y;const b=l==null?10:+l;let S=[];if(!(n%1)&&v-g<b){if(g=Math.floor(g),v=Math.ceil(v),f>0){for(;g<=v;++g)for(w=1;w<n;++w)if(y=g<0?w/a(-g):w*a(g),!(y<f)){if(y>h)break;S.push(y)}}else for(;g<=v;++g)for(w=n-1;w>=1;--w)if(y=g>0?w/a(-g):w*a(g),!(y<f)){if(y>h)break;S.push(y)}S.length*2<b&&(S=cS(f,h,b))}else S=cS(g,v,Math.min(v-g,b)).map(a);return p?S.reverse():S},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=Yu(c)).precision==null&&(c.trim=!0),c=oP(c)),l===1/0)return c;const f=Math.max(1,n*l/t.ticks().length);return h=>{let p=h/a(Math.round(i(h)));return p*n<n-.5&&(p*=n),p<=f?c(h):""}},t.nice=()=>r(H5(r(),{floor:l=>a(Math.floor(i(l))),ceil:l=>a(Math.ceil(i(l)))})),t}function G5(){const e=sP(Wm()).domain([1,10]);return e.copy=()=>Uf(e,G5()).base(e.base()),gn.apply(e,arguments),e}function cR(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function uR(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function lP(e){var t=1,r=e(cR(t),uR(t));return r.constant=function(n){return arguments.length?e(cR(t=+n),uR(t)):t},Va(r)}function K5(){var e=lP(Wm());return e.copy=function(){return Uf(e,K5()).constant(e.constant())},gn.apply(e,arguments)}function fR(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function loe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function coe(e){return e<0?-e*e:e*e}function cP(e){var t=e(Pr,Pr),r=1;function n(){return r===1?e(Pr,Pr):r===.5?e(loe,coe):e(fR(r),fR(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Va(t)}function uP(){var e=cP(Wm());return e.copy=function(){return Uf(e,uP()).exponent(e.exponent())},gn.apply(e,arguments),e}function uoe(){return uP.apply(null,arguments).exponent(.5)}function dR(e){return Math.sign(e)*e*e}function foe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Y5(){var e=iP(),t=[0,1],r=!1,n;function i(a){var o=foe(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(dR(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Sp)).map(dR)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Y5(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},gn.apply(i,arguments),Va(i)}function X5(){var e=[],t=[],r=[],n;function i(){var o=0,l=Math.max(1,t.length);for(r=new Array(l-1);++o<l;)r[o-1]=gae(e,o/l);return a}function a(o){return o==null||isNaN(o=+o)?n:t[zf(r,o)]}return a.invertExtent=function(o){var l=t.indexOf(o);return l<0?[NaN,NaN]:[l>0?r[l-1]:e[0],l<r.length?r[l]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let l of o)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(Ca),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return X5().domain(e).range(t).unknown(n)},gn.apply(a,arguments)}function Z5(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function o(c){return c!=null&&c<=c?i[zf(n,c,0,r)]:a}function l(){var c=-1;for(n=new Array(r);++c<r;)n[c]=((c+1)*t-(c-r)*e)/(r+1);return o}return o.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,l()):[e,t]},o.range=function(c){return arguments.length?(r=(i=Array.from(c)).length-1,l()):i.slice()},o.invertExtent=function(c){var f=i.indexOf(c);return f<0?[NaN,NaN]:f<1?[e,n[0]]:f>=r?[n[r-1],t]:[n[f-1],n[f]]},o.unknown=function(c){return arguments.length&&(a=c),o},o.thresholds=function(){return n.slice()},o.copy=function(){return Z5().domain([e,t]).range(i).unknown(a)},gn.apply(Va(o),arguments)}function Q5(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[zf(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return Q5().domain(e).range(t).unknown(r)},gn.apply(i,arguments)}const ew=new Date,tw=new Date;function Yt(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),l=i.ceil(a);return a-o<l-a?o:l},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,l)=>{const c=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a<o)||!(l>0))return c;let f;do c.push(f=new Date(+a)),t(a,l),e(a);while(f<a&&a<o);return c},i.filter=a=>Yt(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!a(o););else for(;--l>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(ew.setTime(+a),tw.setTime(+o),e(ew),e(tw),Math.floor(r(ew,tw))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const Pp=Yt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Pp.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Yt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Pp);Pp.range;const Ei=1e3,ln=Ei*60,Oi=ln*60,zi=Oi*24,fP=zi*7,hR=zi*30,rw=zi*365,Po=Yt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ei)},(e,t)=>(t-e)/Ei,e=>e.getUTCSeconds());Po.range;const dP=Yt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ei)},(e,t)=>{e.setTime(+e+t*ln)},(e,t)=>(t-e)/ln,e=>e.getMinutes());dP.range;const hP=Yt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ln)},(e,t)=>(t-e)/ln,e=>e.getUTCMinutes());hP.range;const pP=Yt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ei-e.getMinutes()*ln)},(e,t)=>{e.setTime(+e+t*Oi)},(e,t)=>(t-e)/Oi,e=>e.getHours());pP.range;const mP=Yt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Oi)},(e,t)=>(t-e)/Oi,e=>e.getUTCHours());mP.range;const qf=Yt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ln)/zi,e=>e.getDate()-1);qf.range;const Hm=Yt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/zi,e=>e.getUTCDate()-1);Hm.range;const J5=Yt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/zi,e=>Math.floor(e/zi));J5.range;function Ko(e){return Yt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*ln)/fP)}const Gm=Ko(0),Ap=Ko(1),doe=Ko(2),hoe=Ko(3),il=Ko(4),poe=Ko(5),moe=Ko(6);Gm.range;Ap.range;doe.range;hoe.range;il.range;poe.range;moe.range;function Yo(e){return Yt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/fP)}const Km=Yo(0),Np=Yo(1),goe=Yo(2),voe=Yo(3),al=Yo(4),yoe=Yo(5),xoe=Yo(6);Km.range;Np.range;goe.range;voe.range;al.range;yoe.range;xoe.range;const gP=Yt(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());gP.range;const vP=Yt(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());vP.range;const Vi=Yt(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());Vi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Yt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Vi.range;const Ui=Yt(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());Ui.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Yt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Ui.range;function eB(e,t,r,n,i,a){const o=[[Po,1,Ei],[Po,5,5*Ei],[Po,15,15*Ei],[Po,30,30*Ei],[a,1,ln],[a,5,5*ln],[a,15,15*ln],[a,30,30*ln],[i,1,Oi],[i,3,3*Oi],[i,6,6*Oi],[i,12,12*Oi],[n,1,zi],[n,2,2*zi],[r,1,fP],[t,1,hR],[t,3,3*hR],[e,1,rw]];function l(f,h,p){const g=h<f;g&&([f,h]=[h,f]);const v=p&&typeof p.range=="function"?p:c(f,h,p),w=v?v.range(f,+h+1):[];return g?w.reverse():w}function c(f,h,p){const g=Math.abs(h-f)/p,v=J_(([,,b])=>b).right(o,g);if(v===o.length)return e.every(fS(f/rw,h/rw,p));if(v===0)return Pp.every(Math.max(fS(f,h,p),1));const[w,y]=o[g/o[v-1][2]<o[v][2]/g?v-1:v];return w.every(y)}return[l,c]}const[boe,woe]=eB(Ui,vP,Km,J5,mP,hP),[Soe,joe]=eB(Vi,gP,Gm,qf,pP,dP);function nw(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 iw(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 Kc(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function _oe(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,o=e.shortDays,l=e.months,c=e.shortMonths,f=Yc(i),h=Xc(i),p=Yc(a),g=Xc(a),v=Yc(o),w=Xc(o),y=Yc(l),b=Xc(l),S=Yc(c),A=Xc(c),_={a:G,A:D,b:q,B:Q,c:null,d:xR,e:xR,f:Goe,g:nse,G:ase,H:qoe,I:Woe,j:Hoe,L:tB,m:Koe,M:Yoe,p:$,q:H,Q:SR,s:jR,S:Xoe,u:Zoe,U:Qoe,V:Joe,w:ese,W:tse,x:null,X:null,y:rse,Y:ise,Z:ose,"%":wR},C={a:re,A:se,b:ge,B:be,c:null,d:bR,e:bR,f:use,g:bse,G:Sse,H:sse,I:lse,j:cse,L:nB,m:fse,M:dse,p:ae,q:he,Q:SR,s:jR,S:hse,u:pse,U:mse,V:gse,w:vse,W:yse,x:null,X:null,y:xse,Y:wse,Z:jse,"%":wR},N={a:F,A:I,b:L,B:V,c:Y,d:vR,e:vR,f:Foe,g:gR,G:mR,H:yR,I:yR,j:Doe,L:Boe,m:Ioe,M:$oe,p:R,q:Roe,Q:Voe,s:Uoe,S:Loe,u:Ooe,U:Coe,V:Toe,w:Eoe,W:koe,x:K,X:z,y:gR,Y:mR,Z:Moe,"%":zoe};_.x=O(r,_),_.X=O(n,_),_.c=O(t,_),C.x=O(r,C),C.X=O(n,C),C.c=O(t,C);function O(ne,le){return function(ce){var Z=[],Se=-1,we=0,ze=ne.length,Ue,Je,ye;for(ce instanceof Date||(ce=new Date(+ce));++Se<ze;)ne.charCodeAt(Se)===37&&(Z.push(ne.slice(we,Se)),(Je=pR[Ue=ne.charAt(++Se)])!=null?Ue=ne.charAt(++Se):Je=Ue==="e"?" ":"0",(ye=le[Ue])&&(Ue=ye(ce,Je)),Z.push(Ue),we=Se+1);return Z.push(ne.slice(we,Se)),Z.join("")}}function T(ne,le){return function(ce){var Z=Kc(1900,void 0,1),Se=k(Z,ne,ce+="",0),we,ze;if(Se!=ce.length)return null;if("Q"in Z)return new Date(Z.Q);if("s"in Z)return new Date(Z.s*1e3+("L"in Z?Z.L:0));if(le&&!("Z"in Z)&&(Z.Z=0),"p"in Z&&(Z.H=Z.H%12+Z.p*12),Z.m===void 0&&(Z.m="q"in Z?Z.q:0),"V"in Z){if(Z.V<1||Z.V>53)return null;"w"in Z||(Z.w=1),"Z"in Z?(we=iw(Kc(Z.y,0,1)),ze=we.getUTCDay(),we=ze>4||ze===0?Np.ceil(we):Np(we),we=Hm.offset(we,(Z.V-1)*7),Z.y=we.getUTCFullYear(),Z.m=we.getUTCMonth(),Z.d=we.getUTCDate()+(Z.w+6)%7):(we=nw(Kc(Z.y,0,1)),ze=we.getDay(),we=ze>4||ze===0?Ap.ceil(we):Ap(we),we=qf.offset(we,(Z.V-1)*7),Z.y=we.getFullYear(),Z.m=we.getMonth(),Z.d=we.getDate()+(Z.w+6)%7)}else("W"in Z||"U"in Z)&&("w"in Z||(Z.w="u"in Z?Z.u%7:"W"in Z?1:0),ze="Z"in Z?iw(Kc(Z.y,0,1)).getUTCDay():nw(Kc(Z.y,0,1)).getDay(),Z.m=0,Z.d="W"in Z?(Z.w+6)%7+Z.W*7-(ze+5)%7:Z.w+Z.U*7-(ze+6)%7);return"Z"in Z?(Z.H+=Z.Z/100|0,Z.M+=Z.Z%100,iw(Z)):nw(Z)}}function k(ne,le,ce,Z){for(var Se=0,we=le.length,ze=ce.length,Ue,Je;Se<we;){if(Z>=ze)return-1;if(Ue=le.charCodeAt(Se++),Ue===37){if(Ue=le.charAt(Se++),Je=N[Ue in pR?le.charAt(Se++):Ue],!Je||(Z=Je(ne,ce,Z))<0)return-1}else if(Ue!=ce.charCodeAt(Z++))return-1}return Z}function R(ne,le,ce){var Z=f.exec(le.slice(ce));return Z?(ne.p=h.get(Z[0].toLowerCase()),ce+Z[0].length):-1}function F(ne,le,ce){var Z=v.exec(le.slice(ce));return Z?(ne.w=w.get(Z[0].toLowerCase()),ce+Z[0].length):-1}function I(ne,le,ce){var Z=p.exec(le.slice(ce));return Z?(ne.w=g.get(Z[0].toLowerCase()),ce+Z[0].length):-1}function L(ne,le,ce){var Z=S.exec(le.slice(ce));return Z?(ne.m=A.get(Z[0].toLowerCase()),ce+Z[0].length):-1}function V(ne,le,ce){var Z=y.exec(le.slice(ce));return Z?(ne.m=b.get(Z[0].toLowerCase()),ce+Z[0].length):-1}function Y(ne,le,ce){return k(ne,t,le,ce)}function K(ne,le,ce){return k(ne,r,le,ce)}function z(ne,le,ce){return k(ne,n,le,ce)}function G(ne){return o[ne.getDay()]}function D(ne){return a[ne.getDay()]}function q(ne){return c[ne.getMonth()]}function Q(ne){return l[ne.getMonth()]}function $(ne){return i[+(ne.getHours()>=12)]}function H(ne){return 1+~~(ne.getMonth()/3)}function re(ne){return o[ne.getUTCDay()]}function se(ne){return a[ne.getUTCDay()]}function ge(ne){return c[ne.getUTCMonth()]}function be(ne){return l[ne.getUTCMonth()]}function ae(ne){return i[+(ne.getUTCHours()>=12)]}function he(ne){return 1+~~(ne.getUTCMonth()/3)}return{format:function(ne){var le=O(ne+="",_);return le.toString=function(){return ne},le},parse:function(ne){var le=T(ne+="",!1);return le.toString=function(){return ne},le},utcFormat:function(ne){var le=O(ne+="",C);return le.toString=function(){return ne},le},utcParse:function(ne){var le=T(ne+="",!0);return le.toString=function(){return ne},le}}}var pR={"-":"",_:" ",0:"0"},rr=/^\s*\d+/,Poe=/^%/,Aoe=/[\\^$*+?|[\]().{}]/g;function at(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function Noe(e){return e.replace(Aoe,"\\$&")}function Yc(e){return new RegExp("^(?:"+e.map(Noe).join("|")+")","i")}function Xc(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function Eoe(e,t,r){var n=rr.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Ooe(e,t,r){var n=rr.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function Coe(e,t,r){var n=rr.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function Toe(e,t,r){var n=rr.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function koe(e,t,r){var n=rr.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function mR(e,t,r){var n=rr.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function gR(e,t,r){var n=rr.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Moe(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function Roe(e,t,r){var n=rr.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function Ioe(e,t,r){var n=rr.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function vR(e,t,r){var n=rr.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function Doe(e,t,r){var n=rr.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function yR(e,t,r){var n=rr.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function $oe(e,t,r){var n=rr.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function Loe(e,t,r){var n=rr.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function Boe(e,t,r){var n=rr.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function Foe(e,t,r){var n=rr.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function zoe(e,t,r){var n=Poe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function Voe(e,t,r){var n=rr.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function Uoe(e,t,r){var n=rr.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function xR(e,t){return at(e.getDate(),t,2)}function qoe(e,t){return at(e.getHours(),t,2)}function Woe(e,t){return at(e.getHours()%12||12,t,2)}function Hoe(e,t){return at(1+qf.count(Vi(e),e),t,3)}function tB(e,t){return at(e.getMilliseconds(),t,3)}function Goe(e,t){return tB(e,t)+"000"}function Koe(e,t){return at(e.getMonth()+1,t,2)}function Yoe(e,t){return at(e.getMinutes(),t,2)}function Xoe(e,t){return at(e.getSeconds(),t,2)}function Zoe(e){var t=e.getDay();return t===0?7:t}function Qoe(e,t){return at(Gm.count(Vi(e)-1,e),t,2)}function rB(e){var t=e.getDay();return t>=4||t===0?il(e):il.ceil(e)}function Joe(e,t){return e=rB(e),at(il.count(Vi(e),e)+(Vi(e).getDay()===4),t,2)}function ese(e){return e.getDay()}function tse(e,t){return at(Ap.count(Vi(e)-1,e),t,2)}function rse(e,t){return at(e.getFullYear()%100,t,2)}function nse(e,t){return e=rB(e),at(e.getFullYear()%100,t,2)}function ise(e,t){return at(e.getFullYear()%1e4,t,4)}function ase(e,t){var r=e.getDay();return e=r>=4||r===0?il(e):il.ceil(e),at(e.getFullYear()%1e4,t,4)}function ose(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+at(t/60|0,"0",2)+at(t%60,"0",2)}function bR(e,t){return at(e.getUTCDate(),t,2)}function sse(e,t){return at(e.getUTCHours(),t,2)}function lse(e,t){return at(e.getUTCHours()%12||12,t,2)}function cse(e,t){return at(1+Hm.count(Ui(e),e),t,3)}function nB(e,t){return at(e.getUTCMilliseconds(),t,3)}function use(e,t){return nB(e,t)+"000"}function fse(e,t){return at(e.getUTCMonth()+1,t,2)}function dse(e,t){return at(e.getUTCMinutes(),t,2)}function hse(e,t){return at(e.getUTCSeconds(),t,2)}function pse(e){var t=e.getUTCDay();return t===0?7:t}function mse(e,t){return at(Km.count(Ui(e)-1,e),t,2)}function iB(e){var t=e.getUTCDay();return t>=4||t===0?al(e):al.ceil(e)}function gse(e,t){return e=iB(e),at(al.count(Ui(e),e)+(Ui(e).getUTCDay()===4),t,2)}function vse(e){return e.getUTCDay()}function yse(e,t){return at(Np.count(Ui(e)-1,e),t,2)}function xse(e,t){return at(e.getUTCFullYear()%100,t,2)}function bse(e,t){return e=iB(e),at(e.getUTCFullYear()%100,t,2)}function wse(e,t){return at(e.getUTCFullYear()%1e4,t,4)}function Sse(e,t){var r=e.getUTCDay();return e=r>=4||r===0?al(e):al.ceil(e),at(e.getUTCFullYear()%1e4,t,4)}function jse(){return"+0000"}function wR(){return"%"}function SR(e){return+e}function jR(e){return Math.floor(+e/1e3)}var Ns,aB,oB;_se({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 _se(e){return Ns=_oe(e),aB=Ns.format,Ns.parse,oB=Ns.utcFormat,Ns.utcParse,Ns}function Pse(e){return new Date(e)}function Ase(e){return e instanceof Date?+e:+new Date(+e)}function yP(e,t,r,n,i,a,o,l,c,f){var h=iP(),p=h.invert,g=h.domain,v=f(".%L"),w=f(":%S"),y=f("%I:%M"),b=f("%I %p"),S=f("%a %d"),A=f("%b %d"),_=f("%B"),C=f("%Y");function N(O){return(c(O)<O?v:l(O)<O?w:o(O)<O?y:a(O)<O?b:n(O)<O?i(O)<O?S:A:r(O)<O?_:C)(O)}return h.invert=function(O){return new Date(p(O))},h.domain=function(O){return arguments.length?g(Array.from(O,Ase)):g().map(Pse)},h.ticks=function(O){var T=g();return e(T[0],T[T.length-1],O??10)},h.tickFormat=function(O,T){return T==null?N:f(T)},h.nice=function(O){var T=g();return(!O||typeof O.range!="function")&&(O=t(T[0],T[T.length-1],O??10)),O?g(H5(T,O)):h},h.copy=function(){return Uf(h,yP(e,t,r,n,i,a,o,l,c,f))},h}function Nse(){return gn.apply(yP(Soe,joe,Vi,gP,Gm,qf,pP,dP,Po,aB).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Ese(){return gn.apply(yP(boe,woe,Ui,vP,Km,Hm,mP,hP,Po,oB).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Ym(){var e=0,t=1,r,n,i,a,o=Pr,l=!1,c;function f(p){return p==null||isNaN(p=+p)?c:o(i===0?.5:(p=(a(p)-r)*i,l?Math.max(0,Math.min(1,p)):p))}f.domain=function(p){return arguments.length?([e,t]=p,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),f):[e,t]},f.clamp=function(p){return arguments.length?(l=!!p,f):l},f.interpolator=function(p){return arguments.length?(o=p,f):o};function h(p){return function(g){var v,w;return arguments.length?([v,w]=g,o=p(v,w),f):[o(0),o(1)]}}return f.range=h(Ll),f.rangeRound=h(nP),f.unknown=function(p){return arguments.length?(c=p,f):c},function(p){return a=p,r=p(e),n=p(t),i=r===n?0:1/(n-r),f}}function Ua(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function sB(){var e=Va(Ym()(Pr));return e.copy=function(){return Ua(e,sB())},Xi.apply(e,arguments)}function lB(){var e=sP(Ym()).domain([1,10]);return e.copy=function(){return Ua(e,lB()).base(e.base())},Xi.apply(e,arguments)}function cB(){var e=lP(Ym());return e.copy=function(){return Ua(e,cB()).constant(e.constant())},Xi.apply(e,arguments)}function xP(){var e=cP(Ym());return e.copy=function(){return Ua(e,xP()).exponent(e.exponent())},Xi.apply(e,arguments)}function Ose(){return xP.apply(null,arguments).exponent(.5)}function uB(){var e=[],t=Pr;function r(n){if(n!=null&&!isNaN(n=+n))return t((zf(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Ca),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>mae(e,a/n))},r.copy=function(){return uB(t).domain(e)},Xi.apply(r,arguments)}function Xm(){var e=0,t=.5,r=1,n=1,i,a,o,l,c,f=Pr,h,p=!1,g;function v(y){return isNaN(y=+y)?g:(y=.5+((y=+h(y))-a)*(n*y<n*a?l:c),f(p?Math.max(0,Math.min(1,y)):y))}v.domain=function(y){return arguments.length?([e,t,r]=y,i=h(e=+e),a=h(t=+t),o=h(r=+r),l=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),n=a<i?-1:1,v):[e,t,r]},v.clamp=function(y){return arguments.length?(p=!!y,v):p},v.interpolator=function(y){return arguments.length?(f=y,v):f};function w(y){return function(b){var S,A,_;return arguments.length?([S,A,_]=b,f=zae(y,[S,A,_]),v):[f(0),f(.5),f(1)]}}return v.range=w(Ll),v.rangeRound=w(nP),v.unknown=function(y){return arguments.length?(g=y,v):g},function(y){return h=y,i=y(e),a=y(t),o=y(r),l=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),n=a<i?-1:1,v}}function fB(){var e=Va(Xm()(Pr));return e.copy=function(){return Ua(e,fB())},Xi.apply(e,arguments)}function dB(){var e=sP(Xm()).domain([.1,1,10]);return e.copy=function(){return Ua(e,dB()).base(e.base())},Xi.apply(e,arguments)}function hB(){var e=lP(Xm());return e.copy=function(){return Ua(e,hB()).constant(e.constant())},Xi.apply(e,arguments)}function bP(){var e=cP(Xm());return e.copy=function(){return Ua(e,bP()).exponent(e.exponent())},Xi.apply(e,arguments)}function Cse(){return bP.apply(null,arguments).exponent(.5)}const _R=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Wu,scaleDiverging:fB,scaleDivergingLog:dB,scaleDivergingPow:bP,scaleDivergingSqrt:Cse,scaleDivergingSymlog:hB,scaleIdentity:W5,scaleImplicit:dS,scaleLinear:_p,scaleLog:G5,scaleOrdinal:eP,scalePoint:vu,scalePow:uP,scaleQuantile:X5,scaleQuantize:Z5,scaleRadial:Y5,scaleSequential:sB,scaleSequentialLog:lB,scaleSequentialPow:xP,scaleSequentialQuantile:uB,scaleSequentialSqrt:Ose,scaleSequentialSymlog:cB,scaleSqrt:uoe,scaleSymlog:K5,scaleThreshold:Q5,scaleTime:Nse,scaleUtc:Ese,tickFormat:q5},Symbol.toStringTag,{value:"Module"}));var aw,PR;function Zm(){if(PR)return aw;PR=1;var e=Rl();function t(r,n,i){for(var a=-1,o=r.length;++a<o;){var l=r[a],c=n(l);if(c!=null&&(f===void 0?c===c&&!e(c):i(c,f)))var f=c,h=l}return h}return aw=t,aw}var ow,AR;function pB(){if(AR)return ow;AR=1;function e(t,r){return t>r}return ow=e,ow}var sw,NR;function Tse(){if(NR)return sw;NR=1;var e=Zm(),t=pB(),r=Dl();function n(i){return i&&i.length?e(i,r,t):void 0}return sw=n,sw}var kse=Tse();const Qm=ct(kse);var lw,ER;function mB(){if(ER)return lw;ER=1;function e(t,r){return t<r}return lw=e,lw}var cw,OR;function Mse(){if(OR)return cw;OR=1;var e=Zm(),t=mB(),r=Dl();function n(i){return i&&i.length?e(i,r,t):void 0}return cw=n,cw}var Rse=Mse();const Jm=ct(Rse);var uw,CR;function Ise(){if(CR)return uw;CR=1;var e=I_(),t=ci(),r=j5(),n=$r();function i(a,o){var l=n(a)?e:r;return l(a,t(o,3))}return uw=i,uw}var fw,TR;function Dse(){if(TR)return fw;TR=1;var e=w5(),t=Ise();function r(n,i){return e(t(n,i),1)}return fw=r,fw}var $se=Dse();const Lse=ct($se);var dw,kR;function Bse(){if(kR)return dw;kR=1;var e=K_();function t(r,n){return e(r,n)}return dw=t,dw}var Fse=Bse();const eg=ct(Fse);var Bl=1e9,zse={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},SP,_t=!0,hn="[DecimalError] ",To=hn+"Invalid argument: ",wP=hn+"Exponent out of range: ",Fl=Math.floor,go=Math.pow,Vse=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Wr,tr=1e7,wt=7,gB=9007199254740991,Ep=Fl(gB/wt),Ae={};Ae.absoluteValue=Ae.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Ae.comparedTo=Ae.cmp=function(e){var t,r,n,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};Ae.decimalPlaces=Ae.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*wt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};Ae.dividedBy=Ae.div=function(e){return Mi(this,new this.constructor(e))};Ae.dividedToIntegerBy=Ae.idiv=function(e){var t=this,r=t.constructor;return pt(Mi(t,new r(e),0,1),r.precision)};Ae.equals=Ae.eq=function(e){return!this.cmp(e)};Ae.exponent=function(){return Vt(this)};Ae.greaterThan=Ae.gt=function(e){return this.cmp(e)>0};Ae.greaterThanOrEqualTo=Ae.gte=function(e){return this.cmp(e)>=0};Ae.isInteger=Ae.isint=function(){return this.e>this.d.length-2};Ae.isNegative=Ae.isneg=function(){return this.s<0};Ae.isPositive=Ae.ispos=function(){return this.s>0};Ae.isZero=function(){return this.s===0};Ae.lessThan=Ae.lt=function(e){return this.cmp(e)<0};Ae.lessThanOrEqualTo=Ae.lte=function(e){return this.cmp(e)<1};Ae.logarithm=Ae.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Wr))throw Error(hn+"NaN");if(r.s<1)throw Error(hn+(r.s?"NaN":"-Infinity"));return r.eq(Wr)?new n(0):(_t=!1,t=Mi(Xu(r,a),Xu(e,a),a),_t=!0,pt(t,i))};Ae.minus=Ae.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?xB(t,e):vB(t,(e.s=-e.s,e))};Ae.modulo=Ae.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(hn+"NaN");return r.s?(_t=!1,t=Mi(r,e,0,1).times(e),_t=!0,r.minus(t)):pt(new n(r),i)};Ae.naturalExponential=Ae.exp=function(){return yB(this)};Ae.naturalLogarithm=Ae.ln=function(){return Xu(this)};Ae.negated=Ae.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Ae.plus=Ae.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?vB(t,e):xB(t,(e.s=-e.s,e))};Ae.precision=Ae.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(To+e);if(t=Vt(i)+1,n=i.d.length-1,r=n*wt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};Ae.squareRoot=Ae.sqrt=function(){var e,t,r,n,i,a,o,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(hn+"NaN")}for(e=Vt(l),_t=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=Zn(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Fl((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),n=new c(t)):n=new c(i.toString()),r=c.precision,i=o=r+3;;)if(a=n,n=a.plus(Mi(l,a,o+2)).times(.5),Zn(a.d).slice(0,o)===(t=Zn(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(pt(a,r+1,0),a.times(a).eq(l)){n=a;break}}else if(t!="9999")break;o+=4}return _t=!0,pt(n,r)};Ae.times=Ae.mul=function(e){var t,r,n,i,a,o,l,c,f,h=this,p=h.constructor,g=h.d,v=(e=new p(e)).d;if(!h.s||!e.s)return new p(0);for(e.s*=h.s,r=h.e+e.e,c=g.length,f=v.length,c<f&&(a=g,g=v,v=a,o=c,c=f,f=o),a=[],o=c+f,n=o;n--;)a.push(0);for(n=f;--n>=0;){for(t=0,i=c+n;i>n;)l=a[i]+v[n]*g[i-n-1]+t,a[i--]=l%tr|0,t=l/tr|0;a[i]=(a[i]+t)%tr|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,_t?pt(e,p.precision):e};Ae.toDecimalPlaces=Ae.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(oi(e,0,Bl),t===void 0?t=n.rounding:oi(t,0,8),pt(r,e+Vt(r)+1,t))};Ae.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Lo(n,!0):(oi(e,0,Bl),t===void 0?t=i.rounding:oi(t,0,8),n=pt(new i(n),e+1,t),r=Lo(n,!0,e+1)),r};Ae.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Lo(i):(oi(e,0,Bl),t===void 0?t=a.rounding:oi(t,0,8),n=pt(new a(i),e+Vt(i)+1,t),r=Lo(n.abs(),!1,e+Vt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};Ae.toInteger=Ae.toint=function(){var e=this,t=e.constructor;return pt(new t(e),Vt(e)+1,t.rounding)};Ae.toNumber=function(){return+this};Ae.toPower=Ae.pow=function(e){var t,r,n,i,a,o,l=this,c=l.constructor,f=12,h=+(e=new c(e));if(!e.s)return new c(Wr);if(l=new c(l),!l.s){if(e.s<1)throw Error(hn+"Infinity");return l}if(l.eq(Wr))return l;if(n=c.precision,e.eq(Wr))return pt(l,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=l.s,o){if((r=h<0?-h:h)<=gB){for(i=new c(Wr),t=Math.ceil(n/wt+4),_t=!1;r%2&&(i=i.times(l),RR(i.d,t)),r=Fl(r/2),r!==0;)l=l.times(l),RR(l.d,t);return _t=!0,e.s<0?new c(Wr).div(i):pt(i,n)}}else if(a<0)throw Error(hn+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,_t=!1,i=e.times(Xu(l,n+f)),_t=!0,i=yB(i),i.s=a,i};Ae.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=Vt(i),n=Lo(i,r<=a.toExpNeg||r>=a.toExpPos)):(oi(e,1,Bl),t===void 0?t=a.rounding:oi(t,0,8),i=pt(new a(i),e,t),r=Vt(i),n=Lo(i,e<=r||r<=a.toExpNeg,e)),n};Ae.toSignificantDigits=Ae.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(oi(e,1,Bl),t===void 0?t=n.rounding:oi(t,0,8)),pt(new n(r),e,t)};Ae.toString=Ae.valueOf=Ae.val=Ae.toJSON=Ae[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Vt(e),r=e.constructor;return Lo(e,t<=r.toExpNeg||t>=r.toExpPos)};function vB(e,t){var r,n,i,a,o,l,c,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s||(t=new h(e)),_t?pt(t,p):t;if(c=e.d,f=t.d,o=e.e,i=t.e,c=c.slice(),a=o-i,a){for(a<0?(n=c,a=-a,l=f.length):(n=f,i=o,l=c.length),o=Math.ceil(p/wt),l=o>l?o+1:l+1,a>l&&(a=l,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(l=c.length,a=f.length,l-a<0&&(a=l,n=f,f=c,c=n),r=0;a;)r=(c[--a]=c[a]+f[a]+r)/tr|0,c[a]%=tr;for(r&&(c.unshift(r),++i),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=i,_t?pt(t,p):t}function oi(e,t,r){if(e!==~~e||e<t||e>r)throw Error(To+e)}function Zn(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)n=e[t]+"",r=wt-n.length,r&&(a+=Pa(r)),a+=n;o=e[t],n=o+"",r=wt-n.length,r&&(a+=Pa(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var Mi=function(){function e(n,i){var a,o=0,l=n.length;for(n=n.slice();l--;)a=n[l]*i+o,n[l]=a%tr|0,o=a/tr|0;return o&&n.unshift(o),n}function t(n,i,a,o){var l,c;if(a!=o)c=a>o?1:-1;else for(l=c=0;l<a;l++)if(n[l]!=i[l]){c=n[l]>i[l]?1:-1;break}return c}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]<i[a]?1:0,n[a]=o*tr+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,o){var l,c,f,h,p,g,v,w,y,b,S,A,_,C,N,O,T,k,R=n.constructor,F=n.s==i.s?1:-1,I=n.d,L=i.d;if(!n.s)return new R(n);if(!i.s)throw Error(hn+"Division by zero");for(c=n.e-i.e,T=L.length,N=I.length,v=new R(F),w=v.d=[],f=0;L[f]==(I[f]||0);)++f;if(L[f]>(I[f]||0)&&--c,a==null?A=a=R.precision:o?A=a+(Vt(n)-Vt(i))+1:A=a,A<0)return new R(0);if(A=A/wt+2|0,f=0,T==1)for(h=0,L=L[0],A++;(f<N||h)&&A--;f++)_=h*tr+(I[f]||0),w[f]=_/L|0,h=_%L|0;else{for(h=tr/(L[0]+1)|0,h>1&&(L=e(L,h),I=e(I,h),T=L.length,N=I.length),C=T,y=I.slice(0,T),b=y.length;b<T;)y[b++]=0;k=L.slice(),k.unshift(0),O=L[0],L[1]>=tr/2&&++O;do h=0,l=t(L,y,T,b),l<0?(S=y[0],T!=b&&(S=S*tr+(y[1]||0)),h=S/O|0,h>1?(h>=tr&&(h=tr-1),p=e(L,h),g=p.length,b=y.length,l=t(p,y,g,b),l==1&&(h--,r(p,T<g?k:L,g))):(h==0&&(l=h=1),p=L.slice()),g=p.length,g<b&&p.unshift(0),r(y,p,b),l==-1&&(b=y.length,l=t(L,y,T,b),l<1&&(h++,r(y,T<b?k:L,b))),b=y.length):l===0&&(h++,y=[0]),w[f++]=h,l&&y[0]?y[b++]=I[C]||0:(y=[I[C]],b=1);while((C++<N||y[0]!==void 0)&&A--)}return w[0]||w.shift(),v.e=c,pt(v,o?a+Vt(v)+1:a)}}();function yB(e,t){var r,n,i,a,o,l,c=0,f=0,h=e.constructor,p=h.precision;if(Vt(e)>16)throw Error(wP+Vt(e));if(!e.s)return new h(Wr);for(_t=!1,l=p,o=new h(.03125);e.abs().gte(.1);)e=e.times(o),f+=5;for(n=Math.log(go(2,f))/Math.LN10*2+5|0,l+=n,r=i=a=new h(Wr),h.precision=l;;){if(i=pt(i.times(e),l),r=r.times(++c),o=a.plus(Mi(i,r,l)),Zn(o.d).slice(0,l)===Zn(a.d).slice(0,l)){for(;f--;)a=pt(a.times(a),l);return h.precision=p,t==null?(_t=!0,pt(a,p)):a}a=o}}function Vt(e){for(var t=e.e*wt,r=e.d[0];r>=10;r/=10)t++;return t}function hw(e,t,r){if(t>e.LN10.sd())throw _t=!0,r&&(e.precision=r),Error(hn+"LN10 precision limit exceeded");return pt(new e(e.LN10),t)}function Pa(e){for(var t="";e--;)t+="0";return t}function Xu(e,t){var r,n,i,a,o,l,c,f,h,p=1,g=10,v=e,w=v.d,y=v.constructor,b=y.precision;if(v.s<1)throw Error(hn+(v.s?"NaN":"-Infinity"));if(v.eq(Wr))return new y(0);if(t==null?(_t=!1,f=b):f=t,v.eq(10))return t==null&&(_t=!0),hw(y,f);if(f+=g,y.precision=f,r=Zn(w),n=r.charAt(0),a=Vt(v),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)v=v.times(e),r=Zn(v.d),n=r.charAt(0),p++;a=Vt(v),n>1?(v=new y("0."+r),a++):v=new y(n+"."+r.slice(1))}else return c=hw(y,f+2,b).times(a+""),v=Xu(new y(n+"."+r.slice(1)),f-g).plus(c),y.precision=b,t==null?(_t=!0,pt(v,b)):v;for(l=o=v=Mi(v.minus(Wr),v.plus(Wr),f),h=pt(v.times(v),f),i=3;;){if(o=pt(o.times(h),f),c=l.plus(Mi(o,new y(i),f)),Zn(c.d).slice(0,f)===Zn(l.d).slice(0,f))return l=l.times(2),a!==0&&(l=l.plus(hw(y,f+2,b).times(a+""))),l=Mi(l,new y(p),f),y.precision=b,t==null?(_t=!0,pt(l,b)):l;l=c,i+=2}}function MR(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Fl(r/wt),e.d=[],n=(r+1)%wt,r<0&&(n+=wt),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=wt;n<i;)e.d.push(+t.slice(n,n+=wt));t=t.slice(n),n=wt-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),_t&&(e.e>Ep||e.e<-Ep))throw Error(wP+r)}else e.s=0,e.e=0,e.d=[0];return e}function pt(e,t,r){var n,i,a,o,l,c,f,h,p=e.d;for(o=1,a=p[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=wt,i=t,f=p[h=0];else{if(h=Math.ceil((n+1)/wt),a=p.length,h>=a)return e;for(f=a=p[h],o=1;a>=10;a/=10)o++;n%=wt,i=n-wt+o}if(r!==void 0&&(a=go(10,o-i-1),l=f/a%10|0,c=t<0||p[h+1]!==void 0||f%a,c=r<4?(l||c)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||c||r==6&&(n>0?i>0?f/go(10,o-i):0:p[h-1])%10&1||r==(e.s<0?8:7))),t<1||!p[0])return c?(a=Vt(e),p.length=1,t=t-a-1,p[0]=go(10,(wt-t%wt)%wt),e.e=Fl(-t/wt)||0):(p.length=1,p[0]=e.e=e.s=0),e;if(n==0?(p.length=h,a=1,h--):(p.length=h+1,a=go(10,wt-n),p[h]=i>0?(f/go(10,o-i)%go(10,i)|0)*a:0),c)for(;;)if(h==0){(p[0]+=a)==tr&&(p[0]=1,++e.e);break}else{if(p[h]+=a,p[h]!=tr)break;p[h--]=0,a=1}for(n=p.length;p[--n]===0;)p.pop();if(_t&&(e.e>Ep||e.e<-Ep))throw Error(wP+Vt(e));return e}function xB(e,t){var r,n,i,a,o,l,c,f,h,p,g=e.constructor,v=g.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new g(e),_t?pt(t,v):t;if(c=e.d,p=t.d,n=t.e,f=e.e,c=c.slice(),o=f-n,o){for(h=o<0,h?(r=c,o=-o,l=p.length):(r=p,n=f,l=c.length),i=Math.max(Math.ceil(v/wt),l)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=c.length,l=p.length,h=i<l,h&&(l=i),i=0;i<l;i++)if(c[i]!=p[i]){h=c[i]<p[i];break}o=0}for(h&&(r=c,c=p,p=r,t.s=-t.s),l=c.length,i=p.length-l;i>0;--i)c[l++]=0;for(i=p.length;i>o;){if(c[--i]<p[i]){for(a=i;a&&c[--a]===0;)c[a]=tr-1;--c[a],c[i]+=tr}c[i]-=p[i]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(t.d=c,t.e=n,_t?pt(t,v):t):new g(0)}function Lo(e,t,r){var n,i=Vt(e),a=Zn(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+Pa(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Pa(-i-1)+a,r&&(n=r-o)>0&&(a+=Pa(n))):i>=o?(a+=Pa(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+Pa(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=Pa(n))),e.s<0?"-"+a:a}function RR(e,t){if(e.length>t)return e.length=t,!0}function bB(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(To+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return MR(o,a.toString())}else if(typeof a!="string")throw Error(To+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,Vse.test(a))MR(o,a);else throw Error(To+a)}if(i.prototype=Ae,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=bB,i.config=i.set=Use,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function Use(e){if(!e||typeof e!="object")throw Error(hn+"Object expected");var t,r,n,i=["precision",1,Bl,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(Fl(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(To+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(To+r+": "+n);return this}var SP=bB(zse);Wr=new SP(1);const dt=SP;function qse(e){return Kse(e)||Gse(e)||Hse(e)||Wse()}function Wse(){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 Hse(e,t){if(e){if(typeof e=="string")return gS(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gS(e,t)}}function Gse(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Kse(e){if(Array.isArray(e))return gS(e)}function gS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Yse=function(t){return t},wB={},SB=function(t){return t===wB},IR=function(t){return function r(){return arguments.length===0||arguments.length===1&&SB(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},Xse=function e(t,r){return t===1?r:IR(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=i.filter(function(l){return l!==wB}).length;return o>=t?r.apply(void 0,i):e(t-o,IR(function(){for(var l=arguments.length,c=new Array(l),f=0;f<l;f++)c[f]=arguments[f];var h=i.map(function(p){return SB(p)?c.shift():p});return r.apply(void 0,qse(h).concat(c))}))})},tg=function(t){return Xse(t.length,t)},vS=function(t,r){for(var n=[],i=t;i<r;++i)n[i-t]=i;return n},Zse=tg(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),Qse=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return Yse;var i=r.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce(function(l,c){return c(l)},a.apply(void 0,arguments))}},yS=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},jB=function(t){var r=null,n=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r&&a.every(function(l,c){return l===r[c]})||(r=a,n=t.apply(void 0,a)),n}};function Jse(e){var t;return e===0?t=1:t=Math.floor(new dt(e).abs().log(10).toNumber())+1,t}function ele(e,t,r){for(var n=new dt(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var tle=tg(function(e,t,r){var n=+e,i=+t;return n+r*(i-n)}),rle=tg(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),nle=tg(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const rg={rangeStep:ele,getDigitCount:Jse,interpolateNumber:tle,uninterpolateNumber:rle,uninterpolateTruncation:nle};function xS(e){return ole(e)||ale(e)||_B(e)||ile()}function ile(){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 ale(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function ole(e){if(Array.isArray(e))return bS(e)}function Zu(e,t){return cle(e)||lle(e,t)||_B(e,t)||sle()}function sle(){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 _B(e,t){if(e){if(typeof e=="string")return bS(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bS(e,t)}}function bS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function lle(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),l;!(n=(l=o.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(c){i=!0,a=c}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function cle(e){if(Array.isArray(e))return e}function PB(e){var t=Zu(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function AB(e,t,r){if(e.lte(0))return new dt(0);var n=rg.getDigitCount(e.toNumber()),i=new dt(10).pow(n),a=e.div(i),o=n!==1?.05:.1,l=new dt(Math.ceil(a.div(o).toNumber())).add(r).mul(o),c=l.mul(i);return t?c:new dt(Math.ceil(c))}function ule(e,t,r){var n=1,i=new dt(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new dt(10).pow(rg.getDigitCount(e)-1),i=new dt(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new dt(Math.floor(e)))}else e===0?i=new dt(Math.floor((t-1)/2)):r||(i=new dt(Math.floor(e)));var o=Math.floor((t-1)/2),l=Qse(Zse(function(c){return i.add(new dt(c-o).mul(n)).toNumber()}),vS);return l(0,t)}function NB(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new dt(0),tickMin:new dt(0),tickMax:new dt(0)};var a=AB(new dt(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new dt(0):(o=new dt(e).add(t).div(2),o=o.sub(new dt(o).mod(a)));var l=Math.ceil(o.sub(e).div(a).toNumber()),c=Math.ceil(new dt(t).sub(o).div(a).toNumber()),f=l+c+1;return f>r?NB(e,t,r,n,i+1):(f<r&&(c=t>0?c+(r-f):c,l=t>0?l:l+(r-f)),{step:a,tickMin:o.sub(new dt(l).mul(a)),tickMax:o.add(new dt(c).mul(a))})}function fle(e){var t=Zu(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),l=PB([r,n]),c=Zu(l,2),f=c[0],h=c[1];if(f===-1/0||h===1/0){var p=h===1/0?[f].concat(xS(vS(0,i-1).map(function(){return 1/0}))):[].concat(xS(vS(0,i-1).map(function(){return-1/0})),[h]);return r>n?yS(p):p}if(f===h)return ule(f,i,a);var g=NB(f,h,o,a),v=g.step,w=g.tickMin,y=g.tickMax,b=rg.rangeStep(w,y.add(new dt(.1).mul(v)),v);return r>n?yS(b):b}function dle(e,t){var r=Zu(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=PB([n,i]),l=Zu(o,2),c=l[0],f=l[1];if(c===-1/0||f===1/0)return[n,i];if(c===f)return[c];var h=Math.max(t,2),p=AB(new dt(f).sub(c).div(h-1),a,0),g=[].concat(xS(rg.rangeStep(new dt(c),new dt(f).sub(new dt(.99).mul(p)),p)),[f]);return n>i?yS(g):g}var hle=jB(fle),ple=jB(dle),mle="Invariant failed";function Bo(e,t){throw new Error(mle)}var gle=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function ol(e){"@babel/helpers - typeof";return ol=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},ol(e)}function Op(){return Op=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Op.apply(this,arguments)}function vle(e,t){return wle(e)||ble(e,t)||xle(e,t)||yle()}function yle(){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 xle(e,t){if(e){if(typeof e=="string")return DR(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return DR(e,t)}}function DR(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ble(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function wle(e){if(Array.isArray(e))return e}function Sle(e,t){if(e==null)return{};var r=jle(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function jle(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function _le(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ple(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,CB(n.key),n)}}function Ale(e,t,r){return t&&Ple(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Nle(e,t,r){return t=Cp(t),Ele(e,EB()?Reflect.construct(t,r||[],Cp(e).constructor):t.apply(e,r))}function Ele(e,t){if(t&&(ol(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ole(e)}function Ole(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(EB=function(){return!!e})()}function Cp(e){return Cp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Cp(e)}function Cle(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wS(e,t)}function wS(e,t){return wS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},wS(e,t)}function OB(e,t,r){return t=CB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CB(e){var t=Tle(e,"string");return ol(t)=="symbol"?t:t+""}function Tle(e,t){if(ol(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ol(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ng=function(e){function t(){return _le(this,t),Nle(this,t,arguments)}return Cle(t,e),Ale(t,[{key:"render",value:function(){var n=this.props,i=n.offset,a=n.layout,o=n.width,l=n.dataKey,c=n.data,f=n.dataPointFormatter,h=n.xAxis,p=n.yAxis,g=Sle(n,gle),v=Fe(g,!1);this.props.direction==="x"&&h.type!=="number"&&Bo();var w=c.map(function(y){var b=f(y,l),S=b.x,A=b.y,_=b.value,C=b.errorVal;if(!C)return null;var N=[],O,T;if(Array.isArray(C)){var k=vle(C,2);O=k[0],T=k[1]}else O=T=C;if(a==="vertical"){var R=h.scale,F=A+i,I=F+o,L=F-o,V=R(_-O),Y=R(_+T);N.push({x1:Y,y1:I,x2:Y,y2:L}),N.push({x1:V,y1:F,x2:Y,y2:F}),N.push({x1:V,y1:I,x2:V,y2:L})}else if(a==="horizontal"){var K=p.scale,z=S+i,G=z-o,D=z+o,q=K(_-O),Q=K(_+T);N.push({x1:G,y1:Q,x2:D,y2:Q}),N.push({x1:z,y1:q,x2:z,y2:Q}),N.push({x1:G,y1:q,x2:D,y2:q})}return U.createElement(ft,Op({className:"recharts-errorBar",key:"bar-".concat(N.map(function($){return"".concat($.x1,"-").concat($.x2,"-").concat($.y1,"-").concat($.y2)}))},v),N.map(function($){return U.createElement("line",Op({},$,{key:"line-".concat($.x1,"-").concat($.x2,"-").concat($.y1,"-").concat($.y2)}))}))});return U.createElement(ft,{className:"recharts-errorBars"},w)}}])}(U.Component);OB(ng,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});OB(ng,"displayName","ErrorBar");function Qu(e){"@babel/helpers - typeof";return Qu=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},Qu(e)}function $R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function uo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$R(Object(r),!0).forEach(function(n){kle(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$R(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kle(e,t,r){return t=Mle(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mle(e){var t=Rle(e,"string");return Qu(t)=="symbol"?t:t+""}function Rle(e,t){if(Qu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var TB=function(t){var r=t.children,n=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=Ur(r,Oa);if(!o)return null;var l=Oa.defaultProps,c=l!==void 0?uo(uo({},l),o.props):{},f;return o.props&&o.props.payload?f=o.props&&o.props.payload:a==="children"?f=(n||[]).reduce(function(h,p){var g=p.item,v=p.props,w=v.sectors||v.data||[];return h.concat(w.map(function(y){return{type:o.props.iconType||g.props.legendType,value:y.name,color:y.fill,payload:y}}))},[]):f=(n||[]).map(function(h){var p=h.item,g=p.type.defaultProps,v=g!==void 0?uo(uo({},g),p.props):{},w=v.dataKey,y=v.name,b=v.legendType,S=v.hide;return{inactive:S,dataKey:w,type:c.iconType||b||"square",color:jP(p),value:y||w,payload:v}}),uo(uo(uo({},c),Oa.getWithHeight(o,i)),{},{payload:f,item:o})};function Ju(e){"@babel/helpers - typeof";return Ju=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},Ju(e)}function LR(e){return Lle(e)||$le(e)||Dle(e)||Ile()}function Ile(){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 Dle(e,t){if(e){if(typeof e=="string")return SS(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return SS(e,t)}}function $le(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Lle(e){if(Array.isArray(e))return SS(e)}function SS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function BR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function It(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BR(Object(r),!0).forEach(function(n){Gs(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Gs(e,t,r){return t=Ble(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ble(e){var t=Fle(e,"string");return Ju(t)=="symbol"?t:t+""}function Fle(e,t){if(Ju(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ju(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gr(e,t,r){return Qe(e)||Qe(t)?r:Kt(t)?Hr(e,t,r):qe(t)?t(e):r}function yu(e,t,r,n){var i=Lse(e,function(l){return gr(l,t)});if(r==="number"){var a=i.filter(function(l){return ve(l)||parseFloat(l)});return a.length?[Jm(a),Qm(a)]:[1/0,-1/0]}var o=n?i.filter(function(l){return!Qe(l)}):i;return o.map(function(l){return Kt(l)||l instanceof Date?l:""})}var zle=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,l=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(l<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var c=a.range,f=0;f<l;f++){var h=f>0?i[f-1].coordinate:i[l-1].coordinate,p=i[f].coordinate,g=f>=l-1?i[0].coordinate:i[f+1].coordinate,v=void 0;if(jr(p-h)!==jr(g-p)){var w=[];if(jr(g-p)===jr(c[1]-c[0])){v=g;var y=p+c[1]-c[0];w[0]=Math.min(y,(y+h)/2),w[1]=Math.max(y,(y+h)/2)}else{v=h;var b=g+c[1]-c[0];w[0]=Math.min(p,(b+p)/2),w[1]=Math.max(p,(b+p)/2)}var S=[Math.min(p,(v+p)/2),Math.max(p,(v+p)/2)];if(t>S[0]&&t<=S[1]||t>=w[0]&&t<=w[1]){o=i[f].index;break}}else{var A=Math.min(h,g),_=Math.max(h,g);if(t>(A+p)/2&&t<=(_+p)/2){o=i[f].index;break}}}else for(var C=0;C<l;C++)if(C===0&&t<=(n[C].coordinate+n[C+1].coordinate)/2||C>0&&C<l-1&&t>(n[C].coordinate+n[C-1].coordinate)/2&&t<=(n[C].coordinate+n[C+1].coordinate)/2||C===l-1&&t>(n[C].coordinate+n[C-1].coordinate)/2){o=n[C].index;break}return o},jP=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?It(It({},t.type.defaultProps),t.props):t.props,o=a.stroke,l=a.fill,c;switch(i){case"Line":c=o;break;case"Area":case"Radar":c=o&&o!=="none"?o:l;break;default:c=l;break}return c},Vle=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},l=Object.keys(a),c=0,f=l.length;c<f;c++)for(var h=a[l[c]].stackGroups,p=Object.keys(h),g=0,v=p.length;g<v;g++){var w=h[p[g]],y=w.items,b=w.cateAxisId,S=y.filter(function(T){return ki(T.type).indexOf("Bar")>=0});if(S&&S.length){var A=S[0].type.defaultProps,_=A!==void 0?It(It({},A),S[0].props):S[0].props,C=_.barSize,N=_[b];o[N]||(o[N]=[]);var O=Qe(C)?r:C;o[N].push({item:S[0],stackList:S.slice(1),barSize:Qe(O)?void 0:_r(O,n,0)})}}return o},Ule=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,l=t.maxBarSize,c=o.length;if(c<1)return null;var f=_r(r,i,0,!0),h,p=[];if(o[0].barSize===+o[0].barSize){var g=!1,v=i/c,w=o.reduce(function(C,N){return C+N.barSize||0},0);w+=(c-1)*f,w>=i&&(w-=(c-1)*f,f=0),w>=i&&v>0&&(g=!0,v*=.9,w=c*v);var y=(i-w)/2>>0,b={offset:y-f,size:0};h=o.reduce(function(C,N){var O={item:N.item,position:{offset:b.offset+b.size+f,size:g?v:N.barSize}},T=[].concat(LR(C),[O]);return b=T[T.length-1].position,N.stackList&&N.stackList.length&&N.stackList.forEach(function(k){T.push({item:k,position:b})}),T},p)}else{var S=_r(n,i,0,!0);i-2*S-(c-1)*f<=0&&(f=0);var A=(i-2*S-(c-1)*f)/c;A>1&&(A>>=0);var _=l===+l?Math.min(A,l):A;h=o.reduce(function(C,N,O){var T=[].concat(LR(C),[{item:N.item,position:{offset:S+(A+f)*O+(A-_)/2,size:_}}]);return N.stackList&&N.stackList.length&&N.stackList.forEach(function(k){T.push({item:k,position:T[T.length-1].position})}),T},p)}return h},qle=function(t,r,n,i){var a=n.children,o=n.width,l=n.margin,c=o-(l.left||0)-(l.right||0),f=TB({children:a,legendWidth:c});if(f){var h=i||{},p=h.width,g=h.height,v=f.align,w=f.verticalAlign,y=f.layout;if((y==="vertical"||y==="horizontal"&&w==="middle")&&v!=="center"&&ve(t[v]))return It(It({},t),{},Gs({},v,t[v]+(p||0)));if((y==="horizontal"||y==="vertical"&&v==="center")&&w!=="middle"&&ve(t[w]))return It(It({},t),{},Gs({},w,t[w]+(g||0)))}return t},Wle=function(t,r,n){return Qe(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},kB=function(t,r,n,i,a){var o=r.props.children,l=un(o,ng).filter(function(f){return Wle(i,a,f.props.direction)});if(l&&l.length){var c=l.map(function(f){return f.props.dataKey});return t.reduce(function(f,h){var p=gr(h,n);if(Qe(p))return f;var g=Array.isArray(p)?[Jm(p),Qm(p)]:[p,p],v=c.reduce(function(w,y){var b=gr(h,y,0),S=g[0]-Math.abs(Array.isArray(b)?b[0]:b),A=g[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(S,w[0]),Math.max(A,w[1])]},[1/0,-1/0]);return[Math.min(v[0],f[0]),Math.max(v[1],f[1])]},[1/0,-1/0])}return null},Hle=function(t,r,n,i,a){var o=r.map(function(l){return kB(t,l,n,a,i)}).filter(function(l){return!Qe(l)});return o&&o.length?o.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]):null},MB=function(t,r,n,i,a){var o=r.map(function(c){var f=c.props.dataKey;return n==="number"&&f&&kB(t,c,f,i)||yu(t,f,n,a)});if(n==="number")return o.reduce(function(c,f){return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);var l={};return o.reduce(function(c,f){for(var h=0,p=f.length;h<p;h++)l[f[h]]||(l[f[h]]=!0,c.push(f[h]));return c},[])},RB=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},IB=function(t,r,n,i){if(i)return t.map(function(c){return c.coordinate});var a,o,l=t.map(function(c){return c.coordinate===r&&(a=!0),c.coordinate===n&&(o=!0),c.coordinate});return a||l.push(r),o||l.push(n),l},Ci=function(t,r,n){if(!t)return null;var i=t.scale,a=t.duplicateDomain,o=t.type,l=t.range,c=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,f=(r||n)&&o==="category"&&i.bandwidth?i.bandwidth()/c:0;if(f=t.axisType==="angleAxis"&&(l==null?void 0:l.length)>=2?jr(l[0]-l[1])*2*f:f,r&&(t.ticks||t.niceTicks)){var h=(t.ticks||t.niceTicks).map(function(p){var g=a?a.indexOf(p):p;return{coordinate:i(g)+f,value:p,offset:f}});return h.filter(function(p){return!Lf(p.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(p,g){return{coordinate:i(p)+f,value:p,index:g,offset:f}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(p){return{coordinate:i(p)+f,value:p,offset:f}}):i.domain().map(function(p,g){return{coordinate:i(p)+f,value:a?a[p]:p,index:g,offset:f}})},pw=new WeakMap,Ph=function(t,r){if(typeof r!="function")return t;pw.has(t)||pw.set(t,new WeakMap);var n=pw.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},DB=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,l=t.axisType;if(i==="auto")return o==="radial"&&l==="radiusAxis"?{scale:Wu(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:_p(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:vu(),realScaleType:"point"}:a==="category"?{scale:Wu(),realScaleType:"band"}:{scale:_p(),realScaleType:"linear"};if(Io(i)){var c="scale".concat($m(i));return{scale:(_R[c]||vu)(),realScaleType:_R[c]?c:"point"}}return qe(i)?{scale:i}:{scale:vu(),realScaleType:"point"}},FR=1e-4,$B=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-FR,o=Math.max(i[0],i[1])+FR,l=t(r[0]),c=t(r[n-1]);(l<a||l>o||c<a||c>o)&&t.domain([r[0],r[n-1]])}},Gle=function(t,r){if(!t)return null;for(var n=0,i=t.length;n<i;n++)if(t[n].item===r)return t[n].position;return null},Kle=function(t,r){if(!r||r.length!==2||!ve(r[0])||!ve(r[1]))return t;var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a=[t[0],t[1]];return(!ve(t[0])||t[0]<n)&&(a[0]=n),(!ve(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<n&&(a[1]=n),a},Yle=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0,l=0;l<r;++l){var c=Lf(t[l][n][1])?t[l][n][0]:t[l][n][1];c>=0?(t[l][n][0]=a,t[l][n][1]=a+c,a=t[l][n][1]):(t[l][n][0]=o,t[l][n][1]=o+c,o=t[l][n][1])}},Xle=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0;o<r;++o){var l=Lf(t[o][n][1])?t[o][n][0]:t[o][n][1];l>=0?(t[o][n][0]=a,t[o][n][1]=a+l,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},Zle={sign:Yle,expand:Lte,none:Qs,silhouette:Bte,wiggle:Fte,positive:Xle},Qle=function(t,r,n){var i=r.map(function(l){return l.props.dataKey}),a=Zle[n],o=$te().keys(i).value(function(l,c){return+gr(l,c,0)}).order(Q1).offset(a);return o(t)},Jle=function(t,r,n,i,a,o){if(!t)return null;var l=o?r.reverse():r,c={},f=l.reduce(function(p,g){var v,w=(v=g.type)!==null&&v!==void 0&&v.defaultProps?It(It({},g.type.defaultProps),g.props):g.props,y=w.stackId,b=w.hide;if(b)return p;var S=w[n],A=p[S]||{hasStack:!1,stackGroups:{}};if(Kt(y)){var _=A.stackGroups[y]||{numericAxisId:n,cateAxisId:i,items:[]};_.items.push(g),A.hasStack=!0,A.stackGroups[y]=_}else A.stackGroups[Bf("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[g]};return It(It({},p),{},Gs({},S,A))},c),h={};return Object.keys(f).reduce(function(p,g){var v=f[g];if(v.hasStack){var w={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(y,b){var S=v.stackGroups[b];return It(It({},y),{},Gs({},b,{numericAxisId:n,cateAxisId:i,items:S.items,stackedData:Qle(t,S.items,a)}))},w)}return It(It({},p),{},Gs({},g,v))},h)},LB=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,l=r.allowDecimals,c=n||r.scale;if(c!=="auto"&&c!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var f=t.domain();if(!f.length)return null;var h=hle(f,a,l);return t.domain([Jm(h),Qm(h)]),{niceTicks:h}}if(a&&i==="number"){var p=t.domain(),g=ple(p,a,l);return{niceTicks:g}}return null},zR=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,l=t.index;if(r.type==="category")return n[l]?n[l].coordinate+i:null;var c=gr(o,r.dataKey,r.domain[l]);return Qe(c)?null:r.scale(c)-a/2+i},ece=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},tce=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?It(It({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Kt(a)){var o=r[a];if(o){var l=o.items.indexOf(t);return l>=0?o.stackedData[l]:null}}return null},rce=function(t){return t.reduce(function(r,n){return[Jm(n.concat([r[0]]).filter(ve)),Qm(n.concat([r[1]]).filter(ve))]},[1/0,-1/0])},BB=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],l=o.stackedData,c=l.reduce(function(f,h){var p=rce(h.slice(r,n+1));return[Math.min(f[0],p[0]),Math.max(f[1],p[1])]},[1/0,-1/0]);return[Math.min(c[0],i[0]),Math.max(c[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},VR=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,UR=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,jS=function(t,r,n){if(qe(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(ve(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(VR.test(t[0])){var a=+VR.exec(t[0])[1];i[0]=r[0]-a}else qe(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(ve(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(UR.test(t[1])){var o=+UR.exec(t[1])[1];i[1]=r[1]+o}else qe(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},Tp=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=X_(r,function(p){return p.coordinate}),o=1/0,l=1,c=a.length;l<c;l++){var f=a[l],h=a[l-1];o=Math.min((f.coordinate||0)-(h.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},qR=function(t,r,n){return!t||!t.length||eg(t,Hr(n,"type.defaultProps.domain"))?r:t},FB=function(t,r){var n=t.type.defaultProps?It(It({},t.type.defaultProps),t.props):t.props,i=n.dataKey,a=n.name,o=n.unit,l=n.formatter,c=n.tooltipType,f=n.chartType,h=n.hide;return It(It({},Fe(t,!1)),{},{dataKey:i,unit:o,formatter:l,name:a||i,color:jP(t),value:gr(r,i),type:c,payload:r,chartType:f,hide:h})};function ef(e){"@babel/helpers - typeof";return ef=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},ef(e)}function WR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ai(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WR(Object(r),!0).forEach(function(n){zB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zB(e,t,r){return t=nce(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nce(e){var t=ice(e,"string");return ef(t)=="symbol"?t:t+""}function ice(e,t){if(ef(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ef(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ace(e,t){return cce(e)||lce(e,t)||sce(e,t)||oce()}function oce(){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 sce(e,t){if(e){if(typeof e=="string")return HR(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return HR(e,t)}}function HR(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function lce(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function cce(e){if(Array.isArray(e))return e}var kp=Math.PI/180,uce=function(t){return t*180/Math.PI},yt=function(t,r,n,i){return{x:t+Math.cos(-kp*i)*n,y:r+Math.sin(-kp*i)*n}},VB=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},fce=function(t,r,n,i,a){var o=t.width,l=t.height,c=t.startAngle,f=t.endAngle,h=_r(t.cx,o,o/2),p=_r(t.cy,l,l/2),g=VB(o,l,n),v=_r(t.innerRadius,g,0),w=_r(t.outerRadius,g,g*.8),y=Object.keys(r);return y.reduce(function(b,S){var A=r[S],_=A.domain,C=A.reversed,N;if(Qe(A.range))i==="angleAxis"?N=[c,f]:i==="radiusAxis"&&(N=[v,w]),C&&(N=[N[1],N[0]]);else{N=A.range;var O=N,T=ace(O,2);c=T[0],f=T[1]}var k=DB(A,a),R=k.realScaleType,F=k.scale;F.domain(_).range(N),$B(F);var I=LB(F,Ai(Ai({},A),{},{realScaleType:R})),L=Ai(Ai(Ai({},A),I),{},{range:N,radius:w,realScaleType:R,scale:F,cx:h,cy:p,innerRadius:v,outerRadius:w,startAngle:c,endAngle:f});return Ai(Ai({},b),{},zB({},S,L))},{})},dce=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-o,2))},hce=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,l=dce({x:n,y:i},{x:a,y:o});if(l<=0)return{radius:l};var c=(n-a)/l,f=Math.acos(c);return i>o&&(f=2*Math.PI-f),{radius:l,angle:uce(f),angleInRadian:f}},pce=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return{startAngle:r-o*360,endAngle:n-o*360}},mce=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),l=Math.min(a,o);return t+l*360},GR=function(t,r){var n=t.x,i=t.y,a=hce({x:n,y:i},r),o=a.radius,l=a.angle,c=r.innerRadius,f=r.outerRadius;if(o<c||o>f)return!1;if(o===0)return!0;var h=pce(r),p=h.startAngle,g=h.endAngle,v=l,w;if(p<=g){for(;v>g;)v-=360;for(;v<p;)v+=360;w=v>=p&&v<=g}else{for(;v>p;)v-=360;for(;v<g;)v+=360;w=v>=g&&v<=p}return w?Ai(Ai({},r),{},{radius:o,angle:mce(v,r)}):null},UB=function(t){return!j.isValidElement(t)&&!qe(t)&&typeof t!="boolean"?t.className:""};function tf(e){"@babel/helpers - typeof";return tf=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},tf(e)}var gce=["offset"];function vce(e){return wce(e)||bce(e)||xce(e)||yce()}function yce(){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 xce(e,t){if(e){if(typeof e=="string")return _S(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _S(e,t)}}function bce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wce(e){if(Array.isArray(e))return _S(e)}function _S(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Sce(e,t){if(e==null)return{};var r=jce(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function jce(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function KR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ht(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KR(Object(r),!0).forEach(function(n){_ce(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _ce(e,t,r){return t=Pce(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pce(e){var t=Ace(e,"string");return tf(t)=="symbol"?t:t+""}function Ace(e,t){if(tf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(tf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rf(){return rf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rf.apply(this,arguments)}var Nce=function(t){var r=t.value,n=t.formatter,i=Qe(t.children)?r:t.children;return qe(n)?n(i):i},Ece=function(t,r){var n=jr(r-t),i=Math.min(Math.abs(r-t),360);return n*i},Oce=function(t,r,n){var i=t.position,a=t.viewBox,o=t.offset,l=t.className,c=a,f=c.cx,h=c.cy,p=c.innerRadius,g=c.outerRadius,v=c.startAngle,w=c.endAngle,y=c.clockWise,b=(p+g)/2,S=Ece(v,w),A=S>=0?1:-1,_,C;i==="insideStart"?(_=v+A*o,C=y):i==="insideEnd"?(_=w-A*o,C=!y):i==="end"&&(_=w+A*o,C=y),C=S<=0?C:!C;var N=yt(f,h,b,_),O=yt(f,h,b,_+(C?1:-1)*359),T="M".concat(N.x,",").concat(N.y,`
|
||
A`).concat(b,",").concat(b,",0,1,").concat(C?0:1,`,
|
||
`).concat(O.x,",").concat(O.y),k=Qe(t.id)?Bf("recharts-radial-line-"):t.id;return U.createElement("text",rf({},n,{dominantBaseline:"central",className:Ye("recharts-radial-bar-label",l)}),U.createElement("defs",null,U.createElement("path",{id:k,d:T})),U.createElement("textPath",{xlinkHref:"#".concat(k)},r))},Cce=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,l=a.cy,c=a.innerRadius,f=a.outerRadius,h=a.startAngle,p=a.endAngle,g=(h+p)/2;if(i==="outside"){var v=yt(o,l,f+n,g),w=v.x,y=v.y;return{x:w,y,textAnchor:w>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var b=(c+f)/2,S=yt(o,l,b,g),A=S.x,_=S.y;return{x:A,y:_,textAnchor:"middle",verticalAnchor:"middle"}},Tce=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,l=o.x,c=o.y,f=o.width,h=o.height,p=h>=0?1:-1,g=p*i,v=p>0?"end":"start",w=p>0?"start":"end",y=f>=0?1:-1,b=y*i,S=y>0?"end":"start",A=y>0?"start":"end";if(a==="top"){var _={x:l+f/2,y:c-p*i,textAnchor:"middle",verticalAnchor:v};return Ht(Ht({},_),n?{height:Math.max(c-n.y,0),width:f}:{})}if(a==="bottom"){var C={x:l+f/2,y:c+h+g,textAnchor:"middle",verticalAnchor:w};return Ht(Ht({},C),n?{height:Math.max(n.y+n.height-(c+h),0),width:f}:{})}if(a==="left"){var N={x:l-b,y:c+h/2,textAnchor:S,verticalAnchor:"middle"};return Ht(Ht({},N),n?{width:Math.max(N.x-n.x,0),height:h}:{})}if(a==="right"){var O={x:l+f+b,y:c+h/2,textAnchor:A,verticalAnchor:"middle"};return Ht(Ht({},O),n?{width:Math.max(n.x+n.width-O.x,0),height:h}:{})}var T=n?{width:f,height:h}:{};return a==="insideLeft"?Ht({x:l+b,y:c+h/2,textAnchor:A,verticalAnchor:"middle"},T):a==="insideRight"?Ht({x:l+f-b,y:c+h/2,textAnchor:S,verticalAnchor:"middle"},T):a==="insideTop"?Ht({x:l+f/2,y:c+g,textAnchor:"middle",verticalAnchor:w},T):a==="insideBottom"?Ht({x:l+f/2,y:c+h-g,textAnchor:"middle",verticalAnchor:v},T):a==="insideTopLeft"?Ht({x:l+b,y:c+g,textAnchor:A,verticalAnchor:w},T):a==="insideTopRight"?Ht({x:l+f-b,y:c+g,textAnchor:S,verticalAnchor:w},T):a==="insideBottomLeft"?Ht({x:l+b,y:c+h-g,textAnchor:A,verticalAnchor:v},T):a==="insideBottomRight"?Ht({x:l+f-b,y:c+h-g,textAnchor:S,verticalAnchor:v},T):Il(a)&&(ve(a.x)||jo(a.x))&&(ve(a.y)||jo(a.y))?Ht({x:l+_r(a.x,f),y:c+_r(a.y,h),textAnchor:"end",verticalAnchor:"end"},T):Ht({x:l+f/2,y:c+h/2,textAnchor:"middle",verticalAnchor:"middle"},T)},kce=function(t){return"cx"in t&&ve(t.cx)};function Gt(e){var t=e.offset,r=t===void 0?5:t,n=Sce(e,gce),i=Ht({offset:r},n),a=i.viewBox,o=i.position,l=i.value,c=i.children,f=i.content,h=i.className,p=h===void 0?"":h,g=i.textBreakAll;if(!a||Qe(l)&&Qe(c)&&!j.isValidElement(f)&&!qe(f))return null;if(j.isValidElement(f))return j.cloneElement(f,i);var v;if(qe(f)){if(v=j.createElement(f,i),j.isValidElement(v))return v}else v=Nce(i);var w=kce(a),y=Fe(i,!0);if(w&&(o==="insideStart"||o==="insideEnd"||o==="end"))return Oce(i,v,y);var b=w?Cce(i):Tce(i);return U.createElement($o,rf({className:Ye("recharts-label",p)},y,b,{breakAll:g}),v)}Gt.displayName="Label";var qB=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,l=t.r,c=t.radius,f=t.innerRadius,h=t.outerRadius,p=t.x,g=t.y,v=t.top,w=t.left,y=t.width,b=t.height,S=t.clockWise,A=t.labelViewBox;if(A)return A;if(ve(y)&&ve(b)){if(ve(p)&&ve(g))return{x:p,y:g,width:y,height:b};if(ve(v)&&ve(w))return{x:v,y:w,width:y,height:b}}return ve(p)&&ve(g)?{x:p,y:g,width:0,height:0}:ve(r)&&ve(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:f||0,outerRadius:h||c||l||0,clockWise:S}:t.viewBox?t.viewBox:{}},Mce=function(t,r){return t?t===!0?U.createElement(Gt,{key:"label-implicit",viewBox:r}):Kt(t)?U.createElement(Gt,{key:"label-implicit",viewBox:r,value:t}):j.isValidElement(t)?t.type===Gt?j.cloneElement(t,{key:"label-implicit",viewBox:r}):U.createElement(Gt,{key:"label-implicit",content:t,viewBox:r}):qe(t)?U.createElement(Gt,{key:"label-implicit",content:t,viewBox:r}):Il(t)?U.createElement(Gt,rf({viewBox:r},t,{key:"label-implicit"})):null:null},Rce=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=qB(t),o=un(i,Gt).map(function(c,f){return j.cloneElement(c,{viewBox:r||a,key:"label-".concat(f)})});if(!n)return o;var l=Mce(t.label,r||a);return[l].concat(vce(o))};Gt.parseViewBox=qB;Gt.renderCallByParent=Rce;var mw,YR;function Ice(){if(YR)return mw;YR=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return mw=e,mw}var Dce=Ice();const $ce=ct(Dce);function nf(e){"@babel/helpers - typeof";return nf=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},nf(e)}var Lce=["valueAccessor"],Bce=["data","dataKey","clockWise","id","textBreakAll"];function Fce(e){return qce(e)||Uce(e)||Vce(e)||zce()}function zce(){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 Vce(e,t){if(e){if(typeof e=="string")return PS(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return PS(e,t)}}function Uce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qce(e){if(Array.isArray(e))return PS(e)}function PS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Mp(){return Mp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mp.apply(this,arguments)}function XR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ZR(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XR(Object(r),!0).forEach(function(n){Wce(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wce(e,t,r){return t=Hce(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hce(e){var t=Gce(e,"string");return nf(t)=="symbol"?t:t+""}function Gce(e,t){if(nf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(nf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QR(e,t){if(e==null)return{};var r=Kce(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Kce(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Yce=function(t){return Array.isArray(t.value)?$ce(t.value):t.value};function Ta(e){var t=e.valueAccessor,r=t===void 0?Yce:t,n=QR(e,Lce),i=n.data,a=n.dataKey,o=n.clockWise,l=n.id,c=n.textBreakAll,f=QR(n,Bce);return!i||!i.length?null:U.createElement(ft,{className:"recharts-label-list"},i.map(function(h,p){var g=Qe(a)?r(h,p):gr(h&&h.payload,a),v=Qe(l)?{}:{id:"".concat(l,"-").concat(p)};return U.createElement(Gt,Mp({},Fe(h,!0),f,v,{parentViewBox:h.parentViewBox,value:g,textBreakAll:c,viewBox:Gt.parseViewBox(Qe(o)?h:ZR(ZR({},h),{},{clockWise:o})),key:"label-".concat(p),index:p}))}))}Ta.displayName="LabelList";function Xce(e,t){return e?e===!0?U.createElement(Ta,{key:"labelList-implicit",data:t}):U.isValidElement(e)||qe(e)?U.createElement(Ta,{key:"labelList-implicit",data:t,content:e}):Il(e)?U.createElement(Ta,Mp({data:t},e,{key:"labelList-implicit"})):null:null}function Zce(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=un(n,Ta).map(function(o,l){return j.cloneElement(o,{data:t,key:"labelList-".concat(l)})});if(!r)return i;var a=Xce(e.label,t);return[a].concat(Fce(i))}Ta.renderCallByParent=Zce;function af(e){"@babel/helpers - typeof";return af=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},af(e)}function AS(){return AS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},AS.apply(this,arguments)}function JR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function eI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JR(Object(r),!0).forEach(function(n){Qce(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qce(e,t,r){return t=Jce(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jce(e){var t=eue(e,"string");return af(t)=="symbol"?t:t+""}function eue(e,t){if(af(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(af(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tue=function(t,r){var n=jr(r-t),i=Math.min(Math.abs(r-t),359.999);return n*i},Ah=function(t){var r=t.cx,n=t.cy,i=t.radius,a=t.angle,o=t.sign,l=t.isExternal,c=t.cornerRadius,f=t.cornerIsExternal,h=c*(l?1:-1)+i,p=Math.asin(c/h)/kp,g=f?a:a+o*p,v=yt(r,n,h,g),w=yt(r,n,i,g),y=f?a-o*p:a,b=yt(r,n,h*Math.cos(p*kp),y);return{center:v,circleTangency:w,lineTangency:b,theta:p}},WB=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,l=t.endAngle,c=tue(o,l),f=o+c,h=yt(r,n,a,o),p=yt(r,n,a,f),g="M ".concat(h.x,",").concat(h.y,`
|
||
A `).concat(a,",").concat(a,`,0,
|
||
`).concat(+(Math.abs(c)>180),",").concat(+(o>f),`,
|
||
`).concat(p.x,",").concat(p.y,`
|
||
`);if(i>0){var v=yt(r,n,i,o),w=yt(r,n,i,f);g+="L ".concat(w.x,",").concat(w.y,`
|
||
A `).concat(i,",").concat(i,`,0,
|
||
`).concat(+(Math.abs(c)>180),",").concat(+(o<=f),`,
|
||
`).concat(v.x,",").concat(v.y," Z")}else g+="L ".concat(r,",").concat(n," Z");return g},rue=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,l=t.forceCornerRadius,c=t.cornerIsExternal,f=t.startAngle,h=t.endAngle,p=jr(h-f),g=Ah({cx:r,cy:n,radius:a,angle:f,sign:p,cornerRadius:o,cornerIsExternal:c}),v=g.circleTangency,w=g.lineTangency,y=g.theta,b=Ah({cx:r,cy:n,radius:a,angle:h,sign:-p,cornerRadius:o,cornerIsExternal:c}),S=b.circleTangency,A=b.lineTangency,_=b.theta,C=c?Math.abs(f-h):Math.abs(f-h)-y-_;if(C<0)return l?"M ".concat(w.x,",").concat(w.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
|
||
`):WB({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:f,endAngle:h});var N="M ".concat(w.x,",").concat(w.y,`
|
||
A`).concat(o,",").concat(o,",0,0,").concat(+(p<0),",").concat(v.x,",").concat(v.y,`
|
||
A`).concat(a,",").concat(a,",0,").concat(+(C>180),",").concat(+(p<0),",").concat(S.x,",").concat(S.y,`
|
||
A`).concat(o,",").concat(o,",0,0,").concat(+(p<0),",").concat(A.x,",").concat(A.y,`
|
||
`);if(i>0){var O=Ah({cx:r,cy:n,radius:i,angle:f,sign:p,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),T=O.circleTangency,k=O.lineTangency,R=O.theta,F=Ah({cx:r,cy:n,radius:i,angle:h,sign:-p,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),I=F.circleTangency,L=F.lineTangency,V=F.theta,Y=c?Math.abs(f-h):Math.abs(f-h)-R-V;if(Y<0&&o===0)return"".concat(N,"L").concat(r,",").concat(n,"Z");N+="L".concat(L.x,",").concat(L.y,`
|
||
A`).concat(o,",").concat(o,",0,0,").concat(+(p<0),",").concat(I.x,",").concat(I.y,`
|
||
A`).concat(i,",").concat(i,",0,").concat(+(Y>180),",").concat(+(p>0),",").concat(T.x,",").concat(T.y,`
|
||
A`).concat(o,",").concat(o,",0,0,").concat(+(p<0),",").concat(k.x,",").concat(k.y,"Z")}else N+="L".concat(r,",").concat(n,"Z");return N},nue={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},HB=function(t){var r=eI(eI({},nue),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,l=r.cornerRadius,c=r.forceCornerRadius,f=r.cornerIsExternal,h=r.startAngle,p=r.endAngle,g=r.className;if(o<a||h===p)return null;var v=Ye("recharts-sector",g),w=o-a,y=_r(l,w,0,!0),b;return y>0&&Math.abs(h-p)<360?b=rue({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(y,w/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:h,endAngle:p}):b=WB({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:h,endAngle:p}),U.createElement("path",AS({},Fe(r,!0),{className:v,d:b,role:"img"}))};function of(e){"@babel/helpers - typeof";return of=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},of(e)}function NS(){return NS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},NS.apply(this,arguments)}function tI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function rI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tI(Object(r),!0).forEach(function(n){iue(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iue(e,t,r){return t=aue(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aue(e){var t=oue(e,"string");return of(t)=="symbol"?t:t+""}function oue(e,t){if(of(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(of(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nI={curveBasisClosed:Ate,curveBasisOpen:Nte,curveBasis:Pte,curveBumpX:fte,curveBumpY:dte,curveLinearClosed:Ete,curveLinear:Bm,curveMonotoneX:Ote,curveMonotoneY:Cte,curveNatural:Tte,curveStep:kte,curveStepAfter:Rte,curveStepBefore:Mte},Nh=function(t){return t.x===+t.x&&t.y===+t.y},Zc=function(t){return t.x},Qc=function(t){return t.y},sue=function(t,r){if(qe(t))return t;var n="curve".concat($m(t));return(n==="curveMonotone"||n==="curveBump")&&r?nI["".concat(n).concat(r==="vertical"?"Y":"X")]:nI[n]||Bm},lue=function(t){var r=t.type,n=r===void 0?"linear":r,i=t.points,a=i===void 0?[]:i,o=t.baseLine,l=t.layout,c=t.connectNulls,f=c===void 0?!1:c,h=sue(n,l),p=f?a.filter(function(y){return Nh(y)}):a,g;if(Array.isArray(o)){var v=f?o.filter(function(y){return Nh(y)}):o,w=p.map(function(y,b){return rI(rI({},y),{},{base:v[b]})});return l==="vertical"?g=yh().y(Qc).x1(Zc).x0(function(y){return y.base.x}):g=yh().x(Zc).y1(Qc).y0(function(y){return y.base.y}),g.defined(Nh).curve(h),g(w)}return l==="vertical"&&ve(o)?g=yh().y(Qc).x1(Zc).x0(o):ve(o)?g=yh().x(Zc).y1(Qc).y0(o):g=q4().x(Zc).y(Qc),g.defined(Nh).curve(h),g(p)},ES=function(t){var r=t.className,n=t.points,i=t.path,a=t.pathRef;if((!n||!n.length)&&!i)return null;var o=n&&n.length?lue(t):i;return U.createElement("path",NS({},Fe(t,!1),sp(t),{className:Ye("recharts-curve",r),d:o,ref:a}))},gw={exports:{}},vw,iI;function cue(){if(iI)return vw;iI=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return vw=e,vw}var yw,aI;function uue(){if(aI)return yw;aI=1;var e=cue();function t(){}function r(){}return r.resetWarningCache=t,yw=function(){function n(o,l,c,f,h,p){if(p!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}n.isRequired=n;function i(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},yw}var oI;function fue(){return oI||(oI=1,gw.exports=uue()()),gw.exports}var due=fue();const lt=ct(due);var hue=Object.getOwnPropertyNames,pue=Object.getOwnPropertySymbols,mue=Object.prototype.hasOwnProperty;function sI(e,t){return function(n,i,a){return e(n,i,a)&&t(n,i,a)}}function Eh(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);var a=i.cache,o=a.get(r),l=a.get(n);if(o&&l)return o===n&&l===r;a.set(r,n),a.set(n,r);var c=e(r,n,i);return a.delete(r),a.delete(n),c}}function lI(e){return hue(e).concat(pue(e))}var gue=Object.hasOwn||function(e,t){return mue.call(e,t)};function Xo(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var vue="__v",yue="__o",xue="_owner",cI=Object.getOwnPropertyDescriptor,uI=Object.keys;function bue(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function wue(e,t){return Xo(e.getTime(),t.getTime())}function Sue(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function jue(e,t){return e===t}function fI(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.entries(),o,l,c=0;(o=a.next())&&!o.done;){for(var f=t.entries(),h=!1,p=0;(l=f.next())&&!l.done;){if(i[p]){p++;continue}var g=o.value,v=l.value;if(r.equals(g[0],v[0],c,p,e,t,r)&&r.equals(g[1],v[1],g[0],v[0],e,t,r)){h=i[p]=!0;break}p++}if(!h)return!1;c++}return!0}var _ue=Xo;function Pue(e,t,r){var n=uI(e),i=n.length;if(uI(t).length!==i)return!1;for(;i-- >0;)if(!GB(e,t,r,n[i]))return!1;return!0}function Jc(e,t,r){var n=lI(e),i=n.length;if(lI(t).length!==i)return!1;for(var a,o,l;i-- >0;)if(a=n[i],!GB(e,t,r,a)||(o=cI(e,a),l=cI(t,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function Aue(e,t){return Xo(e.valueOf(),t.valueOf())}function Nue(e,t){return e.source===t.source&&e.flags===t.flags}function dI(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.values(),o,l;(o=a.next())&&!o.done;){for(var c=t.values(),f=!1,h=0;(l=c.next())&&!l.done;){if(!i[h]&&r.equals(o.value,l.value,o.value,l.value,e,t,r)){f=i[h]=!0;break}h++}if(!f)return!1}return!0}function Eue(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function Oue(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function GB(e,t,r,n){return(n===xue||n===yue||n===vue)&&(e.$$typeof||t.$$typeof)?!0:gue(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var Cue="[object Arguments]",Tue="[object Boolean]",kue="[object Date]",Mue="[object Error]",Rue="[object Map]",Iue="[object Number]",Due="[object Object]",$ue="[object RegExp]",Lue="[object Set]",Bue="[object String]",Fue="[object URL]",zue=Array.isArray,hI=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,pI=Object.assign,Vue=Object.prototype.toString.call.bind(Object.prototype.toString);function Uue(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,i=e.areFunctionsEqual,a=e.areMapsEqual,o=e.areNumbersEqual,l=e.areObjectsEqual,c=e.arePrimitiveWrappersEqual,f=e.areRegExpsEqual,h=e.areSetsEqual,p=e.areTypedArraysEqual,g=e.areUrlsEqual;return function(w,y,b){if(w===y)return!0;if(w==null||y==null)return!1;var S=typeof w;if(S!==typeof y)return!1;if(S!=="object")return S==="number"?o(w,y,b):S==="function"?i(w,y,b):!1;var A=w.constructor;if(A!==y.constructor)return!1;if(A===Object)return l(w,y,b);if(zue(w))return t(w,y,b);if(hI!=null&&hI(w))return p(w,y,b);if(A===Date)return r(w,y,b);if(A===RegExp)return f(w,y,b);if(A===Map)return a(w,y,b);if(A===Set)return h(w,y,b);var _=Vue(w);return _===kue?r(w,y,b):_===$ue?f(w,y,b):_===Rue?a(w,y,b):_===Lue?h(w,y,b):_===Due?typeof w.then!="function"&&typeof y.then!="function"&&l(w,y,b):_===Fue?g(w,y,b):_===Mue?n(w,y,b):_===Cue?l(w,y,b):_===Tue||_===Iue||_===Bue?c(w,y,b):!1}}function que(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?Jc:bue,areDatesEqual:wue,areErrorsEqual:Sue,areFunctionsEqual:jue,areMapsEqual:n?sI(fI,Jc):fI,areNumbersEqual:_ue,areObjectsEqual:n?Jc:Pue,arePrimitiveWrappersEqual:Aue,areRegExpsEqual:Nue,areSetsEqual:n?sI(dI,Jc):dI,areTypedArraysEqual:n?Jc:Eue,areUrlsEqual:Oue};if(r&&(i=pI({},i,r(i))),t){var a=Eh(i.areArraysEqual),o=Eh(i.areMapsEqual),l=Eh(i.areObjectsEqual),c=Eh(i.areSetsEqual);i=pI({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:c})}return i}function Wue(e){return function(t,r,n,i,a,o,l){return e(t,r,l)}}function Hue(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,a=e.strict;if(n)return function(c,f){var h=n(),p=h.cache,g=p===void 0?t?new WeakMap:void 0:p,v=h.meta;return r(c,f,{cache:g,equals:i,meta:v,strict:a})};if(t)return function(c,f){return r(c,f,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(c,f){return r(c,f,o)}}var Gue=qa();qa({strict:!0});qa({circular:!0});qa({circular:!0,strict:!0});qa({createInternalComparator:function(){return Xo}});qa({strict:!0,createInternalComparator:function(){return Xo}});qa({circular:!0,createInternalComparator:function(){return Xo}});qa({circular:!0,createInternalComparator:function(){return Xo},strict:!0});function qa(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,l=que(e),c=Uue(l),f=n?n(c):Wue(c);return Hue({circular:r,comparator:c,createState:i,equals:f,strict:o})}function Kue(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function mI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):Kue(i)};requestAnimationFrame(n)}function OS(e){"@babel/helpers - typeof";return OS=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},OS(e)}function Yue(e){return Jue(e)||Que(e)||Zue(e)||Xue()}function Xue(){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 Zue(e,t){if(e){if(typeof e=="string")return gI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gI(e,t)}}function gI(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Que(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Jue(e){if(Array.isArray(e))return e}function efe(){var e={},t=function(){return null},r=!1,n=function i(a){if(!r){if(Array.isArray(a)){if(!a.length)return;var o=a,l=Yue(o),c=l[0],f=l.slice(1);if(typeof c=="number"){mI(i.bind(null,f),c);return}i(c),mI(i.bind(null,f));return}OS(a)==="object"&&(e=a,t(e)),typeof a=="function"&&a()}};return{stop:function(){r=!0},start:function(a){r=!1,n(a)},subscribe:function(a){return t=a,function(){t=function(){return null}}}}}function sf(e){"@babel/helpers - typeof";return sf=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},sf(e)}function vI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vI(Object(r),!0).forEach(function(n){KB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KB(e,t,r){return t=tfe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tfe(e){var t=rfe(e,"string");return sf(t)==="symbol"?t:String(t)}function rfe(e,t){if(sf(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(sf(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nfe=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,i){return n.filter(function(a){return i.includes(a)})})},ife=function(t){return t},afe=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},xu=function(t,r){return Object.keys(r).reduce(function(n,i){return yI(yI({},n),{},KB({},i,t(i,r[i])))},{})},xI=function(t,r,n){return t.map(function(i){return"".concat(afe(i)," ").concat(r,"ms ").concat(n)}).join(",")};function ofe(e,t){return cfe(e)||lfe(e,t)||YB(e,t)||sfe()}function sfe(){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 lfe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function cfe(e){if(Array.isArray(e))return e}function ufe(e){return hfe(e)||dfe(e)||YB(e)||ffe()}function ffe(){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 YB(e,t){if(e){if(typeof e=="string")return CS(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return CS(e,t)}}function dfe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hfe(e){if(Array.isArray(e))return CS(e)}function CS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Rp=1e-4,XB=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},ZB=function(t,r){return t.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},bI=function(t,r){return function(n){var i=XB(t,r);return ZB(i,n)}},pfe=function(t,r){return function(n){var i=XB(t,r),a=[].concat(ufe(i.map(function(o,l){return o*l}).slice(1)),[0]);return ZB(a,n)}},wI=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0],a=r[1],o=r[2],l=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,a=0,o=1,l=1;break;case"ease":i=.25,a=.1,o=.25,l=1;break;case"ease-in":i=.42,a=0,o=1,l=1;break;case"ease-out":i=.42,a=0,o=.58,l=1;break;case"ease-in-out":i=0,a=0,o=.58,l=1;break;default:{var c=r[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var f=c[1].split(")")[0].split(",").map(function(b){return parseFloat(b)}),h=ofe(f,4);i=h[0],a=h[1],o=h[2],l=h[3]}}}var p=bI(i,o),g=bI(a,l),v=pfe(i,o),w=function(S){return S>1?1:S<0?0:S},y=function(S){for(var A=S>1?1:S,_=A,C=0;C<8;++C){var N=p(_)-A,O=v(_);if(Math.abs(N-A)<Rp||O<Rp)return g(_);_=w(_-N/O)}return g(_)};return y.isStepper=!1,y},mfe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,o=t.dt,l=o===void 0?17:o,c=function(h,p,g){var v=-(h-p)*n,w=g*a,y=g+(v-w)*l/1e3,b=g*l/1e3+h;return Math.abs(b-p)<Rp&&Math.abs(y)<Rp?[p,0]:[b,y]};return c.isStepper=!0,c.dt=l,c},gfe=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return wI(i);case"spring":return mfe();default:if(i.split("(")[0]==="cubic-bezier")return wI(i)}return typeof i=="function"?i:null};function lf(e){"@babel/helpers - typeof";return lf=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},lf(e)}function SI(e){return xfe(e)||yfe(e)||QB(e)||vfe()}function vfe(){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 yfe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xfe(e){if(Array.isArray(e))return kS(e)}function jI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ar(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jI(Object(r),!0).forEach(function(n){TS(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TS(e,t,r){return t=bfe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bfe(e){var t=wfe(e,"string");return lf(t)==="symbol"?t:String(t)}function wfe(e,t){if(lf(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(lf(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sfe(e,t){return Pfe(e)||_fe(e,t)||QB(e,t)||jfe()}function jfe(){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 QB(e,t){if(e){if(typeof e=="string")return kS(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kS(e,t)}}function kS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _fe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function Pfe(e){if(Array.isArray(e))return e}var Ip=function(t,r,n){return t+(r-t)*n},MS=function(t){var r=t.from,n=t.to;return r!==n},Afe=function e(t,r,n){var i=xu(function(a,o){if(MS(o)){var l=t(o.from,o.to,o.velocity),c=Sfe(l,2),f=c[0],h=c[1];return ar(ar({},o),{},{from:f,velocity:h})}return o},r);return n<1?xu(function(a,o){return MS(o)?ar(ar({},o),{},{velocity:Ip(o.velocity,i[a].velocity,n),from:Ip(o.from,i[a].from,n)}):o},r):e(t,i,n-1)};const Nfe=function(e,t,r,n,i){var a=nfe(e,t),o=a.reduce(function(b,S){return ar(ar({},b),{},TS({},S,[e[S],t[S]]))},{}),l=a.reduce(function(b,S){return ar(ar({},b),{},TS({},S,{from:e[S],velocity:0,to:t[S]}))},{}),c=-1,f,h,p=function(){return null},g=function(){return xu(function(S,A){return A.from},l)},v=function(){return!Object.values(l).filter(MS).length},w=function(S){f||(f=S);var A=S-f,_=A/r.dt;l=Afe(r,l,_),i(ar(ar(ar({},e),t),g())),f=S,v()||(c=requestAnimationFrame(p))},y=function(S){h||(h=S);var A=(S-h)/n,_=xu(function(N,O){return Ip.apply(void 0,SI(O).concat([r(A)]))},o);if(i(ar(ar(ar({},e),t),_)),A<1)c=requestAnimationFrame(p);else{var C=xu(function(N,O){return Ip.apply(void 0,SI(O).concat([r(1)]))},o);i(ar(ar(ar({},e),t),C))}};return p=r.isStepper?w:y,function(){return requestAnimationFrame(p),function(){cancelAnimationFrame(c)}}};function sl(e){"@babel/helpers - typeof";return sl=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},sl(e)}var Efe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Ofe(e,t){if(e==null)return{};var r=Cfe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Cfe(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function xw(e){return Rfe(e)||Mfe(e)||kfe(e)||Tfe()}function Tfe(){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 kfe(e,t){if(e){if(typeof e=="string")return RS(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return RS(e,t)}}function Mfe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Rfe(e){if(Array.isArray(e))return RS(e)}function RS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Pn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_I(Object(r),!0).forEach(function(n){au(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_I(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function au(e,t,r){return t=JB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ife(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dfe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,JB(n.key),n)}}function $fe(e,t,r){return t&&Dfe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function JB(e){var t=Lfe(e,"string");return sl(t)==="symbol"?t:String(t)}function Lfe(e,t){if(sl(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(sl(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bfe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&IS(e,t)}function IS(e,t){return IS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},IS(e,t)}function Ffe(e){var t=zfe();return function(){var n=Dp(e),i;if(t){var a=Dp(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return DS(this,i)}}function DS(e,t){if(t&&(sl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $S(e)}function $S(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zfe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Dp(e){return Dp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Dp(e)}var qi=function(e){Bfe(r,e);var t=Ffe(r);function r(n,i){var a;Ife(this,r),a=t.call(this,n,i);var o=a.props,l=o.isActive,c=o.attributeName,f=o.from,h=o.to,p=o.steps,g=o.children,v=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind($S(a)),a.changeStyle=a.changeStyle.bind($S(a)),!l||v<=0)return a.state={style:{}},typeof g=="function"&&(a.state={style:h}),DS(a);if(p&&p.length)a.state={style:p[0].style};else if(f){if(typeof g=="function")return a.state={style:f},DS(a);a.state={style:c?au({},c,f):f}}else a.state={style:{}};return a}return $fe(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,l=a.canBegin,c=a.attributeName,f=a.shouldReAnimate,h=a.to,p=a.from,g=this.state.style;if(l){if(!o){var v={style:c?au({},c,h):h};this.state&&g&&(c&&g[c]!==h||!c&&g!==h)&&this.setState(v);return}if(!(Gue(i.to,h)&&i.canBegin&&i.isActive)){var w=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var y=w||f?p:i.to;if(this.state&&g){var b={style:c?au({},c,y):y};(c&&g[c]!==y||!c&&g!==y)&&this.setState(b)}this.runAnimation(Pn(Pn({},this.props),{},{from:y,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,l=i.to,c=i.duration,f=i.easing,h=i.begin,p=i.onAnimationEnd,g=i.onAnimationStart,v=Nfe(o,l,gfe(f),c,this.changeStyle),w=function(){a.stopJSAnimation=v()};this.manager.start([g,h,w,c,p])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,l=i.begin,c=i.onAnimationStart,f=o[0],h=f.style,p=f.duration,g=p===void 0?0:p,v=function(y,b,S){if(S===0)return y;var A=b.duration,_=b.easing,C=_===void 0?"ease":_,N=b.style,O=b.properties,T=b.onAnimationEnd,k=S>0?o[S-1]:b,R=O||Object.keys(N);if(typeof C=="function"||C==="spring")return[].concat(xw(y),[a.runJSAnimation.bind(a,{from:k.style,to:N,duration:A,easing:C}),A]);var F=xI(R,A,C),I=Pn(Pn(Pn({},k.style),N),{},{transition:F});return[].concat(xw(y),[I,A,T]).filter(ife)};return this.manager.start([c].concat(xw(o.reduce(v,[h,Math.max(g,l)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=efe());var a=i.begin,o=i.duration,l=i.attributeName,c=i.to,f=i.easing,h=i.onAnimationStart,p=i.onAnimationEnd,g=i.steps,v=i.children,w=this.manager;if(this.unSubscribe=w.subscribe(this.handleStyleChange),typeof f=="function"||typeof v=="function"||f==="spring"){this.runJSAnimation(i);return}if(g.length>1){this.runStepAnimation(i);return}var y=l?au({},l,c):c,b=xI(Object.keys(y),o,f);w.start([h,a,Pn(Pn({},y),{},{transition:b}),o,p])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var l=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var c=Ofe(i,Efe),f=j.Children.count(a),h=this.state.style;if(typeof a=="function")return a(h);if(!l||f===0||o<=0)return a;var p=function(v){var w=v.props,y=w.style,b=y===void 0?{}:y,S=w.className,A=j.cloneElement(v,Pn(Pn({},c),{},{style:Pn(Pn({},b),h),className:S}));return A};return f===1?p(j.Children.only(a)):U.createElement("div",null,j.Children.map(a,function(g){return p(g)}))}}]),r}(j.PureComponent);qi.displayName="Animate";qi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};qi.propTypes={from:lt.oneOfType([lt.object,lt.string]),to:lt.oneOfType([lt.object,lt.string]),attributeName:lt.string,duration:lt.number,begin:lt.number,easing:lt.oneOfType([lt.string,lt.func]),steps:lt.arrayOf(lt.shape({duration:lt.number.isRequired,style:lt.object.isRequired,easing:lt.oneOfType([lt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),lt.func]),properties:lt.arrayOf("string"),onAnimationEnd:lt.func})),children:lt.oneOfType([lt.node,lt.func]),isActive:lt.bool,canBegin:lt.bool,onAnimationEnd:lt.func,shouldReAnimate:lt.bool,onAnimationStart:lt.func,onAnimationReStart:lt.func};function cf(e){"@babel/helpers - typeof";return cf=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},cf(e)}function $p(){return $p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$p.apply(this,arguments)}function Vfe(e,t){return Hfe(e)||Wfe(e,t)||qfe(e,t)||Ufe()}function Ufe(){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 qfe(e,t){if(e){if(typeof e=="string")return PI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return PI(e,t)}}function PI(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Wfe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function Hfe(e){if(Array.isArray(e))return e}function AI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function NI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AI(Object(r),!0).forEach(function(n){Gfe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Gfe(e,t,r){return t=Kfe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kfe(e){var t=Yfe(e,"string");return cf(t)=="symbol"?t:t+""}function Yfe(e,t){if(cf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(cf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var EI=function(t,r,n,i,a){var o=Math.min(Math.abs(n)/2,Math.abs(i)/2),l=i>=0?1:-1,c=n>=0?1:-1,f=i>=0&&n>=0||i<0&&n<0?1:0,h;if(o>0&&a instanceof Array){for(var p=[0,0,0,0],g=0,v=4;g<v;g++)p[g]=a[g]>o?o:a[g];h="M".concat(t,",").concat(r+l*p[0]),p[0]>0&&(h+="A ".concat(p[0],",").concat(p[0],",0,0,").concat(f,",").concat(t+c*p[0],",").concat(r)),h+="L ".concat(t+n-c*p[1],",").concat(r),p[1]>0&&(h+="A ".concat(p[1],",").concat(p[1],",0,0,").concat(f,`,
|
||
`).concat(t+n,",").concat(r+l*p[1])),h+="L ".concat(t+n,",").concat(r+i-l*p[2]),p[2]>0&&(h+="A ".concat(p[2],",").concat(p[2],",0,0,").concat(f,`,
|
||
`).concat(t+n-c*p[2],",").concat(r+i)),h+="L ".concat(t+c*p[3],",").concat(r+i),p[3]>0&&(h+="A ".concat(p[3],",").concat(p[3],",0,0,").concat(f,`,
|
||
`).concat(t,",").concat(r+i-l*p[3])),h+="Z"}else if(o>0&&a===+a&&a>0){var w=Math.min(o,a);h="M ".concat(t,",").concat(r+l*w,`
|
||
A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(t+c*w,",").concat(r,`
|
||
L `).concat(t+n-c*w,",").concat(r,`
|
||
A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(t+n,",").concat(r+l*w,`
|
||
L `).concat(t+n,",").concat(r+i-l*w,`
|
||
A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(t+n-c*w,",").concat(r+i,`
|
||
L `).concat(t+c*w,",").concat(r+i,`
|
||
A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(t,",").concat(r+i-l*w," Z")}else h="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return h},Xfe=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,l=r.width,c=r.height;if(Math.abs(l)>0&&Math.abs(c)>0){var f=Math.min(a,a+l),h=Math.max(a,a+l),p=Math.min(o,o+c),g=Math.max(o,o+c);return n>=f&&n<=h&&i>=p&&i<=g}return!1},Zfe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},_P=function(t){var r=NI(NI({},Zfe),t),n=j.useRef(),i=j.useState(-1),a=Vfe(i,2),o=a[0],l=a[1];j.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var C=n.current.getTotalLength();C&&l(C)}catch{}},[]);var c=r.x,f=r.y,h=r.width,p=r.height,g=r.radius,v=r.className,w=r.animationEasing,y=r.animationDuration,b=r.animationBegin,S=r.isAnimationActive,A=r.isUpdateAnimationActive;if(c!==+c||f!==+f||h!==+h||p!==+p||h===0||p===0)return null;var _=Ye("recharts-rectangle",v);return A?U.createElement(qi,{canBegin:o>0,from:{width:h,height:p,x:c,y:f},to:{width:h,height:p,x:c,y:f},duration:y,animationEasing:w,isActive:A},function(C){var N=C.width,O=C.height,T=C.x,k=C.y;return U.createElement(qi,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:y,isActive:S,easing:w},U.createElement("path",$p({},Fe(r,!0),{className:_,d:EI(T,k,N,O,g),ref:n})))}):U.createElement("path",$p({},Fe(r,!0),{className:_,d:EI(c,f,h,p,g)}))},Qfe=["points","className","baseLinePoints","connectNulls"];function Fs(){return Fs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fs.apply(this,arguments)}function Jfe(e,t){if(e==null)return{};var r=ede(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ede(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function OI(e){return ide(e)||nde(e)||rde(e)||tde()}function tde(){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 rde(e,t){if(e){if(typeof e=="string")return LS(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return LS(e,t)}}function nde(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ide(e){if(Array.isArray(e))return LS(e)}function LS(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var CI=function(t){return t&&t.x===+t.x&&t.y===+t.y},ade=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){CI(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),CI(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},bu=function(t,r){var n=ade(t);r&&(n=[n.reduce(function(a,o){return[].concat(OI(a),OI(o))},[])]);var i=n.map(function(a){return a.reduce(function(o,l,c){return"".concat(o).concat(c===0?"M":"L").concat(l.x,",").concat(l.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},ode=function(t,r,n){var i=bu(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(bu(r.reverse(),n).slice(1))},sde=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,a=t.connectNulls,o=Jfe(t,Qfe);if(!r||!r.length)return null;var l=Ye("recharts-polygon",n);if(i&&i.length){var c=o.stroke&&o.stroke!=="none",f=ode(r,i,a);return U.createElement("g",{className:l},U.createElement("path",Fs({},Fe(o,!0),{fill:f.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:f})),c?U.createElement("path",Fs({},Fe(o,!0),{fill:"none",d:bu(r,a)})):null,c?U.createElement("path",Fs({},Fe(o,!0),{fill:"none",d:bu(i,a)})):null)}var h=bu(r,a);return U.createElement("path",Fs({},Fe(o,!0),{fill:h.slice(-1)==="Z"?o.fill:"none",className:l,d:h}))};function BS(){return BS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},BS.apply(this,arguments)}var PP=function(t){var r=t.cx,n=t.cy,i=t.r,a=t.className,o=Ye("recharts-dot",a);return r===+r&&n===+n&&i===+i?U.createElement("circle",BS({},Fe(t,!1),sp(t),{className:o,cx:r,cy:n,r:i})):null};function uf(e){"@babel/helpers - typeof";return uf=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},uf(e)}var lde=["x","y","top","left","width","height","className"];function FS(){return FS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},FS.apply(this,arguments)}function TI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cde(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?TI(Object(r),!0).forEach(function(n){ude(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):TI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ude(e,t,r){return t=fde(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fde(e){var t=dde(e,"string");return uf(t)=="symbol"?t:t+""}function dde(e,t){if(uf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(uf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hde(e,t){if(e==null)return{};var r=pde(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pde(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var mde=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},gde=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,l=o===void 0?0:o,c=t.left,f=c===void 0?0:c,h=t.width,p=h===void 0?0:h,g=t.height,v=g===void 0?0:g,w=t.className,y=hde(t,lde),b=cde({x:n,y:a,top:l,left:f,width:p,height:v},y);return!ve(n)||!ve(a)||!ve(p)||!ve(v)||!ve(l)||!ve(f)?null:U.createElement("path",FS({},Fe(b,!0),{className:Ye("recharts-cross",w),d:mde(n,a,p,v,l,f)}))},bw,kI;function vde(){if(kI)return bw;kI=1;var e=Zm(),t=pB(),r=ci();function n(i,a){return i&&i.length?e(i,r(a,2),t):void 0}return bw=n,bw}var yde=vde();const xde=ct(yde);var ww,MI;function bde(){if(MI)return ww;MI=1;var e=Zm(),t=ci(),r=mB();function n(i,a){return i&&i.length?e(i,t(a,2),r):void 0}return ww=n,ww}var wde=bde();const Sde=ct(wde);var jde=["cx","cy","angle","ticks","axisLine"],_de=["ticks","tick","angle","tickFormatter","stroke"];function ll(e){"@babel/helpers - typeof";return ll=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},ll(e)}function wu(){return wu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wu.apply(this,arguments)}function RI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RI(Object(r),!0).forEach(function(n){ig(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function II(e,t){if(e==null)return{};var r=Pde(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Pde(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Ade(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tF(n.key),n)}}function Nde(e,t,r){return t&&DI(e.prototype,t),r&&DI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ede(e,t,r){return t=Lp(t),Ode(e,eF()?Reflect.construct(t,r||[],Lp(e).constructor):t.apply(e,r))}function Ode(e,t){if(t&&(ll(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Cde(e)}function Cde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(eF=function(){return!!e})()}function Lp(e){return Lp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Lp(e)}function Tde(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zS(e,t)}function zS(e,t){return zS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},zS(e,t)}function ig(e,t,r){return t=tF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tF(e){var t=kde(e,"string");return ll(t)=="symbol"?t:t+""}function kde(e,t){if(ll(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ll(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ag=function(e){function t(){return Ade(this,t),Ede(this,t,arguments)}return Tde(t,e),Nde(t,[{key:"getTickValueCoord",value:function(n){var i=n.coordinate,a=this.props,o=a.angle,l=a.cx,c=a.cy;return yt(l,c,i,o)}},{key:"getTickTextAnchor",value:function(){var n=this.props.orientation,i;switch(n){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.angle,l=n.ticks,c=xde(l,function(h){return h.coordinate||0}),f=Sde(l,function(h){return h.coordinate||0});return{cx:i,cy:a,startAngle:o,endAngle:o,innerRadius:f.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.angle,l=n.ticks,c=n.axisLine,f=II(n,jde),h=l.reduce(function(w,y){return[Math.min(w[0],y.coordinate),Math.max(w[1],y.coordinate)]},[1/0,-1/0]),p=yt(i,a,h[0],o),g=yt(i,a,h[1],o),v=fo(fo(fo({},Fe(f,!1)),{},{fill:"none"},Fe(c,!1)),{},{x1:p.x,y1:p.y,x2:g.x,y2:g.y});return U.createElement("line",wu({className:"recharts-polar-radius-axis-line"},v))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,l=i.angle,c=i.tickFormatter,f=i.stroke,h=II(i,_de),p=this.getTickTextAnchor(),g=Fe(h,!1),v=Fe(o,!1),w=a.map(function(y,b){var S=n.getTickValueCoord(y),A=fo(fo(fo(fo({textAnchor:p,transform:"rotate(".concat(90-l,", ").concat(S.x,", ").concat(S.y,")")},g),{},{stroke:"none",fill:f},v),{},{index:b},S),{},{payload:y});return U.createElement(ft,wu({className:Ye("recharts-polar-radius-axis-tick",UB(o)),key:"tick-".concat(y.coordinate)},Do(n.props,y,b)),t.renderTickItem(o,A,c?c(y.value,b):y.value))});return U.createElement(ft,{className:"recharts-polar-radius-axis-ticks"},w)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.axisLine,o=n.tick;return!i||!i.length?null:U.createElement(ft,{className:Ye("recharts-polar-radius-axis",this.props.className)},a&&this.renderAxisLine(),o&&this.renderTicks(),Gt.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(n,i,a){var o;return U.isValidElement(n)?o=U.cloneElement(n,i):qe(n)?o=n(i):o=U.createElement($o,wu({},i,{className:"recharts-polar-radius-axis-tick-value"}),a),o}}])}(j.PureComponent);ig(ag,"displayName","PolarRadiusAxis");ig(ag,"axisType","radiusAxis");ig(ag,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function cl(e){"@babel/helpers - typeof";return cl=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},cl(e)}function vo(){return vo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vo.apply(this,arguments)}function $I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ho(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$I(Object(r),!0).forEach(function(n){og(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$I(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,nF(n.key),n)}}function Rde(e,t,r){return t&&LI(e.prototype,t),r&&LI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ide(e,t,r){return t=Bp(t),Dde(e,rF()?Reflect.construct(t,r||[],Bp(e).constructor):t.apply(e,r))}function Dde(e,t){if(t&&(cl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $de(e)}function $de(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rF=function(){return!!e})()}function Bp(e){return Bp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Bp(e)}function Lde(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&VS(e,t)}function VS(e,t){return VS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},VS(e,t)}function og(e,t,r){return t=nF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nF(e){var t=Bde(e,"string");return cl(t)=="symbol"?t:t+""}function Bde(e,t){if(cl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(cl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Fde=Math.PI/180,zde=1e-5,sg=function(e){function t(){return Mde(this,t),Ide(this,t,arguments)}return Lde(t,e),Rde(t,[{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.cx,o=i.cy,l=i.radius,c=i.orientation,f=i.tickSize,h=f||8,p=yt(a,o,l,n.coordinate),g=yt(a,o,l+(c==="inner"?-1:1)*h,n.coordinate);return{x1:p.x,y1:p.y,x2:g.x,y2:g.y}}},{key:"getTickTextAnchor",value:function(n){var i=this.props.orientation,a=Math.cos(-n.coordinate*Fde),o;return a>zde?o=i==="outer"?"start":"end":a<-1e-5?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.radius,l=n.axisLine,c=n.axisLineType,f=ho(ho({},Fe(this.props,!1)),{},{fill:"none"},Fe(l,!1));if(c==="circle")return U.createElement(PP,vo({className:"recharts-polar-angle-axis-line"},f,{cx:i,cy:a,r:o}));var h=this.props.ticks,p=h.map(function(g){return yt(i,a,o,g.coordinate)});return U.createElement(sde,vo({className:"recharts-polar-angle-axis-line"},f,{points:p}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,l=i.tickLine,c=i.tickFormatter,f=i.stroke,h=Fe(this.props,!1),p=Fe(o,!1),g=ho(ho({},h),{},{fill:"none"},Fe(l,!1)),v=a.map(function(w,y){var b=n.getTickLineCoord(w),S=n.getTickTextAnchor(w),A=ho(ho(ho({textAnchor:S},h),{},{stroke:"none",fill:f},p),{},{index:y,payload:w,x:b.x2,y:b.y2});return U.createElement(ft,vo({className:Ye("recharts-polar-angle-axis-tick",UB(o)),key:"tick-".concat(w.coordinate)},Do(n.props,w,y)),l&&U.createElement("line",vo({className:"recharts-polar-angle-axis-tick-line"},g,b)),o&&t.renderTickItem(o,A,c?c(w.value,y):w.value))});return U.createElement(ft,{className:"recharts-polar-angle-axis-ticks"},v)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,o=n.axisLine;return a<=0||!i||!i.length?null:U.createElement(ft,{className:Ye("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var o;return U.isValidElement(n)?o=U.cloneElement(n,i):qe(n)?o=n(i):o=U.createElement($o,vo({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}])}(j.PureComponent);og(sg,"displayName","PolarAngleAxis");og(sg,"axisType","angleAxis");og(sg,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var Sw,BI;function Vde(){if(BI)return Sw;BI=1;var e=h5(),t=e(Object.getPrototypeOf,Object);return Sw=t,Sw}var jw,FI;function Ude(){if(FI)return jw;FI=1;var e=Ki(),t=Vde(),r=Yi(),n="[object Object]",i=Function.prototype,a=Object.prototype,o=i.toString,l=a.hasOwnProperty,c=o.call(Object);function f(h){if(!r(h)||e(h)!=n)return!1;var p=t(h);if(p===null)return!0;var g=l.call(p,"constructor")&&p.constructor;return typeof g=="function"&&g instanceof g&&o.call(g)==c}return jw=f,jw}var qde=Ude();const Wde=ct(qde);var _w,zI;function Hde(){if(zI)return _w;zI=1;var e=Ki(),t=Yi(),r="[object Boolean]";function n(i){return i===!0||i===!1||t(i)&&e(i)==r}return _w=n,_w}var Gde=Hde();const Kde=ct(Gde);function ff(e){"@babel/helpers - typeof";return ff=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},ff(e)}function Fp(){return Fp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fp.apply(this,arguments)}function Yde(e,t){return Jde(e)||Qde(e,t)||Zde(e,t)||Xde()}function Xde(){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 Zde(e,t){if(e){if(typeof e=="string")return VI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return VI(e,t)}}function VI(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Qde(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function Jde(e){if(Array.isArray(e))return e}function UI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UI(Object(r),!0).forEach(function(n){ehe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ehe(e,t,r){return t=the(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function the(e){var t=rhe(e,"string");return ff(t)=="symbol"?t:t+""}function rhe(e,t){if(ff(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ff(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var WI=function(t,r,n,i,a){var o=n-i,l;return l="M ".concat(t,",").concat(r),l+="L ".concat(t+n,",").concat(r),l+="L ".concat(t+n-o/2,",").concat(r+a),l+="L ".concat(t+n-o/2-i,",").concat(r+a),l+="L ".concat(t,",").concat(r," Z"),l},nhe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},ihe=function(t){var r=qI(qI({},nhe),t),n=j.useRef(),i=j.useState(-1),a=Yde(i,2),o=a[0],l=a[1];j.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var _=n.current.getTotalLength();_&&l(_)}catch{}},[]);var c=r.x,f=r.y,h=r.upperWidth,p=r.lowerWidth,g=r.height,v=r.className,w=r.animationEasing,y=r.animationDuration,b=r.animationBegin,S=r.isUpdateAnimationActive;if(c!==+c||f!==+f||h!==+h||p!==+p||g!==+g||h===0&&p===0||g===0)return null;var A=Ye("recharts-trapezoid",v);return S?U.createElement(qi,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:g,x:c,y:f},to:{upperWidth:h,lowerWidth:p,height:g,x:c,y:f},duration:y,animationEasing:w,isActive:S},function(_){var C=_.upperWidth,N=_.lowerWidth,O=_.height,T=_.x,k=_.y;return U.createElement(qi,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:y,easing:w},U.createElement("path",Fp({},Fe(r,!0),{className:A,d:WI(T,k,C,N,O),ref:n})))}):U.createElement("g",null,U.createElement("path",Fp({},Fe(r,!0),{className:A,d:WI(c,f,h,p,g)})))},ahe=["option","shapeType","propTransformer","activeClassName","isActive"];function df(e){"@babel/helpers - typeof";return df=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},df(e)}function ohe(e,t){if(e==null)return{};var r=she(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function she(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function HI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HI(Object(r),!0).forEach(function(n){lhe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lhe(e,t,r){return t=che(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function che(e){var t=uhe(e,"string");return df(t)=="symbol"?t:t+""}function uhe(e,t){if(df(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(df(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fhe(e,t){return zp(zp({},t),e)}function dhe(e,t){return e==="symbols"}function GI(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return U.createElement(_P,r);case"trapezoid":return U.createElement(ihe,r);case"sector":return U.createElement(HB,r);case"symbols":if(dhe(t))return U.createElement(V_,r);break;default:return null}}function hhe(e){return j.isValidElement(e)?e.props:e}function iF(e){var t=e.option,r=e.shapeType,n=e.propTransformer,i=n===void 0?fhe:n,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,l=e.isActive,c=ohe(e,ahe),f;if(j.isValidElement(t))f=j.cloneElement(t,zp(zp({},c),hhe(t)));else if(qe(t))f=t(c);else if(Wde(t)&&!Kde(t)){var h=i(t,c);f=U.createElement(GI,{shapeType:r,elementProps:h})}else{var p=c;f=U.createElement(GI,{shapeType:r,elementProps:p})}return l?U.createElement(ft,{className:o},f):f}function lg(e,t){return t!=null&&"trapezoids"in e.props}function cg(e,t){return t!=null&&"sectors"in e.props}function hf(e,t){return t!=null&&"points"in e.props}function phe(e,t){var r,n,i=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,a=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return i&&a}function mhe(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function ghe(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function vhe(e,t){var r;return lg(e,t)?r=phe:cg(e,t)?r=mhe:hf(e,t)&&(r=ghe),r}function yhe(e,t){var r;return lg(e,t)?r="trapezoids":cg(e,t)?r="sectors":hf(e,t)&&(r="points"),r}function xhe(e,t){if(lg(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(cg(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return hf(e,t)?t.payload:{}}function bhe(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=yhe(r,t),a=xhe(r,t),o=n.filter(function(c,f){var h=eg(a,c),p=r.props[i].filter(function(w){var y=vhe(r,t);return y(w,t)}),g=r.props[i].indexOf(p[p.length-1]),v=f===g;return h&&v}),l=n.indexOf(o[o.length-1]);return l}var Hh;function ul(e){"@babel/helpers - typeof";return ul=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},ul(e)}function zs(){return zs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zs.apply(this,arguments)}function KI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KI(Object(r),!0).forEach(function(n){sn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function whe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,oF(n.key),n)}}function She(e,t,r){return t&&YI(e.prototype,t),r&&YI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function jhe(e,t,r){return t=Vp(t),_he(e,aF()?Reflect.construct(t,r||[],Vp(e).constructor):t.apply(e,r))}function _he(e,t){if(t&&(ul(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Phe(e)}function Phe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(aF=function(){return!!e})()}function Vp(e){return Vp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Vp(e)}function Ahe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&US(e,t)}function US(e,t){return US=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},US(e,t)}function sn(e,t,r){return t=oF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oF(e){var t=Nhe(e,"string");return ul(t)=="symbol"?t:t+""}function Nhe(e,t){if(ul(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ul(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Zi=function(e){function t(r){var n;return whe(this,t),n=jhe(this,t,[r]),sn(n,"pieRef",null),sn(n,"sectorRefs",[]),sn(n,"id",Bf("recharts-pie-")),sn(n,"handleAnimationEnd",function(){var i=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),qe(i)&&i()}),sn(n,"handleAnimationStart",function(){var i=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),qe(i)&&i()}),n.state={isAnimationFinished:!r.isAnimationActive,prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,sectorToFocus:0},n}return Ahe(t,e),She(t,[{key:"isActiveIndex",value:function(n){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(n)!==-1:n===i}},{key:"hasActiveIndex",value:function(){var n=this.props.activeIndex;return Array.isArray(n)?n.length!==0:n||n===0}},{key:"renderLabels",value:function(n){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.label,l=a.labelLine,c=a.dataKey,f=a.valueKey,h=Fe(this.props,!1),p=Fe(o,!1),g=Fe(l,!1),v=o&&o.offsetRadius||20,w=n.map(function(y,b){var S=(y.startAngle+y.endAngle)/2,A=yt(y.cx,y.cy,y.outerRadius+v,S),_=gt(gt(gt(gt({},h),y),{},{stroke:"none"},p),{},{index:b,textAnchor:t.getTextAnchor(A.x,y.cx)},A),C=gt(gt(gt(gt({},h),y),{},{fill:"none",stroke:y.fill},g),{},{index:b,points:[yt(y.cx,y.cy,y.outerRadius,S),A]}),N=c;return Qe(c)&&Qe(f)?N="value":Qe(c)&&(N=f),U.createElement(ft,{key:"label-".concat(y.startAngle,"-").concat(y.endAngle,"-").concat(y.midAngle,"-").concat(b)},l&&t.renderLabelLineItem(l,C,"line"),t.renderLabelItem(o,_,gr(y,N)))});return U.createElement(ft,{className:"recharts-pie-labels"},w)}},{key:"renderSectorsStatically",value:function(n){var i=this,a=this.props,o=a.activeShape,l=a.blendStroke,c=a.inactiveShape;return n.map(function(f,h){if((f==null?void 0:f.startAngle)===0&&(f==null?void 0:f.endAngle)===0&&n.length!==1)return null;var p=i.isActiveIndex(h),g=c&&i.hasActiveIndex()?c:null,v=p?o:g,w=gt(gt({},f),{},{stroke:l?f.fill:f.stroke,tabIndex:-1});return U.createElement(ft,zs({ref:function(b){b&&!i.sectorRefs.includes(b)&&i.sectorRefs.push(b)},tabIndex:-1,className:"recharts-pie-sector"},Do(i.props,f,h),{key:"sector-".concat(f==null?void 0:f.startAngle,"-").concat(f==null?void 0:f.endAngle,"-").concat(f.midAngle,"-").concat(h)}),U.createElement(iF,zs({option:v,isActive:p,shapeType:"sector"},w)))})}},{key:"renderSectorsWithAnimation",value:function(){var n=this,i=this.props,a=i.sectors,o=i.isAnimationActive,l=i.animationBegin,c=i.animationDuration,f=i.animationEasing,h=i.animationId,p=this.state,g=p.prevSectors,v=p.prevIsAnimationActive;return U.createElement(qi,{begin:l,duration:c,isActive:o,easing:f,from:{t:0},to:{t:1},key:"pie-".concat(h,"-").concat(v),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(w){var y=w.t,b=[],S=a&&a[0],A=S.startAngle;return a.forEach(function(_,C){var N=g&&g[C],O=C>0?Hr(_,"paddingAngle",0):0;if(N){var T=_a(N.endAngle-N.startAngle,_.endAngle-_.startAngle),k=gt(gt({},_),{},{startAngle:A+O,endAngle:A+T(y)+O});b.push(k),A=k.endAngle}else{var R=_.endAngle,F=_.startAngle,I=_a(0,R-F),L=I(y),V=gt(gt({},_),{},{startAngle:A+O,endAngle:A+L+O});b.push(V),A=V.endAngle}}),U.createElement(ft,null,n.renderSectorsStatically(b))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var l=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[l].focus(),i.setState({sectorToFocus:l});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,a=n.isAnimationActive,o=this.state.prevSectors;return a&&i&&i.length&&(!o||!eg(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,a=i.hide,o=i.sectors,l=i.className,c=i.label,f=i.cx,h=i.cy,p=i.innerRadius,g=i.outerRadius,v=i.isAnimationActive,w=this.state.isAnimationFinished;if(a||!o||!o.length||!ve(f)||!ve(h)||!ve(p)||!ve(g))return null;var y=Ye("recharts-pie",l);return U.createElement(ft,{tabIndex:this.props.rootTabIndex,className:y,ref:function(S){n.pieRef=S}},this.renderSectors(),c&&this.renderLabels(o),Gt.renderCallByParent(this.props,null,!1),(!v||w)&&Ta.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(n,i,a){if(U.isValidElement(n))return U.cloneElement(n,i);if(qe(n))return n(i);var o=Ye("recharts-pie-label-line",typeof n!="boolean"?n.className:"");return U.createElement(ES,zs({},i,{key:a,type:"linear",className:o}))}},{key:"renderLabelItem",value:function(n,i,a){if(U.isValidElement(n))return U.cloneElement(n,i);var o=a;if(qe(n)&&(o=n(i),U.isValidElement(o)))return o;var l=Ye("recharts-pie-label-text",typeof n!="boolean"&&!qe(n)?n.className:"");return U.createElement($o,zs({},i,{alignmentBaseline:"middle",className:l}),o)}}])}(j.PureComponent);Hh=Zi;sn(Zi,"displayName","Pie");sn(Zi,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!$l.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});sn(Zi,"parseDeltaAngle",function(e,t){var r=jr(t-e),n=Math.min(Math.abs(t-e),360);return r*n});sn(Zi,"getRealPieData",function(e){var t=e.data,r=e.children,n=Fe(e,!1),i=un(r,qm);return t&&t.length?t.map(function(a,o){return gt(gt(gt({payload:a},n),a),i&&i[o]&&i[o].props)}):i&&i.length?i.map(function(a){return gt(gt({},n),a.props)}):[]});sn(Zi,"parseCoordinateOfPie",function(e,t){var r=t.top,n=t.left,i=t.width,a=t.height,o=VB(i,a),l=n+_r(e.cx,i,i/2),c=r+_r(e.cy,a,a/2),f=_r(e.innerRadius,o,0),h=_r(e.outerRadius,o,o*.8),p=e.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:l,cy:c,innerRadius:f,outerRadius:h,maxRadius:p}});sn(Zi,"getComposedData",function(e){var t=e.item,r=e.offset,n=t.type.defaultProps!==void 0?gt(gt({},t.type.defaultProps),t.props):t.props,i=Hh.getRealPieData(n);if(!i||!i.length)return null;var a=n.cornerRadius,o=n.startAngle,l=n.endAngle,c=n.paddingAngle,f=n.dataKey,h=n.nameKey,p=n.valueKey,g=n.tooltipType,v=Math.abs(n.minAngle),w=Hh.parseCoordinateOfPie(n,r),y=Hh.parseDeltaAngle(o,l),b=Math.abs(y),S=f;Qe(f)&&Qe(p)?(kn(!1,`Use "dataKey" to specify the value of pie,
|
||
the props "valueKey" will be deprecated in 1.1.0`),S="value"):Qe(f)&&(kn(!1,`Use "dataKey" to specify the value of pie,
|
||
the props "valueKey" will be deprecated in 1.1.0`),S=p);var A=i.filter(function(k){return gr(k,S,0)!==0}).length,_=(b>=360?A:A-1)*c,C=b-A*v-_,N=i.reduce(function(k,R){var F=gr(R,S,0);return k+(ve(F)?F:0)},0),O;if(N>0){var T;O=i.map(function(k,R){var F=gr(k,S,0),I=gr(k,h,R),L=(ve(F)?F:0)/N,V;R?V=T.endAngle+jr(y)*c*(F!==0?1:0):V=o;var Y=V+jr(y)*((F!==0?v:0)+L*C),K=(V+Y)/2,z=(w.innerRadius+w.outerRadius)/2,G=[{name:I,value:F,payload:k,dataKey:S,type:g}],D=yt(w.cx,w.cy,z,K);return T=gt(gt(gt({percent:L,cornerRadius:a,name:I,tooltipPayload:G,midAngle:K,middleRadius:z,tooltipPosition:D},k),w),{},{value:gr(k,S),startAngle:V,endAngle:Y,payload:k,paddingAngle:jr(y)*c}),T})}return gt(gt({},w),{},{sectors:O,data:i})});var Pw,XI;function Ehe(){if(XI)return Pw;XI=1;var e=Math.ceil,t=Math.max;function r(n,i,a,o){for(var l=-1,c=t(e((i-n)/(a||1)),0),f=Array(c);c--;)f[o?c:++l]=n,n+=a;return f}return Pw=r,Pw}var Aw,ZI;function sF(){if(ZI)return Aw;ZI=1;var e=O5(),t=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-1/0){var a=i<0?-1:1;return a*r}return i===i?i:0}return Aw=n,Aw}var Nw,QI;function Ohe(){if(QI)return Nw;QI=1;var e=Ehe(),t=Um(),r=sF();function n(i){return function(a,o,l){return l&&typeof l!="number"&&t(a,o,l)&&(o=l=void 0),a=r(a),o===void 0?(o=a,a=0):o=r(o),l=l===void 0?a<o?1:-1:r(l),e(a,o,l,i)}}return Nw=n,Nw}var Ew,JI;function Che(){if(JI)return Ew;JI=1;var e=Ohe(),t=e();return Ew=t,Ew}var The=Che();const Up=ct(The);function pf(e){"@babel/helpers - typeof";return pf=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},pf(e)}function eD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eD(Object(r),!0).forEach(function(n){lF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lF(e,t,r){return t=khe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function khe(e){var t=Mhe(e,"string");return pf(t)=="symbol"?t:t+""}function Mhe(e,t){if(pf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rhe=["Webkit","Moz","O","ms"],Ihe=function(t,r){var n=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=Rhe.reduce(function(a,o){return tD(tD({},a),{},lF({},o+n,r))},{});return i[t]=r,i};function fl(e){"@babel/helpers - typeof";return fl=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},fl(e)}function qp(){return qp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qp.apply(this,arguments)}function rD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ow(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rD(Object(r),!0).forEach(function(n){Vr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Dhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nD(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,uF(n.key),n)}}function $he(e,t,r){return t&&nD(e.prototype,t),r&&nD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lhe(e,t,r){return t=Wp(t),Bhe(e,cF()?Reflect.construct(t,r||[],Wp(e).constructor):t.apply(e,r))}function Bhe(e,t){if(t&&(fl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fhe(e)}function Fhe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cF=function(){return!!e})()}function Wp(e){return Wp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Wp(e)}function zhe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qS(e,t)}function qS(e,t){return qS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},qS(e,t)}function Vr(e,t,r){return t=uF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uF(e){var t=Vhe(e,"string");return fl(t)=="symbol"?t:t+""}function Vhe(e,t){if(fl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Uhe=function(t){var r=t.data,n=t.startIndex,i=t.endIndex,a=t.x,o=t.width,l=t.travellerWidth;if(!r||!r.length)return{};var c=r.length,f=vu().domain(Up(0,c)).range([a,a+o-l]),h=f.domain().map(function(p){return f(p)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:f(n),endX:f(i),scale:f,scaleValues:h}},iD=function(t){return t.changedTouches&&!!t.changedTouches.length},dl=function(e){function t(r){var n;return Dhe(this,t),n=Lhe(this,t,[r]),Vr(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),Vr(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),Vr(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,l=i.startIndex;o==null||o({endIndex:a,startIndex:l})}),n.detachDragEndListener()}),Vr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Vr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Vr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Vr(n,"handleSlideDragStart",function(i){var a=iD(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return zhe(t,e),$he(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,o=this.state.scaleValues,l=this.props,c=l.gap,f=l.data,h=f.length-1,p=Math.min(i,a),g=Math.max(i,a),v=t.getIndexInRange(o,p),w=t.getIndexInRange(o,g);return{startIndex:v-v%c,endIndex:w===h?h:w-w%c}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,l=i.dataKey,c=gr(a[n],l,n);return qe(o)?o(c,n):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var i=this.state,a=i.slideMoveStartX,o=i.startX,l=i.endX,c=this.props,f=c.x,h=c.width,p=c.travellerWidth,g=c.startIndex,v=c.endIndex,w=c.onChange,y=n.pageX-a;y>0?y=Math.min(y,f+h-p-l,f+h-p-o):y<0&&(y=Math.max(y,f-o,f-l));var b=this.getIndex({startX:o+y,endX:l+y});(b.startIndex!==g||b.endIndex!==v)&&w&&w(b),this.setState({startX:o+y,endX:l+y,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=iD(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,l=i.endX,c=i.startX,f=this.state[o],h=this.props,p=h.x,g=h.width,v=h.travellerWidth,w=h.onChange,y=h.gap,b=h.data,S={startX:this.state.startX,endX:this.state.endX},A=n.pageX-a;A>0?A=Math.min(A,p+g-v-f):A<0&&(A=Math.max(A,p-f)),S[o]=f+A;var _=this.getIndex(S),C=_.startIndex,N=_.endIndex,O=function(){var k=b.length-1;return o==="startX"&&(l>c?C%y===0:N%y===0)||l<c&&N===k||o==="endX"&&(l>c?N%y===0:C%y===0)||l>c&&N===k};this.setState(Vr(Vr({},o,f+A),"brushMoveStartX",n.pageX),function(){w&&O()&&w(_)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,l=o.scaleValues,c=o.startX,f=o.endX,h=this.state[i],p=l.indexOf(h);if(p!==-1){var g=p+n;if(!(g===-1||g>=l.length)){var v=l[g];i==="startX"&&v>=f||i==="endX"&&v<=c||this.setState(Vr({},i,v),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,l=n.height,c=n.fill,f=n.stroke;return U.createElement("rect",{stroke:f,fill:c,x:i,y:a,width:o,height:l})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,l=n.height,c=n.data,f=n.children,h=n.padding,p=j.Children.only(f);return p?U.cloneElement(p,{x:i,y:a,width:o,height:l,margin:h,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,l=this,c=this.props,f=c.y,h=c.travellerWidth,p=c.height,g=c.traveller,v=c.ariaLabel,w=c.data,y=c.startIndex,b=c.endIndex,S=Math.max(n,this.props.x),A=Ow(Ow({},Fe(this.props,!1)),{},{x:S,y:f,width:h,height:p}),_=v||"Min value: ".concat((a=w[y])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=w[b])===null||o===void 0?void 0:o.name);return U.createElement(ft,{tabIndex:0,role:"slider","aria-label":_,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(N){["ArrowLeft","ArrowRight"].includes(N.key)&&(N.preventDefault(),N.stopPropagation(),l.handleTravellerMoveKeyboard(N.key==="ArrowRight"?1:-1,i))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(g,A))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,l=a.height,c=a.stroke,f=a.travellerWidth,h=Math.min(n,i)+f,p=Math.max(Math.abs(i-n)-f,0);return U.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:h,y:o,width:p,height:l})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,l=n.height,c=n.travellerWidth,f=n.stroke,h=this.state,p=h.startX,g=h.endX,v=5,w={pointerEvents:"none",fill:f};return U.createElement(ft,{className:"recharts-brush-texts"},U.createElement($o,qp({textAnchor:"end",verticalAnchor:"middle",x:Math.min(p,g)-v,y:o+l/2},w),this.getTextOfTick(i)),U.createElement($o,qp({textAnchor:"start",verticalAnchor:"middle",x:Math.max(p,g)+c+v,y:o+l/2},w),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,l=n.x,c=n.y,f=n.width,h=n.height,p=n.alwaysShowText,g=this.state,v=g.startX,w=g.endX,y=g.isTextActive,b=g.isSlideMoving,S=g.isTravellerMoving,A=g.isTravellerFocused;if(!i||!i.length||!ve(l)||!ve(c)||!ve(f)||!ve(h)||f<=0||h<=0)return null;var _=Ye("recharts-brush",a),C=U.Children.count(o)===1,N=Ihe("userSelect","none");return U.createElement(ft,{className:_,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:N},this.renderBackground(),C&&this.renderPanorama(),this.renderSlide(v,w),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(w,"endX"),(y||b||S||A||p)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,l=n.height,c=n.stroke,f=Math.floor(a+l/2)-1;return U.createElement(U.Fragment,null,U.createElement("rect",{x:i,y:a,width:o,height:l,fill:c,stroke:"none"}),U.createElement("line",{x1:i+1,y1:f,x2:i+o-1,y2:f,fill:"none",stroke:"#fff"}),U.createElement("line",{x1:i+1,y1:f+2,x2:i+o-1,y2:f+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return U.isValidElement(n)?a=U.cloneElement(n,i):qe(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,l=n.x,c=n.travellerWidth,f=n.updateId,h=n.startIndex,p=n.endIndex;if(a!==i.prevData||f!==i.prevUpdateId)return Ow({prevData:a,prevTravellerWidth:c,prevUpdateId:f,prevX:l,prevWidth:o},a&&a.length?Uhe({data:a,width:o,x:l,travellerWidth:c,startIndex:h,endIndex:p}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||l!==i.prevX||c!==i.prevTravellerWidth)){i.scale.range([l,l+o-c]);var g=i.scale.domain().map(function(v){return i.scale(v)});return{prevData:a,prevTravellerWidth:c,prevUpdateId:f,prevX:l,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:g}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,o=0,l=a-1;l-o>1;){var c=Math.floor((o+l)/2);n[c]>i?l=c:o=c}return i>=n[l]?l:o}}])}(j.PureComponent);Vr(dl,"displayName","Brush");Vr(dl,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Cw,aD;function qhe(){if(aD)return Cw;aD=1;var e=Y_();function t(r,n){var i;return e(r,function(a,o,l){return i=n(a,o,l),!i}),!!i}return Cw=t,Cw}var Tw,oD;function Whe(){if(oD)return Tw;oD=1;var e=o5(),t=ci(),r=qhe(),n=$r(),i=Um();function a(o,l,c){var f=n(o)?e:r;return c&&i(o,l,c)&&(l=void 0),f(o,t(l,3))}return Tw=a,Tw}var Hhe=Whe();const Ghe=ct(Hhe);var ni=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},kw,sD;function Khe(){if(sD)return kw;sD=1;var e=_5();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return kw=t,kw}var Mw,lD;function Yhe(){if(lD)return Mw;lD=1;var e=Khe(),t=S5(),r=ci();function n(i,a){var o={};return a=r(a,3),t(i,function(l,c,f){e(o,c,a(l,c,f))}),o}return Mw=n,Mw}var Xhe=Yhe();const Zhe=ct(Xhe);var Rw,cD;function Qhe(){if(cD)return Rw;cD=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(!r(t[n],n,t))return!1;return!0}return Rw=e,Rw}var Iw,uD;function Jhe(){if(uD)return Iw;uD=1;var e=Y_();function t(r,n){var i=!0;return e(r,function(a,o,l){return i=!!n(a,o,l),i}),i}return Iw=t,Iw}var Dw,fD;function epe(){if(fD)return Dw;fD=1;var e=Qhe(),t=Jhe(),r=ci(),n=$r(),i=Um();function a(o,l,c){var f=n(o)?e:t;return c&&i(o,l,c)&&(l=void 0),f(o,r(l,3))}return Dw=a,Dw}var tpe=epe();const fF=ct(tpe);var rpe=["x","y"];function mf(e){"@babel/helpers - typeof";return mf=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},mf(e)}function WS(){return WS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},WS.apply(this,arguments)}function dD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function eu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dD(Object(r),!0).forEach(function(n){npe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function npe(e,t,r){return t=ipe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ipe(e){var t=ape(e,"string");return mf(t)=="symbol"?t:t+""}function ape(e,t){if(mf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(mf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ope(e,t){if(e==null)return{};var r=spe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function spe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function lpe(e,t){var r=e.x,n=e.y,i=ope(e,rpe),a="".concat(r),o=parseInt(a,10),l="".concat(n),c=parseInt(l,10),f="".concat(t.height||i.height),h=parseInt(f,10),p="".concat(t.width||i.width),g=parseInt(p,10);return eu(eu(eu(eu(eu({},t),i),o?{x:o}:{}),c?{y:c}:{}),{},{height:h,width:g,name:t.name,radius:t.radius})}function hD(e){return U.createElement(iF,WS({shapeType:"rectangle",propTransformer:lpe,activeClassName:"recharts-active-bar"},e))}var cpe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=typeof n=="number";return a?t(n,i):(a||Bo(),r)}},upe=["value","background"],dF;function hl(e){"@babel/helpers - typeof";return hl=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},hl(e)}function fpe(e,t){if(e==null)return{};var r=dpe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function dpe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Hp(){return Hp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hp.apply(this,arguments)}function pD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pD(Object(r),!0).forEach(function(n){Ea(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hpe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mD(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,pF(n.key),n)}}function ppe(e,t,r){return t&&mD(e.prototype,t),r&&mD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function mpe(e,t,r){return t=Gp(t),gpe(e,hF()?Reflect.construct(t,r||[],Gp(e).constructor):t.apply(e,r))}function gpe(e,t){if(t&&(hl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vpe(e)}function vpe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hF=function(){return!!e})()}function Gp(e){return Gp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Gp(e)}function ype(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&HS(e,t)}function HS(e,t){return HS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},HS(e,t)}function Ea(e,t,r){return t=pF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pF(e){var t=xpe(e,"string");return hl(t)=="symbol"?t:t+""}function xpe(e,t){if(hl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(hl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Wa=function(e){function t(){var r;hpe(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=mpe(this,t,[].concat(i)),Ea(r,"state",{isAnimationFinished:!1}),Ea(r,"id",Bf("recharts-bar-")),Ea(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Ea(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return ype(t,e),ppe(t,[{key:"renderRectanglesStatically",value:function(n){var i=this,a=this.props,o=a.shape,l=a.dataKey,c=a.activeIndex,f=a.activeBar,h=Fe(this.props,!1);return n&&n.map(function(p,g){var v=g===c,w=v?f:o,y=zt(zt(zt({},h),p),{},{isActive:v,option:w,index:g,dataKey:l,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return U.createElement(ft,Hp({className:"recharts-bar-rectangle"},Do(i.props,p,g),{key:"rectangle-".concat(p==null?void 0:p.x,"-").concat(p==null?void 0:p.y,"-").concat(p==null?void 0:p.value,"-").concat(g)}),U.createElement(hD,y))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,a=i.data,o=i.layout,l=i.isAnimationActive,c=i.animationBegin,f=i.animationDuration,h=i.animationEasing,p=i.animationId,g=this.state.prevData;return U.createElement(qi,{begin:c,duration:f,isActive:l,easing:h,from:{t:0},to:{t:1},key:"bar-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(v){var w=v.t,y=a.map(function(b,S){var A=g&&g[S];if(A){var _=_a(A.x,b.x),C=_a(A.y,b.y),N=_a(A.width,b.width),O=_a(A.height,b.height);return zt(zt({},b),{},{x:_(w),y:C(w),width:N(w),height:O(w)})}if(o==="horizontal"){var T=_a(0,b.height),k=T(w);return zt(zt({},b),{},{y:b.y+b.height-k,height:k})}var R=_a(0,b.width),F=R(w);return zt(zt({},b),{},{width:F})});return U.createElement(ft,null,n.renderRectanglesStatically(y))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,a=n.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!eg(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,a=i.data,o=i.dataKey,l=i.activeIndex,c=Fe(this.props.background,!1);return a.map(function(f,h){f.value;var p=f.background,g=fpe(f,upe);if(!p)return null;var v=zt(zt(zt(zt(zt({},g),{},{fill:"#eee"},p),c),Do(n.props,f,h)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:h,className:"recharts-bar-background-rectangle"});return U.createElement(hD,Hp({key:"background-bar-".concat(h),option:n.props.background,isActive:h===l},v))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,l=a.xAxis,c=a.yAxis,f=a.layout,h=a.children,p=un(h,ng);if(!p)return null;var g=f==="vertical"?o[0].height/2:o[0].width/2,v=function(b,S){var A=Array.isArray(b.value)?b.value[1]:b.value;return{x:b.x,y:b.y,value:A,errorVal:gr(b,S)}},w={clipPath:n?"url(#clipPath-".concat(i,")"):null};return U.createElement(ft,w,p.map(function(y){return U.cloneElement(y,{key:"error-bar-".concat(i,"-").concat(y.props.dataKey),data:o,xAxis:l,yAxis:c,layout:f,offset:g,dataPointFormatter:v})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.data,o=n.className,l=n.xAxis,c=n.yAxis,f=n.left,h=n.top,p=n.width,g=n.height,v=n.isAnimationActive,w=n.background,y=n.id;if(i||!a||!a.length)return null;var b=this.state.isAnimationFinished,S=Ye("recharts-bar",o),A=l&&l.allowDataOverflow,_=c&&c.allowDataOverflow,C=A||_,N=Qe(y)?this.id:y;return U.createElement(ft,{className:S},A||_?U.createElement("defs",null,U.createElement("clipPath",{id:"clipPath-".concat(N)},U.createElement("rect",{x:A?f:f-p/2,y:_?h:h-g/2,width:A?p:p*2,height:_?g:g*2}))):null,U.createElement(ft,{className:"recharts-bar-rectangles",clipPath:C?"url(#clipPath-".concat(N,")"):null},w?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(C,N),(!v||b)&&Ta.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:i.curData}:n.data!==i.curData?{curData:n.data}:null}}])}(j.PureComponent);dF=Wa;Ea(Wa,"displayName","Bar");Ea(Wa,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!$l.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Ea(Wa,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,l=e.xAxisTicks,c=e.yAxisTicks,f=e.stackedData,h=e.dataStartIndex,p=e.displayedData,g=e.offset,v=Gle(n,r);if(!v)return null;var w=t.layout,y=r.type.defaultProps,b=y!==void 0?zt(zt({},y),r.props):r.props,S=b.dataKey,A=b.children,_=b.minPointSize,C=w==="horizontal"?o:a,N=f?C.scale.domain():null,O=ece({numericAxis:C}),T=un(A,qm),k=p.map(function(R,F){var I,L,V,Y,K,z;f?I=Kle(f[h+F],N):(I=gr(R,S),Array.isArray(I)||(I=[O,I]));var G=cpe(_,dF.defaultProps.minPointSize)(I[1],F);if(w==="horizontal"){var D,q=[o.scale(I[0]),o.scale(I[1])],Q=q[0],$=q[1];L=zR({axis:a,ticks:l,bandSize:i,offset:v.offset,entry:R,index:F}),V=(D=$??Q)!==null&&D!==void 0?D:void 0,Y=v.size;var H=Q-$;if(K=Number.isNaN(H)?0:H,z={x:L,y:o.y,width:Y,height:o.height},Math.abs(G)>0&&Math.abs(K)<Math.abs(G)){var re=jr(K||G)*(Math.abs(G)-Math.abs(K));V-=re,K+=re}}else{var se=[a.scale(I[0]),a.scale(I[1])],ge=se[0],be=se[1];if(L=ge,V=zR({axis:o,ticks:c,bandSize:i,offset:v.offset,entry:R,index:F}),Y=be-ge,K=v.size,z={x:a.x,y:V,width:a.width,height:K},Math.abs(G)>0&&Math.abs(Y)<Math.abs(G)){var ae=jr(Y||G)*(Math.abs(G)-Math.abs(Y));Y+=ae}}return zt(zt(zt({},R),{},{x:L,y:V,width:Y,height:K,value:f?I:I[1],payload:R,background:z},T&&T[F]&&T[F].props),{},{tooltipPayload:[FB(r,R)],tooltipPosition:{x:L+Y/2,y:V+K/2}})});return zt({data:k,layout:w},g)});function gf(e){"@babel/helpers - typeof";return gf=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},gf(e)}function bpe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gD(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,mF(n.key),n)}}function wpe(e,t,r){return t&&gD(e.prototype,t),r&&gD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function vD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function En(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vD(Object(r),!0).forEach(function(n){ug(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ug(e,t,r){return t=mF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mF(e){var t=Spe(e,"string");return gf(t)=="symbol"?t:t+""}function Spe(e,t){if(gf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(gf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jpe=function(t,r,n,i,a){var o=t.width,l=t.height,c=t.layout,f=t.children,h=Object.keys(r),p={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:l-n.bottom,bottomMirror:l-n.bottom},g=!!Ur(f,Wa);return h.reduce(function(v,w){var y=r[w],b=y.orientation,S=y.domain,A=y.padding,_=A===void 0?{}:A,C=y.mirror,N=y.reversed,O="".concat(b).concat(C?"Mirror":""),T,k,R,F,I;if(y.type==="number"&&(y.padding==="gap"||y.padding==="no-gap")){var L=S[1]-S[0],V=1/0,Y=y.categoricalDomain.sort(Dee);if(Y.forEach(function(se,ge){ge>0&&(V=Math.min((se||0)-(Y[ge-1]||0),V))}),Number.isFinite(V)){var K=V/L,z=y.layout==="vertical"?n.height:n.width;if(y.padding==="gap"&&(T=K*z/2),y.padding==="no-gap"){var G=_r(t.barCategoryGap,K*z),D=K*z/2;T=D-G-(D-G)/z*G}}}i==="xAxis"?k=[n.left+(_.left||0)+(T||0),n.left+n.width-(_.right||0)-(T||0)]:i==="yAxis"?k=c==="horizontal"?[n.top+n.height-(_.bottom||0),n.top+(_.top||0)]:[n.top+(_.top||0)+(T||0),n.top+n.height-(_.bottom||0)-(T||0)]:k=y.range,N&&(k=[k[1],k[0]]);var q=DB(y,a,g),Q=q.scale,$=q.realScaleType;Q.domain(S).range(k),$B(Q);var H=LB(Q,En(En({},y),{},{realScaleType:$}));i==="xAxis"?(I=b==="top"&&!C||b==="bottom"&&C,R=n.left,F=p[O]-I*y.height):i==="yAxis"&&(I=b==="left"&&!C||b==="right"&&C,R=p[O]-I*y.width,F=n.top);var re=En(En(En({},y),H),{},{realScaleType:$,x:R,y:F,scale:Q,width:i==="xAxis"?n.width:y.width,height:i==="yAxis"?n.height:y.height});return re.bandSize=Tp(re,H),!y.hide&&i==="xAxis"?p[O]+=(I?-1:1)*re.height:y.hide||(p[O]+=(I?-1:1)*re.width),En(En({},v),{},ug({},w,re))},{})},gF=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return{x:Math.min(n,a),y:Math.min(i,o),width:Math.abs(a-n),height:Math.abs(o-i)}},_pe=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return gF({x:r,y:n},{x:i,y:a})},vF=function(){function e(t){bpe(this,e),this.scale=t}return wpe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(r)+l}default:return this.scale(r)}if(i){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+c}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();ug(vF,"EPS",1e-4);var AP=function(t){var r=Object.keys(t).reduce(function(n,i){return En(En({},n),{},ug({},i,vF.create(t[i])))},{});return En(En({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return Zhe(i,function(c,f){return r[f].apply(c,{bandAware:o,position:l})})},isInRange:function(i){return fF(i,function(a,o){return r[o].isInRange(a)})}})};function Ppe(e){return(e%180+180)%180}var Ape=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=Ppe(i),o=a*Math.PI/180,l=Math.atan(n/r),c=o>l&&o<Math.PI-l?n/Math.sin(o):r/Math.cos(o);return Math.abs(c)},$w,yD;function Npe(){if(yD)return $w;yD=1;var e=ci(),t=Ff(),r=zm();function n(i){return function(a,o,l){var c=Object(a);if(!t(a)){var f=e(o,3);a=r(a),o=function(p){return f(c[p],p,c)}}var h=i(a,o,l);return h>-1?c[f?a[h]:h]:void 0}}return $w=n,$w}var Lw,xD;function Epe(){if(xD)return Lw;xD=1;var e=sF();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return Lw=t,Lw}var Bw,bD;function Ope(){if(bD)return Bw;bD=1;var e=v5(),t=ci(),r=Epe(),n=Math.max;function i(a,o,l){var c=a==null?0:a.length;if(!c)return-1;var f=l==null?0:r(l);return f<0&&(f=n(c+f,0)),e(a,t(o,3),f)}return Bw=i,Bw}var Fw,wD;function Cpe(){if(wD)return Fw;wD=1;var e=Npe(),t=Ope(),r=e(t);return Fw=r,Fw}var Tpe=Cpe();const kpe=ct(Tpe);var Mpe=M4();const Rpe=ct(Mpe);var Ipe=Rpe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),NP=j.createContext(void 0),EP=j.createContext(void 0),yF=j.createContext(void 0),xF=j.createContext({}),bF=j.createContext(void 0),wF=j.createContext(0),SF=j.createContext(0),SD=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,l=t.children,c=t.width,f=t.height,h=Ipe(a);return U.createElement(NP.Provider,{value:n},U.createElement(EP.Provider,{value:i},U.createElement(xF.Provider,{value:a},U.createElement(yF.Provider,{value:h},U.createElement(bF.Provider,{value:o},U.createElement(wF.Provider,{value:f},U.createElement(SF.Provider,{value:c},l)))))))},Dpe=function(){return j.useContext(bF)},jF=function(t){var r=j.useContext(NP);r==null&&Bo();var n=r[t];return n==null&&Bo(),n},$pe=function(){var t=j.useContext(NP);return Na(t)},Lpe=function(){var t=j.useContext(EP),r=kpe(t,function(n){return fF(n.domain,Number.isFinite)});return r||Na(t)},_F=function(t){var r=j.useContext(EP);r==null&&Bo();var n=r[t];return n==null&&Bo(),n},Bpe=function(){var t=j.useContext(yF);return t},Fpe=function(){return j.useContext(xF)},OP=function(){return j.useContext(SF)},CP=function(){return j.useContext(wF)};function pl(e){"@babel/helpers - typeof";return pl=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},pl(e)}function zpe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vpe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,AF(n.key),n)}}function Upe(e,t,r){return t&&Vpe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function qpe(e,t,r){return t=Kp(t),Wpe(e,PF()?Reflect.construct(t,r||[],Kp(e).constructor):t.apply(e,r))}function Wpe(e,t){if(t&&(pl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hpe(e)}function Hpe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function PF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(PF=function(){return!!e})()}function Kp(e){return Kp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Kp(e)}function Gpe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&GS(e,t)}function GS(e,t){return GS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},GS(e,t)}function jD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _D(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jD(Object(r),!0).forEach(function(n){TP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TP(e,t,r){return t=AF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AF(e){var t=Kpe(e,"string");return pl(t)=="symbol"?t:t+""}function Kpe(e,t){if(pl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Ype(e,t){return Jpe(e)||Qpe(e,t)||Zpe(e,t)||Xpe()}function Xpe(){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 Zpe(e,t){if(e){if(typeof e=="string")return PD(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return PD(e,t)}}function PD(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Qpe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function Jpe(e){if(Array.isArray(e))return e}function KS(){return KS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},KS.apply(this,arguments)}var eme=function(t,r){var n;return U.isValidElement(t)?n=U.cloneElement(t,r):qe(t)?n=t(r):n=U.createElement("line",KS({},r,{className:"recharts-reference-line-line"})),n},tme=function(t,r,n,i,a,o,l,c,f){var h=a.x,p=a.y,g=a.width,v=a.height;if(n){var w=f.y,y=t.y.apply(w,{position:o});if(ni(f,"discard")&&!t.y.isInRange(y))return null;var b=[{x:h+g,y},{x:h,y}];return c==="left"?b.reverse():b}if(r){var S=f.x,A=t.x.apply(S,{position:o});if(ni(f,"discard")&&!t.x.isInRange(A))return null;var _=[{x:A,y:p+v},{x:A,y:p}];return l==="top"?_.reverse():_}if(i){var C=f.segment,N=C.map(function(O){return t.apply(O,{position:o})});return ni(f,"discard")&&Ghe(N,function(O){return!t.isInRange(O)})?null:N}return null};function rme(e){var t=e.x,r=e.y,n=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,l=e.className,c=e.alwaysShow,f=Dpe(),h=jF(i),p=_F(a),g=Bpe();if(!f||!g)return null;kn(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var v=AP({x:h.scale,y:p.scale}),w=Kt(t),y=Kt(r),b=n&&n.length===2,S=tme(v,w,y,b,g,e.position,h.orientation,p.orientation,e);if(!S)return null;var A=Ype(S,2),_=A[0],C=_.x,N=_.y,O=A[1],T=O.x,k=O.y,R=ni(e,"hidden")?"url(#".concat(f,")"):void 0,F=_D(_D({clipPath:R},Fe(e,!0)),{},{x1:C,y1:N,x2:T,y2:k});return U.createElement(ft,{className:Ye("recharts-reference-line",l)},eme(o,F),Gt.renderCallByParent(e,_pe({x1:C,y1:N,x2:T,y2:k})))}var kP=function(e){function t(){return zpe(this,t),qpe(this,t,arguments)}return Gpe(t,e),Upe(t,[{key:"render",value:function(){return U.createElement(rme,this.props)}}])}(U.Component);TP(kP,"displayName","ReferenceLine");TP(kP,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function YS(){return YS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},YS.apply(this,arguments)}function ml(e){"@babel/helpers - typeof";return ml=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},ml(e)}function AD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ND(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AD(Object(r),!0).forEach(function(n){fg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ime(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,EF(n.key),n)}}function ame(e,t,r){return t&&ime(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ome(e,t,r){return t=Yp(t),sme(e,NF()?Reflect.construct(t,r||[],Yp(e).constructor):t.apply(e,r))}function sme(e,t){if(t&&(ml(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lme(e)}function lme(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function NF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(NF=function(){return!!e})()}function Yp(e){return Yp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Yp(e)}function cme(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&XS(e,t)}function XS(e,t){return XS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},XS(e,t)}function fg(e,t,r){return t=EF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EF(e){var t=ume(e,"string");return ml(t)=="symbol"?t:t+""}function ume(e,t){if(ml(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ml(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var fme=function(t){var r=t.x,n=t.y,i=t.xAxis,a=t.yAxis,o=AP({x:i.scale,y:a.scale}),l=o.apply({x:r,y:n},{bandAware:!0});return ni(t,"discard")&&!o.isInRange(l)?null:l},dg=function(e){function t(){return nme(this,t),ome(this,t,arguments)}return cme(t,e),ame(t,[{key:"render",value:function(){var n=this.props,i=n.x,a=n.y,o=n.r,l=n.alwaysShow,c=n.clipPathId,f=Kt(i),h=Kt(a);if(kn(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!f||!h)return null;var p=fme(this.props);if(!p)return null;var g=p.x,v=p.y,w=this.props,y=w.shape,b=w.className,S=ni(this.props,"hidden")?"url(#".concat(c,")"):void 0,A=ND(ND({clipPath:S},Fe(this.props,!0)),{},{cx:g,cy:v});return U.createElement(ft,{className:Ye("recharts-reference-dot",b)},t.renderDot(y,A),Gt.renderCallByParent(this.props,{x:g-o,y:v-o,width:2*o,height:2*o}))}}])}(U.Component);fg(dg,"displayName","ReferenceDot");fg(dg,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});fg(dg,"renderDot",function(e,t){var r;return U.isValidElement(e)?r=U.cloneElement(e,t):qe(e)?r=e(t):r=U.createElement(PP,YS({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function ZS(){return ZS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ZS.apply(this,arguments)}function gl(e){"@babel/helpers - typeof";return gl=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},gl(e)}function ED(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function OD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ED(Object(r),!0).forEach(function(n){hg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ED(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hme(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,CF(n.key),n)}}function pme(e,t,r){return t&&hme(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mme(e,t,r){return t=Xp(t),gme(e,OF()?Reflect.construct(t,r||[],Xp(e).constructor):t.apply(e,r))}function gme(e,t){if(t&&(gl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vme(e)}function vme(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function OF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(OF=function(){return!!e})()}function Xp(e){return Xp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xp(e)}function yme(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&QS(e,t)}function QS(e,t){return QS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},QS(e,t)}function hg(e,t,r){return t=CF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CF(e){var t=xme(e,"string");return gl(t)=="symbol"?t:t+""}function xme(e,t){if(gl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(gl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var bme=function(t,r,n,i,a){var o=a.x1,l=a.x2,c=a.y1,f=a.y2,h=a.xAxis,p=a.yAxis;if(!h||!p)return null;var g=AP({x:h.scale,y:p.scale}),v={x:t?g.x.apply(o,{position:"start"}):g.x.rangeMin,y:n?g.y.apply(c,{position:"start"}):g.y.rangeMin},w={x:r?g.x.apply(l,{position:"end"}):g.x.rangeMax,y:i?g.y.apply(f,{position:"end"}):g.y.rangeMax};return ni(a,"discard")&&(!g.isInRange(v)||!g.isInRange(w))?null:gF(v,w)},pg=function(e){function t(){return dme(this,t),mme(this,t,arguments)}return yme(t,e),pme(t,[{key:"render",value:function(){var n=this.props,i=n.x1,a=n.x2,o=n.y1,l=n.y2,c=n.className,f=n.alwaysShow,h=n.clipPathId;kn(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=Kt(i),g=Kt(a),v=Kt(o),w=Kt(l),y=this.props.shape;if(!p&&!g&&!v&&!w&&!y)return null;var b=bme(p,g,v,w,this.props);if(!b&&!y)return null;var S=ni(this.props,"hidden")?"url(#".concat(h,")"):void 0;return U.createElement(ft,{className:Ye("recharts-reference-area",c)},t.renderRect(y,OD(OD({clipPath:S},Fe(this.props,!0)),b)),Gt.renderCallByParent(this.props,b))}}])}(U.Component);hg(pg,"displayName","ReferenceArea");hg(pg,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});hg(pg,"renderRect",function(e,t){var r;return U.isValidElement(e)?r=U.cloneElement(e,t):qe(e)?r=e(t):r=U.createElement(_P,ZS({},t,{className:"recharts-reference-area-rect"})),r});function TF(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],i=0;i<e.length;i+=t)n.push(e[i]);return n}function wme(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return Ape(n,r)}function Sme(e,t,r){var n=r==="width",i=e.x,a=e.y,o=e.width,l=e.height;return t===1?{start:n?i:a,end:n?i+o:a+l}:{start:n?i+o:a+l,end:n?i:a}}function Zp(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function jme(e,t){return TF(e,t+1)}function _me(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,l=t.end,c=0,f=1,h=o,p=function(){var w=n==null?void 0:n[c];if(w===void 0)return{v:TF(n,f)};var y=c,b,S=function(){return b===void 0&&(b=r(w,y)),b},A=w.coordinate,_=c===0||Zp(e,A,S,h,l);_||(c=0,h=o,f+=1),_&&(h=A+e*(S()/2+i),c+=f)},g;f<=a.length;)if(g=p(),g)return g.v;return[]}function vf(e){"@babel/helpers - typeof";return vf=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},vf(e)}function CD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CD(Object(r),!0).forEach(function(n){Pme(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pme(e,t,r){return t=Ame(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ame(e){var t=Nme(e,"string");return vf(t)=="symbol"?t:t+""}function Nme(e,t){if(vf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(vf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Eme(e,t,r,n,i){for(var a=(n||[]).slice(),o=a.length,l=t.start,c=t.end,f=function(g){var v=a[g],w,y=function(){return w===void 0&&(w=r(v,g)),w};if(g===o-1){var b=e*(v.coordinate+e*y()/2-c);a[g]=v=dr(dr({},v),{},{tickCoord:b>0?v.coordinate-b*e:v.coordinate})}else a[g]=v=dr(dr({},v),{},{tickCoord:v.coordinate});var S=Zp(e,v.tickCoord,y,l,c);S&&(c=v.tickCoord-e*(y()/2+i),a[g]=dr(dr({},v),{},{isShow:!0}))},h=o-1;h>=0;h--)f(h);return a}function Ome(e,t,r,n,i,a){var o=(n||[]).slice(),l=o.length,c=t.start,f=t.end;if(a){var h=n[l-1],p=r(h,l-1),g=e*(h.coordinate+e*p/2-f);o[l-1]=h=dr(dr({},h),{},{tickCoord:g>0?h.coordinate-g*e:h.coordinate});var v=Zp(e,h.tickCoord,function(){return p},c,f);v&&(f=h.tickCoord-e*(p/2+i),o[l-1]=dr(dr({},h),{},{isShow:!0}))}for(var w=a?l-1:l,y=function(A){var _=o[A],C,N=function(){return C===void 0&&(C=r(_,A)),C};if(A===0){var O=e*(_.coordinate-e*N()/2-c);o[A]=_=dr(dr({},_),{},{tickCoord:O<0?_.coordinate-O*e:_.coordinate})}else o[A]=_=dr(dr({},_),{},{tickCoord:_.coordinate});var T=Zp(e,_.tickCoord,N,c,f);T&&(c=_.tickCoord+e*(N()/2+i),o[A]=dr(dr({},_),{},{isShow:!0}))},b=0;b<w;b++)y(b);return o}function MP(e,t,r){var n=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,l=e.orientation,c=e.interval,f=e.tickFormatter,h=e.unit,p=e.angle;if(!i||!i.length||!n)return[];if(ve(c)||$l.isSsr)return jme(i,typeof c=="number"&&ve(c)?c:0);var g=[],v=l==="top"||l==="bottom"?"width":"height",w=h&&v==="width"?gu(h,{fontSize:t,letterSpacing:r}):{width:0,height:0},y=function(_,C){var N=qe(f)?f(_.value,C):_.value;return v==="width"?wme(gu(N,{fontSize:t,letterSpacing:r}),w,p):gu(N,{fontSize:t,letterSpacing:r})[v]},b=i.length>=2?jr(i[1].coordinate-i[0].coordinate):1,S=Sme(a,b,v);return c==="equidistantPreserveStart"?_me(b,S,y,i,o):(c==="preserveStart"||c==="preserveStartEnd"?g=Ome(b,S,y,i,o,c==="preserveStartEnd"):g=Eme(b,S,y,i,o),g.filter(function(A){return A.isShow}))}var Cme=["viewBox"],Tme=["viewBox"],kme=["ticks"];function vl(e){"@babel/helpers - typeof";return vl=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},vl(e)}function Vs(){return Vs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vs.apply(this,arguments)}function TD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?TD(Object(r),!0).forEach(function(n){RP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):TD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zw(e,t){if(e==null)return{};var r=Mme(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Mme(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Rme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kD(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,MF(n.key),n)}}function Ime(e,t,r){return t&&kD(e.prototype,t),r&&kD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Dme(e,t,r){return t=Qp(t),$me(e,kF()?Reflect.construct(t,r||[],Qp(e).constructor):t.apply(e,r))}function $me(e,t){if(t&&(vl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Lme(e)}function Lme(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kF=function(){return!!e})()}function Qp(e){return Qp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qp(e)}function Bme(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&JS(e,t)}function JS(e,t){return JS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},JS(e,t)}function RP(e,t,r){return t=MF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MF(e){var t=Fme(e,"string");return vl(t)=="symbol"?t:t+""}function Fme(e,t){if(vl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(vl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var zl=function(e){function t(r){var n;return Rme(this,t),n=Dme(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return Bme(t,e),Ime(t,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,o=zw(n,Cme),l=this.props,c=l.viewBox,f=zw(l,Tme);return!Ws(a,c)||!Ws(o,f)||!Ws(i,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var i=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.x,o=i.y,l=i.width,c=i.height,f=i.orientation,h=i.tickSize,p=i.mirror,g=i.tickMargin,v,w,y,b,S,A,_=p?-1:1,C=n.tickSize||h,N=ve(n.tickCoord)?n.tickCoord:n.coordinate;switch(f){case"top":v=w=n.coordinate,b=o+ +!p*c,y=b-_*C,A=y-_*g,S=N;break;case"left":y=b=n.coordinate,w=a+ +!p*l,v=w-_*C,S=v-_*g,A=N;break;case"right":y=b=n.coordinate,w=a+ +p*l,v=w+_*C,S=v+_*g,A=N;break;default:v=w=n.coordinate,b=o+ +p*c,y=b+_*C,A=y+_*g,S=N;break}return{line:{x1:v,y1:y,x2:w,y2:b},tick:{x:S,y:A}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,l=n.height,c=n.orientation,f=n.mirror,h=n.axisLine,p=wr(wr(wr({},Fe(this.props,!1)),Fe(h,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var g=+(c==="top"&&!f||c==="bottom"&&f);p=wr(wr({},p),{},{x1:i,y1:a+g*l,x2:i+o,y2:a+g*l})}else{var v=+(c==="left"&&!f||c==="right"&&f);p=wr(wr({},p),{},{x1:i+v*o,y1:a,x2:i+v*o,y2:a+l})}return U.createElement("line",Vs({},p,{className:Ye("recharts-cartesian-axis-line",Hr(h,"className"))}))}},{key:"renderTicks",value:function(n,i,a){var o=this,l=this.props,c=l.tickLine,f=l.stroke,h=l.tick,p=l.tickFormatter,g=l.unit,v=MP(wr(wr({},this.props),{},{ticks:n}),i,a),w=this.getTickTextAnchor(),y=this.getTickVerticalAnchor(),b=Fe(this.props,!1),S=Fe(h,!1),A=wr(wr({},b),{},{fill:"none"},Fe(c,!1)),_=v.map(function(C,N){var O=o.getTickLineCoord(C),T=O.line,k=O.tick,R=wr(wr(wr(wr({textAnchor:w,verticalAnchor:y},b),{},{stroke:"none",fill:f},S),k),{},{index:N,payload:C,visibleTicksCount:v.length,tickFormatter:p});return U.createElement(ft,Vs({className:"recharts-cartesian-axis-tick",key:"tick-".concat(C.value,"-").concat(C.coordinate,"-").concat(C.tickCoord)},Do(o.props,C,N)),c&&U.createElement("line",Vs({},A,T,{className:Ye("recharts-cartesian-axis-tick-line",Hr(c,"className"))})),h&&t.renderTickItem(h,R,"".concat(qe(p)?p(C.value,N):C.value).concat(g||"")))});return U.createElement("g",{className:"recharts-cartesian-axis-ticks"},_)}},{key:"render",value:function(){var n=this,i=this.props,a=i.axisLine,o=i.width,l=i.height,c=i.ticksGenerator,f=i.className,h=i.hide;if(h)return null;var p=this.props,g=p.ticks,v=zw(p,kme),w=g;return qe(c)&&(w=g&&g.length>0?c(this.props):c(v)),o<=0||l<=0||!w||!w.length?null:U.createElement(ft,{className:Ye("recharts-cartesian-axis",f),ref:function(b){n.layerReference=b}},a&&this.renderAxisLine(),this.renderTicks(w,this.state.fontSize,this.state.letterSpacing),Gt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o;return U.isValidElement(n)?o=U.cloneElement(n,i):qe(n)?o=n(i):o=U.createElement($o,Vs({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(j.Component);RP(zl,"displayName","CartesianAxis");RP(zl,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var zme=["x1","y1","x2","y2","key"],Vme=["offset"];function Fo(e){"@babel/helpers - typeof";return Fo=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},Fo(e)}function MD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MD(Object(r),!0).forEach(function(n){Ume(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ume(e,t,r){return t=qme(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qme(e){var t=Wme(e,"string");return Fo(t)=="symbol"?t:t+""}function Wme(e,t){if(Fo(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Fo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ao(){return Ao=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ao.apply(this,arguments)}function RD(e,t){if(e==null)return{};var r=Hme(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Hme(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Gme=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,a=t.y,o=t.width,l=t.height,c=t.ry;return U.createElement("rect",{x:i,y:a,ry:c,width:o,height:l,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function RF(e,t){var r;if(U.isValidElement(e))r=U.cloneElement(e,t);else if(qe(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,l=t.key,c=RD(t,zme),f=Fe(c,!1);f.offset;var h=RD(f,Vme);r=U.createElement("line",Ao({},h,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:l}))}return r}function Kme(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(l,c){var f=pr(pr({},e),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(c),index:c});return RF(i,f)});return U.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function Yme(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(l,c){var f=pr(pr({},e),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(c),index:c});return RF(i,f)});return U.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function Xme(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,o=e.height,l=e.horizontalPoints,c=e.horizontal,f=c===void 0?!0:c;if(!f||!t||!t.length)return null;var h=l.map(function(g){return Math.round(g+i-i)}).sort(function(g,v){return g-v});i!==h[0]&&h.unshift(0);var p=h.map(function(g,v){var w=!h[v+1],y=w?i+o-g:h[v+1]-g;if(y<=0)return null;var b=v%t.length;return U.createElement("rect",{key:"react-".concat(v),y:g,x:n,height:y,width:a,stroke:"none",fill:t[b],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return U.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function Zme(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,l=e.width,c=e.height,f=e.verticalPoints;if(!r||!n||!n.length)return null;var h=f.map(function(g){return Math.round(g+a-a)}).sort(function(g,v){return g-v});a!==h[0]&&h.unshift(0);var p=h.map(function(g,v){var w=!h[v+1],y=w?a+l-g:h[v+1]-g;if(y<=0)return null;var b=v%n.length;return U.createElement("rect",{key:"react-".concat(v),x:g,y:o,width:y,height:c,stroke:"none",fill:n[b],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return U.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var Qme=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return IB(MP(pr(pr(pr({},zl.defaultProps),n),{},{ticks:Ci(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},Jme=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return IB(MP(pr(pr(pr({},zl.defaultProps),n),{},{ticks:Ci(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},Es={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function IP(e){var t,r,n,i,a,o,l=OP(),c=CP(),f=Fpe(),h=pr(pr({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Es.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Es.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Es.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Es.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Es.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Es.verticalFill,x:ve(e.x)?e.x:f.left,y:ve(e.y)?e.y:f.top,width:ve(e.width)?e.width:f.width,height:ve(e.height)?e.height:f.height}),p=h.x,g=h.y,v=h.width,w=h.height,y=h.syncWithTicks,b=h.horizontalValues,S=h.verticalValues,A=$pe(),_=Lpe();if(!ve(v)||v<=0||!ve(w)||w<=0||!ve(p)||p!==+p||!ve(g)||g!==+g)return null;var C=h.verticalCoordinatesGenerator||Qme,N=h.horizontalCoordinatesGenerator||Jme,O=h.horizontalPoints,T=h.verticalPoints;if((!O||!O.length)&&qe(N)){var k=b&&b.length,R=N({yAxis:_?pr(pr({},_),{},{ticks:k?b:_.ticks}):void 0,width:l,height:c,offset:f},k?!0:y);kn(Array.isArray(R),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Fo(R),"]")),Array.isArray(R)&&(O=R)}if((!T||!T.length)&&qe(C)){var F=S&&S.length,I=C({xAxis:A?pr(pr({},A),{},{ticks:F?S:A.ticks}):void 0,width:l,height:c,offset:f},F?!0:y);kn(Array.isArray(I),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Fo(I),"]")),Array.isArray(I)&&(T=I)}return U.createElement("g",{className:"recharts-cartesian-grid"},U.createElement(Gme,{fill:h.fill,fillOpacity:h.fillOpacity,x:h.x,y:h.y,width:h.width,height:h.height,ry:h.ry}),U.createElement(Kme,Ao({},h,{offset:f,horizontalPoints:O,xAxis:A,yAxis:_})),U.createElement(Yme,Ao({},h,{offset:f,verticalPoints:T,xAxis:A,yAxis:_})),U.createElement(Xme,Ao({},h,{horizontalPoints:O})),U.createElement(Zme,Ao({},h,{verticalPoints:T})))}IP.displayName="CartesianGrid";function yl(e){"@babel/helpers - typeof";return yl=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},yl(e)}function ege(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tge(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$F(n.key),n)}}function rge(e,t,r){return t&&tge(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function nge(e,t,r){return t=Jp(t),ige(e,IF()?Reflect.construct(t,r||[],Jp(e).constructor):t.apply(e,r))}function ige(e,t){if(t&&(yl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return age(e)}function age(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function IF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(IF=function(){return!!e})()}function Jp(e){return Jp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Jp(e)}function oge(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ej(e,t)}function ej(e,t){return ej=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ej(e,t)}function DF(e,t,r){return t=$F(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $F(e){var t=sge(e,"string");return yl(t)=="symbol"?t:t+""}function sge(e,t){if(yl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function tj(){return tj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tj.apply(this,arguments)}function lge(e){var t=e.xAxisId,r=OP(),n=CP(),i=jF(t);return i==null?null:U.createElement(zl,tj({},i,{className:Ye("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return Ci(o,!0)}}))}var Wf=function(e){function t(){return ege(this,t),nge(this,t,arguments)}return oge(t,e),rge(t,[{key:"render",value:function(){return U.createElement(lge,this.props)}}])}(U.Component);DF(Wf,"displayName","XAxis");DF(Wf,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function xl(e){"@babel/helpers - typeof";return xl=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},xl(e)}function cge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uge(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,FF(n.key),n)}}function fge(e,t,r){return t&&uge(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function dge(e,t,r){return t=em(t),hge(e,LF()?Reflect.construct(t,r||[],em(e).constructor):t.apply(e,r))}function hge(e,t){if(t&&(xl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pge(e)}function pge(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(LF=function(){return!!e})()}function em(e){return em=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},em(e)}function mge(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rj(e,t)}function rj(e,t){return rj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},rj(e,t)}function BF(e,t,r){return t=FF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FF(e){var t=gge(e,"string");return xl(t)=="symbol"?t:t+""}function gge(e,t){if(xl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function nj(){return nj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nj.apply(this,arguments)}var vge=function(t){var r=t.yAxisId,n=OP(),i=CP(),a=_F(r);return a==null?null:U.createElement(zl,nj({},a,{className:Ye("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(l){return Ci(l,!0)}}))},Hf=function(e){function t(){return cge(this,t),dge(this,t,arguments)}return mge(t,e),fge(t,[{key:"render",value:function(){return U.createElement(vge,this.props)}}])}(U.Component);BF(Hf,"displayName","YAxis");BF(Hf,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function ID(e){return wge(e)||bge(e)||xge(e)||yge()}function yge(){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 xge(e,t){if(e){if(typeof e=="string")return ij(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ij(e,t)}}function bge(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wge(e){if(Array.isArray(e))return ij(e)}function ij(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var aj=function(t,r,n,i,a){var o=un(t,kP),l=un(t,dg),c=[].concat(ID(o),ID(l)),f=un(t,pg),h="".concat(i,"Id"),p=i[0],g=r;if(c.length&&(g=c.reduce(function(y,b){if(b.props[h]===n&&ni(b.props,"extendDomain")&&ve(b.props[p])){var S=b.props[p];return[Math.min(y[0],S),Math.max(y[1],S)]}return y},g)),f.length){var v="".concat(p,"1"),w="".concat(p,"2");g=f.reduce(function(y,b){if(b.props[h]===n&&ni(b.props,"extendDomain")&&ve(b.props[v])&&ve(b.props[w])){var S=b.props[v],A=b.props[w];return[Math.min(y[0],S,A),Math.max(y[1],S,A)]}return y},g)}return a&&a.length&&(g=a.reduce(function(y,b){return ve(b)?[Math.min(y[0],b),Math.max(y[1],b)]:y},g)),g},Vw={exports:{}},DD;function Sge(){return DD||(DD=1,function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(c,f,h){this.fn=c,this.context=f,this.once=h||!1}function a(c,f,h,p,g){if(typeof h!="function")throw new TypeError("The listener must be a function");var v=new i(h,p||c,g),w=r?r+f:f;return c._events[w]?c._events[w].fn?c._events[w]=[c._events[w],v]:c._events[w].push(v):(c._events[w]=v,c._eventsCount++),c}function o(c,f){--c._eventsCount===0?c._events=new n:delete c._events[f]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var f=[],h,p;if(this._eventsCount===0)return f;for(p in h=this._events)t.call(h,p)&&f.push(r?p.slice(1):p);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(h)):f},l.prototype.listeners=function(f){var h=r?r+f:f,p=this._events[h];if(!p)return[];if(p.fn)return[p.fn];for(var g=0,v=p.length,w=new Array(v);g<v;g++)w[g]=p[g].fn;return w},l.prototype.listenerCount=function(f){var h=r?r+f:f,p=this._events[h];return p?p.fn?1:p.length:0},l.prototype.emit=function(f,h,p,g,v,w){var y=r?r+f:f;if(!this._events[y])return!1;var b=this._events[y],S=arguments.length,A,_;if(b.fn){switch(b.once&&this.removeListener(f,b.fn,void 0,!0),S){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,h),!0;case 3:return b.fn.call(b.context,h,p),!0;case 4:return b.fn.call(b.context,h,p,g),!0;case 5:return b.fn.call(b.context,h,p,g,v),!0;case 6:return b.fn.call(b.context,h,p,g,v,w),!0}for(_=1,A=new Array(S-1);_<S;_++)A[_-1]=arguments[_];b.fn.apply(b.context,A)}else{var C=b.length,N;for(_=0;_<C;_++)switch(b[_].once&&this.removeListener(f,b[_].fn,void 0,!0),S){case 1:b[_].fn.call(b[_].context);break;case 2:b[_].fn.call(b[_].context,h);break;case 3:b[_].fn.call(b[_].context,h,p);break;case 4:b[_].fn.call(b[_].context,h,p,g);break;default:if(!A)for(N=1,A=new Array(S-1);N<S;N++)A[N-1]=arguments[N];b[_].fn.apply(b[_].context,A)}}return!0},l.prototype.on=function(f,h,p){return a(this,f,h,p,!1)},l.prototype.once=function(f,h,p){return a(this,f,h,p,!0)},l.prototype.removeListener=function(f,h,p,g){var v=r?r+f:f;if(!this._events[v])return this;if(!h)return o(this,v),this;var w=this._events[v];if(w.fn)w.fn===h&&(!g||w.once)&&(!p||w.context===p)&&o(this,v);else{for(var y=0,b=[],S=w.length;y<S;y++)(w[y].fn!==h||g&&!w[y].once||p&&w[y].context!==p)&&b.push(w[y]);b.length?this._events[v]=b.length===1?b[0]:b:o(this,v)}return this},l.prototype.removeAllListeners=function(f){var h;return f?(h=r?r+f:f,this._events[h]&&o(this,h)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,e.exports=l}(Vw)),Vw.exports}var jge=Sge();const _ge=ct(jge);var Uw=new _ge,qw="recharts.syncMouseEvents";function yf(e){"@babel/helpers - typeof";return yf=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},yf(e)}function Pge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Age(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,zF(n.key),n)}}function Nge(e,t,r){return t&&Age(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ww(e,t,r){return t=zF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zF(e){var t=Ege(e,"string");return yf(t)=="symbol"?t:t+""}function Ege(e,t){if(yf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Oge=function(){function e(){Pge(this,e),Ww(this,"activeIndex",0),Ww(this,"coordinateList",[]),Ww(this,"layout","horizontal")}return Nge(e,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,a=i===void 0?null:i,o=r.container,l=o===void 0?null:o,c=r.layout,f=c===void 0?null:c,h=r.offset,p=h===void 0?null:h,g=r.mouseHandlerCallback,v=g===void 0?null:g;this.coordinateList=(n=a??this.coordinateList)!==null&&n!==void 0?n:[],this.container=l??this.container,this.layout=f??this.layout,this.offset=p??this.offset,this.mouseHandlerCallback=v??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,o=i.y,l=i.height,c=this.coordinateList[this.activeIndex].coordinate,f=((r=window)===null||r===void 0?void 0:r.scrollX)||0,h=((n=window)===null||n===void 0?void 0:n.scrollY)||0,p=a+c+f,g=o+this.offset.top+l/2+h;this.mouseHandlerCallback({pageX:p,pageY:g})}}}])}();function Cge(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],i=e==null?void 0:e[1];if(n&&i&&ve(n)&&ve(i))return!0}return!1}function Tge(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function VF(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,a=e.endAngle,o=yt(t,r,n,i),l=yt(t,r,n,a);return{points:[o,l],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}function kge(e,t,r){var n,i,a,o;if(e==="horizontal")n=t.x,a=n,i=r.top,o=r.top+r.height;else if(e==="vertical")i=t.y,o=i,n=r.left,a=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var l=t.cx,c=t.cy,f=t.innerRadius,h=t.outerRadius,p=t.angle,g=yt(l,c,f,p),v=yt(l,c,h,p);n=g.x,i=g.y,a=v.x,o=v.y}else return VF(t);return[{x:n,y:i},{x:a,y:o}]}function xf(e){"@babel/helpers - typeof";return xf=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},xf(e)}function $D(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Oh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$D(Object(r),!0).forEach(function(n){Mge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$D(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mge(e,t,r){return t=Rge(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rge(e){var t=Ige(e,"string");return xf(t)=="symbol"?t:t+""}function Ige(e,t){if(xf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dge(e){var t,r,n=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,l=e.activePayload,c=e.offset,f=e.activeTooltipIndex,h=e.tooltipAxisBandSize,p=e.layout,g=e.chartName,v=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!v||!a||!o||g!=="ScatterChart"&&i!=="axis")return null;var w,y=ES;if(g==="ScatterChart")w=o,y=gde;else if(g==="BarChart")w=Tge(p,o,c,h),y=_P;else if(p==="radial"){var b=VF(o),S=b.cx,A=b.cy,_=b.radius,C=b.startAngle,N=b.endAngle;w={cx:S,cy:A,startAngle:C,endAngle:N,innerRadius:_,outerRadius:_},y=HB}else w={points:kge(p,o,c)},y=ES;var O=Oh(Oh(Oh(Oh({stroke:"#ccc",pointerEvents:"none"},c),w),Fe(v,!1)),{},{payload:l,payloadIndex:f,className:Ye("recharts-tooltip-cursor",v.className)});return j.isValidElement(v)?j.cloneElement(v,O):j.createElement(y,O)}var $ge=["item"],Lge=["children","className","width","height","style","compact","title","desc"];function bl(e){"@babel/helpers - typeof";return bl=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},bl(e)}function Us(){return Us=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Us.apply(this,arguments)}function LD(e,t){return zge(e)||Fge(e,t)||qF(e,t)||Bge()}function Bge(){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 Fge(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],c=!0,f=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function zge(e){if(Array.isArray(e))return e}function BD(e,t){if(e==null)return{};var r=Vge(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Vge(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Uge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qge(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,WF(n.key),n)}}function Wge(e,t,r){return t&&qge(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hge(e,t,r){return t=tm(t),Gge(e,UF()?Reflect.construct(t,r||[],tm(e).constructor):t.apply(e,r))}function Gge(e,t){if(t&&(bl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Kge(e)}function Kge(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(UF=function(){return!!e})()}function tm(e){return tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},tm(e)}function Yge(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oj(e,t)}function oj(e,t){return oj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},oj(e,t)}function wl(e){return Qge(e)||Zge(e)||qF(e)||Xge()}function Xge(){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 qF(e,t){if(e){if(typeof e=="string")return sj(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sj(e,t)}}function Zge(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Qge(e){if(Array.isArray(e))return sj(e)}function sj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function FD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function oe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FD(Object(r),!0).forEach(function(n){De(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function De(e,t,r){return t=WF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WF(e){var t=Jge(e,"string");return bl(t)=="symbol"?t:t+""}function Jge(e,t){if(bl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(bl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eve={xAxis:["bottom","top"],yAxis:["left","right"]},tve={width:"100%",height:"100%"},HF={x:0,y:0};function Ch(e){return e}var rve=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},nve=function(t,r,n,i){var a=r.find(function(h){return h&&h.index===n});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var o=a.coordinate,l=i.radius;return oe(oe(oe({},i),yt(i.cx,i.cy,l,o)),{},{angle:o,radius:l})}var c=a.coordinate,f=i.angle;return oe(oe(oe({},i),yt(i.cx,i.cy,c,f)),{},{angle:f,radius:c})}return HF},mg=function(t,r){var n=r.graphicalItems,i=r.dataStartIndex,a=r.dataEndIndex,o=(n??[]).reduce(function(l,c){var f=c.props.data;return f&&f.length?[].concat(wl(l),wl(f)):l},[]);return o.length>0?o:t&&t.length&&ve(i)&&ve(a)?t.slice(i,a+1):[]};function GF(e){return e==="number"?[0,"auto"]:void 0}var lj=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,l=mg(r,t);return n<0||!a||!a.length||n>=l.length?null:a.reduce(function(c,f){var h,p=(h=f.props.data)!==null&&h!==void 0?h:r;p&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(p=p.slice(t.dataStartIndex,t.dataEndIndex+1));var g;if(o.dataKey&&!o.allowDuplicatedCategory){var v=p===void 0?l:p;g=U1(v,o.dataKey,i)}else g=p&&p[n]||l[n];return g?[].concat(wl(c),[FB(f,g)]):c},[])},zD=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=rve(a,n),l=t.orderedTooltipTicks,c=t.tooltipAxis,f=t.tooltipTicks,h=zle(o,l,f,c);if(h>=0&&f){var p=f[h]&&f[h].value,g=lj(t,r,h,p),v=nve(n,l,h,a);return{activeTooltipIndex:h,activeLabel:p,activePayload:g,activeCoordinate:v}}return null},ive=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,f=r.dataEndIndex,h=t.layout,p=t.children,g=t.stackOffset,v=RB(h,a);return n.reduce(function(w,y){var b,S=y.type.defaultProps!==void 0?oe(oe({},y.type.defaultProps),y.props):y.props,A=S.type,_=S.dataKey,C=S.allowDataOverflow,N=S.allowDuplicatedCategory,O=S.scale,T=S.ticks,k=S.includeHidden,R=S[o];if(w[R])return w;var F=mg(t.data,{graphicalItems:i.filter(function(H){var re,se=o in H.props?H.props[o]:(re=H.type.defaultProps)===null||re===void 0?void 0:re[o];return se===R}),dataStartIndex:c,dataEndIndex:f}),I=F.length,L,V,Y;Cge(S.domain,C,A)&&(L=jS(S.domain,null,C),v&&(A==="number"||O!=="auto")&&(Y=yu(F,_,"category")));var K=GF(A);if(!L||L.length===0){var z,G=(z=S.domain)!==null&&z!==void 0?z:K;if(_){if(L=yu(F,_,A),A==="category"&&v){var D=Iee(L);N&&D?(V=L,L=Up(0,I)):N||(L=qR(G,L,y).reduce(function(H,re){return H.indexOf(re)>=0?H:[].concat(wl(H),[re])},[]))}else if(A==="category")N?L=L.filter(function(H){return H!==""&&!Qe(H)}):L=qR(G,L,y).reduce(function(H,re){return H.indexOf(re)>=0||re===""||Qe(re)?H:[].concat(wl(H),[re])},[]);else if(A==="number"){var q=Hle(F,i.filter(function(H){var re,se,ge=o in H.props?H.props[o]:(re=H.type.defaultProps)===null||re===void 0?void 0:re[o],be="hide"in H.props?H.props.hide:(se=H.type.defaultProps)===null||se===void 0?void 0:se.hide;return ge===R&&(k||!be)}),_,a,h);q&&(L=q)}v&&(A==="number"||O!=="auto")&&(Y=yu(F,_,"category"))}else v?L=Up(0,I):l&&l[R]&&l[R].hasStack&&A==="number"?L=g==="expand"?[0,1]:BB(l[R].stackGroups,c,f):L=MB(F,i.filter(function(H){var re=o in H.props?H.props[o]:H.type.defaultProps[o],se="hide"in H.props?H.props.hide:H.type.defaultProps.hide;return re===R&&(k||!se)}),A,h,!0);if(A==="number")L=aj(p,L,R,a,T),G&&(L=jS(G,L,C));else if(A==="category"&&G){var Q=G,$=L.every(function(H){return Q.indexOf(H)>=0});$&&(L=Q)}}return oe(oe({},w),{},De({},R,oe(oe({},S),{},{axisType:a,domain:L,categoricalDomain:Y,duplicateDomain:V,originalDomain:(b=S.domain)!==null&&b!==void 0?b:K,isCategorical:v,layout:h})))},{})},ave=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,f=r.dataEndIndex,h=t.layout,p=t.children,g=mg(t.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:f}),v=g.length,w=RB(h,a),y=-1;return n.reduce(function(b,S){var A=S.type.defaultProps!==void 0?oe(oe({},S.type.defaultProps),S.props):S.props,_=A[o],C=GF("number");if(!b[_]){y++;var N;return w?N=Up(0,v):l&&l[_]&&l[_].hasStack?(N=BB(l[_].stackGroups,c,f),N=aj(p,N,_,a)):(N=jS(C,MB(g,n.filter(function(O){var T,k,R=o in O.props?O.props[o]:(T=O.type.defaultProps)===null||T===void 0?void 0:T[o],F="hide"in O.props?O.props.hide:(k=O.type.defaultProps)===null||k===void 0?void 0:k.hide;return R===_&&!F}),"number",h),i.defaultProps.allowDataOverflow),N=aj(p,N,_,a)),oe(oe({},b),{},De({},_,oe(oe({axisType:a},i.defaultProps),{},{hide:!0,orientation:Hr(eve,"".concat(a,".").concat(y%2),null),domain:N,originalDomain:C,isCategorical:w,layout:h})))}return b},{})},ove=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,l=r.stackGroups,c=r.dataStartIndex,f=r.dataEndIndex,h=t.children,p="".concat(i,"Id"),g=un(h,a),v={};return g&&g.length?v=ive(t,{axes:g,graphicalItems:o,axisType:i,axisIdKey:p,stackGroups:l,dataStartIndex:c,dataEndIndex:f}):o&&o.length&&(v=ave(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:p,stackGroups:l,dataStartIndex:c,dataEndIndex:f})),v},sve=function(t){var r=Na(t),n=Ci(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:X_(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Tp(r,n)}},VD=function(t){var r=t.children,n=t.defaultShowTooltip,i=Ur(r,dl),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},lve=function(t){return!t||!t.length?!1:t.some(function(r){var n=ki(r&&r.type);return n&&n.indexOf("Bar")>=0})},UD=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},cve=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,l=t.yAxisMap,c=l===void 0?{}:l,f=n.width,h=n.height,p=n.children,g=n.margin||{},v=Ur(p,dl),w=Ur(p,Oa),y=Object.keys(c).reduce(function(N,O){var T=c[O],k=T.orientation;return!T.mirror&&!T.hide?oe(oe({},N),{},De({},k,N[k]+T.width)):N},{left:g.left||0,right:g.right||0}),b=Object.keys(o).reduce(function(N,O){var T=o[O],k=T.orientation;return!T.mirror&&!T.hide?oe(oe({},N),{},De({},k,Hr(N,"".concat(k))+T.height)):N},{top:g.top||0,bottom:g.bottom||0}),S=oe(oe({},b),y),A=S.bottom;v&&(S.bottom+=v.props.height||dl.defaultProps.height),w&&r&&(S=qle(S,i,n,r));var _=f-S.left-S.right,C=h-S.top-S.bottom;return oe(oe({brushBottom:A},S),{},{width:Math.max(_,0),height:Math.max(C,0)})},uve=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},KF=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,l=o===void 0?["axis"]:o,c=t.axisComponents,f=t.legendContent,h=t.formatAxisMap,p=t.defaultProps,g=function(S,A){var _=A.graphicalItems,C=A.stackGroups,N=A.offset,O=A.updateId,T=A.dataStartIndex,k=A.dataEndIndex,R=S.barSize,F=S.layout,I=S.barGap,L=S.barCategoryGap,V=S.maxBarSize,Y=UD(F),K=Y.numericAxisName,z=Y.cateAxisName,G=lve(_),D=[];return _.forEach(function(q,Q){var $=mg(S.data,{graphicalItems:[q],dataStartIndex:T,dataEndIndex:k}),H=q.type.defaultProps!==void 0?oe(oe({},q.type.defaultProps),q.props):q.props,re=H.dataKey,se=H.maxBarSize,ge=H["".concat(K,"Id")],be=H["".concat(z,"Id")],ae={},he=c.reduce(function(pe,_e){var ot=A["".concat(_e.axisType,"Map")],Xt=H["".concat(_e.axisType,"Id")];ot&&ot[Xt]||_e.axisType==="zAxis"||Bo();var Qi=ot[Xt];return oe(oe({},pe),{},De(De({},_e.axisType,Qi),"".concat(_e.axisType,"Ticks"),Ci(Qi)))},ae),ne=he[z],le=he["".concat(z,"Ticks")],ce=C&&C[ge]&&C[ge].hasStack&&tce(q,C[ge].stackGroups),Z=ki(q.type).indexOf("Bar")>=0,Se=Tp(ne,le),we=[],ze=G&&Vle({barSize:R,stackGroups:C,totalSize:uve(he,z)});if(Z){var Ue,Je,ye=Qe(se)?V:se,xe=(Ue=(Je=Tp(ne,le,!0))!==null&&Je!==void 0?Je:ye)!==null&&Ue!==void 0?Ue:0;we=Ule({barGap:I,barCategoryGap:L,bandSize:xe!==Se?xe:Se,sizeList:ze[be],maxBarSize:ye}),xe!==Se&&(we=we.map(function(pe){return oe(oe({},pe),{},{position:oe(oe({},pe.position),{},{offset:pe.position.offset-xe/2})})}))}var Ke=q&&q.type&&q.type.getComposedData;Ke&&D.push({props:oe(oe({},Ke(oe(oe({},he),{},{displayedData:$,props:S,dataKey:re,item:q,bandSize:Se,barPosition:we,offset:N,stackedData:ce,layout:F,dataStartIndex:T,dataEndIndex:k}))),{},De(De(De({key:q.key||"item-".concat(Q)},K,he[K]),z,he[z]),"animationId",O)),childIndex:Gee(q,S.children),item:q})}),D},v=function(S,A){var _=S.props,C=S.dataStartIndex,N=S.dataEndIndex,O=S.updateId;if(!a2({props:_}))return null;var T=_.children,k=_.layout,R=_.stackOffset,F=_.data,I=_.reverseStackOrder,L=UD(k),V=L.numericAxisName,Y=L.cateAxisName,K=un(T,n),z=Jle(F,K,"".concat(V,"Id"),"".concat(Y,"Id"),R,I),G=c.reduce(function(H,re){var se="".concat(re.axisType,"Map");return oe(oe({},H),{},De({},se,ove(_,oe(oe({},re),{},{graphicalItems:K,stackGroups:re.axisType===V&&z,dataStartIndex:C,dataEndIndex:N}))))},{}),D=cve(oe(oe({},G),{},{props:_,graphicalItems:K}),A==null?void 0:A.legendBBox);Object.keys(G).forEach(function(H){G[H]=h(_,G[H],D,H.replace("Map",""),r)});var q=G["".concat(Y,"Map")],Q=sve(q),$=g(_,oe(oe({},G),{},{dataStartIndex:C,dataEndIndex:N,updateId:O,graphicalItems:K,stackGroups:z,offset:D}));return oe(oe({formattedGraphicalItems:$,graphicalItems:K,offset:D,stackGroups:z},Q),G)},w=function(b){function S(A){var _,C,N;return Uge(this,S),N=Hge(this,S,[A]),De(N,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),De(N,"accessibilityManager",new Oge),De(N,"handleLegendBBoxUpdate",function(O){if(O){var T=N.state,k=T.dataStartIndex,R=T.dataEndIndex,F=T.updateId;N.setState(oe({legendBBox:O},v({props:N.props,dataStartIndex:k,dataEndIndex:R,updateId:F},oe(oe({},N.state),{},{legendBBox:O}))))}}),De(N,"handleReceiveSyncEvent",function(O,T,k){if(N.props.syncId===O){if(k===N.eventEmitterSymbol&&typeof N.props.syncMethod!="function")return;N.applySyncEvent(T)}}),De(N,"handleBrushChange",function(O){var T=O.startIndex,k=O.endIndex;if(T!==N.state.dataStartIndex||k!==N.state.dataEndIndex){var R=N.state.updateId;N.setState(function(){return oe({dataStartIndex:T,dataEndIndex:k},v({props:N.props,dataStartIndex:T,dataEndIndex:k,updateId:R},N.state))}),N.triggerSyncEvent({dataStartIndex:T,dataEndIndex:k})}}),De(N,"handleMouseEnter",function(O){var T=N.getMouseInfo(O);if(T){var k=oe(oe({},T),{},{isTooltipActive:!0});N.setState(k),N.triggerSyncEvent(k);var R=N.props.onMouseEnter;qe(R)&&R(k,O)}}),De(N,"triggeredAfterMouseMove",function(O){var T=N.getMouseInfo(O),k=T?oe(oe({},T),{},{isTooltipActive:!0}):{isTooltipActive:!1};N.setState(k),N.triggerSyncEvent(k);var R=N.props.onMouseMove;qe(R)&&R(k,O)}),De(N,"handleItemMouseEnter",function(O){N.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),De(N,"handleItemMouseLeave",function(){N.setState(function(){return{isTooltipActive:!1}})}),De(N,"handleMouseMove",function(O){O.persist(),N.throttleTriggeredAfterMouseMove(O)}),De(N,"handleMouseLeave",function(O){N.throttleTriggeredAfterMouseMove.cancel();var T={isTooltipActive:!1};N.setState(T),N.triggerSyncEvent(T);var k=N.props.onMouseLeave;qe(k)&&k(T,O)}),De(N,"handleOuterEvent",function(O){var T=Hee(O),k=Hr(N.props,"".concat(T));if(T&&qe(k)){var R,F;/.*touch.*/i.test(T)?F=N.getMouseInfo(O.changedTouches[0]):F=N.getMouseInfo(O),k((R=F)!==null&&R!==void 0?R:{},O)}}),De(N,"handleClick",function(O){var T=N.getMouseInfo(O);if(T){var k=oe(oe({},T),{},{isTooltipActive:!0});N.setState(k),N.triggerSyncEvent(k);var R=N.props.onClick;qe(R)&&R(k,O)}}),De(N,"handleMouseDown",function(O){var T=N.props.onMouseDown;if(qe(T)){var k=N.getMouseInfo(O);T(k,O)}}),De(N,"handleMouseUp",function(O){var T=N.props.onMouseUp;if(qe(T)){var k=N.getMouseInfo(O);T(k,O)}}),De(N,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&N.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),De(N,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&N.handleMouseDown(O.changedTouches[0])}),De(N,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&N.handleMouseUp(O.changedTouches[0])}),De(N,"handleDoubleClick",function(O){var T=N.props.onDoubleClick;if(qe(T)){var k=N.getMouseInfo(O);T(k,O)}}),De(N,"handleContextMenu",function(O){var T=N.props.onContextMenu;if(qe(T)){var k=N.getMouseInfo(O);T(k,O)}}),De(N,"triggerSyncEvent",function(O){N.props.syncId!==void 0&&Uw.emit(qw,N.props.syncId,O,N.eventEmitterSymbol)}),De(N,"applySyncEvent",function(O){var T=N.props,k=T.layout,R=T.syncMethod,F=N.state.updateId,I=O.dataStartIndex,L=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)N.setState(oe({dataStartIndex:I,dataEndIndex:L},v({props:N.props,dataStartIndex:I,dataEndIndex:L,updateId:F},N.state)));else if(O.activeTooltipIndex!==void 0){var V=O.chartX,Y=O.chartY,K=O.activeTooltipIndex,z=N.state,G=z.offset,D=z.tooltipTicks;if(!G)return;if(typeof R=="function")K=R(D,O);else if(R==="value"){K=-1;for(var q=0;q<D.length;q++)if(D[q].value===O.activeLabel){K=q;break}}var Q=oe(oe({},G),{},{x:G.left,y:G.top}),$=Math.min(V,Q.x+Q.width),H=Math.min(Y,Q.y+Q.height),re=D[K]&&D[K].value,se=lj(N.state,N.props.data,K),ge=D[K]?{x:k==="horizontal"?D[K].coordinate:$,y:k==="horizontal"?H:D[K].coordinate}:HF;N.setState(oe(oe({},O),{},{activeLabel:re,activeCoordinate:ge,activePayload:se,activeTooltipIndex:K}))}else N.setState(O)}),De(N,"renderCursor",function(O){var T,k=N.state,R=k.isTooltipActive,F=k.activeCoordinate,I=k.activePayload,L=k.offset,V=k.activeTooltipIndex,Y=k.tooltipAxisBandSize,K=N.getTooltipEventType(),z=(T=O.props.active)!==null&&T!==void 0?T:R,G=N.props.layout,D=O.key||"_recharts-cursor";return U.createElement(Dge,{key:D,activeCoordinate:F,activePayload:I,activeTooltipIndex:V,chartName:r,element:O,isActive:z,layout:G,offset:L,tooltipAxisBandSize:Y,tooltipEventType:K})}),De(N,"renderPolarAxis",function(O,T,k){var R=Hr(O,"type.axisType"),F=Hr(N.state,"".concat(R,"Map")),I=O.type.defaultProps,L=I!==void 0?oe(oe({},I),O.props):O.props,V=F&&F[L["".concat(R,"Id")]];return j.cloneElement(O,oe(oe({},V),{},{className:Ye(R,V.className),key:O.key||"".concat(T,"-").concat(k),ticks:Ci(V,!0)}))}),De(N,"renderPolarGrid",function(O){var T=O.props,k=T.radialLines,R=T.polarAngles,F=T.polarRadius,I=N.state,L=I.radiusAxisMap,V=I.angleAxisMap,Y=Na(L),K=Na(V),z=K.cx,G=K.cy,D=K.innerRadius,q=K.outerRadius;return j.cloneElement(O,{polarAngles:Array.isArray(R)?R:Ci(K,!0).map(function(Q){return Q.coordinate}),polarRadius:Array.isArray(F)?F:Ci(Y,!0).map(function(Q){return Q.coordinate}),cx:z,cy:G,innerRadius:D,outerRadius:q,key:O.key||"polar-grid",radialLines:k})}),De(N,"renderLegend",function(){var O=N.state.formattedGraphicalItems,T=N.props,k=T.children,R=T.width,F=T.height,I=N.props.margin||{},L=R-(I.left||0)-(I.right||0),V=TB({children:k,formattedGraphicalItems:O,legendWidth:L,legendContent:f});if(!V)return null;var Y=V.item,K=BD(V,$ge);return j.cloneElement(Y,oe(oe({},K),{},{chartWidth:R,chartHeight:F,margin:I,onBBoxUpdate:N.handleLegendBBoxUpdate}))}),De(N,"renderTooltip",function(){var O,T=N.props,k=T.children,R=T.accessibilityLayer,F=Ur(k,on);if(!F)return null;var I=N.state,L=I.isTooltipActive,V=I.activeCoordinate,Y=I.activePayload,K=I.activeLabel,z=I.offset,G=(O=F.props.active)!==null&&O!==void 0?O:L;return j.cloneElement(F,{viewBox:oe(oe({},z),{},{x:z.left,y:z.top}),active:G,label:K,payload:G?Y:[],coordinate:V,accessibilityLayer:R})}),De(N,"renderBrush",function(O){var T=N.props,k=T.margin,R=T.data,F=N.state,I=F.offset,L=F.dataStartIndex,V=F.dataEndIndex,Y=F.updateId;return j.cloneElement(O,{key:O.key||"_recharts-brush",onChange:Ph(N.handleBrushChange,O.props.onChange),data:R,x:ve(O.props.x)?O.props.x:I.left,y:ve(O.props.y)?O.props.y:I.top+I.height+I.brushBottom-(k.bottom||0),width:ve(O.props.width)?O.props.width:I.width,startIndex:L,endIndex:V,updateId:"brush-".concat(Y)})}),De(N,"renderReferenceElement",function(O,T,k){if(!O)return null;var R=N,F=R.clipPathId,I=N.state,L=I.xAxisMap,V=I.yAxisMap,Y=I.offset,K=O.type.defaultProps||{},z=O.props,G=z.xAxisId,D=G===void 0?K.xAxisId:G,q=z.yAxisId,Q=q===void 0?K.yAxisId:q;return j.cloneElement(O,{key:O.key||"".concat(T,"-").concat(k),xAxis:L[D],yAxis:V[Q],viewBox:{x:Y.left,y:Y.top,width:Y.width,height:Y.height},clipPathId:F})}),De(N,"renderActivePoints",function(O){var T=O.item,k=O.activePoint,R=O.basePoint,F=O.childIndex,I=O.isRange,L=[],V=T.props.key,Y=T.item.type.defaultProps!==void 0?oe(oe({},T.item.type.defaultProps),T.item.props):T.item.props,K=Y.activeDot,z=Y.dataKey,G=oe(oe({index:F,dataKey:z,cx:k.x,cy:k.y,r:4,fill:jP(T.item),strokeWidth:2,stroke:"#fff",payload:k.payload,value:k.value},Fe(K,!1)),sp(K));return L.push(S.renderActiveDot(K,G,"".concat(V,"-activePoint-").concat(F))),R?L.push(S.renderActiveDot(K,oe(oe({},G),{},{cx:R.x,cy:R.y}),"".concat(V,"-basePoint-").concat(F))):I&&L.push(null),L}),De(N,"renderGraphicChild",function(O,T,k){var R=N.filterFormatItem(O,T,k);if(!R)return null;var F=N.getTooltipEventType(),I=N.state,L=I.isTooltipActive,V=I.tooltipAxis,Y=I.activeTooltipIndex,K=I.activeLabel,z=N.props.children,G=Ur(z,on),D=R.props,q=D.points,Q=D.isRange,$=D.baseLine,H=R.item.type.defaultProps!==void 0?oe(oe({},R.item.type.defaultProps),R.item.props):R.item.props,re=H.activeDot,se=H.hide,ge=H.activeBar,be=H.activeShape,ae=!!(!se&&L&&G&&(re||ge||be)),he={};F!=="axis"&&G&&G.props.trigger==="click"?he={onClick:Ph(N.handleItemMouseEnter,O.props.onClick)}:F!=="axis"&&(he={onMouseLeave:Ph(N.handleItemMouseLeave,O.props.onMouseLeave),onMouseEnter:Ph(N.handleItemMouseEnter,O.props.onMouseEnter)});var ne=j.cloneElement(O,oe(oe({},R.props),he));function le(_e){return typeof V.dataKey=="function"?V.dataKey(_e.payload):null}if(ae)if(Y>=0){var ce,Z;if(V.dataKey&&!V.allowDuplicatedCategory){var Se=typeof V.dataKey=="function"?le:"payload.".concat(V.dataKey.toString());ce=U1(q,Se,K),Z=Q&&$&&U1($,Se,K)}else ce=q==null?void 0:q[Y],Z=Q&&$&&$[Y];if(be||ge){var we=O.props.activeIndex!==void 0?O.props.activeIndex:Y;return[j.cloneElement(O,oe(oe(oe({},R.props),he),{},{activeIndex:we})),null,null]}if(!Qe(ce))return[ne].concat(wl(N.renderActivePoints({item:R,activePoint:ce,basePoint:Z,childIndex:Y,isRange:Q})))}else{var ze,Ue=(ze=N.getItemByXY(N.state.activeCoordinate))!==null&&ze!==void 0?ze:{graphicalItem:ne},Je=Ue.graphicalItem,ye=Je.item,xe=ye===void 0?O:ye,Ke=Je.childIndex,pe=oe(oe(oe({},R.props),he),{},{activeIndex:Ke});return[j.cloneElement(xe,pe),null,null]}return Q?[ne,null,null]:[ne,null]}),De(N,"renderCustomized",function(O,T,k){return j.cloneElement(O,oe(oe({key:"recharts-customized-".concat(k)},N.props),N.state))}),De(N,"renderMap",{CartesianGrid:{handler:Ch,once:!0},ReferenceArea:{handler:N.renderReferenceElement},ReferenceLine:{handler:Ch},ReferenceDot:{handler:N.renderReferenceElement},XAxis:{handler:Ch},YAxis:{handler:Ch},Brush:{handler:N.renderBrush,once:!0},Bar:{handler:N.renderGraphicChild},Line:{handler:N.renderGraphicChild},Area:{handler:N.renderGraphicChild},Radar:{handler:N.renderGraphicChild},RadialBar:{handler:N.renderGraphicChild},Scatter:{handler:N.renderGraphicChild},Pie:{handler:N.renderGraphicChild},Funnel:{handler:N.renderGraphicChild},Tooltip:{handler:N.renderCursor,once:!0},PolarGrid:{handler:N.renderPolarGrid,once:!0},PolarAngleAxis:{handler:N.renderPolarAxis},PolarRadiusAxis:{handler:N.renderPolarAxis},Customized:{handler:N.renderCustomized}}),N.clipPathId="".concat((_=A.id)!==null&&_!==void 0?_:Bf("recharts"),"-clip"),N.throttleTriggeredAfterMouseMove=C5(N.triggeredAfterMouseMove,(C=A.throttleDelay)!==null&&C!==void 0?C:1e3/60),N.state={},N}return Yge(S,b),Wge(S,[{key:"componentDidMount",value:function(){var _,C;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var _=this.props,C=_.children,N=_.data,O=_.height,T=_.layout,k=Ur(C,on);if(k){var R=k.props.defaultIndex;if(!(typeof R!="number"||R<0||R>this.state.tooltipTicks.length-1)){var F=this.state.tooltipTicks[R]&&this.state.tooltipTicks[R].value,I=lj(this.state,N,R,F),L=this.state.tooltipTicks[R].coordinate,V=(this.state.offset.top+O)/2,Y=T==="horizontal",K=Y?{x:L,y:V}:{y:L,x:V},z=this.state.formattedGraphicalItems.find(function(D){var q=D.item;return q.type.name==="Scatter"});z&&(K=oe(oe({},K),z.props.points[R].tooltipPosition),I=z.props.points[R].tooltipPayload);var G={activeTooltipIndex:R,isTooltipActive:!0,activeLabel:F,activePayload:I,activeCoordinate:K};this.setState(G),this.renderCursor(k),this.accessibilityManager.setIndex(R)}}}},{key:"getSnapshotBeforeUpdate",value:function(_,C){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==C.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==_.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==_.margin){var N,O;this.accessibilityManager.setDetails({offset:{left:(N=this.props.margin.left)!==null&&N!==void 0?N:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(_){W1([Ur(_.children,on)],[Ur(this.props.children,on)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var _=Ur(this.props.children,on);if(_&&typeof _.props.shared=="boolean"){var C=_.props.shared?"axis":"item";return l.indexOf(C)>=0?C:a}return a}},{key:"getMouseInfo",value:function(_){if(!this.container)return null;var C=this.container,N=C.getBoundingClientRect(),O=Mie(N),T={chartX:Math.round(_.pageX-O.left),chartY:Math.round(_.pageY-O.top)},k=N.width/C.offsetWidth||1,R=this.inRange(T.chartX,T.chartY,k);if(!R)return null;var F=this.state,I=F.xAxisMap,L=F.yAxisMap,V=this.getTooltipEventType(),Y=zD(this.state,this.props.data,this.props.layout,R);if(V!=="axis"&&I&&L){var K=Na(I).scale,z=Na(L).scale,G=K&&K.invert?K.invert(T.chartX):null,D=z&&z.invert?z.invert(T.chartY):null;return oe(oe({},T),{},{xValue:G,yValue:D},Y)}return Y?oe(oe({},T),Y):null}},{key:"inRange",value:function(_,C){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,T=_/N,k=C/N;if(O==="horizontal"||O==="vertical"){var R=this.state.offset,F=T>=R.left&&T<=R.left+R.width&&k>=R.top&&k<=R.top+R.height;return F?{x:T,y:k}:null}var I=this.state,L=I.angleAxisMap,V=I.radiusAxisMap;if(L&&V){var Y=Na(L);return GR({x:T,y:k},Y)}return null}},{key:"parseEventsOfWrapper",value:function(){var _=this.props.children,C=this.getTooltipEventType(),N=Ur(_,on),O={};N&&C==="axis"&&(N.props.trigger==="click"?O={onClick:this.handleClick}:O={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var T=sp(this.props,this.handleOuterEvent);return oe(oe({},T),O)}},{key:"addListener",value:function(){Uw.on(qw,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Uw.removeListener(qw,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(_,C,N){for(var O=this.state.formattedGraphicalItems,T=0,k=O.length;T<k;T++){var R=O[T];if(R.item===_||R.props.key===_.key||C===ki(R.item.type)&&N===R.childIndex)return R}return null}},{key:"renderClipPath",value:function(){var _=this.clipPathId,C=this.state.offset,N=C.left,O=C.top,T=C.height,k=C.width;return U.createElement("defs",null,U.createElement("clipPath",{id:_},U.createElement("rect",{x:N,y:O,height:T,width:k})))}},{key:"getXScales",value:function(){var _=this.state.xAxisMap;return _?Object.entries(_).reduce(function(C,N){var O=LD(N,2),T=O[0],k=O[1];return oe(oe({},C),{},De({},T,k.scale))},{}):null}},{key:"getYScales",value:function(){var _=this.state.yAxisMap;return _?Object.entries(_).reduce(function(C,N){var O=LD(N,2),T=O[0],k=O[1];return oe(oe({},C),{},De({},T,k.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(_){var C;return(C=this.state.xAxisMap)===null||C===void 0||(C=C[_])===null||C===void 0?void 0:C.scale}},{key:"getYScaleByAxisId",value:function(_){var C;return(C=this.state.yAxisMap)===null||C===void 0||(C=C[_])===null||C===void 0?void 0:C.scale}},{key:"getItemByXY",value:function(_){var C=this.state,N=C.formattedGraphicalItems,O=C.activeItem;if(N&&N.length)for(var T=0,k=N.length;T<k;T++){var R=N[T],F=R.props,I=R.item,L=I.type.defaultProps!==void 0?oe(oe({},I.type.defaultProps),I.props):I.props,V=ki(I.type);if(V==="Bar"){var Y=(F.data||[]).find(function(D){return Xfe(_,D)});if(Y)return{graphicalItem:R,payload:Y}}else if(V==="RadialBar"){var K=(F.data||[]).find(function(D){return GR(_,D)});if(K)return{graphicalItem:R,payload:K}}else if(lg(R,O)||cg(R,O)||hf(R,O)){var z=bhe({graphicalItem:R,activeTooltipItem:O,itemData:L.data}),G=L.activeIndex===void 0?z:L.activeIndex;return{graphicalItem:oe(oe({},R),{},{childIndex:G}),payload:hf(R,O)?L.data[z]:R.props.data[z]}}}return null}},{key:"render",value:function(){var _=this;if(!a2(this))return null;var C=this.props,N=C.children,O=C.className,T=C.width,k=C.height,R=C.style,F=C.compact,I=C.title,L=C.desc,V=BD(C,Lge),Y=Fe(V,!1);if(F)return U.createElement(SD,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},U.createElement(G1,Us({},Y,{width:T,height:k,title:I,desc:L}),this.renderClipPath(),s2(N,this.renderMap)));if(this.props.accessibilityLayer){var K,z;Y.tabIndex=(K=this.props.tabIndex)!==null&&K!==void 0?K:0,Y.role=(z=this.props.role)!==null&&z!==void 0?z:"application",Y.onKeyDown=function(D){_.accessibilityManager.keyboardEvent(D)},Y.onFocus=function(){_.accessibilityManager.focus()}}var G=this.parseEventsOfWrapper();return U.createElement(SD,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},U.createElement("div",Us({className:Ye("recharts-wrapper",O),style:oe({position:"relative",cursor:"default",width:T,height:k},R)},G,{ref:function(q){_.container=q}}),U.createElement(G1,Us({},Y,{width:T,height:k,title:I,desc:L,style:tve}),this.renderClipPath(),s2(N,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(j.Component);De(w,"displayName",r),De(w,"defaultProps",oe({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},p)),De(w,"getDerivedStateFromProps",function(b,S){var A=b.dataKey,_=b.data,C=b.children,N=b.width,O=b.height,T=b.layout,k=b.stackOffset,R=b.margin,F=S.dataStartIndex,I=S.dataEndIndex;if(S.updateId===void 0){var L=VD(b);return oe(oe(oe({},L),{},{updateId:0},v(oe(oe({props:b},L),{},{updateId:0}),S)),{},{prevDataKey:A,prevData:_,prevWidth:N,prevHeight:O,prevLayout:T,prevStackOffset:k,prevMargin:R,prevChildren:C})}if(A!==S.prevDataKey||_!==S.prevData||N!==S.prevWidth||O!==S.prevHeight||T!==S.prevLayout||k!==S.prevStackOffset||!Ws(R,S.prevMargin)){var V=VD(b),Y={chartX:S.chartX,chartY:S.chartY,isTooltipActive:S.isTooltipActive},K=oe(oe({},zD(S,_,T)),{},{updateId:S.updateId+1}),z=oe(oe(oe({},V),Y),K);return oe(oe(oe({},z),v(oe({props:b},z),S)),{},{prevDataKey:A,prevData:_,prevWidth:N,prevHeight:O,prevLayout:T,prevStackOffset:k,prevMargin:R,prevChildren:C})}if(!W1(C,S.prevChildren)){var G,D,q,Q,$=Ur(C,dl),H=$&&(G=(D=$.props)===null||D===void 0?void 0:D.startIndex)!==null&&G!==void 0?G:F,re=$&&(q=(Q=$.props)===null||Q===void 0?void 0:Q.endIndex)!==null&&q!==void 0?q:I,se=H!==F||re!==I,ge=!Qe(_),be=ge&&!se?S.updateId:S.updateId+1;return oe(oe({updateId:be},v(oe(oe({props:b},S),{},{updateId:be,dataStartIndex:H,dataEndIndex:re}),S)),{},{prevChildren:C,dataStartIndex:H,dataEndIndex:re})}return null}),De(w,"renderActiveDot",function(b,S,A){var _;return j.isValidElement(b)?_=j.cloneElement(b,S):qe(b)?_=b(S):_=U.createElement(PP,S),U.createElement(ft,{className:"recharts-active-dot",key:A},_)});var y=j.forwardRef(function(S,A){return U.createElement(w,Us({},S,{ref:A}))});return y.displayName=w.displayName,y},YF=KF({chartName:"BarChart",GraphicalChild:Wa,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Wf},{axisType:"yAxis",AxisComp:Hf}],formatAxisMap:jpe}),fve=KF({chartName:"PieChart",GraphicalChild:Zi,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:sg},{axisType:"radiusAxis",AxisComp:ag}],formatAxisMap:fce,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const DP=()=>{const{residenceData:e,loading:t,error:r}=O_(),n=j.useRef(null);if(t)return d.jsxs(et,{className:"border border-gray-800 bg-gray-900 shadow-2xl overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-[#9B2335] to-[#9B2335]/60"}),d.jsx(tt,{className:"p-6 flex items-center justify-center h-4",children:d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#9B2335]"})})]});if(r)return d.jsxs(et,{className:"border border-gray-800 bg-gray-900 shadow-2xl overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-red-500 to-red-600"}),d.jsx(tt,{className:"p-6 text-center",children:d.jsx("p",{className:"text-red-400",children:r})})]});if(!e.length)return d.jsxs(et,{className:"border border-gray-800 bg-gray-900 shadow-2xl overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-gray-600 to-gray-700"}),d.jsx(tt,{className:"p-6 text-center",children:d.jsx("p",{className:"text-gray-400",children:"No data available"})})]});const i=["#9B2335","#DC2626","#EA580C","#D97706","#CA8A04","#65A30D","#16A34A","#059669","#0891B2","#0284C7"];return d.jsxs(et,{ref:n,className:"border border-gray-800 bg-gray-900 shadow-2xl overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-[#9B2335] to-[#9B2335]/60"}),d.jsxs(Mn,{className:"border-b border-gray-800",children:[d.jsx(Rn,{className:"text-lg font-medium text-white",children:"Italian Migration: Residence Distribution"}),d.jsx(Ho,{className:"text-gray-400",children:"Distribution of Italian migrants across different towns or cities"})]}),d.jsx(tt,{className:"p-6",children:d.jsx(Q_,{width:"100%",height:400,children:d.jsxs(fve,{children:[d.jsx(Zi,{data:e,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:130,innerRadius:70,paddingAngle:3,labelLine:!1,label:({name:a,value:o})=>`${a} (${o})`,children:e.map((a,o)=>d.jsx(qm,{fill:i[o%i.length],className:"rounded-full"},`cell-${o}`))}),d.jsx(on,{contentStyle:{backgroundColor:"#1F2937",borderRadius:"8px",color:"#fff",fontSize:"0.875rem",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",border:"1px solid #374151"},formatter:(a,o)=>[`${a} migrants`,o]}),d.jsx(Oa,{verticalAlign:"bottom",iconType:"circle",align:"center",wrapperStyle:{fontSize:"0.875rem",color:"#9CA3AF",marginTop:"1rem"}})]})})})]})};function dve(e,t=globalThis==null?void 0:globalThis.document){const r=ai(e);j.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var hve="DismissableLayer",cj="dismissableLayer.update",pve="dismissableLayer.pointerDownOutside",mve="dismissableLayer.focusOutside",qD,XF=j.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gg=j.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:l,...c}=e,f=j.useContext(XF),[h,p]=j.useState(null),g=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=j.useState({}),w=it(t,T=>p(T)),y=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),S=y.indexOf(b),A=h?y.indexOf(h):-1,_=f.layersWithOutsidePointerEventsDisabled.size>0,C=A>=S,N=yve(T=>{const k=T.target,R=[...f.branches].some(F=>F.contains(k));!C||R||(i==null||i(T),o==null||o(T),T.defaultPrevented||l==null||l())},g),O=xve(T=>{const k=T.target;[...f.branches].some(F=>F.contains(k))||(a==null||a(T),o==null||o(T),T.defaultPrevented||l==null||l())},g);return dve(T=>{A===f.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},g),j.useEffect(()=>{if(h)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(qD=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),WD(),()=>{r&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=qD)}},[h,g,r,f]),j.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),WD())},[h,f]),j.useEffect(()=>{const T=()=>v({});return document.addEventListener(cj,T),()=>document.removeEventListener(cj,T)},[]),d.jsx(Le.div,{...c,ref:w,style:{pointerEvents:_?C?"auto":"none":void 0,...e.style},onFocusCapture:Ce(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Ce(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Ce(e.onPointerDownCapture,N.onPointerDownCapture)})});gg.displayName=hve;var gve="DismissableLayerBranch",vve=j.forwardRef((e,t)=>{const r=j.useContext(XF),n=j.useRef(null),i=it(t,n);return j.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),d.jsx(Le.div,{...e,ref:i})});vve.displayName=gve;function yve(e,t=globalThis==null?void 0:globalThis.document){const r=ai(e),n=j.useRef(!1),i=j.useRef(()=>{});return j.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let c=function(){ZF(pve,r,f,{discrete:!0})};const f={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function xve(e,t=globalThis==null?void 0:globalThis.document){const r=ai(e),n=j.useRef(!1);return j.useEffect(()=>{const i=a=>{a.target&&!n.current&&ZF(mve,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function WD(){const e=new CustomEvent(cj);document.dispatchEvent(e)}function ZF(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?f3(i,a):i.dispatchEvent(a)}var Hw=0;function $P(){j.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??HD()),document.body.insertAdjacentElement("beforeend",e[1]??HD()),Hw++,()=>{Hw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Hw--}},[])}function HD(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Gw="focusScope.autoFocusOnMount",Kw="focusScope.autoFocusOnUnmount",GD={bubbles:!1,cancelable:!0},bve="FocusScope",vg=j.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[l,c]=j.useState(null),f=ai(i),h=ai(a),p=j.useRef(null),g=it(t,y=>c(y)),v=j.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j.useEffect(()=>{if(n){let y=function(_){if(v.paused||!l)return;const C=_.target;l.contains(C)?p.current=C:ja(p.current,{select:!0})},b=function(_){if(v.paused||!l)return;const C=_.relatedTarget;C!==null&&(l.contains(C)||ja(p.current,{select:!0}))},S=function(_){if(document.activeElement===document.body)for(const N of _)N.removedNodes.length>0&&ja(l)};document.addEventListener("focusin",y),document.addEventListener("focusout",b);const A=new MutationObserver(S);return l&&A.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",b),A.disconnect()}}},[n,l,v.paused]),j.useEffect(()=>{if(l){YD.add(v);const y=document.activeElement;if(!l.contains(y)){const S=new CustomEvent(Gw,GD);l.addEventListener(Gw,f),l.dispatchEvent(S),S.defaultPrevented||(wve(Ave(QF(l)),{select:!0}),document.activeElement===y&&ja(l))}return()=>{l.removeEventListener(Gw,f),setTimeout(()=>{const S=new CustomEvent(Kw,GD);l.addEventListener(Kw,h),l.dispatchEvent(S),S.defaultPrevented||ja(y??document.body,{select:!0}),l.removeEventListener(Kw,h),YD.remove(v)},0)}}},[l,f,h,v]);const w=j.useCallback(y=>{if(!r&&!n||v.paused)return;const b=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,S=document.activeElement;if(b&&S){const A=y.currentTarget,[_,C]=Sve(A);_&&C?!y.shiftKey&&S===C?(y.preventDefault(),r&&ja(_,{select:!0})):y.shiftKey&&S===_&&(y.preventDefault(),r&&ja(C,{select:!0})):S===A&&y.preventDefault()}},[r,n,v.paused]);return d.jsx(Le.div,{tabIndex:-1,...o,ref:g,onKeyDown:w})});vg.displayName=bve;function wve(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(ja(n,{select:t}),document.activeElement!==r)return}function Sve(e){const t=QF(e),r=KD(t,e),n=KD(t.reverse(),e);return[r,n]}function QF(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function KD(e,t){for(const r of e)if(!jve(r,{upTo:t}))return r}function jve(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function _ve(e){return e instanceof HTMLInputElement&&"select"in e}function ja(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&_ve(e)&&t&&e.select()}}var YD=Pve();function Pve(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=XD(e,t),e.unshift(t)},remove(t){var r;e=XD(e,t),(r=e[0])==null||r.resume()}}}function XD(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Ave(e){return e.filter(t=>t.tagName!=="A")}const Nve=["top","right","bottom","left"],$a=Math.min,qr=Math.max,rm=Math.round,Th=Math.floor,ii=e=>({x:e,y:e}),Eve={left:"right",right:"left",bottom:"top",top:"bottom"},Ove={start:"end",end:"start"};function uj(e,t,r){return qr(e,$a(t,r))}function Wi(e,t){return typeof e=="function"?e(t):e}function Hi(e){return e.split("-")[0]}function Vl(e){return e.split("-")[1]}function LP(e){return e==="x"?"y":"x"}function BP(e){return e==="y"?"height":"width"}function Ri(e){return["top","bottom"].includes(Hi(e))?"y":"x"}function FP(e){return LP(Ri(e))}function Cve(e,t,r){r===void 0&&(r=!1);const n=Vl(e),i=FP(e),a=BP(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=nm(o)),[o,nm(o)]}function Tve(e){const t=nm(e);return[fj(e),t,fj(t)]}function fj(e){return e.replace(/start|end/g,t=>Ove[t])}function kve(e,t,r){const n=["left","right"],i=["right","left"],a=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return r?t?i:n:t?n:i;case"left":case"right":return t?a:o;default:return[]}}function Mve(e,t,r,n){const i=Vl(e);let a=kve(Hi(e),r==="start",n);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(fj)))),a}function nm(e){return e.replace(/left|right|bottom|top/g,t=>Eve[t])}function Rve(e){return{top:0,right:0,bottom:0,left:0,...e}}function JF(e){return typeof e!="number"?Rve(e):{top:e,right:e,bottom:e,left:e}}function im(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function ZD(e,t,r){let{reference:n,floating:i}=e;const a=Ri(t),o=FP(t),l=BP(o),c=Hi(t),f=a==="y",h=n.x+n.width/2-i.width/2,p=n.y+n.height/2-i.height/2,g=n[l]/2-i[l]/2;let v;switch(c){case"top":v={x:h,y:n.y-i.height};break;case"bottom":v={x:h,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:p};break;case"left":v={x:n.x-i.width,y:p};break;default:v={x:n.x,y:n.y}}switch(Vl(t)){case"start":v[o]-=g*(r&&f?-1:1);break;case"end":v[o]+=g*(r&&f?-1:1);break}return v}const Ive=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:o}=r,l=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let f=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:p}=ZD(f,n,c),g=n,v={},w=0;for(let y=0;y<l.length;y++){const{name:b,fn:S}=l[y],{x:A,y:_,data:C,reset:N}=await S({x:h,y:p,initialPlacement:n,placement:g,strategy:i,middlewareData:v,rects:f,platform:o,elements:{reference:e,floating:t}});h=A??h,p=_??p,v={...v,[b]:{...v[b],...C}},N&&w<=50&&(w++,typeof N=="object"&&(N.placement&&(g=N.placement),N.rects&&(f=N.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):N.rects),{x:h,y:p}=ZD(f,g,c)),y=-1)}return{x:h,y:p,placement:g,strategy:i,middlewareData:v}};async function bf(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:a,rects:o,elements:l,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:g=!1,padding:v=0}=Wi(t,e),w=JF(v),b=l[g?p==="floating"?"reference":"floating":p],S=im(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(b)))==null||r?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:f,rootBoundary:h,strategy:c})),A=p==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),C=await(a.isElement==null?void 0:a.isElement(_))?await(a.getScale==null?void 0:a.getScale(_))||{x:1,y:1}:{x:1,y:1},N=im(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:A,offsetParent:_,strategy:c}):A);return{top:(S.top-N.top+w.top)/C.y,bottom:(N.bottom-S.bottom+w.bottom)/C.y,left:(S.left-N.left+w.left)/C.x,right:(N.right-S.right+w.right)/C.x}}const Dve=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:a,platform:o,elements:l,middlewareData:c}=t,{element:f,padding:h=0}=Wi(e,t)||{};if(f==null)return{};const p=JF(h),g={x:r,y:n},v=FP(i),w=BP(v),y=await o.getDimensions(f),b=v==="y",S=b?"top":"left",A=b?"bottom":"right",_=b?"clientHeight":"clientWidth",C=a.reference[w]+a.reference[v]-g[v]-a.floating[w],N=g[v]-a.reference[v],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(f));let T=O?O[_]:0;(!T||!await(o.isElement==null?void 0:o.isElement(O)))&&(T=l.floating[_]||a.floating[w]);const k=C/2-N/2,R=T/2-y[w]/2-1,F=$a(p[S],R),I=$a(p[A],R),L=F,V=T-y[w]-I,Y=T/2-y[w]/2+k,K=uj(L,Y,V),z=!c.arrow&&Vl(i)!=null&&Y!==K&&a.reference[w]/2-(Y<L?F:I)-y[w]/2<0,G=z?Y<L?Y-L:Y-V:0;return{[v]:g[v]+G,data:{[v]:K,centerOffset:Y-K-G,...z&&{alignmentOffset:G}},reset:z}}}),$ve=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:a,rects:o,initialPlacement:l,platform:c,elements:f}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:y=!0,...b}=Wi(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const S=Hi(i),A=Ri(l),_=Hi(l)===l,C=await(c.isRTL==null?void 0:c.isRTL(f.floating)),N=g||(_||!y?[nm(l)]:Tve(l)),O=w!=="none";!g&&O&&N.push(...Mve(l,y,w,C));const T=[l,...N],k=await bf(t,b),R=[];let F=((n=a.flip)==null?void 0:n.overflows)||[];if(h&&R.push(k[S]),p){const K=Cve(i,o,C);R.push(k[K[0]],k[K[1]])}if(F=[...F,{placement:i,overflows:R}],!R.every(K=>K<=0)){var I,L;const K=(((I=a.flip)==null?void 0:I.index)||0)+1,z=T[K];if(z){var V;const D=p==="alignment"?A!==Ri(z):!1,q=((V=F[0])==null?void 0:V.overflows[0])>0;if(!D||q)return{data:{index:K,overflows:F},reset:{placement:z}}}let G=(L=F.filter(D=>D.overflows[0]<=0).sort((D,q)=>D.overflows[1]-q.overflows[1])[0])==null?void 0:L.placement;if(!G)switch(v){case"bestFit":{var Y;const D=(Y=F.filter(q=>{if(O){const Q=Ri(q.placement);return Q===A||Q==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(Q=>Q>0).reduce((Q,$)=>Q+$,0)]).sort((q,Q)=>q[1]-Q[1])[0])==null?void 0:Y[0];D&&(G=D);break}case"initialPlacement":G=l;break}if(i!==G)return{reset:{placement:G}}}return{}}}};function QD(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function JD(e){return Nve.some(t=>e[t]>=0)}const Lve=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...i}=Wi(e,t);switch(n){case"referenceHidden":{const a=await bf(t,{...i,elementContext:"reference"}),o=QD(a,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:JD(o)}}}case"escaped":{const a=await bf(t,{...i,altBoundary:!0}),o=QD(a,r.floating);return{data:{escapedOffsets:o,escaped:JD(o)}}}default:return{}}}}};async function Bve(e,t){const{placement:r,platform:n,elements:i}=e,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=Hi(r),l=Vl(r),c=Ri(r)==="y",f=["left","top"].includes(o)?-1:1,h=a&&c?-1:1,p=Wi(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof w=="number"&&(v=l==="end"?w*-1:w),c?{x:v*h,y:g*f}:{x:g*f,y:v*h}}const Fve=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:a,placement:o,middlewareData:l}=t,c=await Bve(t,e);return o===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},zve=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:l={fn:b=>{let{x:S,y:A}=b;return{x:S,y:A}}},...c}=Wi(e,t),f={x:r,y:n},h=await bf(t,c),p=Ri(Hi(i)),g=LP(p);let v=f[g],w=f[p];if(a){const b=g==="y"?"top":"left",S=g==="y"?"bottom":"right",A=v+h[b],_=v-h[S];v=uj(A,v,_)}if(o){const b=p==="y"?"top":"left",S=p==="y"?"bottom":"right",A=w+h[b],_=w-h[S];w=uj(A,w,_)}const y=l.fn({...t,[g]:v,[p]:w});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[g]:a,[p]:o}}}}}},Vve=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:a,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:f=!0}=Wi(e,t),h={x:r,y:n},p=Ri(i),g=LP(p);let v=h[g],w=h[p];const y=Wi(l,t),b=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const _=g==="y"?"height":"width",C=a.reference[g]-a.floating[_]+b.mainAxis,N=a.reference[g]+a.reference[_]-b.mainAxis;v<C?v=C:v>N&&(v=N)}if(f){var S,A;const _=g==="y"?"width":"height",C=["top","left"].includes(Hi(i)),N=a.reference[p]-a.floating[_]+(C&&((S=o.offset)==null?void 0:S[p])||0)+(C?0:b.crossAxis),O=a.reference[p]+a.reference[_]+(C?0:((A=o.offset)==null?void 0:A[p])||0)-(C?b.crossAxis:0);w<N?w=N:w>O&&(w=O)}return{[g]:v,[p]:w}}}},Uve=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:a,platform:o,elements:l}=t,{apply:c=()=>{},...f}=Wi(e,t),h=await bf(t,f),p=Hi(i),g=Vl(i),v=Ri(i)==="y",{width:w,height:y}=a.floating;let b,S;p==="top"||p==="bottom"?(b=p,S=g===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(S=p,b=g==="end"?"top":"bottom");const A=y-h.top-h.bottom,_=w-h.left-h.right,C=$a(y-h[b],A),N=$a(w-h[S],_),O=!t.middlewareData.shift;let T=C,k=N;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(k=_),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=A),O&&!g){const F=qr(h.left,0),I=qr(h.right,0),L=qr(h.top,0),V=qr(h.bottom,0);v?k=w-2*(F!==0||I!==0?F+I:qr(h.left,h.right)):T=y-2*(L!==0||V!==0?L+V:qr(h.top,h.bottom))}await c({...t,availableWidth:k,availableHeight:T});const R=await o.getDimensions(l.floating);return w!==R.width||y!==R.height?{reset:{rects:!0}}:{}}}};function yg(){return typeof window<"u"}function Ul(e){return e6(e)?(e.nodeName||"").toLowerCase():"#document"}function Gr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ui(e){var t;return(t=(e6(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function e6(e){return yg()?e instanceof Node||e instanceof Gr(e).Node:!1}function In(e){return yg()?e instanceof Element||e instanceof Gr(e).Element:!1}function si(e){return yg()?e instanceof HTMLElement||e instanceof Gr(e).HTMLElement:!1}function e$(e){return!yg()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Gr(e).ShadowRoot}function Gf(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Dn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function qve(e){return["table","td","th"].includes(Ul(e))}function xg(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function zP(e){const t=VP(),r=In(e)?Dn(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Wve(e){let t=La(e);for(;si(t)&&!Sl(t);){if(zP(t))return t;if(xg(t))return null;t=La(t)}return null}function VP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Sl(e){return["html","body","#document"].includes(Ul(e))}function Dn(e){return Gr(e).getComputedStyle(e)}function bg(e){return In(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function La(e){if(Ul(e)==="html")return e;const t=e.assignedSlot||e.parentNode||e$(e)&&e.host||ui(e);return e$(t)?t.host:t}function t6(e){const t=La(e);return Sl(t)?e.ownerDocument?e.ownerDocument.body:e.body:si(t)&&Gf(t)?t:t6(t)}function wf(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=t6(e),a=i===((n=e.ownerDocument)==null?void 0:n.body),o=Gr(i);if(a){const l=dj(o);return t.concat(o,o.visualViewport||[],Gf(i)?i:[],l&&r?wf(l):[])}return t.concat(i,wf(i,[],r))}function dj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function r6(e){const t=Dn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=si(e),a=i?e.offsetWidth:r,o=i?e.offsetHeight:n,l=rm(r)!==a||rm(n)!==o;return l&&(r=a,n=o),{width:r,height:n,$:l}}function UP(e){return In(e)?e:e.contextElement}function Ks(e){const t=UP(e);if(!si(t))return ii(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:a}=r6(t);let o=(a?rm(r.width):r.width)/n,l=(a?rm(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const Hve=ii(0);function n6(e){const t=Gr(e);return!VP()||!t.visualViewport?Hve:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gve(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Gr(e)?!1:t}function zo(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),a=UP(e);let o=ii(1);t&&(n?In(n)&&(o=Ks(n)):o=Ks(e));const l=Gve(a,r,n)?n6(a):ii(0);let c=(i.left+l.x)/o.x,f=(i.top+l.y)/o.y,h=i.width/o.x,p=i.height/o.y;if(a){const g=Gr(a),v=n&&In(n)?Gr(n):n;let w=g,y=dj(w);for(;y&&n&&v!==w;){const b=Ks(y),S=y.getBoundingClientRect(),A=Dn(y),_=S.left+(y.clientLeft+parseFloat(A.paddingLeft))*b.x,C=S.top+(y.clientTop+parseFloat(A.paddingTop))*b.y;c*=b.x,f*=b.y,h*=b.x,p*=b.y,c+=_,f+=C,w=Gr(y),y=dj(w)}}return im({width:h,height:p,x:c,y:f})}function qP(e,t){const r=bg(e).scrollLeft;return t?t.left+r:zo(ui(e)).left+r}function i6(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-(r?0:qP(e,n)),a=n.top+t.scrollTop;return{x:i,y:a}}function Kve(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const a=i==="fixed",o=ui(n),l=t?xg(t.floating):!1;if(n===o||l&&a)return r;let c={scrollLeft:0,scrollTop:0},f=ii(1);const h=ii(0),p=si(n);if((p||!p&&!a)&&((Ul(n)!=="body"||Gf(o))&&(c=bg(n)),si(n))){const v=zo(n);f=Ks(n),h.x=v.x+n.clientLeft,h.y=v.y+n.clientTop}const g=o&&!p&&!a?i6(o,c,!0):ii(0);return{width:r.width*f.x,height:r.height*f.y,x:r.x*f.x-c.scrollLeft*f.x+h.x+g.x,y:r.y*f.y-c.scrollTop*f.y+h.y+g.y}}function Yve(e){return Array.from(e.getClientRects())}function Xve(e){const t=ui(e),r=bg(e),n=e.ownerDocument.body,i=qr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=qr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+qP(e);const l=-r.scrollTop;return Dn(n).direction==="rtl"&&(o+=qr(t.clientWidth,n.clientWidth)-i),{width:i,height:a,x:o,y:l}}function Zve(e,t){const r=Gr(e),n=ui(e),i=r.visualViewport;let a=n.clientWidth,o=n.clientHeight,l=0,c=0;if(i){a=i.width,o=i.height;const f=VP();(!f||f&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:l,y:c}}function Qve(e,t){const r=zo(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,a=si(e)?Ks(e):ii(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,c=i*a.x,f=n*a.y;return{width:o,height:l,x:c,y:f}}function t$(e,t,r){let n;if(t==="viewport")n=Zve(e,r);else if(t==="document")n=Xve(ui(e));else if(In(t))n=Qve(t,r);else{const i=n6(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return im(n)}function a6(e,t){const r=La(e);return r===t||!In(r)||Sl(r)?!1:Dn(r).position==="fixed"||a6(r,t)}function Jve(e,t){const r=t.get(e);if(r)return r;let n=wf(e,[],!1).filter(l=>In(l)&&Ul(l)!=="body"),i=null;const a=Dn(e).position==="fixed";let o=a?La(e):e;for(;In(o)&&!Sl(o);){const l=Dn(o),c=zP(o);!c&&l.position==="fixed"&&(i=null),(a?!c&&!i:!c&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Gf(o)&&!c&&a6(e,o))?n=n.filter(h=>h!==o):i=l,o=La(o)}return t.set(e,n),n}function eye(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const o=[...r==="clippingAncestors"?xg(t)?[]:Jve(t,this._c):[].concat(r),n],l=o[0],c=o.reduce((f,h)=>{const p=t$(t,h,i);return f.top=qr(p.top,f.top),f.right=$a(p.right,f.right),f.bottom=$a(p.bottom,f.bottom),f.left=qr(p.left,f.left),f},t$(t,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function tye(e){const{width:t,height:r}=r6(e);return{width:t,height:r}}function rye(e,t,r){const n=si(t),i=ui(t),a=r==="fixed",o=zo(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=ii(0);function f(){c.x=qP(i)}if(n||!n&&!a)if((Ul(t)!=="body"||Gf(i))&&(l=bg(t)),n){const v=zo(t,!0,a,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else i&&f();a&&!n&&i&&f();const h=i&&!n&&!a?i6(i,l):ii(0),p=o.left+l.scrollLeft-c.x-h.x,g=o.top+l.scrollTop-c.y-h.y;return{x:p,y:g,width:o.width,height:o.height}}function Yw(e){return Dn(e).position==="static"}function r$(e,t){if(!si(e)||Dn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ui(e)===r&&(r=r.ownerDocument.body),r}function o6(e,t){const r=Gr(e);if(xg(e))return r;if(!si(e)){let i=La(e);for(;i&&!Sl(i);){if(In(i)&&!Yw(i))return i;i=La(i)}return r}let n=r$(e,t);for(;n&&qve(n)&&Yw(n);)n=r$(n,t);return n&&Sl(n)&&Yw(n)&&!zP(n)?r:n||Wve(e)||r}const nye=async function(e){const t=this.getOffsetParent||o6,r=this.getDimensions,n=await r(e.floating);return{reference:rye(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function iye(e){return Dn(e).direction==="rtl"}const aye={convertOffsetParentRelativeRectToViewportRelativeRect:Kve,getDocumentElement:ui,getClippingRect:eye,getOffsetParent:o6,getElementRects:nye,getClientRects:Yve,getDimensions:tye,getScale:Ks,isElement:In,isRTL:iye};function s6(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function oye(e,t){let r=null,n;const i=ui(e);function a(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const f=e.getBoundingClientRect(),{left:h,top:p,width:g,height:v}=f;if(l||t(),!g||!v)return;const w=Th(p),y=Th(i.clientWidth-(h+g)),b=Th(i.clientHeight-(p+v)),S=Th(h),_={rootMargin:-w+"px "+-y+"px "+-b+"px "+-S+"px",threshold:qr(0,$a(1,c))||1};let C=!0;function N(O){const T=O[0].intersectionRatio;if(T!==c){if(!C)return o();T?o(!1,T):n=setTimeout(()=>{o(!1,1e-7)},1e3)}T===1&&!s6(f,e.getBoundingClientRect())&&o(),C=!1}try{r=new IntersectionObserver(N,{..._,root:i.ownerDocument})}catch{r=new IntersectionObserver(N,_)}r.observe(e)}return o(!0),a}function sye(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,f=UP(e),h=i||a?[...f?wf(f):[],...wf(t)]:[];h.forEach(S=>{i&&S.addEventListener("scroll",r,{passive:!0}),a&&S.addEventListener("resize",r)});const p=f&&l?oye(f,r):null;let g=-1,v=null;o&&(v=new ResizeObserver(S=>{let[A]=S;A&&A.target===f&&v&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var _;(_=v)==null||_.observe(t)})),r()}),f&&!c&&v.observe(f),v.observe(t));let w,y=c?zo(e):null;c&&b();function b(){const S=zo(e);y&&!s6(y,S)&&r(),y=S,w=requestAnimationFrame(b)}return r(),()=>{var S;h.forEach(A=>{i&&A.removeEventListener("scroll",r),a&&A.removeEventListener("resize",r)}),p==null||p(),(S=v)==null||S.disconnect(),v=null,c&&cancelAnimationFrame(w)}}const lye=Fve,cye=zve,uye=$ve,fye=Uve,dye=Lve,n$=Dve,hye=Vve,pye=(e,t,r)=>{const n=new Map,i={platform:aye,...r},a={...i.platform,_c:n};return Ive(e,t,{...i,platform:a})};var Gh=typeof document<"u"?j.useLayoutEffect:j.useEffect;function am(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 r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!am(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){const a=i[n];if(!(a==="_owner"&&e.$$typeof)&&!am(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function l6(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function i$(e,t){const r=l6(e);return Math.round(t*r)/r}function Xw(e){const t=j.useRef(e);return Gh(()=>{t.current=e}),t}function mye(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:c,open:f}=e,[h,p]=j.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,v]=j.useState(n);am(g,n)||v(n);const[w,y]=j.useState(null),[b,S]=j.useState(null),A=j.useCallback(D=>{D!==O.current&&(O.current=D,y(D))},[]),_=j.useCallback(D=>{D!==T.current&&(T.current=D,S(D))},[]),C=a||w,N=o||b,O=j.useRef(null),T=j.useRef(null),k=j.useRef(h),R=c!=null,F=Xw(c),I=Xw(i),L=Xw(f),V=j.useCallback(()=>{if(!O.current||!T.current)return;const D={placement:t,strategy:r,middleware:g};I.current&&(D.platform=I.current),pye(O.current,T.current,D).then(q=>{const Q={...q,isPositioned:L.current!==!1};Y.current&&!am(k.current,Q)&&(k.current=Q,Af.flushSync(()=>{p(Q)}))})},[g,t,r,I,L]);Gh(()=>{f===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,p(D=>({...D,isPositioned:!1})))},[f]);const Y=j.useRef(!1);Gh(()=>(Y.current=!0,()=>{Y.current=!1}),[]),Gh(()=>{if(C&&(O.current=C),N&&(T.current=N),C&&N){if(F.current)return F.current(C,N,V);V()}},[C,N,V,F,R]);const K=j.useMemo(()=>({reference:O,floating:T,setReference:A,setFloating:_}),[A,_]),z=j.useMemo(()=>({reference:C,floating:N}),[C,N]),G=j.useMemo(()=>{const D={position:r,left:0,top:0};if(!z.floating)return D;const q=i$(z.floating,h.x),Q=i$(z.floating,h.y);return l?{...D,transform:"translate("+q+"px, "+Q+"px)",...l6(z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:q,top:Q}},[r,l,z.floating,h.x,h.y]);return j.useMemo(()=>({...h,update:V,refs:K,elements:z,floatingStyles:G}),[h,V,K,z,G])}const gye=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?n$({element:n.current,padding:i}).fn(r):{}:n?n$({element:n,padding:i}).fn(r):{}}}},vye=(e,t)=>({...lye(e),options:[e,t]}),yye=(e,t)=>({...cye(e),options:[e,t]}),xye=(e,t)=>({...hye(e),options:[e,t]}),bye=(e,t)=>({...uye(e),options:[e,t]}),wye=(e,t)=>({...fye(e),options:[e,t]}),Sye=(e,t)=>({...dye(e),options:[e,t]}),jye=(e,t)=>({...gye(e),options:[e,t]});var _ye="Arrow",c6=j.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...a}=e;return d.jsx(Le.svg,{...a,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});c6.displayName=_ye;var Pye=c6;function WP(e){const[t,r]=j.useState(void 0);return yr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,l;if("borderBoxSize"in a){const c=a.borderBoxSize,f=Array.isArray(c)?c[0]:c;o=f.inlineSize,l=f.blockSize}else o=e.offsetWidth,l=e.offsetHeight;r({width:o,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var HP="Popper",[u6,wg]=mn(HP),[Aye,f6]=u6(HP),d6=e=>{const{__scopePopper:t,children:r}=e,[n,i]=j.useState(null);return d.jsx(Aye,{scope:t,anchor:n,onAnchorChange:i,children:r})};d6.displayName=HP;var h6="PopperAnchor",p6=j.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,a=f6(h6,r),o=j.useRef(null),l=it(t,o);return j.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:d.jsx(Le.div,{...i,ref:l})});p6.displayName=h6;var GP="PopperContent",[Nye,Eye]=u6(GP),m6=j.forwardRef((e,t)=>{var ae,he,ne,le,ce,Z;const{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:f=[],collisionPadding:h=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:v="optimized",onPlaced:w,...y}=e,b=f6(GP,r),[S,A]=j.useState(null),_=it(t,Se=>A(Se)),[C,N]=j.useState(null),O=WP(C),T=(O==null?void 0:O.width)??0,k=(O==null?void 0:O.height)??0,R=n+(a!=="center"?"-"+a:""),F=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},I=Array.isArray(f)?f:[f],L=I.length>0,V={padding:F,boundary:I.filter(Cye),altBoundary:L},{refs:Y,floatingStyles:K,placement:z,isPositioned:G,middlewareData:D}=mye({strategy:"fixed",placement:R,whileElementsMounted:(...Se)=>sye(...Se,{animationFrame:v==="always"}),elements:{reference:b.anchor},middleware:[vye({mainAxis:i+k,alignmentAxis:o}),c&&yye({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?xye():void 0,...V}),c&&bye({...V}),wye({...V,apply:({elements:Se,rects:we,availableWidth:ze,availableHeight:Ue})=>{const{width:Je,height:ye}=we.reference,xe=Se.floating.style;xe.setProperty("--radix-popper-available-width",`${ze}px`),xe.setProperty("--radix-popper-available-height",`${Ue}px`),xe.setProperty("--radix-popper-anchor-width",`${Je}px`),xe.setProperty("--radix-popper-anchor-height",`${ye}px`)}}),C&&jye({element:C,padding:l}),Tye({arrowWidth:T,arrowHeight:k}),g&&Sye({strategy:"referenceHidden",...V})]}),[q,Q]=y6(z),$=ai(w);yr(()=>{G&&($==null||$())},[G,$]);const H=(ae=D.arrow)==null?void 0:ae.x,re=(he=D.arrow)==null?void 0:he.y,se=((ne=D.arrow)==null?void 0:ne.centerOffset)!==0,[ge,be]=j.useState();return yr(()=>{S&&be(window.getComputedStyle(S).zIndex)},[S]),d.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:G?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(le=D.transformOrigin)==null?void 0:le.x,(ce=D.transformOrigin)==null?void 0:ce.y].join(" "),...((Z=D.hide)==null?void 0:Z.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(Nye,{scope:r,placedSide:q,onArrowChange:N,arrowX:H,arrowY:re,shouldHideArrow:se,children:d.jsx(Le.div,{"data-side":q,"data-align":Q,...y,ref:_,style:{...y.style,animation:G?void 0:"none"}})})})});m6.displayName=GP;var g6="PopperArrow",Oye={top:"bottom",right:"left",bottom:"top",left:"right"},v6=j.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,a=Eye(g6,n),o=Oye[a.placedSide];return d.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:d.jsx(Pye,{...i,ref:r,style:{...i.style,display:"block"}})})});v6.displayName=g6;function Cye(e){return e!==null}var Tye=e=>({name:"transformOrigin",options:e,fn(t){var b,S,A;const{placement:r,rects:n,middlewareData:i}=t,o=((b=i.arrow)==null?void 0:b.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[f,h]=y6(r),p={start:"0%",center:"50%",end:"100%"}[h],g=(((S=i.arrow)==null?void 0:S.x)??0)+l/2,v=(((A=i.arrow)==null?void 0:A.y)??0)+c/2;let w="",y="";return f==="bottom"?(w=o?p:`${g}px`,y=`${-c}px`):f==="top"?(w=o?p:`${g}px`,y=`${n.floating.height+c}px`):f==="right"?(w=`${-c}px`,y=o?p:`${v}px`):f==="left"&&(w=`${n.floating.width+c}px`,y=o?p:`${v}px`),{data:{x:w,y}}}});function y6(e){const[t,r="center"]=e.split("-");return[t,r]}var x6=d6,b6=p6,w6=m6,S6=v6,kye="Portal",Sg=j.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[i,a]=j.useState(!1);yr(()=>a(!0),[]);const o=r||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?h9.createPortal(d.jsx(Le.div,{...n,ref:t}),o):null});Sg.displayName=kye;var Mye=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Os=new WeakMap,kh=new WeakMap,Mh={},Zw=0,j6=function(e){return e&&(e.host||j6(e.parentNode))},Rye=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=j6(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Iye=function(e,t,r,n){var i=Rye(t,Array.isArray(e)?e:[e]);Mh[r]||(Mh[r]=new WeakMap);var a=Mh[r],o=[],l=new Set,c=new Set(i),f=function(p){!p||l.has(p)||(l.add(p),f(p.parentNode))};i.forEach(f);var h=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(g){if(l.has(g))h(g);else try{var v=g.getAttribute(n),w=v!==null&&v!=="false",y=(Os.get(g)||0)+1,b=(a.get(g)||0)+1;Os.set(g,y),a.set(g,b),o.push(g),y===1&&w&&kh.set(g,!0),b===1&&g.setAttribute(r,"true"),w||g.setAttribute(n,"true")}catch(S){console.error("aria-hidden: cannot operate on ",g,S)}})};return h(t),l.clear(),Zw++,function(){o.forEach(function(p){var g=Os.get(p)-1,v=a.get(p)-1;Os.set(p,g),a.set(p,v),g||(kh.has(p)||p.removeAttribute(n),kh.delete(p)),v||p.removeAttribute(r)}),Zw--,Zw||(Os=new WeakMap,Os=new WeakMap,kh=new WeakMap,Mh={})}},KP=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=Mye(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),Iye(n,i,r,"aria-hidden")):function(){return null}},Xn=function(){return Xn=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Xn.apply(this,arguments)};function _6(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Dye(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var Kh="right-scroll-bar-position",Yh="width-before-scroll-bar",$ye="with-scroll-bars-hidden",Lye="--removed-body-scroll-bar-size";function Qw(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Bye(e,t){var r=j.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}var Fye=typeof window<"u"?j.useLayoutEffect:j.useEffect,a$=new WeakMap;function zye(e,t){var r=Bye(null,function(n){return e.forEach(function(i){return Qw(i,n)})});return Fye(function(){var n=a$.get(r);if(n){var i=new Set(n),a=new Set(e),o=r.current;i.forEach(function(l){a.has(l)||Qw(l,null)}),a.forEach(function(l){i.has(l)||Qw(l,o)})}a$.set(r,e)},[e]),r}function Vye(e){return e}function Uye(e,t){t===void 0&&(t=Vye);var r=[],n=!1,i={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var o=t(a,n);return r.push(o),function(){r=r.filter(function(l){return l!==o})}},assignSyncMedium:function(a){for(n=!0;r.length;){var o=r;r=[],o.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var o=[];if(r.length){var l=r;r=[],l.forEach(a),o=r}var c=function(){var h=o;o=[],h.forEach(a)},f=function(){return Promise.resolve().then(c)};f(),r={push:function(h){o.push(h),f()},filter:function(h){return o=o.filter(h),r}}}};return i}function qye(e){e===void 0&&(e={});var t=Uye(null);return t.options=Xn({async:!0,ssr:!1},e),t}var P6=function(e){var t=e.sideCar,r=_6(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return j.createElement(n,Xn({},r))};P6.isSideCarExport=!0;function Wye(e,t){return e.useMedium(t),P6}var A6=qye(),Jw=function(){},jg=j.forwardRef(function(e,t){var r=j.useRef(null),n=j.useState({onScrollCapture:Jw,onWheelCapture:Jw,onTouchMoveCapture:Jw}),i=n[0],a=n[1],o=e.forwardProps,l=e.children,c=e.className,f=e.removeScrollBar,h=e.enabled,p=e.shards,g=e.sideCar,v=e.noRelative,w=e.noIsolation,y=e.inert,b=e.allowPinchZoom,S=e.as,A=S===void 0?"div":S,_=e.gapMode,C=_6(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=g,O=zye([r,t]),T=Xn(Xn({},C),i);return j.createElement(j.Fragment,null,h&&j.createElement(N,{sideCar:A6,removeScrollBar:f,shards:p,noRelative:v,noIsolation:w,inert:y,setCallbacks:a,allowPinchZoom:!!b,lockRef:r,gapMode:_}),o?j.cloneElement(j.Children.only(l),Xn(Xn({},T),{ref:O})):j.createElement(A,Xn({},T,{className:c,ref:O}),l))});jg.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};jg.classNames={fullWidth:Yh,zeroRight:Kh};var Hye=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Gye(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Hye();return t&&e.setAttribute("nonce",t),e}function Kye(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Yye(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Xye=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Gye())&&(Kye(t,r),Yye(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Zye=function(){var e=Xye();return function(t,r){j.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},N6=function(){var e=Zye(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},Qye={left:0,top:0,right:0,gap:0},e1=function(e){return parseInt(e||"",10)||0},Jye=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[e1(r),e1(n),e1(i)]},exe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Qye;var t=Jye(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},txe=N6(),Ys="data-scroll-locked",rxe=function(e,t,r,n){var i=e.left,a=e.top,o=e.right,l=e.gap;return r===void 0&&(r="margin"),`
|
||
.`.concat($ye,` {
|
||
overflow: hidden `).concat(n,`;
|
||
padding-right: `).concat(l,"px ").concat(n,`;
|
||
}
|
||
body[`).concat(Ys,`] {
|
||
overflow: hidden `).concat(n,`;
|
||
overscroll-behavior: contain;
|
||
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
||
padding-left: `.concat(i,`px;
|
||
padding-top: `).concat(a,`px;
|
||
padding-right: `).concat(o,`px;
|
||
margin-left:0;
|
||
margin-top:0;
|
||
margin-right: `).concat(l,"px ").concat(n,`;
|
||
`),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),`
|
||
}
|
||
|
||
.`).concat(Kh,` {
|
||
right: `).concat(l,"px ").concat(n,`;
|
||
}
|
||
|
||
.`).concat(Yh,` {
|
||
margin-right: `).concat(l,"px ").concat(n,`;
|
||
}
|
||
|
||
.`).concat(Kh," .").concat(Kh,` {
|
||
right: 0 `).concat(n,`;
|
||
}
|
||
|
||
.`).concat(Yh," .").concat(Yh,` {
|
||
margin-right: 0 `).concat(n,`;
|
||
}
|
||
|
||
body[`).concat(Ys,`] {
|
||
`).concat(Lye,": ").concat(l,`px;
|
||
}
|
||
`)},o$=function(){var e=parseInt(document.body.getAttribute(Ys)||"0",10);return isFinite(e)?e:0},nxe=function(){j.useEffect(function(){return document.body.setAttribute(Ys,(o$()+1).toString()),function(){var e=o$()-1;e<=0?document.body.removeAttribute(Ys):document.body.setAttribute(Ys,e.toString())}},[])},ixe=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;nxe();var a=j.useMemo(function(){return exe(i)},[i]);return j.createElement(txe,{styles:rxe(a,!t,i,r?"":"!important")})},hj=!1;if(typeof window<"u")try{var Rh=Object.defineProperty({},"passive",{get:function(){return hj=!0,!0}});window.addEventListener("test",Rh,Rh),window.removeEventListener("test",Rh,Rh)}catch{hj=!1}var Cs=hj?{passive:!1}:!1,axe=function(e){return e.tagName==="TEXTAREA"},E6=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!axe(e)&&r[t]==="visible")},oxe=function(e){return E6(e,"overflowY")},sxe=function(e){return E6(e,"overflowX")},s$=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=O6(e,n);if(i){var a=C6(e,n),o=a[1],l=a[2];if(o>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},lxe=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},cxe=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},O6=function(e,t){return e==="v"?oxe(t):sxe(t)},C6=function(e,t){return e==="v"?lxe(t):cxe(t)},uxe=function(e,t){return e==="h"&&t==="rtl"?-1:1},fxe=function(e,t,r,n,i){var a=uxe(e,window.getComputedStyle(t).direction),o=a*n,l=r.target,c=t.contains(l),f=!1,h=o>0,p=0,g=0;do{var v=C6(e,l),w=v[0],y=v[1],b=v[2],S=y-b-a*w;(w||S)&&O6(e,l)&&(p+=S,g+=w),l=l.parentNode.host||l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(h&&Math.abs(p)<1||!h&&Math.abs(g)<1)&&(f=!0),f},Ih=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},l$=function(e){return[e.deltaX,e.deltaY]},c$=function(e){return e&&"current"in e?e.current:e},dxe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},hxe=function(e){return`
|
||
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
||
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
||
`)},pxe=0,Ts=[];function mxe(e){var t=j.useRef([]),r=j.useRef([0,0]),n=j.useRef(),i=j.useState(pxe++)[0],a=j.useState(N6)[0],o=j.useRef(e);j.useEffect(function(){o.current=e},[e]),j.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var y=Dye([e.lockRef.current],(e.shards||[]).map(c$),!0).filter(Boolean);return y.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),y.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=j.useCallback(function(y,b){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!o.current.allowPinchZoom;var S=Ih(y),A=r.current,_="deltaX"in y?y.deltaX:A[0]-S[0],C="deltaY"in y?y.deltaY:A[1]-S[1],N,O=y.target,T=Math.abs(_)>Math.abs(C)?"h":"v";if("touches"in y&&T==="h"&&O.type==="range")return!1;var k=s$(T,O);if(!k)return!0;if(k?N=T:(N=T==="v"?"h":"v",k=s$(T,O)),!k)return!1;if(!n.current&&"changedTouches"in y&&(_||C)&&(n.current=N),!N)return!0;var R=n.current||N;return fxe(R,b,y,R==="h"?_:C)},[]),c=j.useCallback(function(y){var b=y;if(!(!Ts.length||Ts[Ts.length-1]!==a)){var S="deltaY"in b?l$(b):Ih(b),A=t.current.filter(function(N){return N.name===b.type&&(N.target===b.target||b.target===N.shadowParent)&&dxe(N.delta,S)})[0];if(A&&A.should){b.cancelable&&b.preventDefault();return}if(!A){var _=(o.current.shards||[]).map(c$).filter(Boolean).filter(function(N){return N.contains(b.target)}),C=_.length>0?l(b,_[0]):!o.current.noIsolation;C&&b.cancelable&&b.preventDefault()}}},[]),f=j.useCallback(function(y,b,S,A){var _={name:y,delta:b,target:S,should:A,shadowParent:gxe(S)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(C){return C!==_})},1)},[]),h=j.useCallback(function(y){r.current=Ih(y),n.current=void 0},[]),p=j.useCallback(function(y){f(y.type,l$(y),y.target,l(y,e.lockRef.current))},[]),g=j.useCallback(function(y){f(y.type,Ih(y),y.target,l(y,e.lockRef.current))},[]);j.useEffect(function(){return Ts.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",c,Cs),document.addEventListener("touchmove",c,Cs),document.addEventListener("touchstart",h,Cs),function(){Ts=Ts.filter(function(y){return y!==a}),document.removeEventListener("wheel",c,Cs),document.removeEventListener("touchmove",c,Cs),document.removeEventListener("touchstart",h,Cs)}},[]);var v=e.removeScrollBar,w=e.inert;return j.createElement(j.Fragment,null,w?j.createElement(a,{styles:hxe(i)}):null,v?j.createElement(ixe,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function gxe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const vxe=Wye(A6,mxe);var _g=j.forwardRef(function(e,t){return j.createElement(jg,Xn({},e,{ref:t,sideCar:vxe}))});_g.classNames=jg.classNames;var pj=["Enter"," "],yxe=["ArrowDown","PageUp","Home"],T6=["ArrowUp","PageDown","End"],xxe=[...yxe,...T6],bxe={ltr:[...pj,"ArrowRight"],rtl:[...pj,"ArrowLeft"]},wxe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Kf="Menu",[Sf,Sxe,jxe]=Hj(Kf),[Zo,k6]=mn(Kf,[jxe,wg,Cl]),Pg=wg(),M6=Cl(),[_xe,Qo]=Zo(Kf),[Pxe,Yf]=Zo(Kf),R6=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:i,onOpenChange:a,modal:o=!0}=e,l=Pg(t),[c,f]=j.useState(null),h=j.useRef(!1),p=ai(a),g=Tf(i);return j.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),d.jsx(x6,{...l,children:d.jsx(_xe,{scope:t,open:r,onOpenChange:p,content:c,onContentChange:f,children:d.jsx(Pxe,{scope:t,onClose:j.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:h,dir:g,modal:o,children:n})})})};R6.displayName=Kf;var Axe="MenuAnchor",YP=j.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,i=Pg(r);return d.jsx(b6,{...i,...n,ref:t})});YP.displayName=Axe;var XP="MenuPortal",[Nxe,I6]=Zo(XP,{forceMount:void 0}),D6=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:i}=e,a=Qo(XP,t);return d.jsx(Nxe,{scope:t,forceMount:r,children:d.jsx(Fn,{present:r||a.open,children:d.jsx(Sg,{asChild:!0,container:i,children:n})})})};D6.displayName=XP;var fn="MenuContent",[Exe,ZP]=Zo(fn),$6=j.forwardRef((e,t)=>{const r=I6(fn,e.__scopeMenu),{forceMount:n=r.forceMount,...i}=e,a=Qo(fn,e.__scopeMenu),o=Yf(fn,e.__scopeMenu);return d.jsx(Sf.Provider,{scope:e.__scopeMenu,children:d.jsx(Fn,{present:n||a.open,children:d.jsx(Sf.Slot,{scope:e.__scopeMenu,children:o.modal?d.jsx(Oxe,{...i,ref:t}):d.jsx(Cxe,{...i,ref:t})})})})}),Oxe=j.forwardRef((e,t)=>{const r=Qo(fn,e.__scopeMenu),n=j.useRef(null),i=it(t,n);return j.useEffect(()=>{const a=n.current;if(a)return KP(a)},[]),d.jsx(QP,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:Ce(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),Cxe=j.forwardRef((e,t)=>{const r=Qo(fn,e.__scopeMenu);return d.jsx(QP,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Txe=ko("MenuContent.ScrollLock"),QP=j.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:p,onInteractOutside:g,onDismiss:v,disableOutsideScroll:w,...y}=e,b=Qo(fn,r),S=Yf(fn,r),A=Pg(r),_=M6(r),C=Sxe(r),[N,O]=j.useState(null),T=j.useRef(null),k=it(t,T,b.onContentChange),R=j.useRef(0),F=j.useRef(""),I=j.useRef(0),L=j.useRef(null),V=j.useRef("right"),Y=j.useRef(0),K=w?_g:j.Fragment,z=w?{as:Txe,allowPinchZoom:!0}:void 0,G=q=>{var ae,he;const Q=F.current+q,$=C().filter(ne=>!ne.disabled),H=document.activeElement,re=(ae=$.find(ne=>ne.ref.current===H))==null?void 0:ae.textValue,se=$.map(ne=>ne.textValue),ge=Uxe(se,Q,re),be=(he=$.find(ne=>ne.textValue===ge))==null?void 0:he.ref.current;(function ne(le){F.current=le,window.clearTimeout(R.current),le!==""&&(R.current=window.setTimeout(()=>ne(""),1e3))})(Q),be&&setTimeout(()=>be.focus())};j.useEffect(()=>()=>window.clearTimeout(R.current),[]),$P();const D=j.useCallback(q=>{var $,H;return V.current===(($=L.current)==null?void 0:$.side)&&Wxe(q,(H=L.current)==null?void 0:H.area)},[]);return d.jsx(Exe,{scope:r,searchRef:F,onItemEnter:j.useCallback(q=>{D(q)&&q.preventDefault()},[D]),onItemLeave:j.useCallback(q=>{var Q;D(q)||((Q=T.current)==null||Q.focus(),O(null))},[D]),onTriggerLeave:j.useCallback(q=>{D(q)&&q.preventDefault()},[D]),pointerGraceTimerRef:I,onPointerGraceIntentChange:j.useCallback(q=>{L.current=q},[]),children:d.jsx(K,{...z,children:d.jsx(vg,{asChild:!0,trapped:i,onMountAutoFocus:Ce(a,q=>{var Q;q.preventDefault(),(Q=T.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:d.jsx(gg,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:p,onInteractOutside:g,onDismiss:v,children:d.jsx(Gj,{asChild:!0,..._,dir:S.dir,orientation:"vertical",loop:n,currentTabStopId:N,onCurrentTabStopIdChange:O,onEntryFocus:Ce(c,q=>{S.isUsingKeyboardRef.current||q.preventDefault()}),preventScrollOnEntryFocus:!0,children:d.jsx(w6,{role:"menu","aria-orientation":"vertical","data-state":J6(b.open),"data-radix-menu-content":"",dir:S.dir,...A,...y,ref:k,style:{outline:"none",...y.style},onKeyDown:Ce(y.onKeyDown,q=>{const $=q.target.closest("[data-radix-menu-content]")===q.currentTarget,H=q.ctrlKey||q.altKey||q.metaKey,re=q.key.length===1;$&&(q.key==="Tab"&&q.preventDefault(),!H&&re&&G(q.key));const se=T.current;if(q.target!==se||!xxe.includes(q.key))return;q.preventDefault();const be=C().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);T6.includes(q.key)&&be.reverse(),zxe(be)}),onBlur:Ce(e.onBlur,q=>{q.currentTarget.contains(q.target)||(window.clearTimeout(R.current),F.current="")}),onPointerMove:Ce(e.onPointerMove,jf(q=>{const Q=q.target,$=Y.current!==q.clientX;if(q.currentTarget.contains(Q)&&$){const H=q.clientX>Y.current?"right":"left";V.current=H,Y.current=q.clientX}}))})})})})})})});$6.displayName=fn;var kxe="MenuGroup",JP=j.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return d.jsx(Le.div,{role:"group",...n,ref:t})});JP.displayName=kxe;var Mxe="MenuLabel",L6=j.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return d.jsx(Le.div,{...n,ref:t})});L6.displayName=Mxe;var om="MenuItem",u$="menu.itemSelect",Ag=j.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...i}=e,a=j.useRef(null),o=Yf(om,e.__scopeMenu),l=ZP(om,e.__scopeMenu),c=it(t,a),f=j.useRef(!1),h=()=>{const p=a.current;if(!r&&p){const g=new CustomEvent(u$,{bubbles:!0,cancelable:!0});p.addEventListener(u$,v=>n==null?void 0:n(v),{once:!0}),f3(p,g),g.defaultPrevented?f.current=!1:o.onClose()}};return d.jsx(B6,{...i,ref:c,disabled:r,onClick:Ce(e.onClick,h),onPointerDown:p=>{var g;(g=e.onPointerDown)==null||g.call(e,p),f.current=!0},onPointerUp:Ce(e.onPointerUp,p=>{var g;f.current||(g=p.currentTarget)==null||g.click()}),onKeyDown:Ce(e.onKeyDown,p=>{const g=l.searchRef.current!=="";r||g&&p.key===" "||pj.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Ag.displayName=om;var B6=j.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:i,...a}=e,o=ZP(om,r),l=M6(r),c=j.useRef(null),f=it(t,c),[h,p]=j.useState(!1),[g,v]=j.useState("");return j.useEffect(()=>{const w=c.current;w&&v((w.textContent??"").trim())},[a.children]),d.jsx(Sf.ItemSlot,{scope:r,disabled:n,textValue:i??g,children:d.jsx(Kj,{asChild:!0,...l,focusable:!n,children:d.jsx(Le.div,{role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...a,ref:f,onPointerMove:Ce(e.onPointerMove,jf(w=>{n?o.onItemLeave(w):(o.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ce(e.onPointerLeave,jf(w=>o.onItemLeave(w))),onFocus:Ce(e.onFocus,()=>p(!0)),onBlur:Ce(e.onBlur,()=>p(!1))})})})}),Rxe="MenuCheckboxItem",F6=j.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...i}=e;return d.jsx(W6,{scope:e.__scopeMenu,checked:r,children:d.jsx(Ag,{role:"menuitemcheckbox","aria-checked":sm(r)?"mixed":r,...i,ref:t,"data-state":tA(r),onSelect:Ce(i.onSelect,()=>n==null?void 0:n(sm(r)?!0:!r),{checkForDefaultPrevented:!1})})})});F6.displayName=Rxe;var z6="MenuRadioGroup",[Ixe,Dxe]=Zo(z6,{value:void 0,onValueChange:()=>{}}),V6=j.forwardRef((e,t)=>{const{value:r,onValueChange:n,...i}=e,a=ai(n);return d.jsx(Ixe,{scope:e.__scopeMenu,value:r,onValueChange:a,children:d.jsx(JP,{...i,ref:t})})});V6.displayName=z6;var U6="MenuRadioItem",q6=j.forwardRef((e,t)=>{const{value:r,...n}=e,i=Dxe(U6,e.__scopeMenu),a=r===i.value;return d.jsx(W6,{scope:e.__scopeMenu,checked:a,children:d.jsx(Ag,{role:"menuitemradio","aria-checked":a,...n,ref:t,"data-state":tA(a),onSelect:Ce(n.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,r)},{checkForDefaultPrevented:!1})})})});q6.displayName=U6;var eA="MenuItemIndicator",[W6,$xe]=Zo(eA,{checked:!1}),H6=j.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...i}=e,a=$xe(eA,r);return d.jsx(Fn,{present:n||sm(a.checked)||a.checked===!0,children:d.jsx(Le.span,{...i,ref:t,"data-state":tA(a.checked)})})});H6.displayName=eA;var Lxe="MenuSeparator",G6=j.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return d.jsx(Le.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});G6.displayName=Lxe;var Bxe="MenuArrow",K6=j.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,i=Pg(r);return d.jsx(S6,{...i,...n,ref:t})});K6.displayName=Bxe;var Fxe="MenuSub",[y1e,Y6]=Zo(Fxe),ou="MenuSubTrigger",X6=j.forwardRef((e,t)=>{const r=Qo(ou,e.__scopeMenu),n=Yf(ou,e.__scopeMenu),i=Y6(ou,e.__scopeMenu),a=ZP(ou,e.__scopeMenu),o=j.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=a,f={__scopeMenu:e.__scopeMenu},h=j.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return j.useEffect(()=>h,[h]),j.useEffect(()=>{const p=l.current;return()=>{window.clearTimeout(p),c(null)}},[l,c]),d.jsx(YP,{asChild:!0,...f,children:d.jsx(B6,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":J6(r.open),...e,ref:vm(t,i.onTriggerChange),onClick:p=>{var g;(g=e.onClick)==null||g.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:Ce(e.onPointerMove,jf(p=>{a.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!r.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{r.onOpenChange(!0),h()},100))})),onPointerLeave:Ce(e.onPointerLeave,jf(p=>{var v,w;h();const g=(v=r.content)==null?void 0:v.getBoundingClientRect();if(g){const y=(w=r.content)==null?void 0:w.dataset.side,b=y==="right",S=b?-5:5,A=g[b?"left":"right"],_=g[b?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+S,y:p.clientY},{x:A,y:g.top},{x:_,y:g.top},{x:_,y:g.bottom},{x:A,y:g.bottom}],side:y}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(p),p.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Ce(e.onKeyDown,p=>{var v;const g=a.searchRef.current!=="";e.disabled||g&&p.key===" "||bxe[n.dir].includes(p.key)&&(r.onOpenChange(!0),(v=r.content)==null||v.focus(),p.preventDefault())})})})});X6.displayName=ou;var Z6="MenuSubContent",Q6=j.forwardRef((e,t)=>{const r=I6(fn,e.__scopeMenu),{forceMount:n=r.forceMount,...i}=e,a=Qo(fn,e.__scopeMenu),o=Yf(fn,e.__scopeMenu),l=Y6(Z6,e.__scopeMenu),c=j.useRef(null),f=it(t,c);return d.jsx(Sf.Provider,{scope:e.__scopeMenu,children:d.jsx(Fn,{present:n||a.open,children:d.jsx(Sf.Slot,{scope:e.__scopeMenu,children:d.jsx(QP,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:f,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:h=>{var p;o.isUsingKeyboardRef.current&&((p=c.current)==null||p.focus()),h.preventDefault()},onCloseAutoFocus:h=>h.preventDefault(),onFocusOutside:Ce(e.onFocusOutside,h=>{h.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Ce(e.onEscapeKeyDown,h=>{o.onClose(),h.preventDefault()}),onKeyDown:Ce(e.onKeyDown,h=>{var v;const p=h.currentTarget.contains(h.target),g=wxe[o.dir].includes(h.key);p&&g&&(a.onOpenChange(!1),(v=l.trigger)==null||v.focus(),h.preventDefault())})})})})})});Q6.displayName=Z6;function J6(e){return e?"open":"closed"}function sm(e){return e==="indeterminate"}function tA(e){return sm(e)?"indeterminate":e?"checked":"unchecked"}function zxe(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function Vxe(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function Uxe(e,t,r){const i=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let o=Vxe(e,Math.max(a,0));i.length===1&&(o=o.filter(f=>f!==r));const c=o.find(f=>f.toLowerCase().startsWith(i.toLowerCase()));return c!==r?c:void 0}function qxe(e,t){const{x:r,y:n}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const l=t[a],c=t[o],f=l.x,h=l.y,p=c.x,g=c.y;h>n!=g>n&&r<(p-f)*(n-h)/(g-h)+f&&(i=!i)}return i}function Wxe(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return qxe(r,t)}function jf(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Hxe=R6,Gxe=YP,Kxe=D6,Yxe=$6,Xxe=JP,Zxe=L6,Qxe=Ag,Jxe=F6,e0e=V6,t0e=q6,r0e=H6,n0e=G6,i0e=K6,a0e=X6,o0e=Q6,Ng="DropdownMenu",[s0e,x1e]=mn(Ng,[k6]),Ar=k6(),[l0e,e8]=s0e(Ng),t8=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:i,defaultOpen:a,onOpenChange:o,modal:l=!0}=e,c=Ar(t),f=j.useRef(null),[h,p]=Ra({prop:i,defaultProp:a??!1,onChange:o,caller:Ng});return d.jsx(l0e,{scope:t,triggerId:Qn(),triggerRef:f,contentId:Qn(),open:h,onOpenChange:p,onOpenToggle:j.useCallback(()=>p(g=>!g),[p]),modal:l,children:d.jsx(Hxe,{...c,open:h,onOpenChange:p,dir:n,modal:l,children:r})})};t8.displayName=Ng;var r8="DropdownMenuTrigger",n8=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...i}=e,a=e8(r8,r),o=Ar(r);return d.jsx(Gxe,{asChild:!0,...o,children:d.jsx(Le.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...i,ref:vm(t,a.triggerRef),onPointerDown:Ce(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(a.onOpenToggle(),a.open||l.preventDefault())}),onKeyDown:Ce(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&a.onOpenToggle(),l.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});n8.displayName=r8;var c0e="DropdownMenuPortal",i8=e=>{const{__scopeDropdownMenu:t,...r}=e,n=Ar(t);return d.jsx(Kxe,{...n,...r})};i8.displayName=c0e;var a8="DropdownMenuContent",o8=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=e8(a8,r),a=Ar(r),o=j.useRef(!1);return d.jsx(Yxe,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...n,ref:t,onCloseAutoFocus:Ce(e.onCloseAutoFocus,l=>{var c;o.current||(c=i.triggerRef.current)==null||c.focus(),o.current=!1,l.preventDefault()}),onInteractOutside:Ce(e.onInteractOutside,l=>{const c=l.detail.originalEvent,f=c.button===0&&c.ctrlKey===!0,h=c.button===2||f;(!i.modal||h)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});o8.displayName=a8;var u0e="DropdownMenuGroup",f0e=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Ar(r);return d.jsx(Xxe,{...i,...n,ref:t})});f0e.displayName=u0e;var d0e="DropdownMenuLabel",h0e=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Ar(r);return d.jsx(Zxe,{...i,...n,ref:t})});h0e.displayName=d0e;var p0e="DropdownMenuItem",s8=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Ar(r);return d.jsx(Qxe,{...i,...n,ref:t})});s8.displayName=p0e;var m0e="DropdownMenuCheckboxItem",g0e=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Ar(r);return d.jsx(Jxe,{...i,...n,ref:t})});g0e.displayName=m0e;var v0e="DropdownMenuRadioGroup",y0e=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Ar(r);return d.jsx(e0e,{...i,...n,ref:t})});y0e.displayName=v0e;var x0e="DropdownMenuRadioItem",b0e=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Ar(r);return d.jsx(t0e,{...i,...n,ref:t})});b0e.displayName=x0e;var w0e="DropdownMenuItemIndicator",S0e=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Ar(r);return d.jsx(r0e,{...i,...n,ref:t})});S0e.displayName=w0e;var j0e="DropdownMenuSeparator",_0e=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Ar(r);return d.jsx(n0e,{...i,...n,ref:t})});_0e.displayName=j0e;var P0e="DropdownMenuArrow",A0e=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Ar(r);return d.jsx(i0e,{...i,...n,ref:t})});A0e.displayName=P0e;var N0e="DropdownMenuSubTrigger",E0e=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Ar(r);return d.jsx(a0e,{...i,...n,ref:t})});E0e.displayName=N0e;var O0e="DropdownMenuSubContent",C0e=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Ar(r);return d.jsx(o0e,{...i,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});C0e.displayName=O0e;var T0e=t8,k0e=n8,M0e=i8,R0e=o8,I0e=s8;function D0e({...e}){return d.jsx(T0e,{"data-slot":"dropdown-menu",...e})}function $0e({...e}){return d.jsx(k0e,{"data-slot":"dropdown-menu-trigger",...e})}function L0e({className:e,sideOffset:t=4,...r}){return d.jsx(M0e,{children:d.jsx(R0e,{"data-slot":"dropdown-menu-content",sideOffset:t,className:We("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...r})})}function t1({className:e,inset:t,variant:r="default",...n}){return d.jsx(I0e,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:We("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n})}var Eg="Dialog",[l8,b1e]=mn(Eg),[B0e,Vn]=l8(Eg),c8=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,l=j.useRef(null),c=j.useRef(null),[f,h]=Ra({prop:n,defaultProp:i??!1,onChange:a,caller:Eg});return d.jsx(B0e,{scope:t,triggerRef:l,contentRef:c,contentId:Qn(),titleId:Qn(),descriptionId:Qn(),open:f,onOpenChange:h,onOpenToggle:j.useCallback(()=>h(p=>!p),[h]),modal:o,children:r})};c8.displayName=Eg;var u8="DialogTrigger",f8=j.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Vn(u8,r),a=it(t,i.triggerRef);return d.jsx(Le.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":iA(i.open),...n,ref:a,onClick:Ce(e.onClick,i.onOpenToggle)})});f8.displayName=u8;var rA="DialogPortal",[F0e,d8]=l8(rA,{forceMount:void 0}),h8=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=Vn(rA,t);return d.jsx(F0e,{scope:t,forceMount:r,children:j.Children.map(n,o=>d.jsx(Fn,{present:r||a.open,children:d.jsx(Sg,{asChild:!0,container:i,children:o})}))})};h8.displayName=rA;var lm="DialogOverlay",p8=j.forwardRef((e,t)=>{const r=d8(lm,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=Vn(lm,e.__scopeDialog);return a.modal?d.jsx(Fn,{present:n||a.open,children:d.jsx(V0e,{...i,ref:t})}):null});p8.displayName=lm;var z0e=ko("DialogOverlay.RemoveScroll"),V0e=j.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Vn(lm,r);return d.jsx(_g,{as:z0e,allowPinchZoom:!0,shards:[i.contentRef],children:d.jsx(Le.div,{"data-state":iA(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Vo="DialogContent",m8=j.forwardRef((e,t)=>{const r=d8(Vo,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=Vn(Vo,e.__scopeDialog);return d.jsx(Fn,{present:n||a.open,children:a.modal?d.jsx(U0e,{...i,ref:t}):d.jsx(q0e,{...i,ref:t})})});m8.displayName=Vo;var U0e=j.forwardRef((e,t)=>{const r=Vn(Vo,e.__scopeDialog),n=j.useRef(null),i=it(t,r.contentRef,n);return j.useEffect(()=>{const a=n.current;if(a)return KP(a)},[]),d.jsx(g8,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ce(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Ce(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&a.preventDefault()}),onFocusOutside:Ce(e.onFocusOutside,a=>a.preventDefault())})}),q0e=j.forwardRef((e,t)=>{const r=Vn(Vo,e.__scopeDialog),n=j.useRef(!1),i=j.useRef(!1);return d.jsx(g8,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{var c,f;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((f=r.triggerRef.current)==null?void 0:f.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),g8=j.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,l=Vn(Vo,r),c=j.useRef(null),f=it(t,c);return $P(),d.jsxs(d.Fragment,{children:[d.jsx(vg,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:d.jsx(gg,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":iA(l.open),...o,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(W0e,{titleId:l.titleId}),d.jsx(G0e,{contentRef:c,descriptionId:l.descriptionId})]})]})}),nA="DialogTitle",v8=j.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Vn(nA,r);return d.jsx(Le.h2,{id:i.titleId,...n,ref:t})});v8.displayName=nA;var y8="DialogDescription",x8=j.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Vn(y8,r);return d.jsx(Le.p,{id:i.descriptionId,...n,ref:t})});x8.displayName=y8;var b8="DialogClose",w8=j.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=Vn(b8,r);return d.jsx(Le.button,{type:"button",...n,ref:t,onClick:Ce(e.onClick,()=>i.onOpenChange(!1))})});w8.displayName=b8;function iA(e){return e?"open":"closed"}var S8="DialogTitleWarning",[w1e,j8]=kK(S8,{contentName:Vo,titleName:nA,docsSlug:"dialog"}),W0e=({titleId:e})=>{const t=j8(S8),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
||
|
||
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
||
|
||
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return j.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},H0e="DialogDescriptionWarning",G0e=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${j8(H0e).contentName}}.`;return j.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},_8=c8,P8=f8,A8=h8,N8=p8,E8=m8,O8=v8,C8=x8,aA=w8;const ql=_8;ql.displayName=_8.displayName;const T8=P8;T8.displayName=P8.displayName;const k8=({...e})=>d.jsx(A8,{...e});k8.displayName=A8.displayName;const K0e=aA;K0e.displayName=aA.displayName;const M8=j.forwardRef(({className:e,...t},r)=>d.jsx(N8,{ref:r,"data-slot":"dialog-overlay",className:We("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t}));M8.displayName=N8.displayName;const Wl=j.forwardRef(({className:e,children:t,...r},n)=>d.jsxs(k8,{children:[d.jsx(M8,{}),d.jsxs(E8,{ref:n,"data-slot":"dialog-content",className:We("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...r,children:[t,d.jsxs(aA,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[d.jsx(Ma,{}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Wl.displayName=E8.displayName;const Hl=j.forwardRef(({className:e,...t},r)=>d.jsx("div",{ref:r,"data-slot":"dialog-header",className:We("flex flex-col gap-2 text-center sm:text-left",e),...t}));Hl.displayName="DialogHeader";const Xf=j.forwardRef(({className:e,...t},r)=>d.jsx("div",{ref:r,"data-slot":"dialog-footer",className:We("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t}));Xf.displayName="DialogFooter";const Gl=j.forwardRef(({className:e,...t},r)=>d.jsx(O8,{ref:r,"data-slot":"dialog-title",className:We("text-lg leading-none font-semibold",e),...t}));Gl.displayName=O8.displayName;const Kl=j.forwardRef(({className:e,...t},r)=>d.jsx(C8,{ref:r,"data-slot":"dialog-description",className:We("text-muted-foreground text-sm",e),...t}));Kl.displayName=C8.displayName;function R8({open:e,onOpenChange:t,onConfirm:r,isSubmitting:n}){return d.jsx(ql,{open:e,onOpenChange:t,children:d.jsxs(Wl,{className:"sm:max-w-md",children:[d.jsxs(Hl,{children:[d.jsx(Gl,{className:"text-xl font-serif text-yellow-600",children:"Confirm Logout"}),d.jsx(Kl,{children:"Are you sure you want to log out of your account?"})]}),d.jsx("div",{className:"py-4",children:d.jsx("p",{className:"text-neutral-600",children:"You will be redirected to the login page. Make sure all unsaved changes are saved before logging out."})}),d.jsxs(Xf,{className:"flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2",children:[d.jsx(Me,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),n?d.jsxs(Me,{variant:"default",onClick:r,children:[d.jsx(u1,{className:"mr-2 size-4 animate-spin"})," Processing..."]}):d.jsxs(Me,{variant:"default",onClick:r,children:[d.jsx(u1,{className:"mr-2 size-4"})," Confirm"]})]})]})})}function Ii({title:e}){const[t,r]=j.useState(!1),[n,i]=j.useState(!1),a=async()=>{try{i(!0),await At.logout(),alert("Logged out successfully"),setTimeout(()=>{window.location.href="/login"},1e3)}catch{alert("Logout failed. Please try again.")}finally{i(!1),r(!1)}};return d.jsxs("header",{className:"h-16 border-b border-gray-800 bg-gray-900 flex items-center justify-between px-6 shadow-lg relative",children:[d.jsx("div",{className:"h-1 bg-gradient-to-r from-[#9B2335] to-[#9B2335]/60 absolute top-0 left-0 w-full"}),d.jsx("h2",{className:"text-xl font-medium text-white",children:e}),d.jsx("div",{className:"flex items-center space-x-4",children:d.jsxs(D0e,{children:[d.jsx($0e,{asChild:!0,children:d.jsx(Me,{variant:"ghost",size:"icon",className:"rounded-full text-gray-300 hover:text-white hover:bg-gray-800",children:d.jsx(hr,{className:"size-5"})})}),d.jsxs(L0e,{align:"end",className:"bg-gray-800 border-gray-700",children:[d.jsx(t1,{className:"text-gray-300 hover:text-white hover:bg-gray-700 focus:bg-gray-700 focus:text-white",children:"Profile"}),d.jsx(t1,{className:"text-gray-300 hover:text-white hover:bg-gray-700 focus:bg-gray-700 focus:text-white",children:"Settings"}),d.jsx(t1,{onClick:()=>r(!0),className:"text-red-400 hover:text-red-300 hover:bg-red-900/20 focus:bg-red-900/20 focus:text-red-300",children:"Logout"})]})]})}),d.jsx(R8,{open:t,onOpenChange:r,onConfirm:a,isSubmitting:n})]})}var Y0e="Separator",f$="horizontal",X0e=["horizontal","vertical"],I8=j.forwardRef((e,t)=>{const{decorative:r,orientation:n=f$,...i}=e,a=Z0e(n)?n:f$,l=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return d.jsx(Le.div,{"data-orientation":a,...l,...i,ref:t})});I8.displayName=Y0e;function Z0e(e){return X0e.includes(e)}var Q0e=I8;function J0e({className:e,orientation:t="horizontal",decorative:r=!0,...n}){return d.jsx(Q0e,{"data-slot":"separator-root",decorative:r,orientation:t,className:We("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...n})}function Di(){const[e,t]=j.useState(!1),[r,n]=j.useState(!1),[i,a]=j.useState(!1),[o,l]=j.useState(null);j.useEffect(()=>{async function h(){try{const p=await At.fetchCurrentUser();console.log("Fetched user:",p),l(p)}catch(p){console.error("Failed to fetch user info:",p)}}h()},[]);const c=async()=>{try{a(!0),await At.logout(),alert("Logged out successfully"),setTimeout(()=>{window.location.href="/login"},1e3)}catch{alert("Logout failed. Please try again.")}finally{a(!1),n(!1)}},f=h=>h==="/admin/"?location.pathname==="/admin"||location.pathname==="/admin/":location.pathname===h;return d.jsxs(d.Fragment,{children:[d.jsx(R8,{open:r,onOpenChange:n,onConfirm:c,isSubmitting:i}),d.jsx("button",{className:"md:hidden fixed top-4 left-4 z-50 bg-gray-800 text-white rounded-md p-2 shadow-lg border border-gray-700 hover:bg-gray-700 transition-colors",onClick:()=>t(!e),"aria-label":"Toggle menu",children:e?d.jsx(Ma,{className:"size-5"}):d.jsx(Q7,{className:"size-5"})}),e&&d.jsx("div",{className:"md:hidden fixed inset-0 bg-black/70 z-40",onClick:()=>t(!1)}),d.jsxs("aside",{className:`bg-gray-900 border-r border-gray-800 shadow-2xl fixed h-full z-50 flex flex-col w-64
|
||
${e?"left-0":"-left-full md:left-0"}
|
||
transition-all duration-300
|
||
`,children:[d.jsx("div",{className:"h-1.5 bg-gradient-to-r from-[#9B2335] to-[#9B2335]/60 mx-2 mt-2 rounded-full shadow-lg flex-shrink-0"}),d.jsx("div",{className:"p-4 flex items-center justify-center border-b border-gray-800 flex-shrink-0",children:d.jsxs("div",{className:"flex items-center",children:[d.jsx("div",{className:"size-10 rounded-xl bg-[#9B2335] flex items-center justify-center mr-3 shadow-xl border border-gray-700",children:d.jsx(G$,{className:"size-5 text-white"})}),d.jsxs("div",{className:"flex flex-col",children:[d.jsx("h1",{className:"text-lg font-bold text-white",children:"Italian Migrants"}),d.jsx("p",{className:"text-xs text-[#9B2335]",children:"Admin Portal"})]})]})}),d.jsxs("nav",{className:"flex-1 py-4 scrollbar-thin scrollbar-thumb-gray-600 scrollbar-track-transparent",children:[d.jsxs("ul",{className:"space-y-2 px-3",children:[d.jsx("li",{children:d.jsx(Ge,{to:"/admin/",children:d.jsxs(Me,{variant:"ghost",className:`w-full justify-start rounded-lg transition-all duration-300 ${f("/admin/")?"bg-[#9B2335] text-white shadow-lg hover:bg-[#9B2335]/90":"text-gray-300 hover:text-white hover:bg-gray-800"}`,children:[d.jsx(mm,{className:"mr-3 size-5"}),d.jsx("span",{className:"font-medium",children:"Dashboard"})]})})}),d.jsx("li",{children:d.jsx(Ge,{to:"/admin/migrants",children:d.jsxs(Me,{variant:"ghost",className:`w-full justify-start rounded-lg transition-all duration-300 ${f("/admin/migrants")?"bg-[#9B2335] text-white shadow-lg hover:bg-[#9B2335]/90":"text-gray-300 hover:text-white hover:bg-gray-800"}`,children:[d.jsx(gm,{className:"mr-3 size-5"}),d.jsx("span",{className:"font-medium",children:"Migrants"})]})})}),d.jsx("li",{children:d.jsx(Ge,{to:"/admin/reports",children:d.jsxs(Me,{variant:"ghost",className:`w-full justify-start rounded-lg transition-all duration-300 ${f("/admin/reports")?"bg-[#9B2335] text-white shadow-lg hover:bg-[#9B2335]/90":"text-gray-300 hover:text-white hover:bg-gray-800"}`,children:[d.jsx(z$,{className:"mr-3 size-5"}),d.jsx("span",{className:"font-medium",children:"Reports"})]})})})]}),d.jsx(J0e,{className:"my-6 bg-gray-800 mx-3"}),d.jsxs("ul",{className:"space-y-2 px-3",children:[d.jsx("li",{children:d.jsx(Ge,{to:"/admin/users/create",children:d.jsxs(Me,{variant:"ghost",className:`w-full justify-start rounded-lg transition-all duration-300 ${f("/admin/users/create")?"bg-[#9B2335] text-white shadow-lg hover:bg-[#9B2335]/90":"text-gray-300 hover:text-white hover:bg-gray-800"}`,children:[d.jsx(Dj,{className:"mr-3 size-5"}),d.jsx("span",{className:"font-medium",children:"Create User"})]})})}),d.jsx("li",{children:d.jsx(Ge,{to:"/admin/settings",children:d.jsxs(Me,{variant:"ghost",className:`w-full justify-start rounded-lg transition-all duration-300 ${f("/admin/settings")?"bg-[#9B2335] text-white shadow-lg hover:bg-[#9B2335]/90":"text-gray-300 hover:text-white hover:bg-gray-800"}`,children:[d.jsx(oW,{className:"mr-3 size-5"}),d.jsx("span",{className:"font-medium",children:"Settings"})]})})})]})]}),d.jsxs("div",{className:"p-4 border-t border-gray-800 flex-shrink-0",children:[o&&d.jsx("div",{className:"mb-3 p-3 bg-gray-800 rounded-lg",children:d.jsxs("div",{className:"flex items-center space-x-2 mb-1",children:[d.jsx("div",{className:"size-8 rounded-full bg-[#9B2335] flex items-center justify-center",children:d.jsx("span",{className:"text-xs font-bold text-white",children:o.name.charAt(0).toUpperCase()})}),d.jsxs("div",{className:"text-sm",children:[d.jsx("p",{className:"font-medium text-white truncate",children:o.name}),d.jsx("p",{className:"text-gray-400 text-xs truncate",children:o.email})]})]})}),d.jsxs(Me,{variant:"ghost",className:"w-full justify-start text-red-400 hover:bg-red-900/20 hover:text-red-300 rounded-lg transition-all duration-300",onClick:()=>n(!0),children:[d.jsx(u1,{className:"mr-3 size-5"}),d.jsx("span",{className:"font-medium",children:"Logout"})]})]})]})]})}function ebe(){const[e,t]=j.useState([]),[r,n]=j.useState(!0);j.useEffect(()=>{(async()=>{try{const c=await At.getRecentActivityLogs();t(c)}catch(c){console.error("Error fetching activity logs:",c)}finally{n(!1)}})()},[]);const i=l=>{const c=l.description.toLowerCase();return c.includes("add")?"add":c.includes("update")?"update":c.includes("delete")?"delete":c.includes("report")?"report":"import"},a=l=>{switch(l){case"add":return d.jsx(Mj,{className:"h-5 w-5"});case"update":return d.jsx(Rj,{className:"h-5 w-5"});case"delete":return d.jsx(gm,{className:"h-5 w-5"});case"report":return d.jsx(b7,{className:"h-5 w-5"});default:return d.jsx(c1,{className:"h-5 w-5"})}},o=l=>{switch(l){case"add":return"bg-green-900/20 text-green-400 border border-green-800/30";case"update":return"bg-blue-900/20 text-blue-400 border border-blue-800/30";case"delete":return"bg-red-900/20 text-red-400 border border-red-800/30";case"report":return"bg-purple-900/20 text-purple-400 border border-purple-800/30";default:return"bg-[#9B2335]/20 text-[#9B2335] border border-[#9B2335]/30"}};return d.jsxs(Yn.div,{className:"bg-gray-900 rounded-lg shadow-2xlborder border-gray-800 overflow-hidden",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.4},children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-[#9B2335] to-[#9B2335]/60"}),d.jsx("div",{className:"px-6 py-2 border-b border-gray-800",children:d.jsx("h2",{className:"text-lg font-medium text-white",children:"Recent Activity"})}),d.jsx("div",{className:"p-6",children:r?d.jsxs("div",{className:"flex items-center justify-center py-8",children:[d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#9B2335]"}),d.jsx("p",{className:"text-gray-400 ml-3",children:"Loading activity..."})]}):e.length===0?d.jsxs("div",{className:"text-center py-8",children:[d.jsx(c1,{className:"mx-auto h-12 w-12 text-gray-600 mb-4"}),d.jsx("p",{className:"text-gray-400",children:"No recent activity found."}),d.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Activity will appear here when users interact with the system."})]}):d.jsx("div",{className:"space-y-6",children:e.map((l,c)=>{const f=i(l);return d.jsxs(Yn.div,{className:"flex items-start group hover:bg-gray-800/30 p-3 rounded-lg transition-colors duration-200",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3,delay:.5+c*.1},children:[d.jsx("div",{className:`p-2 rounded-full mr-4 shadow-lg ${o(f)}`,children:a(f)}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("p",{className:"font-medium text-white group-hover:text-gray-100 transition-colors",children:l.description}),d.jsxs("div",{className:"flex items-center mt-1 text-sm text-gray-400",children:[d.jsx("span",{className:"font-medium text-[#9B2335]",children:l.causer_name}),d.jsx("span",{className:"mx-2",children:"•"}),d.jsx("span",{children:new Date(l.created_at).toLocaleString()})]})]}),d.jsx("div",{className:"ml-4 opacity-0 group-hover:opacity-100 transition-opacity",children:d.jsx("div",{className:"w-2 h-2 bg-[#9B2335] rounded-full"})})]},c)})})})]})}const D8=()=>{const{migrationData:e,loading:t,error:r}=O_();return t?d.jsx("p",{children:"Loading..."}):r?d.jsx("p",{children:r}):e.length?d.jsxs("div",{className:"w-full h-full",children:[d.jsx("h2",{className:"text-lg font-semibold text-gray-500 mb-2",children:"Italian Migration to Northern Territory (1900-1950)"}),d.jsx(Q_,{width:"100%",height:"90%",children:d.jsxs(YF,{data:e,barCategoryGap:"30%",children:[d.jsx(IP,{strokeDasharray:"3 3",stroke:"#E5E7EB"}),d.jsx(Wf,{dataKey:"year",tick:{fontSize:12,fill:"#6B7280"},axisLine:!1,tickLine:!1}),d.jsx(Hf,{tick:{fontSize:12,fill:"#6B7280"},axisLine:!1,tickLine:!1,tickCount:5,children:d.jsx(Gt,{value:"Migrants",angle:-90,position:"insideLeft",style:{textAnchor:"middle",fill:"#374151",fontSize:12},offset:-10})}),d.jsx(on,{cursor:{fill:"rgba(203, 213, 225, 0.2)"},contentStyle:{backgroundColor:"#1F2937",borderRadius:"6px",color:"#fff",fontSize:"0.875rem"},labelStyle:{color:"#F43F5E"},formatter:n=>[`${n} migrants`,""]}),d.jsx("defs",{children:d.jsxs("linearGradient",{id:"barGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[d.jsx("stop",{offset:"0%",stopColor:"#BE123C"}),d.jsx("stop",{offset:"100%",stopColor:"#F43F5E"})]})}),d.jsx(Wa,{dataKey:"count",fill:"url(#barGradient)",radius:[4,4,0,0],barSize:24})]})})]}):d.jsx("p",{children:"No data available"})};function tbe(){var o,l;const[e,t]=j.useState(null),[r,n]=j.useState(!0),[i,a]=j.useState(null);return j.useEffect(()=>{(async()=>{try{n(!0);const f=await At.getDashboardStats();f.success?t(f.data):a("Failed to load dashboard data")}catch(f){a("An error occurred while fetching dashboard data"),console.error(f)}finally{n(!1)}})()},[]),r?d.jsxs("div",{className:"flex min-h-dvh bg-gray-950",children:[d.jsx(Di,{}),d.jsxs("div",{className:"flex-1 md:ml-16 lg:ml-64 w-full transition-all duration-300",children:[d.jsx(Ii,{title:"Dashboard"}),d.jsx("main",{className:"p-6",children:d.jsx("div",{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-4 mb-8",children:[...Array(4)].map((c,f)=>d.jsxs("div",{className:"bg-gray-900 border border-gray-800 rounded-lg shadow-lg p-6 animate-pulse",children:[d.jsx("div",{className:"h-4 bg-gray-700 rounded w-1/2 mb-4"}),d.jsx("div",{className:"h-8 bg-gray-700 rounded w-1/4 mb-4"}),d.jsx("div",{className:"h-4 bg-gray-700 rounded w-3/4"})]},f))})})]})]}):i?d.jsxs("div",{className:"flex min-h-dvh bg-gray-950",children:[d.jsx(Di,{}),d.jsxs("div",{className:"flex-1 md:ml-16 lg:ml-64 w-full transition-all duration-300",children:[d.jsx(Ii,{title:"Dashboard"}),d.jsx("main",{className:"p-6",children:d.jsx("div",{className:"bg-red-900/20 border border-red-800 text-red-400 px-4 py-3 rounded-md mb-8",children:i})})]})]}):d.jsxs("div",{className:"flex min-h-dvh bg-gray-950",children:[d.jsx(Di,{}),d.jsxs("div",{className:"flex-1 md:ml-16 lg:ml-64 w-full transition-all duration-300",children:[d.jsx(Ii,{title:"Dashboard"}),d.jsxs("main",{className:"p-6",children:[d.jsxs("div",{className:"mb-8",children:[d.jsx("h1",{className:"text-3xl font-serif font-bold text-white mb-2",children:"Welcome, Admin"}),d.jsx("p",{className:"text-gray-400",children:"Here's an overview of your Italian Migrants Database"})]}),d.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4 mb-8",children:[d.jsx(et,{className:"bg-gray-900 border-gray-800 shadow-xl",children:d.jsxs(tt,{className:"p-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-gray-400",children:"Total Records"}),d.jsx("h3",{className:"text-2xl font-bold mt-1 text-white",children:(e==null?void 0:e.total_migrants)||0})]}),d.jsx("div",{className:"h-12 w-12 rounded-full bg-[#9B2335]/20 border border-[#9B2335]/30 flex items-center justify-center",children:d.jsx(mW,{className:"h-6 w-6 text-[#9B2335]"})})]}),d.jsxs("div",{className:"mt-4",children:[d.jsxs("div",{className:"flex items-center justify-between text-xs",children:[d.jsx("span",{className:"text-gray-400",children:"Growth Rate"}),d.jsx("span",{className:"font-medium text-[#9B2335]",children:"+24% YoY"})]}),d.jsx("div",{className:"w-full bg-gray-800 rounded-full h-1.5 mt-1",children:d.jsx("div",{className:"bg-[#9B2335] h-1.5 rounded-full",style:{width:"24%"}})})]})]})}),d.jsx(et,{className:"bg-gray-900 border-gray-800 shadow-xl",children:d.jsxs(tt,{className:"p-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-gray-400",children:"Recent Addition"}),d.jsx("h3",{className:"text-2xl font-bold mt-1 text-white",children:(e==null?void 0:e.recent_additions)||0})]}),d.jsx("div",{className:"h-12 w-12 rounded-full bg-blue-500/20 border border-blue-500/30 flex items-center justify-center",children:d.jsx(hW,{className:"h-6 w-6 text-blue-400"})})]}),d.jsxs("div",{className:"mt-4",children:[d.jsxs("div",{className:"flex items-center justify-between text-xs",children:[d.jsx("span",{className:"text-gray-400",children:"Change"}),d.jsx("span",{className:"font-medium text-blue-400",children:"-1.2 years"})]}),d.jsx("div",{className:"w-full bg-gray-800 rounded-full h-1.5 mt-1",children:d.jsx("div",{className:"bg-blue-500 h-1.5 rounded-full",style:{width:"65%"}})})]})]})}),d.jsx(et,{className:"bg-gray-900 border-gray-800 shadow-xl",children:d.jsxs(tt,{className:"p-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-gray-400",children:"Peak Migration Year"}),d.jsx("h3",{className:"text-2xl font-bold mt-1 text-white",children:((o=e==null?void 0:e.peak_migration_year)==null?void 0:o.year)??"N/A"})]}),d.jsx("div",{className:"h-12 w-12 rounded-full bg-amber-500/20 border border-amber-500/30 flex items-center justify-center",children:d.jsx(ks,{className:"h-6 w-6 text-amber-400"})})]}),d.jsxs("div",{className:"mt-4",children:[d.jsxs("div",{className:"flex items-center justify-between text-xs",children:[d.jsx("span",{className:"text-gray-400",children:"Migrants that year"}),d.jsx("span",{className:"font-medium text-amber-400",children:"120"})]}),d.jsx("div",{className:"w-full bg-gray-800 rounded-full h-1.5 mt-1",children:d.jsx("div",{className:"bg-amber-500 h-1.5 rounded-full",style:{width:"85%"}})})]})]})}),d.jsx(et,{className:"bg-gray-900 border-gray-800 shadow-xl",children:d.jsxs(tt,{className:"p-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-gray-400",children:"Most Common Origin"}),d.jsx("h3",{className:"text-2xl font-bold mt-1 text-white",children:((l=e==null?void 0:e.most_common_origin)==null?void 0:l.place)||"N/A"})]}),d.jsx("div",{className:"h-12 w-12 rounded-full bg-purple-500/20 border border-purple-500/30 flex items-center justify-center",children:d.jsxs("svg",{className:"h-6 w-6 text-purple-400",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("path",{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),d.jsx("path",{d:"M3 12H21",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),d.jsx("path",{d:"M12 3C14.5013 5.76254 15.9228 9.29498 16 13C16.0772 16.705 14.6557 20.2375 12.1544 23C9.65304 20.2375 8.23152 16.705 8.15432 13C8.07712 9.29498 9.49864 5.76254 12 3V3Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})})]}),d.jsxs("div",{className:"mt-4",children:[d.jsxs("div",{className:"flex items-center justify-between text-xs",children:[d.jsx("span",{className:"text-gray-400",children:"Percentage"}),d.jsx("span",{className:"font-medium text-purple-400",children:"35%"})]}),d.jsx("div",{className:"w-full bg-gray-800 rounded-full h-1.5 mt-1",children:d.jsx("div",{className:"bg-purple-500 h-1.5 rounded-full",style:{width:"35%"}})})]})]})})]}),d.jsxs("div",{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-3 mb-8",children:[d.jsxs(et,{className:"col-span-full lg:col-span-2 bg-gray-900 border-gray-800 shadow-xl",children:[d.jsxs(Mn,{className:"pb-2 border-b border-gray-800",children:[d.jsx(Rn,{className:"text-lg font-medium text-white",children:"Yearly Migration Trends"}),d.jsx(Ho,{className:"text-gray-400",children:"Number of migrants by year of arrival (1900-1950)"})]}),d.jsx(tt,{className:"flex-1 h-[300px]",children:d.jsx(D8,{})})]}),d.jsx(DP,{})]}),d.jsx("div",{className:"mb-8",children:d.jsxs(Xj,{defaultValue:"recent",children:[d.jsxs("div",{className:"flex justify-between items-center mb-4",children:[d.jsxs(J3,{className:"bg-gray-800 border-gray-700",children:[d.jsx(Ms,{value:"recent",className:"data-[state=active]:bg-[#9B2335] data-[state=active]:text-white",children:"Recent Activity"}),d.jsx(Ms,{value:"pending",className:"data-[state=active]:bg-[#9B2335] data-[state=active]:text-white",children:"Pending Reviews"})]}),d.jsx(Ge,{to:"/admin/migrants",children:d.jsx(Me,{variant:"outline",size:"sm",className:"text-sm border-gray-700 text-gray-300 hover:bg-gray-800 hover:text-white",children:"View All Records"})})]}),d.jsx(bo,{value:"recent",className:"m-0",children:d.jsx(et,{className:"bg-gray-900 border-gray-800 shadow-xl",children:d.jsx(tt,{className:"p-0",children:d.jsx(ebe,{})})})}),d.jsx(bo,{value:"pending",className:"m-0",children:d.jsx(et,{className:"bg-gray-900 border-gray-800 shadow-xl",children:d.jsx(tt,{className:"p-6",children:d.jsxs("div",{className:"text-center py-8 text-gray-400",children:[d.jsx(z$,{className:"mx-auto size-12 mb-4 text-gray-600"}),d.jsx("h3",{className:"text-lg font-medium mb-2 text-white",children:"No Pending Reviews"}),d.jsx("p",{children:"All migrant records have been reviewed."})]})})})})]})})]})]})]})}const rbe=(e=10)=>{const[t,r]=j.useState([]),[n,i]=j.useState(!1),[a,o]=j.useState(1),[l,c]=j.useState(1),[f,h]=j.useState(""),[p,g]=j.useState(""),[v,w]=j.useState({arrival_order:"desc"}),[y,b]=j.useState(!1),[S,A]=j.useState([]),_=async()=>{i(!0);try{const L={};f&&f.trim()!==""&&(L.full_name=f.trim()),console.log("Search Occupation value:",p),p&&p.trim()!==""&&(L.occupation=p.trim(),console.log("Added occupation filter:",p.trim())),v.arrival_from&&(L.arrival_from=v.arrival_from),v.arrival_to&&(L.arrival_to=v.arrival_to),v.sort_by==="arrival_date"?(L.sort_by="date_of_arrival_nt",L.sort_order=v.arrival_order||"desc",v.alphabetical_order&&(L.secondary_sort_by="full_name",L.secondary_sort_order=v.alphabetical_order)):v.alphabetical_order&&(L.sort_by="full_name",L.sort_order=v.alphabetical_order),console.log("Sending filters:",L);const V=await At.getMigrants(a,e,L);r(V.data||[]),c(V.last_page||1),o(V.current_page||1)}catch(L){console.error("Failed to fetch migrants",L)}finally{i(!1)}};j.useEffect(()=>{_()},[a]),j.useEffect(()=>{y&&(_(),b(!1))},[y]),j.useEffect(()=>{A([])},[a,y]);const C=()=>{var V,Y,K,z,G;console.log("handleSearch called with searchOccupation:",p);const L=f.trim()!==""||p.trim()!==""||((V=v.arrival_from)==null?void 0:V.trim())||((Y=v.arrival_to)==null?void 0:Y.trim())||((K=v.alphabetical_order)==null?void 0:K.trim())||((z=v.sort_by)==null?void 0:z.trim())||((G=v.arrival_order)==null?void 0:G.trim());if(p.trim()!==""){console.log("Occupation search triggered with:",p),o(1),b(!0);return}v.sort_by==="arrival_date"||L?(o(1),b(!0)):N()},N=()=>{h(""),g(""),w({arrival_order:"desc"}),o(1),b(!0)},O=()=>{b(!0)},T=L=>{const V=typeof L=="number"?L:typeof L=="string"?parseInt(L):null;V===null||isNaN(V)||A(Y=>Y.includes(V)?Y.filter(K=>K!==V):[...Y,V])},k=()=>{S.length===t.length?A([]):A(t.map(L=>L.person_id).filter(L=>typeof L=="number"))},R=t.length>0&&S.length===t.filter(L=>typeof L.person_id=="number"||typeof L.person_id=="string"&&!isNaN(parseInt(L.person_id))).length;return{migrants:t,loading:n,currentPage:a,totalPages:l,searchFullName:f,searchOccupation:p,filters:v,selectedMigrants:S,setCurrentPage:o,setSearchFullName:h,setSearchOccupation:g,setFilters:w,handleSearch:C,resetFilters:N,refetchMigrants:O,toggleSelectMigrant:T,toggleSelectAll:k,isAllSelected:R,clearSelection:()=>{A([])},handleBulkDelete:()=>{A([]),b(!0)}}},nbe=e=>{Cn(t=>d.jsxs("div",{className:"flex items-start",children:[d.jsx("div",{className:"flex-shrink-0 bg-green-50 rounded-full p-2",children:d.jsx(Mj,{className:"h-5 w-5 text-green-600"})}),d.jsxs("div",{className:"ml-3",children:[d.jsx("h3",{className:"text-sm font-medium text-slate-900",children:"Migrant Created"}),d.jsx("div",{className:"mt-1 text-sm text-slate-500",children:"New migrant record has been successfully added to the database."}),d.jsx("div",{className:"mt-2 flex space-x-3",children:d.jsx("button",{onClick:()=>{Cn.dismiss(t.id),e&&e()},className:"inline-flex text-xs font-medium text-green-700 hover:text-green-800",children:"View Migrants"})})]}),d.jsx("div",{className:"ml-auto pl-3",children:d.jsx("div",{className:"-mx-1.5 -my-1.5",children:d.jsxs("button",{onClick:()=>Cn.dismiss(t.id),className:"inline-flex rounded-md p-1.5 text-slate-500 hover:bg-slate-100 hover:text-slate-700",children:[d.jsx("span",{className:"sr-only",children:"Dismiss"}),d.jsx(Ma,{className:"h-4 w-4"})]})})})]}),{duration:5e3,style:{background:"#ffffff",padding:"16px",borderRadius:"8px",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",border:"1px solid #e2e8f0",maxWidth:"400px"}})},mj=e=>Cn.error(e,{style:{background:"#EF4444",color:"#fff",padding:"16px",borderRadius:"10px"},icon:d.jsx(C7,{className:"text-white"}),duration:3e3,position:"top-right"}),ibe=e=>{Cn(t=>d.jsxs("div",{className:"flex items-start",children:[d.jsx("div",{className:"flex-shrink-0 bg-red-50 rounded-full p-2",children:d.jsx(Au,{className:"h-5 w-5 text-red-600"})}),d.jsxs("div",{className:"ml-3",children:[d.jsx("h3",{className:"text-sm font-medium text-slate-900",children:"Item Deleted"}),d.jsxs("div",{className:"mt-1 text-sm text-slate-500",children:[d.jsx("span",{className:"font-medium",children:e})," has been deleted."]})]}),d.jsx("div",{className:"ml-auto pl-3",children:d.jsx("div",{className:"-mx-1.5 -my-1.5",children:d.jsxs("button",{onClick:()=>Cn.dismiss(t.id),className:"inline-flex rounded-md p-1.5 text-slate-500 hover:bg-slate-100 hover:text-slate-700",children:[d.jsx("span",{className:"sr-only",children:"Dismiss"}),d.jsx(Ma,{className:"h-4 w-4"})]})})})]}),{duration:5e3,style:{background:"#ffffff",padding:"16px",borderRadius:"8px",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",border:"1px solid #e2e8f0",maxWidth:"400px"}})},abe=e=>{Cn(t=>d.jsxs("div",{className:"flex items-start",children:[d.jsx("div",{className:"flex-shrink-0 bg-red-50 rounded-full p-2",children:d.jsx(Au,{className:"h-5 w-5 text-red-600"})}),d.jsxs("div",{className:"ml-3",children:[d.jsx("h3",{className:"text-sm font-medium text-slate-900",children:"Items Deleted"}),d.jsxs("div",{className:"mt-1 text-sm text-slate-500",children:[d.jsxs("span",{className:"font-medium",children:[e," items"]})," have been deleted from your workspace."]}),d.jsx("div",{className:"mt-2 flex",children:d.jsx("button",{onClick:()=>Cn.dismiss(t.id),className:"inline-flex text-xs font-medium text-slate-500 hover:text-slate-700",children:"Dismiss"})})]})]}),{duration:5e3,style:{background:"#ffffff",padding:"16px",borderRadius:"8px",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",border:"1px solid #e2e8f0",maxWidth:"400px"}})},obe=(e,t)=>{Cn(r=>d.jsxs("div",{className:"flex items-start",children:[d.jsx("div",{className:"flex-shrink-0 bg-blue-50 rounded-full p-2",children:d.jsx(uW,{className:"h-5 w-5 text-blue-600"})}),d.jsxs("div",{className:"ml-3",children:[d.jsx("h3",{className:"text-sm font-medium text-slate-900",children:"Item Updated"}),d.jsxs("div",{className:"mt-1 text-sm text-slate-500",children:[d.jsx("span",{className:"font-medium",children:e})," has been updated successfully."]}),d.jsxs("div",{className:"mt-2 flex items-center space-x-4",children:[d.jsx("div",{className:"flex items-center",children:d.jsxs("div",{className:"text-xs text-slate-500 flex items-center",children:[d.jsx(l1,{className:"inline-block h-3 w-3 mr-1"}),"Just now"]})}),t&&d.jsx("button",{onClick:()=>{Cn.dismiss(r.id),t&&t()},className:"inline-flex text-xs font-medium text-blue-700 hover:text-blue-800",children:"View Changes"})]})]}),d.jsx("div",{className:"ml-auto pl-3",children:d.jsx("div",{className:"-mx-1.5 -my-1.5",children:d.jsxs("button",{onClick:()=>Cn.dismiss(r.id),className:"inline-flex rounded-md p-1.5 text-slate-500 hover:bg-slate-100 hover:text-slate-700",children:[d.jsx("span",{className:"sr-only",children:"Dismiss"}),d.jsx(Ma,{className:"h-4 w-4"})]})})})]}),{duration:5e3,style:{background:"#ffffff",padding:"16px",borderRadius:"8px",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",border:"1px solid #e2e8f0",maxWidth:"400px"}})};function sbe({open:e,onOpenChange:t,bulkDelete:r,selectedCount:n,ids:i,onDeleteSuccess:a}){const[o,l]=j.useState(!1),c=async()=>{if(!i.length){t(!1);return}l(!0);try{await new Promise(f=>setTimeout(f,1e3)),r?(await Promise.all(i.map(f=>At.deleteMigrant(f))),abe(n)):(await At.deleteMigrant(i[0]),ibe("Migrant record")),a==null||a(),t(!1)}catch(f){console.error("Failed to delete record(s):",f),mj("Failed to delete record(s). Please try again.")}finally{l(!1)}};return d.jsx(ql,{open:e,onOpenChange:t,children:d.jsxs(Wl,{className:"sm:max-w-md",children:[d.jsxs(Hl,{children:[d.jsx(Gl,{className:"text-xl font-serif text-red-600",children:"Confirm Deletion"}),d.jsx(Kl,{children:r?`Are you sure you want to delete ${n} selected records?`:"Are you sure you want to delete this migrant record?"})]}),d.jsx("div",{className:"py-4",children:d.jsxs("p",{className:"text-neutral-600",children:["This action cannot be undone. This will permanently delete the",r?" selected records":" record"," from the database."]})}),d.jsxs(Xf,{className:"flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2",children:[d.jsx(Me,{variant:"outline",onClick:()=>t(!1),disabled:o,children:"Cancel"}),d.jsxs(Me,{variant:"destructive",onClick:c,disabled:o,children:[d.jsx(Au,{className:"mr-2 size-4"}),o?"Deleting...":`Delete ${r?"Selected":"Record"}`]})]})]})})}function lbe({className:e,...t}){return d.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:d.jsx("table",{"data-slot":"table",className:We("w-full caption-bottom text-sm",e),...t})})}function cbe({className:e,...t}){return d.jsx("thead",{"data-slot":"table-header",className:We("[&_tr]:border-b",e),...t})}function ube({className:e,...t}){return d.jsx("tbody",{"data-slot":"table-body",className:We("[&_tr:last-child]:border-0",e),...t})}function d$({className:e,...t}){return d.jsx("tr",{"data-slot":"table-row",className:We("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function xa({className:e,...t}){return d.jsx("th",{"data-slot":"table-head",className:We("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function ba({className:e,...t}){return d.jsx("td",{"data-slot":"table-cell",className:We("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function oA(e){const t=j.useRef({value:e,previous:e});return j.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Og="Checkbox",[fbe,S1e]=mn(Og),[dbe,sA]=fbe(Og);function hbe(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:i,disabled:a,form:o,name:l,onCheckedChange:c,required:f,value:h="on",internal_do_not_use_render:p}=e,[g,v]=Ra({prop:r,defaultProp:i??!1,onChange:c,caller:Og}),[w,y]=j.useState(null),[b,S]=j.useState(null),A=j.useRef(!1),_=w?!!o||!!w.closest("form"):!0,C={checked:g,disabled:a,setChecked:v,control:w,setControl:y,name:l,form:o,value:h,hasConsumerStoppedPropagationRef:A,required:f,defaultChecked:ka(i)?!1:i,isFormControl:_,bubbleInput:b,setBubbleInput:S};return d.jsx(dbe,{scope:t,...C,children:pbe(p)?p(C):n})}var $8="CheckboxTrigger",L8=j.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},i)=>{const{control:a,value:o,disabled:l,checked:c,required:f,setControl:h,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:v,bubbleInput:w}=sA($8,e),y=it(i,h),b=j.useRef(c);return j.useEffect(()=>{const S=a==null?void 0:a.form;if(S){const A=()=>p(b.current);return S.addEventListener("reset",A),()=>S.removeEventListener("reset",A)}},[a,p]),d.jsx(Le.button,{type:"button",role:"checkbox","aria-checked":ka(c)?"mixed":c,"aria-required":f,"data-state":q8(c),"data-disabled":l?"":void 0,disabled:l,value:o,...n,ref:y,onKeyDown:Ce(t,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:Ce(r,S=>{p(A=>ka(A)?!0:!A),w&&v&&(g.current=S.isPropagationStopped(),g.current||S.stopPropagation())})})});L8.displayName=$8;var B8=j.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:a,required:o,disabled:l,value:c,onCheckedChange:f,form:h,...p}=e;return d.jsx(hbe,{__scopeCheckbox:r,checked:i,defaultChecked:a,disabled:l,required:o,onCheckedChange:f,name:n,form:h,value:c,internal_do_not_use_render:({isFormControl:g})=>d.jsxs(d.Fragment,{children:[d.jsx(L8,{...p,ref:t,__scopeCheckbox:r}),g&&d.jsx(U8,{__scopeCheckbox:r})]})})});B8.displayName=Og;var F8="CheckboxIndicator",z8=j.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...i}=e,a=sA(F8,r);return d.jsx(Fn,{present:n||ka(a.checked)||a.checked===!0,children:d.jsx(Le.span,{"data-state":q8(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});z8.displayName=F8;var V8="CheckboxBubbleInput",U8=j.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:l,disabled:c,name:f,value:h,form:p,bubbleInput:g,setBubbleInput:v}=sA(V8,e),w=it(r,v),y=oA(a),b=WP(n);j.useEffect(()=>{const A=g;if(!A)return;const _=window.HTMLInputElement.prototype,N=Object.getOwnPropertyDescriptor(_,"checked").set,O=!i.current;if(y!==a&&N){const T=new Event("click",{bubbles:O});A.indeterminate=ka(a),N.call(A,ka(a)?!1:a),A.dispatchEvent(T)}},[g,y,a,i]);const S=j.useRef(ka(a)?!1:a);return d.jsx(Le.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??S.current,required:l,disabled:c,name:f,value:h,form:p,...t,tabIndex:-1,ref:w,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});U8.displayName=V8;function pbe(e){return typeof e=="function"}function ka(e){return e==="indeterminate"}function q8(e){return ka(e)?"indeterminate":e?"checked":"unchecked"}function h$({className:e,...t}){return d.jsx(B8,{"data-slot":"checkbox",className:We("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:d.jsx(z8,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:d.jsx(Tj,{className:"size-3.5"})})})}function p$(e,[t,r]){return Math.min(r,Math.max(t,e))}var W8=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),mbe="VisuallyHidden",gbe=j.forwardRef((e,t)=>d.jsx(Le.span,{...e,ref:t,style:{...W8,...e.style}}));gbe.displayName=mbe;var vbe=[" ","Enter","ArrowUp","ArrowDown"],ybe=[" ","Enter"],Uo="Select",[Cg,Tg,xbe]=Hj(Uo),[Yl,j1e]=mn(Uo,[xbe,wg]),kg=wg(),[bbe,Ha]=Yl(Uo),[wbe,Sbe]=Yl(Uo),H8=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:i,onOpenChange:a,value:o,defaultValue:l,onValueChange:c,dir:f,name:h,autoComplete:p,disabled:g,required:v,form:w}=e,y=kg(t),[b,S]=j.useState(null),[A,_]=j.useState(null),[C,N]=j.useState(!1),O=Tf(f),[T,k]=Ra({prop:n,defaultProp:i??!1,onChange:a,caller:Uo}),[R,F]=Ra({prop:o,defaultProp:l,onChange:c,caller:Uo}),I=j.useRef(null),L=b?w||!!b.closest("form"):!0,[V,Y]=j.useState(new Set),K=Array.from(V).map(z=>z.props.value).join(";");return d.jsx(x6,{...y,children:d.jsxs(bbe,{required:v,scope:t,trigger:b,onTriggerChange:S,valueNode:A,onValueNodeChange:_,valueNodeHasChildren:C,onValueNodeHasChildrenChange:N,contentId:Qn(),value:R,onValueChange:F,open:T,onOpenChange:k,dir:O,triggerPointerDownPosRef:I,disabled:g,children:[d.jsx(Cg.Provider,{scope:t,children:d.jsx(wbe,{scope:e.__scopeSelect,onNativeOptionAdd:j.useCallback(z=>{Y(G=>new Set(G).add(z))},[]),onNativeOptionRemove:j.useCallback(z=>{Y(G=>{const D=new Set(G);return D.delete(z),D})},[]),children:r})}),L?d.jsxs(pz,{"aria-hidden":!0,required:v,tabIndex:-1,name:h,autoComplete:p,value:R,onChange:z=>F(z.target.value),disabled:g,form:w,children:[R===void 0?d.jsx("option",{value:""}):null,Array.from(V)]},K):null]})})};H8.displayName=Uo;var G8="SelectTrigger",K8=j.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...i}=e,a=kg(r),o=Ha(G8,r),l=o.disabled||n,c=it(t,o.onTriggerChange),f=Tg(r),h=j.useRef("touch"),[p,g,v]=gz(y=>{const b=f().filter(_=>!_.disabled),S=b.find(_=>_.value===o.value),A=vz(b,y,S);A!==void 0&&o.onValueChange(A.value)}),w=y=>{l||(o.onOpenChange(!0),v()),y&&(o.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return d.jsx(b6,{asChild:!0,...a,children:d.jsx(Le.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":mz(o.value)?"":void 0,...i,ref:c,onClick:Ce(i.onClick,y=>{y.currentTarget.focus(),h.current!=="mouse"&&w(y)}),onPointerDown:Ce(i.onPointerDown,y=>{h.current=y.pointerType;const b=y.target;b.hasPointerCapture(y.pointerId)&&b.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(w(y),y.preventDefault())}),onKeyDown:Ce(i.onKeyDown,y=>{const b=p.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&g(y.key),!(b&&y.key===" ")&&vbe.includes(y.key)&&(w(),y.preventDefault())})})})});K8.displayName=G8;var Y8="SelectValue",X8=j.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,children:a,placeholder:o="",...l}=e,c=Ha(Y8,r),{onValueNodeHasChildrenChange:f}=c,h=a!==void 0,p=it(t,c.onValueNodeChange);return yr(()=>{f(h)},[f,h]),d.jsx(Le.span,{...l,ref:p,style:{pointerEvents:"none"},children:mz(c.value)?d.jsx(d.Fragment,{children:o}):a})});X8.displayName=Y8;var jbe="SelectIcon",Z8=j.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...i}=e;return d.jsx(Le.span,{"aria-hidden":!0,...i,ref:t,children:n||"▼"})});Z8.displayName=jbe;var _be="SelectPortal",Q8=e=>d.jsx(Sg,{asChild:!0,...e});Q8.displayName=_be;var qo="SelectContent",J8=j.forwardRef((e,t)=>{const r=Ha(qo,e.__scopeSelect),[n,i]=j.useState();if(yr(()=>{i(new DocumentFragment)},[]),!r.open){const a=n;return a?Af.createPortal(d.jsx(ez,{scope:e.__scopeSelect,children:d.jsx(Cg.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),a):null}return d.jsx(tz,{...e,ref:t})});J8.displayName=qo;var Nn=10,[ez,Ga]=Yl(qo),Pbe="SelectContentImpl",Abe=ko("SelectContent.RemoveScroll"),tz=j.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:l,sideOffset:c,align:f,alignOffset:h,arrowPadding:p,collisionBoundary:g,collisionPadding:v,sticky:w,hideWhenDetached:y,avoidCollisions:b,...S}=e,A=Ha(qo,r),[_,C]=j.useState(null),[N,O]=j.useState(null),T=it(t,ae=>C(ae)),[k,R]=j.useState(null),[F,I]=j.useState(null),L=Tg(r),[V,Y]=j.useState(!1),K=j.useRef(!1);j.useEffect(()=>{if(_)return KP(_)},[_]),$P();const z=j.useCallback(ae=>{const[he,...ne]=L().map(Z=>Z.ref.current),[le]=ne.slice(-1),ce=document.activeElement;for(const Z of ae)if(Z===ce||(Z==null||Z.scrollIntoView({block:"nearest"}),Z===he&&N&&(N.scrollTop=0),Z===le&&N&&(N.scrollTop=N.scrollHeight),Z==null||Z.focus(),document.activeElement!==ce))return},[L,N]),G=j.useCallback(()=>z([k,_]),[z,k,_]);j.useEffect(()=>{V&&G()},[V,G]);const{onOpenChange:D,triggerPointerDownPosRef:q}=A;j.useEffect(()=>{if(_){let ae={x:0,y:0};const he=le=>{var ce,Z;ae={x:Math.abs(Math.round(le.pageX)-(((ce=q.current)==null?void 0:ce.x)??0)),y:Math.abs(Math.round(le.pageY)-(((Z=q.current)==null?void 0:Z.y)??0))}},ne=le=>{ae.x<=10&&ae.y<=10?le.preventDefault():_.contains(le.target)||D(!1),document.removeEventListener("pointermove",he),q.current=null};return q.current!==null&&(document.addEventListener("pointermove",he),document.addEventListener("pointerup",ne,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",he),document.removeEventListener("pointerup",ne,{capture:!0})}}},[_,D,q]),j.useEffect(()=>{const ae=()=>D(!1);return window.addEventListener("blur",ae),window.addEventListener("resize",ae),()=>{window.removeEventListener("blur",ae),window.removeEventListener("resize",ae)}},[D]);const[Q,$]=gz(ae=>{const he=L().filter(ce=>!ce.disabled),ne=he.find(ce=>ce.ref.current===document.activeElement),le=vz(he,ae,ne);le&&setTimeout(()=>le.ref.current.focus())}),H=j.useCallback((ae,he,ne)=>{const le=!K.current&&!ne;(A.value!==void 0&&A.value===he||le)&&(R(ae),le&&(K.current=!0))},[A.value]),re=j.useCallback(()=>_==null?void 0:_.focus(),[_]),se=j.useCallback((ae,he,ne)=>{const le=!K.current&&!ne;(A.value!==void 0&&A.value===he||le)&&I(ae)},[A.value]),ge=n==="popper"?gj:rz,be=ge===gj?{side:l,sideOffset:c,align:f,alignOffset:h,arrowPadding:p,collisionBoundary:g,collisionPadding:v,sticky:w,hideWhenDetached:y,avoidCollisions:b}:{};return d.jsx(ez,{scope:r,content:_,viewport:N,onViewportChange:O,itemRefCallback:H,selectedItem:k,onItemLeave:re,itemTextRefCallback:se,focusSelectedItem:G,selectedItemText:F,position:n,isPositioned:V,searchRef:Q,children:d.jsx(_g,{as:Abe,allowPinchZoom:!0,children:d.jsx(vg,{asChild:!0,trapped:A.open,onMountAutoFocus:ae=>{ae.preventDefault()},onUnmountAutoFocus:Ce(i,ae=>{var he;(he=A.trigger)==null||he.focus({preventScroll:!0}),ae.preventDefault()}),children:d.jsx(gg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:ae=>ae.preventDefault(),onDismiss:()=>A.onOpenChange(!1),children:d.jsx(ge,{role:"listbox",id:A.contentId,"data-state":A.open?"open":"closed",dir:A.dir,onContextMenu:ae=>ae.preventDefault(),...S,...be,onPlaced:()=>Y(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:Ce(S.onKeyDown,ae=>{const he=ae.ctrlKey||ae.altKey||ae.metaKey;if(ae.key==="Tab"&&ae.preventDefault(),!he&&ae.key.length===1&&$(ae.key),["ArrowUp","ArrowDown","Home","End"].includes(ae.key)){let le=L().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);if(["ArrowUp","End"].includes(ae.key)&&(le=le.slice().reverse()),["ArrowUp","ArrowDown"].includes(ae.key)){const ce=ae.target,Z=le.indexOf(ce);le=le.slice(Z+1)}setTimeout(()=>z(le)),ae.preventDefault()}})})})})})})});tz.displayName=Pbe;var Nbe="SelectItemAlignedPosition",rz=j.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...i}=e,a=Ha(qo,r),o=Ga(qo,r),[l,c]=j.useState(null),[f,h]=j.useState(null),p=it(t,T=>h(T)),g=Tg(r),v=j.useRef(!1),w=j.useRef(!0),{viewport:y,selectedItem:b,selectedItemText:S,focusSelectedItem:A}=o,_=j.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&f&&y&&b&&S){const T=a.trigger.getBoundingClientRect(),k=f.getBoundingClientRect(),R=a.valueNode.getBoundingClientRect(),F=S.getBoundingClientRect();if(a.dir!=="rtl"){const ce=F.left-k.left,Z=R.left-ce,Se=T.left-Z,we=T.width+Se,ze=Math.max(we,k.width),Ue=window.innerWidth-Nn,Je=p$(Z,[Nn,Math.max(Nn,Ue-ze)]);l.style.minWidth=we+"px",l.style.left=Je+"px"}else{const ce=k.right-F.right,Z=window.innerWidth-R.right-ce,Se=window.innerWidth-T.right-Z,we=T.width+Se,ze=Math.max(we,k.width),Ue=window.innerWidth-Nn,Je=p$(Z,[Nn,Math.max(Nn,Ue-ze)]);l.style.minWidth=we+"px",l.style.right=Je+"px"}const I=g(),L=window.innerHeight-Nn*2,V=y.scrollHeight,Y=window.getComputedStyle(f),K=parseInt(Y.borderTopWidth,10),z=parseInt(Y.paddingTop,10),G=parseInt(Y.borderBottomWidth,10),D=parseInt(Y.paddingBottom,10),q=K+z+V+D+G,Q=Math.min(b.offsetHeight*5,q),$=window.getComputedStyle(y),H=parseInt($.paddingTop,10),re=parseInt($.paddingBottom,10),se=T.top+T.height/2-Nn,ge=L-se,be=b.offsetHeight/2,ae=b.offsetTop+be,he=K+z+ae,ne=q-he;if(he<=se){const ce=I.length>0&&b===I[I.length-1].ref.current;l.style.bottom="0px";const Z=f.clientHeight-y.offsetTop-y.offsetHeight,Se=Math.max(ge,be+(ce?re:0)+Z+G),we=he+Se;l.style.height=we+"px"}else{const ce=I.length>0&&b===I[0].ref.current;l.style.top="0px";const Se=Math.max(se,K+y.offsetTop+(ce?H:0)+be)+ne;l.style.height=Se+"px",y.scrollTop=he-se+y.offsetTop}l.style.margin=`${Nn}px 0`,l.style.minHeight=Q+"px",l.style.maxHeight=L+"px",n==null||n(),requestAnimationFrame(()=>v.current=!0)}},[g,a.trigger,a.valueNode,l,f,y,b,S,a.dir,n]);yr(()=>_(),[_]);const[C,N]=j.useState();yr(()=>{f&&N(window.getComputedStyle(f).zIndex)},[f]);const O=j.useCallback(T=>{T&&w.current===!0&&(_(),A==null||A(),w.current=!1)},[_,A]);return d.jsx(Obe,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:v,onScrollButtonChange:O,children:d.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:d.jsx(Le.div,{...i,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});rz.displayName=Nbe;var Ebe="SelectPopperPosition",gj=j.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=Nn,...a}=e,o=kg(r);return d.jsx(w6,{...o,...a,ref:t,align:n,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});gj.displayName=Ebe;var[Obe,lA]=Yl(qo,{}),vj="SelectViewport",nz=j.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...i}=e,a=Ga(vj,r),o=lA(vj,r),l=it(t,a.onViewportChange),c=j.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),d.jsx(Cg.Slot,{scope:r,children:d.jsx(Le.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ce(i.onScroll,f=>{const h=f.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=o;if(g!=null&&g.current&&p){const v=Math.abs(c.current-h.scrollTop);if(v>0){const w=window.innerHeight-Nn*2,y=parseFloat(p.style.minHeight),b=parseFloat(p.style.height),S=Math.max(y,b);if(S<w){const A=S+v,_=Math.min(w,A),C=A-_;p.style.height=_+"px",p.style.bottom==="0px"&&(h.scrollTop=C>0?C:0,p.style.justifyContent="flex-end")}}}c.current=h.scrollTop})})})]})});nz.displayName=vj;var iz="SelectGroup",[Cbe,Tbe]=Yl(iz),kbe=j.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=Qn();return d.jsx(Cbe,{scope:r,id:i,children:d.jsx(Le.div,{role:"group","aria-labelledby":i,...n,ref:t})})});kbe.displayName=iz;var az="SelectLabel",Mbe=j.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=Tbe(az,r);return d.jsx(Le.div,{id:i.id,...n,ref:t})});Mbe.displayName=az;var cm="SelectItem",[Rbe,oz]=Yl(cm),sz=j.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:a,...o}=e,l=Ha(cm,r),c=Ga(cm,r),f=l.value===n,[h,p]=j.useState(a??""),[g,v]=j.useState(!1),w=it(t,A=>{var _;return(_=c.itemRefCallback)==null?void 0:_.call(c,A,n,i)}),y=Qn(),b=j.useRef("touch"),S=()=>{i||(l.onValueChange(n),l.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Rbe,{scope:r,value:n,disabled:i,textId:y,isSelected:f,onItemTextChange:j.useCallback(A=>{p(_=>_||((A==null?void 0:A.textContent)??"").trim())},[]),children:d.jsx(Cg.ItemSlot,{scope:r,value:n,disabled:i,textValue:h,children:d.jsx(Le.div,{role:"option","aria-labelledby":y,"data-highlighted":g?"":void 0,"aria-selected":f&&g,"data-state":f?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:w,onFocus:Ce(o.onFocus,()=>v(!0)),onBlur:Ce(o.onBlur,()=>v(!1)),onClick:Ce(o.onClick,()=>{b.current!=="mouse"&&S()}),onPointerUp:Ce(o.onPointerUp,()=>{b.current==="mouse"&&S()}),onPointerDown:Ce(o.onPointerDown,A=>{b.current=A.pointerType}),onPointerMove:Ce(o.onPointerMove,A=>{var _;b.current=A.pointerType,i?(_=c.onItemLeave)==null||_.call(c):b.current==="mouse"&&A.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ce(o.onPointerLeave,A=>{var _;A.currentTarget===document.activeElement&&((_=c.onItemLeave)==null||_.call(c))}),onKeyDown:Ce(o.onKeyDown,A=>{var C;((C=c.searchRef)==null?void 0:C.current)!==""&&A.key===" "||(ybe.includes(A.key)&&S(),A.key===" "&&A.preventDefault())})})})})});sz.displayName=cm;var su="SelectItemText",lz=j.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,...a}=e,o=Ha(su,r),l=Ga(su,r),c=oz(su,r),f=Sbe(su,r),[h,p]=j.useState(null),g=it(t,S=>p(S),c.onItemTextChange,S=>{var A;return(A=l.itemTextRefCallback)==null?void 0:A.call(l,S,c.value,c.disabled)}),v=h==null?void 0:h.textContent,w=j.useMemo(()=>d.jsx("option",{value:c.value,disabled:c.disabled,children:v},c.value),[c.disabled,c.value,v]),{onNativeOptionAdd:y,onNativeOptionRemove:b}=f;return yr(()=>(y(w),()=>b(w)),[y,b,w]),d.jsxs(d.Fragment,{children:[d.jsx(Le.span,{id:c.textId,...a,ref:g}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Af.createPortal(a.children,o.valueNode):null]})});lz.displayName=su;var cz="SelectItemIndicator",uz=j.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return oz(cz,r).isSelected?d.jsx(Le.span,{"aria-hidden":!0,...n,ref:t}):null});uz.displayName=cz;var yj="SelectScrollUpButton",fz=j.forwardRef((e,t)=>{const r=Ga(yj,e.__scopeSelect),n=lA(yj,e.__scopeSelect),[i,a]=j.useState(!1),o=it(t,n.onScrollButtonChange);return yr(()=>{if(r.viewport&&r.isPositioned){let l=function(){const f=c.scrollTop>0;a(f)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),i?d.jsx(hz,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});fz.displayName=yj;var xj="SelectScrollDownButton",dz=j.forwardRef((e,t)=>{const r=Ga(xj,e.__scopeSelect),n=lA(xj,e.__scopeSelect),[i,a]=j.useState(!1),o=it(t,n.onScrollButtonChange);return yr(()=>{if(r.viewport&&r.isPositioned){let l=function(){const f=c.scrollHeight-c.clientHeight,h=Math.ceil(c.scrollTop)<f;a(h)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),i?d.jsx(hz,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});dz.displayName=xj;var hz=j.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...i}=e,a=Ga("SelectScrollButton",r),o=j.useRef(null),l=Tg(r),c=j.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return j.useEffect(()=>()=>c(),[c]),yr(()=>{var h;const f=l().find(p=>p.ref.current===document.activeElement);(h=f==null?void 0:f.ref.current)==null||h.scrollIntoView({block:"nearest"})},[l]),d.jsx(Le.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ce(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:Ce(i.onPointerMove,()=>{var f;(f=a.onItemLeave)==null||f.call(a),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:Ce(i.onPointerLeave,()=>{c()})})}),Ibe="SelectSeparator",Dbe=j.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return d.jsx(Le.div,{"aria-hidden":!0,...n,ref:t})});Dbe.displayName=Ibe;var bj="SelectArrow",$be=j.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=kg(r),a=Ha(bj,r),o=Ga(bj,r);return a.open&&o.position==="popper"?d.jsx(S6,{...i,...n,ref:t}):null});$be.displayName=bj;var Lbe="SelectBubbleInput",pz=j.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const i=j.useRef(null),a=it(n,i),o=oA(t);return j.useEffect(()=>{const l=i.current;if(!l)return;const c=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&h){const p=new Event("change",{bubbles:!0});h.call(l,t),l.dispatchEvent(p)}},[o,t]),d.jsx(Le.select,{...r,style:{...W8,...r.style},ref:a,defaultValue:t})});pz.displayName=Lbe;function mz(e){return e===""||e===void 0}function gz(e){const t=ai(e),r=j.useRef(""),n=j.useRef(0),i=j.useCallback(o=>{const l=r.current+o;t(l),function c(f){r.current=f,window.clearTimeout(n.current),f!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),a=j.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return j.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,a]}function vz(e,t,r){const i=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let o=Bbe(e,Math.max(a,0));i.length===1&&(o=o.filter(f=>f!==r));const c=o.find(f=>f.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==r?c:void 0}function Bbe(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Fbe=H8,zbe=K8,Vbe=X8,Ube=Z8,qbe=Q8,Wbe=J8,Hbe=nz,Gbe=sz,Kbe=lz,Ybe=uz,Xbe=fz,Zbe=dz;function Qbe({...e}){return d.jsx(Fbe,{"data-slot":"select",...e})}function Jbe({...e}){return d.jsx(Vbe,{"data-slot":"select-value",...e})}function ewe({className:e,size:t="default",children:r,...n}){return d.jsxs(zbe,{"data-slot":"select-trigger","data-size":t,className:We("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[r,d.jsx(Ube,{asChild:!0,children:d.jsx(kj,{className:"size-4 opacity-50"})})]})}function twe({className:e,children:t,position:r="popper",...n}){return d.jsx(qbe,{children:d.jsxs(Wbe,{"data-slot":"select-content",className:We("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[d.jsx(rwe,{}),d.jsx(Hbe,{className:We("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),d.jsx(nwe,{})]})})}function r1({className:e,children:t,...r}){return d.jsxs(Gbe,{"data-slot":"select-item",className:We("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(Ybe,{children:d.jsx(Tj,{className:"size-4"})})}),d.jsx(Kbe,{children:t})]})}function rwe({className:e,...t}){return d.jsx(Xbe,{"data-slot":"select-scroll-up-button",className:We("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(V$,{className:"size-4"})})}function nwe({className:e,...t}){return d.jsx(Zbe,{"data-slot":"select-scroll-down-button",className:We("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(kj,{className:"size-4"})})}var cA="Radio",[iwe,yz]=mn(cA),[awe,owe]=iwe(cA),xz=j.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:i=!1,required:a,disabled:o,value:l="on",onCheck:c,form:f,...h}=e,[p,g]=j.useState(null),v=it(t,b=>g(b)),w=j.useRef(!1),y=p?f||!!p.closest("form"):!0;return d.jsxs(awe,{scope:r,checked:i,disabled:o,children:[d.jsx(Le.button,{type:"button",role:"radio","aria-checked":i,"data-state":jz(i),"data-disabled":o?"":void 0,disabled:o,value:l,...h,ref:v,onClick:Ce(e.onClick,b=>{i||c==null||c(),y&&(w.current=b.isPropagationStopped(),w.current||b.stopPropagation())})}),y&&d.jsx(Sz,{control:p,bubbles:!w.current,name:n,value:l,checked:i,required:a,disabled:o,form:f,style:{transform:"translateX(-100%)"}})]})});xz.displayName=cA;var bz="RadioIndicator",wz=j.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...i}=e,a=owe(bz,r);return d.jsx(Fn,{present:n||a.checked,children:d.jsx(Le.span,{"data-state":jz(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t})})});wz.displayName=bz;var swe="RadioBubbleInput",Sz=j.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...i},a)=>{const o=j.useRef(null),l=it(o,a),c=oA(r),f=WP(t);return j.useEffect(()=>{const h=o.current;if(!h)return;const p=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==r&&v){const w=new Event("click",{bubbles:n});v.call(h,r),h.dispatchEvent(w)}},[c,r,n]),d.jsx(Le.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:l,style:{...i.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Sz.displayName=swe;function jz(e){return e?"checked":"unchecked"}var lwe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Mg="RadioGroup",[cwe,_1e]=mn(Mg,[Cl,yz]),_z=Cl(),Pz=yz(),[uwe,fwe]=cwe(Mg),Az=j.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:i,value:a,required:o=!1,disabled:l=!1,orientation:c,dir:f,loop:h=!0,onValueChange:p,...g}=e,v=_z(r),w=Tf(f),[y,b]=Ra({prop:a,defaultProp:i??null,onChange:p,caller:Mg});return d.jsx(uwe,{scope:r,name:n,required:o,disabled:l,value:y,onValueChange:b,children:d.jsx(Gj,{asChild:!0,...v,orientation:c,dir:w,loop:h,children:d.jsx(Le.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":l?"":void 0,dir:w,...g,ref:t})})})});Az.displayName=Mg;var Nz="RadioGroupItem",Ez=j.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...i}=e,a=fwe(Nz,r),o=a.disabled||n,l=_z(r),c=Pz(r),f=j.useRef(null),h=it(t,f),p=a.value===i.value,g=j.useRef(!1);return j.useEffect(()=>{const v=y=>{lwe.includes(y.key)&&(g.current=!0)},w=()=>g.current=!1;return document.addEventListener("keydown",v),document.addEventListener("keyup",w),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keyup",w)}},[]),d.jsx(Kj,{asChild:!0,...l,focusable:!o,active:p,children:d.jsx(xz,{disabled:o,required:a.required,checked:p,...c,...i,name:a.name,ref:h,onCheck:()=>a.onValueChange(i.value),onKeyDown:Ce(v=>{v.key==="Enter"&&v.preventDefault()}),onFocus:Ce(i.onFocus,()=>{var v;g.current&&((v=f.current)==null||v.click())})})})});Ez.displayName=Nz;var dwe="RadioGroupIndicator",Oz=j.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,i=Pz(r);return d.jsx(wz,{...i,...n,ref:t})});Oz.displayName=dwe;var hwe=Az,pwe=Ez,mwe=Oz;function um({className:e,...t}){return d.jsx(hwe,{"data-slot":"radio-group",className:We("grid gap-3",e),...t})}function qs({className:e,...t}){return d.jsx(pwe,{"data-slot":"radio-group-item",className:We("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:d.jsx(mwe,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:d.jsx(k7,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}const Cz=()=>{const e=pn(),[t,r]=j.useState(!1),[n,i]=j.useState([]),[a,o]=j.useState(!1),[l,c]=j.useState(!1),f=()=>{c(!1),R()},h=z=>{e(`/admin/migrants/edit/${z}?mode=edit`)},[p,g]=j.useState(!1),{migrants:v,loading:w,currentPage:y,totalPages:b,searchFullName:S,searchOccupation:A,filters:_,selectedMigrants:C,setCurrentPage:N,setSearchFullName:O,setSearchOccupation:T,setFilters:k,handleSearch:R,resetFilters:F,toggleSelectMigrant:I,toggleSelectAll:L,isAllSelected:V,handleBulkDelete:Y,refetchMigrants:K}=rbe(p?1e3:10);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(et,{className:"border border-gray-800 bg-gray-900 shadow-2xl overflow-hidden",children:[d.jsx(Mn,{className:"pb-3 border-b border-gray-800",children:d.jsxs(Rn,{className:"text-md font-medium flex justify-between items-center text-white",children:["Search & Filters",d.jsxs(ql,{open:l,onOpenChange:c,children:[d.jsx(T8,{asChild:!0,children:d.jsxs(Me,{size:"icon",className:"border-gray-700 text-gray-300 hover:bg-gray-900 hover:text-white bg-gray-800",children:[d.jsx(z7,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Advanced filters"})]})}),d.jsxs(Wl,{className:"sm:max-w-[425px] bg-gray-900 border-gray-800",children:[d.jsxs(Hl,{children:[d.jsx(Gl,{className:"text-white",children:"Advanced Filters"}),d.jsx(Kl,{className:"text-gray-400",children:"Set sorting options and filters for the migrants list."})]}),d.jsxs("div",{className:"grid gap-4 py-4",children:[d.jsxs("div",{className:"grid gap-2",children:[d.jsx(ht,{htmlFor:"sort-by",className:"text-gray-300",children:"Sort By"}),d.jsxs(Qbe,{value:_.sort_by,onValueChange:z=>k({..._,sort_by:z}),children:[d.jsx(ewe,{id:"sort-by",className:"bg-gray-800 border-gray-700 text-white",children:d.jsx(Jbe,{placeholder:"Select field"})}),d.jsxs(twe,{className:"bg-gray-800 border-gray-700",children:[d.jsx(r1,{value:"full_name",className:"text-white hover:bg-gray-700",children:"Full Name"}),d.jsx(r1,{value:"occupation",className:"text-white hover:bg-gray-700",children:"Occupation"}),d.jsx(r1,{value:"arrival_date",className:"text-white hover:bg-gray-700",children:"Arrival Date"})]})]})]}),d.jsxs("div",{className:"grid gap-2",children:[d.jsx(ht,{className:"text-gray-300",children:"Alphabetical Order"}),d.jsxs(um,{value:_.alphabetical_order,onValueChange:z=>k({..._,alphabetical_order:z}),className:"flex gap-4",children:[d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx(qs,{value:"asc",id:"asc",className:"border-gray-600 text-[#9B2335]"}),d.jsx(ht,{htmlFor:"asc",className:"text-gray-300",children:"A-Z"})]}),d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx(qs,{value:"desc",id:"desc",className:"border-gray-600 text-[#9B2335]"}),d.jsx(ht,{htmlFor:"desc",className:"text-gray-300",children:"Z-A"})]})]})]}),_.sort_by==="arrival_date"&&d.jsxs("div",{className:"grid gap-2",children:[d.jsx(ht,{className:"text-gray-300",children:"Arrival Date Order"}),d.jsxs(um,{value:_.arrival_order==="desc"?"newest":"oldest",onValueChange:z=>k(G=>({...G,sort_by:"arrival_date",arrival_order:z==="newest"?"desc":"asc"})),className:"flex gap-4",children:[d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx(qs,{value:"newest",id:"newest",className:"border-gray-600 text-[#9B2335]"}),d.jsx(ht,{htmlFor:"newest",className:"text-gray-300",children:"Newest First"})]}),d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx(qs,{value:"oldest",id:"oldest",className:"border-gray-600 text-[#9B2335]"}),d.jsx(ht,{htmlFor:"oldest",className:"text-gray-300",children:"Oldest First"})]})]})]}),d.jsxs("div",{className:"grid gap-2",children:[d.jsx(ht,{htmlFor:"arrival-from",className:"text-gray-300",children:"Arrival Date Range"}),d.jsxs("div",{className:"flex gap-2 items-center",children:[d.jsxs("div",{className:"relative flex-1",children:[d.jsx(ks,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500"}),d.jsx(Ot,{id:"arrival-from",type:"date",placeholder:"From",value:_.arrival_from,onChange:z=>k({..._,arrival_from:z.target.value}),className:"pl-8 bg-gray-800 border-gray-700 text-white focus:border-[#9B2335]"})]}),d.jsx("span",{className:"text-gray-400",children:"to"}),d.jsxs("div",{className:"relative flex-1",children:[d.jsx(ks,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500"}),d.jsx(Ot,{type:"date",placeholder:"To",value:_.arrival_to,onChange:z=>k({..._,arrival_to:z.target.value}),className:"pl-8 bg-gray-800 border-gray-700 text-white focus:border-[#9B2335]"})]})]})]})]}),d.jsxs("div",{className:"flex justify-end gap-2",children:[d.jsx(Me,{variant:"outline",onClick:()=>c(!1),className:"border-gray-700 text-gray-300 hover:bg-gray-800 bg-gray-800",children:"Cancel"}),d.jsx(Me,{onClick:f,className:"bg-[#9B2335] hover:bg-[#9B2335]/80",children:"Apply Filters"})]})]})]})]})}),d.jsx(tt,{className:"p-6",children:d.jsxs("div",{className:"flex flex-wrap gap-4",children:[d.jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[d.jsx(Pu,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500"}),d.jsx(Ot,{type:"text",placeholder:"Search Full Name",value:S,onChange:z=>O(z.target.value),onKeyDown:z=>z.key==="Enter"&&R(),className:"pl-8 bg-gray-800 border-gray-700 text-white placeholder:text-gray-500 focus:border-[#9B2335]"})]}),d.jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[d.jsx(Pu,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500"}),d.jsx(Ot,{type:"text",placeholder:"Search Occupation",value:A,onChange:z=>T(z.target.value),onKeyDown:z=>z.key==="Enter"&&R(),onBlur:()=>A.trim()!==""&&R(),className:"pl-8 bg-gray-800 border-gray-700 text-white placeholder:text-gray-500 focus:border-[#9B2335]"})]}),d.jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[d.jsx(ks,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500"}),d.jsx(Ot,{type:"date",placeholder:"Arrival From",value:_.arrival_from||"",onChange:z=>k({..._,arrival_from:z.target.value}),className:"pl-8 bg-gray-800 border-gray-700 text-white focus:border-[#9B2335]"})]}),d.jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[d.jsx(ks,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500"}),d.jsx(Ot,{type:"date",placeholder:"Arrival To",value:_.arrival_to||"",onChange:z=>k({..._,arrival_to:z.target.value}),className:"pl-8 bg-gray-800 border-gray-700 text-white focus:border-[#9B2335]"})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx(Me,{onClick:R,className:"whitespace-nowrap bg-[#9B2335] hover:bg-[#9B2335]/90",children:"Apply Filters"}),d.jsxs(Me,{variant:"outline",onClick:F,className:"whitespace-nowrap border-gray-700 text-gray-300 hover:bg-gray-800 bg-gray-900",children:[d.jsx(Ma,{className:"mr-1 h-4 w-4"})," Reset"]})]})]})})]}),C.length>0&&d.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[d.jsxs("span",{className:"text-sm font-medium text-gray-400",children:[C.length," migrants selected"]}),d.jsxs(Me,{variant:"destructive",size:"sm",className:"ml-auto bg-red-600 hover:bg-red-700",onClick:()=>{o(!0),i(C.map(z=>z.toString())),r(!0)},children:[d.jsx(Au,{className:"mr-1 h-4 w-4"})," Delete Selected"]})]}),d.jsx(et,{className:"border border-gray-800 bg-gray-900 shadow-2xl py-0",children:d.jsx(tt,{className:"p-0",children:w?d.jsx("div",{className:"flex justify-center items-center h-64",children:d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#9B2335]"})}):d.jsx("div",{className:"overflow-x-auto",children:d.jsxs(lbe,{children:[d.jsx(cbe,{children:d.jsxs(d$,{className:"bg-gray-800/50 hover:bg-gray-800/50 border-b border-gray-800",children:[d.jsx(xa,{className:"w-[50px] text-center text-gray-300",children:d.jsx(h$,{checked:V,onCheckedChange:L,className:"border-gray-600 data-[state=checked]:bg-[#9B2335] data-[state=checked]:border-[#9B2335]"})}),d.jsx(xa,{className:"text-gray-300",children:"ID"}),d.jsx(xa,{className:"text-gray-300",children:"Full Name"}),d.jsx(xa,{className:"text-gray-300",children:"Date of Birth"}),d.jsx(xa,{className:"text-gray-300",children:"Place of Birth"}),d.jsx(xa,{className:"text-gray-300",children:"Occupation"}),d.jsx(xa,{className:"text-gray-300",children:"Date of Arrival NT"}),d.jsx(xa,{className:"text-right text-gray-300",children:"Actions"})]})}),d.jsx(ube,{children:v.map(z=>{var q;const G=z.person_id!==void 0&&typeof z.person_id=="number"&&C.includes(z.person_id),D=z.person_id!==void 0&&typeof z.person_id=="number"&&!isNaN(z.person_id);return d.jsxs(d$,{className:`border-b border-gray-800 hover:bg-gray-800/30 ${G?"bg-[#9B2335]/10":""}`,children:[d.jsx(ba,{className:"text-center",children:d.jsx(h$,{checked:G,onCheckedChange:()=>I(z.person_id),disabled:!D,className:"border-gray-600 data-[state=checked]:bg-[#9B2335] data-[state=checked]:border-[#9B2335]"})}),d.jsx(ba,{className:"font-medium text-white",children:z.person_id??"—"}),d.jsx(ba,{className:"text-gray-300",children:z.full_name??"—"}),d.jsx(ba,{className:"text-gray-300",children:Ni(z.date_of_birth??"—")}),d.jsx(ba,{className:"text-gray-300",children:z.place_of_birth??"—"}),d.jsx(ba,{className:"text-gray-300",children:z.occupation??"—"}),d.jsx(ba,{className:"text-gray-300",children:Ni(((q=z.migration)==null?void 0:q.date_of_arrival_nt)??"—")}),d.jsx(ba,{className:"text-right",children:d.jsxs("div",{className:"flex justify-end gap-2",children:[d.jsxs(Me,{variant:"ghost",size:"sm",className:"h-8 px-2 text-blue-400 hover:text-blue-300 hover:bg-blue-900/20",onClick:()=>h(z.person_id),children:[d.jsx(eW,{className:"w-4 h-4 mr-1"})," Edit"]}),d.jsxs(Me,{variant:"ghost",size:"sm",className:"h-8 px-2 text-red-400 hover:text-red-300 hover:bg-red-900/20",onClick:()=>{z.person_id&&(o(!1),i([z.person_id.toString()]),r(!0))},children:[d.jsx(Au,{className:"w-4 h-4 mr-1"})," Delete"]})]})})]},z.person_id)})})]})})})}),d.jsxs("div",{className:"flex justify-center items-center gap-3 py-2",children:[d.jsx(Me,{variant:"outline",size:"sm",onClick:()=>N(z=>Math.max(z-1,1)),disabled:y===1||p,className:"border-gray-700 text-gray-300 hover:bg-gray-800 hover:text-white disabled:opacity-50 bg-gray-900",children:"Previous"}),d.jsx("span",{className:"text-sm font-medium text-white",children:p?"Showing all records":`Page ${y} of ${b}`}),d.jsx(Me,{variant:"outline",size:"sm",onClick:()=>N(z=>Math.min(z+1,b)),disabled:y===b||p,className:"border-gray-700 text-gray-300 hover:bg-gray-800 hover:text-white disabled:opacity-50 bg-gray-900",children:"Next"}),d.jsx(Me,{variant:p?"default":"outline",size:"sm",onClick:()=>{g(!p),p||N(1),K()},className:`${p?"bg-[#9B2335] hover:bg-[#9B2335]/90":"border-gray-700 bg-gray-900"} text-white hover:bg-gray-800 hover:text-white shadow-sm`,children:p?"Show Paged":"Show All"})]}),d.jsx(sbe,{open:t,onOpenChange:r,bulkDelete:a,selectedCount:n.length,ids:n,onDeleteSuccess:Y})]})};function gwe(){return d.jsxs("div",{className:"flex min-h-dvh bg-gray-950",children:[d.jsx(Di,{}),d.jsxs("div",{className:"flex-1 md:ml-16 lg:ml-64",children:[d.jsx(Ii,{title:"Migrants Management"}),d.jsxs("main",{className:"p-4 md:p-6",children:[d.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center mb-6 gap-4",children:[d.jsx("h1",{className:"text-2xl text-white md:text-3xl font-serif font-bold text-neutral-800",children:"Migrants Database"}),d.jsx(Ge,{to:"/admin/migrants/add",children:d.jsxs(Me,{className:"bg-gradient-to-r from-green-700 to-green-600 hover:from-green-800 hover:to-green-700 shadow-md",children:[d.jsx(Mj,{className:"mr-2 size-4"})," Add New Migrant"]})})]}),d.jsx(Cz,{})]})]})]})}function vwe({className:e,...t}){return d.jsx("textarea",{"data-slot":"textarea",className:We("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}var uA="Progress",fA=100,[ywe,P1e]=mn(uA),[xwe,bwe]=ywe(uA),Tz=j.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:i,getValueLabel:a=wwe,...o}=e;(i||i===0)&&!m$(i)&&console.error(Swe(`${i}`,"Progress"));const l=m$(i)?i:fA;n!==null&&!g$(n,l)&&console.error(jwe(`${n}`,"Progress"));const c=g$(n,l)?n:null,f=fm(c)?a(c,l):void 0;return d.jsx(xwe,{scope:r,value:c,max:l,children:d.jsx(Le.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":fm(c)?c:void 0,"aria-valuetext":f,role:"progressbar","data-state":Rz(c,l),"data-value":c??void 0,"data-max":l,...o,ref:t})})});Tz.displayName=uA;var kz="ProgressIndicator",Mz=j.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,i=bwe(kz,r);return d.jsx(Le.div,{"data-state":Rz(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...n,ref:t})});Mz.displayName=kz;function wwe(e,t){return`${Math.round(e/t*100)}%`}function Rz(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function fm(e){return typeof e=="number"}function m$(e){return fm(e)&&!isNaN(e)&&e>0}function g$(e,t){return fm(e)&&!isNaN(e)&&e<=t&&e>=0}function Swe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${fA}\`.`}function jwe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
||
- a positive number
|
||
- less than the value passed to \`max\` (or ${fA} if no \`max\` prop is set)
|
||
- \`null\` or \`undefined\` if the progress is indeterminate.
|
||
|
||
Defaulting to \`null\`.`}var _we=Tz,Pwe=Mz;function Awe({className:e,value:t,...r}){return d.jsx(_we,{"data-slot":"progress",className:We("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",e),...r,children:d.jsx(Pwe,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}const Nwe=X$("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function lu({className:e,variant:t,asChild:r=!1,...n}){const i=r?K$:"span";return d.jsx(i,{"data-slot":"badge",className:We(Nwe({variant:t}),e),...n})}function Ewe({open:e,onOpenChange:t,onConfirm:r,isSubmitting:n}){return d.jsx(ql,{open:e,onOpenChange:t,children:d.jsxs(Wl,{className:"sm:max-w-md",children:[d.jsxs(Hl,{children:[d.jsx(Gl,{className:"text-xl font-serif text-green-600",children:"Confirm New Migrant"}),d.jsx(Kl,{children:"Are you sure you want to add this new migrant to the database?"})]}),d.jsx("div",{className:"py-4",children:d.jsx("p",{className:"text-neutral-600",children:"Please verify the information before confirming. Once added, you can edit the record later if needed."})}),d.jsxs(Xf,{className:"flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2",children:[d.jsx(Me,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),n?d.jsxs(Me,{variant:"default",onClick:r,children:[d.jsx(H$,{className:"mr-2 size-4 animate-spin"})," Processing..."]}):d.jsxs(Me,{variant:"default",onClick:r,children:[d.jsx(Tj,{className:"mr-2 size-4"})," Confirm"]})]})]})})}function Owe({open:e,onOpenChange:t,onConfirm:r,isSubmitting:n}){return d.jsx(ql,{open:e,onOpenChange:t,children:d.jsxs(Wl,{className:"sm:max-w-md",children:[d.jsxs(Hl,{children:[d.jsx(Gl,{className:"text-xl font-serif text-blue-600",children:"Confirm Update"}),d.jsx(Kl,{children:"Are you sure you want to update this migrant's information?"})]}),d.jsx("div",{className:"py-4",children:d.jsx("p",{className:"text-neutral-600",children:"Double-check the changes before confirming. This will overwrite the current data."})}),d.jsxs(Xf,{className:"flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2",children:[d.jsx(Me,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),n?d.jsxs(Me,{variant:"default",onClick:r,children:[d.jsx(H$,{className:"mr-2 size-4 animate-spin"})," Processing..."]}):d.jsxs(Me,{variant:"default",onClick:r,children:[d.jsx(Ij,{className:"mr-2 size-4"})," Update"]})]})]})})}const Cwe=({person:e,setPerson:t,renderFormField:r})=>d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[r("Surname",e.surname,n=>t({...e,surname:n}),"text","Enter surname",!0),r("Christian Name",e.christian_name,n=>t({...e,christian_name:n}),"text","Enter first name",!0),r("Date of Birth",e.date_of_birth,n=>t({...e,date_of_birth:n}),"date"),r("Place of Birth",e.place_of_birth,n=>t({...e,place_of_birth:n})),r("Date of Death",e.date_of_death,n=>t({...e,date_of_death:n}),"date"),r("Occupation",e.occupation,n=>t({...e,occupation:n})),d.jsx("div",{className:"md:col-span-2",children:r("Additional Notes",e.additional_notes,n=>t({...e,additional_notes:n}),"textarea","Enter any additional notes or comments")}),r("Reference",e.reference,n=>t({...e,reference:n})),r("ID Card Number",e.id_card_no,n=>t({...e,id_card_no:n}))]}),Twe=({migration:e,setMigration:t,renderFormField:r})=>d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[r("Date of Arrival in Australia",e.date_of_arrival_aus,n=>t({...e,date_of_arrival_aus:n}),"date"),r("Date of Arrival in NT",e.date_of_arrival_nt,n=>t({...e,date_of_arrival_nt:n}),"date"),r("Arrival Period",e.arrival_period,n=>t({...e,arrival_period:n})),r("Data Source",e.data_source,n=>t({...e,data_source:n}))]}),kwe=({naturalization:e,setNaturalization:t,renderFormField:r})=>d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[r("Date of Naturalisation",e.date_of_naturalisation,n=>t({...e,date_of_naturalisation:n}),"date"),r("Certificate Number",e.no_of_cert,n=>t({...e,no_of_cert:n})),d.jsx("div",{className:"md:col-span-2",children:r("Issued At",e.issued_at,n=>t({...e,issued_at:n}))})]}),Mwe=({residence:e,setResidence:t,renderFormField:r})=>d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[r("Town or City",e.town_or_city,n=>t({...e,town_or_city:n})),r("Home at Death",e.home_at_death,n=>t({...e,home_at_death:n}))]}),Rwe=({family:e,setFamily:t,renderFormField:r})=>d.jsxs("div",{className:"space-y-6",children:[r("Names of Parents",e.names_of_parents,n=>t({...e,names_of_parents:n}),"textarea","Enter parent names (one per line or separated by commas)"),r("Names of Children",e.names_of_children,n=>t({...e,names_of_children:n}),"textarea","Enter children names (one per line or separated by commas)")]}),Iwe=({internment:e,setInternment:t,renderFormField:r})=>d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[r("Corps Issued",e.corps_issued,n=>t({...e,corps_issued:n})),r("Interned In",e.interned_in,n=>t({...e,interned_in:n})),r("Sent To",e.sent_to,n=>t({...e,sent_to:n})),r("Internee Occupation",e.internee_occupation,n=>t({...e,internee_occupation:n})),d.jsx("div",{className:"md:col-span-2",children:r("Internee Address",e.internee_address,n=>t({...e,internee_address:n}))}),r("CAV",e.cav,n=>t({...e,cav:n}))]}),Dwe=({photos:e,photoPreviews:t,captions:r,existingPhotos:n,mainPhotoIndex:i,API_BASE_URL:a,handlePhotoChange:o,removeExistingPhoto:l,removeNewPhoto:c,setCaptions:f,setMainPhotoIndex:h})=>d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-8 text-center hover:border-gray-400 transition-colors",children:[d.jsx(Ay,{className:"mx-auto h-12 w-12 text-gray-400 mb-4"}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(ht,{htmlFor:"photo-upload",className:"text-lg font-medium text-gray-700 cursor-pointer",children:"Upload Photos & Documents"}),d.jsx("p",{className:"text-sm text-gray-500",children:"Select multiple files to upload. Supported formats: JPG, PNG, PDF"}),d.jsx(Ot,{id:"photo-upload",type:"file",multiple:!0,accept:"image/*",onChange:o,className:"hidden"}),d.jsxs(Me,{variant:"outline",className:"mt-4",onClick:()=>{var p;return(p=document.getElementById("photo-upload"))==null?void 0:p.click()},children:[d.jsx(Ay,{className:"w-4 h-4 mr-2"}),"Choose Files"]})]})]}),n.length>0&&d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(W$,{className:"w-5 h-5 text-gray-600"}),d.jsx("h3",{className:"text-lg font-medium text-white",children:"Existing Photos"}),d.jsx(lu,{variant:"secondary",children:n.length})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:n.map((p,g)=>d.jsxs(et,{className:"overflow-hidden",children:[d.jsxs("div",{className:"relative",children:[d.jsx("img",{src:`${a}${p.file_path}`,alt:`Existing ${g}`,className:"w-full h-48 object-cover"}),i===g&&d.jsx(lu,{className:"absolute top-2 left-2 bg-green-600",children:"Main Photo"}),d.jsx(Me,{variant:"destructive",size:"sm",className:"absolute top-2 right-2",onClick:()=>l(g),children:d.jsx(Ma,{className:"w-4 h-4"})})]}),d.jsxs(tt,{className:"p-4 space-y-3",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(ht,{htmlFor:`caption-existing-${g}`,className:"text-sm font-medium",children:"Caption"}),d.jsx(Ot,{id:`caption-existing-${g}`,placeholder:"Enter photo caption",value:typeof r[g]=="string"?r[g]:"",onChange:v=>f(w=>{const y=[...w];return y[g]=v.target.value,y}),className:"text-sm"})]}),d.jsx(um,{value:i===g?"main":"",onValueChange:()=>h(g),children:d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx(qs,{value:"main",id:`main-existing-${g}`}),d.jsx(ht,{htmlFor:`main-existing-${g}`,className:"text-sm",children:"Set as main photo"})]})})]})]},`existing-${p.id}`))})]}),e.length>0&&d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Ay,{className:"w-5 h-5 text-gray-600"}),d.jsx("h3",{className:"text-lg font-medium text-white",children:"New Photos"}),d.jsx(lu,{variant:"secondary",children:e.length})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:e.map((p,g)=>{const v=n.length+g;return d.jsxs(et,{className:"overflow-hidden",children:[d.jsxs("div",{className:"relative",children:[d.jsx("img",{src:t[g]||"/assets/placeholder.svg",alt:`Preview ${g}`,className:"w-full h-48 object-cover"}),i===v&&d.jsx(lu,{className:"absolute top-2 left-2 bg-green-600",children:"Main Photo"}),d.jsx(Me,{variant:"destructive",size:"sm",className:"absolute top-2 right-2",onClick:()=>c(v),children:d.jsx(Ma,{className:"w-4 h-4"})})]}),d.jsxs(tt,{className:"p-4 space-y-3",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(ht,{htmlFor:`caption-new-${g}`,className:"text-sm font-medium",children:"Caption"}),d.jsx(Ot,{id:`caption-new-${g}`,placeholder:"Enter photo caption",value:r[v]??"",onChange:w=>f(y=>{const b=[...y];return b[v]=w.target.value,b}),className:"text-sm"})]}),d.jsx(um,{value:i===v?"main":"",onValueChange:()=>h(v),children:d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx(qs,{value:"main",id:`main-new-${g}`}),d.jsx(ht,{htmlFor:`main-new-${g}`,className:"text-sm",children:"Set as main photo"})]})})]})]},`new-${g}`)})})]})]}),$we="http://localhost:8000",wa=["Person Details","Migration Info","Naturalization","Residence","Family","Internment","Photos"],Lwe=["Basic personal details and identification information","Immigration and arrival information in Australia","Citizenship and naturalization records","Residential history and location details","Family members and relationship information","Internment and detention records","Upload photos and supporting documents"],Bwe=[hr,_u,Rj,mm,gm,G$,F$],Iz=()=>{const{id:e}=Pj(),t=pn(),r=!!e,[n,i]=j.useState(0),[a,o]=j.useState(!1),[l,c]=j.useState(!1),[f,h]=j.useState(!1),[p,g]=j.useState(!1),[v,w]=j.useState(!1),y=()=>({surname:"",christian_name:"",date_of_birth:"",place_of_birth:"",date_of_death:"",occupation:"",additional_notes:"",reference:"",id_card_no:"",person_id:0}),b=()=>({date_of_arrival_aus:"",date_of_arrival_nt:"",arrival_period:"",data_source:""}),S=()=>({date_of_naturalisation:"",no_of_cert:"",issued_at:""}),A=()=>({town_or_city:"",home_at_death:""}),_=()=>({names_of_parents:"",names_of_children:""}),C=()=>({corps_issued:"",interned_in:"",sent_to:"",internee_occupation:"",internee_address:"",cav:""}),[N,O]=j.useState(y()),[T,k]=j.useState(b()),[R,F]=j.useState(S()),[I,L]=j.useState(A()),[V,Y]=j.useState(_()),[K,z]=j.useState(C()),[G,D]=j.useState([]),[q,Q]=j.useState([]),[$,H]=j.useState([]),[re,se]=j.useState(null),[ge,be]=j.useState([]);j.useEffect(()=>{r&&e&&!l&&he()},[e,r,l]);const ae=ye=>{if(!ye)return"";try{return new Date(ye).toISOString().split("T")[0]}catch(xe){return console.error("Error formatting date:",xe),""}},he=async()=>{try{o(!0);const ye=Number.parseInt(e,10);if(isNaN(ye))throw new Error("Invalid person ID");const xe=await At.getMigrantById(ye);if(O({surname:xe.surname||"",christian_name:xe.christian_name||"",date_of_birth:ae(xe.date_of_birth),place_of_birth:xe.place_of_birth||"",date_of_death:ae(xe.date_of_death),occupation:xe.occupation||"",additional_notes:xe.additional_notes||"",reference:xe.reference||"",id_card_no:xe.id_card_no||"",person_id:xe.person_id||0}),xe.migration&&k({date_of_arrival_aus:ae(xe.migration.date_of_arrival_aus),date_of_arrival_nt:ae(xe.migration.date_of_arrival_nt),arrival_period:xe.migration.arrival_period||"",data_source:xe.migration.data_source||""}),xe.naturalization&&F({date_of_naturalisation:ae(xe.naturalization.date_of_naturalisation),no_of_cert:xe.naturalization.no_of_cert||"",issued_at:xe.naturalization.issued_at||""}),xe.residence&&L({town_or_city:xe.residence.town_or_city||"",home_at_death:xe.residence.home_at_death||""}),xe.family&&Y({names_of_parents:xe.family.names_of_parents||"",names_of_children:xe.family.names_of_children||""}),xe.internment&&z({corps_issued:xe.internment.corps_issued||"",interned_in:xe.internment.interned_in||"",sent_to:xe.internment.sent_to||"",internee_occupation:xe.internment.internee_occupation||"",internee_address:xe.internment.internee_address||"",cav:xe.internment.cav||""}),xe.photos&&Array.isArray(xe.photos)&&xe.photos.length>0){const Ke=xe.photos;be(Ke);const pe=Ke.map(ot=>ot.caption||"");H(pe);const _e=Ke.findIndex(ot=>ot.is_profile_photo);_e!==-1&&se(_e)}c(!0)}catch(ye){console.error("Error loading migrant data:",ye),mj("Failed to load migrant data for editing.")}finally{o(!1)}},ne=()=>{O(y()),k(b()),F(S()),L(A()),Y(_()),z(C()),D([]),Q([]),H([]),se(null),be([]),c(!1)},le=ye=>{if(ye.target.files&&ye.target.files.length>0){const xe=Array.from(ye.target.files);D(pe=>[...pe,...xe]);const Ke=xe.map(pe=>URL.createObjectURL(pe));Q(pe=>[...pe,...Ke]),H(pe=>{const _e=[...pe];for(let ot=0;ot<xe.length;ot++)_e.push("");return _e}),re===null&&(ge.length>0||xe.length>0)&&se(0)}ye.target.value=""},ce=ye=>{const xe=re===ye;be(Ke=>Ke.filter((pe,_e)=>_e!==ye)),H(Ke=>{const pe=[...Ke];return pe.splice(ye,1),pe}),xe?ge.length-1+G.length>0?se(0):se(null):re!==null&&re>ye&&se(re-1)},Z=ye=>{const xe=ge.length+ye,Ke=re===xe;D(pe=>pe.filter((_e,ot)=>ot!==ye)),Q(pe=>pe.filter((_e,ot)=>ot!==ye)),H(pe=>{const _e=[...pe];return _e.splice(xe,1),_e}),Ke?ge.length+G.length-1>0?se(0):se(null):re!==null&&re>xe&&se(re-1)},Se=async()=>{try{const ye=new FormData;if(console.log("Person data:",N),Object.entries(N).forEach(([pe,_e])=>{_e&&ye.append(pe,_e)}),console.log("Migration data:",T),Object.values(T).some(pe=>pe)&&Object.entries(T).forEach(([pe,_e])=>{_e&&ye.append(`migration[${pe}]`,_e)}),Object.values(R).some(pe=>pe)&&Object.entries(R).forEach(([pe,_e])=>{_e&&ye.append(`naturalization[${pe}]`,_e)}),console.log("Residence data:",I),Object.values(I).some(pe=>pe)&&Object.entries(I).forEach(([pe,_e])=>{_e&&ye.append(`residence[${pe}]`,_e)}),console.log("Family data:",V),Object.values(V).some(pe=>pe)&&Object.entries(V).forEach(([pe,_e])=>{_e&&ye.append(`family[${pe}]`,_e)}),console.log("Internment data:",K),Object.values(K).some(pe=>pe)&&Object.entries(K).forEach(([pe,_e])=>{_e&&ye.append(`internment[${pe}]`,_e)}),console.log("Photos:",G),G.forEach(pe=>{ye.append("photos[]",pe)}),console.log("New photo captions:"),$.slice(ge.length).forEach((pe,_e)=>{console.log(`New photo ${_e} caption:`,pe),ye.append(`captions[${_e}]`,pe||"")}),console.log("=== MAIN PHOTO DEBUG ==="),console.log("Main photo index:",re),console.log("Existing photos count:",ge.length),console.log("New photos count:",G.length),console.log("Is edit mode:",r),re!==null)if(ye.append("set_as_profile","true"),re<ge.length){const pe=ge[re];console.log("Setting existing photo as main:",pe.id),ye.append("profile_photo_id",pe.id.toString())}else{const pe=re-ge.length;console.log("Setting new photo as main, index:",pe),pe>=0&&pe<G.length?(ye.append("profile_photo_index",pe.toString()),console.log("✅ Valid new photo index sent:",pe),ye.append("new_profile_photo_index",pe.toString())):console.error("❌ Invalid new photo index:",pe,"Photos length:",G.length)}else console.log("⚠️ No main photo selected"),ye.append("set_as_profile","false");ge.length>0&&(console.log("Processing existing photos for caption updates..."),ge.forEach((pe,_e)=>{ye.append(`existing_photos[${_e}][id]`,pe.id.toString());const ot=$[_e]||"";ye.append(`existing_photos[${_e}][caption]`,ot),console.log(`Caption for existing photo ${pe.id}:`,ot);const Xt=re===_e;ye.append(`existing_photos[${_e}][is_profile_photo]`,Xt?"true":"false"),console.log(`Existing photo ${pe.id} is_profile_photo:`,Xt)})),G.forEach((pe,_e)=>{const ot=ge.length+_e,Xt=re===ot;ye.append(`new_photos[${_e}][is_profile_photo]`,Xt?"true":"false"),ye.append(`new_photos[${_e}][caption]`,$[ot]||""),console.log(`New photo ${_e} metadata:`,{is_profile_photo:Xt,caption:$[ot]||"",total_index:ot})}),console.log("=== FORM DATA CONTENTS ===");for(let[pe,_e]of ye.entries())_e instanceof File?console.log(pe,":",`[File: ${_e.name}]`):console.log(pe,":",_e);let Ke;return r&&e?(console.log("Updating migrant:",e),Ke=await At.updateMigrant(parseInt(e),ye)):(console.log("Creating new migrant"),Ke=await At.createMigrant(ye)),Ke}catch(ye){throw console.error("Form submission error:",ye),ye}},we=()=>{v||(r?g(!0):h(!0))},ze=async()=>{if(!v)try{w(!0);const ye=await Se();return r?obe(`Migrant ${N.surname}, ${N.christian_name}`,()=>{t("/admin/migrants")}):(nbe(()=>{t("/admin/migrants")}),ne()),ye}catch(ye){console.error("Form submission error:",ye),mj("There was a problem saving the migrant data. Please try again.")}finally{w(!1),h(!1),g(!1)}},Ue=(ye,xe,Ke,pe="text",_e,ot)=>d.jsxs("div",{className:"space-y-2",children:[d.jsxs(ht,{htmlFor:ye.toLowerCase().replace(/\s+/g,"-"),className:"text-sm font-medium text-gray-300",children:[ye,ot&&d.jsx("span",{className:"text-red-400 ml-1",children:"*"})]}),pe==="textarea"?d.jsx(vwe,{id:ye.toLowerCase().replace(/\s+/g,"-"),placeholder:_e||ye,value:xe,onChange:Xt=>Ke(Xt.target.value),className:"min-h-[100px] resize-none bg-gray-800 border-gray-700 text-white placeholder:text-gray-500 focus:border-[#9B2335] focus:ring-[#9B2335]"}):d.jsx(Ot,{id:ye.toLowerCase().replace(/\s+/g,"-"),type:pe,placeholder:_e||ye,value:xe,onChange:Xt=>Ke(Xt.target.value),className:"bg-gray-800 border-gray-700 text-white placeholder:text-gray-500 focus:border-[#9B2335] focus:ring-[#9B2335]"})]}),Je=()=>{switch(n){case 0:return d.jsx(Cwe,{person:N,setPerson:O,renderFormField:Ue});case 1:return d.jsx(Twe,{migration:T,setMigration:k,renderFormField:Ue});case 2:return d.jsx(kwe,{naturalization:R,setNaturalization:F,renderFormField:Ue});case 3:return d.jsx(Mwe,{residence:I,setResidence:L,renderFormField:Ue});case 4:return d.jsx(Rwe,{family:V,setFamily:Y,renderFormField:Ue});case 5:return d.jsx(Iwe,{internment:K,setInternment:z,renderFormField:Ue});case 6:return d.jsx(Dwe,{photos:G,photoPreviews:q,captions:$,existingPhotos:ge,mainPhotoIndex:re,API_BASE_URL:$we,handlePhotoChange:le,removeExistingPhoto:ce,removeNewPhoto:Z,setCaptions:H,setMainPhotoIndex:se});default:return null}};return a&&r&&!l?d.jsx("div",{className:"min-h-screen bg-gray-950 flex items-center justify-center",children:d.jsx(et,{className:"w-full max-w-md bg-gray-900 border-gray-800",children:d.jsxs(tt,{className:"p-6 text-center",children:[d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#9B2335] mx-auto mb-4"}),d.jsx("p",{className:"text-gray-400",children:"Loading form data..."})]})})}):d.jsxs("div",{className:"max-w-6xl mx-auto mt-8 mb-24 p-4",children:[d.jsxs(et,{className:"shadow-2xl border border-gray-800 bg-gray-900/50 overflow-hidden backdrop-blur-sm",children:[d.jsxs(Mn,{className:"bg-gray-800 p-8 border-b border-gray-700",children:[d.jsxs("div",{className:"flex justify-between items-start mb-6",children:[d.jsxs("div",{children:[d.jsx(Rn,{className:"text-xl md:text-2xl font-bold text-white",children:r?`Edit ${wa[n]}`:wa[n]}),d.jsx(Ho,{className:"text-gray-400 mt-1",children:Lwe[n]})]}),d.jsxs(lu,{variant:"outline",className:"text-sm border-gray-700 text-gray-300",children:["Step ",n+1," of ",wa.length]})]}),d.jsxs("div",{className:"mt-6",children:[d.jsxs("div",{className:"flex justify-between text-sm text-gray-400 mb-2",children:[d.jsx("span",{children:"Progress"}),d.jsxs("span",{children:[Math.round(n/(wa.length-1)*100),"% Complete"]})]}),d.jsx(Awe,{value:n/(wa.length-1)*100,className:"h-2 bg-gray-800",style:{"--progress-foreground":"#9B2335"}})]}),d.jsx("div",{className:"flex justify-between mt-4 overflow-x-auto",children:wa.map((ye,xe)=>{const Ke=Bwe[xe];return d.jsxs("div",{className:"flex flex-col items-center min-w-0 flex-1",children:[d.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center mb-2 transition-all duration-200 ${xe<=n?"bg-[#9B2335] text-white shadow-lg":"bg-gray-800 text-gray-500 border border-gray-700"}`,children:d.jsx(Ke,{className:"w-5 h-5"})}),d.jsx("span",{className:`text-xs text-center px-1 transition-colors duration-200 ${xe<=n?"text-[#9B2335] font-medium":"text-gray-500"}`,children:ye})]},xe)})})]}),d.jsx(tt,{className:"p-8 bg-gray-900",children:Je()}),d.jsx("div",{className:"bg-gray-800 px-8 py-6 border-t border-gray-700",children:d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsxs(Me,{variant:"outline",disabled:n===0,onClick:()=>i(ye=>ye-1),className:"flex items-center gap-2 border-gray-700 text-gray-300 hover:bg-gray-700 hover:text-white disabled:opacity-50",children:[d.jsx(_7,{className:"w-4 h-4"}),"Previous"]}),d.jsx("div",{className:"flex items-center gap-2 text-sm text-gray-400",children:d.jsxs("span",{children:["Step ",n+1," of ",wa.length]})}),n<wa.length-1?d.jsxs(Me,{onClick:()=>i(ye=>ye+1),className:"flex items-center gap-2 bg-[#9B2335] hover:bg-[#9B2335]/90 shadow-lg",children:["Next",d.jsx(A7,{className:"w-4 h-4"})]}):d.jsx(Me,{onClick:we,disabled:v,className:"flex items-center gap-2 bg-green-600 hover:bg-green-700 shadow-lg",children:v?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}),"Saving..."]}):d.jsxs(d.Fragment,{children:[d.jsx(Ij,{className:"w-4 h-4"}),r?"Update Record":"Submit Form"]})})]})})]}),d.jsx(Ewe,{open:f,onOpenChange:h,onConfirm:ze,isSubmitting:v}),d.jsx(Owe,{open:p,onOpenChange:g,onConfirm:ze,isSubmitting:v})]})};function Fwe(){return d.jsxs("div",{className:"flex min-h-dvh bg-gray-950",children:[d.jsx(Di,{}),d.jsxs("div",{className:"flex-1 md:ml-16 lg:ml-64 w-full transition-all duration-300",children:[d.jsx(Ii,{title:"Add New Migrant"}),d.jsxs("main",{className:"p-6",children:[d.jsxs("div",{className:"flex items-center mb-6",children:[d.jsx(Ge,{to:"/admin/migrants",children:d.jsxs(Me,{variant:"ghost",size:"sm",className:"gap-1 text-gray-300",children:[d.jsx(Cj,{className:"size-4"})," Back to Migrants"]})}),d.jsx("h1",{className:"text-3xl font-serif font-bold text-white ml-4",children:"Add New Migrant"})]}),d.jsx(Iz,{})]})]})]})}function zwe(){return d.jsxs("div",{className:"flex min-h-dvh bg-gray-950",children:[d.jsx(Di,{}),d.jsxs("div",{className:"flex-1 md:ml-16 lg:ml-64 w-full transition-all duration-300",children:[d.jsx(Ii,{title:"Edit Migrant"}),d.jsxs("main",{className:"p-6",children:[d.jsxs("div",{className:"flex items-center mb-6",children:[d.jsx(Ge,{to:"/admin/migrants",children:d.jsxs(Me,{variant:"ghost",size:"sm",className:"gap-1 text-gray-300",children:[d.jsx(Cj,{className:"size-4"})," Back to Migrants"]})}),d.jsx("h1",{className:"text-3xl font-serif font-bold text-white ml-4",children:"Edit Migrant"})]}),d.jsx(Iz,{})]})]})]})}function Vwe(){const e=pn(),[t,r]=j.useState(!1),[n,i]=j.useState(null),[a,o]=j.useState({name:"",email:"",current_password:"",password:"",password_confirmation:""});j.useEffect(()=>{async function f(){try{const h=await At.fetchCurrentUser();console.log("Setting component - Fetched user:",h),i(h),h&&o(p=>({...p,name:h.name||"",email:h.email||""}))}catch(h){console.error("Failed to fetch user info:",h),St.error("Failed to load user information")}}f()},[]);const l=f=>{const{name:h,value:p}=f.target;o(g=>({...g,[h]:p}))},c=async f=>{var h,p;if(f.preventDefault(),!a.name||!a.email||!a.current_password){St.error("Please fill in all required fields");return}if(a.password&&a.password!==a.password_confirmation){St.error("Passwords don't match");return}try{r(!0);const g=await At.updateUser({name:a.name,email:a.email,current_password:a.current_password,password:a.password,password_confirmation:a.password_confirmation});St.success(g.message||"User updated successfully!"),e("/admin/settings")}catch(g){console.error("Error updating user:",g),(p=(h=g.response)==null?void 0:h.data)!=null&&p.message?St.error(g.response.data.message):St.error("Failed to update user. Please try again.")}finally{r(!1)}};return d.jsxs("div",{className:"flex min-h-dvh bg-gray-950",children:[d.jsx(Di,{}),d.jsxs("div",{className:"flex-1 md:ml-16 lg:ml-64 w-full transition-all duration-300",children:[d.jsx(Ii,{title:"Create User"}),d.jsxs("main",{className:"p-4 md:p-6",children:[d.jsxs("div",{className:"mb-6",children:[d.jsx("div",{className:"flex items-center gap-2",children:d.jsx("h1",{className:"text-2xl md:text-3xl font-serif font-bold text-white",children:"Account Settings"})}),d.jsx("p",{className:"text-gray-400 mt-2",children:"Manage your profile and security preferences"})]}),n&&d.jsx("div",{className:"mb-6 max-w-10xl mx-auto",children:d.jsxs(et,{className:"shadow-xl border border-gray-800 bg-gray-900 overflow-hidden mb-6",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-[#9B2335] to-[#9B2335]/60"}),d.jsx(Mn,{className:"border-b border-gray-800",children:d.jsxs(Rn,{className:"text-xl font-serif text-white flex items-center",children:[d.jsx(hr,{className:"mr-2 size-5"}),"Current User Profile"]})}),d.jsx(tt,{className:"p-6",children:d.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[d.jsx("div",{className:"flex-shrink-0 flex justify-center",children:d.jsx("div",{className:"size-24 rounded-full bg-[#9B2335] flex items-center justify-center border-4 border-gray-800",children:d.jsx("span",{className:"text-3xl font-bold text-white",children:n.name.charAt(0).toUpperCase()})})}),d.jsxs("div",{className:"flex-grow space-y-4",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-gray-400 text-sm",children:"Full Name"}),d.jsx("p",{className:"text-white text-lg font-medium",children:n.name})]}),d.jsxs("div",{children:[d.jsx("h3",{className:"text-gray-400 text-sm",children:"Email Address"}),d.jsx("p",{className:"text-white text-lg font-medium",children:n.email})]})]})]})})]})}),d.jsx("div",{className:"max-w-10xl mx-auto",children:d.jsxs(et,{className:"shadow-2xl border border-gray-800 bg-gray-900 overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-[#9B2335] to-[#9B2335]/60"}),d.jsxs(Mn,{className:"border-b border-gray-800",children:[d.jsx(Rn,{className:"text-xl font-serif text-white",children:"User Information"}),d.jsx(Ho,{className:"text-gray-400",children:"Please fill in all required fields"})]}),d.jsxs("form",{onSubmit:c,children:[d.jsx(tt,{className:"space-y-6 p-6",children:d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsxs(ht,{htmlFor:"name",className:"text-gray-300",children:["Full Name ",d.jsx("span",{className:"text-red-400",children:"*"})]}),d.jsx(Ot,{id:"name",name:"name",placeholder:"Enter full name",value:a.name,onChange:l,required:!0,className:"bg-gray-800 border-gray-700 text-white focus:border-[#9B2335] placeholder:text-gray-500"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs(ht,{htmlFor:"email",className:"text-gray-300",children:["Email Address ",d.jsx("span",{className:"text-red-400",children:"*"})]}),d.jsx(Ot,{id:"email",name:"email",type:"email",placeholder:"Enter email address",value:a.email,onChange:l,required:!0,className:"bg-gray-800 border-gray-700 text-white focus:border-[#9B2335] placeholder:text-gray-500"})]}),d.jsxs("div",{className:"border-t border-gray-800 pt-6",children:[d.jsx("h3",{className:"text-lg font-medium mb-4 text-white",children:"Security Information"}),d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsxs(ht,{htmlFor:"current_password",className:"text-gray-300",children:["Current Password ",d.jsx("span",{className:"text-red-400",children:"*"})]}),d.jsx(Ot,{id:"current_password",name:"current_password",type:"password",placeholder:"Enter current password",value:a.current_password,onChange:l,required:!0,className:"bg-gray-800 border-gray-700 text-white focus:border-[#9B2335] placeholder:text-gray-500"})]}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsxs(ht,{htmlFor:"password",className:"text-gray-300",children:["Password ",d.jsx("span",{className:"text-red-400",children:"*"})]}),d.jsx(Ot,{id:"password",name:"password",type:"password",placeholder:"Enter password",value:a.password,onChange:l,required:!0,className:"bg-gray-800 border-gray-700 text-white focus:border-[#9B2335] placeholder:text-gray-500"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs(ht,{htmlFor:"password_confirmation",className:"text-gray-300",children:["Confirm Password ",d.jsx("span",{className:"text-red-400",children:"*"})]}),d.jsx(Ot,{id:"password_confirmation",name:"password_confirmation",type:"password",placeholder:"Confirm password",value:a.password_confirmation,onChange:l,required:!0,className:"bg-gray-800 border-gray-700 text-white focus:border-[#9B2335] placeholder:text-gray-500"})]})]})]})]})]})}),d.jsxs(bm,{className:"flex justify-end gap-3 pt-2 pb-6 px-6 border-t border-gray-800",children:[d.jsx(Me,{type:"button",variant:"outline",onClick:()=>e("/admin/settings"),disabled:t,className:"border-gray-700 text-gray-300 hover:bg-gray-800 hover:text-white bg-gray-900 shadow-lg",children:"Cancel"}),d.jsxs(Me,{type:"submit",disabled:t,className:"bg-[#9B2335] hover:bg-[#9B2335]/90 text-white shadow-lg",children:[d.jsx(Dj,{className:"mr-2 size-4"}),t?"Creating...":"Create User"]})]})]})]})})]})]})]})}function Uwe(){const[e,t]=j.useState(!0),[r,n]=j.useState(!1),[i,a]=j.useState("profile"),[o,l]=j.useState({firstName:"Admin",lastName:"User",email:"admin@example.com",jobTitle:"Database Administrator",department:"IT",bio:"Experienced database administrator with a focus on migration data management.",avatar:""}),c=pn(),f=()=>{localStorage.removeItem("adminToken"),localStorage.removeItem("adminNavigation"),c("/admin/login")};j.useEffect(()=>{if(!localStorage.getItem("adminToken")){c("/admin/login");return}if(localStorage.getItem("adminNavigation"))t(!1);else if(localStorage.setItem("adminNavigation","true"),e){const y=setTimeout(()=>{t(!1)},500);return()=>clearTimeout(y)}},[e,c]);const h=v=>{const{name:w,value:y}=v.target;l(b=>({...b,[w]:y}))},p=()=>{n(!0),setTimeout(()=>{n(!1)},500)},g=v=>{var y;const w=(y=v.target.files)==null?void 0:y[0];if(w){const b=new FileReader;b.onload=S=>{var A;(A=S.target)!=null&&A.result},b.readAsDataURL(w)}};return e?d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-[#E8DCCA]/10",children:d.jsxs("div",{className:"text-center",children:[d.jsx("div",{className:"w-16 h-16 border-4 border-[#9B2335] border-t-transparent rounded-full animate-spin mx-auto"}),d.jsx("p",{className:"mt-4 text-gray-600",children:"Loading profile..."})]})}):d.jsxs("div",{className:"min-h-screen flex",children:[d.jsxs("div",{className:"w-64 bg-[#1A2A57] text-white",children:[d.jsxs("div",{className:"p-4 border-b border-[#1A2A57]/30",children:[d.jsx("h2",{className:"text-xl font-serif font-bold",children:"Italian Migrants"}),d.jsx("p",{className:"text-sm text-white/70",children:"Northern Territory DB"})]}),d.jsx("nav",{className:"mt-6 px-4",children:d.jsxs("div",{className:"space-y-1",children:[d.jsxs(Ge,{to:"/admin",className:"flex items-center px-4 py-3 text-white/80 hover:bg-[#1A2A57]/40 rounded-md",children:[d.jsx(mm,{className:"h-5 w-5 mr-3"}),"Dashboard"]}),d.jsxs(Ge,{to:"/admin/migrants",className:"flex items-center px-4 py-3 text-white/80 hover:bg-[#1A2A57]/40 rounded-md",children:[d.jsx(hr,{className:"h-5 w-5 mr-3"}),"Migrants"]}),d.jsxs(Ge,{to:"#",className:"flex items-center px-4 py-3 text-white/80 hover:bg-[#1A2A57]/40 rounded-md",children:[d.jsx(ju,{className:"h-5 w-5 mr-3"}),"Reports"]}),d.jsxs(Ge,{to:"#",className:"flex items-center px-4 py-3 text-white/80 hover:bg-[#1A2A57]/40 rounded-md",children:[d.jsx(_u,{className:"h-5 w-5 mr-3"}),"Database"]}),d.jsxs(Ge,{to:"/admin/settings/profile",className:"flex items-center px-4 py-3 text-white bg-[#1A2A57]/40 rounded-md",children:[d.jsx(Qh,{className:"h-5 w-5 mr-3"}),"Settings"]})]})}),d.jsx("div",{className:"absolute bottom-0 w-64 p-4 border-t border-[#1A2A57]/30",children:d.jsxs("button",{onClick:f,className:"flex items-center w-full px-4 py-2 text-white/80 hover:bg-[#1A2A57]/40 rounded-md",children:[d.jsx("div",{className:"h-8 w-8 rounded-full bg-white text-[#1A2A57] flex items-center justify-center mr-2",children:d.jsx(hr,{className:"h-5 w-5"})}),d.jsx("span",{className:"text-sm",children:"Admin User"})]})})]}),d.jsxs("div",{className:"flex-1 overflow-auto",children:[d.jsx("div",{className:"bg-white shadow-sm border-b border-gray-200",children:d.jsxs("div",{className:"flex justify-between items-center px-6 py-4",children:[d.jsx("h1",{className:"text-xl font-medium text-[#1A2A57]",children:"Admin Portal"}),d.jsx("div",{className:"text-sm text-gray-600",children:"Northern Territory"})]})}),d.jsx("div",{className:"p-6",children:d.jsxs(Yn.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3},children:[d.jsxs("div",{className:"flex justify-between items-center mb-6",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-2xl font-bold text-gray-800",children:"Settings"}),d.jsx("p",{className:"text-gray-600",children:"Manage your account preferences"})]}),d.jsx("button",{onClick:p,disabled:r,className:"px-4 py-2 bg-[#01796F] text-white rounded-md hover:bg-[#01796F]/90 flex items-center disabled:opacity-70",children:r?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin mr-2"}),"Saving..."]}):d.jsxs(d.Fragment,{children:[d.jsx(Ij,{className:"h-4 w-4 mr-2"}),"Save Changes"]})})]}),d.jsxs("div",{className:"flex mb-6 border-b border-gray-200",children:[d.jsxs("button",{className:`px-6 py-3 font-medium flex items-center ${i==="profile"?"text-[#1A2A57] border-b-2 border-[#1A2A57]":"text-gray-500 hover:text-gray-700"}`,onClick:()=>a("profile"),children:[d.jsx(hr,{className:"h-4 w-4 mr-2"}),"Profile"]}),d.jsxs("button",{className:`px-6 py-3 font-medium flex items-center ${i==="security"?"text-[#1A2A57] border-b-2 border-[#1A2A57]":"text-gray-500 hover:text-gray-700"}`,onClick:()=>a("security"),children:[d.jsx(Qh,{className:"h-4 w-4 mr-2"}),"Security"]}),d.jsxs("button",{className:`px-6 py-3 font-medium flex items-center ${i==="notifications"?"text-[#1A2A57] border-b-2 border-[#1A2A57]":"text-gray-500 hover:text-gray-700"}`,onClick:()=>a("notifications"),children:[d.jsx(m7,{className:"h-4 w-4 mr-2"}),"Notifications"]})]}),i==="profile"&&d.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-6",children:[d.jsx("h3",{className:"text-lg font-medium text-gray-800 mb-4",children:"Profile Information"}),d.jsx("p",{className:"text-gray-600 mb-6",children:"Update your personal information and how it appears on your profile."}),d.jsxs("div",{className:"flex items-start mb-8",children:[d.jsxs("div",{className:"mr-6",children:[d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:"h-24 w-24 rounded-full bg-gray-200 overflow-hidden",children:o.avatar?d.jsx("img",{src:o.avatar||"/assets/placeholder.svg",alt:"Profile",className:"h-full w-full object-cover"}):d.jsx("div",{className:"h-full w-full flex items-center justify-center bg-gray-300",children:d.jsx(hr,{className:"h-12 w-12 text-gray-400"})})}),d.jsxs("label",{htmlFor:"avatar-upload",className:"absolute bottom-0 right-0 p-1 bg-[#9B2335] text-white rounded-full cursor-pointer",children:[d.jsx(F$,{className:"h-4 w-4"}),d.jsx("input",{id:"avatar-upload",type:"file",accept:"image/*",className:"hidden",onChange:g})]})]}),d.jsx("button",{className:"mt-2 text-sm text-[#1A2A57] hover:underline",children:"Change"})]}),d.jsxs("div",{className:"flex-1 grid grid-cols-2 gap-6",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"firstName",className:"block text-sm font-medium text-gray-700 mb-1",children:"First Name"}),d.jsx("input",{type:"text",id:"firstName",name:"firstName",value:o.firstName,onChange:h,className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#01796F] focus:border-[#01796F]"})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"lastName",className:"block text-sm font-medium text-gray-700 mb-1",children:"Last Name"}),d.jsx("input",{type:"text",id:"lastName",name:"lastName",value:o.lastName,onChange:h,className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#01796F] focus:border-[#01796F]"})]}),d.jsxs("div",{className:"col-span-2",children:[d.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-1",children:"Email"}),d.jsx("input",{type:"email",id:"email",name:"email",value:o.email,onChange:h,className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#01796F] focus:border-[#01796F]"})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"jobTitle",className:"block text-sm font-medium text-gray-700 mb-1",children:"Job Title"}),d.jsx("input",{type:"text",id:"jobTitle",name:"jobTitle",value:o.jobTitle,onChange:h,className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#01796F] focus:border-[#01796F]"})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"department",className:"block text-sm font-medium text-gray-700 mb-1",children:"Department"}),d.jsx("input",{type:"text",id:"department",name:"department",value:o.department,onChange:h,className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#01796F] focus:border-[#01796F]"})]})]})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"bio",className:"block text-sm font-medium text-gray-700 mb-1",children:"Bio"}),d.jsx("textarea",{id:"bio",name:"bio",rows:4,value:o.bio,onChange:h,className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#01796F] focus:border-[#01796F]"})]})]}),i==="security"&&d.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-6",children:[d.jsx("h3",{className:"text-lg font-medium text-gray-800 mb-4",children:"Security Settings"}),d.jsx("p",{className:"text-gray-600 mb-6",children:"Manage your password and account security preferences."}),d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h4",{className:"text-md font-medium mb-2",children:"Change Password"}),d.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"currentPassword",className:"block text-sm font-medium text-gray-700 mb-1",children:"Current Password"}),d.jsx("input",{type:"password",id:"currentPassword",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#01796F] focus:border-[#01796F]"})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"newPassword",className:"block text-sm font-medium text-gray-700 mb-1",children:"New Password"}),d.jsx("input",{type:"password",id:"newPassword",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#01796F] focus:border-[#01796F]"})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"confirmPassword",className:"block text-sm font-medium text-gray-700 mb-1",children:"Confirm New Password"}),d.jsx("input",{type:"password",id:"confirmPassword",className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#01796F] focus:border-[#01796F]"})]})]}),d.jsx("button",{className:"mt-4 px-4 py-2 bg-[#1A2A57] text-white rounded-md hover:bg-[#1A2A57]/90",children:"Update Password"})]}),d.jsxs("div",{className:"pt-6 border-t border-gray-200",children:[d.jsx("h4",{className:"text-md font-medium mb-2",children:"Two-Factor Authentication"}),d.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Add an extra layer of security to your account by enabling two-factor authentication."}),d.jsx("button",{className:"px-4 py-2 bg-[#9B2335] text-white rounded-md hover:bg-[#9B2335]/90",children:"Enable 2FA"})]})]})]}),i==="notifications"&&d.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-6",children:[d.jsx("h3",{className:"text-lg font-medium text-gray-800 mb-4",children:"Notification Preferences"}),d.jsx("p",{className:"text-gray-600 mb-6",children:"Manage how and when you receive notifications."}),d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h4",{className:"text-md font-medium mb-4",children:"Email Notifications"}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-medium",children:"System Updates"}),d.jsx("p",{className:"text-sm text-gray-600",children:"Receive emails about system updates and maintenance"})]}),d.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[d.jsx("input",{type:"checkbox",className:"sr-only peer",defaultChecked:!0}),d.jsx("div",{className:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-[#01796F]/20 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-[#01796F]"})]})]}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-medium",children:"New Records"}),d.jsx("p",{className:"text-sm text-gray-600",children:"Receive emails when new migrant records are added"})]}),d.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[d.jsx("input",{type:"checkbox",className:"sr-only peer",defaultChecked:!0}),d.jsx("div",{className:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-[#01796F]/20 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-[#01796F]"})]})]}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-medium",children:"Security Alerts"}),d.jsx("p",{className:"text-sm text-gray-600",children:"Receive emails about security-related events"})]}),d.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[d.jsx("input",{type:"checkbox",className:"sr-only peer",defaultChecked:!0}),d.jsx("div",{className:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-[#01796F]/20 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-[#01796F]"})]})]})]})]}),d.jsxs("div",{className:"pt-6 border-t border-gray-200",children:[d.jsx("h4",{className:"text-md font-medium mb-4",children:"In-App Notifications"}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-medium",children:"Record Updates"}),d.jsx("p",{className:"text-sm text-gray-600",children:"Receive notifications when records are updated"})]}),d.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[d.jsx("input",{type:"checkbox",className:"sr-only peer",defaultChecked:!0}),d.jsx("div",{className:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-[#01796F]/20 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-[#01796F]"})]})]}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-medium",children:"User Activity"}),d.jsx("p",{className:"text-sm text-gray-600",children:"Receive notifications about other users' activity"})]}),d.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[d.jsx("input",{type:"checkbox",className:"sr-only peer"}),d.jsx("div",{className:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-[#01796F]/20 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-[#01796F]"})]})]})]})]})]})]})]})})]})]})}const qwe=()=>{const{occupationData:e,loading:t,error:r}=O_();if(t)return d.jsxs(et,{className:"border border-gray-800 bg-gray-900 shadow-2xl overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-[#9B2335] to-[#9B2335]/60"}),d.jsx(tt,{className:"p-6 flex items-center justify-center h-64",children:d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#9B2335]"})})]});if(r)return d.jsxs(et,{className:"border border-gray-800 bg-gray-900 shadow-2xl overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-red-500 to-red-600"}),d.jsx(tt,{className:"p-6 text-center",children:d.jsx("p",{className:"text-red-400",children:r})})]});if(!e.length)return d.jsxs(et,{className:"border border-gray-800 bg-gray-900 shadow-2xl overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-gray-600 to-gray-700"}),d.jsx(tt,{className:"p-6 text-center",children:d.jsx("p",{className:"text-gray-400",children:"No data available"})})]});const n=[...e].sort((i,a)=>a.value-i.value).slice(0,10);return d.jsxs(et,{className:"border border-gray-800 bg-gray-900 shadow-2xl overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-[#9B2335] to-[#9B2335]/60"}),d.jsxs(Mn,{className:"border-b border-gray-800",children:[d.jsx(Rn,{className:"text-xl font-serif text-white",children:"Top 10 Occupations of Migrants"}),d.jsx(Ho,{className:"text-gray-400",children:"The most common occupations among Italian migrants"})]}),d.jsx(tt,{className:"p-6",children:d.jsx(Q_,{width:"100%",height:400,children:d.jsxs(YF,{data:n,layout:"vertical",margin:{top:20,right:10,left:10,bottom:20},barCategoryGap:"20%",children:[d.jsx(IP,{strokeDasharray:"3 3",stroke:"#374151",vertical:!1}),d.jsx(Wf,{type:"number",tick:{fontSize:12,fill:"#9CA3AF"}}),d.jsx(Hf,{type:"category",dataKey:"occupation",tick:{fontSize:12,fill:"#9CA3AF"},width:140}),d.jsx(on,{contentStyle:{backgroundColor:"#1F2937",borderRadius:"8px",color:"#fff",fontSize:"0.875rem",boxShadow:"0 2px 8px rgba(0,0,0,0.15)",border:"1px solid #374151"},formatter:(i,a)=>[`${i} migrants`,a]}),d.jsx(Oa,{verticalAlign:"top",align:"right",iconType:"circle",wrapperStyle:{fontSize:"0.875rem",color:"#9CA3AF",marginBottom:"1rem"}}),d.jsx(Wa,{dataKey:"value",fill:"url(#colorUv)",radius:[6,6,6,6],barSize:18}),d.jsx("defs",{children:d.jsxs("linearGradient",{id:"colorUv",x1:"0",y1:"0",x2:"1",y2:"0",children:[d.jsx("stop",{offset:"0%",stopColor:"#9B2335",stopOpacity:.8}),d.jsx("stop",{offset:"100%",stopColor:"#DC2626",stopOpacity:.8})]})})]})})})]})};function Wwe(){return d.jsxs("div",{className:"flex min-h-dvh bg-gray-950",children:[d.jsx(Di,{}),d.jsxs("div",{className:"flex-1 md:ml-16 lg:ml-64 w-full transition-all duration-300",children:[d.jsx(Ii,{title:"Reports"}),d.jsxs("main",{className:"p-4 md:p-6",children:[d.jsxs("div",{className:"mb-6",children:[d.jsx("h1",{className:"text-2xl md:text-3xl font-serif font-bold text-white mb-2",children:"Data Reports"}),d.jsx("p",{className:"text-gray-400",children:"Generate and analyze reports from the Italian Migrants Database"})]}),d.jsx(Xj,{defaultValue:"demographics",className:"space-y-6",children:d.jsxs(bo,{value:"demographics",className:"space-y-6",children:[d.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[d.jsx(DP,{}),d.jsx(qwe,{})]}),d.jsxs(et,{className:"border border-gray-800 bg-gray-900 shadow-2xl overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-[#9B2335] to-[#9B2335]/60"}),d.jsxs(Mn,{className:"border-b border-gray-800",children:[d.jsx(Rn,{className:"text-xl font-serif text-white",children:"Family Status"}),d.jsx(Ho,{className:"text-gray-400",children:"Family composition of Italian migrants"})]}),d.jsx(tt,{className:"p-6",children:d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[d.jsxs("div",{className:"bg-gray-800 rounded-lg p-4 border border-gray-700 flex flex-col items-center justify-center hover:bg-gray-750 transition-colors",children:[d.jsx("div",{className:"size-16 rounded-full bg-[#9B2335]/20 border border-[#9B2335]/30 flex items-center justify-center mb-4",children:d.jsx(hr,{className:"size-8 text-[#9B2335]"})}),d.jsx("h3",{className:"text-2xl font-bold text-white",children:"42%"}),d.jsx("p",{className:"text-gray-400",children:"Single"})]}),d.jsxs("div",{className:"bg-gray-800 rounded-lg p-4 border border-gray-700 flex flex-col items-center justify-center hover:bg-gray-750 transition-colors",children:[d.jsx("div",{className:"size-16 rounded-full bg-blue-500/20 border border-blue-500/30 flex items-center justify-center mb-4",children:d.jsxs("div",{className:"flex -space-x-2",children:[d.jsx(hr,{className:"size-8 text-blue-400"}),d.jsx(hr,{className:"size-8 text-blue-300"})]})}),d.jsx("h3",{className:"text-2xl font-bold text-white",children:"35%"}),d.jsx("p",{className:"text-gray-400",children:"Married"})]}),d.jsxs("div",{className:"bg-gray-800 rounded-lg p-4 border border-gray-700 flex flex-col items-center justify-center hover:bg-gray-750 transition-colors",children:[d.jsx("div",{className:"size-16 rounded-full bg-orange-500/20 border border-orange-500/30 flex items-center justify-center mb-4",children:d.jsxs("div",{className:"flex -space-x-4",children:[d.jsx(hr,{className:"size-8 text-orange-400"}),d.jsx(hr,{className:"size-6 text-orange-300"}),d.jsx(hr,{className:"size-4 text-orange-200"})]})}),d.jsx("h3",{className:"text-2xl font-bold text-white",children:"23%"}),d.jsx("p",{className:"text-gray-400",children:"Family"})]})]})})]})]})})]})]})]})}function Hwe(){const e=pn(),[t,r]=j.useState(!1),[n,i]=j.useState({name:"",email:"",password:"",password_confirmation:""}),a=l=>{const{name:c,value:f}=l.target;i(h=>({...h,[c]:f}))},o=async l=>{if(l.preventDefault(),!n.name||!n.email||!n.password){St.error("Please fill in all required fields");return}if(n.password!==n.password_confirmation){St.error("Passwords don't match");return}try{r(!0),await At.createUser(n),St.success("User created successfully!"),e("/admin/settings")}catch(c){console.error("Error creating user:",c),St.error("Failed to create user. Please try again.")}finally{r(!1)}};return d.jsxs("div",{className:"flex min-h-dvh bg-gray-950",children:[d.jsx(Di,{}),d.jsxs("div",{className:"flex-1 md:ml-16 lg:ml-64 w-full transition-all duration-300",children:[d.jsx(Ii,{title:"Create User"}),d.jsxs("main",{className:"p-4 md:p-6",children:[d.jsxs("div",{className:"mb-6",children:[d.jsx("div",{className:"flex items-center gap-2",children:d.jsx("h1",{className:"text-2xl md:text-3xl font-serif font-bold text-white",children:"Create New User"})}),d.jsx("p",{className:"text-gray-400 mt-2",children:"Add a new administrator to the system"})]}),d.jsx("div",{className:"max-w-10xl mx-auto",children:d.jsxs(et,{className:"shadow-2xl border border-gray-800 bg-gray-900 overflow-hidden",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-[#9B2335] to-[#9B2335]/60"}),d.jsxs(Mn,{className:"border-b border-gray-800",children:[d.jsx(Rn,{className:"text-xl font-serif text-white",children:"User Information"}),d.jsx(Ho,{className:"text-gray-400",children:"Please fill in all required fields"})]}),d.jsxs("form",{onSubmit:o,children:[d.jsx(tt,{className:"space-y-6 p-6",children:d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsxs(ht,{htmlFor:"name",className:"text-gray-300",children:["Full Name ",d.jsx("span",{className:"text-red-400",children:"*"})]}),d.jsx(Ot,{id:"name",name:"name",placeholder:"Enter full name",value:n.name,onChange:a,required:!0,className:"bg-gray-800 border-gray-700 text-white focus:border-[#9B2335] placeholder:text-gray-500"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs(ht,{htmlFor:"email",className:"text-gray-300",children:["Email Address ",d.jsx("span",{className:"text-red-400",children:"*"})]}),d.jsx(Ot,{id:"email",name:"email",type:"email",placeholder:"Enter email address",value:n.email,onChange:a,required:!0,className:"bg-gray-800 border-gray-700 text-white focus:border-[#9B2335] placeholder:text-gray-500"})]}),d.jsxs("div",{className:"border-t border-gray-800 pt-6",children:[d.jsx("h3",{className:"text-lg font-medium mb-4 text-white",children:"Security Information"}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsxs(ht,{htmlFor:"password",className:"text-gray-300",children:["Password ",d.jsx("span",{className:"text-red-400",children:"*"})]}),d.jsx(Ot,{id:"password",name:"password",type:"password",placeholder:"Enter password",value:n.password,onChange:a,required:!0,className:"bg-gray-800 border-gray-700 text-white focus:border-[#9B2335] placeholder:text-gray-500"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs(ht,{htmlFor:"password_confirmation",className:"text-gray-300",children:["Confirm Password ",d.jsx("span",{className:"text-red-400",children:"*"})]}),d.jsx(Ot,{id:"password_confirmation",name:"password_confirmation",type:"password",placeholder:"Confirm password",value:n.password_confirmation,onChange:a,required:!0,className:"bg-gray-800 border-gray-700 text-white focus:border-[#9B2335] placeholder:text-gray-500"})]})]})]})]})}),d.jsxs(bm,{className:"flex justify-end gap-3 pt-2 pb-6 px-6 border-t border-gray-800",children:[d.jsx(Me,{type:"button",variant:"outline",onClick:()=>e("/admin/settings"),disabled:t,className:"border-gray-700 text-gray-300 hover:bg-gray-800 hover:text-white bg-gray-900 shadow-lg",children:"Cancel"}),d.jsxs(Me,{type:"submit",disabled:t,className:"bg-[#9B2335] hover:bg-[#9B2335]/90 text-white shadow-lg",children:[d.jsx(Dj,{className:"mr-2 size-4"}),t?"Creating...":"Create User"]})]})]})]})})]})]})]})}const Gwe=e=>{const t={};return e.forEach((r,n)=>{t[n]=r}),t};function Kwe(e=10){const[t]=s9(),[r,n]=j.useState([]),[i,a]=j.useState({}),[o,l]=j.useState(!1),[c,f]=j.useState(null),[h,p]=j.useState(1),[g,v]=j.useState({currentPage:1,totalPages:1,totalItems:0}),w=t.toString().length>0,y=j.useCallback(async()=>{l(!0),f(null);try{const A=Gwe(t),_=await At.getMigrants(h,e,A),C=_.data||[];n(C),v({currentPage:_.current_page??1,totalPages:_.last_page??1,totalItems:_.total??0});const N={};await Promise.all((C||[]).map(async O=>{try{if(O.person_id===void 0){console.warn("Missing person_id for migrant",O),O.photos=[],O.profilePhoto=null;return}const T=await At.getPhotos(O.person_id);O.photos=T,O.profilePhoto=T.find(k=>k.is_profile_photo)||null}catch(T){console.error(`Failed to fetch photos for person ${O.person_id}`,T),O.photos=[],O.profilePhoto=null}})),a(N)}catch{f("Failed to fetch migrants data.")}finally{l(!1)}},[t,h,e]);return j.useEffect(()=>{y()},[y]),{migrants:r,photosById:i,loading:o,error:c,pagination:g,hasActiveFilters:w,handleNextPage:()=>{g.currentPage<g.totalPages&&p(A=>A+1)},handlePrevPage:()=>{g.currentPage>1&&p(A=>A-1)}}}function Ywe(){const{migrants:e,loading:t,error:r,pagination:n,hasActiveFilters:i,handleNextPage:a,handlePrevPage:o}=Kwe(10),l="http://127.0.0.1:8000";return d.jsxs("div",{className:"flex flex-col min-h-screen",children:[d.jsx("header",{className:"border-b",children:d.jsxs("div",{className:"container flex h-16 items-center justify-between px-4 md:px-6",children:[d.jsx(Ge,{to:"/",className:"flex items-center gap-2",children:d.jsx("span",{className:"text-xl font-bold text-[#9B2335]",children:"Italian Migrants NT"})}),d.jsx("nav",{className:"hidden md:flex gap-6",children:["home","about","search","stories","contact"].map(c=>d.jsx(Ge,{to:"/",className:"text-sm font-medium hover:underline underline-offset-4 capitalize",children:c},c))})]})}),d.jsxs("main",{className:"flex-1",children:[d.jsx("section",{className:"w-full py-12 md:py-16 lg:py-20 bg-[#E8DCCA]",children:d.jsxs("div",{className:"container px-4 md:px-6 text-center space-y-4",children:[d.jsx("h1",{className:"text-3xl sm:text-4xl md:text-5xl font-serif font-bold tracking-tighter text-[#9B2335]",children:"Search Results"}),d.jsx("p",{className:"max-w-[700px] mx-auto text-muted-foreground md:text-xl/relaxed",children:"Displaying results based on your search criteria."})]})}),d.jsx("section",{className:"w-full py-8 md:py-12",children:d.jsxs("div",{className:"container px-4 md:px-6",children:[r&&d.jsx("div",{className:"p-3 bg-red-100 text-red-700 rounded mb-6",children:r}),t?d.jsx("div",{className:"flex justify-center my-8",children:d.jsx("div",{className:"animate-spin rounded-full h-10 w-10 border-b-2 border-blue-500"})}):d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:e.length>0?e.map(c=>d.jsxs(et,{className:"overflow-hidden pt-0",children:[d.jsx("div",{className:"aspect-square overflow-hidden",children:d.jsx("img",{src:c.profilePhoto?`${l}${c.profilePhoto.file_path}`:"/assets/placeholder.svg?height=300&width=300",alt:c.full_name||"Unknown",className:"w-full h-full object-cover object-center transition-transform hover:scale-105"})}),d.jsx(Mn,{children:d.jsx(Rn,{className:"font-serif text-[#9B2335]",children:c.full_name||"Unknown"})}),d.jsxs(tt,{className:"text-sm space-y-2",children:[d.jsxs("div",{className:"flex justify-between",children:[d.jsx("span",{className:"font-medium",children:"Date of Birth:"}),d.jsx("span",{children:Ni(c.date_of_birth)||"Unknown"})]}),c.place_of_birth&&d.jsxs("div",{className:"flex justify-between",children:[d.jsx("span",{className:"font-medium",children:"Place of Birth:"}),d.jsx("span",{children:Ni(c.place_of_birth)||"Unknown"})]})]}),d.jsx(bm,{children:d.jsx(Me,{asChild:!0,className:"w-full bg-[#01796F] hover:bg-[#015a54] text-white",children:d.jsx(Ge,{to:`/migrant-profile/${c.person_id}`,children:"View Profile"})})})]},c.person_id)):d.jsx("div",{className:"col-span-3 text-center p-8 bg-gray-50 rounded-lg",children:d.jsx("p",{className:"text-gray-500",children:i?"No migrants found matching your search criteria.":"No migrants found."})})}),e.length>0&&d.jsxs("div",{className:"flex justify-between items-center mt-8",children:[d.jsxs("div",{className:"text-sm text-gray-700",children:["Showing ",d.jsx("span",{className:"font-medium",children:e.length})," of"," ",d.jsx("span",{className:"font-medium",children:n.totalItems})," results",i&&d.jsxs("span",{children:[" • Page ",n.currentPage," of ",n.totalPages]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Me,{variant:"outline",onClick:o,disabled:n.currentPage===1,children:"Previous"}),d.jsx(Me,{variant:"outline",onClick:a,children:"Next"})]})]})]})})]}),d.jsx("footer",{className:"border-t bg-[#1A2A57] text-white",children:d.jsxs("div",{className:"container flex flex-col sm:flex-row items-center justify-between px-4 md:px-6 py-4 gap-2",children:[d.jsxs("p",{className:"text-xs",children:["© ",new Date().getFullYear()," Italian Migrants NT. All rights reserved."]}),d.jsxs("nav",{className:"flex gap-4 sm:gap-6 text-xs",children:[d.jsx(Ge,{to:"/terms",className:"hover:underline underline-offset-4",children:"Terms"}),d.jsx(Ge,{to:"/privacy",className:"hover:underline underline-offset-4",children:"Privacy"}),d.jsx(Ge,{to:"/admin",className:"hover:underline underline-offset-4",children:"Admin"})]})]})})]})}function Pi({children:e}){const[t,r]=j.useState({isAuthenticated:!1,isLoading:!0,user:null});return j.useEffect(()=>{(async()=>{try{if(!localStorage.getItem("token"))return r({isAuthenticated:!1,isLoading:!1,user:null});const a=await At.fetchCurrentUser();r({isAuthenticated:!0,isLoading:!1,user:a})}catch{localStorage.removeItem("token"),localStorage.removeItem("user"),r({isAuthenticated:!1,isLoading:!1,user:null})}})()},[]),t.isLoading?d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:d.jsxs("div",{className:"text-center",children:[d.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-[#9B2335] mx-auto mb-4"}),d.jsx("p",{className:"text-gray-600",children:"Verifying authentication..."})]})}):t.isAuthenticated?d.jsx(d.Fragment,{children:e}):d.jsx(O$,{to:"/login",replace:!0})}function v$({children:e}){const[t,r]=j.useState(null);return j.useEffect(()=>{(async()=>{try{if(!localStorage.getItem("token"))return r(!1);await At.fetchCurrentUser(),r(!0)}catch{localStorage.removeItem("token"),localStorage.removeItem("user"),r(!1)}})()},[]),t===null?d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#9B2335]"})}):t?d.jsx(O$,{to:"/admin",replace:!0}):d.jsx(d.Fragment,{children:e})}function Xwe(){return d.jsxs(r9,{children:[d.jsx(n7,{position:"top-right",reverseOrder:!1}),d.jsxs(Tq,{children:[d.jsx(er,{path:"/",element:d.jsx(CK,{})}),d.jsx(er,{path:"/migrant-profile/:id",element:d.jsx(oY,{})}),d.jsx(er,{path:"/search-results",element:d.jsx(Ywe,{})}),d.jsx(er,{path:"/migration-chart",element:d.jsx(D8,{})}),d.jsx(er,{path:"/residence-chart",element:d.jsx(DP,{})}),d.jsx(er,{path:"/login",element:d.jsx(v$,{children:d.jsx(sY,{})})}),d.jsx(er,{path:"/register",element:d.jsx(v$,{children:d.jsx(qJ,{})})}),d.jsx(er,{path:"/admin",element:d.jsx(Pi,{children:d.jsx(tbe,{})})}),d.jsx(er,{path:"/admin/migrants",element:d.jsx(Pi,{children:d.jsx(gwe,{})})}),d.jsx(er,{path:"/admin/migrants/add",element:d.jsx(Pi,{children:d.jsx(Fwe,{})})}),d.jsx(er,{path:"/admin/migrants/edit/:id",element:d.jsx(Pi,{children:d.jsx(zwe,{})})}),d.jsx(er,{path:"/admin/settings",element:d.jsx(Pi,{children:d.jsx(Vwe,{})})}),d.jsx(er,{path:"/admin/settings/profile",element:d.jsx(Pi,{children:d.jsx(Uwe,{})})}),d.jsx(er,{path:"/admin/reports",element:d.jsx(Pi,{children:d.jsx(Wwe,{})})}),d.jsx(er,{path:"/admin/users/create",element:d.jsx(Pi,{children:d.jsx(Hwe,{})})}),d.jsx(er,{path:"/sample",element:d.jsx(Pi,{children:d.jsx(Cz,{})})}),d.jsx(er,{path:"*",element:d.jsx(TK,{})})]})]})}FU.createRoot(document.getElementById("root")).render(d.jsx(j.StrictMode,{children:d.jsx(Xwe,{})}));
|