@tapflowio/relay 0.1.0-alpha.5 → 0.1.0-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,499 +0,0 @@
1
- function zH(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const o=Object.getOwnPropertyDescriptor(r,a);o&&Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>r[a]})}}}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 a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();var Mh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ub={exports:{}},Oc={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var WC;function LH(){if(WC)return Oc;WC=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,o){var l=null;if(o!==void 0&&(l=""+o),a.key!==void 0&&(l=""+a.key),"key"in a){o={};for(var u in a)u!=="key"&&(o[u]=a[u])}else o=a;return a=o.ref,{$$typeof:e,type:r,key:l,ref:a!==void 0?a:null,props:o}}return Oc.Fragment=t,Oc.jsx=n,Oc.jsxs=n,Oc}var ZC;function IH(){return ZC||(ZC=1,ub.exports=LH()),ub.exports}var v=IH(),cb={exports:{}},Xe={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var YC;function BH(){if(YC)return Xe;YC=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function x(P){return P===null||typeof P!="object"?null:(P=g&&P[g]||P["@@iterator"],typeof P=="function"?P:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,w={};function O(P,U,ne){this.props=P,this.context=U,this.refs=w,this.updater=ne||A}O.prototype.isReactComponent={},O.prototype.setState=function(P,U){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,U,"setState")},O.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function E(){}E.prototype=O.prototype;function T(P,U,ne){this.props=P,this.context=U,this.refs=w,this.updater=ne||A}var C=T.prototype=new E;C.constructor=T,S(C,O.prototype),C.isPureReactComponent=!0;var j=Array.isArray;function R(){}var N={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function $(P,U,ne){var me=ne.ref;return{$$typeof:e,type:P,key:U,ref:me!==void 0?me:null,props:ne}}function V(P,U){return $(P.type,U,P.props)}function I(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function L(P){var U={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(ne){return U[ne]})}var H=/\/+/g;function W(P,U){return typeof P=="object"&&P!==null&&P.key!=null?L(""+P.key):U.toString(36)}function Z(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(R,R):(P.status="pending",P.then(function(U){P.status==="pending"&&(P.status="fulfilled",P.value=U)},function(U){P.status==="pending"&&(P.status="rejected",P.reason=U)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function z(P,U,ne,me,Ae){var ce=typeof P;(ce==="undefined"||ce==="boolean")&&(P=null);var de=!1;if(P===null)de=!0;else switch(ce){case"bigint":case"string":case"number":de=!0;break;case"object":switch(P.$$typeof){case e:case t:de=!0;break;case m:return de=P._init,z(de(P._payload),U,ne,me,Ae)}}if(de)return Ae=Ae(P),de=me===""?"."+W(P,0):me,j(Ae)?(ne="",de!=null&&(ne=de.replace(H,"$&/")+"/"),z(Ae,U,ne,"",function(_e){return _e})):Ae!=null&&(I(Ae)&&(Ae=V(Ae,ne+(Ae.key==null||P&&P.key===Ae.key?"":(""+Ae.key).replace(H,"$&/")+"/")+de)),U.push(Ae)),1;de=0;var Ce=me===""?".":me+":";if(j(P))for(var le=0;le<P.length;le++)me=P[le],ce=Ce+W(me,le),de+=z(me,U,ne,ce,Ae);else if(le=x(P),typeof le=="function")for(P=le.call(P),le=0;!(me=P.next()).done;)me=me.value,ce=Ce+W(me,le++),de+=z(me,U,ne,ce,Ae);else if(ce==="object"){if(typeof P.then=="function")return z(Z(P),U,ne,me,Ae);throw U=String(P),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return de}function F(P,U,ne){if(P==null)return P;var me=[],Ae=0;return z(P,me,"","",function(ce){return U.call(ne,ce,Ae++)}),me}function Y(P){if(P._status===-1){var U=P._result;U=U(),U.then(function(ne){(P._status===0||P._status===-1)&&(P._status=1,P._result=ne)},function(ne){(P._status===0||P._status===-1)&&(P._status=2,P._result=ne)}),P._status===-1&&(P._status=0,P._result=U)}if(P._status===1)return P._result.default;throw P._result}var Q=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},K={map:F,forEach:function(P,U,ne){F(P,function(){U.apply(this,arguments)},ne)},count:function(P){var U=0;return F(P,function(){U++}),U},toArray:function(P){return F(P,function(U){return U})||[]},only:function(P){if(!I(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return Xe.Activity=p,Xe.Children=K,Xe.Component=O,Xe.Fragment=n,Xe.Profiler=a,Xe.PureComponent=T,Xe.StrictMode=r,Xe.Suspense=f,Xe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,Xe.__COMPILER_RUNTIME={__proto__:null,c:function(P){return N.H.useMemoCache(P)}},Xe.cache=function(P){return function(){return P.apply(null,arguments)}},Xe.cacheSignal=function(){return null},Xe.cloneElement=function(P,U,ne){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var me=S({},P.props),Ae=P.key;if(U!=null)for(ce in U.key!==void 0&&(Ae=""+U.key),U)!k.call(U,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&U.ref===void 0||(me[ce]=U[ce]);var ce=arguments.length-2;if(ce===1)me.children=ne;else if(1<ce){for(var de=Array(ce),Ce=0;Ce<ce;Ce++)de[Ce]=arguments[Ce+2];me.children=de}return $(P.type,Ae,me)},Xe.createContext=function(P){return P={$$typeof:l,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:o,_context:P},P},Xe.createElement=function(P,U,ne){var me,Ae={},ce=null;if(U!=null)for(me in U.key!==void 0&&(ce=""+U.key),U)k.call(U,me)&&me!=="key"&&me!=="__self"&&me!=="__source"&&(Ae[me]=U[me]);var de=arguments.length-2;if(de===1)Ae.children=ne;else if(1<de){for(var Ce=Array(de),le=0;le<de;le++)Ce[le]=arguments[le+2];Ae.children=Ce}if(P&&P.defaultProps)for(me in de=P.defaultProps,de)Ae[me]===void 0&&(Ae[me]=de[me]);return $(P,ce,Ae)},Xe.createRef=function(){return{current:null}},Xe.forwardRef=function(P){return{$$typeof:u,render:P}},Xe.isValidElement=I,Xe.lazy=function(P){return{$$typeof:m,_payload:{_status:-1,_result:P},_init:Y}},Xe.memo=function(P,U){return{$$typeof:d,type:P,compare:U===void 0?null:U}},Xe.startTransition=function(P){var U=N.T,ne={};N.T=ne;try{var me=P(),Ae=N.S;Ae!==null&&Ae(ne,me),typeof me=="object"&&me!==null&&typeof me.then=="function"&&me.then(R,Q)}catch(ce){Q(ce)}finally{U!==null&&ne.types!==null&&(U.types=ne.types),N.T=U}},Xe.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},Xe.use=function(P){return N.H.use(P)},Xe.useActionState=function(P,U,ne){return N.H.useActionState(P,U,ne)},Xe.useCallback=function(P,U){return N.H.useCallback(P,U)},Xe.useContext=function(P){return N.H.useContext(P)},Xe.useDebugValue=function(){},Xe.useDeferredValue=function(P,U){return N.H.useDeferredValue(P,U)},Xe.useEffect=function(P,U){return N.H.useEffect(P,U)},Xe.useEffectEvent=function(P){return N.H.useEffectEvent(P)},Xe.useId=function(){return N.H.useId()},Xe.useImperativeHandle=function(P,U,ne){return N.H.useImperativeHandle(P,U,ne)},Xe.useInsertionEffect=function(P,U){return N.H.useInsertionEffect(P,U)},Xe.useLayoutEffect=function(P,U){return N.H.useLayoutEffect(P,U)},Xe.useMemo=function(P,U){return N.H.useMemo(P,U)},Xe.useOptimistic=function(P,U){return N.H.useOptimistic(P,U)},Xe.useReducer=function(P,U,ne){return N.H.useReducer(P,U,ne)},Xe.useRef=function(P){return N.H.useRef(P)},Xe.useState=function(P){return N.H.useState(P)},Xe.useSyncExternalStore=function(P,U,ne){return N.H.useSyncExternalStore(P,U,ne)},Xe.useTransition=function(){return N.H.useTransition()},Xe.version="19.2.6",Xe}var KC;function R_(){return KC||(KC=1,cb.exports=BH()),cb.exports}var y=R_();const q=kt(y),N_=zH({__proto__:null,default:q},[y]);var fb={exports:{}},Ec={},db={exports:{}},hb={};/**
18
- * @license React
19
- * scheduler.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var XC;function UH(){return XC||(XC=1,(function(e){function t(z,F){var Y=z.length;z.push(F);e:for(;0<Y;){var Q=Y-1>>>1,K=z[Q];if(0<a(K,F))z[Q]=F,z[Y]=K,Y=Q;else break e}}function n(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var F=z[0],Y=z.pop();if(Y!==F){z[0]=Y;e:for(var Q=0,K=z.length,P=K>>>1;Q<P;){var U=2*(Q+1)-1,ne=z[U],me=U+1,Ae=z[me];if(0>a(ne,Y))me<K&&0>a(Ae,ne)?(z[Q]=Ae,z[me]=Y,Q=me):(z[Q]=ne,z[U]=Y,Q=U);else if(me<K&&0>a(Ae,Y))z[Q]=Ae,z[me]=Y,Q=me;else break e}}return F}function a(z,F){var Y=z.sortIndex-F.sortIndex;return Y!==0?Y:z.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var f=[],d=[],m=1,p=null,g=3,x=!1,A=!1,S=!1,w=!1,O=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function C(z){for(var F=n(d);F!==null;){if(F.callback===null)r(d);else if(F.startTime<=z)r(d),F.sortIndex=F.expirationTime,t(f,F);else break;F=n(d)}}function j(z){if(S=!1,C(z),!A)if(n(f)!==null)A=!0,R||(R=!0,L());else{var F=n(d);F!==null&&Z(j,F.startTime-z)}}var R=!1,N=-1,k=5,$=-1;function V(){return w?!0:!(e.unstable_now()-$<k)}function I(){if(w=!1,R){var z=e.unstable_now();$=z;var F=!0;try{e:{A=!1,S&&(S=!1,E(N),N=-1),x=!0;var Y=g;try{t:{for(C(z),p=n(f);p!==null&&!(p.expirationTime>z&&V());){var Q=p.callback;if(typeof Q=="function"){p.callback=null,g=p.priorityLevel;var K=Q(p.expirationTime<=z);if(z=e.unstable_now(),typeof K=="function"){p.callback=K,C(z),F=!0;break t}p===n(f)&&r(f),C(z)}else r(f);p=n(f)}if(p!==null)F=!0;else{var P=n(d);P!==null&&Z(j,P.startTime-z),F=!1}}break e}finally{p=null,g=Y,x=!1}F=void 0}}finally{F?L():R=!1}}}var L;if(typeof T=="function")L=function(){T(I)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,W=H.port2;H.port1.onmessage=I,L=function(){W.postMessage(null)}}else L=function(){O(I,0)};function Z(z,F){N=O(function(){z(e.unstable_now())},F)}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(z){z.callback=null},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(z){switch(g){case 1:case 2:case 3:var F=3;break;default:F=g}var Y=g;g=F;try{return z()}finally{g=Y}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(z,F){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var Y=g;g=z;try{return F()}finally{g=Y}},e.unstable_scheduleCallback=function(z,F,Y){var Q=e.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?Q+Y:Q):Y=Q,z){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=Y+K,z={id:m++,callback:F,priorityLevel:z,startTime:Y,expirationTime:K,sortIndex:-1},Y>Q?(z.sortIndex=Y,t(d,z),n(f)===null&&z===n(d)&&(S?(E(N),N=-1):S=!0,Z(j,Y-Q))):(z.sortIndex=K,t(f,z),A||x||(A=!0,R||(R=!0,L()))),z},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(z){var F=g;return function(){var Y=g;g=F;try{return z.apply(this,arguments)}finally{g=Y}}}})(hb)),hb}var QC;function qH(){return QC||(QC=1,db.exports=UH()),db.exports}var pb={exports:{}},Vn={};/**
26
- * @license React
27
- * react-dom.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var JC;function HH(){if(JC)return Vn;JC=1;var e=R_();function t(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)d+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+f+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function o(f,d,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:p==null?null:""+p,children:f,containerInfo:d,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return Vn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Vn.createPortal=function(f,d){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return o(f,d,null,m)},Vn.flushSync=function(f){var d=l.T,m=r.p;try{if(l.T=null,r.p=2,f)return f()}finally{l.T=d,r.p=m,r.d.f()}},Vn.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,r.d.C(f,d))},Vn.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},Vn.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var m=d.as,p=u(m,d.crossOrigin),g=typeof d.integrity=="string"?d.integrity:void 0,x=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;m==="style"?r.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:x}):m==="script"&&r.d.X(f,{crossOrigin:p,integrity:g,fetchPriority:x,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},Vn.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var m=u(d.as,d.crossOrigin);r.d.M(f,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&r.d.M(f)},Vn.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var m=d.as,p=u(m,d.crossOrigin);r.d.L(f,m,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},Vn.preloadModule=function(f,d){if(typeof f=="string")if(d){var m=u(d.as,d.crossOrigin);r.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else r.d.m(f)},Vn.requestFormReset=function(f){r.d.r(f)},Vn.unstable_batchedUpdates=function(f,d){return f(d)},Vn.useFormState=function(f,d,m){return l.H.useFormState(f,d,m)},Vn.useFormStatus=function(){return l.H.useHostTransitionStatus()},Vn.version="19.2.6",Vn}var e2;function pz(){if(e2)return pb.exports;e2=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(),pb.exports=HH(),pb.exports}/**
34
- * @license React
35
- * react-dom-client.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */var t2;function FH(){if(t2)return Ec;t2=1;var e=qH(),t=R_(),n=pz();function r(i){var s="https://react.dev/errors/"+i;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){var s=i,c=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(c=s.return),i=s.return;while(i)}return s.tag===3?c:null}function l(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function u(i){if(i.tag===31){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function f(i){if(o(i)!==i)throw Error(r(188))}function d(i){var s=i.alternate;if(!s){if(s=o(i),s===null)throw Error(r(188));return s!==i?null:i}for(var c=i,h=s;;){var b=c.return;if(b===null)break;var _=b.alternate;if(_===null){if(h=b.return,h!==null){c=h;continue}break}if(b.child===_.child){for(_=b.child;_;){if(_===c)return f(b),i;if(_===h)return f(b),s;_=_.sibling}throw Error(r(188))}if(c.return!==h.return)c=b,h=_;else{for(var M=!1,D=b.child;D;){if(D===c){M=!0,c=b,h=_;break}if(D===h){M=!0,h=b,c=_;break}D=D.sibling}if(!M){for(D=_.child;D;){if(D===c){M=!0,c=_,h=b;break}if(D===h){M=!0,h=_,c=b;break}D=D.sibling}if(!M)throw Error(r(189))}}if(c.alternate!==h)throw Error(r(190))}if(c.tag!==3)throw Error(r(188));return c.stateNode.current===c?i:s}function m(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i;for(i=i.child;i!==null;){if(s=m(i),s!==null)return s;i=i.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),T=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),V=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function L(i){return i===null||typeof i!="object"?null:(i=I&&i[I]||i["@@iterator"],typeof i=="function"?i:null)}var H=Symbol.for("react.client.reference");function W(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===H?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case S:return"Fragment";case O:return"Profiler";case w:return"StrictMode";case j:return"Suspense";case R:return"SuspenseList";case $:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case A:return"Portal";case T:return i.displayName||"Context";case E:return(i._context.displayName||"Context")+".Consumer";case C:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case N:return s=i.displayName||null,s!==null?s:W(i.type)||"Memo";case k:s=i._payload,i=i._init;try{return W(i(s))}catch{}}return null}var Z=Array.isArray,z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},Q=[],K=-1;function P(i){return{current:i}}function U(i){0>K||(i.current=Q[K],Q[K]=null,K--)}function ne(i,s){K++,Q[K]=i.current,i.current=s}var me=P(null),Ae=P(null),ce=P(null),de=P(null);function Ce(i,s){switch(ne(ce,s),ne(Ae,i),ne(me,null),s.nodeType){case 9:case 11:i=(i=s.documentElement)&&(i=i.namespaceURI)?vC(i):0;break;default:if(i=s.tagName,s=s.namespaceURI)s=vC(s),i=gC(s,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}U(me),ne(me,i)}function le(){U(me),U(Ae),U(ce)}function _e(i){i.memoizedState!==null&&ne(de,i);var s=me.current,c=gC(s,i.type);s!==c&&(ne(Ae,i),ne(me,c))}function Se(i){Ae.current===i&&(U(me),U(Ae)),de.current===i&&(U(de),wc._currentValue=Y)}var se,Ve;function $e(i){if(se===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);se=s&&s[1]||"",Ve=-1<c.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+se+i+Ve}var Je=!1;function Ke(i,s){if(!i||Je)return"";Je=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(s){var ge=function(){throw Error()};if(Object.defineProperty(ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ge,[])}catch(ue){var oe=ue}Reflect.construct(i,[],ge)}else{try{ge.call()}catch(ue){oe=ue}i.call(ge.prototype)}}else{try{throw Error()}catch(ue){oe=ue}(ge=i())&&typeof ge.catch=="function"&&ge.catch(function(){})}}catch(ue){if(ue&&oe&&typeof ue.stack=="string")return[ue.stack,oe.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var b=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");b&&b.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _=h.DetermineComponentFrameRoot(),M=_[0],D=_[1];if(M&&D){var G=M.split(`
44
- `),ie=D.split(`
45
- `);for(b=h=0;h<G.length&&!G[h].includes("DetermineComponentFrameRoot");)h++;for(;b<ie.length&&!ie[b].includes("DetermineComponentFrameRoot");)b++;if(h===G.length||b===ie.length)for(h=G.length-1,b=ie.length-1;1<=h&&0<=b&&G[h]!==ie[b];)b--;for(;1<=h&&0<=b;h--,b--)if(G[h]!==ie[b]){if(h!==1||b!==1)do if(h--,b--,0>b||G[h]!==ie[b]){var he=`
46
- `+G[h].replace(" at new "," at ");return i.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",i.displayName)),he}while(1<=h&&0<=b);break}}}finally{Je=!1,Error.prepareStackTrace=c}return(c=i?i.displayName||i.name:"")?$e(c):""}function vt(i,s){switch(i.tag){case 26:case 27:case 5:return $e(i.type);case 16:return $e("Lazy");case 13:return i.child!==s&&s!==null?$e("Suspense Fallback"):$e("Suspense");case 19:return $e("SuspenseList");case 0:case 15:return Ke(i.type,!1);case 11:return Ke(i.type.render,!1);case 1:return Ke(i.type,!0);case 31:return $e("Activity");default:return""}}function $t(i){try{var s="",c=null;do s+=vt(i,c),c=i,i=i.return;while(i);return s}catch(h){return`
47
- Error generating stack: `+h.message+`
48
- `+h.stack}}var qt=Object.prototype.hasOwnProperty,Tn=e.unstable_scheduleCallback,fn=e.unstable_cancelCallback,Pn=e.unstable_shouldYield,Hn=e.unstable_requestPaint,B=e.unstable_now,J=e.unstable_getCurrentPriorityLevel,ae=e.unstable_ImmediatePriority,Te=e.unstable_UserBlockingPriority,Ee=e.unstable_NormalPriority,Oe=e.unstable_LowPriority,Me=e.unstable_IdlePriority,qe=e.log,et=e.unstable_setDisableYieldValue,Ot=null,gt=null;function zt(i){if(typeof qe=="function"&&et(i),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(Ot,i)}catch{}}var dn=Math.clz32?Math.clz32:ua,mr=Math.log,la=Math.LN2;function ua(i){return i>>>=0,i===0?32:31-(mr(i)/la|0)|0}var Jn=256,vr=262144,or=4194304;function we(i){var s=i&42;if(s!==0)return s;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Fe(i,s,c){var h=i.pendingLanes;if(h===0)return 0;var b=0,_=i.suspendedLanes,M=i.pingedLanes;i=i.warmLanes;var D=h&134217727;return D!==0?(h=D&~_,h!==0?b=we(h):(M&=D,M!==0?b=we(M):c||(c=D&~i,c!==0&&(b=we(c))))):(D=h&~_,D!==0?b=we(D):M!==0?b=we(M):c||(c=h&~i,c!==0&&(b=we(c)))),b===0?0:s!==0&&s!==b&&(s&_)===0&&(_=b&-b,c=s&-s,_>=c||_===32&&(c&4194048)!==0)?s:b}function Re(i,s){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&s)===0}function it(i,s){switch(i){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Lt(){var i=or;return or<<=1,(or&62914560)===0&&(or=4194304),i}function te(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function be(i,s){i.pendingLanes|=s,s!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function fe(i,s,c,h,b,_){var M=i.pendingLanes;i.pendingLanes=c,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=c,i.entangledLanes&=c,i.errorRecoveryDisabledLanes&=c,i.shellSuspendCounter=0;var D=i.entanglements,G=i.expirationTimes,ie=i.hiddenUpdates;for(c=M&~c;0<c;){var he=31-dn(c),ge=1<<he;D[he]=0,G[he]=-1;var oe=ie[he];if(oe!==null)for(ie[he]=null,he=0;he<oe.length;he++){var ue=oe[he];ue!==null&&(ue.lane&=-536870913)}c&=~ge}h!==0&&Be(i,h,0),_!==0&&b===0&&i.tag!==0&&(i.suspendedLanes|=_&~(M&~s))}function Be(i,s,c){i.pendingLanes|=s,i.suspendedLanes&=~s;var h=31-dn(s);i.entangledLanes|=s,i.entanglements[h]=i.entanglements[h]|1073741824|c&261930}function ke(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var h=31-dn(c),b=1<<h;b&s|i[h]&s&&(i[h]|=s),c&=~b}}function Pe(i,s){var c=s&-s;return c=(c&42)!==0?1:Ue(c),(c&(i.suspendedLanes|s))!==0?0:c}function Ue(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function wt(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function tn(){var i=F.p;return i!==0?i:(i=window.event,i===void 0?32:BC(i.type))}function Io(i,s){var c=F.p;try{return F.p=i,s()}finally{F.p=c}}var ca=Math.random().toString(36).slice(2),xn="__reactFiber$"+ca,Fn="__reactProps$"+ca,ei="__reactContainer$"+ca,ku="__reactEvents$"+ca,E8="__reactListeners$"+ca,j8="__reactHandles$"+ca,rE="__reactResources$"+ca,$u="__reactMarker$"+ca;function tg(i){delete i[xn],delete i[Fn],delete i[ku],delete i[E8],delete i[j8]}function Is(i){var s=i[xn];if(s)return s;for(var c=i.parentNode;c;){if(s=c[ei]||c[xn]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=AC(i);i!==null;){if(c=i[xn])return c;i=AC(i)}return s}i=c,c=i.parentNode}return null}function Bs(i){if(i=i[xn]||i[ei]){var s=i.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return i}return null}function zu(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i.stateNode;throw Error(r(33))}function Us(i){var s=i[rE];return s||(s=i[rE]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Cn(i){i[$u]=!0}var aE=new Set,iE={};function Bo(i,s){qs(i,s),qs(i+"Capture",s)}function qs(i,s){for(iE[i]=s,i=0;i<s.length;i++)aE.add(s[i])}var T8=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),oE={},sE={};function C8(i){return qt.call(sE,i)?!0:qt.call(oE,i)?!1:T8.test(i)?sE[i]=!0:(oE[i]=!0,!1)}function xd(i,s,c){if(C8(s))if(c===null)i.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":i.removeAttribute(s);return;case"boolean":var h=s.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){i.removeAttribute(s);return}}i.setAttribute(s,""+c)}}function wd(i,s,c){if(c===null)i.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(s);return}i.setAttribute(s,""+c)}}function ti(i,s,c,h){if(h===null)i.removeAttribute(c);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(c);return}i.setAttributeNS(s,c,""+h)}}function kr(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function lE(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function R8(i,s,c){var h=Object.getOwnPropertyDescriptor(i.constructor.prototype,s);if(!i.hasOwnProperty(s)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var b=h.get,_=h.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return b.call(this)},set:function(M){c=""+M,_.call(this,M)}}),Object.defineProperty(i,s,{enumerable:h.enumerable}),{getValue:function(){return c},setValue:function(M){c=""+M},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function ng(i){if(!i._valueTracker){var s=lE(i)?"checked":"value";i._valueTracker=R8(i,s,""+i[s])}}function uE(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),h="";return i&&(h=lE(i)?i.checked?"true":"false":i.value),i=h,i!==c?(s.setValue(i),!0):!1}function Sd(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var N8=/[\n"\\]/g;function $r(i){return i.replace(N8,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function rg(i,s,c,h,b,_,M,D){i.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?i.type=M:i.removeAttribute("type"),s!=null?M==="number"?(s===0&&i.value===""||i.value!=s)&&(i.value=""+kr(s)):i.value!==""+kr(s)&&(i.value=""+kr(s)):M!=="submit"&&M!=="reset"||i.removeAttribute("value"),s!=null?ag(i,M,kr(s)):c!=null?ag(i,M,kr(c)):h!=null&&i.removeAttribute("value"),b==null&&_!=null&&(i.defaultChecked=!!_),b!=null&&(i.checked=b&&typeof b!="function"&&typeof b!="symbol"),D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?i.name=""+kr(D):i.removeAttribute("name")}function cE(i,s,c,h,b,_,M,D){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(i.type=_),s!=null||c!=null){if(!(_!=="submit"&&_!=="reset"||s!=null)){ng(i);return}c=c!=null?""+kr(c):"",s=s!=null?""+kr(s):c,D||s===i.value||(i.value=s),i.defaultValue=s}h=h??b,h=typeof h!="function"&&typeof h!="symbol"&&!!h,i.checked=D?i.checked:!!h,i.defaultChecked=!!h,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(i.name=M),ng(i)}function ag(i,s,c){s==="number"&&Sd(i.ownerDocument)===i||i.defaultValue===""+c||(i.defaultValue=""+c)}function Hs(i,s,c,h){if(i=i.options,s){s={};for(var b=0;b<c.length;b++)s["$"+c[b]]=!0;for(c=0;c<i.length;c++)b=s.hasOwnProperty("$"+i[c].value),i[c].selected!==b&&(i[c].selected=b),b&&h&&(i[c].defaultSelected=!0)}else{for(c=""+kr(c),s=null,b=0;b<i.length;b++){if(i[b].value===c){i[b].selected=!0,h&&(i[b].defaultSelected=!0);return}s!==null||i[b].disabled||(s=i[b])}s!==null&&(s.selected=!0)}}function fE(i,s,c){if(s!=null&&(s=""+kr(s),s!==i.value&&(i.value=s),c==null)){i.defaultValue!==s&&(i.defaultValue=s);return}i.defaultValue=c!=null?""+kr(c):""}function dE(i,s,c,h){if(s==null){if(h!=null){if(c!=null)throw Error(r(92));if(Z(h)){if(1<h.length)throw Error(r(93));h=h[0]}c=h}c==null&&(c=""),s=c}c=kr(s),i.defaultValue=c,h=i.textContent,h===c&&h!==""&&h!==null&&(i.value=h),ng(i)}function Fs(i,s){if(s){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var M8=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function hE(i,s,c){var h=s.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?h?i.setProperty(s,""):s==="float"?i.cssFloat="":i[s]="":h?i.setProperty(s,c):typeof c!="number"||c===0||M8.has(s)?s==="float"?i.cssFloat=c:i[s]=(""+c).trim():i[s]=c+"px"}function pE(i,s,c){if(s!=null&&typeof s!="object")throw Error(r(62));if(i=i.style,c!=null){for(var h in c)!c.hasOwnProperty(h)||s!=null&&s.hasOwnProperty(h)||(h.indexOf("--")===0?i.setProperty(h,""):h==="float"?i.cssFloat="":i[h]="");for(var b in s)h=s[b],s.hasOwnProperty(b)&&c[b]!==h&&hE(i,b,h)}else for(var _ in s)s.hasOwnProperty(_)&&hE(i,_,s[_])}function ig(i){if(i.indexOf("-")===-1)return!1;switch(i){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 P8=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),D8=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function _d(i){return D8.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function ni(){}var og=null;function sg(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Vs=null,Gs=null;function mE(i){var s=Bs(i);if(s&&(i=s.stateNode)){var c=i[Fn]||null;e:switch(i=s.stateNode,s.type){case"input":if(rg(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+$r(""+s)+'"][type="radio"]'),s=0;s<c.length;s++){var h=c[s];if(h!==i&&h.form===i.form){var b=h[Fn]||null;if(!b)throw Error(r(90));rg(h,b.value,b.defaultValue,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name)}}for(s=0;s<c.length;s++)h=c[s],h.form===i.form&&uE(h)}break e;case"textarea":fE(i,c.value,c.defaultValue);break e;case"select":s=c.value,s!=null&&Hs(i,!!c.multiple,s,!1)}}}var lg=!1;function vE(i,s,c){if(lg)return i(s,c);lg=!0;try{var h=i(s);return h}finally{if(lg=!1,(Vs!==null||Gs!==null)&&(ch(),Vs&&(s=Vs,i=Gs,Gs=Vs=null,mE(s),i)))for(s=0;s<i.length;s++)mE(i[s])}}function Lu(i,s){var c=i.stateNode;if(c===null)return null;var h=c[Fn]||null;if(h===null)return null;c=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(r(231,s,typeof c));return c}var ri=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ug=!1;if(ri)try{var Iu={};Object.defineProperty(Iu,"passive",{get:function(){ug=!0}}),window.addEventListener("test",Iu,Iu),window.removeEventListener("test",Iu,Iu)}catch{ug=!1}var Ii=null,cg=null,Ad=null;function gE(){if(Ad)return Ad;var i,s=cg,c=s.length,h,b="value"in Ii?Ii.value:Ii.textContent,_=b.length;for(i=0;i<c&&s[i]===b[i];i++);var M=c-i;for(h=1;h<=M&&s[c-h]===b[_-h];h++);return Ad=b.slice(i,1<h?1-h:void 0)}function Od(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Ed(){return!0}function yE(){return!1}function sr(i){function s(c,h,b,_,M){this._reactName=c,this._targetInst=b,this.type=h,this.nativeEvent=_,this.target=M,this.currentTarget=null;for(var D in i)i.hasOwnProperty(D)&&(c=i[D],this[D]=c?c(_):_[D]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?Ed:yE,this.isPropagationStopped=yE,this}return p(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Ed)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Ed)},persist:function(){},isPersistent:Ed}),s}var Uo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jd=sr(Uo),Bu=p({},Uo,{view:0,detail:0}),k8=sr(Bu),fg,dg,Uu,Td=p({},Bu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pg,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Uu&&(Uu&&i.type==="mousemove"?(fg=i.screenX-Uu.screenX,dg=i.screenY-Uu.screenY):dg=fg=0,Uu=i),fg)},movementY:function(i){return"movementY"in i?i.movementY:dg}}),bE=sr(Td),$8=p({},Td,{dataTransfer:0}),z8=sr($8),L8=p({},Bu,{relatedTarget:0}),hg=sr(L8),I8=p({},Uo,{animationName:0,elapsedTime:0,pseudoElement:0}),B8=sr(I8),U8=p({},Uo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),q8=sr(U8),H8=p({},Uo,{data:0}),xE=sr(H8),F8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},V8={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"},G8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function W8(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=G8[i])?!!s[i]:!1}function pg(){return W8}var Z8=p({},Bu,{key:function(i){if(i.key){var s=F8[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Od(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?V8[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pg,charCode:function(i){return i.type==="keypress"?Od(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Od(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),Y8=sr(Z8),K8=p({},Td,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wE=sr(K8),X8=p({},Bu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pg}),Q8=sr(X8),J8=p({},Uo,{propertyName:0,elapsedTime:0,pseudoElement:0}),eq=sr(J8),tq=p({},Td,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),nq=sr(tq),rq=p({},Uo,{newState:0,oldState:0}),aq=sr(rq),iq=[9,13,27,32],mg=ri&&"CompositionEvent"in window,qu=null;ri&&"documentMode"in document&&(qu=document.documentMode);var oq=ri&&"TextEvent"in window&&!qu,SE=ri&&(!mg||qu&&8<qu&&11>=qu),_E=" ",AE=!1;function OE(i,s){switch(i){case"keyup":return iq.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function EE(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ws=!1;function sq(i,s){switch(i){case"compositionend":return EE(s);case"keypress":return s.which!==32?null:(AE=!0,_E);case"textInput":return i=s.data,i===_E&&AE?null:i;default:return null}}function lq(i,s){if(Ws)return i==="compositionend"||!mg&&OE(i,s)?(i=gE(),Ad=cg=Ii=null,Ws=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return SE&&s.locale!=="ko"?null:s.data;default:return null}}var uq={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 jE(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!uq[i.type]:s==="textarea"}function TE(i,s,c,h){Vs?Gs?Gs.push(h):Gs=[h]:Vs=h,s=gh(s,"onChange"),0<s.length&&(c=new jd("onChange","change",null,c,h),i.push({event:c,listeners:s}))}var Hu=null,Fu=null;function cq(i){cC(i,0)}function Cd(i){var s=zu(i);if(uE(s))return i}function CE(i,s){if(i==="change")return s}var RE=!1;if(ri){var vg;if(ri){var gg="oninput"in document;if(!gg){var NE=document.createElement("div");NE.setAttribute("oninput","return;"),gg=typeof NE.oninput=="function"}vg=gg}else vg=!1;RE=vg&&(!document.documentMode||9<document.documentMode)}function ME(){Hu&&(Hu.detachEvent("onpropertychange",PE),Fu=Hu=null)}function PE(i){if(i.propertyName==="value"&&Cd(Fu)){var s=[];TE(s,Fu,i,sg(i)),vE(cq,s)}}function fq(i,s,c){i==="focusin"?(ME(),Hu=s,Fu=c,Hu.attachEvent("onpropertychange",PE)):i==="focusout"&&ME()}function dq(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Cd(Fu)}function hq(i,s){if(i==="click")return Cd(s)}function pq(i,s){if(i==="input"||i==="change")return Cd(s)}function mq(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var gr=typeof Object.is=="function"?Object.is:mq;function Vu(i,s){if(gr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var c=Object.keys(i),h=Object.keys(s);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var b=c[h];if(!qt.call(s,b)||!gr(i[b],s[b]))return!1}return!0}function DE(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function kE(i,s){var c=DE(i);i=0;for(var h;c;){if(c.nodeType===3){if(h=i+c.textContent.length,i<=s&&h>=s)return{node:c,offset:s-i};i=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=DE(c)}}function $E(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?$E(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function zE(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var s=Sd(i.document);s instanceof i.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)i=s.contentWindow;else break;s=Sd(i.document)}return s}function yg(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}var vq=ri&&"documentMode"in document&&11>=document.documentMode,Zs=null,bg=null,Gu=null,xg=!1;function LE(i,s,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;xg||Zs==null||Zs!==Sd(h)||(h=Zs,"selectionStart"in h&&yg(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Gu&&Vu(Gu,h)||(Gu=h,h=gh(bg,"onSelect"),0<h.length&&(s=new jd("onSelect","select",null,s,c),i.push({event:s,listeners:h}),s.target=Zs)))}function qo(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var Ys={animationend:qo("Animation","AnimationEnd"),animationiteration:qo("Animation","AnimationIteration"),animationstart:qo("Animation","AnimationStart"),transitionrun:qo("Transition","TransitionRun"),transitionstart:qo("Transition","TransitionStart"),transitioncancel:qo("Transition","TransitionCancel"),transitionend:qo("Transition","TransitionEnd")},wg={},IE={};ri&&(IE=document.createElement("div").style,"AnimationEvent"in window||(delete Ys.animationend.animation,delete Ys.animationiteration.animation,delete Ys.animationstart.animation),"TransitionEvent"in window||delete Ys.transitionend.transition);function Ho(i){if(wg[i])return wg[i];if(!Ys[i])return i;var s=Ys[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in IE)return wg[i]=s[c];return i}var BE=Ho("animationend"),UE=Ho("animationiteration"),qE=Ho("animationstart"),gq=Ho("transitionrun"),yq=Ho("transitionstart"),bq=Ho("transitioncancel"),HE=Ho("transitionend"),FE=new Map,Sg="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Sg.push("scrollEnd");function fa(i,s){FE.set(i,s),Bo(s,[i])}var Rd=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},zr=[],Ks=0,_g=0;function Nd(){for(var i=Ks,s=_g=Ks=0;s<i;){var c=zr[s];zr[s++]=null;var h=zr[s];zr[s++]=null;var b=zr[s];zr[s++]=null;var _=zr[s];if(zr[s++]=null,h!==null&&b!==null){var M=h.pending;M===null?b.next=b:(b.next=M.next,M.next=b),h.pending=b}_!==0&&VE(c,b,_)}}function Md(i,s,c,h){zr[Ks++]=i,zr[Ks++]=s,zr[Ks++]=c,zr[Ks++]=h,_g|=h,i.lanes|=h,i=i.alternate,i!==null&&(i.lanes|=h)}function Ag(i,s,c,h){return Md(i,s,c,h),Pd(i)}function Fo(i,s){return Md(i,null,null,s),Pd(i)}function VE(i,s,c){i.lanes|=c;var h=i.alternate;h!==null&&(h.lanes|=c);for(var b=!1,_=i.return;_!==null;)_.childLanes|=c,h=_.alternate,h!==null&&(h.childLanes|=c),_.tag===22&&(i=_.stateNode,i===null||i._visibility&1||(b=!0)),i=_,_=_.return;return i.tag===3?(_=i.stateNode,b&&s!==null&&(b=31-dn(c),i=_.hiddenUpdates,h=i[b],h===null?i[b]=[s]:h.push(s),s.lane=c|536870912),_):null}function Pd(i){if(50<pc)throw pc=0,Py=null,Error(r(185));for(var s=i.return;s!==null;)i=s,s=i.return;return i.tag===3?i.stateNode:null}var Xs={};function xq(i,s,c,h){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yr(i,s,c,h){return new xq(i,s,c,h)}function Og(i){return i=i.prototype,!(!i||!i.isReactComponent)}function ai(i,s){var c=i.alternate;return c===null?(c=yr(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&65011712,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c.refCleanup=i.refCleanup,c}function GE(i,s){i.flags&=65011714;var c=i.alternate;return c===null?(i.childLanes=0,i.lanes=s,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=c.childLanes,i.lanes=c.lanes,i.child=c.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=c.memoizedProps,i.memoizedState=c.memoizedState,i.updateQueue=c.updateQueue,i.type=c.type,s=c.dependencies,i.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),i}function Dd(i,s,c,h,b,_){var M=0;if(h=i,typeof i=="function")Og(i)&&(M=1);else if(typeof i=="string")M=OH(i,c,me.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case $:return i=yr(31,c,s,b),i.elementType=$,i.lanes=_,i;case S:return Vo(c.children,b,_,s);case w:M=8,b|=24;break;case O:return i=yr(12,c,s,b|2),i.elementType=O,i.lanes=_,i;case j:return i=yr(13,c,s,b),i.elementType=j,i.lanes=_,i;case R:return i=yr(19,c,s,b),i.elementType=R,i.lanes=_,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:M=10;break e;case E:M=9;break e;case C:M=11;break e;case N:M=14;break e;case k:M=16,h=null;break e}M=29,c=Error(r(130,i===null?"null":typeof i,"")),h=null}return s=yr(M,c,s,b),s.elementType=i,s.type=h,s.lanes=_,s}function Vo(i,s,c,h){return i=yr(7,i,h,s),i.lanes=c,i}function Eg(i,s,c){return i=yr(6,i,null,s),i.lanes=c,i}function WE(i){var s=yr(18,null,null,0);return s.stateNode=i,s}function jg(i,s,c){return s=yr(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}var ZE=new WeakMap;function Lr(i,s){if(typeof i=="object"&&i!==null){var c=ZE.get(i);return c!==void 0?c:(s={value:i,source:s,stack:$t(s)},ZE.set(i,s),s)}return{value:i,source:s,stack:$t(s)}}var Qs=[],Js=0,kd=null,Wu=0,Ir=[],Br=0,Bi=null,Na=1,Ma="";function ii(i,s){Qs[Js++]=Wu,Qs[Js++]=kd,kd=i,Wu=s}function YE(i,s,c){Ir[Br++]=Na,Ir[Br++]=Ma,Ir[Br++]=Bi,Bi=i;var h=Na;i=Ma;var b=32-dn(h)-1;h&=~(1<<b),c+=1;var _=32-dn(s)+b;if(30<_){var M=b-b%5;_=(h&(1<<M)-1).toString(32),h>>=M,b-=M,Na=1<<32-dn(s)+b|c<<b|h,Ma=_+i}else Na=1<<_|c<<b|h,Ma=i}function Tg(i){i.return!==null&&(ii(i,1),YE(i,1,0))}function Cg(i){for(;i===kd;)kd=Qs[--Js],Qs[Js]=null,Wu=Qs[--Js],Qs[Js]=null;for(;i===Bi;)Bi=Ir[--Br],Ir[Br]=null,Ma=Ir[--Br],Ir[Br]=null,Na=Ir[--Br],Ir[Br]=null}function KE(i,s){Ir[Br++]=Na,Ir[Br++]=Ma,Ir[Br++]=Bi,Na=s.id,Ma=s.overflow,Bi=i}var Dn=null,Ft=null,pt=!1,Ui=null,Ur=!1,Rg=Error(r(519));function qi(i){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Zu(Lr(s,i)),Rg}function XE(i){var s=i.stateNode,c=i.type,h=i.memoizedProps;switch(s[xn]=i,s[Fn]=h,c){case"dialog":lt("cancel",s),lt("close",s);break;case"iframe":case"object":case"embed":lt("load",s);break;case"video":case"audio":for(c=0;c<vc.length;c++)lt(vc[c],s);break;case"source":lt("error",s);break;case"img":case"image":case"link":lt("error",s),lt("load",s);break;case"details":lt("toggle",s);break;case"input":lt("invalid",s),cE(s,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":lt("invalid",s);break;case"textarea":lt("invalid",s),dE(s,h.value,h.defaultValue,h.children)}c=h.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||s.textContent===""+c||h.suppressHydrationWarning===!0||pC(s.textContent,c)?(h.popover!=null&&(lt("beforetoggle",s),lt("toggle",s)),h.onScroll!=null&&lt("scroll",s),h.onScrollEnd!=null&&lt("scrollend",s),h.onClick!=null&&(s.onclick=ni),s=!0):s=!1,s||qi(i,!0)}function QE(i){for(Dn=i.return;Dn;)switch(Dn.tag){case 5:case 31:case 13:Ur=!1;return;case 27:case 3:Ur=!0;return;default:Dn=Dn.return}}function el(i){if(i!==Dn)return!1;if(!pt)return QE(i),pt=!0,!1;var s=i.tag,c;if((c=s!==3&&s!==27)&&((c=s===5)&&(c=i.type,c=!(c!=="form"&&c!=="button")||Zy(i.type,i.memoizedProps)),c=!c),c&&Ft&&qi(i),QE(i),s===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Ft=_C(i)}else if(s===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Ft=_C(i)}else s===27?(s=Ft,no(i.type)?(i=Jy,Jy=null,Ft=i):Ft=s):Ft=Dn?Hr(i.stateNode.nextSibling):null;return!0}function Go(){Ft=Dn=null,pt=!1}function Ng(){var i=Ui;return i!==null&&(fr===null?fr=i:fr.push.apply(fr,i),Ui=null),i}function Zu(i){Ui===null?Ui=[i]:Ui.push(i)}var Mg=P(null),Wo=null,oi=null;function Hi(i,s,c){ne(Mg,s._currentValue),s._currentValue=c}function si(i){i._currentValue=Mg.current,U(Mg)}function Pg(i,s,c){for(;i!==null;){var h=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),i===c)break;i=i.return}}function Dg(i,s,c,h){var b=i.child;for(b!==null&&(b.return=i);b!==null;){var _=b.dependencies;if(_!==null){var M=b.child;_=_.firstContext;e:for(;_!==null;){var D=_;_=b;for(var G=0;G<s.length;G++)if(D.context===s[G]){_.lanes|=c,D=_.alternate,D!==null&&(D.lanes|=c),Pg(_.return,c,i),h||(M=null);break e}_=D.next}}else if(b.tag===18){if(M=b.return,M===null)throw Error(r(341));M.lanes|=c,_=M.alternate,_!==null&&(_.lanes|=c),Pg(M,c,i),M=null}else M=b.child;if(M!==null)M.return=b;else for(M=b;M!==null;){if(M===i){M=null;break}if(b=M.sibling,b!==null){b.return=M.return,M=b;break}M=M.return}b=M}}function tl(i,s,c,h){i=null;for(var b=s,_=!1;b!==null;){if(!_){if((b.flags&524288)!==0)_=!0;else if((b.flags&262144)!==0)break}if(b.tag===10){var M=b.alternate;if(M===null)throw Error(r(387));if(M=M.memoizedProps,M!==null){var D=b.type;gr(b.pendingProps.value,M.value)||(i!==null?i.push(D):i=[D])}}else if(b===de.current){if(M=b.alternate,M===null)throw Error(r(387));M.memoizedState.memoizedState!==b.memoizedState.memoizedState&&(i!==null?i.push(wc):i=[wc])}b=b.return}i!==null&&Dg(s,i,c,h),s.flags|=262144}function $d(i){for(i=i.firstContext;i!==null;){if(!gr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Zo(i){Wo=i,oi=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function kn(i){return JE(Wo,i)}function zd(i,s){return Wo===null&&Zo(i),JE(i,s)}function JE(i,s){var c=s._currentValue;if(s={context:s,memoizedValue:c,next:null},oi===null){if(i===null)throw Error(r(308));oi=s,i.dependencies={lanes:0,firstContext:s},i.flags|=524288}else oi=oi.next=s;return c}var wq=typeof AbortController<"u"?AbortController:function(){var i=[],s=this.signal={aborted:!1,addEventListener:function(c,h){i.push(h)}};this.abort=function(){s.aborted=!0,i.forEach(function(c){return c()})}},Sq=e.unstable_scheduleCallback,_q=e.unstable_NormalPriority,hn={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function kg(){return{controller:new wq,data:new Map,refCount:0}}function Yu(i){i.refCount--,i.refCount===0&&Sq(_q,function(){i.controller.abort()})}var Ku=null,$g=0,nl=0,rl=null;function Aq(i,s){if(Ku===null){var c=Ku=[];$g=0,nl=Iy(),rl={status:"pending",value:void 0,then:function(h){c.push(h)}}}return $g++,s.then(ej,ej),s}function ej(){if(--$g===0&&Ku!==null){rl!==null&&(rl.status="fulfilled");var i=Ku;Ku=null,nl=0,rl=null;for(var s=0;s<i.length;s++)(0,i[s])()}}function Oq(i,s){var c=[],h={status:"pending",value:null,reason:null,then:function(b){c.push(b)}};return i.then(function(){h.status="fulfilled",h.value=s;for(var b=0;b<c.length;b++)(0,c[b])(s)},function(b){for(h.status="rejected",h.reason=b,b=0;b<c.length;b++)(0,c[b])(void 0)}),h}var tj=z.S;z.S=function(i,s){LT=B(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&Aq(i,s),tj!==null&&tj(i,s)};var Yo=P(null);function zg(){var i=Yo.current;return i!==null?i:It.pooledCache}function Ld(i,s){s===null?ne(Yo,Yo.current):ne(Yo,s.pool)}function nj(){var i=zg();return i===null?null:{parent:hn._currentValue,pool:i}}var al=Error(r(460)),Lg=Error(r(474)),Id=Error(r(542)),Bd={then:function(){}};function rj(i){return i=i.status,i==="fulfilled"||i==="rejected"}function aj(i,s,c){switch(c=i[c],c===void 0?i.push(s):c!==s&&(s.then(ni,ni),s=c),s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,oj(i),i;default:if(typeof s.status=="string")s.then(ni,ni);else{if(i=It,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=s,i.status="pending",i.then(function(h){if(s.status==="pending"){var b=s;b.status="fulfilled",b.value=h}},function(h){if(s.status==="pending"){var b=s;b.status="rejected",b.reason=h}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,oj(i),i}throw Xo=s,al}}function Ko(i){try{var s=i._init;return s(i._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(Xo=c,al):c}}var Xo=null;function ij(){if(Xo===null)throw Error(r(459));var i=Xo;return Xo=null,i}function oj(i){if(i===al||i===Id)throw Error(r(483))}var il=null,Xu=0;function Ud(i){var s=Xu;return Xu+=1,il===null&&(il=[]),aj(il,i,s)}function Qu(i,s){s=s.props.ref,i.ref=s!==void 0?s:null}function qd(i,s){throw s.$$typeof===g?Error(r(525)):(i=Object.prototype.toString.call(s),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i)))}function sj(i){function s(ee,X){if(i){var re=ee.deletions;re===null?(ee.deletions=[X],ee.flags|=16):re.push(X)}}function c(ee,X){if(!i)return null;for(;X!==null;)s(ee,X),X=X.sibling;return null}function h(ee){for(var X=new Map;ee!==null;)ee.key!==null?X.set(ee.key,ee):X.set(ee.index,ee),ee=ee.sibling;return X}function b(ee,X){return ee=ai(ee,X),ee.index=0,ee.sibling=null,ee}function _(ee,X,re){return ee.index=re,i?(re=ee.alternate,re!==null?(re=re.index,re<X?(ee.flags|=67108866,X):re):(ee.flags|=67108866,X)):(ee.flags|=1048576,X)}function M(ee){return i&&ee.alternate===null&&(ee.flags|=67108866),ee}function D(ee,X,re,ve){return X===null||X.tag!==6?(X=Eg(re,ee.mode,ve),X.return=ee,X):(X=b(X,re),X.return=ee,X)}function G(ee,X,re,ve){var He=re.type;return He===S?he(ee,X,re.props.children,ve,re.key):X!==null&&(X.elementType===He||typeof He=="object"&&He!==null&&He.$$typeof===k&&Ko(He)===X.type)?(X=b(X,re.props),Qu(X,re),X.return=ee,X):(X=Dd(re.type,re.key,re.props,null,ee.mode,ve),Qu(X,re),X.return=ee,X)}function ie(ee,X,re,ve){return X===null||X.tag!==4||X.stateNode.containerInfo!==re.containerInfo||X.stateNode.implementation!==re.implementation?(X=jg(re,ee.mode,ve),X.return=ee,X):(X=b(X,re.children||[]),X.return=ee,X)}function he(ee,X,re,ve,He){return X===null||X.tag!==7?(X=Vo(re,ee.mode,ve,He),X.return=ee,X):(X=b(X,re),X.return=ee,X)}function ge(ee,X,re){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=Eg(""+X,ee.mode,re),X.return=ee,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case x:return re=Dd(X.type,X.key,X.props,null,ee.mode,re),Qu(re,X),re.return=ee,re;case A:return X=jg(X,ee.mode,re),X.return=ee,X;case k:return X=Ko(X),ge(ee,X,re)}if(Z(X)||L(X))return X=Vo(X,ee.mode,re,null),X.return=ee,X;if(typeof X.then=="function")return ge(ee,Ud(X),re);if(X.$$typeof===T)return ge(ee,zd(ee,X),re);qd(ee,X)}return null}function oe(ee,X,re,ve){var He=X!==null?X.key:null;if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return He!==null?null:D(ee,X,""+re,ve);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case x:return re.key===He?G(ee,X,re,ve):null;case A:return re.key===He?ie(ee,X,re,ve):null;case k:return re=Ko(re),oe(ee,X,re,ve)}if(Z(re)||L(re))return He!==null?null:he(ee,X,re,ve,null);if(typeof re.then=="function")return oe(ee,X,Ud(re),ve);if(re.$$typeof===T)return oe(ee,X,zd(ee,re),ve);qd(ee,re)}return null}function ue(ee,X,re,ve,He){if(typeof ve=="string"&&ve!==""||typeof ve=="number"||typeof ve=="bigint")return ee=ee.get(re)||null,D(X,ee,""+ve,He);if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case x:return ee=ee.get(ve.key===null?re:ve.key)||null,G(X,ee,ve,He);case A:return ee=ee.get(ve.key===null?re:ve.key)||null,ie(X,ee,ve,He);case k:return ve=Ko(ve),ue(ee,X,re,ve,He)}if(Z(ve)||L(ve))return ee=ee.get(re)||null,he(X,ee,ve,He,null);if(typeof ve.then=="function")return ue(ee,X,re,Ud(ve),He);if(ve.$$typeof===T)return ue(ee,X,re,zd(X,ve),He);qd(X,ve)}return null}function Le(ee,X,re,ve){for(var He=null,yt=null,Ie=X,nt=X=0,dt=null;Ie!==null&&nt<re.length;nt++){Ie.index>nt?(dt=Ie,Ie=null):dt=Ie.sibling;var bt=oe(ee,Ie,re[nt],ve);if(bt===null){Ie===null&&(Ie=dt);break}i&&Ie&&bt.alternate===null&&s(ee,Ie),X=_(bt,X,nt),yt===null?He=bt:yt.sibling=bt,yt=bt,Ie=dt}if(nt===re.length)return c(ee,Ie),pt&&ii(ee,nt),He;if(Ie===null){for(;nt<re.length;nt++)Ie=ge(ee,re[nt],ve),Ie!==null&&(X=_(Ie,X,nt),yt===null?He=Ie:yt.sibling=Ie,yt=Ie);return pt&&ii(ee,nt),He}for(Ie=h(Ie);nt<re.length;nt++)dt=ue(Ie,ee,nt,re[nt],ve),dt!==null&&(i&&dt.alternate!==null&&Ie.delete(dt.key===null?nt:dt.key),X=_(dt,X,nt),yt===null?He=dt:yt.sibling=dt,yt=dt);return i&&Ie.forEach(function(so){return s(ee,so)}),pt&&ii(ee,nt),He}function Ge(ee,X,re,ve){if(re==null)throw Error(r(151));for(var He=null,yt=null,Ie=X,nt=X=0,dt=null,bt=re.next();Ie!==null&&!bt.done;nt++,bt=re.next()){Ie.index>nt?(dt=Ie,Ie=null):dt=Ie.sibling;var so=oe(ee,Ie,bt.value,ve);if(so===null){Ie===null&&(Ie=dt);break}i&&Ie&&so.alternate===null&&s(ee,Ie),X=_(so,X,nt),yt===null?He=so:yt.sibling=so,yt=so,Ie=dt}if(bt.done)return c(ee,Ie),pt&&ii(ee,nt),He;if(Ie===null){for(;!bt.done;nt++,bt=re.next())bt=ge(ee,bt.value,ve),bt!==null&&(X=_(bt,X,nt),yt===null?He=bt:yt.sibling=bt,yt=bt);return pt&&ii(ee,nt),He}for(Ie=h(Ie);!bt.done;nt++,bt=re.next())bt=ue(Ie,ee,nt,bt.value,ve),bt!==null&&(i&&bt.alternate!==null&&Ie.delete(bt.key===null?nt:bt.key),X=_(bt,X,nt),yt===null?He=bt:yt.sibling=bt,yt=bt);return i&&Ie.forEach(function($H){return s(ee,$H)}),pt&&ii(ee,nt),He}function Mt(ee,X,re,ve){if(typeof re=="object"&&re!==null&&re.type===S&&re.key===null&&(re=re.props.children),typeof re=="object"&&re!==null){switch(re.$$typeof){case x:e:{for(var He=re.key;X!==null;){if(X.key===He){if(He=re.type,He===S){if(X.tag===7){c(ee,X.sibling),ve=b(X,re.props.children),ve.return=ee,ee=ve;break e}}else if(X.elementType===He||typeof He=="object"&&He!==null&&He.$$typeof===k&&Ko(He)===X.type){c(ee,X.sibling),ve=b(X,re.props),Qu(ve,re),ve.return=ee,ee=ve;break e}c(ee,X);break}else s(ee,X);X=X.sibling}re.type===S?(ve=Vo(re.props.children,ee.mode,ve,re.key),ve.return=ee,ee=ve):(ve=Dd(re.type,re.key,re.props,null,ee.mode,ve),Qu(ve,re),ve.return=ee,ee=ve)}return M(ee);case A:e:{for(He=re.key;X!==null;){if(X.key===He)if(X.tag===4&&X.stateNode.containerInfo===re.containerInfo&&X.stateNode.implementation===re.implementation){c(ee,X.sibling),ve=b(X,re.children||[]),ve.return=ee,ee=ve;break e}else{c(ee,X);break}else s(ee,X);X=X.sibling}ve=jg(re,ee.mode,ve),ve.return=ee,ee=ve}return M(ee);case k:return re=Ko(re),Mt(ee,X,re,ve)}if(Z(re))return Le(ee,X,re,ve);if(L(re)){if(He=L(re),typeof He!="function")throw Error(r(150));return re=He.call(re),Ge(ee,X,re,ve)}if(typeof re.then=="function")return Mt(ee,X,Ud(re),ve);if(re.$$typeof===T)return Mt(ee,X,zd(ee,re),ve);qd(ee,re)}return typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint"?(re=""+re,X!==null&&X.tag===6?(c(ee,X.sibling),ve=b(X,re),ve.return=ee,ee=ve):(c(ee,X),ve=Eg(re,ee.mode,ve),ve.return=ee,ee=ve),M(ee)):c(ee,X)}return function(ee,X,re,ve){try{Xu=0;var He=Mt(ee,X,re,ve);return il=null,He}catch(Ie){if(Ie===al||Ie===Id)throw Ie;var yt=yr(29,Ie,null,ee.mode);return yt.lanes=ve,yt.return=ee,yt}finally{}}}var Qo=sj(!0),lj=sj(!1),Fi=!1;function Ig(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bg(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Vi(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Gi(i,s,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(St&2)!==0){var b=h.pending;return b===null?s.next=s:(s.next=b.next,b.next=s),h.pending=s,s=Pd(i),VE(i,null,c),s}return Md(i,h,s,c),Pd(i)}function Ju(i,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194048)!==0)){var h=s.lanes;h&=i.pendingLanes,c|=h,s.lanes=c,ke(i,c)}}function Ug(i,s){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var b=null,_=null;if(c=c.firstBaseUpdate,c!==null){do{var M={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};_===null?b=_=M:_=_.next=M,c=c.next}while(c!==null);_===null?b=_=s:_=_.next=s}else b=_=s;c={baseState:h.baseState,firstBaseUpdate:b,lastBaseUpdate:_,shared:h.shared,callbacks:h.callbacks},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=s}var qg=!1;function ec(){if(qg){var i=rl;if(i!==null)throw i}}function tc(i,s,c,h){qg=!1;var b=i.updateQueue;Fi=!1;var _=b.firstBaseUpdate,M=b.lastBaseUpdate,D=b.shared.pending;if(D!==null){b.shared.pending=null;var G=D,ie=G.next;G.next=null,M===null?_=ie:M.next=ie,M=G;var he=i.alternate;he!==null&&(he=he.updateQueue,D=he.lastBaseUpdate,D!==M&&(D===null?he.firstBaseUpdate=ie:D.next=ie,he.lastBaseUpdate=G))}if(_!==null){var ge=b.baseState;M=0,he=ie=G=null,D=_;do{var oe=D.lane&-536870913,ue=oe!==D.lane;if(ue?(ft&oe)===oe:(h&oe)===oe){oe!==0&&oe===nl&&(qg=!0),he!==null&&(he=he.next={lane:0,tag:D.tag,payload:D.payload,callback:null,next:null});e:{var Le=i,Ge=D;oe=s;var Mt=c;switch(Ge.tag){case 1:if(Le=Ge.payload,typeof Le=="function"){ge=Le.call(Mt,ge,oe);break e}ge=Le;break e;case 3:Le.flags=Le.flags&-65537|128;case 0:if(Le=Ge.payload,oe=typeof Le=="function"?Le.call(Mt,ge,oe):Le,oe==null)break e;ge=p({},ge,oe);break e;case 2:Fi=!0}}oe=D.callback,oe!==null&&(i.flags|=64,ue&&(i.flags|=8192),ue=b.callbacks,ue===null?b.callbacks=[oe]:ue.push(oe))}else ue={lane:oe,tag:D.tag,payload:D.payload,callback:D.callback,next:null},he===null?(ie=he=ue,G=ge):he=he.next=ue,M|=oe;if(D=D.next,D===null){if(D=b.shared.pending,D===null)break;ue=D,D=ue.next,ue.next=null,b.lastBaseUpdate=ue,b.shared.pending=null}}while(!0);he===null&&(G=ge),b.baseState=G,b.firstBaseUpdate=ie,b.lastBaseUpdate=he,_===null&&(b.shared.lanes=0),Xi|=M,i.lanes=M,i.memoizedState=ge}}function uj(i,s){if(typeof i!="function")throw Error(r(191,i));i.call(s)}function cj(i,s){var c=i.callbacks;if(c!==null)for(i.callbacks=null,i=0;i<c.length;i++)uj(c[i],s)}var ol=P(null),Hd=P(0);function fj(i,s){i=vi,ne(Hd,i),ne(ol,s),vi=i|s.baseLanes}function Hg(){ne(Hd,vi),ne(ol,ol.current)}function Fg(){vi=Hd.current,U(ol),U(Hd)}var br=P(null),qr=null;function Wi(i){var s=i.alternate;ne(sn,sn.current&1),ne(br,i),qr===null&&(s===null||ol.current!==null||s.memoizedState!==null)&&(qr=i)}function Vg(i){ne(sn,sn.current),ne(br,i),qr===null&&(qr=i)}function dj(i){i.tag===22?(ne(sn,sn.current),ne(br,i),qr===null&&(qr=i)):Zi()}function Zi(){ne(sn,sn.current),ne(br,br.current)}function xr(i){U(br),qr===i&&(qr=null),U(sn)}var sn=P(0);function Fd(i){for(var s=i;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||Xy(c)||Qy(c)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var li=0,tt=null,Rt=null,pn=null,Vd=!1,sl=!1,Jo=!1,Gd=0,nc=0,ll=null,Eq=0;function nn(){throw Error(r(321))}function Gg(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!gr(i[c],s[c]))return!1;return!0}function Wg(i,s,c,h,b,_){return li=_,tt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,z.H=i===null||i.memoizedState===null?Yj:ly,Jo=!1,_=c(h,b),Jo=!1,sl&&(_=pj(s,c,h,b)),hj(i),_}function hj(i){z.H=ic;var s=Rt!==null&&Rt.next!==null;if(li=0,pn=Rt=tt=null,Vd=!1,nc=0,ll=null,s)throw Error(r(300));i===null||mn||(i=i.dependencies,i!==null&&$d(i)&&(mn=!0))}function pj(i,s,c,h){tt=i;var b=0;do{if(sl&&(ll=null),nc=0,sl=!1,25<=b)throw Error(r(301));if(b+=1,pn=Rt=null,i.updateQueue!=null){var _=i.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}z.H=Kj,_=s(c,h)}while(sl);return _}function jq(){var i=z.H,s=i.useState()[0];return s=typeof s.then=="function"?rc(s):s,i=i.useState()[0],(Rt!==null?Rt.memoizedState:null)!==i&&(tt.flags|=1024),s}function Zg(){var i=Gd!==0;return Gd=0,i}function Yg(i,s,c){s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~c}function Kg(i){if(Vd){for(i=i.memoizedState;i!==null;){var s=i.queue;s!==null&&(s.pending=null),i=i.next}Vd=!1}li=0,pn=Rt=tt=null,sl=!1,nc=Gd=0,ll=null}function er(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pn===null?tt.memoizedState=pn=i:pn=pn.next=i,pn}function ln(){if(Rt===null){var i=tt.alternate;i=i!==null?i.memoizedState:null}else i=Rt.next;var s=pn===null?tt.memoizedState:pn.next;if(s!==null)pn=s,Rt=i;else{if(i===null)throw tt.alternate===null?Error(r(467)):Error(r(310));Rt=i,i={memoizedState:Rt.memoizedState,baseState:Rt.baseState,baseQueue:Rt.baseQueue,queue:Rt.queue,next:null},pn===null?tt.memoizedState=pn=i:pn=pn.next=i}return pn}function Wd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function rc(i){var s=nc;return nc+=1,ll===null&&(ll=[]),i=aj(ll,i,s),s=tt,(pn===null?s.memoizedState:pn.next)===null&&(s=s.alternate,z.H=s===null||s.memoizedState===null?Yj:ly),i}function Zd(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return rc(i);if(i.$$typeof===T)return kn(i)}throw Error(r(438,String(i)))}function Xg(i){var s=null,c=tt.updateQueue;if(c!==null&&(s=c.memoCache),s==null){var h=tt.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(s={data:h.data.map(function(b){return b.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),c===null&&(c=Wd(),tt.updateQueue=c),c.memoCache=s,c=s.data[s.index],c===void 0)for(c=s.data[s.index]=Array(i),h=0;h<i;h++)c[h]=V;return s.index++,c}function ui(i,s){return typeof s=="function"?s(i):s}function Yd(i){var s=ln();return Qg(s,Rt,i)}function Qg(i,s,c){var h=i.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=c;var b=i.baseQueue,_=h.pending;if(_!==null){if(b!==null){var M=b.next;b.next=_.next,_.next=M}s.baseQueue=b=_,h.pending=null}if(_=i.baseState,b===null)i.memoizedState=_;else{s=b.next;var D=M=null,G=null,ie=s,he=!1;do{var ge=ie.lane&-536870913;if(ge!==ie.lane?(ft&ge)===ge:(li&ge)===ge){var oe=ie.revertLane;if(oe===0)G!==null&&(G=G.next={lane:0,revertLane:0,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),ge===nl&&(he=!0);else if((li&oe)===oe){ie=ie.next,oe===nl&&(he=!0);continue}else ge={lane:0,revertLane:ie.revertLane,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},G===null?(D=G=ge,M=_):G=G.next=ge,tt.lanes|=oe,Xi|=oe;ge=ie.action,Jo&&c(_,ge),_=ie.hasEagerState?ie.eagerState:c(_,ge)}else oe={lane:ge,revertLane:ie.revertLane,gesture:ie.gesture,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},G===null?(D=G=oe,M=_):G=G.next=oe,tt.lanes|=ge,Xi|=ge;ie=ie.next}while(ie!==null&&ie!==s);if(G===null?M=_:G.next=D,!gr(_,i.memoizedState)&&(mn=!0,he&&(c=rl,c!==null)))throw c;i.memoizedState=_,i.baseState=M,i.baseQueue=G,h.lastRenderedState=_}return b===null&&(h.lanes=0),[i.memoizedState,h.dispatch]}function Jg(i){var s=ln(),c=s.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=i;var h=c.dispatch,b=c.pending,_=s.memoizedState;if(b!==null){c.pending=null;var M=b=b.next;do _=i(_,M.action),M=M.next;while(M!==b);gr(_,s.memoizedState)||(mn=!0),s.memoizedState=_,s.baseQueue===null&&(s.baseState=_),c.lastRenderedState=_}return[_,h]}function mj(i,s,c){var h=tt,b=ln(),_=pt;if(_){if(c===void 0)throw Error(r(407));c=c()}else c=s();var M=!gr((Rt||b).memoizedState,c);if(M&&(b.memoizedState=c,mn=!0),b=b.queue,ny(yj.bind(null,h,b,i),[i]),b.getSnapshot!==s||M||pn!==null&&pn.memoizedState.tag&1){if(h.flags|=2048,ul(9,{destroy:void 0},gj.bind(null,h,b,c,s),null),It===null)throw Error(r(349));_||(li&127)!==0||vj(h,s,c)}return c}function vj(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=tt.updateQueue,s===null?(s=Wd(),tt.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function gj(i,s,c,h){s.value=c,s.getSnapshot=h,bj(s)&&xj(i)}function yj(i,s,c){return c(function(){bj(s)&&xj(i)})}function bj(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!gr(i,c)}catch{return!0}}function xj(i){var s=Fo(i,2);s!==null&&dr(s,i,2)}function ey(i){var s=er();if(typeof i=="function"){var c=i;if(i=c(),Jo){zt(!0);try{c()}finally{zt(!1)}}}return s.memoizedState=s.baseState=i,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ui,lastRenderedState:i},s}function wj(i,s,c,h){return i.baseState=c,Qg(i,Rt,typeof h=="function"?h:ui)}function Tq(i,s,c,h,b){if(Qd(i))throw Error(r(485));if(i=s.action,i!==null){var _={payload:b,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){_.listeners.push(M)}};z.T!==null?c(!0):_.isTransition=!1,h(_),c=s.pending,c===null?(_.next=s.pending=_,Sj(s,_)):(_.next=c.next,s.pending=c.next=_)}}function Sj(i,s){var c=s.action,h=s.payload,b=i.state;if(s.isTransition){var _=z.T,M={};z.T=M;try{var D=c(b,h),G=z.S;G!==null&&G(M,D),_j(i,s,D)}catch(ie){ty(i,s,ie)}finally{_!==null&&M.types!==null&&(_.types=M.types),z.T=_}}else try{_=c(b,h),_j(i,s,_)}catch(ie){ty(i,s,ie)}}function _j(i,s,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(h){Aj(i,s,h)},function(h){return ty(i,s,h)}):Aj(i,s,c)}function Aj(i,s,c){s.status="fulfilled",s.value=c,Oj(s),i.state=c,s=i.pending,s!==null&&(c=s.next,c===s?i.pending=null:(c=c.next,s.next=c,Sj(i,c)))}function ty(i,s,c){var h=i.pending;if(i.pending=null,h!==null){h=h.next;do s.status="rejected",s.reason=c,Oj(s),s=s.next;while(s!==h)}i.action=null}function Oj(i){i=i.listeners;for(var s=0;s<i.length;s++)(0,i[s])()}function Ej(i,s){return s}function jj(i,s){if(pt){var c=It.formState;if(c!==null){e:{var h=tt;if(pt){if(Ft){t:{for(var b=Ft,_=Ur;b.nodeType!==8;){if(!_){b=null;break t}if(b=Hr(b.nextSibling),b===null){b=null;break t}}_=b.data,b=_==="F!"||_==="F"?b:null}if(b){Ft=Hr(b.nextSibling),h=b.data==="F!";break e}}qi(h)}h=!1}h&&(s=c[0])}}return c=er(),c.memoizedState=c.baseState=s,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ej,lastRenderedState:s},c.queue=h,c=Gj.bind(null,tt,h),h.dispatch=c,h=ey(!1),_=sy.bind(null,tt,!1,h.queue),h=er(),b={state:s,dispatch:null,action:i,pending:null},h.queue=b,c=Tq.bind(null,tt,b,_,c),b.dispatch=c,h.memoizedState=i,[s,c,!1]}function Tj(i){var s=ln();return Cj(s,Rt,i)}function Cj(i,s,c){if(s=Qg(i,s,Ej)[0],i=Yd(ui)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var h=rc(s)}catch(M){throw M===al?Id:M}else h=s;s=ln();var b=s.queue,_=b.dispatch;return c!==s.memoizedState&&(tt.flags|=2048,ul(9,{destroy:void 0},Cq.bind(null,b,c),null)),[h,_,i]}function Cq(i,s){i.action=s}function Rj(i){var s=ln(),c=Rt;if(c!==null)return Cj(s,c,i);ln(),s=s.memoizedState,c=ln();var h=c.queue.dispatch;return c.memoizedState=i,[s,h,!1]}function ul(i,s,c,h){return i={tag:i,create:c,deps:h,inst:s,next:null},s=tt.updateQueue,s===null&&(s=Wd(),tt.updateQueue=s),c=s.lastEffect,c===null?s.lastEffect=i.next=i:(h=c.next,c.next=i,i.next=h,s.lastEffect=i),i}function Nj(){return ln().memoizedState}function Kd(i,s,c,h){var b=er();tt.flags|=i,b.memoizedState=ul(1|s,{destroy:void 0},c,h===void 0?null:h)}function Xd(i,s,c,h){var b=ln();h=h===void 0?null:h;var _=b.memoizedState.inst;Rt!==null&&h!==null&&Gg(h,Rt.memoizedState.deps)?b.memoizedState=ul(s,_,c,h):(tt.flags|=i,b.memoizedState=ul(1|s,_,c,h))}function Mj(i,s){Kd(8390656,8,i,s)}function ny(i,s){Xd(2048,8,i,s)}function Rq(i){tt.flags|=4;var s=tt.updateQueue;if(s===null)s=Wd(),tt.updateQueue=s,s.events=[i];else{var c=s.events;c===null?s.events=[i]:c.push(i)}}function Pj(i){var s=ln().memoizedState;return Rq({ref:s,nextImpl:i}),function(){if((St&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function Dj(i,s){return Xd(4,2,i,s)}function kj(i,s){return Xd(4,4,i,s)}function $j(i,s){if(typeof s=="function"){i=i();var c=s(i);return function(){typeof c=="function"?c():s(null)}}if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function zj(i,s,c){c=c!=null?c.concat([i]):null,Xd(4,4,$j.bind(null,s,i),c)}function ry(){}function Lj(i,s){var c=ln();s=s===void 0?null:s;var h=c.memoizedState;return s!==null&&Gg(s,h[1])?h[0]:(c.memoizedState=[i,s],i)}function Ij(i,s){var c=ln();s=s===void 0?null:s;var h=c.memoizedState;if(s!==null&&Gg(s,h[1]))return h[0];if(h=i(),Jo){zt(!0);try{i()}finally{zt(!1)}}return c.memoizedState=[h,s],h}function ay(i,s,c){return c===void 0||(li&1073741824)!==0&&(ft&261930)===0?i.memoizedState=s:(i.memoizedState=c,i=BT(),tt.lanes|=i,Xi|=i,c)}function Bj(i,s,c,h){return gr(c,s)?c:ol.current!==null?(i=ay(i,c,h),gr(i,s)||(mn=!0),i):(li&42)===0||(li&1073741824)!==0&&(ft&261930)===0?(mn=!0,i.memoizedState=c):(i=BT(),tt.lanes|=i,Xi|=i,s)}function Uj(i,s,c,h,b){var _=F.p;F.p=_!==0&&8>_?_:8;var M=z.T,D={};z.T=D,sy(i,!1,s,c);try{var G=b(),ie=z.S;if(ie!==null&&ie(D,G),G!==null&&typeof G=="object"&&typeof G.then=="function"){var he=Oq(G,h);ac(i,s,he,_r(i))}else ac(i,s,h,_r(i))}catch(ge){ac(i,s,{then:function(){},status:"rejected",reason:ge},_r())}finally{F.p=_,M!==null&&D.types!==null&&(M.types=D.types),z.T=M}}function Nq(){}function iy(i,s,c,h){if(i.tag!==5)throw Error(r(476));var b=qj(i).queue;Uj(i,b,s,Y,c===null?Nq:function(){return Hj(i),c(h)})}function qj(i){var s=i.memoizedState;if(s!==null)return s;s={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ui,lastRenderedState:Y},next:null};var c={};return s.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ui,lastRenderedState:c},next:null},i.memoizedState=s,i=i.alternate,i!==null&&(i.memoizedState=s),s}function Hj(i){var s=qj(i);s.next===null&&(s=i.alternate.memoizedState),ac(i,s.next.queue,{},_r())}function oy(){return kn(wc)}function Fj(){return ln().memoizedState}function Vj(){return ln().memoizedState}function Mq(i){for(var s=i.return;s!==null;){switch(s.tag){case 24:case 3:var c=_r();i=Vi(c);var h=Gi(s,i,c);h!==null&&(dr(h,s,c),Ju(h,s,c)),s={cache:kg()},i.payload=s;return}s=s.return}}function Pq(i,s,c){var h=_r();c={lane:h,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Qd(i)?Wj(s,c):(c=Ag(i,s,c,h),c!==null&&(dr(c,i,h),Zj(c,s,h)))}function Gj(i,s,c){var h=_r();ac(i,s,c,h)}function ac(i,s,c,h){var b={lane:h,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(Qd(i))Wj(s,b);else{var _=i.alternate;if(i.lanes===0&&(_===null||_.lanes===0)&&(_=s.lastRenderedReducer,_!==null))try{var M=s.lastRenderedState,D=_(M,c);if(b.hasEagerState=!0,b.eagerState=D,gr(D,M))return Md(i,s,b,0),It===null&&Nd(),!1}catch{}finally{}if(c=Ag(i,s,b,h),c!==null)return dr(c,i,h),Zj(c,s,h),!0}return!1}function sy(i,s,c,h){if(h={lane:2,revertLane:Iy(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},Qd(i)){if(s)throw Error(r(479))}else s=Ag(i,c,h,2),s!==null&&dr(s,i,2)}function Qd(i){var s=i.alternate;return i===tt||s!==null&&s===tt}function Wj(i,s){sl=Vd=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function Zj(i,s,c){if((c&4194048)!==0){var h=s.lanes;h&=i.pendingLanes,c|=h,s.lanes=c,ke(i,c)}}var ic={readContext:kn,use:Zd,useCallback:nn,useContext:nn,useEffect:nn,useImperativeHandle:nn,useLayoutEffect:nn,useInsertionEffect:nn,useMemo:nn,useReducer:nn,useRef:nn,useState:nn,useDebugValue:nn,useDeferredValue:nn,useTransition:nn,useSyncExternalStore:nn,useId:nn,useHostTransitionStatus:nn,useFormState:nn,useActionState:nn,useOptimistic:nn,useMemoCache:nn,useCacheRefresh:nn};ic.useEffectEvent=nn;var Yj={readContext:kn,use:Zd,useCallback:function(i,s){return er().memoizedState=[i,s===void 0?null:s],i},useContext:kn,useEffect:Mj,useImperativeHandle:function(i,s,c){c=c!=null?c.concat([i]):null,Kd(4194308,4,$j.bind(null,s,i),c)},useLayoutEffect:function(i,s){return Kd(4194308,4,i,s)},useInsertionEffect:function(i,s){Kd(4,2,i,s)},useMemo:function(i,s){var c=er();s=s===void 0?null:s;var h=i();if(Jo){zt(!0);try{i()}finally{zt(!1)}}return c.memoizedState=[h,s],h},useReducer:function(i,s,c){var h=er();if(c!==void 0){var b=c(s);if(Jo){zt(!0);try{c(s)}finally{zt(!1)}}}else b=s;return h.memoizedState=h.baseState=b,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:b},h.queue=i,i=i.dispatch=Pq.bind(null,tt,i),[h.memoizedState,i]},useRef:function(i){var s=er();return i={current:i},s.memoizedState=i},useState:function(i){i=ey(i);var s=i.queue,c=Gj.bind(null,tt,s);return s.dispatch=c,[i.memoizedState,c]},useDebugValue:ry,useDeferredValue:function(i,s){var c=er();return ay(c,i,s)},useTransition:function(){var i=ey(!1);return i=Uj.bind(null,tt,i.queue,!0,!1),er().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,s,c){var h=tt,b=er();if(pt){if(c===void 0)throw Error(r(407));c=c()}else{if(c=s(),It===null)throw Error(r(349));(ft&127)!==0||vj(h,s,c)}b.memoizedState=c;var _={value:c,getSnapshot:s};return b.queue=_,Mj(yj.bind(null,h,_,i),[i]),h.flags|=2048,ul(9,{destroy:void 0},gj.bind(null,h,_,c,s),null),c},useId:function(){var i=er(),s=It.identifierPrefix;if(pt){var c=Ma,h=Na;c=(h&~(1<<32-dn(h)-1)).toString(32)+c,s="_"+s+"R_"+c,c=Gd++,0<c&&(s+="H"+c.toString(32)),s+="_"}else c=Eq++,s="_"+s+"r_"+c.toString(32)+"_";return i.memoizedState=s},useHostTransitionStatus:oy,useFormState:jj,useActionState:jj,useOptimistic:function(i){var s=er();s.memoizedState=s.baseState=i;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=c,s=sy.bind(null,tt,!0,c),c.dispatch=s,[i,s]},useMemoCache:Xg,useCacheRefresh:function(){return er().memoizedState=Mq.bind(null,tt)},useEffectEvent:function(i){var s=er(),c={impl:i};return s.memoizedState=c,function(){if((St&2)!==0)throw Error(r(440));return c.impl.apply(void 0,arguments)}}},ly={readContext:kn,use:Zd,useCallback:Lj,useContext:kn,useEffect:ny,useImperativeHandle:zj,useInsertionEffect:Dj,useLayoutEffect:kj,useMemo:Ij,useReducer:Yd,useRef:Nj,useState:function(){return Yd(ui)},useDebugValue:ry,useDeferredValue:function(i,s){var c=ln();return Bj(c,Rt.memoizedState,i,s)},useTransition:function(){var i=Yd(ui)[0],s=ln().memoizedState;return[typeof i=="boolean"?i:rc(i),s]},useSyncExternalStore:mj,useId:Fj,useHostTransitionStatus:oy,useFormState:Tj,useActionState:Tj,useOptimistic:function(i,s){var c=ln();return wj(c,Rt,i,s)},useMemoCache:Xg,useCacheRefresh:Vj};ly.useEffectEvent=Pj;var Kj={readContext:kn,use:Zd,useCallback:Lj,useContext:kn,useEffect:ny,useImperativeHandle:zj,useInsertionEffect:Dj,useLayoutEffect:kj,useMemo:Ij,useReducer:Jg,useRef:Nj,useState:function(){return Jg(ui)},useDebugValue:ry,useDeferredValue:function(i,s){var c=ln();return Rt===null?ay(c,i,s):Bj(c,Rt.memoizedState,i,s)},useTransition:function(){var i=Jg(ui)[0],s=ln().memoizedState;return[typeof i=="boolean"?i:rc(i),s]},useSyncExternalStore:mj,useId:Fj,useHostTransitionStatus:oy,useFormState:Rj,useActionState:Rj,useOptimistic:function(i,s){var c=ln();return Rt!==null?wj(c,Rt,i,s):(c.baseState=i,[i,c.queue.dispatch])},useMemoCache:Xg,useCacheRefresh:Vj};Kj.useEffectEvent=Pj;function uy(i,s,c,h){s=i.memoizedState,c=c(h,s),c=c==null?s:p({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var cy={enqueueSetState:function(i,s,c){i=i._reactInternals;var h=_r(),b=Vi(h);b.payload=s,c!=null&&(b.callback=c),s=Gi(i,b,h),s!==null&&(dr(s,i,h),Ju(s,i,h))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var h=_r(),b=Vi(h);b.tag=1,b.payload=s,c!=null&&(b.callback=c),s=Gi(i,b,h),s!==null&&(dr(s,i,h),Ju(s,i,h))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=_r(),h=Vi(c);h.tag=2,s!=null&&(h.callback=s),s=Gi(i,h,c),s!==null&&(dr(s,i,c),Ju(s,i,c))}};function Xj(i,s,c,h,b,_,M){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,_,M):s.prototype&&s.prototype.isPureReactComponent?!Vu(c,h)||!Vu(b,_):!0}function Qj(i,s,c,h){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,h),s.state!==i&&cy.enqueueReplaceState(s,s.state,null)}function es(i,s){var c=s;if("ref"in s){c={};for(var h in s)h!=="ref"&&(c[h]=s[h])}if(i=i.defaultProps){c===s&&(c=p({},c));for(var b in i)c[b]===void 0&&(c[b]=i[b])}return c}function Jj(i){Rd(i)}function eT(i){console.error(i)}function tT(i){Rd(i)}function Jd(i,s){try{var c=i.onUncaughtError;c(s.value,{componentStack:s.stack})}catch(h){setTimeout(function(){throw h})}}function nT(i,s,c){try{var h=i.onCaughtError;h(c.value,{componentStack:c.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(b){setTimeout(function(){throw b})}}function fy(i,s,c){return c=Vi(c),c.tag=3,c.payload={element:null},c.callback=function(){Jd(i,s)},c}function rT(i){return i=Vi(i),i.tag=3,i}function aT(i,s,c,h){var b=c.type.getDerivedStateFromError;if(typeof b=="function"){var _=h.value;i.payload=function(){return b(_)},i.callback=function(){nT(s,c,h)}}var M=c.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(i.callback=function(){nT(s,c,h),typeof b!="function"&&(Qi===null?Qi=new Set([this]):Qi.add(this));var D=h.stack;this.componentDidCatch(h.value,{componentStack:D!==null?D:""})})}function Dq(i,s,c,h,b){if(c.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(s=c.alternate,s!==null&&tl(s,c,b,!0),c=br.current,c!==null){switch(c.tag){case 31:case 13:return qr===null?fh():c.alternate===null&&rn===0&&(rn=3),c.flags&=-257,c.flags|=65536,c.lanes=b,h===Bd?c.flags|=16384:(s=c.updateQueue,s===null?c.updateQueue=new Set([h]):s.add(h),$y(i,h,b)),!1;case 22:return c.flags|=65536,h===Bd?c.flags|=16384:(s=c.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([h])},c.updateQueue=s):(c=s.retryQueue,c===null?s.retryQueue=new Set([h]):c.add(h)),$y(i,h,b)),!1}throw Error(r(435,c.tag))}return $y(i,h,b),fh(),!1}if(pt)return s=br.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=b,h!==Rg&&(i=Error(r(422),{cause:h}),Zu(Lr(i,c)))):(h!==Rg&&(s=Error(r(423),{cause:h}),Zu(Lr(s,c))),i=i.current.alternate,i.flags|=65536,b&=-b,i.lanes|=b,h=Lr(h,c),b=fy(i.stateNode,h,b),Ug(i,b),rn!==4&&(rn=2)),!1;var _=Error(r(520),{cause:h});if(_=Lr(_,c),hc===null?hc=[_]:hc.push(_),rn!==4&&(rn=2),s===null)return!0;h=Lr(h,c),c=s;do{switch(c.tag){case 3:return c.flags|=65536,i=b&-b,c.lanes|=i,i=fy(c.stateNode,h,i),Ug(c,i),!1;case 1:if(s=c.type,_=c.stateNode,(c.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Qi===null||!Qi.has(_))))return c.flags|=65536,b&=-b,c.lanes|=b,b=rT(b),aT(b,i,c,h),Ug(c,b),!1}c=c.return}while(c!==null);return!1}var dy=Error(r(461)),mn=!1;function $n(i,s,c,h){s.child=i===null?lj(s,null,c,h):Qo(s,i.child,c,h)}function iT(i,s,c,h,b){c=c.render;var _=s.ref;if("ref"in h){var M={};for(var D in h)D!=="ref"&&(M[D]=h[D])}else M=h;return Zo(s),h=Wg(i,s,c,M,_,b),D=Zg(),i!==null&&!mn?(Yg(i,s,b),ci(i,s,b)):(pt&&D&&Tg(s),s.flags|=1,$n(i,s,h,b),s.child)}function oT(i,s,c,h,b){if(i===null){var _=c.type;return typeof _=="function"&&!Og(_)&&_.defaultProps===void 0&&c.compare===null?(s.tag=15,s.type=_,sT(i,s,_,h,b)):(i=Dd(c.type,null,h,s,s.mode,b),i.ref=s.ref,i.return=s,s.child=i)}if(_=i.child,!xy(i,b)){var M=_.memoizedProps;if(c=c.compare,c=c!==null?c:Vu,c(M,h)&&i.ref===s.ref)return ci(i,s,b)}return s.flags|=1,i=ai(_,h),i.ref=s.ref,i.return=s,s.child=i}function sT(i,s,c,h,b){if(i!==null){var _=i.memoizedProps;if(Vu(_,h)&&i.ref===s.ref)if(mn=!1,s.pendingProps=h=_,xy(i,b))(i.flags&131072)!==0&&(mn=!0);else return s.lanes=i.lanes,ci(i,s,b)}return hy(i,s,c,h,b)}function lT(i,s,c,h){var b=h.children,_=i!==null?i.memoizedState:null;if(i===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((s.flags&128)!==0){if(_=_!==null?_.baseLanes|c:c,i!==null){for(h=s.child=i.child,b=0;h!==null;)b=b|h.lanes|h.childLanes,h=h.sibling;h=b&~_}else h=0,s.child=null;return uT(i,s,_,c,h)}if((c&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},i!==null&&Ld(s,_!==null?_.cachePool:null),_!==null?fj(s,_):Hg(),dj(s);else return h=s.lanes=536870912,uT(i,s,_!==null?_.baseLanes|c:c,c,h)}else _!==null?(Ld(s,_.cachePool),fj(s,_),Zi(),s.memoizedState=null):(i!==null&&Ld(s,null),Hg(),Zi());return $n(i,s,b,c),s.child}function oc(i,s){return i!==null&&i.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function uT(i,s,c,h,b){var _=zg();return _=_===null?null:{parent:hn._currentValue,pool:_},s.memoizedState={baseLanes:c,cachePool:_},i!==null&&Ld(s,null),Hg(),dj(s),i!==null&&tl(i,s,h,!0),s.childLanes=b,null}function eh(i,s){return s=nh({mode:s.mode,children:s.children},i.mode),s.ref=i.ref,i.child=s,s.return=i,s}function cT(i,s,c){return Qo(s,i.child,null,c),i=eh(s,s.pendingProps),i.flags|=2,xr(s),s.memoizedState=null,i}function kq(i,s,c){var h=s.pendingProps,b=(s.flags&128)!==0;if(s.flags&=-129,i===null){if(pt){if(h.mode==="hidden")return i=eh(s,h),s.lanes=536870912,oc(null,i);if(Vg(s),(i=Ft)?(i=SC(i,Ur),i=i!==null&&i.data==="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:Bi!==null?{id:Na,overflow:Ma}:null,retryLane:536870912,hydrationErrors:null},c=WE(i),c.return=s,s.child=c,Dn=s,Ft=null)):i=null,i===null)throw qi(s);return s.lanes=536870912,null}return eh(s,h)}var _=i.memoizedState;if(_!==null){var M=_.dehydrated;if(Vg(s),b)if(s.flags&256)s.flags&=-257,s=cT(i,s,c);else if(s.memoizedState!==null)s.child=i.child,s.flags|=128,s=null;else throw Error(r(558));else if(mn||tl(i,s,c,!1),b=(c&i.childLanes)!==0,mn||b){if(h=It,h!==null&&(M=Pe(h,c),M!==0&&M!==_.retryLane))throw _.retryLane=M,Fo(i,M),dr(h,i,M),dy;fh(),s=cT(i,s,c)}else i=_.treeContext,Ft=Hr(M.nextSibling),Dn=s,pt=!0,Ui=null,Ur=!1,i!==null&&KE(s,i),s=eh(s,h),s.flags|=4096;return s}return i=ai(i.child,{mode:h.mode,children:h.children}),i.ref=s.ref,s.child=i,i.return=s,i}function th(i,s){var c=s.ref;if(c===null)i!==null&&i.ref!==null&&(s.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(r(284));(i===null||i.ref!==c)&&(s.flags|=4194816)}}function hy(i,s,c,h,b){return Zo(s),c=Wg(i,s,c,h,void 0,b),h=Zg(),i!==null&&!mn?(Yg(i,s,b),ci(i,s,b)):(pt&&h&&Tg(s),s.flags|=1,$n(i,s,c,b),s.child)}function fT(i,s,c,h,b,_){return Zo(s),s.updateQueue=null,c=pj(s,h,c,b),hj(i),h=Zg(),i!==null&&!mn?(Yg(i,s,_),ci(i,s,_)):(pt&&h&&Tg(s),s.flags|=1,$n(i,s,c,_),s.child)}function dT(i,s,c,h,b){if(Zo(s),s.stateNode===null){var _=Xs,M=c.contextType;typeof M=="object"&&M!==null&&(_=kn(M)),_=new c(h,_),s.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=cy,s.stateNode=_,_._reactInternals=s,_=s.stateNode,_.props=h,_.state=s.memoizedState,_.refs={},Ig(s),M=c.contextType,_.context=typeof M=="object"&&M!==null?kn(M):Xs,_.state=s.memoizedState,M=c.getDerivedStateFromProps,typeof M=="function"&&(uy(s,c,M,h),_.state=s.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(M=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),M!==_.state&&cy.enqueueReplaceState(_,_.state,null),tc(s,h,_,b),ec(),_.state=s.memoizedState),typeof _.componentDidMount=="function"&&(s.flags|=4194308),h=!0}else if(i===null){_=s.stateNode;var D=s.memoizedProps,G=es(c,D);_.props=G;var ie=_.context,he=c.contextType;M=Xs,typeof he=="object"&&he!==null&&(M=kn(he));var ge=c.getDerivedStateFromProps;he=typeof ge=="function"||typeof _.getSnapshotBeforeUpdate=="function",D=s.pendingProps!==D,he||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(D||ie!==M)&&Qj(s,_,h,M),Fi=!1;var oe=s.memoizedState;_.state=oe,tc(s,h,_,b),ec(),ie=s.memoizedState,D||oe!==ie||Fi?(typeof ge=="function"&&(uy(s,c,ge,h),ie=s.memoizedState),(G=Fi||Xj(s,c,G,h,oe,ie,M))?(he||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(s.flags|=4194308)):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=ie),_.props=h,_.state=ie,_.context=M,h=G):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{_=s.stateNode,Bg(i,s),M=s.memoizedProps,he=es(c,M),_.props=he,ge=s.pendingProps,oe=_.context,ie=c.contextType,G=Xs,typeof ie=="object"&&ie!==null&&(G=kn(ie)),D=c.getDerivedStateFromProps,(ie=typeof D=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(M!==ge||oe!==G)&&Qj(s,_,h,G),Fi=!1,oe=s.memoizedState,_.state=oe,tc(s,h,_,b),ec();var ue=s.memoizedState;M!==ge||oe!==ue||Fi||i!==null&&i.dependencies!==null&&$d(i.dependencies)?(typeof D=="function"&&(uy(s,c,D,h),ue=s.memoizedState),(he=Fi||Xj(s,c,he,h,oe,ue,G)||i!==null&&i.dependencies!==null&&$d(i.dependencies))?(ie||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(h,ue,G),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(h,ue,G)),typeof _.componentDidUpdate=="function"&&(s.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof _.componentDidUpdate!="function"||M===i.memoizedProps&&oe===i.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&oe===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=ue),_.props=h,_.state=ue,_.context=G,h=he):(typeof _.componentDidUpdate!="function"||M===i.memoizedProps&&oe===i.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&oe===i.memoizedState||(s.flags|=1024),h=!1)}return _=h,th(i,s),h=(s.flags&128)!==0,_||h?(_=s.stateNode,c=h&&typeof c.getDerivedStateFromError!="function"?null:_.render(),s.flags|=1,i!==null&&h?(s.child=Qo(s,i.child,null,b),s.child=Qo(s,null,c,b)):$n(i,s,c,b),s.memoizedState=_.state,i=s.child):i=ci(i,s,b),i}function hT(i,s,c,h){return Go(),s.flags|=256,$n(i,s,c,h),s.child}var py={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function my(i){return{baseLanes:i,cachePool:nj()}}function vy(i,s,c){return i=i!==null?i.childLanes&~c:0,s&&(i|=Sr),i}function pT(i,s,c){var h=s.pendingProps,b=!1,_=(s.flags&128)!==0,M;if((M=_)||(M=i!==null&&i.memoizedState===null?!1:(sn.current&2)!==0),M&&(b=!0,s.flags&=-129),M=(s.flags&32)!==0,s.flags&=-33,i===null){if(pt){if(b?Wi(s):Zi(),(i=Ft)?(i=SC(i,Ur),i=i!==null&&i.data!=="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:Bi!==null?{id:Na,overflow:Ma}:null,retryLane:536870912,hydrationErrors:null},c=WE(i),c.return=s,s.child=c,Dn=s,Ft=null)):i=null,i===null)throw qi(s);return Qy(i)?s.lanes=32:s.lanes=536870912,null}var D=h.children;return h=h.fallback,b?(Zi(),b=s.mode,D=nh({mode:"hidden",children:D},b),h=Vo(h,b,c,null),D.return=s,h.return=s,D.sibling=h,s.child=D,h=s.child,h.memoizedState=my(c),h.childLanes=vy(i,M,c),s.memoizedState=py,oc(null,h)):(Wi(s),gy(s,D))}var G=i.memoizedState;if(G!==null&&(D=G.dehydrated,D!==null)){if(_)s.flags&256?(Wi(s),s.flags&=-257,s=yy(i,s,c)):s.memoizedState!==null?(Zi(),s.child=i.child,s.flags|=128,s=null):(Zi(),D=h.fallback,b=s.mode,h=nh({mode:"visible",children:h.children},b),D=Vo(D,b,c,null),D.flags|=2,h.return=s,D.return=s,h.sibling=D,s.child=h,Qo(s,i.child,null,c),h=s.child,h.memoizedState=my(c),h.childLanes=vy(i,M,c),s.memoizedState=py,s=oc(null,h));else if(Wi(s),Qy(D)){if(M=D.nextSibling&&D.nextSibling.dataset,M)var ie=M.dgst;M=ie,h=Error(r(419)),h.stack="",h.digest=M,Zu({value:h,source:null,stack:null}),s=yy(i,s,c)}else if(mn||tl(i,s,c,!1),M=(c&i.childLanes)!==0,mn||M){if(M=It,M!==null&&(h=Pe(M,c),h!==0&&h!==G.retryLane))throw G.retryLane=h,Fo(i,h),dr(M,i,h),dy;Xy(D)||fh(),s=yy(i,s,c)}else Xy(D)?(s.flags|=192,s.child=i.child,s=null):(i=G.treeContext,Ft=Hr(D.nextSibling),Dn=s,pt=!0,Ui=null,Ur=!1,i!==null&&KE(s,i),s=gy(s,h.children),s.flags|=4096);return s}return b?(Zi(),D=h.fallback,b=s.mode,G=i.child,ie=G.sibling,h=ai(G,{mode:"hidden",children:h.children}),h.subtreeFlags=G.subtreeFlags&65011712,ie!==null?D=ai(ie,D):(D=Vo(D,b,c,null),D.flags|=2),D.return=s,h.return=s,h.sibling=D,s.child=h,oc(null,h),h=s.child,D=i.child.memoizedState,D===null?D=my(c):(b=D.cachePool,b!==null?(G=hn._currentValue,b=b.parent!==G?{parent:G,pool:G}:b):b=nj(),D={baseLanes:D.baseLanes|c,cachePool:b}),h.memoizedState=D,h.childLanes=vy(i,M,c),s.memoizedState=py,oc(i.child,h)):(Wi(s),c=i.child,i=c.sibling,c=ai(c,{mode:"visible",children:h.children}),c.return=s,c.sibling=null,i!==null&&(M=s.deletions,M===null?(s.deletions=[i],s.flags|=16):M.push(i)),s.child=c,s.memoizedState=null,c)}function gy(i,s){return s=nh({mode:"visible",children:s},i.mode),s.return=i,i.child=s}function nh(i,s){return i=yr(22,i,null,s),i.lanes=0,i}function yy(i,s,c){return Qo(s,i.child,null,c),i=gy(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function mT(i,s,c){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),Pg(i.return,s,c)}function by(i,s,c,h,b,_){var M=i.memoizedState;M===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:b,treeForkCount:_}:(M.isBackwards=s,M.rendering=null,M.renderingStartTime=0,M.last=h,M.tail=c,M.tailMode=b,M.treeForkCount=_)}function vT(i,s,c){var h=s.pendingProps,b=h.revealOrder,_=h.tail;h=h.children;var M=sn.current,D=(M&2)!==0;if(D?(M=M&1|2,s.flags|=128):M&=1,ne(sn,M),$n(i,s,h,c),h=pt?Wu:0,!D&&i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&mT(i,c,s);else if(i.tag===19)mT(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(b){case"forwards":for(c=s.child,b=null;c!==null;)i=c.alternate,i!==null&&Fd(i)===null&&(b=c),c=c.sibling;c=b,c===null?(b=s.child,s.child=null):(b=c.sibling,c.sibling=null),by(s,!1,b,c,_,h);break;case"backwards":case"unstable_legacy-backwards":for(c=null,b=s.child,s.child=null;b!==null;){if(i=b.alternate,i!==null&&Fd(i)===null){s.child=b;break}i=b.sibling,b.sibling=c,c=b,b=i}by(s,!0,c,null,_,h);break;case"together":by(s,!1,null,null,void 0,h);break;default:s.memoizedState=null}return s.child}function ci(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Xi|=s.lanes,(c&s.childLanes)===0)if(i!==null){if(tl(i,s,c,!1),(c&s.childLanes)===0)return null}else return null;if(i!==null&&s.child!==i.child)throw Error(r(153));if(s.child!==null){for(i=s.child,c=ai(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=ai(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function xy(i,s){return(i.lanes&s)!==0?!0:(i=i.dependencies,!!(i!==null&&$d(i)))}function $q(i,s,c){switch(s.tag){case 3:Ce(s,s.stateNode.containerInfo),Hi(s,hn,i.memoizedState.cache),Go();break;case 27:case 5:_e(s);break;case 4:Ce(s,s.stateNode.containerInfo);break;case 10:Hi(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Vg(s),null;break;case 13:var h=s.memoizedState;if(h!==null)return h.dehydrated!==null?(Wi(s),s.flags|=128,null):(c&s.child.childLanes)!==0?pT(i,s,c):(Wi(s),i=ci(i,s,c),i!==null?i.sibling:null);Wi(s);break;case 19:var b=(i.flags&128)!==0;if(h=(c&s.childLanes)!==0,h||(tl(i,s,c,!1),h=(c&s.childLanes)!==0),b){if(h)return vT(i,s,c);s.flags|=128}if(b=s.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),ne(sn,sn.current),h)break;return null;case 22:return s.lanes=0,lT(i,s,c,s.pendingProps);case 24:Hi(s,hn,i.memoizedState.cache)}return ci(i,s,c)}function gT(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps)mn=!0;else{if(!xy(i,c)&&(s.flags&128)===0)return mn=!1,$q(i,s,c);mn=(i.flags&131072)!==0}else mn=!1,pt&&(s.flags&1048576)!==0&&YE(s,Wu,s.index);switch(s.lanes=0,s.tag){case 16:e:{var h=s.pendingProps;if(i=Ko(s.elementType),s.type=i,typeof i=="function")Og(i)?(h=es(i,h),s.tag=1,s=dT(null,s,i,h,c)):(s.tag=0,s=hy(null,s,i,h,c));else{if(i!=null){var b=i.$$typeof;if(b===C){s.tag=11,s=iT(null,s,i,h,c);break e}else if(b===N){s.tag=14,s=oT(null,s,i,h,c);break e}}throw s=W(i)||i,Error(r(306,s,""))}}return s;case 0:return hy(i,s,s.type,s.pendingProps,c);case 1:return h=s.type,b=es(h,s.pendingProps),dT(i,s,h,b,c);case 3:e:{if(Ce(s,s.stateNode.containerInfo),i===null)throw Error(r(387));h=s.pendingProps;var _=s.memoizedState;b=_.element,Bg(i,s),tc(s,h,null,c);var M=s.memoizedState;if(h=M.cache,Hi(s,hn,h),h!==_.cache&&Dg(s,[hn],c,!0),ec(),h=M.element,_.isDehydrated)if(_={element:h,isDehydrated:!1,cache:M.cache},s.updateQueue.baseState=_,s.memoizedState=_,s.flags&256){s=hT(i,s,h,c);break e}else if(h!==b){b=Lr(Error(r(424)),s),Zu(b),s=hT(i,s,h,c);break e}else{switch(i=s.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(Ft=Hr(i.firstChild),Dn=s,pt=!0,Ui=null,Ur=!0,c=lj(s,null,h,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling}else{if(Go(),h===b){s=ci(i,s,c);break e}$n(i,s,h,c)}s=s.child}return s;case 26:return th(i,s),i===null?(c=TC(s.type,null,s.pendingProps,null))?s.memoizedState=c:pt||(c=s.type,i=s.pendingProps,h=yh(ce.current).createElement(c),h[xn]=s,h[Fn]=i,zn(h,c,i),Cn(h),s.stateNode=h):s.memoizedState=TC(s.type,i.memoizedProps,s.pendingProps,i.memoizedState),null;case 27:return _e(s),i===null&&pt&&(h=s.stateNode=OC(s.type,s.pendingProps,ce.current),Dn=s,Ur=!0,b=Ft,no(s.type)?(Jy=b,Ft=Hr(h.firstChild)):Ft=b),$n(i,s,s.pendingProps.children,c),th(i,s),i===null&&(s.flags|=4194304),s.child;case 5:return i===null&&pt&&((b=h=Ft)&&(h=dH(h,s.type,s.pendingProps,Ur),h!==null?(s.stateNode=h,Dn=s,Ft=Hr(h.firstChild),Ur=!1,b=!0):b=!1),b||qi(s)),_e(s),b=s.type,_=s.pendingProps,M=i!==null?i.memoizedProps:null,h=_.children,Zy(b,_)?h=null:M!==null&&Zy(b,M)&&(s.flags|=32),s.memoizedState!==null&&(b=Wg(i,s,jq,null,null,c),wc._currentValue=b),th(i,s),$n(i,s,h,c),s.child;case 6:return i===null&&pt&&((i=c=Ft)&&(c=hH(c,s.pendingProps,Ur),c!==null?(s.stateNode=c,Dn=s,Ft=null,i=!0):i=!1),i||qi(s)),null;case 13:return pT(i,s,c);case 4:return Ce(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=Qo(s,null,h,c):$n(i,s,h,c),s.child;case 11:return iT(i,s,s.type,s.pendingProps,c);case 7:return $n(i,s,s.pendingProps,c),s.child;case 8:return $n(i,s,s.pendingProps.children,c),s.child;case 12:return $n(i,s,s.pendingProps.children,c),s.child;case 10:return h=s.pendingProps,Hi(s,s.type,h.value),$n(i,s,h.children,c),s.child;case 9:return b=s.type._context,h=s.pendingProps.children,Zo(s),b=kn(b),h=h(b),s.flags|=1,$n(i,s,h,c),s.child;case 14:return oT(i,s,s.type,s.pendingProps,c);case 15:return sT(i,s,s.type,s.pendingProps,c);case 19:return vT(i,s,c);case 31:return kq(i,s,c);case 22:return lT(i,s,c,s.pendingProps);case 24:return Zo(s),h=kn(hn),i===null?(b=zg(),b===null&&(b=It,_=kg(),b.pooledCache=_,_.refCount++,_!==null&&(b.pooledCacheLanes|=c),b=_),s.memoizedState={parent:h,cache:b},Ig(s),Hi(s,hn,b)):((i.lanes&c)!==0&&(Bg(i,s),tc(s,null,null,c),ec()),b=i.memoizedState,_=s.memoizedState,b.parent!==h?(b={parent:h,cache:h},s.memoizedState=b,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=b),Hi(s,hn,h)):(h=_.cache,Hi(s,hn,h),h!==b.cache&&Dg(s,[hn],c,!0))),$n(i,s,s.pendingProps.children,c),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function fi(i){i.flags|=4}function wy(i,s,c,h,b){if((s=(i.mode&32)!==0)&&(s=!1),s){if(i.flags|=16777216,(b&335544128)===b)if(i.stateNode.complete)i.flags|=8192;else if(FT())i.flags|=8192;else throw Xo=Bd,Lg}else i.flags&=-16777217}function yT(i,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!PC(s))if(FT())i.flags|=8192;else throw Xo=Bd,Lg}function rh(i,s){s!==null&&(i.flags|=4),i.flags&16384&&(s=i.tag!==22?Lt():536870912,i.lanes|=s,hl|=s)}function sc(i,s){if(!pt)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function Vt(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,h=0;if(s)for(var b=i.child;b!==null;)c|=b.lanes|b.childLanes,h|=b.subtreeFlags&65011712,h|=b.flags&65011712,b.return=i,b=b.sibling;else for(b=i.child;b!==null;)c|=b.lanes|b.childLanes,h|=b.subtreeFlags,h|=b.flags,b.return=i,b=b.sibling;return i.subtreeFlags|=h,i.childLanes=c,s}function zq(i,s,c){var h=s.pendingProps;switch(Cg(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vt(s),null;case 1:return Vt(s),null;case 3:return c=s.stateNode,h=null,i!==null&&(h=i.memoizedState.cache),s.memoizedState.cache!==h&&(s.flags|=2048),si(hn),le(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(i===null||i.child===null)&&(el(s)?fi(s):i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Ng())),Vt(s),null;case 26:var b=s.type,_=s.memoizedState;return i===null?(fi(s),_!==null?(Vt(s),yT(s,_)):(Vt(s),wy(s,b,null,h,c))):_?_!==i.memoizedState?(fi(s),Vt(s),yT(s,_)):(Vt(s),s.flags&=-16777217):(i=i.memoizedProps,i!==h&&fi(s),Vt(s),wy(s,b,i,h,c)),null;case 27:if(Se(s),c=ce.current,b=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==h&&fi(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return Vt(s),null}i=me.current,el(s)?XE(s):(i=OC(b,h,c),s.stateNode=i,fi(s))}return Vt(s),null;case 5:if(Se(s),b=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==h&&fi(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return Vt(s),null}if(_=me.current,el(s))XE(s);else{var M=yh(ce.current);switch(_){case 1:_=M.createElementNS("http://www.w3.org/2000/svg",b);break;case 2:_=M.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;default:switch(b){case"svg":_=M.createElementNS("http://www.w3.org/2000/svg",b);break;case"math":_=M.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;case"script":_=M.createElement("div"),_.innerHTML="<script><\/script>",_=_.removeChild(_.firstChild);break;case"select":_=typeof h.is=="string"?M.createElement("select",{is:h.is}):M.createElement("select"),h.multiple?_.multiple=!0:h.size&&(_.size=h.size);break;default:_=typeof h.is=="string"?M.createElement(b,{is:h.is}):M.createElement(b)}}_[xn]=s,_[Fn]=h;e:for(M=s.child;M!==null;){if(M.tag===5||M.tag===6)_.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===s)break e;for(;M.sibling===null;){if(M.return===null||M.return===s)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}s.stateNode=_;e:switch(zn(_,b,h),b){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&fi(s)}}return Vt(s),wy(s,s.type,i===null?null:i.memoizedProps,s.pendingProps,c),null;case 6:if(i&&s.stateNode!=null)i.memoizedProps!==h&&fi(s);else{if(typeof h!="string"&&s.stateNode===null)throw Error(r(166));if(i=ce.current,el(s)){if(i=s.stateNode,c=s.memoizedProps,h=null,b=Dn,b!==null)switch(b.tag){case 27:case 5:h=b.memoizedProps}i[xn]=s,i=!!(i.nodeValue===c||h!==null&&h.suppressHydrationWarning===!0||pC(i.nodeValue,c)),i||qi(s,!0)}else i=yh(i).createTextNode(h),i[xn]=s,s.stateNode=i}return Vt(s),null;case 31:if(c=s.memoizedState,i===null||i.memoizedState!==null){if(h=el(s),c!==null){if(i===null){if(!h)throw Error(r(318));if(i=s.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[xn]=s}else Go(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Vt(s),i=!1}else c=Ng(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=c),i=!0;if(!i)return s.flags&256?(xr(s),s):(xr(s),null);if((s.flags&128)!==0)throw Error(r(558))}return Vt(s),null;case 13:if(h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(b=el(s),h!==null&&h.dehydrated!==null){if(i===null){if(!b)throw Error(r(318));if(b=s.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(r(317));b[xn]=s}else Go(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Vt(s),b=!1}else b=Ng(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=b),b=!0;if(!b)return s.flags&256?(xr(s),s):(xr(s),null)}return xr(s),(s.flags&128)!==0?(s.lanes=c,s):(c=h!==null,i=i!==null&&i.memoizedState!==null,c&&(h=s.child,b=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(b=h.alternate.memoizedState.cachePool.pool),_=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(_=h.memoizedState.cachePool.pool),_!==b&&(h.flags|=2048)),c!==i&&c&&(s.child.flags|=8192),rh(s,s.updateQueue),Vt(s),null);case 4:return le(),i===null&&Hy(s.stateNode.containerInfo),Vt(s),null;case 10:return si(s.type),Vt(s),null;case 19:if(U(sn),h=s.memoizedState,h===null)return Vt(s),null;if(b=(s.flags&128)!==0,_=h.rendering,_===null)if(b)sc(h,!1);else{if(rn!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(_=Fd(i),_!==null){for(s.flags|=128,sc(h,!1),i=_.updateQueue,s.updateQueue=i,rh(s,i),s.subtreeFlags=0,i=c,c=s.child;c!==null;)GE(c,i),c=c.sibling;return ne(sn,sn.current&1|2),pt&&ii(s,h.treeForkCount),s.child}i=i.sibling}h.tail!==null&&B()>lh&&(s.flags|=128,b=!0,sc(h,!1),s.lanes=4194304)}else{if(!b)if(i=Fd(_),i!==null){if(s.flags|=128,b=!0,i=i.updateQueue,s.updateQueue=i,rh(s,i),sc(h,!0),h.tail===null&&h.tailMode==="hidden"&&!_.alternate&&!pt)return Vt(s),null}else 2*B()-h.renderingStartTime>lh&&c!==536870912&&(s.flags|=128,b=!0,sc(h,!1),s.lanes=4194304);h.isBackwards?(_.sibling=s.child,s.child=_):(i=h.last,i!==null?i.sibling=_:s.child=_,h.last=_)}return h.tail!==null?(i=h.tail,h.rendering=i,h.tail=i.sibling,h.renderingStartTime=B(),i.sibling=null,c=sn.current,ne(sn,b?c&1|2:c&1),pt&&ii(s,h.treeForkCount),i):(Vt(s),null);case 22:case 23:return xr(s),Fg(),h=s.memoizedState!==null,i!==null?i.memoizedState!==null!==h&&(s.flags|=8192):h&&(s.flags|=8192),h?(c&536870912)!==0&&(s.flags&128)===0&&(Vt(s),s.subtreeFlags&6&&(s.flags|=8192)):Vt(s),c=s.updateQueue,c!==null&&rh(s,c.retryQueue),c=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==c&&(s.flags|=2048),i!==null&&U(Yo),null;case 24:return c=null,i!==null&&(c=i.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),si(hn),Vt(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function Lq(i,s){switch(Cg(s),s.tag){case 1:return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return si(hn),le(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 26:case 27:case 5:return Se(s),null;case 31:if(s.memoizedState!==null){if(xr(s),s.alternate===null)throw Error(r(340));Go()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 13:if(xr(s),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Go()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return U(sn),null;case 4:return le(),null;case 10:return si(s.type),null;case 22:case 23:return xr(s),Fg(),i!==null&&U(Yo),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 24:return si(hn),null;case 25:return null;default:return null}}function bT(i,s){switch(Cg(s),s.tag){case 3:si(hn),le();break;case 26:case 27:case 5:Se(s);break;case 4:le();break;case 31:s.memoizedState!==null&&xr(s);break;case 13:xr(s);break;case 19:U(sn);break;case 10:si(s.type);break;case 22:case 23:xr(s),Fg(),i!==null&&U(Yo);break;case 24:si(hn)}}function lc(i,s){try{var c=s.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var b=h.next;c=b;do{if((c.tag&i)===i){h=void 0;var _=c.create,M=c.inst;h=_(),M.destroy=h}c=c.next}while(c!==b)}}catch(D){jt(s,s.return,D)}}function Yi(i,s,c){try{var h=s.updateQueue,b=h!==null?h.lastEffect:null;if(b!==null){var _=b.next;h=_;do{if((h.tag&i)===i){var M=h.inst,D=M.destroy;if(D!==void 0){M.destroy=void 0,b=s;var G=c,ie=D;try{ie()}catch(he){jt(b,G,he)}}}h=h.next}while(h!==_)}}catch(he){jt(s,s.return,he)}}function xT(i){var s=i.updateQueue;if(s!==null){var c=i.stateNode;try{cj(s,c)}catch(h){jt(i,i.return,h)}}}function wT(i,s,c){c.props=es(i.type,i.memoizedProps),c.state=i.memoizedState;try{c.componentWillUnmount()}catch(h){jt(i,s,h)}}function uc(i,s){try{var c=i.ref;if(c!==null){switch(i.tag){case 26:case 27:case 5:var h=i.stateNode;break;case 30:h=i.stateNode;break;default:h=i.stateNode}typeof c=="function"?i.refCleanup=c(h):c.current=h}}catch(b){jt(i,s,b)}}function Pa(i,s){var c=i.ref,h=i.refCleanup;if(c!==null)if(typeof h=="function")try{h()}catch(b){jt(i,s,b)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(b){jt(i,s,b)}else c.current=null}function ST(i){var s=i.type,c=i.memoizedProps,h=i.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":c.autoFocus&&h.focus();break e;case"img":c.src?h.src=c.src:c.srcSet&&(h.srcset=c.srcSet)}}catch(b){jt(i,i.return,b)}}function Sy(i,s,c){try{var h=i.stateNode;oH(h,i.type,c,s),h[Fn]=s}catch(b){jt(i,i.return,b)}}function _T(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&no(i.type)||i.tag===4}function _y(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||_T(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&no(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Ay(i,s,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(i,s):(s=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,s.appendChild(i),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=ni));else if(h!==4&&(h===27&&no(i.type)&&(c=i.stateNode,s=null),i=i.child,i!==null))for(Ay(i,s,c),i=i.sibling;i!==null;)Ay(i,s,c),i=i.sibling}function ah(i,s,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(h!==4&&(h===27&&no(i.type)&&(c=i.stateNode),i=i.child,i!==null))for(ah(i,s,c),i=i.sibling;i!==null;)ah(i,s,c),i=i.sibling}function AT(i){var s=i.stateNode,c=i.memoizedProps;try{for(var h=i.type,b=s.attributes;b.length;)s.removeAttributeNode(b[0]);zn(s,h,c),s[xn]=i,s[Fn]=c}catch(_){jt(i,i.return,_)}}var di=!1,vn=!1,Oy=!1,OT=typeof WeakSet=="function"?WeakSet:Set,Rn=null;function Iq(i,s){if(i=i.containerInfo,Gy=Oh,i=zE(i),yg(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var b=h.anchorOffset,_=h.focusNode;h=h.focusOffset;try{c.nodeType,_.nodeType}catch{c=null;break e}var M=0,D=-1,G=-1,ie=0,he=0,ge=i,oe=null;t:for(;;){for(var ue;ge!==c||b!==0&&ge.nodeType!==3||(D=M+b),ge!==_||h!==0&&ge.nodeType!==3||(G=M+h),ge.nodeType===3&&(M+=ge.nodeValue.length),(ue=ge.firstChild)!==null;)oe=ge,ge=ue;for(;;){if(ge===i)break t;if(oe===c&&++ie===b&&(D=M),oe===_&&++he===h&&(G=M),(ue=ge.nextSibling)!==null)break;ge=oe,oe=ge.parentNode}ge=ue}c=D===-1||G===-1?null:{start:D,end:G}}else c=null}c=c||{start:0,end:0}}else c=null;for(Wy={focusedElem:i,selectionRange:c},Oh=!1,Rn=s;Rn!==null;)if(s=Rn,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Rn=i;else for(;Rn!==null;){switch(s=Rn,_=s.alternate,i=s.flags,s.tag){case 0:if((i&4)!==0&&(i=s.updateQueue,i=i!==null?i.events:null,i!==null))for(c=0;c<i.length;c++)b=i[c],b.ref.impl=b.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&_!==null){i=void 0,c=s,b=_.memoizedProps,_=_.memoizedState,h=c.stateNode;try{var Le=es(c.type,b);i=h.getSnapshotBeforeUpdate(Le,_),h.__reactInternalSnapshotBeforeUpdate=i}catch(Ge){jt(c,c.return,Ge)}}break;case 3:if((i&1024)!==0){if(i=s.stateNode.containerInfo,c=i.nodeType,c===9)Ky(i);else if(c===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Ky(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=s.sibling,i!==null){i.return=s.return,Rn=i;break}Rn=s.return}}function ET(i,s,c){var h=c.flags;switch(c.tag){case 0:case 11:case 15:pi(i,c),h&4&&lc(5,c);break;case 1:if(pi(i,c),h&4)if(i=c.stateNode,s===null)try{i.componentDidMount()}catch(M){jt(c,c.return,M)}else{var b=es(c.type,s.memoizedProps);s=s.memoizedState;try{i.componentDidUpdate(b,s,i.__reactInternalSnapshotBeforeUpdate)}catch(M){jt(c,c.return,M)}}h&64&&xT(c),h&512&&uc(c,c.return);break;case 3:if(pi(i,c),h&64&&(i=c.updateQueue,i!==null)){if(s=null,c.child!==null)switch(c.child.tag){case 27:case 5:s=c.child.stateNode;break;case 1:s=c.child.stateNode}try{cj(i,s)}catch(M){jt(c,c.return,M)}}break;case 27:s===null&&h&4&&AT(c);case 26:case 5:pi(i,c),s===null&&h&4&&ST(c),h&512&&uc(c,c.return);break;case 12:pi(i,c);break;case 31:pi(i,c),h&4&&CT(i,c);break;case 13:pi(i,c),h&4&&RT(i,c),h&64&&(i=c.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(c=Zq.bind(null,c),pH(i,c))));break;case 22:if(h=c.memoizedState!==null||di,!h){s=s!==null&&s.memoizedState!==null||vn,b=di;var _=vn;di=h,(vn=s)&&!_?mi(i,c,(c.subtreeFlags&8772)!==0):pi(i,c),di=b,vn=_}break;case 30:break;default:pi(i,c)}}function jT(i){var s=i.alternate;s!==null&&(i.alternate=null,jT(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&tg(s)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var Yt=null,lr=!1;function hi(i,s,c){for(c=c.child;c!==null;)TT(i,s,c),c=c.sibling}function TT(i,s,c){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Ot,c)}catch{}switch(c.tag){case 26:vn||Pa(c,s),hi(i,s,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:vn||Pa(c,s);var h=Yt,b=lr;no(c.type)&&(Yt=c.stateNode,lr=!1),hi(i,s,c),yc(c.stateNode),Yt=h,lr=b;break;case 5:vn||Pa(c,s);case 6:if(h=Yt,b=lr,Yt=null,hi(i,s,c),Yt=h,lr=b,Yt!==null)if(lr)try{(Yt.nodeType===9?Yt.body:Yt.nodeName==="HTML"?Yt.ownerDocument.body:Yt).removeChild(c.stateNode)}catch(_){jt(c,s,_)}else try{Yt.removeChild(c.stateNode)}catch(_){jt(c,s,_)}break;case 18:Yt!==null&&(lr?(i=Yt,xC(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,c.stateNode),wl(i)):xC(Yt,c.stateNode));break;case 4:h=Yt,b=lr,Yt=c.stateNode.containerInfo,lr=!0,hi(i,s,c),Yt=h,lr=b;break;case 0:case 11:case 14:case 15:Yi(2,c,s),vn||Yi(4,c,s),hi(i,s,c);break;case 1:vn||(Pa(c,s),h=c.stateNode,typeof h.componentWillUnmount=="function"&&wT(c,s,h)),hi(i,s,c);break;case 21:hi(i,s,c);break;case 22:vn=(h=vn)||c.memoizedState!==null,hi(i,s,c),vn=h;break;default:hi(i,s,c)}}function CT(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{wl(i)}catch(c){jt(s,s.return,c)}}}function RT(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{wl(i)}catch(c){jt(s,s.return,c)}}function Bq(i){switch(i.tag){case 31:case 13:case 19:var s=i.stateNode;return s===null&&(s=i.stateNode=new OT),s;case 22:return i=i.stateNode,s=i._retryCache,s===null&&(s=i._retryCache=new OT),s;default:throw Error(r(435,i.tag))}}function ih(i,s){var c=Bq(i);s.forEach(function(h){if(!c.has(h)){c.add(h);var b=Yq.bind(null,i,h);h.then(b,b)}})}function ur(i,s){var c=s.deletions;if(c!==null)for(var h=0;h<c.length;h++){var b=c[h],_=i,M=s,D=M;e:for(;D!==null;){switch(D.tag){case 27:if(no(D.type)){Yt=D.stateNode,lr=!1;break e}break;case 5:Yt=D.stateNode,lr=!1;break e;case 3:case 4:Yt=D.stateNode.containerInfo,lr=!0;break e}D=D.return}if(Yt===null)throw Error(r(160));TT(_,M,b),Yt=null,lr=!1,_=b.alternate,_!==null&&(_.return=null),b.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)NT(s,i),s=s.sibling}var da=null;function NT(i,s){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:ur(s,i),cr(i),h&4&&(Yi(3,i,i.return),lc(3,i),Yi(5,i,i.return));break;case 1:ur(s,i),cr(i),h&512&&(vn||c===null||Pa(c,c.return)),h&64&&di&&(i=i.updateQueue,i!==null&&(h=i.callbacks,h!==null&&(c=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=c===null?h:c.concat(h))));break;case 26:var b=da;if(ur(s,i),cr(i),h&512&&(vn||c===null||Pa(c,c.return)),h&4){var _=c!==null?c.memoizedState:null;if(h=i.memoizedState,c===null)if(h===null)if(i.stateNode===null){e:{h=i.type,c=i.memoizedProps,b=b.ownerDocument||b;t:switch(h){case"title":_=b.getElementsByTagName("title")[0],(!_||_[$u]||_[xn]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=b.createElement(h),b.head.insertBefore(_,b.querySelector("head > title"))),zn(_,h,c),_[xn]=i,Cn(_),h=_;break e;case"link":var M=NC("link","href",b).get(h+(c.href||""));if(M){for(var D=0;D<M.length;D++)if(_=M[D],_.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&_.getAttribute("rel")===(c.rel==null?null:c.rel)&&_.getAttribute("title")===(c.title==null?null:c.title)&&_.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){M.splice(D,1);break t}}_=b.createElement(h),zn(_,h,c),b.head.appendChild(_);break;case"meta":if(M=NC("meta","content",b).get(h+(c.content||""))){for(D=0;D<M.length;D++)if(_=M[D],_.getAttribute("content")===(c.content==null?null:""+c.content)&&_.getAttribute("name")===(c.name==null?null:c.name)&&_.getAttribute("property")===(c.property==null?null:c.property)&&_.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&_.getAttribute("charset")===(c.charSet==null?null:c.charSet)){M.splice(D,1);break t}}_=b.createElement(h),zn(_,h,c),b.head.appendChild(_);break;default:throw Error(r(468,h))}_[xn]=i,Cn(_),h=_}i.stateNode=h}else MC(b,i.type,i.stateNode);else i.stateNode=RC(b,h,i.memoizedProps);else _!==h?(_===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):_.count--,h===null?MC(b,i.type,i.stateNode):RC(b,h,i.memoizedProps)):h===null&&i.stateNode!==null&&Sy(i,i.memoizedProps,c.memoizedProps)}break;case 27:ur(s,i),cr(i),h&512&&(vn||c===null||Pa(c,c.return)),c!==null&&h&4&&Sy(i,i.memoizedProps,c.memoizedProps);break;case 5:if(ur(s,i),cr(i),h&512&&(vn||c===null||Pa(c,c.return)),i.flags&32){b=i.stateNode;try{Fs(b,"")}catch(Le){jt(i,i.return,Le)}}h&4&&i.stateNode!=null&&(b=i.memoizedProps,Sy(i,b,c!==null?c.memoizedProps:b)),h&1024&&(Oy=!0);break;case 6:if(ur(s,i),cr(i),h&4){if(i.stateNode===null)throw Error(r(162));h=i.memoizedProps,c=i.stateNode;try{c.nodeValue=h}catch(Le){jt(i,i.return,Le)}}break;case 3:if(wh=null,b=da,da=bh(s.containerInfo),ur(s,i),da=b,cr(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{wl(s.containerInfo)}catch(Le){jt(i,i.return,Le)}Oy&&(Oy=!1,MT(i));break;case 4:h=da,da=bh(i.stateNode.containerInfo),ur(s,i),cr(i),da=h;break;case 12:ur(s,i),cr(i);break;case 31:ur(s,i),cr(i),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,ih(i,h)));break;case 13:ur(s,i),cr(i),i.child.flags&8192&&i.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(sh=B()),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,ih(i,h)));break;case 22:b=i.memoizedState!==null;var G=c!==null&&c.memoizedState!==null,ie=di,he=vn;if(di=ie||b,vn=he||G,ur(s,i),vn=he,di=ie,cr(i),h&8192)e:for(s=i.stateNode,s._visibility=b?s._visibility&-2:s._visibility|1,b&&(c===null||G||di||vn||ts(i)),c=null,s=i;;){if(s.tag===5||s.tag===26){if(c===null){G=c=s;try{if(_=G.stateNode,b)M=_.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{D=G.stateNode;var ge=G.memoizedProps.style,oe=ge!=null&&ge.hasOwnProperty("display")?ge.display:null;D.style.display=oe==null||typeof oe=="boolean"?"":(""+oe).trim()}}catch(Le){jt(G,G.return,Le)}}}else if(s.tag===6){if(c===null){G=s;try{G.stateNode.nodeValue=b?"":G.memoizedProps}catch(Le){jt(G,G.return,Le)}}}else if(s.tag===18){if(c===null){G=s;try{var ue=G.stateNode;b?wC(ue,!0):wC(G.stateNode,!1)}catch(Le){jt(G,G.return,Le)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===i)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;s.sibling===null;){if(s.return===null||s.return===i)break e;c===s&&(c=null),s=s.return}c===s&&(c=null),s.sibling.return=s.return,s=s.sibling}h&4&&(h=i.updateQueue,h!==null&&(c=h.retryQueue,c!==null&&(h.retryQueue=null,ih(i,c))));break;case 19:ur(s,i),cr(i),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,ih(i,h)));break;case 30:break;case 21:break;default:ur(s,i),cr(i)}}function cr(i){var s=i.flags;if(s&2){try{for(var c,h=i.return;h!==null;){if(_T(h)){c=h;break}h=h.return}if(c==null)throw Error(r(160));switch(c.tag){case 27:var b=c.stateNode,_=_y(i);ah(i,_,b);break;case 5:var M=c.stateNode;c.flags&32&&(Fs(M,""),c.flags&=-33);var D=_y(i);ah(i,D,M);break;case 3:case 4:var G=c.stateNode.containerInfo,ie=_y(i);Ay(i,ie,G);break;default:throw Error(r(161))}}catch(he){jt(i,i.return,he)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function MT(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var s=i;MT(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),i=i.sibling}}function pi(i,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)ET(i,s.alternate,s),s=s.sibling}function ts(i){for(i=i.child;i!==null;){var s=i;switch(s.tag){case 0:case 11:case 14:case 15:Yi(4,s,s.return),ts(s);break;case 1:Pa(s,s.return);var c=s.stateNode;typeof c.componentWillUnmount=="function"&&wT(s,s.return,c),ts(s);break;case 27:yc(s.stateNode);case 26:case 5:Pa(s,s.return),ts(s);break;case 22:s.memoizedState===null&&ts(s);break;case 30:ts(s);break;default:ts(s)}i=i.sibling}}function mi(i,s,c){for(c=c&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var h=s.alternate,b=i,_=s,M=_.flags;switch(_.tag){case 0:case 11:case 15:mi(b,_,c),lc(4,_);break;case 1:if(mi(b,_,c),h=_,b=h.stateNode,typeof b.componentDidMount=="function")try{b.componentDidMount()}catch(ie){jt(h,h.return,ie)}if(h=_,b=h.updateQueue,b!==null){var D=h.stateNode;try{var G=b.shared.hiddenCallbacks;if(G!==null)for(b.shared.hiddenCallbacks=null,b=0;b<G.length;b++)uj(G[b],D)}catch(ie){jt(h,h.return,ie)}}c&&M&64&&xT(_),uc(_,_.return);break;case 27:AT(_);case 26:case 5:mi(b,_,c),c&&h===null&&M&4&&ST(_),uc(_,_.return);break;case 12:mi(b,_,c);break;case 31:mi(b,_,c),c&&M&4&&CT(b,_);break;case 13:mi(b,_,c),c&&M&4&&RT(b,_);break;case 22:_.memoizedState===null&&mi(b,_,c),uc(_,_.return);break;case 30:break;default:mi(b,_,c)}s=s.sibling}}function Ey(i,s){var c=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),i=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(i=s.memoizedState.cachePool.pool),i!==c&&(i!=null&&i.refCount++,c!=null&&Yu(c))}function jy(i,s){i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&Yu(i))}function ha(i,s,c,h){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)PT(i,s,c,h),s=s.sibling}function PT(i,s,c,h){var b=s.flags;switch(s.tag){case 0:case 11:case 15:ha(i,s,c,h),b&2048&&lc(9,s);break;case 1:ha(i,s,c,h);break;case 3:ha(i,s,c,h),b&2048&&(i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&Yu(i)));break;case 12:if(b&2048){ha(i,s,c,h),i=s.stateNode;try{var _=s.memoizedProps,M=_.id,D=_.onPostCommit;typeof D=="function"&&D(M,s.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(G){jt(s,s.return,G)}}else ha(i,s,c,h);break;case 31:ha(i,s,c,h);break;case 13:ha(i,s,c,h);break;case 23:break;case 22:_=s.stateNode,M=s.alternate,s.memoizedState!==null?_._visibility&2?ha(i,s,c,h):cc(i,s):_._visibility&2?ha(i,s,c,h):(_._visibility|=2,cl(i,s,c,h,(s.subtreeFlags&10256)!==0||!1)),b&2048&&Ey(M,s);break;case 24:ha(i,s,c,h),b&2048&&jy(s.alternate,s);break;default:ha(i,s,c,h)}}function cl(i,s,c,h,b){for(b=b&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var _=i,M=s,D=c,G=h,ie=M.flags;switch(M.tag){case 0:case 11:case 15:cl(_,M,D,G,b),lc(8,M);break;case 23:break;case 22:var he=M.stateNode;M.memoizedState!==null?he._visibility&2?cl(_,M,D,G,b):cc(_,M):(he._visibility|=2,cl(_,M,D,G,b)),b&&ie&2048&&Ey(M.alternate,M);break;case 24:cl(_,M,D,G,b),b&&ie&2048&&jy(M.alternate,M);break;default:cl(_,M,D,G,b)}s=s.sibling}}function cc(i,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var c=i,h=s,b=h.flags;switch(h.tag){case 22:cc(c,h),b&2048&&Ey(h.alternate,h);break;case 24:cc(c,h),b&2048&&jy(h.alternate,h);break;default:cc(c,h)}s=s.sibling}}var fc=8192;function fl(i,s,c){if(i.subtreeFlags&fc)for(i=i.child;i!==null;)DT(i,s,c),i=i.sibling}function DT(i,s,c){switch(i.tag){case 26:fl(i,s,c),i.flags&fc&&i.memoizedState!==null&&EH(c,da,i.memoizedState,i.memoizedProps);break;case 5:fl(i,s,c);break;case 3:case 4:var h=da;da=bh(i.stateNode.containerInfo),fl(i,s,c),da=h;break;case 22:i.memoizedState===null&&(h=i.alternate,h!==null&&h.memoizedState!==null?(h=fc,fc=16777216,fl(i,s,c),fc=h):fl(i,s,c));break;default:fl(i,s,c)}}function kT(i){var s=i.alternate;if(s!==null&&(i=s.child,i!==null)){s.child=null;do s=i.sibling,i.sibling=null,i=s;while(i!==null)}}function dc(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var h=s[c];Rn=h,zT(h,i)}kT(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)$T(i),i=i.sibling}function $T(i){switch(i.tag){case 0:case 11:case 15:dc(i),i.flags&2048&&Yi(9,i,i.return);break;case 3:dc(i);break;case 12:dc(i);break;case 22:var s=i.stateNode;i.memoizedState!==null&&s._visibility&2&&(i.return===null||i.return.tag!==13)?(s._visibility&=-3,oh(i)):dc(i);break;default:dc(i)}}function oh(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var h=s[c];Rn=h,zT(h,i)}kT(i)}for(i=i.child;i!==null;){switch(s=i,s.tag){case 0:case 11:case 15:Yi(8,s,s.return),oh(s);break;case 22:c=s.stateNode,c._visibility&2&&(c._visibility&=-3,oh(s));break;default:oh(s)}i=i.sibling}}function zT(i,s){for(;Rn!==null;){var c=Rn;switch(c.tag){case 0:case 11:case 15:Yi(8,c,s);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var h=c.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:Yu(c.memoizedState.cache)}if(h=c.child,h!==null)h.return=c,Rn=h;else e:for(c=i;Rn!==null;){h=Rn;var b=h.sibling,_=h.return;if(jT(h),h===c){Rn=null;break e}if(b!==null){b.return=_,Rn=b;break e}Rn=_}}}var Uq={getCacheForType:function(i){var s=kn(hn),c=s.data.get(i);return c===void 0&&(c=i(),s.data.set(i,c)),c},cacheSignal:function(){return kn(hn).controller.signal}},qq=typeof WeakMap=="function"?WeakMap:Map,St=0,It=null,st=null,ft=0,Et=0,wr=null,Ki=!1,dl=!1,Ty=!1,vi=0,rn=0,Xi=0,ns=0,Cy=0,Sr=0,hl=0,hc=null,fr=null,Ry=!1,sh=0,LT=0,lh=1/0,uh=null,Qi=null,wn=0,Ji=null,pl=null,gi=0,Ny=0,My=null,IT=null,pc=0,Py=null;function _r(){return(St&2)!==0&&ft!==0?ft&-ft:z.T!==null?Iy():tn()}function BT(){if(Sr===0)if((ft&536870912)===0||pt){var i=vr;vr<<=1,(vr&3932160)===0&&(vr=262144),Sr=i}else Sr=536870912;return i=br.current,i!==null&&(i.flags|=32),Sr}function dr(i,s,c){(i===It&&(Et===2||Et===9)||i.cancelPendingCommit!==null)&&(ml(i,0),eo(i,ft,Sr,!1)),be(i,c),((St&2)===0||i!==It)&&(i===It&&((St&2)===0&&(ns|=c),rn===4&&eo(i,ft,Sr,!1)),Da(i))}function UT(i,s,c){if((St&6)!==0)throw Error(r(327));var h=!c&&(s&127)===0&&(s&i.expiredLanes)===0||Re(i,s),b=h?Vq(i,s):ky(i,s,!0),_=h;do{if(b===0){dl&&!h&&eo(i,s,0,!1);break}else{if(c=i.current.alternate,_&&!Hq(c)){b=ky(i,s,!1),_=!1;continue}if(b===2){if(_=s,i.errorRecoveryDisabledLanes&_)var M=0;else M=i.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){s=M;e:{var D=i;b=hc;var G=D.current.memoizedState.isDehydrated;if(G&&(ml(D,M).flags|=256),M=ky(D,M,!1),M!==2){if(Ty&&!G){D.errorRecoveryDisabledLanes|=_,ns|=_,b=4;break e}_=fr,fr=b,_!==null&&(fr===null?fr=_:fr.push.apply(fr,_))}b=M}if(_=!1,b!==2)continue}}if(b===1){ml(i,0),eo(i,s,0,!0);break}e:{switch(h=i,_=b,_){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:eo(h,s,Sr,!Ki);break e;case 2:fr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(b=sh+300-B(),10<b)){if(eo(h,s,Sr,!Ki),Fe(h,0,!0)!==0)break e;gi=s,h.timeoutHandle=yC(qT.bind(null,h,c,fr,uh,Ry,s,Sr,ns,hl,Ki,_,"Throttled",-0,0),b);break e}qT(h,c,fr,uh,Ry,s,Sr,ns,hl,Ki,_,null,-0,0)}}break}while(!0);Da(i)}function qT(i,s,c,h,b,_,M,D,G,ie,he,ge,oe,ue){if(i.timeoutHandle=-1,ge=s.subtreeFlags,ge&8192||(ge&16785408)===16785408){ge={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ni},DT(s,_,ge);var Le=(_&62914560)===_?sh-B():(_&4194048)===_?LT-B():0;if(Le=jH(ge,Le),Le!==null){gi=_,i.cancelPendingCommit=Le(KT.bind(null,i,s,_,c,h,b,M,D,G,he,ge,null,oe,ue)),eo(i,_,M,!ie);return}}KT(i,s,_,c,h,b,M,D,G)}function Hq(i){for(var s=i;;){var c=s.tag;if((c===0||c===11||c===15)&&s.flags&16384&&(c=s.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var h=0;h<c.length;h++){var b=c[h],_=b.getSnapshot;b=b.value;try{if(!gr(_(),b))return!1}catch{return!1}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function eo(i,s,c,h){s&=~Cy,s&=~ns,i.suspendedLanes|=s,i.pingedLanes&=~s,h&&(i.warmLanes|=s),h=i.expirationTimes;for(var b=s;0<b;){var _=31-dn(b),M=1<<_;h[_]=-1,b&=~M}c!==0&&Be(i,c,s)}function ch(){return(St&6)===0?(mc(0),!1):!0}function Dy(){if(st!==null){if(Et===0)var i=st.return;else i=st,oi=Wo=null,Kg(i),il=null,Xu=0,i=st;for(;i!==null;)bT(i.alternate,i),i=i.return;st=null}}function ml(i,s){var c=i.timeoutHandle;c!==-1&&(i.timeoutHandle=-1,uH(c)),c=i.cancelPendingCommit,c!==null&&(i.cancelPendingCommit=null,c()),gi=0,Dy(),It=i,st=c=ai(i.current,null),ft=s,Et=0,wr=null,Ki=!1,dl=Re(i,s),Ty=!1,hl=Sr=Cy=ns=Xi=rn=0,fr=hc=null,Ry=!1,(s&8)!==0&&(s|=s&32);var h=i.entangledLanes;if(h!==0)for(i=i.entanglements,h&=s;0<h;){var b=31-dn(h),_=1<<b;s|=i[b],h&=~_}return vi=s,Nd(),c}function HT(i,s){tt=null,z.H=ic,s===al||s===Id?(s=ij(),Et=3):s===Lg?(s=ij(),Et=4):Et=s===dy?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,wr=s,st===null&&(rn=1,Jd(i,Lr(s,i.current)))}function FT(){var i=br.current;return i===null?!0:(ft&4194048)===ft?qr===null:(ft&62914560)===ft||(ft&536870912)!==0?i===qr:!1}function VT(){var i=z.H;return z.H=ic,i===null?ic:i}function GT(){var i=z.A;return z.A=Uq,i}function fh(){rn=4,Ki||(ft&4194048)!==ft&&br.current!==null||(dl=!0),(Xi&134217727)===0&&(ns&134217727)===0||It===null||eo(It,ft,Sr,!1)}function ky(i,s,c){var h=St;St|=2;var b=VT(),_=GT();(It!==i||ft!==s)&&(uh=null,ml(i,s)),s=!1;var M=rn;e:do try{if(Et!==0&&st!==null){var D=st,G=wr;switch(Et){case 8:Dy(),M=6;break e;case 3:case 2:case 9:case 6:br.current===null&&(s=!0);var ie=Et;if(Et=0,wr=null,vl(i,D,G,ie),c&&dl){M=0;break e}break;default:ie=Et,Et=0,wr=null,vl(i,D,G,ie)}}Fq(),M=rn;break}catch(he){HT(i,he)}while(!0);return s&&i.shellSuspendCounter++,oi=Wo=null,St=h,z.H=b,z.A=_,st===null&&(It=null,ft=0,Nd()),M}function Fq(){for(;st!==null;)WT(st)}function Vq(i,s){var c=St;St|=2;var h=VT(),b=GT();It!==i||ft!==s?(uh=null,lh=B()+500,ml(i,s)):dl=Re(i,s);e:do try{if(Et!==0&&st!==null){s=st;var _=wr;t:switch(Et){case 1:Et=0,wr=null,vl(i,s,_,1);break;case 2:case 9:if(rj(_)){Et=0,wr=null,ZT(s);break}s=function(){Et!==2&&Et!==9||It!==i||(Et=7),Da(i)},_.then(s,s);break e;case 3:Et=7;break e;case 4:Et=5;break e;case 7:rj(_)?(Et=0,wr=null,ZT(s)):(Et=0,wr=null,vl(i,s,_,7));break;case 5:var M=null;switch(st.tag){case 26:M=st.memoizedState;case 5:case 27:var D=st;if(M?PC(M):D.stateNode.complete){Et=0,wr=null;var G=D.sibling;if(G!==null)st=G;else{var ie=D.return;ie!==null?(st=ie,dh(ie)):st=null}break t}}Et=0,wr=null,vl(i,s,_,5);break;case 6:Et=0,wr=null,vl(i,s,_,6);break;case 8:Dy(),rn=6;break e;default:throw Error(r(462))}}Gq();break}catch(he){HT(i,he)}while(!0);return oi=Wo=null,z.H=h,z.A=b,St=c,st!==null?0:(It=null,ft=0,Nd(),rn)}function Gq(){for(;st!==null&&!Pn();)WT(st)}function WT(i){var s=gT(i.alternate,i,vi);i.memoizedProps=i.pendingProps,s===null?dh(i):st=s}function ZT(i){var s=i,c=s.alternate;switch(s.tag){case 15:case 0:s=fT(c,s,s.pendingProps,s.type,void 0,ft);break;case 11:s=fT(c,s,s.pendingProps,s.type.render,s.ref,ft);break;case 5:Kg(s);default:bT(c,s),s=st=GE(s,vi),s=gT(c,s,vi)}i.memoizedProps=i.pendingProps,s===null?dh(i):st=s}function vl(i,s,c,h){oi=Wo=null,Kg(s),il=null,Xu=0;var b=s.return;try{if(Dq(i,b,s,c,ft)){rn=1,Jd(i,Lr(c,i.current)),st=null;return}}catch(_){if(b!==null)throw st=b,_;rn=1,Jd(i,Lr(c,i.current)),st=null;return}s.flags&32768?(pt||h===1?i=!0:dl||(ft&536870912)!==0?i=!1:(Ki=i=!0,(h===2||h===9||h===3||h===6)&&(h=br.current,h!==null&&h.tag===13&&(h.flags|=16384))),YT(s,i)):dh(s)}function dh(i){var s=i;do{if((s.flags&32768)!==0){YT(s,Ki);return}i=s.return;var c=zq(s.alternate,s,vi);if(c!==null){st=c;return}if(s=s.sibling,s!==null){st=s;return}st=s=i}while(s!==null);rn===0&&(rn=5)}function YT(i,s){do{var c=Lq(i.alternate,i);if(c!==null){c.flags&=32767,st=c;return}if(c=i.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!s&&(i=i.sibling,i!==null)){st=i;return}st=i=c}while(i!==null);rn=6,st=null}function KT(i,s,c,h,b,_,M,D,G){i.cancelPendingCommit=null;do hh();while(wn!==0);if((St&6)!==0)throw Error(r(327));if(s!==null){if(s===i.current)throw Error(r(177));if(_=s.lanes|s.childLanes,_|=_g,fe(i,c,_,M,D,G),i===It&&(st=It=null,ft=0),pl=s,Ji=i,gi=c,Ny=_,My=b,IT=h,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,Kq(Ee,function(){return tC(),null})):(i.callbackNode=null,i.callbackPriority=0),h=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||h){h=z.T,z.T=null,b=F.p,F.p=2,M=St,St|=4;try{Iq(i,s,c)}finally{St=M,F.p=b,z.T=h}}wn=1,XT(),QT(),JT()}}function XT(){if(wn===1){wn=0;var i=Ji,s=pl,c=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||c){c=z.T,z.T=null;var h=F.p;F.p=2;var b=St;St|=4;try{NT(s,i);var _=Wy,M=zE(i.containerInfo),D=_.focusedElem,G=_.selectionRange;if(M!==D&&D&&D.ownerDocument&&$E(D.ownerDocument.documentElement,D)){if(G!==null&&yg(D)){var ie=G.start,he=G.end;if(he===void 0&&(he=ie),"selectionStart"in D)D.selectionStart=ie,D.selectionEnd=Math.min(he,D.value.length);else{var ge=D.ownerDocument||document,oe=ge&&ge.defaultView||window;if(oe.getSelection){var ue=oe.getSelection(),Le=D.textContent.length,Ge=Math.min(G.start,Le),Mt=G.end===void 0?Ge:Math.min(G.end,Le);!ue.extend&&Ge>Mt&&(M=Mt,Mt=Ge,Ge=M);var ee=kE(D,Ge),X=kE(D,Mt);if(ee&&X&&(ue.rangeCount!==1||ue.anchorNode!==ee.node||ue.anchorOffset!==ee.offset||ue.focusNode!==X.node||ue.focusOffset!==X.offset)){var re=ge.createRange();re.setStart(ee.node,ee.offset),ue.removeAllRanges(),Ge>Mt?(ue.addRange(re),ue.extend(X.node,X.offset)):(re.setEnd(X.node,X.offset),ue.addRange(re))}}}}for(ge=[],ue=D;ue=ue.parentNode;)ue.nodeType===1&&ge.push({element:ue,left:ue.scrollLeft,top:ue.scrollTop});for(typeof D.focus=="function"&&D.focus(),D=0;D<ge.length;D++){var ve=ge[D];ve.element.scrollLeft=ve.left,ve.element.scrollTop=ve.top}}Oh=!!Gy,Wy=Gy=null}finally{St=b,F.p=h,z.T=c}}i.current=s,wn=2}}function QT(){if(wn===2){wn=0;var i=Ji,s=pl,c=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||c){c=z.T,z.T=null;var h=F.p;F.p=2;var b=St;St|=4;try{ET(i,s.alternate,s)}finally{St=b,F.p=h,z.T=c}}wn=3}}function JT(){if(wn===4||wn===3){wn=0,Hn();var i=Ji,s=pl,c=gi,h=IT;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?wn=5:(wn=0,pl=Ji=null,eC(i,i.pendingLanes));var b=i.pendingLanes;if(b===0&&(Qi=null),wt(c),s=s.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(Ot,s,void 0,(s.current.flags&128)===128)}catch{}if(h!==null){s=z.T,b=F.p,F.p=2,z.T=null;try{for(var _=i.onRecoverableError,M=0;M<h.length;M++){var D=h[M];_(D.value,{componentStack:D.stack})}}finally{z.T=s,F.p=b}}(gi&3)!==0&&hh(),Da(i),b=i.pendingLanes,(c&261930)!==0&&(b&42)!==0?i===Py?pc++:(pc=0,Py=i):pc=0,mc(0)}}function eC(i,s){(i.pooledCacheLanes&=s)===0&&(s=i.pooledCache,s!=null&&(i.pooledCache=null,Yu(s)))}function hh(){return XT(),QT(),JT(),tC()}function tC(){if(wn!==5)return!1;var i=Ji,s=Ny;Ny=0;var c=wt(gi),h=z.T,b=F.p;try{F.p=32>c?32:c,z.T=null,c=My,My=null;var _=Ji,M=gi;if(wn=0,pl=Ji=null,gi=0,(St&6)!==0)throw Error(r(331));var D=St;if(St|=4,$T(_.current),PT(_,_.current,M,c),St=D,mc(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(Ot,_)}catch{}return!0}finally{F.p=b,z.T=h,eC(i,s)}}function nC(i,s,c){s=Lr(c,s),s=fy(i.stateNode,s,2),i=Gi(i,s,2),i!==null&&(be(i,2),Da(i))}function jt(i,s,c){if(i.tag===3)nC(i,i,c);else for(;s!==null;){if(s.tag===3){nC(s,i,c);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Qi===null||!Qi.has(h))){i=Lr(c,i),c=rT(2),h=Gi(s,c,2),h!==null&&(aT(c,h,s,i),be(h,2),Da(h));break}}s=s.return}}function $y(i,s,c){var h=i.pingCache;if(h===null){h=i.pingCache=new qq;var b=new Set;h.set(s,b)}else b=h.get(s),b===void 0&&(b=new Set,h.set(s,b));b.has(c)||(Ty=!0,b.add(c),i=Wq.bind(null,i,s,c),s.then(i,i))}function Wq(i,s,c){var h=i.pingCache;h!==null&&h.delete(s),i.pingedLanes|=i.suspendedLanes&c,i.warmLanes&=~c,It===i&&(ft&c)===c&&(rn===4||rn===3&&(ft&62914560)===ft&&300>B()-sh?(St&2)===0&&ml(i,0):Cy|=c,hl===ft&&(hl=0)),Da(i)}function rC(i,s){s===0&&(s=Lt()),i=Fo(i,s),i!==null&&(be(i,s),Da(i))}function Zq(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),rC(i,c)}function Yq(i,s){var c=0;switch(i.tag){case 31:case 13:var h=i.stateNode,b=i.memoizedState;b!==null&&(c=b.retryLane);break;case 19:h=i.stateNode;break;case 22:h=i.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(s),rC(i,c)}function Kq(i,s){return Tn(i,s)}var ph=null,gl=null,zy=!1,mh=!1,Ly=!1,to=0;function Da(i){i!==gl&&i.next===null&&(gl===null?ph=gl=i:gl=gl.next=i),mh=!0,zy||(zy=!0,Qq())}function mc(i,s){if(!Ly&&mh){Ly=!0;do for(var c=!1,h=ph;h!==null;){if(i!==0){var b=h.pendingLanes;if(b===0)var _=0;else{var M=h.suspendedLanes,D=h.pingedLanes;_=(1<<31-dn(42|i)+1)-1,_&=b&~(M&~D),_=_&201326741?_&201326741|1:_?_|2:0}_!==0&&(c=!0,sC(h,_))}else _=ft,_=Fe(h,h===It?_:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(_&3)===0||Re(h,_)||(c=!0,sC(h,_));h=h.next}while(c);Ly=!1}}function Xq(){aC()}function aC(){mh=zy=!1;var i=0;to!==0&&lH()&&(i=to);for(var s=B(),c=null,h=ph;h!==null;){var b=h.next,_=iC(h,s);_===0?(h.next=null,c===null?ph=b:c.next=b,b===null&&(gl=c)):(c=h,(i!==0||(_&3)!==0)&&(mh=!0)),h=b}wn!==0&&wn!==5||mc(i),to!==0&&(to=0)}function iC(i,s){for(var c=i.suspendedLanes,h=i.pingedLanes,b=i.expirationTimes,_=i.pendingLanes&-62914561;0<_;){var M=31-dn(_),D=1<<M,G=b[M];G===-1?((D&c)===0||(D&h)!==0)&&(b[M]=it(D,s)):G<=s&&(i.expiredLanes|=D),_&=~D}if(s=It,c=ft,c=Fe(i,i===s?c:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),h=i.callbackNode,c===0||i===s&&(Et===2||Et===9)||i.cancelPendingCommit!==null)return h!==null&&h!==null&&fn(h),i.callbackNode=null,i.callbackPriority=0;if((c&3)===0||Re(i,c)){if(s=c&-c,s===i.callbackPriority)return s;switch(h!==null&&fn(h),wt(c)){case 2:case 8:c=Te;break;case 32:c=Ee;break;case 268435456:c=Me;break;default:c=Ee}return h=oC.bind(null,i),c=Tn(c,h),i.callbackPriority=s,i.callbackNode=c,s}return h!==null&&h!==null&&fn(h),i.callbackPriority=2,i.callbackNode=null,2}function oC(i,s){if(wn!==0&&wn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var c=i.callbackNode;if(hh()&&i.callbackNode!==c)return null;var h=ft;return h=Fe(i,i===It?h:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),h===0?null:(UT(i,h,s),iC(i,B()),i.callbackNode!=null&&i.callbackNode===c?oC.bind(null,i):null)}function sC(i,s){if(hh())return null;UT(i,s,!0)}function Qq(){cH(function(){(St&6)!==0?Tn(ae,Xq):aC()})}function Iy(){if(to===0){var i=nl;i===0&&(i=Jn,Jn<<=1,(Jn&261888)===0&&(Jn=256)),to=i}return to}function lC(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:_d(""+i)}function uC(i,s){var c=s.ownerDocument.createElement("input");return c.name=s.name,c.value=s.value,i.id&&c.setAttribute("form",i.id),s.parentNode.insertBefore(c,s),i=new FormData(i),c.parentNode.removeChild(c),i}function Jq(i,s,c,h,b){if(s==="submit"&&c&&c.stateNode===b){var _=lC((b[Fn]||null).action),M=h.submitter;M&&(s=(s=M[Fn]||null)?lC(s.formAction):M.getAttribute("formAction"),s!==null&&(_=s,M=null));var D=new jd("action","action",null,h,b);i.push({event:D,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(to!==0){var G=M?uC(b,M):new FormData(b);iy(c,{pending:!0,data:G,method:b.method,action:_},null,G)}}else typeof _=="function"&&(D.preventDefault(),G=M?uC(b,M):new FormData(b),iy(c,{pending:!0,data:G,method:b.method,action:_},_,G))},currentTarget:b}]})}}for(var By=0;By<Sg.length;By++){var Uy=Sg[By],eH=Uy.toLowerCase(),tH=Uy[0].toUpperCase()+Uy.slice(1);fa(eH,"on"+tH)}fa(BE,"onAnimationEnd"),fa(UE,"onAnimationIteration"),fa(qE,"onAnimationStart"),fa("dblclick","onDoubleClick"),fa("focusin","onFocus"),fa("focusout","onBlur"),fa(gq,"onTransitionRun"),fa(yq,"onTransitionStart"),fa(bq,"onTransitionCancel"),fa(HE,"onTransitionEnd"),qs("onMouseEnter",["mouseout","mouseover"]),qs("onMouseLeave",["mouseout","mouseover"]),qs("onPointerEnter",["pointerout","pointerover"]),qs("onPointerLeave",["pointerout","pointerover"]),Bo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Bo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Bo("onBeforeInput",["compositionend","keypress","textInput","paste"]),Bo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Bo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Bo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vc="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(" "),nH=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(vc));function cC(i,s){s=(s&4)!==0;for(var c=0;c<i.length;c++){var h=i[c],b=h.event;h=h.listeners;e:{var _=void 0;if(s)for(var M=h.length-1;0<=M;M--){var D=h[M],G=D.instance,ie=D.currentTarget;if(D=D.listener,G!==_&&b.isPropagationStopped())break e;_=D,b.currentTarget=ie;try{_(b)}catch(he){Rd(he)}b.currentTarget=null,_=G}else for(M=0;M<h.length;M++){if(D=h[M],G=D.instance,ie=D.currentTarget,D=D.listener,G!==_&&b.isPropagationStopped())break e;_=D,b.currentTarget=ie;try{_(b)}catch(he){Rd(he)}b.currentTarget=null,_=G}}}}function lt(i,s){var c=s[ku];c===void 0&&(c=s[ku]=new Set);var h=i+"__bubble";c.has(h)||(fC(s,i,2,!1),c.add(h))}function qy(i,s,c){var h=0;s&&(h|=4),fC(c,i,h,s)}var vh="_reactListening"+Math.random().toString(36).slice(2);function Hy(i){if(!i[vh]){i[vh]=!0,aE.forEach(function(c){c!=="selectionchange"&&(nH.has(c)||qy(c,!1,i),qy(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[vh]||(s[vh]=!0,qy("selectionchange",!1,s))}}function fC(i,s,c,h){switch(BC(s)){case 2:var b=RH;break;case 8:b=NH;break;default:b=ab}c=b.bind(null,s,c,i),b=void 0,!ug||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(b=!0),h?b!==void 0?i.addEventListener(s,c,{capture:!0,passive:b}):i.addEventListener(s,c,!0):b!==void 0?i.addEventListener(s,c,{passive:b}):i.addEventListener(s,c,!1)}function Fy(i,s,c,h,b){var _=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var M=h.tag;if(M===3||M===4){var D=h.stateNode.containerInfo;if(D===b)break;if(M===4)for(M=h.return;M!==null;){var G=M.tag;if((G===3||G===4)&&M.stateNode.containerInfo===b)return;M=M.return}for(;D!==null;){if(M=Is(D),M===null)return;if(G=M.tag,G===5||G===6||G===26||G===27){h=_=M;continue e}D=D.parentNode}}h=h.return}vE(function(){var ie=_,he=sg(c),ge=[];e:{var oe=FE.get(i);if(oe!==void 0){var ue=jd,Le=i;switch(i){case"keypress":if(Od(c)===0)break e;case"keydown":case"keyup":ue=Y8;break;case"focusin":Le="focus",ue=hg;break;case"focusout":Le="blur",ue=hg;break;case"beforeblur":case"afterblur":ue=hg;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ue=bE;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ue=z8;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ue=Q8;break;case BE:case UE:case qE:ue=B8;break;case HE:ue=eq;break;case"scroll":case"scrollend":ue=k8;break;case"wheel":ue=nq;break;case"copy":case"cut":case"paste":ue=q8;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ue=wE;break;case"toggle":case"beforetoggle":ue=aq}var Ge=(s&4)!==0,Mt=!Ge&&(i==="scroll"||i==="scrollend"),ee=Ge?oe!==null?oe+"Capture":null:oe;Ge=[];for(var X=ie,re;X!==null;){var ve=X;if(re=ve.stateNode,ve=ve.tag,ve!==5&&ve!==26&&ve!==27||re===null||ee===null||(ve=Lu(X,ee),ve!=null&&Ge.push(gc(X,ve,re))),Mt)break;X=X.return}0<Ge.length&&(oe=new ue(oe,Le,null,c,he),ge.push({event:oe,listeners:Ge}))}}if((s&7)===0){e:{if(oe=i==="mouseover"||i==="pointerover",ue=i==="mouseout"||i==="pointerout",oe&&c!==og&&(Le=c.relatedTarget||c.fromElement)&&(Is(Le)||Le[ei]))break e;if((ue||oe)&&(oe=he.window===he?he:(oe=he.ownerDocument)?oe.defaultView||oe.parentWindow:window,ue?(Le=c.relatedTarget||c.toElement,ue=ie,Le=Le?Is(Le):null,Le!==null&&(Mt=o(Le),Ge=Le.tag,Le!==Mt||Ge!==5&&Ge!==27&&Ge!==6)&&(Le=null)):(ue=null,Le=ie),ue!==Le)){if(Ge=bE,ve="onMouseLeave",ee="onMouseEnter",X="mouse",(i==="pointerout"||i==="pointerover")&&(Ge=wE,ve="onPointerLeave",ee="onPointerEnter",X="pointer"),Mt=ue==null?oe:zu(ue),re=Le==null?oe:zu(Le),oe=new Ge(ve,X+"leave",ue,c,he),oe.target=Mt,oe.relatedTarget=re,ve=null,Is(he)===ie&&(Ge=new Ge(ee,X+"enter",Le,c,he),Ge.target=re,Ge.relatedTarget=Mt,ve=Ge),Mt=ve,ue&&Le)t:{for(Ge=rH,ee=ue,X=Le,re=0,ve=ee;ve;ve=Ge(ve))re++;ve=0;for(var He=X;He;He=Ge(He))ve++;for(;0<re-ve;)ee=Ge(ee),re--;for(;0<ve-re;)X=Ge(X),ve--;for(;re--;){if(ee===X||X!==null&&ee===X.alternate){Ge=ee;break t}ee=Ge(ee),X=Ge(X)}Ge=null}else Ge=null;ue!==null&&dC(ge,oe,ue,Ge,!1),Le!==null&&Mt!==null&&dC(ge,Mt,Le,Ge,!0)}}e:{if(oe=ie?zu(ie):window,ue=oe.nodeName&&oe.nodeName.toLowerCase(),ue==="select"||ue==="input"&&oe.type==="file")var yt=CE;else if(jE(oe))if(RE)yt=pq;else{yt=dq;var Ie=fq}else ue=oe.nodeName,!ue||ue.toLowerCase()!=="input"||oe.type!=="checkbox"&&oe.type!=="radio"?ie&&ig(ie.elementType)&&(yt=CE):yt=hq;if(yt&&(yt=yt(i,ie))){TE(ge,yt,c,he);break e}Ie&&Ie(i,oe,ie),i==="focusout"&&ie&&oe.type==="number"&&ie.memoizedProps.value!=null&&ag(oe,"number",oe.value)}switch(Ie=ie?zu(ie):window,i){case"focusin":(jE(Ie)||Ie.contentEditable==="true")&&(Zs=Ie,bg=ie,Gu=null);break;case"focusout":Gu=bg=Zs=null;break;case"mousedown":xg=!0;break;case"contextmenu":case"mouseup":case"dragend":xg=!1,LE(ge,c,he);break;case"selectionchange":if(vq)break;case"keydown":case"keyup":LE(ge,c,he)}var nt;if(mg)e:{switch(i){case"compositionstart":var dt="onCompositionStart";break e;case"compositionend":dt="onCompositionEnd";break e;case"compositionupdate":dt="onCompositionUpdate";break e}dt=void 0}else Ws?OE(i,c)&&(dt="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(dt="onCompositionStart");dt&&(SE&&c.locale!=="ko"&&(Ws||dt!=="onCompositionStart"?dt==="onCompositionEnd"&&Ws&&(nt=gE()):(Ii=he,cg="value"in Ii?Ii.value:Ii.textContent,Ws=!0)),Ie=gh(ie,dt),0<Ie.length&&(dt=new xE(dt,i,null,c,he),ge.push({event:dt,listeners:Ie}),nt?dt.data=nt:(nt=EE(c),nt!==null&&(dt.data=nt)))),(nt=oq?sq(i,c):lq(i,c))&&(dt=gh(ie,"onBeforeInput"),0<dt.length&&(Ie=new xE("onBeforeInput","beforeinput",null,c,he),ge.push({event:Ie,listeners:dt}),Ie.data=nt)),Jq(ge,i,ie,c,he)}cC(ge,s)})}function gc(i,s,c){return{instance:i,listener:s,currentTarget:c}}function gh(i,s){for(var c=s+"Capture",h=[];i!==null;){var b=i,_=b.stateNode;if(b=b.tag,b!==5&&b!==26&&b!==27||_===null||(b=Lu(i,c),b!=null&&h.unshift(gc(i,b,_)),b=Lu(i,s),b!=null&&h.push(gc(i,b,_))),i.tag===3)return h;i=i.return}return[]}function rH(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function dC(i,s,c,h,b){for(var _=s._reactName,M=[];c!==null&&c!==h;){var D=c,G=D.alternate,ie=D.stateNode;if(D=D.tag,G!==null&&G===h)break;D!==5&&D!==26&&D!==27||ie===null||(G=ie,b?(ie=Lu(c,_),ie!=null&&M.unshift(gc(c,ie,G))):b||(ie=Lu(c,_),ie!=null&&M.push(gc(c,ie,G)))),c=c.return}M.length!==0&&i.push({event:s,listeners:M})}var aH=/\r\n?/g,iH=/\u0000|\uFFFD/g;function hC(i){return(typeof i=="string"?i:""+i).replace(aH,`
49
- `).replace(iH,"")}function pC(i,s){return s=hC(s),hC(i)===s}function Nt(i,s,c,h,b,_){switch(c){case"children":typeof h=="string"?s==="body"||s==="textarea"&&h===""||Fs(i,h):(typeof h=="number"||typeof h=="bigint")&&s!=="body"&&Fs(i,""+h);break;case"className":wd(i,"class",h);break;case"tabIndex":wd(i,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":wd(i,c,h);break;case"style":pE(i,h,_);break;case"data":if(s!=="object"){wd(i,"data",h);break}case"src":case"href":if(h===""&&(s!=="a"||c!=="href")){i.removeAttribute(c);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(c);break}h=_d(""+h),i.setAttribute(c,h);break;case"action":case"formAction":if(typeof h=="function"){i.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof _=="function"&&(c==="formAction"?(s!=="input"&&Nt(i,s,"name",b.name,b,null),Nt(i,s,"formEncType",b.formEncType,b,null),Nt(i,s,"formMethod",b.formMethod,b,null),Nt(i,s,"formTarget",b.formTarget,b,null)):(Nt(i,s,"encType",b.encType,b,null),Nt(i,s,"method",b.method,b,null),Nt(i,s,"target",b.target,b,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(c);break}h=_d(""+h),i.setAttribute(c,h);break;case"onClick":h!=null&&(i.onclick=ni);break;case"onScroll":h!=null&&lt("scroll",i);break;case"onScrollEnd":h!=null&&lt("scrollend",i);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(c=h.__html,c!=null){if(b.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"multiple":i.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":i.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){i.removeAttribute("xlink:href");break}c=_d(""+h),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(c,""+h):i.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":h&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(c,""):i.removeAttribute(c);break;case"capture":case"download":h===!0?i.setAttribute(c,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(c,h):i.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?i.setAttribute(c,h):i.removeAttribute(c);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?i.removeAttribute(c):i.setAttribute(c,h);break;case"popover":lt("beforetoggle",i),lt("toggle",i),xd(i,"popover",h);break;case"xlinkActuate":ti(i,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":ti(i,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":ti(i,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":ti(i,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":ti(i,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":ti(i,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":ti(i,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":ti(i,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":ti(i,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":xd(i,"is",h);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=P8.get(c)||c,xd(i,c,h))}}function Vy(i,s,c,h,b,_){switch(c){case"style":pE(i,h,_);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(c=h.__html,c!=null){if(b.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"children":typeof h=="string"?Fs(i,h):(typeof h=="number"||typeof h=="bigint")&&Fs(i,""+h);break;case"onScroll":h!=null&&lt("scroll",i);break;case"onScrollEnd":h!=null&&lt("scrollend",i);break;case"onClick":h!=null&&(i.onclick=ni);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!iE.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(b=c.endsWith("Capture"),s=c.slice(2,b?c.length-7:void 0),_=i[Fn]||null,_=_!=null?_[c]:null,typeof _=="function"&&i.removeEventListener(s,_,b),typeof h=="function")){typeof _!="function"&&_!==null&&(c in i?i[c]=null:i.hasAttribute(c)&&i.removeAttribute(c)),i.addEventListener(s,h,b);break e}c in i?i[c]=h:h===!0?i.setAttribute(c,""):xd(i,c,h)}}}function zn(i,s,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":lt("error",i),lt("load",i);var h=!1,b=!1,_;for(_ in c)if(c.hasOwnProperty(_)){var M=c[_];if(M!=null)switch(_){case"src":h=!0;break;case"srcSet":b=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Nt(i,s,_,M,c,null)}}b&&Nt(i,s,"srcSet",c.srcSet,c,null),h&&Nt(i,s,"src",c.src,c,null);return;case"input":lt("invalid",i);var D=_=M=b=null,G=null,ie=null;for(h in c)if(c.hasOwnProperty(h)){var he=c[h];if(he!=null)switch(h){case"name":b=he;break;case"type":M=he;break;case"checked":G=he;break;case"defaultChecked":ie=he;break;case"value":_=he;break;case"defaultValue":D=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,s));break;default:Nt(i,s,h,he,c,null)}}cE(i,_,D,G,ie,M,b,!1);return;case"select":lt("invalid",i),h=M=_=null;for(b in c)if(c.hasOwnProperty(b)&&(D=c[b],D!=null))switch(b){case"value":_=D;break;case"defaultValue":M=D;break;case"multiple":h=D;default:Nt(i,s,b,D,c,null)}s=_,c=M,i.multiple=!!h,s!=null?Hs(i,!!h,s,!1):c!=null&&Hs(i,!!h,c,!0);return;case"textarea":lt("invalid",i),_=b=h=null;for(M in c)if(c.hasOwnProperty(M)&&(D=c[M],D!=null))switch(M){case"value":h=D;break;case"defaultValue":b=D;break;case"children":_=D;break;case"dangerouslySetInnerHTML":if(D!=null)throw Error(r(91));break;default:Nt(i,s,M,D,c,null)}dE(i,h,b,_);return;case"option":for(G in c)if(c.hasOwnProperty(G)&&(h=c[G],h!=null))switch(G){case"selected":i.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:Nt(i,s,G,h,c,null)}return;case"dialog":lt("beforetoggle",i),lt("toggle",i),lt("cancel",i),lt("close",i);break;case"iframe":case"object":lt("load",i);break;case"video":case"audio":for(h=0;h<vc.length;h++)lt(vc[h],i);break;case"image":lt("error",i),lt("load",i);break;case"details":lt("toggle",i);break;case"embed":case"source":case"link":lt("error",i),lt("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ie in c)if(c.hasOwnProperty(ie)&&(h=c[ie],h!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Nt(i,s,ie,h,c,null)}return;default:if(ig(s)){for(he in c)c.hasOwnProperty(he)&&(h=c[he],h!==void 0&&Vy(i,s,he,h,c,void 0));return}}for(D in c)c.hasOwnProperty(D)&&(h=c[D],h!=null&&Nt(i,s,D,h,c,null))}function oH(i,s,c,h){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var b=null,_=null,M=null,D=null,G=null,ie=null,he=null;for(ue in c){var ge=c[ue];if(c.hasOwnProperty(ue)&&ge!=null)switch(ue){case"checked":break;case"value":break;case"defaultValue":G=ge;default:h.hasOwnProperty(ue)||Nt(i,s,ue,null,h,ge)}}for(var oe in h){var ue=h[oe];if(ge=c[oe],h.hasOwnProperty(oe)&&(ue!=null||ge!=null))switch(oe){case"type":_=ue;break;case"name":b=ue;break;case"checked":ie=ue;break;case"defaultChecked":he=ue;break;case"value":M=ue;break;case"defaultValue":D=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(r(137,s));break;default:ue!==ge&&Nt(i,s,oe,ue,h,ge)}}rg(i,M,D,G,ie,he,_,b);return;case"select":ue=M=D=oe=null;for(_ in c)if(G=c[_],c.hasOwnProperty(_)&&G!=null)switch(_){case"value":break;case"multiple":ue=G;default:h.hasOwnProperty(_)||Nt(i,s,_,null,h,G)}for(b in h)if(_=h[b],G=c[b],h.hasOwnProperty(b)&&(_!=null||G!=null))switch(b){case"value":oe=_;break;case"defaultValue":D=_;break;case"multiple":M=_;default:_!==G&&Nt(i,s,b,_,h,G)}s=D,c=M,h=ue,oe!=null?Hs(i,!!c,oe,!1):!!h!=!!c&&(s!=null?Hs(i,!!c,s,!0):Hs(i,!!c,c?[]:"",!1));return;case"textarea":ue=oe=null;for(D in c)if(b=c[D],c.hasOwnProperty(D)&&b!=null&&!h.hasOwnProperty(D))switch(D){case"value":break;case"children":break;default:Nt(i,s,D,null,h,b)}for(M in h)if(b=h[M],_=c[M],h.hasOwnProperty(M)&&(b!=null||_!=null))switch(M){case"value":oe=b;break;case"defaultValue":ue=b;break;case"children":break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(r(91));break;default:b!==_&&Nt(i,s,M,b,h,_)}fE(i,oe,ue);return;case"option":for(var Le in c)if(oe=c[Le],c.hasOwnProperty(Le)&&oe!=null&&!h.hasOwnProperty(Le))switch(Le){case"selected":i.selected=!1;break;default:Nt(i,s,Le,null,h,oe)}for(G in h)if(oe=h[G],ue=c[G],h.hasOwnProperty(G)&&oe!==ue&&(oe!=null||ue!=null))switch(G){case"selected":i.selected=oe&&typeof oe!="function"&&typeof oe!="symbol";break;default:Nt(i,s,G,oe,h,ue)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ge in c)oe=c[Ge],c.hasOwnProperty(Ge)&&oe!=null&&!h.hasOwnProperty(Ge)&&Nt(i,s,Ge,null,h,oe);for(ie in h)if(oe=h[ie],ue=c[ie],h.hasOwnProperty(ie)&&oe!==ue&&(oe!=null||ue!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(r(137,s));break;default:Nt(i,s,ie,oe,h,ue)}return;default:if(ig(s)){for(var Mt in c)oe=c[Mt],c.hasOwnProperty(Mt)&&oe!==void 0&&!h.hasOwnProperty(Mt)&&Vy(i,s,Mt,void 0,h,oe);for(he in h)oe=h[he],ue=c[he],!h.hasOwnProperty(he)||oe===ue||oe===void 0&&ue===void 0||Vy(i,s,he,oe,h,ue);return}}for(var ee in c)oe=c[ee],c.hasOwnProperty(ee)&&oe!=null&&!h.hasOwnProperty(ee)&&Nt(i,s,ee,null,h,oe);for(ge in h)oe=h[ge],ue=c[ge],!h.hasOwnProperty(ge)||oe===ue||oe==null&&ue==null||Nt(i,s,ge,oe,h,ue)}function mC(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function sH(){if(typeof performance.getEntriesByType=="function"){for(var i=0,s=0,c=performance.getEntriesByType("resource"),h=0;h<c.length;h++){var b=c[h],_=b.transferSize,M=b.initiatorType,D=b.duration;if(_&&D&&mC(M)){for(M=0,D=b.responseEnd,h+=1;h<c.length;h++){var G=c[h],ie=G.startTime;if(ie>D)break;var he=G.transferSize,ge=G.initiatorType;he&&mC(ge)&&(G=G.responseEnd,M+=he*(G<D?1:(D-ie)/(G-ie)))}if(--h,s+=8*(_+M)/(b.duration/1e3),i++,10<i)break}}if(0<i)return s/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var Gy=null,Wy=null;function yh(i){return i.nodeType===9?i:i.ownerDocument}function vC(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function gC(i,s){if(i===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&s==="foreignObject"?0:i}function Zy(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Yy=null;function lH(){var i=window.event;return i&&i.type==="popstate"?i===Yy?!1:(Yy=i,!0):(Yy=null,!1)}var yC=typeof setTimeout=="function"?setTimeout:void 0,uH=typeof clearTimeout=="function"?clearTimeout:void 0,bC=typeof Promise=="function"?Promise:void 0,cH=typeof queueMicrotask=="function"?queueMicrotask:typeof bC<"u"?function(i){return bC.resolve(null).then(i).catch(fH)}:yC;function fH(i){setTimeout(function(){throw i})}function no(i){return i==="head"}function xC(i,s){var c=s,h=0;do{var b=c.nextSibling;if(i.removeChild(c),b&&b.nodeType===8)if(c=b.data,c==="/$"||c==="/&"){if(h===0){i.removeChild(b),wl(s);return}h--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")h++;else if(c==="html")yc(i.ownerDocument.documentElement);else if(c==="head"){c=i.ownerDocument.head,yc(c);for(var _=c.firstChild;_;){var M=_.nextSibling,D=_.nodeName;_[$u]||D==="SCRIPT"||D==="STYLE"||D==="LINK"&&_.rel.toLowerCase()==="stylesheet"||c.removeChild(_),_=M}}else c==="body"&&yc(i.ownerDocument.body);c=b}while(c);wl(s)}function wC(i,s){var c=i;i=0;do{var h=c.nextSibling;if(c.nodeType===1?s?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(s?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),h&&h.nodeType===8)if(c=h.data,c==="/$"){if(i===0)break;i--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||i++;c=h}while(c)}function Ky(i){var s=i.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var c=s;switch(s=s.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":Ky(c),tg(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}i.removeChild(c)}}function dH(i,s,c,h){for(;i.nodeType===1;){var b=c;if(i.nodeName.toLowerCase()!==s.toLowerCase()){if(!h&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(h){if(!i[$u])switch(s){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(_=i.getAttribute("rel"),_==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(_!==b.rel||i.getAttribute("href")!==(b.href==null||b.href===""?null:b.href)||i.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin)||i.getAttribute("title")!==(b.title==null?null:b.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(_=i.getAttribute("src"),(_!==(b.src==null?null:b.src)||i.getAttribute("type")!==(b.type==null?null:b.type)||i.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin))&&_&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(s==="input"&&i.type==="hidden"){var _=b.name==null?null:""+b.name;if(b.type==="hidden"&&i.getAttribute("name")===_)return i}else return i;if(i=Hr(i.nextSibling),i===null)break}return null}function hH(i,s,c){if(s==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!c||(i=Hr(i.nextSibling),i===null))return null;return i}function SC(i,s){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!s||(i=Hr(i.nextSibling),i===null))return null;return i}function Xy(i){return i.data==="$?"||i.data==="$~"}function Qy(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function pH(i,s){var c=i.ownerDocument;if(i.data==="$~")i._reactRetry=s;else if(i.data!=="$?"||c.readyState!=="loading")s();else{var h=function(){s(),c.removeEventListener("DOMContentLoaded",h)};c.addEventListener("DOMContentLoaded",h),i._reactRetry=h}}function Hr(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return i}var Jy=null;function _C(i){i=i.nextSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"||c==="/&"){if(s===0)return Hr(i.nextSibling);s--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||s++}i=i.nextSibling}return null}function AC(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(s===0)return i;s--}else c!=="/$"&&c!=="/&"||s++}i=i.previousSibling}return null}function OC(i,s,c){switch(s=yh(c),i){case"html":if(i=s.documentElement,!i)throw Error(r(452));return i;case"head":if(i=s.head,!i)throw Error(r(453));return i;case"body":if(i=s.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function yc(i){for(var s=i.attributes;s.length;)i.removeAttributeNode(s[0]);tg(i)}var Fr=new Map,EC=new Set;function bh(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var yi=F.d;F.d={f:mH,r:vH,D:gH,C:yH,L:bH,m:xH,X:SH,S:wH,M:_H};function mH(){var i=yi.f(),s=ch();return i||s}function vH(i){var s=Bs(i);s!==null&&s.tag===5&&s.type==="form"?Hj(s):yi.r(i)}var yl=typeof document>"u"?null:document;function jC(i,s,c){var h=yl;if(h&&typeof s=="string"&&s){var b=$r(s);b='link[rel="'+i+'"][href="'+b+'"]',typeof c=="string"&&(b+='[crossorigin="'+c+'"]'),EC.has(b)||(EC.add(b),i={rel:i,crossOrigin:c,href:s},h.querySelector(b)===null&&(s=h.createElement("link"),zn(s,"link",i),Cn(s),h.head.appendChild(s)))}}function gH(i){yi.D(i),jC("dns-prefetch",i,null)}function yH(i,s){yi.C(i,s),jC("preconnect",i,s)}function bH(i,s,c){yi.L(i,s,c);var h=yl;if(h&&i&&s){var b='link[rel="preload"][as="'+$r(s)+'"]';s==="image"&&c&&c.imageSrcSet?(b+='[imagesrcset="'+$r(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(b+='[imagesizes="'+$r(c.imageSizes)+'"]')):b+='[href="'+$r(i)+'"]';var _=b;switch(s){case"style":_=bl(i);break;case"script":_=xl(i)}Fr.has(_)||(i=p({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:i,as:s},c),Fr.set(_,i),h.querySelector(b)!==null||s==="style"&&h.querySelector(bc(_))||s==="script"&&h.querySelector(xc(_))||(s=h.createElement("link"),zn(s,"link",i),Cn(s),h.head.appendChild(s)))}}function xH(i,s){yi.m(i,s);var c=yl;if(c&&i){var h=s&&typeof s.as=="string"?s.as:"script",b='link[rel="modulepreload"][as="'+$r(h)+'"][href="'+$r(i)+'"]',_=b;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=xl(i)}if(!Fr.has(_)&&(i=p({rel:"modulepreload",href:i},s),Fr.set(_,i),c.querySelector(b)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(xc(_)))return}h=c.createElement("link"),zn(h,"link",i),Cn(h),c.head.appendChild(h)}}}function wH(i,s,c){yi.S(i,s,c);var h=yl;if(h&&i){var b=Us(h).hoistableStyles,_=bl(i);s=s||"default";var M=b.get(_);if(!M){var D={loading:0,preload:null};if(M=h.querySelector(bc(_)))D.loading=5;else{i=p({rel:"stylesheet",href:i,"data-precedence":s},c),(c=Fr.get(_))&&eb(i,c);var G=M=h.createElement("link");Cn(G),zn(G,"link",i),G._p=new Promise(function(ie,he){G.onload=ie,G.onerror=he}),G.addEventListener("load",function(){D.loading|=1}),G.addEventListener("error",function(){D.loading|=2}),D.loading|=4,xh(M,s,h)}M={type:"stylesheet",instance:M,count:1,state:D},b.set(_,M)}}}function SH(i,s){yi.X(i,s);var c=yl;if(c&&i){var h=Us(c).hoistableScripts,b=xl(i),_=h.get(b);_||(_=c.querySelector(xc(b)),_||(i=p({src:i,async:!0},s),(s=Fr.get(b))&&tb(i,s),_=c.createElement("script"),Cn(_),zn(_,"link",i),c.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(b,_))}}function _H(i,s){yi.M(i,s);var c=yl;if(c&&i){var h=Us(c).hoistableScripts,b=xl(i),_=h.get(b);_||(_=c.querySelector(xc(b)),_||(i=p({src:i,async:!0,type:"module"},s),(s=Fr.get(b))&&tb(i,s),_=c.createElement("script"),Cn(_),zn(_,"link",i),c.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(b,_))}}function TC(i,s,c,h){var b=(b=ce.current)?bh(b):null;if(!b)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(s=bl(c.href),c=Us(b).hoistableStyles,h=c.get(s),h||(h={type:"style",instance:null,count:0,state:null},c.set(s,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){i=bl(c.href);var _=Us(b).hoistableStyles,M=_.get(i);if(M||(b=b.ownerDocument||b,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(i,M),(_=b.querySelector(bc(i)))&&!_._p&&(M.instance=_,M.state.loading=5),Fr.has(i)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},Fr.set(i,c),_||AH(b,i,c,M.state))),s&&h===null)throw Error(r(528,""));return M}if(s&&h!==null)throw Error(r(529,""));return null;case"script":return s=c.async,c=c.src,typeof c=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=xl(c),c=Us(b).hoistableScripts,h=c.get(s),h||(h={type:"script",instance:null,count:0,state:null},c.set(s,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function bl(i){return'href="'+$r(i)+'"'}function bc(i){return'link[rel="stylesheet"]['+i+"]"}function CC(i){return p({},i,{"data-precedence":i.precedence,precedence:null})}function AH(i,s,c,h){i.querySelector('link[rel="preload"][as="style"]['+s+"]")?h.loading=1:(s=i.createElement("link"),h.preload=s,s.addEventListener("load",function(){return h.loading|=1}),s.addEventListener("error",function(){return h.loading|=2}),zn(s,"link",c),Cn(s),i.head.appendChild(s))}function xl(i){return'[src="'+$r(i)+'"]'}function xc(i){return"script[async]"+i}function RC(i,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var h=i.querySelector('style[data-href~="'+$r(c.href)+'"]');if(h)return s.instance=h,Cn(h),h;var b=p({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return h=(i.ownerDocument||i).createElement("style"),Cn(h),zn(h,"style",b),xh(h,c.precedence,i),s.instance=h;case"stylesheet":b=bl(c.href);var _=i.querySelector(bc(b));if(_)return s.state.loading|=4,s.instance=_,Cn(_),_;h=CC(c),(b=Fr.get(b))&&eb(h,b),_=(i.ownerDocument||i).createElement("link"),Cn(_);var M=_;return M._p=new Promise(function(D,G){M.onload=D,M.onerror=G}),zn(_,"link",h),s.state.loading|=4,xh(_,c.precedence,i),s.instance=_;case"script":return _=xl(c.src),(b=i.querySelector(xc(_)))?(s.instance=b,Cn(b),b):(h=c,(b=Fr.get(_))&&(h=p({},c),tb(h,b)),i=i.ownerDocument||i,b=i.createElement("script"),Cn(b),zn(b,"link",h),i.head.appendChild(b),s.instance=b);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(h=s.instance,s.state.loading|=4,xh(h,c.precedence,i));return s.instance}function xh(i,s,c){for(var h=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=h.length?h[h.length-1]:null,_=b,M=0;M<h.length;M++){var D=h[M];if(D.dataset.precedence===s)_=D;else if(_!==b)break}_?_.parentNode.insertBefore(i,_.nextSibling):(s=c.nodeType===9?c.head:c,s.insertBefore(i,s.firstChild))}function eb(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.title==null&&(i.title=s.title)}function tb(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.integrity==null&&(i.integrity=s.integrity)}var wh=null;function NC(i,s,c){if(wh===null){var h=new Map,b=wh=new Map;b.set(c,h)}else b=wh,h=b.get(c),h||(h=new Map,b.set(c,h));if(h.has(i))return h;for(h.set(i,null),c=c.getElementsByTagName(i),b=0;b<c.length;b++){var _=c[b];if(!(_[$u]||_[xn]||i==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var M=_.getAttribute(s)||"";M=i+M;var D=h.get(M);D?D.push(_):h.set(M,[_])}}return h}function MC(i,s,c){i=i.ownerDocument||i,i.head.insertBefore(c,s==="title"?i.querySelector("head > title"):null)}function OH(i,s,c){if(c===1||s.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return i=s.disabled,typeof s.precedence=="string"&&i==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function PC(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function EH(i,s,c,h){if(c.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var b=bl(h.href),_=s.querySelector(bc(b));if(_){s=_._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(i.count++,i=Sh.bind(i),s.then(i,i)),c.state.loading|=4,c.instance=_,Cn(_);return}_=s.ownerDocument||s,h=CC(h),(b=Fr.get(b))&&eb(h,b),_=_.createElement("link"),Cn(_);var M=_;M._p=new Promise(function(D,G){M.onload=D,M.onerror=G}),zn(_,"link",h),c.instance=_}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(c,s),(s=c.state.preload)&&(c.state.loading&3)===0&&(i.count++,c=Sh.bind(i),s.addEventListener("load",c),s.addEventListener("error",c))}}var nb=0;function jH(i,s){return i.stylesheets&&i.count===0&&Ah(i,i.stylesheets),0<i.count||0<i.imgCount?function(c){var h=setTimeout(function(){if(i.stylesheets&&Ah(i,i.stylesheets),i.unsuspend){var _=i.unsuspend;i.unsuspend=null,_()}},6e4+s);0<i.imgBytes&&nb===0&&(nb=62500*sH());var b=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Ah(i,i.stylesheets),i.unsuspend)){var _=i.unsuspend;i.unsuspend=null,_()}},(i.imgBytes>nb?50:800)+s);return i.unsuspend=c,function(){i.unsuspend=null,clearTimeout(h),clearTimeout(b)}}:null}function Sh(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ah(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var _h=null;function Ah(i,s){i.stylesheets=null,i.unsuspend!==null&&(i.count++,_h=new Map,s.forEach(TH,i),_h=null,Sh.call(i))}function TH(i,s){if(!(s.state.loading&4)){var c=_h.get(i);if(c)var h=c.get(null);else{c=new Map,_h.set(i,c);for(var b=i.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<b.length;_++){var M=b[_];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(c.set(M.dataset.precedence,M),h=M)}h&&c.set(null,h)}b=s.instance,M=b.getAttribute("data-precedence"),_=c.get(M)||h,_===h&&c.set(null,b),c.set(M,b),this.count++,h=Sh.bind(this),b.addEventListener("load",h),b.addEventListener("error",h),_?_.parentNode.insertBefore(b,_.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(b,i.firstChild)),s.state.loading|=4}}var wc={$$typeof:T,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function CH(i,s,c,h,b,_,M,D,G){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=te(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=te(0),this.hiddenUpdates=te(null),this.identifierPrefix=h,this.onUncaughtError=b,this.onCaughtError=_,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=G,this.incompleteTransitions=new Map}function DC(i,s,c,h,b,_,M,D,G,ie,he,ge){return i=new CH(i,s,c,M,G,ie,he,ge,D),s=1,_===!0&&(s|=24),_=yr(3,null,null,s),i.current=_,_.stateNode=i,s=kg(),s.refCount++,i.pooledCache=s,s.refCount++,_.memoizedState={element:h,isDehydrated:c,cache:s},Ig(_),i}function kC(i){return i?(i=Xs,i):Xs}function $C(i,s,c,h,b,_){b=kC(b),h.context===null?h.context=b:h.pendingContext=b,h=Vi(s),h.payload={element:c},_=_===void 0?null:_,_!==null&&(h.callback=_),c=Gi(i,h,s),c!==null&&(dr(c,i,s),Ju(c,i,s))}function zC(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function rb(i,s){zC(i,s),(i=i.alternate)&&zC(i,s)}function LC(i){if(i.tag===13||i.tag===31){var s=Fo(i,67108864);s!==null&&dr(s,i,67108864),rb(i,67108864)}}function IC(i){if(i.tag===13||i.tag===31){var s=_r();s=Ue(s);var c=Fo(i,s);c!==null&&dr(c,i,s),rb(i,s)}}var Oh=!0;function RH(i,s,c,h){var b=z.T;z.T=null;var _=F.p;try{F.p=2,ab(i,s,c,h)}finally{F.p=_,z.T=b}}function NH(i,s,c,h){var b=z.T;z.T=null;var _=F.p;try{F.p=8,ab(i,s,c,h)}finally{F.p=_,z.T=b}}function ab(i,s,c,h){if(Oh){var b=ib(h);if(b===null)Fy(i,s,h,Eh,c),UC(i,h);else if(PH(b,i,s,c,h))h.stopPropagation();else if(UC(i,h),s&4&&-1<MH.indexOf(i)){for(;b!==null;){var _=Bs(b);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var M=we(_.pendingLanes);if(M!==0){var D=_;for(D.pendingLanes|=2,D.entangledLanes|=2;M;){var G=1<<31-dn(M);D.entanglements[1]|=G,M&=~G}Da(_),(St&6)===0&&(lh=B()+500,mc(0))}}break;case 31:case 13:D=Fo(_,2),D!==null&&dr(D,_,2),ch(),rb(_,2)}if(_=ib(h),_===null&&Fy(i,s,h,Eh,c),_===b)break;b=_}b!==null&&h.stopPropagation()}else Fy(i,s,h,null,c)}}function ib(i){return i=sg(i),ob(i)}var Eh=null;function ob(i){if(Eh=null,i=Is(i),i!==null){var s=o(i);if(s===null)i=null;else{var c=s.tag;if(c===13){if(i=l(s),i!==null)return i;i=null}else if(c===31){if(i=u(s),i!==null)return i;i=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null)}}return Eh=i,null}function BC(i){switch(i){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(J()){case ae:return 2;case Te:return 8;case Ee:case Oe:return 32;case Me:return 268435456;default:return 32}default:return 32}}var sb=!1,ro=null,ao=null,io=null,Sc=new Map,_c=new Map,oo=[],MH="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function UC(i,s){switch(i){case"focusin":case"focusout":ro=null;break;case"dragenter":case"dragleave":ao=null;break;case"mouseover":case"mouseout":io=null;break;case"pointerover":case"pointerout":Sc.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":_c.delete(s.pointerId)}}function Ac(i,s,c,h,b,_){return i===null||i.nativeEvent!==_?(i={blockedOn:s,domEventName:c,eventSystemFlags:h,nativeEvent:_,targetContainers:[b]},s!==null&&(s=Bs(s),s!==null&&LC(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,b!==null&&s.indexOf(b)===-1&&s.push(b),i)}function PH(i,s,c,h,b){switch(s){case"focusin":return ro=Ac(ro,i,s,c,h,b),!0;case"dragenter":return ao=Ac(ao,i,s,c,h,b),!0;case"mouseover":return io=Ac(io,i,s,c,h,b),!0;case"pointerover":var _=b.pointerId;return Sc.set(_,Ac(Sc.get(_)||null,i,s,c,h,b)),!0;case"gotpointercapture":return _=b.pointerId,_c.set(_,Ac(_c.get(_)||null,i,s,c,h,b)),!0}return!1}function qC(i){var s=Is(i.target);if(s!==null){var c=o(s);if(c!==null){if(s=c.tag,s===13){if(s=l(c),s!==null){i.blockedOn=s,Io(i.priority,function(){IC(c)});return}}else if(s===31){if(s=u(c),s!==null){i.blockedOn=s,Io(i.priority,function(){IC(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function jh(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=ib(i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);og=h,c.target.dispatchEvent(h),og=null}else return s=Bs(c),s!==null&&LC(s),i.blockedOn=c,!1;s.shift()}return!0}function HC(i,s,c){jh(i)&&c.delete(s)}function DH(){sb=!1,ro!==null&&jh(ro)&&(ro=null),ao!==null&&jh(ao)&&(ao=null),io!==null&&jh(io)&&(io=null),Sc.forEach(HC),_c.forEach(HC)}function Th(i,s){i.blockedOn===s&&(i.blockedOn=null,sb||(sb=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,DH)))}var Ch=null;function FC(i){Ch!==i&&(Ch=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ch===i&&(Ch=null);for(var s=0;s<i.length;s+=3){var c=i[s],h=i[s+1],b=i[s+2];if(typeof h!="function"){if(ob(h||c)===null)continue;break}var _=Bs(c);_!==null&&(i.splice(s,3),s-=3,iy(_,{pending:!0,data:b,method:c.method,action:h},h,b))}}))}function wl(i){function s(G){return Th(G,i)}ro!==null&&Th(ro,i),ao!==null&&Th(ao,i),io!==null&&Th(io,i),Sc.forEach(s),_c.forEach(s);for(var c=0;c<oo.length;c++){var h=oo[c];h.blockedOn===i&&(h.blockedOn=null)}for(;0<oo.length&&(c=oo[0],c.blockedOn===null);)qC(c),c.blockedOn===null&&oo.shift();if(c=(i.ownerDocument||i).$$reactFormReplay,c!=null)for(h=0;h<c.length;h+=3){var b=c[h],_=c[h+1],M=b[Fn]||null;if(typeof _=="function")M||FC(c);else if(M){var D=null;if(_&&_.hasAttribute("formAction")){if(b=_,M=_[Fn]||null)D=M.formAction;else if(ob(b)!==null)continue}else D=M.action;typeof D=="function"?c[h+1]=D:(c.splice(h,3),h-=3),FC(c)}}}function VC(){function i(_){_.canIntercept&&_.info==="react-transition"&&_.intercept({handler:function(){return new Promise(function(M){return b=M})},focusReset:"manual",scroll:"manual"})}function s(){b!==null&&(b(),b=null),h||setTimeout(c,20)}function c(){if(!h&&!navigation.transition){var _=navigation.currentEntry;_&&_.url!=null&&navigation.navigate(_.url,{state:_.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,b=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(c,100),function(){h=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),b!==null&&(b(),b=null)}}}function lb(i){this._internalRoot=i}Rh.prototype.render=lb.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(r(409));var c=s.current,h=_r();$C(c,h,i,s,null,null)},Rh.prototype.unmount=lb.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;$C(i.current,2,null,i,null,null),ch(),s[ei]=null}};function Rh(i){this._internalRoot=i}Rh.prototype.unstable_scheduleHydration=function(i){if(i){var s=tn();i={blockedOn:null,target:i,priority:s};for(var c=0;c<oo.length&&s!==0&&s<oo[c].priority;c++);oo.splice(c,0,i),c===0&&qC(i)}};var GC=t.version;if(GC!=="19.2.6")throw Error(r(527,GC,"19.2.6"));F.findDOMNode=function(i){var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=d(s),i=i!==null?m(i):null,i=i===null?null:i.stateNode,i};var kH={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Nh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Nh.isDisabled&&Nh.supportsFiber)try{Ot=Nh.inject(kH),gt=Nh}catch{}}return Ec.createRoot=function(i,s){if(!a(i))throw Error(r(299));var c=!1,h="",b=Jj,_=eT,M=tT;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onUncaughtError!==void 0&&(b=s.onUncaughtError),s.onCaughtError!==void 0&&(_=s.onCaughtError),s.onRecoverableError!==void 0&&(M=s.onRecoverableError)),s=DC(i,1,!1,null,null,c,h,null,b,_,M,VC),i[ei]=s.current,Hy(i),new lb(s)},Ec.hydrateRoot=function(i,s,c){if(!a(i))throw Error(r(299));var h=!1,b="",_=Jj,M=eT,D=tT,G=null;return c!=null&&(c.unstable_strictMode===!0&&(h=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onUncaughtError!==void 0&&(_=c.onUncaughtError),c.onCaughtError!==void 0&&(M=c.onCaughtError),c.onRecoverableError!==void 0&&(D=c.onRecoverableError),c.formState!==void 0&&(G=c.formState)),s=DC(i,1,!0,s,c??null,h,b,G,_,M,D,VC),s.context=kC(null),c=s.current,h=_r(),h=Ue(h),b=Vi(h),b.callback=null,Gi(c,b,h),c=h,s.current.lanes=c,be(s,c),Da(s),i[ei]=s.current,Hy(i),new Rh(s)},Ec.version="19.2.6",Ec}var n2;function VH(){if(n2)return fb.exports;n2=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(),fb.exports=FH(),fb.exports}var GH=VH(),WH=(e,t,n,r,a,o,l,u)=>{let f=document.documentElement,d=["light","dark"];function m(x){(Array.isArray(e)?e:[e]).forEach(A=>{let S=A==="class",w=S&&o?a.map(O=>o[O]||O):a;S?(f.classList.remove(...w),f.classList.add(o&&o[x]?o[x]:x)):f.setAttribute(A,x)}),p(x)}function p(x){u&&d.includes(x)&&(f.style.colorScheme=x)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)m(r);else try{let x=localStorage.getItem(t)||n,A=l&&x==="system"?g():x;m(A)}catch{}},r2=["light","dark"],mz="(prefers-color-scheme: dark)",ZH=typeof window>"u",M_=y.createContext(void 0),YH={setTheme:e=>{},themes:[]},zm=()=>{var e;return(e=y.useContext(M_))!=null?e:YH},KH=e=>y.useContext(M_)?y.createElement(y.Fragment,null,e.children):y.createElement(QH,{...e}),XH=["light","dark"],QH=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:a="theme",themes:o=XH,defaultTheme:l=n?"system":"light",attribute:u="data-theme",value:f,children:d,nonce:m,scriptProps:p})=>{let[g,x]=y.useState(()=>e9(a,l)),[A,S]=y.useState(()=>g==="system"?mb():g),w=f?Object.values(f):o,O=y.useCallback(j=>{let R=j;if(!R)return;j==="system"&&n&&(R=mb());let N=f?f[R]:R,k=t?t9(m):null,$=document.documentElement,V=I=>{I==="class"?($.classList.remove(...w),N&&$.classList.add(N)):I.startsWith("data-")&&(N?$.setAttribute(I,N):$.removeAttribute(I))};if(Array.isArray(u)?u.forEach(V):V(u),r){let I=r2.includes(l)?l:null,L=r2.includes(R)?R:I;$.style.colorScheme=L}k==null||k()},[m]),E=y.useCallback(j=>{let R=typeof j=="function"?j(g):j;x(R);try{localStorage.setItem(a,R)}catch{}},[g]),T=y.useCallback(j=>{let R=mb(j);S(R),g==="system"&&n&&!e&&O("system")},[g,e]);y.useEffect(()=>{let j=window.matchMedia(mz);return j.addListener(T),T(j),()=>j.removeListener(T)},[T]),y.useEffect(()=>{let j=R=>{R.key===a&&(R.newValue?x(R.newValue):E(l))};return window.addEventListener("storage",j),()=>window.removeEventListener("storage",j)},[E]),y.useEffect(()=>{O(e??g)},[e,g]);let C=y.useMemo(()=>({theme:g,setTheme:E,forcedTheme:e,resolvedTheme:g==="system"?A:g,themes:n?[...o,"system"]:o,systemTheme:n?A:void 0}),[g,E,e,A,n,o]);return y.createElement(M_.Provider,{value:C},y.createElement(JH,{forcedTheme:e,storageKey:a,attribute:u,enableSystem:n,enableColorScheme:r,defaultTheme:l,value:f,themes:o,nonce:m,scriptProps:p}),d)},JH=y.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultTheme:o,value:l,themes:u,nonce:f,scriptProps:d})=>{let m=JSON.stringify([n,t,o,e,u,l,r,a]).slice(1,-1);return y.createElement("script",{...d,suppressHydrationWarning:!0,nonce:typeof window>"u"?f:"",dangerouslySetInnerHTML:{__html:`(${WH.toString()})(${m})`}})}),e9=(e,t)=>{if(ZH)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},t9=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},mb=e=>(e||(e=window.matchMedia(mz)),e.matches?"dark":"light");/**
50
- * react-router v7.15.1
51
- *
52
- * Copyright (c) Remix Software Inc.
53
- *
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE.md file in the root directory of this source tree.
56
- *
57
- * @license MIT
58
- */var a2="popstate";function i2(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function n9(e={}){function t(r,a){var d;let o=(d=a.state)==null?void 0:d.masked,{pathname:l,search:u,hash:f}=o||r.location;return D1("",{pathname:l,search:u,hash:f},a.state&&a.state.usr||null,a.state&&a.state.key||"default",o?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:nf(a)}return a9(t,n,null,e)}function Xt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function na(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function r9(){return Math.random().toString(36).substring(2,10)}function o2(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function D1(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?vu(t):t,state:n,key:t&&t.key||r||r9(),mask:a}}function nf({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function vu(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function a9(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:o=!1}=r,l=a.history,u="POP",f=null,d=m();d==null&&(d=0,l.replaceState({...l.state,idx:d},""));function m(){return(l.state||{idx:null}).idx}function p(){u="POP";let w=m(),O=w==null?null:w-d;d=w,f&&f({action:u,location:S.location,delta:O})}function g(w,O){u="PUSH";let E=i2(w)?w:D1(S.location,w,O);d=m()+1;let T=o2(E,d),C=S.createHref(E.mask||E);try{l.pushState(T,"",C)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;a.location.assign(C)}o&&f&&f({action:u,location:S.location,delta:1})}function x(w,O){u="REPLACE";let E=i2(w)?w:D1(S.location,w,O);d=m();let T=o2(E,d),C=S.createHref(E.mask||E);l.replaceState(T,"",C),o&&f&&f({action:u,location:S.location,delta:0})}function A(w){return i9(w)}let S={get action(){return u},get location(){return e(a,l)},listen(w){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(a2,p),f=w,()=>{a.removeEventListener(a2,p),f=null}},createHref(w){return t(a,w)},createURL:A,encodeLocation(w){let O=A(w);return{pathname:O.pathname,search:O.search,hash:O.hash}},push:g,replace:x,go(w){return l.go(w)}};return S}function i9(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Xt(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:nf(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function vz(e,t,n="/"){return o9(e,t,n,!1)}function o9(e,t,n,r,a){let o=typeof t=="string"?vu(t):t,l=ji(o.pathname||"/",n);if(l==null)return null;let u=s9(e),f=null,d=b9(l);for(let m=0;f==null&&m<u.length;++m)f=g9(u[m],d,r);return f}function s9(e){let t=gz(e);return l9(t),t}function gz(e,t=[],n=[],r="",a=!1){let o=(l,u,f=a,d)=>{let m={relativePath:d===void 0?l.path||"":d,caseSensitive:l.caseSensitive===!0,childrenIndex:u,route:l};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(r)&&f)return;Xt(m.relativePath.startsWith(r),`Absolute route path "${m.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(r.length)}let p=Sa([r,m.relativePath]),g=n.concat(m);l.children&&l.children.length>0&&(Xt(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),gz(l.children,t,g,p,f)),!(l.path==null&&!l.index)&&t.push({path:p,score:m9(p,l.index),routesMeta:g})};return e.forEach((l,u)=>{var f;if(l.path===""||!((f=l.path)!=null&&f.includes("?")))o(l,u);else for(let d of yz(l.path))o(l,u,!0,d)}),t}function yz(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return a?[o,""]:[o];let l=yz(r.join("/")),u=[];return u.push(...l.map(f=>f===""?o:[o,f].join("/"))),a&&u.push(...l),u.map(f=>e.startsWith("/")&&f===""?"/":f)}function l9(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:v9(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var u9=/^:[\w-]+$/,c9=3,f9=2,d9=1,h9=10,p9=-2,s2=e=>e==="*";function m9(e,t){let n=e.split("/"),r=n.length;return n.some(s2)&&(r+=p9),t&&(r+=f9),n.filter(a=>!s2(a)).reduce((a,o)=>a+(u9.test(o)?c9:o===""?d9:h9),r)}function v9(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function g9(e,t,n=!1){let{routesMeta:r}=e,a={},o="/",l=[];for(let u=0;u<r.length;++u){let f=r[u],d=u===r.length-1,m=o==="/"?t:t.slice(o.length)||"/",p=vp({path:f.relativePath,caseSensitive:f.caseSensitive,end:d},m),g=f.route;if(!p&&d&&n&&!r[r.length-1].route.index&&(p=vp({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},m)),!p)return null;Object.assign(a,p.params),l.push({params:a,pathname:Sa([o,p.pathname]),pathnameBase:_9(Sa([o,p.pathnameBase])),route:g}),p.pathnameBase!=="/"&&(o=Sa([o,p.pathnameBase]))}return l}function vp(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=y9(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let o=a[0],l=o.replace(/(.)\/+$/,"$1"),u=a.slice(1);return{params:r.reduce((d,{paramName:m,isOptional:p},g)=>{if(m==="*"){let A=u[g]||"";l=o.slice(0,o.length-A.length).replace(/(.)\/+$/,"$1")}const x=u[g];return p&&!x?d[m]=void 0:d[m]=(x||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:l,pattern:e}}function y9(e,t=!1,n=!0){na(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,f,d,m)=>{if(r.push({paramName:u,isOptional:f!=null}),f){let p=m.charAt(d+l.length);return p&&p!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function b9(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return na(!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 ji(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var x9=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function w9(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?vu(e):e,o;return n?(n=bz(n),n.startsWith("/")?o=l2(n.substring(1),"/"):o=l2(n,t)):o=t,{pathname:o,search:A9(r),hash:O9(a)}}function l2(e,t){let n=gp(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function vb(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function S9(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function P_(e){let t=S9(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Lm(e,t,n,r=!1){let a;typeof e=="string"?a=vu(e):(a={...e},Xt(!a.pathname||!a.pathname.includes("?"),vb("?","pathname","search",a)),Xt(!a.pathname||!a.pathname.includes("#"),vb("#","pathname","hash",a)),Xt(!a.search||!a.search.includes("#"),vb("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,u;if(l==null)u=n;else{let p=t.length-1;if(!r&&l.startsWith("..")){let g=l.split("/");for(;g[0]==="..";)g.shift(),p-=1;a.pathname=g.join("/")}u=p>=0?t[p]:"/"}let f=w9(a,u),d=l&&l!=="/"&&l.endsWith("/"),m=(o||l===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(d||m)&&(f.pathname+="/"),f}var bz=e=>e.replace(/\/\/+/g,"/"),Sa=e=>bz(e.join("/")),gp=e=>e.replace(/\/+$/,""),_9=e=>gp(e).replace(/^\/*/,"/"),A9=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,O9=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,E9=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function j9(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function T9(e){let t=e.map(n=>n.route.path).filter(Boolean);return Sa(t)||"/"}var xz=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function wz(e,t){let n=e;if(typeof n!="string"||!x9.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(xz)try{let o=new URL(window.location.href),l=n.startsWith("//")?new URL(o.protocol+n):new URL(n),u=ji(l.pathname,t);l.origin===o.origin&&u!=null?n=u+l.search+l.hash:a=!0}catch{na(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Sz=["POST","PUT","PATCH","DELETE"];new Set(Sz);var C9=["GET",...Sz];new Set(C9);var gu=y.createContext(null);gu.displayName="DataRouter";var Im=y.createContext(null);Im.displayName="DataRouterState";var _z=y.createContext(!1);function R9(){return y.useContext(_z)}var Az=y.createContext({isTransitioning:!1});Az.displayName="ViewTransition";var N9=y.createContext(new Map);N9.displayName="Fetchers";var M9=y.createContext(null);M9.displayName="Await";var Pr=y.createContext(null);Pr.displayName="Navigation";var Gf=y.createContext(null);Gf.displayName="Location";var Ta=y.createContext({outlet:null,matches:[],isDataRoute:!1});Ta.displayName="Route";var D_=y.createContext(null);D_.displayName="RouteError";var Oz="REACT_ROUTER_ERROR",P9="REDIRECT",D9="ROUTE_ERROR_RESPONSE";function k9(e){if(e.startsWith(`${Oz}:${P9}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function $9(e){if(e.startsWith(`${Oz}:${D9}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new E9(t.status,t.statusText,t.data)}catch{}}function z9(e,{relative:t}={}){Xt(yu(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=y.useContext(Pr),{hash:a,pathname:o,search:l}=Wf(e,{relative:t}),u=o;return n!=="/"&&(u=o==="/"?n:Sa([n,o])),r.createHref({pathname:u,search:l,hash:a})}function yu(){return y.useContext(Gf)!=null}function Dr(){return Xt(yu(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(Gf).location}var Ez="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function jz(e){y.useContext(Pr).static||y.useLayoutEffect(e)}function Ya(){let{isDataRoute:e}=y.useContext(Ta);return e?Q9():L9()}function L9(){Xt(yu(),"useNavigate() may be used only in the context of a <Router> component.");let e=y.useContext(gu),{basename:t,navigator:n}=y.useContext(Pr),{matches:r}=y.useContext(Ta),{pathname:a}=Dr(),o=JSON.stringify(P_(r)),l=y.useRef(!1);return jz(()=>{l.current=!0}),y.useCallback((f,d={})=>{if(na(l.current,Ez),!l.current)return;if(typeof f=="number"){n.go(f);return}let m=Lm(f,JSON.parse(o),a,d.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Sa([t,m.pathname])),(d.replace?n.replace:n.push)(m,d.state,d)},[t,n,o,a,e])}var I9=y.createContext(null);function B9(e){let t=y.useContext(Ta).outlet;return y.useMemo(()=>t&&y.createElement(I9.Provider,{value:e},t),[t,e])}function Wf(e,{relative:t}={}){let{matches:n}=y.useContext(Ta),{pathname:r}=Dr(),a=JSON.stringify(P_(n));return y.useMemo(()=>Lm(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function U9(e,t){return Tz(e,t)}function Tz(e,t,n){var w;Xt(yu(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=y.useContext(Pr),{matches:a}=y.useContext(Ta),o=a[a.length-1],l=o?o.params:{},u=o?o.pathname:"/",f=o?o.pathnameBase:"/",d=o&&o.route;{let O=d&&d.path||"";Rz(u,!d||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${O}">) 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.
59
-
60
- Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let m=Dr(),p;if(t){let O=typeof t=="string"?vu(t):t;Xt(f==="/"||((w=O.pathname)==null?void 0:w.startsWith(f)),`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 "${f}" but pathname "${O.pathname}" was given in the \`location\` prop.`),p=O}else p=m;let g=p.pathname||"/",x=g;if(f!=="/"){let O=f.replace(/^\//,"").split("/");x="/"+g.replace(/^\//,"").split("/").slice(O.length).join("/")}let A=n&&n.state.matches.length?n.state.matches.map(O=>Object.assign(O,{route:n.manifest[O.route.id]||O.route})):vz(e,{pathname:x});na(d||A!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),na(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.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=G9(A&&A.map(O=>Object.assign({},O,{params:Object.assign({},l,O.params),pathname:Sa([f,r.encodeLocation?r.encodeLocation(O.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?f:Sa([f,r.encodeLocation?r.encodeLocation(O.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathnameBase])})),a,n);return t&&S?y.createElement(Gf.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...p},navigationType:"POP"}},S):S}function q9(){let e=X9(),t=j9(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:o},"ErrorBoundary")," or"," ",y.createElement("code",{style:o},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:a},n):null,l)}var H9=y.createElement(q9,null),Cz=class extends y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=$9(e.digest);n&&(e=n)}let t=e!==void 0?y.createElement(Ta.Provider,{value:this.props.routeContext},y.createElement(D_.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?y.createElement(F9,{error:e},t):t}};Cz.contextType=_z;var gb=new WeakMap;function F9({children:e,error:t}){let{basename:n}=y.useContext(Pr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=k9(t.digest);if(r){let a=gb.get(t);if(a)throw a;let o=wz(r.location,n);if(xz&&!gb.get(t))if(o.isExternal||r.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:r.replace}));throw gb.set(t,l),l}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function V9({routeContext:e,match:t,children:n}){let r=y.useContext(gu);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(Ta.Provider,{value:e},n)}function G9(e,t=[],n){let r=n==null?void 0:n.state;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 a=e,o=r==null?void 0:r.errors;if(o!=null){let m=a.findIndex(p=>p.route.id&&(o==null?void 0:o[p.route.id])!==void 0);Xt(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,m+1))}let l=!1,u=-1;if(n&&r){l=r.renderFallback;for(let m=0;m<a.length;m++){let p=a[m];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(u=m),p.route.id){let{loaderData:g,errors:x}=r,A=p.route.loader&&!g.hasOwnProperty(p.route.id)&&(!x||x[p.route.id]===void 0);if(p.route.lazy||A){n.isStatic&&(l=!0),u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}}let f=n==null?void 0:n.onError,d=r&&f?(m,p)=>{var g,x;f(m,{location:r.location,params:((x=(g=r.matches)==null?void 0:g[0])==null?void 0:x.params)??{},pattern:T9(r.matches),errorInfo:p})}:void 0;return a.reduceRight((m,p,g)=>{let x,A=!1,S=null,w=null;r&&(x=o&&p.route.id?o[p.route.id]:void 0,S=p.route.errorElement||H9,l&&(u<0&&g===0?(Rz("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),A=!0,w=null):u===g&&(A=!0,w=p.route.hydrateFallbackElement||null)));let O=t.concat(a.slice(0,g+1)),E=()=>{let T;return x?T=S:A?T=w:p.route.Component?T=y.createElement(p.route.Component,null):p.route.element?T=p.route.element:T=m,y.createElement(V9,{match:p,routeContext:{outlet:m,matches:O,isDataRoute:r!=null},children:T})};return r&&(p.route.ErrorBoundary||p.route.errorElement||g===0)?y.createElement(Cz,{location:r.location,revalidation:r.revalidation,component:S,error:x,children:E(),routeContext:{outlet:null,matches:O,isDataRoute:!0},onError:d}):E()},null)}function k_(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function W9(e){let t=y.useContext(gu);return Xt(t,k_(e)),t}function Z9(e){let t=y.useContext(Im);return Xt(t,k_(e)),t}function Y9(e){let t=y.useContext(Ta);return Xt(t,k_(e)),t}function $_(e){let t=Y9(e),n=t.matches[t.matches.length-1];return Xt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function K9(){return $_("useRouteId")}function X9(){var r;let e=y.useContext(D_),t=Z9("useRouteError"),n=$_("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function Q9(){let{router:e}=W9("useNavigate"),t=$_("useNavigate"),n=y.useRef(!1);return jz(()=>{n.current=!0}),y.useCallback(async(a,o={})=>{na(n.current,Ez),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var u2={};function Rz(e,t,n){!t&&!u2[e]&&(u2[e]=!0,na(!1,n))}y.memo(J9);function J9({routes:e,manifest:t,future:n,state:r,isStatic:a,onError:o}){return Tz(e,void 0,{manifest:t,state:r,isStatic:a,onError:o})}function k1({to:e,replace:t,state:n,relative:r}){Xt(yu(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=y.useContext(Pr);na(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=y.useContext(Ta),{pathname:l}=Dr(),u=Ya(),f=Lm(e,P_(o),l,r==="path"),d=JSON.stringify(f);return y.useEffect(()=>{u(JSON.parse(d),{replace:t,state:n,relative:r})},[u,d,r,t,n]),null}function eF(e){return B9(e.context)}function Ar(e){Xt(!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 tF({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:o=!1,useTransitions:l}){Xt(!yu(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),f=y.useMemo(()=>({basename:u,navigator:a,static:o,useTransitions:l,future:{}}),[u,a,o,l]);typeof n=="string"&&(n=vu(n));let{pathname:d="/",search:m="",hash:p="",state:g=null,key:x="default",mask:A}=n,S=y.useMemo(()=>{let w=ji(d,u);return w==null?null:{location:{pathname:w,search:m,hash:p,state:g,key:x,mask:A},navigationType:r}},[u,d,m,p,g,x,r,A]);return na(S!=null,`<Router basename="${u}"> is not able to match the URL "${d}${m}${p}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:y.createElement(Pr.Provider,{value:f},y.createElement(Gf.Provider,{children:t,value:S}))}function nF({children:e,location:t}){return U9($1(e),t)}function $1(e,t=[]){let n=[];return y.Children.forEach(e,(r,a)=>{if(!y.isValidElement(r))return;let o=[...t,a];if(r.type===y.Fragment){n.push.apply(n,$1(r.props.children,o));return}Xt(r.type===Ar,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Xt(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=$1(r.props.children,o)),n.push(l)}),n}var rp="get",ap="application/x-www-form-urlencoded";function Bm(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function rF(e){return Bm(e)&&e.tagName.toLowerCase()==="button"}function aF(e){return Bm(e)&&e.tagName.toLowerCase()==="form"}function iF(e){return Bm(e)&&e.tagName.toLowerCase()==="input"}function oF(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function sF(e,t){return e.button===0&&(!t||t==="_self")&&!oF(e)}function z1(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(a=>[n,a]):[[n,r]])},[]))}function lF(e,t){let n=z1(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(o=>{n.append(a,o)})}),n}var Ph=null;function uF(){if(Ph===null)try{new FormData(document.createElement("form"),0),Ph=!1}catch{Ph=!0}return Ph}var cF=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function yb(e){return e!=null&&!cF.has(e)?(na(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ap}"`),null):e}function fF(e,t){let n,r,a,o,l;if(aF(e)){let u=e.getAttribute("action");r=u?ji(u,t):null,n=e.getAttribute("method")||rp,a=yb(e.getAttribute("enctype"))||ap,o=new FormData(e)}else if(rF(e)||iF(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||u.getAttribute("action");if(r=f?ji(f,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||rp,a=yb(e.getAttribute("formenctype"))||yb(u.getAttribute("enctype"))||ap,o=new FormData(u,e),!uF()){let{name:d,type:m,value:p}=e;if(m==="image"){let g=d?`${d}.`:"";o.append(`${g}x`,"0"),o.append(`${g}y`,"0")}else d&&o.append(d,p)}}else{if(Bm(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=rp,r=null,a=ap,l=e}return o&&a==="text/plain"&&(l=o,o=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:o,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function z_(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Nz(e,t,n,r){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:a.pathname==="/"?a.pathname=`_root.${r}`:t&&ji(a.pathname,t)==="/"?a.pathname=`${gp(t)}/_root.${r}`:a.pathname=`${gp(a.pathname)}.${r}`,a}async function dF(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function hF(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function pF(e,t,n){let r=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let l=await dF(o,n);return l.links?l.links():[]}return[]}));return yF(r.flat(1).filter(hF).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function c2(e,t,n,r,a,o){let l=(f,d)=>n[d]?f.route.id!==n[d].route.id:!0,u=(f,d)=>{var m;return n[d].pathname!==f.pathname||((m=n[d].route.path)==null?void 0:m.endsWith("*"))&&n[d].params["*"]!==f.params["*"]};return o==="assets"?t.filter((f,d)=>l(f,d)||u(f,d)):o==="data"?t.filter((f,d)=>{var p;let m=r.routes[f.route.id];if(!m||!m.hasLoader)return!1;if(l(f,d)||u(f,d))return!0;if(f.route.shouldRevalidate){let g=f.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((p=n[0])==null?void 0:p.params)||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function mF(e,t,{includeHydrateFallback:n}={}){return vF(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function vF(e){return[...new Set(e)]}function gF(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function yF(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let o=JSON.stringify(gF(a));return n.has(o)||(n.add(o),r.push({key:o,link:a})),r},[])}function L_(){let e=y.useContext(gu);return z_(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function bF(){let e=y.useContext(Im);return z_(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var I_=y.createContext(void 0);I_.displayName="FrameworkContext";function B_(){let e=y.useContext(I_);return z_(e,"You must render this element inside a <HydratedRouter> element"),e}function xF(e,t){let n=y.useContext(I_),[r,a]=y.useState(!1),[o,l]=y.useState(!1),{onFocus:u,onBlur:f,onMouseEnter:d,onMouseLeave:m,onTouchStart:p}=t,g=y.useRef(null);y.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let S=O=>{O.forEach(E=>{l(E.isIntersecting)})},w=new IntersectionObserver(S,{threshold:.5});return g.current&&w.observe(g.current),()=>{w.disconnect()}}},[e]),y.useEffect(()=>{if(r){let S=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(S)}}},[r]);let x=()=>{a(!0)},A=()=>{a(!1),l(!1)};return n?e!=="intent"?[o,g,{}]:[o,g,{onFocus:jc(u,x),onBlur:jc(f,A),onMouseEnter:jc(d,x),onMouseLeave:jc(m,A),onTouchStart:jc(p,x)}]:[!1,g,{}]}function jc(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function wF({page:e,...t}){let n=R9(),{router:r}=L_(),a=y.useMemo(()=>vz(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?n?y.createElement(_F,{page:e,matches:a,...t}):y.createElement(AF,{page:e,matches:a,...t}):null}function SF(e){let{manifest:t,routeModules:n}=B_(),[r,a]=y.useState([]);return y.useEffect(()=>{let o=!1;return pF(e,t,n).then(l=>{o||a(l)}),()=>{o=!0}},[e,t,n]),r}function _F({page:e,matches:t,...n}){let r=Dr(),{future:a}=B_(),{basename:o}=L_(),l=y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let u=Nz(e,o,a.unstable_trailingSlashAwareDataRequests,"rsc"),f=!1,d=[];for(let m of t)typeof m.route.shouldRevalidate=="function"?f=!0:d.push(m.route.id);return f&&d.length>0&&u.searchParams.set("_routes",d.join(",")),[u.pathname+u.search]},[o,a.unstable_trailingSlashAwareDataRequests,e,r,t]);return y.createElement(y.Fragment,null,l.map(u=>y.createElement("link",{key:u,rel:"prefetch",as:"fetch",href:u,...n})))}function AF({page:e,matches:t,...n}){let r=Dr(),{future:a,manifest:o,routeModules:l}=B_(),{basename:u}=L_(),{loaderData:f,matches:d}=bF(),m=y.useMemo(()=>c2(e,t,d,o,r,"data"),[e,t,d,o,r]),p=y.useMemo(()=>c2(e,t,d,o,r,"assets"),[e,t,d,o,r]),g=y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let S=new Set,w=!1;if(t.forEach(E=>{var C;let T=o.routes[E.route.id];!T||!T.hasLoader||(!m.some(j=>j.route.id===E.route.id)&&E.route.id in f&&((C=l[E.route.id])!=null&&C.shouldRevalidate)||T.hasClientLoader?w=!0:S.add(E.route.id))}),S.size===0)return[];let O=Nz(e,u,a.unstable_trailingSlashAwareDataRequests,"data");return w&&S.size>0&&O.searchParams.set("_routes",t.filter(E=>S.has(E.route.id)).map(E=>E.route.id).join(",")),[O.pathname+O.search]},[u,a.unstable_trailingSlashAwareDataRequests,f,r,o,m,t,e,l]),x=y.useMemo(()=>mF(p,o),[p,o]),A=SF(p);return y.createElement(y.Fragment,null,g.map(S=>y.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...n})),x.map(S=>y.createElement("link",{key:S,rel:"modulepreload",href:S,...n})),A.map(({key:S,link:w})=>y.createElement("link",{key:S,nonce:n.nonce,...w,crossOrigin:w.crossOrigin??n.crossOrigin})))}function OF(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var EF=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{EF&&(window.__reactRouterVersion="7.15.1")}catch{}function jF({basename:e,children:t,useTransitions:n,window:r}){let a=y.useRef();a.current==null&&(a.current=n9({window:r,v5Compat:!0}));let o=a.current,[l,u]=y.useState({action:o.action,location:o.location}),f=y.useCallback(d=>{n===!1?u(d):y.startTransition(()=>u(d))},[n]);return y.useLayoutEffect(()=>o.listen(f),[o,f]),y.createElement(tF,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,useTransitions:n})}var Mz=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Zc=y.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:o,replace:l,mask:u,state:f,target:d,to:m,preventScrollReset:p,viewTransition:g,defaultShouldRevalidate:x,...A},S){let{basename:w,navigator:O,useTransitions:E}=y.useContext(Pr),T=typeof m=="string"&&Mz.test(m),C=wz(m,w);m=C.to;let j=z9(m,{relative:a}),R=Dr(),N=null;if(u){let Z=Lm(u,[],R.mask?R.mask.pathname:"/",!0);w!=="/"&&(Z.pathname=Z.pathname==="/"?w:Sa([w,Z.pathname])),N=O.createHref(Z)}let[k,$,V]=xF(r,A),I=NF(m,{replace:l,mask:u,state:f,target:d,preventScrollReset:p,relative:a,viewTransition:g,defaultShouldRevalidate:x,useTransitions:E});function L(Z){t&&t(Z),Z.defaultPrevented||I(Z)}let H=!(C.isExternal||o),W=y.createElement("a",{...A,...V,href:(H?N:void 0)||C.absoluteURL||j,onClick:H?L:t,ref:OF(S,$),target:d,"data-discover":!T&&n==="render"?"true":void 0});return k&&!T?y.createElement(y.Fragment,null,W,y.createElement(wF,{page:j})):W});Zc.displayName="Link";var TF=y.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:o,to:l,viewTransition:u,children:f,...d},m){let p=Wf(l,{relative:d.relative}),g=Dr(),x=y.useContext(Im),{navigator:A,basename:S}=y.useContext(Pr),w=x!=null&&$F(p)&&u===!0,O=A.encodeLocation?A.encodeLocation(p).pathname:p.pathname,E=g.pathname,T=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;n||(E=E.toLowerCase(),T=T?T.toLowerCase():null,O=O.toLowerCase()),T&&S&&(T=ji(T,S)||T);const C=O!=="/"&&O.endsWith("/")?O.length-1:O.length;let j=E===O||!a&&E.startsWith(O)&&E.charAt(C)==="/",R=T!=null&&(T===O||!a&&T.startsWith(O)&&T.charAt(O.length)==="/"),N={isActive:j,isPending:R,isTransitioning:w},k=j?t:void 0,$;typeof r=="function"?$=r(N):$=[r,j?"active":null,R?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let V=typeof o=="function"?o(N):o;return y.createElement(Zc,{...d,"aria-current":k,className:$,ref:m,style:V,to:l,viewTransition:u},typeof f=="function"?f(N):f)});TF.displayName="NavLink";var CF=y.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:o,method:l=rp,action:u,onSubmit:f,relative:d,preventScrollReset:m,viewTransition:p,defaultShouldRevalidate:g,...x},A)=>{let{useTransitions:S}=y.useContext(Pr),w=DF(),O=kF(u,{relative:d}),E=l.toLowerCase()==="get"?"get":"post",T=typeof u=="string"&&Mz.test(u),C=j=>{if(f&&f(j),j.defaultPrevented)return;j.preventDefault();let R=j.nativeEvent.submitter,N=(R==null?void 0:R.getAttribute("formmethod"))||l,k=()=>w(R||j.currentTarget,{fetcherKey:t,method:N,navigate:n,replace:a,state:o,relative:d,preventScrollReset:m,viewTransition:p,defaultShouldRevalidate:g});S&&n!==!1?y.startTransition(()=>k()):k()};return y.createElement("form",{ref:A,method:E,action:O,onSubmit:r?f:C,...x,"data-discover":!T&&e==="render"?"true":void 0})});CF.displayName="Form";function RF(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Pz(e){let t=y.useContext(gu);return Xt(t,RF(e)),t}function NF(e,{target:t,replace:n,mask:r,state:a,preventScrollReset:o,relative:l,viewTransition:u,defaultShouldRevalidate:f,useTransitions:d}={}){let m=Ya(),p=Dr(),g=Wf(e,{relative:l});return y.useCallback(x=>{if(sF(x,t)){x.preventDefault();let A=n!==void 0?n:nf(p)===nf(g),S=()=>m(e,{replace:A,mask:r,state:a,preventScrollReset:o,relative:l,viewTransition:u,defaultShouldRevalidate:f});d?y.startTransition(()=>S()):S()}},[p,m,g,n,r,a,t,e,o,l,u,f,d])}function Um(e){na(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=y.useRef(z1(e)),n=y.useRef(!1),r=Dr(),a=y.useMemo(()=>lF(r.search,n.current?null:t.current),[r.search]),o=Ya(),l=y.useCallback((u,f)=>{const d=z1(typeof u=="function"?u(new URLSearchParams(a)):u);n.current=!0,o("?"+d,f)},[o,a]);return[a,l]}var MF=0,PF=()=>`__${String(++MF)}__`;function DF(){let{router:e}=Pz("useSubmit"),{basename:t}=y.useContext(Pr),n=K9(),r=e.fetch,a=e.navigate;return y.useCallback(async(o,l={})=>{let{action:u,method:f,encType:d,formData:m,body:p}=fF(o,t);if(l.navigate===!1){let g=l.fetcherKey||PF();await r(g,n,l.action||u,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:p,formMethod:l.method||f,formEncType:l.encType||d,flushSync:l.flushSync})}else await a(l.action||u,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:p,formMethod:l.method||f,formEncType:l.encType||d,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,a,t,n])}function kF(e,{relative:t}={}){let{basename:n}=y.useContext(Pr),r=y.useContext(Ta);Xt(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),o={...Wf(e||".",{relative:t})},l=Dr();if(e==null){o.search=l.search;let u=new URLSearchParams(o.search),f=u.getAll("index");if(f.some(m=>m==="")){u.delete("index"),f.filter(p=>p).forEach(p=>u.append("index",p));let m=u.toString();o.search=m?`?${m}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:Sa([n,o.pathname])),nf(o)}function $F(e,{relative:t}={}){let n=y.useContext(Az);Xt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Pz("useViewTransitionState"),a=Wf(e,{relative:t});if(!n.isTransitioning)return!1;let o=ji(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=ji(n.nextLocation.pathname,r)||n.nextLocation.pathname;return vp(a.pathname,l)!=null||vp(a.pathname,o)!=null}var Zf=pz();const zF=kt(Zf);function f2(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Yf(...e){return t=>{let n=!1;const r=e.map(a=>{const o=f2(a,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let a=0;a<r.length;a++){const o=r[a];typeof o=="function"?o():f2(e[a],null)}}}}function ot(...e){return y.useCallback(Yf(...e),e)}var LF=Symbol.for("react.lazy"),yp=N_[" use ".trim().toString()];function IF(e){return typeof e=="object"&&e!==null&&"then"in e}function Dz(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===LF&&"_payload"in e&&IF(e._payload)}function kz(e){const t=BF(e),n=y.forwardRef((r,a)=>{let{children:o,...l}=r;Dz(o)&&typeof yp=="function"&&(o=yp(o._payload));const u=y.Children.toArray(o),f=u.find(qF);if(f){const d=f.props.children,m=u.map(p=>p===f?y.Children.count(d)>1?y.Children.only(null):y.isValidElement(d)?d.props.children:null:p);return v.jsx(t,{...l,ref:a,children:y.isValidElement(d)?y.cloneElement(d,void 0,m):null})}return v.jsx(t,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}var Ns=kz("Slot");function BF(e){const t=y.forwardRef((n,r)=>{let{children:a,...o}=n;if(Dz(a)&&typeof yp=="function"&&(a=yp(a._payload)),y.isValidElement(a)){const l=FF(a),u=HF(o,a.props);return a.type!==y.Fragment&&(u.ref=r?Yf(r,l):l),y.cloneElement(a,u)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var UF=Symbol("radix.slottable");function qF(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===UF}function HF(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...u)=>{const f=o(...u);return a(...u),f}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function FF(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function $z(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=$z(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function mt(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=$z(e))&&(r&&(r+=" "),r+=t);return r}const d2=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,h2=mt,bu=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return h2(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:o}=t,l=Object.keys(a).map(d=>{const m=n==null?void 0:n[d],p=o==null?void 0:o[d];if(m===null)return null;const g=d2(m)||d2(p);return a[d][g]}),u=n&&Object.entries(n).reduce((d,m)=>{let[p,g]=m;return g===void 0||(d[p]=g),d},{}),f=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,m)=>{let{class:p,className:g,...x}=m;return Object.entries(x).every(A=>{let[S,w]=A;return Array.isArray(w)?w.includes({...o,...u}[S]):{...o,...u}[S]===w})?[...d,p,g]:d},[]);return h2(e,l,f,n==null?void 0:n.class,n==null?void 0:n.className)};/**
61
- * @license lucide-react v0.468.0 - ISC
62
- *
63
- * This source code is licensed under the ISC license.
64
- * See the LICENSE file in the root directory of this source tree.
65
- */const VF=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),zz=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
66
- * @license lucide-react v0.468.0 - ISC
67
- *
68
- * This source code is licensed under the ISC license.
69
- * See the LICENSE file in the root directory of this source tree.
70
- */var GF={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"};/**
71
- * @license lucide-react v0.468.0 - ISC
72
- *
73
- * This source code is licensed under the ISC license.
74
- * See the LICENSE file in the root directory of this source tree.
75
- */const WF=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:o,iconNode:l,...u},f)=>y.createElement("svg",{ref:f,...GF,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:zz("lucide",a),...u},[...l.map(([d,m])=>y.createElement(d,m)),...Array.isArray(o)?o:[o]]));/**
76
- * @license lucide-react v0.468.0 - ISC
77
- *
78
- * This source code is licensed under the ISC license.
79
- * See the LICENSE file in the root directory of this source tree.
80
- */const Qe=(e,t)=>{const n=y.forwardRef(({className:r,...a},o)=>y.createElement(WF,{ref:o,iconNode:t,className:zz(`lucide-${VF(e)}`,r),...a}));return n.displayName=`${e}`,n};/**
81
- * @license lucide-react v0.468.0 - ISC
82
- *
83
- * This source code is licensed under the ISC license.
84
- * See the LICENSE file in the root directory of this source tree.
85
- */const ZF=Qe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
86
- * @license lucide-react v0.468.0 - ISC
87
- *
88
- * This source code is licensed under the ISC license.
89
- * See the LICENSE file in the root directory of this source tree.
90
- */const YF=Qe("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
91
- * @license lucide-react v0.468.0 - ISC
92
- *
93
- * This source code is licensed under the ISC license.
94
- * See the LICENSE file in the root directory of this source tree.
95
- */const KF=Qe("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
96
- * @license lucide-react v0.468.0 - ISC
97
- *
98
- * This source code is licensed under the ISC license.
99
- * See the LICENSE file in the root directory of this source tree.
100
- */const XF=Qe("Camera",[["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"}]]);/**
101
- * @license lucide-react v0.468.0 - ISC
102
- *
103
- * This source code is licensed under the ISC license.
104
- * See the LICENSE file in the root directory of this source tree.
105
- */const Lz=Qe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
106
- * @license lucide-react v0.468.0 - ISC
107
- *
108
- * This source code is licensed under the ISC license.
109
- * See the LICENSE file in the root directory of this source tree.
110
- */const U_=Qe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
111
- * @license lucide-react v0.468.0 - ISC
112
- *
113
- * This source code is licensed under the ISC license.
114
- * See the LICENSE file in the root directory of this source tree.
115
- */const q_=Qe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
116
- * @license lucide-react v0.468.0 - ISC
117
- *
118
- * This source code is licensed under the ISC license.
119
- * See the LICENSE file in the root directory of this source tree.
120
- */const QF=Qe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
121
- * @license lucide-react v0.468.0 - ISC
122
- *
123
- * This source code is licensed under the ISC license.
124
- * See the LICENSE file in the root directory of this source tree.
125
- */const JF=Qe("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
126
- * @license lucide-react v0.468.0 - ISC
127
- *
128
- * This source code is licensed under the ISC license.
129
- * See the LICENSE file in the root directory of this source tree.
130
- */const eV=Qe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
131
- * @license lucide-react v0.468.0 - ISC
132
- *
133
- * This source code is licensed under the ISC license.
134
- * See the LICENSE file in the root directory of this source tree.
135
- */const tV=Qe("Film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);/**
136
- * @license lucide-react v0.468.0 - ISC
137
- *
138
- * This source code is licensed under the ISC license.
139
- * See the LICENSE file in the root directory of this source tree.
140
- */const Iz=Qe("House",[["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"}]]);/**
141
- * @license lucide-react v0.468.0 - ISC
142
- *
143
- * This source code is licensed under the ISC license.
144
- * See the LICENSE file in the root directory of this source tree.
145
- */const nV=Qe("ImagePlus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);/**
146
- * @license lucide-react v0.468.0 - ISC
147
- *
148
- * This source code is licensed under the ISC license.
149
- * See the LICENSE file in the root directory of this source tree.
150
- */const rV=Qe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
151
- * @license lucide-react v0.468.0 - ISC
152
- *
153
- * This source code is licensed under the ISC license.
154
- * See the LICENSE file in the root directory of this source tree.
155
- */const aV=Qe("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
156
- * @license lucide-react v0.468.0 - ISC
157
- *
158
- * This source code is licensed under the ISC license.
159
- * See the LICENSE file in the root directory of this source tree.
160
- */const iV=Qe("Keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]);/**
161
- * @license lucide-react v0.468.0 - ISC
162
- *
163
- * This source code is licensed under the ISC license.
164
- * See the LICENSE file in the root directory of this source tree.
165
- */const oV=Qe("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
166
- * @license lucide-react v0.468.0 - ISC
167
- *
168
- * This source code is licensed under the ISC license.
169
- * See the LICENSE file in the root directory of this source tree.
170
- */const Bz=Qe("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
171
- * @license lucide-react v0.468.0 - ISC
172
- *
173
- * This source code is licensed under the ISC license.
174
- * See the LICENSE file in the root directory of this source tree.
175
- */const sV=Qe("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
176
- * @license lucide-react v0.468.0 - ISC
177
- *
178
- * This source code is licensed under the ISC license.
179
- * See the LICENSE file in the root directory of this source tree.
180
- */const bp=Qe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
181
- * @license lucide-react v0.468.0 - ISC
182
- *
183
- * This source code is licensed under the ISC license.
184
- * See the LICENSE file in the root directory of this source tree.
185
- */const lV=Qe("LogOut",[["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"}]]);/**
186
- * @license lucide-react v0.468.0 - ISC
187
- *
188
- * This source code is licensed under the ISC license.
189
- * See the LICENSE file in the root directory of this source tree.
190
- */const uV=Qe("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
191
- * @license lucide-react v0.468.0 - ISC
192
- *
193
- * This source code is licensed under the ISC license.
194
- * See the LICENSE file in the root directory of this source tree.
195
- */const Uz=Qe("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
196
- * @license lucide-react v0.468.0 - ISC
197
- *
198
- * This source code is licensed under the ISC license.
199
- * See the LICENSE file in the root directory of this source tree.
200
- */const cV=Qe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
201
- * @license lucide-react v0.468.0 - ISC
202
- *
203
- * This source code is licensed under the ISC license.
204
- * See the LICENSE file in the root directory of this source tree.
205
- */const fV=Qe("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
206
- * @license lucide-react v0.468.0 - ISC
207
- *
208
- * This source code is licensed under the ISC license.
209
- * See the LICENSE file in the root directory of this source tree.
210
- */const dV=Qe("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
211
- * @license lucide-react v0.468.0 - ISC
212
- *
213
- * This source code is licensed under the ISC license.
214
- * See the LICENSE file in the root directory of this source tree.
215
- */const L1=Qe("Pencil",[["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"}]]);/**
216
- * @license lucide-react v0.468.0 - ISC
217
- *
218
- * This source code is licensed under the ISC license.
219
- * See the LICENSE file in the root directory of this source tree.
220
- */const H_=Qe("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
221
- * @license lucide-react v0.468.0 - ISC
222
- *
223
- * This source code is licensed under the ISC license.
224
- * See the LICENSE file in the root directory of this source tree.
225
- */const qz=Qe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
226
- * @license lucide-react v0.468.0 - ISC
227
- *
228
- * This source code is licensed under the ISC license.
229
- * See the LICENSE file in the root directory of this source tree.
230
- */const hV=Qe("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
231
- * @license lucide-react v0.468.0 - ISC
232
- *
233
- * This source code is licensed under the ISC license.
234
- * See the LICENSE file in the root directory of this source tree.
235
- */const pV=Qe("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
236
- * @license lucide-react v0.468.0 - ISC
237
- *
238
- * This source code is licensed under the ISC license.
239
- * See the LICENSE file in the root directory of this source tree.
240
- */const mV=Qe("ScanLine",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 12h10",key:"b7w52i"}]]);/**
241
- * @license lucide-react v0.468.0 - ISC
242
- *
243
- * This source code is licensed under the ISC license.
244
- * See the LICENSE file in the root directory of this source tree.
245
- */const vV=Qe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
246
- * @license lucide-react v0.468.0 - ISC
247
- *
248
- * This source code is licensed under the ISC license.
249
- * See the LICENSE file in the root directory of this source tree.
250
- */const Hz=Qe("Settings",[["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"}]]);/**
251
- * @license lucide-react v0.468.0 - ISC
252
- *
253
- * This source code is licensed under the ISC license.
254
- * See the LICENSE file in the root directory of this source tree.
255
- */const gV=Qe("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
256
- * @license lucide-react v0.468.0 - ISC
257
- *
258
- * This source code is licensed under the ISC license.
259
- * See the LICENSE file in the root directory of this source tree.
260
- */const yV=Qe("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
261
- * @license lucide-react v0.468.0 - ISC
262
- *
263
- * This source code is licensed under the ISC license.
264
- * See the LICENSE file in the root directory of this source tree.
265
- */const bV=Qe("Trash2",[["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"}]]);/**
266
- * @license lucide-react v0.468.0 - ISC
267
- *
268
- * This source code is licensed under the ISC license.
269
- * See the LICENSE file in the root directory of this source tree.
270
- */const xV=Qe("Upload",[["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"}]]);/**
271
- * @license lucide-react v0.468.0 - ISC
272
- *
273
- * This source code is licensed under the ISC license.
274
- * See the LICENSE file in the root directory of this source tree.
275
- */const wV=Qe("UserPlus",[["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"}]]);/**
276
- * @license lucide-react v0.468.0 - ISC
277
- *
278
- * This source code is licensed under the ISC license.
279
- * See the LICENSE file in the root directory of this source tree.
280
- */const SV=Qe("Users",[["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"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
281
- * @license lucide-react v0.468.0 - ISC
282
- *
283
- * This source code is licensed under the ISC license.
284
- * See the LICENSE file in the root directory of this source tree.
285
- */const _V=Qe("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
286
- * @license lucide-react v0.468.0 - ISC
287
- *
288
- * This source code is licensed under the ISC license.
289
- * See the LICENSE file in the root directory of this source tree.
290
- */const AV=Qe("Volume1",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}]]);/**
291
- * @license lucide-react v0.468.0 - ISC
292
- *
293
- * This source code is licensed under the ISC license.
294
- * See the LICENSE file in the root directory of this source tree.
295
- */const OV=Qe("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/**
296
- * @license lucide-react v0.468.0 - ISC
297
- *
298
- * This source code is licensed under the ISC license.
299
- * See the LICENSE file in the root directory of this source tree.
300
- */const Fz=Qe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),bb=768;function EV(){const[e,t]=y.useState(void 0);return y.useEffect(()=>{const n=window.matchMedia(`(max-width: ${bb-1}px)`),r=()=>{t(window.innerWidth<bb)};return n.addEventListener("change",r),t(window.innerWidth<bb),()=>n.removeEventListener("change",r)},[]),!!e}const F_="-",jV=e=>{const t=CV(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const u=l.split(F_);return u[0]===""&&u.length!==1&&u.shift(),Vz(u,t)||TV(l)},getConflictingClassGroupIds:(l,u)=>{const f=n[l]||[];return u&&r[l]?[...f,...r[l]]:f}}},Vz=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?Vz(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;const o=e.join(F_);return(l=t.validators.find(({validator:u})=>u(o)))==null?void 0:l.classGroupId},p2=/^\[(.+)\]$/,TV=e=>{if(p2.test(e)){const t=p2.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},CV=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return NV(Object.entries(e.classGroups),n).forEach(([o,l])=>{I1(l,r,o,t)}),r},I1=(e,t,n,r)=>{e.forEach(a=>{if(typeof a=="string"){const o=a===""?t:m2(t,a);o.classGroupId=n;return}if(typeof a=="function"){if(RV(a)){I1(a(r),t,n,r);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([o,l])=>{I1(l,m2(t,o),n,r)})})},m2=(e,t)=>{let n=e;return t.split(F_).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},RV=e=>e.isThemeGetter,NV=(e,t)=>t?e.map(([n,r])=>{const a=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([l,u])=>[t+l,u])):o);return[n,a]}):e,MV=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const a=(o,l)=>{n.set(o,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let l=n.get(o);if(l!==void 0)return l;if((l=r.get(o))!==void 0)return a(o,l),l},set(o,l){n.has(o)?n.set(o,l):a(o,l)}}},Gz="!",PV=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,a=t[0],o=t.length,l=u=>{const f=[];let d=0,m=0,p;for(let w=0;w<u.length;w++){let O=u[w];if(d===0){if(O===a&&(r||u.slice(w,w+o)===t)){f.push(u.slice(m,w)),m=w+o;continue}if(O==="/"){p=w;continue}}O==="["?d++:O==="]"&&d--}const g=f.length===0?u:u.substring(m),x=g.startsWith(Gz),A=x?g.substring(1):g,S=p&&p>m?p-m:void 0;return{modifiers:f,hasImportantModifier:x,baseClassName:A,maybePostfixModifierPosition:S}};return n?u=>n({className:u,parseClassName:l}):l},DV=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},kV=e=>({cache:MV(e.cacheSize),parseClassName:PV(e),...jV(e)}),$V=/\s+/,zV=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a}=t,o=[],l=e.trim().split($V);let u="";for(let f=l.length-1;f>=0;f-=1){const d=l[f],{modifiers:m,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:x}=n(d);let A=!!x,S=r(A?g.substring(0,x):g);if(!S){if(!A){u=d+(u.length>0?" "+u:u);continue}if(S=r(g),!S){u=d+(u.length>0?" "+u:u);continue}A=!1}const w=DV(m).join(":"),O=p?w+Gz:w,E=O+S;if(o.includes(E))continue;o.push(E);const T=a(S,A);for(let C=0;C<T.length;++C){const j=T[C];o.push(O+j)}u=d+(u.length>0?" "+u:u)}return u};function LV(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Wz(t))&&(r&&(r+=" "),r+=n);return r}const Wz=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Wz(e[r]))&&(n&&(n+=" "),n+=t);return n};function IV(e,...t){let n,r,a,o=l;function l(f){const d=t.reduce((m,p)=>p(m),e());return n=kV(d),r=n.cache.get,a=n.cache.set,o=u,u(f)}function u(f){const d=r(f);if(d)return d;const m=zV(f,n);return a(f,m),m}return function(){return o(LV.apply(null,arguments))}}const Gt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Zz=/^\[(?:([a-z-]+):)?(.+)\]$/i,BV=/^\d+\/\d+$/,UV=new Set(["px","full","screen"]),qV=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,HV=/\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$/,FV=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,VV=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,GV=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bi=e=>Pl(e)||UV.has(e)||BV.test(e),lo=e=>xu(e,"length",e7),Pl=e=>!!e&&!Number.isNaN(Number(e)),xb=e=>xu(e,"number",Pl),Tc=e=>!!e&&Number.isInteger(Number(e)),WV=e=>e.endsWith("%")&&Pl(e.slice(0,-1)),rt=e=>Zz.test(e),uo=e=>qV.test(e),ZV=new Set(["length","size","percentage"]),YV=e=>xu(e,ZV,Yz),KV=e=>xu(e,"position",Yz),XV=new Set(["image","url"]),QV=e=>xu(e,XV,n7),JV=e=>xu(e,"",t7),Cc=()=>!0,xu=(e,t,n)=>{const r=Zz.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},e7=e=>HV.test(e)&&!FV.test(e),Yz=()=>!1,t7=e=>VV.test(e),n7=e=>GV.test(e),r7=()=>{const e=Gt("colors"),t=Gt("spacing"),n=Gt("blur"),r=Gt("brightness"),a=Gt("borderColor"),o=Gt("borderRadius"),l=Gt("borderSpacing"),u=Gt("borderWidth"),f=Gt("contrast"),d=Gt("grayscale"),m=Gt("hueRotate"),p=Gt("invert"),g=Gt("gap"),x=Gt("gradientColorStops"),A=Gt("gradientColorStopPositions"),S=Gt("inset"),w=Gt("margin"),O=Gt("opacity"),E=Gt("padding"),T=Gt("saturate"),C=Gt("scale"),j=Gt("sepia"),R=Gt("skew"),N=Gt("space"),k=Gt("translate"),$=()=>["auto","contain","none"],V=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",rt,t],L=()=>[rt,t],H=()=>["",bi,lo],W=()=>["auto",Pl,rt],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],z=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>["start","end","center","between","around","evenly","stretch"],Q=()=>["","0",rt],K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>[Pl,rt];return{cacheSize:500,separator:":",theme:{colors:[Cc],spacing:[bi,lo],blur:["none","",uo,rt],brightness:P(),borderColor:[e],borderRadius:["none","","full",uo,rt],borderSpacing:L(),borderWidth:H(),contrast:P(),grayscale:Q(),hueRotate:P(),invert:Q(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[WV,lo],inset:I(),margin:I(),opacity:P(),padding:L(),saturate:P(),scale:P(),sepia:Q(),skew:P(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",rt]}],container:["container"],columns:[{columns:[uo]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"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"],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:[...Z(),rt]}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Tc,rt]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",rt]}],grow:[{grow:Q()}],shrink:[{shrink:Q()}],order:[{order:["first","last","none",Tc,rt]}],"grid-cols":[{"grid-cols":[Cc]}],"col-start-end":[{col:["auto",{span:["full",Tc,rt]},rt]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[Cc]}],"row-start-end":[{row:["auto",{span:[Tc,rt]},rt]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",rt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",rt]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",rt,t]}],"min-w":[{"min-w":[rt,t,"min","max","fit"]}],"max-w":[{"max-w":[rt,t,"none","full","min","max","fit","prose",{screen:[uo]},uo]}],h:[{h:[rt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[rt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[rt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[rt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",uo,lo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",xb]}],"font-family":[{font:[Cc]}],"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:["tighter","tight","normal","wide","wider","widest",rt]}],"line-clamp":[{"line-clamp":["none",Pl,xb]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",bi,rt]}],"list-image":[{"list-image":["none",rt]}],"list-style-type":[{list:["none","disc","decimal",rt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[O]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[O]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",bi,lo]}],"underline-offset":[{"underline-offset":["auto",bi,rt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",rt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",rt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[O]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),KV]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",YV]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},QV]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[A]}],"gradient-via-pos":[{via:[A]}],"gradient-to-pos":[{to:[A]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[O]}],"border-style":[{border:[...z(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[O]}],"divide-style":[{divide:z()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...z()]}],"outline-offset":[{"outline-offset":[bi,rt]}],"outline-w":[{outline:[bi,lo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[O]}],"ring-offset-w":[{"ring-offset":[bi,lo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",uo,JV]}],"shadow-color":[{shadow:[Cc]}],opacity:[{opacity:[O]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",uo,rt]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[p]}],saturate:[{saturate:[T]}],sepia:[{sepia:[j]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[O]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",rt]}],duration:[{duration:P()}],ease:[{ease:["linear","in","out","in-out",rt]}],delay:[{delay:P()}],animate:[{animate:["none","spin","ping","pulse","bounce",rt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Tc,rt]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[R]}],"skew-y":[{"skew-y":[R]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",rt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",rt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",rt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[bi,lo,xb]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},a7=IV(r7);function ye(...e){return a7(mt(e))}const qm=bu("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10",pill:"h-12 px-6 rounded-pill",nav:"h-7 px-3 text-xs"}},defaultVariants:{variant:"default",size:"default"}}),ct=y.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...a},o)=>{const l=r?Ns:"button";return v.jsx(l,{className:ye(qm({variant:t,size:n,className:e})),ref:o,...a})});ct.displayName="Button";const cn=y.forwardRef(({className:e,type:t,...n},r)=>v.jsx("input",{type:t,className:ye("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));cn.displayName="Input";var i7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Kz=i7.reduce((e,t)=>{const n=kz(`Primitive.${t}`),r=y.forwardRef((a,o)=>{const{asChild:l,...u}=a,f=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(f,{...u,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),o7="Separator",v2="horizontal",s7=["horizontal","vertical"],Xz=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=v2,...a}=e,o=l7(r)?r:v2,u=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return v.jsx(Kz.div,{"data-orientation":o,...u,...a,ref:t})});Xz.displayName=o7;function l7(e){return s7.includes(e)}var Qz=Xz;const So=y.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},a)=>v.jsx(Qz,{ref:a,decorative:n,orientation:t,className:ye("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));So.displayName=Qz.displayName;function De(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function u7(e,t){const n=y.createContext(t),r=o=>{const{children:l,...u}=o,f=y.useMemo(()=>u,Object.values(u));return v.jsx(n.Provider,{value:f,children:l})};r.displayName=e+"Provider";function a(o){const l=y.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,a]}function aa(e,t=[]){let n=[];function r(o,l){const u=y.createContext(l),f=n.length;n=[...n,l];const d=p=>{var O;const{scope:g,children:x,...A}=p,S=((O=g==null?void 0:g[e])==null?void 0:O[f])||u,w=y.useMemo(()=>A,Object.values(A));return v.jsx(S.Provider,{value:w,children:x})};d.displayName=o+"Provider";function m(p,g){var S;const x=((S=g==null?void 0:g[e])==null?void 0:S[f])||u,A=y.useContext(x);if(A)return A;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${o}\``)}return[d,m]}const a=()=>{const o=n.map(l=>y.createContext(l));return function(u){const f=(u==null?void 0:u[e])||o;return y.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return a.scopeName=e,[r,c7(a,...t)]}function c7(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const l=r.reduce((u,{useScope:f,scopeName:d})=>{const p=f(o)[`__scope${d}`];return{...u,...p}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var Un=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},f7=N_[" useId ".trim().toString()]||(()=>{}),d7=0;function _a(e){const[t,n]=y.useState(f7());return Un(()=>{n(r=>r??String(d7++))},[e]),e||(t?`radix-${t}`:"")}var h7=N_[" useInsertionEffect ".trim().toString()]||Un;function _o({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,o,l]=p7({defaultProp:t,onChange:n}),u=e!==void 0,f=u?e:a;{const m=y.useRef(e!==void 0);y.useEffect(()=>{const p=m.current;p!==u&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${u?"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.`),m.current=u},[u,r])}const d=y.useCallback(m=>{var p;if(u){const g=m7(m)?m(e):m;g!==e&&((p=l.current)==null||p.call(l,g))}else o(m)},[u,e,o,l]);return[f,d]}function p7({defaultProp:e,onChange:t}){const[n,r]=y.useState(e),a=y.useRef(n),o=y.useRef(t);return h7(()=>{o.current=t},[t]),y.useEffect(()=>{var l;a.current!==n&&((l=o.current)==null||l.call(o,n),a.current=n)},[n,a]),[n,r,o]}function m7(e){return typeof e=="function"}function Hl(e){const t=v7(e),n=y.forwardRef((r,a)=>{const{children:o,...l}=r,u=y.Children.toArray(o),f=u.find(g7);if(f){const d=f.props.children,m=u.map(p=>p===f?y.Children.count(d)>1?y.Children.only(null):y.isValidElement(d)?d.props.children:null:p);return v.jsx(t,{...l,ref:a,children:y.isValidElement(d)?y.cloneElement(d,void 0,m):null})}return v.jsx(t,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}function v7(e){const t=y.forwardRef((n,r)=>{const{children:a,...o}=n;if(y.isValidElement(a)){const l=b7(a),u=y7(o,a.props);return a.type!==y.Fragment&&(u.ref=r?Yf(r,l):l),y.cloneElement(a,u)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Jz=Symbol("radix.slottable");function eL(e){const t=({children:n})=>v.jsx(v.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Jz,t}function g7(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Jz}function y7(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...u)=>{const f=o(...u);return a(...u),f}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function b7(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var x7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ye=x7.reduce((e,t)=>{const n=Hl(`Primitive.${t}`),r=y.forwardRef((a,o)=>{const{asChild:l,...u}=a,f=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(f,{...u,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function tL(e,t){e&&Zf.flushSync(()=>e.dispatchEvent(t))}function In(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function w7(e,t=globalThis==null?void 0:globalThis.document){const n=In(e);y.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var S7="DismissableLayer",B1="dismissableLayer.update",_7="dismissableLayer.pointerDownOutside",A7="dismissableLayer.focusOutside",g2,nL=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Kf=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:l,onDismiss:u,...f}=e,d=y.useContext(nL),[m,p]=y.useState(null),g=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=y.useState({}),A=ot(t,N=>p(N)),S=Array.from(d.layers),[w]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),O=S.indexOf(w),E=m?S.indexOf(m):-1,T=d.layersWithOutsidePointerEventsDisabled.size>0,C=E>=O,j=j7(N=>{const k=N.target,$=[...d.branches].some(V=>V.contains(k));!C||$||(a==null||a(N),l==null||l(N),N.defaultPrevented||u==null||u())},g),R=T7(N=>{const k=N.target;[...d.branches].some(V=>V.contains(k))||(o==null||o(N),l==null||l(N),N.defaultPrevented||u==null||u())},g);return w7(N=>{E===d.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&u&&(N.preventDefault(),u()))},g),y.useEffect(()=>{if(m)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(g2=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(m)),d.layers.add(m),y2(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=g2)}},[m,g,n,d]),y.useEffect(()=>()=>{m&&(d.layers.delete(m),d.layersWithOutsidePointerEventsDisabled.delete(m),y2())},[m,d]),y.useEffect(()=>{const N=()=>x({});return document.addEventListener(B1,N),()=>document.removeEventListener(B1,N)},[]),v.jsx(Ye.div,{...f,ref:A,style:{pointerEvents:T?C?"auto":"none":void 0,...e.style},onFocusCapture:De(e.onFocusCapture,R.onFocusCapture),onBlurCapture:De(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:De(e.onPointerDownCapture,j.onPointerDownCapture)})});Kf.displayName=S7;var O7="DismissableLayerBranch",E7=y.forwardRef((e,t)=>{const n=y.useContext(nL),r=y.useRef(null),a=ot(t,r);return y.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),v.jsx(Ye.div,{...e,ref:a})});E7.displayName=O7;function j7(e,t=globalThis==null?void 0:globalThis.document){const n=In(e),r=y.useRef(!1),a=y.useRef(()=>{});return y.useEffect(()=>{const o=u=>{if(u.target&&!r.current){let f=function(){rL(_7,n,d,{discrete:!0})};const d={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=f,t.addEventListener("click",a.current,{once:!0})):f()}else t.removeEventListener("click",a.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function T7(e,t=globalThis==null?void 0:globalThis.document){const n=In(e),r=y.useRef(!1);return y.useEffect(()=>{const a=o=>{o.target&&!r.current&&rL(A7,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function y2(){const e=new CustomEvent(B1);document.dispatchEvent(e)}function rL(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?tL(a,o):a.dispatchEvent(o)}var wb="focusScope.autoFocusOnMount",Sb="focusScope.autoFocusOnUnmount",b2={bubbles:!1,cancelable:!0},C7="FocusScope",Hm=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...l}=e,[u,f]=y.useState(null),d=In(a),m=In(o),p=y.useRef(null),g=ot(t,S=>f(S)),x=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let S=function(T){if(x.paused||!u)return;const C=T.target;u.contains(C)?p.current=C:co(p.current,{select:!0})},w=function(T){if(x.paused||!u)return;const C=T.relatedTarget;C!==null&&(u.contains(C)||co(p.current,{select:!0}))},O=function(T){if(document.activeElement===document.body)for(const j of T)j.removedNodes.length>0&&co(u)};document.addEventListener("focusin",S),document.addEventListener("focusout",w);const E=new MutationObserver(O);return u&&E.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",w),E.disconnect()}}},[r,u,x.paused]),y.useEffect(()=>{if(u){w2.add(x);const S=document.activeElement;if(!u.contains(S)){const O=new CustomEvent(wb,b2);u.addEventListener(wb,d),u.dispatchEvent(O),O.defaultPrevented||(R7(k7(aL(u)),{select:!0}),document.activeElement===S&&co(u))}return()=>{u.removeEventListener(wb,d),setTimeout(()=>{const O=new CustomEvent(Sb,b2);u.addEventListener(Sb,m),u.dispatchEvent(O),O.defaultPrevented||co(S??document.body,{select:!0}),u.removeEventListener(Sb,m),w2.remove(x)},0)}}},[u,d,m,x]);const A=y.useCallback(S=>{if(!n&&!r||x.paused)return;const w=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,O=document.activeElement;if(w&&O){const E=S.currentTarget,[T,C]=N7(E);T&&C?!S.shiftKey&&O===C?(S.preventDefault(),n&&co(T,{select:!0})):S.shiftKey&&O===T&&(S.preventDefault(),n&&co(C,{select:!0})):O===E&&S.preventDefault()}},[n,r,x.paused]);return v.jsx(Ye.div,{tabIndex:-1,...l,ref:g,onKeyDown:A})});Hm.displayName=C7;function R7(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(co(r,{select:t}),document.activeElement!==n)return}function N7(e){const t=aL(e),n=x2(t,e),r=x2(t.reverse(),e);return[n,r]}function aL(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function x2(e,t){for(const n of e)if(!M7(n,{upTo:t}))return n}function M7(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 P7(e){return e instanceof HTMLInputElement&&"select"in e}function co(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&P7(e)&&t&&e.select()}}var w2=D7();function D7(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=S2(e,t),e.unshift(t)},remove(t){var n;e=S2(e,t),(n=e[0])==null||n.resume()}}}function S2(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function k7(e){return e.filter(t=>t.tagName!=="A")}var $7="Portal",Xf=y.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[a,o]=y.useState(!1);Un(()=>o(!0),[]);const l=n||a&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?zF.createPortal(v.jsx(Ye.div,{...r,ref:t}),l):null});Xf.displayName=$7;function z7(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var ar=e=>{const{present:t,children:n}=e,r=L7(t),a=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=ot(r.ref,I7(a));return typeof n=="function"||r.isPresent?y.cloneElement(a,{ref:o}):null};ar.displayName="Presence";function L7(e){const[t,n]=y.useState(),r=y.useRef(null),a=y.useRef(e),o=y.useRef("none"),l=e?"mounted":"unmounted",[u,f]=z7(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const d=Dh(r.current);o.current=u==="mounted"?d:"none"},[u]),Un(()=>{const d=r.current,m=a.current;if(m!==e){const g=o.current,x=Dh(d);e?f("MOUNT"):x==="none"||(d==null?void 0:d.display)==="none"?f("UNMOUNT"):f(m&&g!==x?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,f]),Un(()=>{if(t){let d;const m=t.ownerDocument.defaultView??window,p=x=>{const S=Dh(r.current).includes(CSS.escape(x.animationName));if(x.target===t&&S&&(f("ANIMATION_END"),!a.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",d=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},g=x=>{x.target===t&&(o.current=Dh(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{m.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:y.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function Dh(e){return(e==null?void 0:e.animationName)||"none"}function I7(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var _b=0;function V_(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??_2()),document.body.insertAdjacentElement("beforeend",e[1]??_2()),_b++,()=>{_b===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),_b--}},[])}function _2(){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 La=function(){return La=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},La.apply(this,arguments)};function iL(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function B7(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,o;r<a;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var ip="right-scroll-bar-position",op="width-before-scroll-bar",U7="with-scroll-bars-hidden",q7="--removed-body-scroll-bar-size";function Ab(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function H7(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var F7=typeof window<"u"?y.useLayoutEffect:y.useEffect,A2=new WeakMap;function V7(e,t){var n=H7(null,function(r){return e.forEach(function(a){return Ab(a,r)})});return F7(function(){var r=A2.get(n);if(r){var a=new Set(r),o=new Set(e),l=n.current;a.forEach(function(u){o.has(u)||Ab(u,null)}),o.forEach(function(u){a.has(u)||Ab(u,l)})}A2.set(n,e)},[e]),n}function G7(e){return e}function W7(e,t){t===void 0&&(t=G7);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(u){return o(u)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(o),l=n}var f=function(){var m=l;l=[],m.forEach(o)},d=function(){return Promise.resolve().then(f)};d(),n={push:function(m){l.push(m),d()},filter:function(m){return l=l.filter(m),n}}}};return a}function Z7(e){e===void 0&&(e={});var t=W7(null);return t.options=La({async:!0,ssr:!1},e),t}var oL=function(e){var t=e.sideCar,n=iL(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return y.createElement(r,La({},n))};oL.isSideCarExport=!0;function Y7(e,t){return e.useMedium(t),oL}var sL=Z7(),Ob=function(){},Fm=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:Ob,onWheelCapture:Ob,onTouchMoveCapture:Ob}),a=r[0],o=r[1],l=e.forwardProps,u=e.children,f=e.className,d=e.removeScrollBar,m=e.enabled,p=e.shards,g=e.sideCar,x=e.noRelative,A=e.noIsolation,S=e.inert,w=e.allowPinchZoom,O=e.as,E=O===void 0?"div":O,T=e.gapMode,C=iL(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=g,R=V7([n,t]),N=La(La({},C),a);return y.createElement(y.Fragment,null,m&&y.createElement(j,{sideCar:sL,removeScrollBar:d,shards:p,noRelative:x,noIsolation:A,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n,gapMode:T}),l?y.cloneElement(y.Children.only(u),La(La({},N),{ref:R})):y.createElement(E,La({},N,{className:f,ref:R}),u))});Fm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Fm.classNames={fullWidth:op,zeroRight:ip};var K7=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function X7(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=K7();return t&&e.setAttribute("nonce",t),e}function Q7(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function J7(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var eG=function(){var e=0,t=null;return{add:function(n){e==0&&(t=X7())&&(Q7(t,n),J7(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},tG=function(){var e=eG();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},lL=function(){var e=tG(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},nG={left:0,top:0,right:0,gap:0},Eb=function(e){return parseInt(e||"",10)||0},rG=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Eb(n),Eb(r),Eb(a)]},aG=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return nG;var t=rG(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},iG=lL(),Dl="data-scroll-locked",oG=function(e,t,n,r){var a=e.left,o=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
301
- .`.concat(U7,` {
302
- overflow: hidden `).concat(r,`;
303
- padding-right: `).concat(u,"px ").concat(r,`;
304
- }
305
- body[`).concat(Dl,`] {
306
- overflow: hidden `).concat(r,`;
307
- overscroll-behavior: contain;
308
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
309
- padding-left: `.concat(a,`px;
310
- padding-top: `).concat(o,`px;
311
- padding-right: `).concat(l,`px;
312
- margin-left:0;
313
- margin-top:0;
314
- margin-right: `).concat(u,"px ").concat(r,`;
315
- `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
316
- }
317
-
318
- .`).concat(ip,` {
319
- right: `).concat(u,"px ").concat(r,`;
320
- }
321
-
322
- .`).concat(op,` {
323
- margin-right: `).concat(u,"px ").concat(r,`;
324
- }
325
-
326
- .`).concat(ip," .").concat(ip,` {
327
- right: 0 `).concat(r,`;
328
- }
329
-
330
- .`).concat(op," .").concat(op,` {
331
- margin-right: 0 `).concat(r,`;
332
- }
333
-
334
- body[`).concat(Dl,`] {
335
- `).concat(q7,": ").concat(u,`px;
336
- }
337
- `)},O2=function(){var e=parseInt(document.body.getAttribute(Dl)||"0",10);return isFinite(e)?e:0},sG=function(){y.useEffect(function(){return document.body.setAttribute(Dl,(O2()+1).toString()),function(){var e=O2()-1;e<=0?document.body.removeAttribute(Dl):document.body.setAttribute(Dl,e.toString())}},[])},lG=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;sG();var o=y.useMemo(function(){return aG(a)},[a]);return y.createElement(iG,{styles:oG(o,!t,a,n?"":"!important")})},U1=!1;if(typeof window<"u")try{var kh=Object.defineProperty({},"passive",{get:function(){return U1=!0,!0}});window.addEventListener("test",kh,kh),window.removeEventListener("test",kh,kh)}catch{U1=!1}var Sl=U1?{passive:!1}:!1,uG=function(e){return e.tagName==="TEXTAREA"},uL=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!uG(e)&&n[t]==="visible")},cG=function(e){return uL(e,"overflowY")},fG=function(e){return uL(e,"overflowX")},E2=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=cL(e,r);if(a){var o=fL(e,r),l=o[1],u=o[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},dG=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},hG=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},cL=function(e,t){return e==="v"?cG(t):fG(t)},fL=function(e,t){return e==="v"?dG(t):hG(t)},pG=function(e,t){return e==="h"&&t==="rtl"?-1:1},mG=function(e,t,n,r,a){var o=pG(e,window.getComputedStyle(t).direction),l=o*r,u=n.target,f=t.contains(u),d=!1,m=l>0,p=0,g=0;do{if(!u)break;var x=fL(e,u),A=x[0],S=x[1],w=x[2],O=S-w-o*A;(A||O)&&cL(e,u)&&(p+=O,g+=A);var E=u.parentNode;u=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!f&&u!==document.body||f&&(t.contains(u)||t===u));return(m&&Math.abs(p)<1||!m&&Math.abs(g)<1)&&(d=!0),d},$h=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},j2=function(e){return[e.deltaX,e.deltaY]},T2=function(e){return e&&"current"in e?e.current:e},vG=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gG=function(e){return`
338
- .block-interactivity-`.concat(e,` {pointer-events: none;}
339
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
340
- `)},yG=0,_l=[];function bG(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),a=y.useState(yG++)[0],o=y.useState(lL)[0],l=y.useRef(e);y.useEffect(function(){l.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var S=B7([e.lockRef.current],(e.shards||[]).map(T2),!0).filter(Boolean);return S.forEach(function(w){return w.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),S.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var u=y.useCallback(function(S,w){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!l.current.allowPinchZoom;var O=$h(S),E=n.current,T="deltaX"in S?S.deltaX:E[0]-O[0],C="deltaY"in S?S.deltaY:E[1]-O[1],j,R=S.target,N=Math.abs(T)>Math.abs(C)?"h":"v";if("touches"in S&&N==="h"&&R.type==="range")return!1;var k=window.getSelection(),$=k&&k.anchorNode,V=$?$===R||$.contains(R):!1;if(V)return!1;var I=E2(N,R);if(!I)return!0;if(I?j=N:(j=N==="v"?"h":"v",I=E2(N,R)),!I)return!1;if(!r.current&&"changedTouches"in S&&(T||C)&&(r.current=j),!j)return!0;var L=r.current||j;return mG(L,w,S,L==="h"?T:C)},[]),f=y.useCallback(function(S){var w=S;if(!(!_l.length||_l[_l.length-1]!==o)){var O="deltaY"in w?j2(w):$h(w),E=t.current.filter(function(j){return j.name===w.type&&(j.target===w.target||w.target===j.shadowParent)&&vG(j.delta,O)})[0];if(E&&E.should){w.cancelable&&w.preventDefault();return}if(!E){var T=(l.current.shards||[]).map(T2).filter(Boolean).filter(function(j){return j.contains(w.target)}),C=T.length>0?u(w,T[0]):!l.current.noIsolation;C&&w.cancelable&&w.preventDefault()}}},[]),d=y.useCallback(function(S,w,O,E){var T={name:S,delta:w,target:O,should:E,shadowParent:xG(O)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(C){return C!==T})},1)},[]),m=y.useCallback(function(S){n.current=$h(S),r.current=void 0},[]),p=y.useCallback(function(S){d(S.type,j2(S),S.target,u(S,e.lockRef.current))},[]),g=y.useCallback(function(S){d(S.type,$h(S),S.target,u(S,e.lockRef.current))},[]);y.useEffect(function(){return _l.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",f,Sl),document.addEventListener("touchmove",f,Sl),document.addEventListener("touchstart",m,Sl),function(){_l=_l.filter(function(S){return S!==o}),document.removeEventListener("wheel",f,Sl),document.removeEventListener("touchmove",f,Sl),document.removeEventListener("touchstart",m,Sl)}},[]);var x=e.removeScrollBar,A=e.inert;return y.createElement(y.Fragment,null,A?y.createElement(o,{styles:gG(a)}):null,x?y.createElement(lG,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function xG(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const wG=Y7(sL,bG);var Vm=y.forwardRef(function(e,t){return y.createElement(Fm,La({},e,{ref:t,sideCar:wG}))});Vm.classNames=Fm.classNames;var SG=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Al=new WeakMap,zh=new WeakMap,Lh={},jb=0,dL=function(e){return e&&(e.host||dL(e.parentNode))},_G=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=dL(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},AG=function(e,t,n,r){var a=_G(t,Array.isArray(e)?e:[e]);Lh[n]||(Lh[n]=new WeakMap);var o=Lh[n],l=[],u=new Set,f=new Set(a),d=function(p){!p||u.has(p)||(u.add(p),d(p.parentNode))};a.forEach(d);var m=function(p){!p||f.has(p)||Array.prototype.forEach.call(p.children,function(g){if(u.has(g))m(g);else try{var x=g.getAttribute(r),A=x!==null&&x!=="false",S=(Al.get(g)||0)+1,w=(o.get(g)||0)+1;Al.set(g,S),o.set(g,w),l.push(g),S===1&&A&&zh.set(g,!0),w===1&&g.setAttribute(n,"true"),A||g.setAttribute(r,"true")}catch(O){console.error("aria-hidden: cannot operate on ",g,O)}})};return m(t),u.clear(),jb++,function(){l.forEach(function(p){var g=Al.get(p)-1,x=o.get(p)-1;Al.set(p,g),o.set(p,x),g||(zh.has(p)||p.removeAttribute(r),zh.delete(p)),x||p.removeAttribute(n)}),jb--,jb||(Al=new WeakMap,Al=new WeakMap,zh=new WeakMap,Lh={})}},G_=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=SG(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),AG(r,a,n,"aria-hidden")):function(){return null}},Gm="Dialog",[hL,pL]=aa(Gm),[OG,Ca]=hL(Gm),mL=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:l=!0}=e,u=y.useRef(null),f=y.useRef(null),[d,m]=_o({prop:r,defaultProp:a??!1,onChange:o,caller:Gm});return v.jsx(OG,{scope:t,triggerRef:u,contentRef:f,contentId:_a(),titleId:_a(),descriptionId:_a(),open:d,onOpenChange:m,onOpenToggle:y.useCallback(()=>m(p=>!p),[m]),modal:l,children:n})};mL.displayName=Gm;var vL="DialogTrigger",gL=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ca(vL,n),o=ot(t,a.triggerRef);return v.jsx(Ye.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Y_(a.open),...r,ref:o,onClick:De(e.onClick,a.onOpenToggle)})});gL.displayName=vL;var W_="DialogPortal",[EG,yL]=hL(W_,{forceMount:void 0}),bL=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=Ca(W_,t);return v.jsx(EG,{scope:t,forceMount:n,children:y.Children.map(r,l=>v.jsx(ar,{present:n||o.open,children:v.jsx(Xf,{asChild:!0,container:a,children:l})}))})};bL.displayName=W_;var xp="DialogOverlay",xL=y.forwardRef((e,t)=>{const n=yL(xp,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=Ca(xp,e.__scopeDialog);return o.modal?v.jsx(ar,{present:r||o.open,children:v.jsx(TG,{...a,ref:t})}):null});xL.displayName=xp;var jG=Hl("DialogOverlay.RemoveScroll"),TG=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ca(xp,n);return v.jsx(Vm,{as:jG,allowPinchZoom:!0,shards:[a.contentRef],children:v.jsx(Ye.div,{"data-state":Y_(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),gs="DialogContent",wL=y.forwardRef((e,t)=>{const n=yL(gs,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=Ca(gs,e.__scopeDialog);return v.jsx(ar,{present:r||o.open,children:o.modal?v.jsx(CG,{...a,ref:t}):v.jsx(RG,{...a,ref:t})})});wL.displayName=gs;var CG=y.forwardRef((e,t)=>{const n=Ca(gs,e.__scopeDialog),r=y.useRef(null),a=ot(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return G_(o)},[]),v.jsx(SL,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:De(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:De(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&o.preventDefault()}),onFocusOutside:De(e.onFocusOutside,o=>o.preventDefault())})}),RG=y.forwardRef((e,t)=>{const n=Ca(gs,e.__scopeDialog),r=y.useRef(!1),a=y.useRef(!1);return v.jsx(SL,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),o.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:o=>{var f,d;(f=e.onInteractOutside)==null||f.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=o.target;((d=n.triggerRef.current)==null?void 0:d.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),SL=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...l}=e,u=Ca(gs,n),f=y.useRef(null),d=ot(t,f);return V_(),v.jsxs(v.Fragment,{children:[v.jsx(Hm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:v.jsx(Kf,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Y_(u.open),...l,ref:d,onDismiss:()=>u.onOpenChange(!1)})}),v.jsxs(v.Fragment,{children:[v.jsx(MG,{titleId:u.titleId}),v.jsx(DG,{contentRef:f,descriptionId:u.descriptionId})]})]})}),Z_="DialogTitle",_L=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ca(Z_,n);return v.jsx(Ye.h2,{id:a.titleId,...r,ref:t})});_L.displayName=Z_;var AL="DialogDescription",OL=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ca(AL,n);return v.jsx(Ye.p,{id:a.descriptionId,...r,ref:t})});OL.displayName=AL;var EL="DialogClose",jL=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ca(EL,n);return v.jsx(Ye.button,{type:"button",...r,ref:t,onClick:De(e.onClick,()=>a.onOpenChange(!1))})});jL.displayName=EL;function Y_(e){return e?"open":"closed"}var TL="DialogTitleWarning",[NG,CL]=u7(TL,{contentName:gs,titleName:Z_,docsSlug:"dialog"}),MG=({titleId:e})=>{const t=CL(TL),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
341
-
342
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
343
-
344
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},PG="DialogDescriptionWarning",DG=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${CL(PG).contentName}}.`;return y.useEffect(()=>{var o;const a=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},K_=mL,RL=gL,X_=bL,Qf=xL,Jf=wL,ed=_L,td=OL,Wm=jL;const kG=K_,$G=X_,NL=y.forwardRef(({className:e,...t},n)=>v.jsx(Qf,{className:ye("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));NL.displayName=Qf.displayName;const zG=bu("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),ML=y.forwardRef(({side:e="right",className:t,children:n,...r},a)=>v.jsxs($G,{children:[v.jsx(NL,{}),v.jsxs(Jf,{ref:a,className:ye(zG({side:e}),t),...r,children:[n,v.jsxs(Wm,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[v.jsx(Fz,{className:"h-4 w-4"}),v.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ML.displayName=Jf.displayName;const PL=({className:e,...t})=>v.jsx("div",{className:ye("flex flex-col space-y-2 text-center sm:text-left",e),...t});PL.displayName="SheetHeader";const DL=y.forwardRef(({className:e,...t},n)=>v.jsx(ed,{ref:n,className:ye("text-lg font-semibold text-foreground",e),...t}));DL.displayName=ed.displayName;const kL=y.forwardRef(({className:e,...t},n)=>v.jsx(td,{ref:n,className:ye("text-sm text-muted-foreground",e),...t}));kL.displayName=td.displayName;function C2({className:e,...t}){return v.jsx("div",{className:ye("animate-pulse rounded-md bg-muted",e),...t})}const LG=["top","right","bottom","left"],Ao=Math.min,Cr=Math.max,wp=Math.round,Ih=Math.floor,Ha=e=>({x:e,y:e}),IG={left:"right",right:"left",bottom:"top",top:"bottom"};function q1(e,t,n){return Cr(e,Ao(t,n))}function Ti(e,t){return typeof e=="function"?e(t):e}function Ci(e){return e.split("-")[0]}function wu(e){return e.split("-")[1]}function Q_(e){return e==="x"?"y":"x"}function J_(e){return e==="y"?"height":"width"}function Ia(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function eA(e){return Q_(Ia(e))}function BG(e,t,n){n===void 0&&(n=!1);const r=wu(e),a=eA(e),o=J_(a);let l=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=Sp(l)),[l,Sp(l)]}function UG(e){const t=Sp(e);return[H1(e),t,H1(t)]}function H1(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const R2=["left","right"],N2=["right","left"],qG=["top","bottom"],HG=["bottom","top"];function FG(e,t,n){switch(e){case"top":case"bottom":return n?t?N2:R2:t?R2:N2;case"left":case"right":return t?qG:HG;default:return[]}}function VG(e,t,n,r){const a=wu(e);let o=FG(Ci(e),n==="start",r);return a&&(o=o.map(l=>l+"-"+a),t&&(o=o.concat(o.map(H1)))),o}function Sp(e){const t=Ci(e);return IG[t]+e.slice(t.length)}function GG(e){return{top:0,right:0,bottom:0,left:0,...e}}function $L(e){return typeof e!="number"?GG(e):{top:e,right:e,bottom:e,left:e}}function _p(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function M2(e,t,n){let{reference:r,floating:a}=e;const o=Ia(t),l=eA(t),u=J_(l),f=Ci(t),d=o==="y",m=r.x+r.width/2-a.width/2,p=r.y+r.height/2-a.height/2,g=r[u]/2-a[u]/2;let x;switch(f){case"top":x={x:m,y:r.y-a.height};break;case"bottom":x={x:m,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:p};break;case"left":x={x:r.x-a.width,y:p};break;default:x={x:r.x,y:r.y}}switch(wu(t)){case"start":x[l]-=g*(n&&d?-1:1);break;case"end":x[l]+=g*(n&&d?-1:1);break}return x}async function WG(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:o,rects:l,elements:u,strategy:f}=e,{boundary:d="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:g=!1,padding:x=0}=Ti(t,e),A=$L(x),w=u[g?p==="floating"?"reference":"floating":p],O=_p(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(w)))==null||n?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:d,rootBoundary:m,strategy:f})),E=p==="floating"?{x:r,y:a,width:l.floating.width,height:l.floating.height}:l.reference,T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),C=await(o.isElement==null?void 0:o.isElement(T))?await(o.getScale==null?void 0:o.getScale(T))||{x:1,y:1}:{x:1,y:1},j=_p(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:E,offsetParent:T,strategy:f}):E);return{top:(O.top-j.top+A.top)/C.y,bottom:(j.bottom-O.bottom+A.bottom)/C.y,left:(O.left-j.left+A.left)/C.x,right:(j.right-O.right+A.right)/C.x}}const ZG=50,YG=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:l}=n,u=l.detectOverflow?l:{...l,detectOverflow:WG},f=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:p}=M2(d,r,f),g=r,x=0;const A={};for(let S=0;S<o.length;S++){const w=o[S];if(!w)continue;const{name:O,fn:E}=w,{x:T,y:C,data:j,reset:R}=await E({x:m,y:p,initialPlacement:r,placement:g,strategy:a,middlewareData:A,rects:d,platform:u,elements:{reference:e,floating:t}});m=T??m,p=C??p,A[O]={...A[O],...j},R&&x<ZG&&(x++,typeof R=="object"&&(R.placement&&(g=R.placement),R.rects&&(d=R.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):R.rects),{x:m,y:p}=M2(d,g,f)),S=-1)}return{x:m,y:p,placement:g,strategy:a,middlewareData:A}},KG=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:l,elements:u,middlewareData:f}=t,{element:d,padding:m=0}=Ti(e,t)||{};if(d==null)return{};const p=$L(m),g={x:n,y:r},x=eA(a),A=J_(x),S=await l.getDimensions(d),w=x==="y",O=w?"top":"left",E=w?"bottom":"right",T=w?"clientHeight":"clientWidth",C=o.reference[A]+o.reference[x]-g[x]-o.floating[A],j=g[x]-o.reference[x],R=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d));let N=R?R[T]:0;(!N||!await(l.isElement==null?void 0:l.isElement(R)))&&(N=u.floating[T]||o.floating[A]);const k=C/2-j/2,$=N/2-S[A]/2-1,V=Ao(p[O],$),I=Ao(p[E],$),L=V,H=N-S[A]-I,W=N/2-S[A]/2+k,Z=q1(L,W,H),z=!f.arrow&&wu(a)!=null&&W!==Z&&o.reference[A]/2-(W<L?V:I)-S[A]/2<0,F=z?W<L?W-L:W-H:0;return{[x]:g[x]+F,data:{[x]:Z,centerOffset:W-Z-F,...z&&{alignmentOffset:F}},reset:z}}}),XG=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:o,rects:l,initialPlacement:u,platform:f,elements:d}=t,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:S=!0,...w}=Ti(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const O=Ci(a),E=Ia(u),T=Ci(u)===u,C=await(f.isRTL==null?void 0:f.isRTL(d.floating)),j=g||(T||!S?[Sp(u)]:UG(u)),R=A!=="none";!g&&R&&j.push(...VG(u,S,A,C));const N=[u,...j],k=await f.detectOverflow(t,w),$=[];let V=((r=o.flip)==null?void 0:r.overflows)||[];if(m&&$.push(k[O]),p){const W=BG(a,l,C);$.push(k[W[0]],k[W[1]])}if(V=[...V,{placement:a,overflows:$}],!$.every(W=>W<=0)){var I,L;const W=(((I=o.flip)==null?void 0:I.index)||0)+1,Z=N[W];if(Z&&(!(p==="alignment"?E!==Ia(Z):!1)||V.every(Y=>Ia(Y.placement)===E?Y.overflows[0]>0:!0)))return{data:{index:W,overflows:V},reset:{placement:Z}};let z=(L=V.filter(F=>F.overflows[0]<=0).sort((F,Y)=>F.overflows[1]-Y.overflows[1])[0])==null?void 0:L.placement;if(!z)switch(x){case"bestFit":{var H;const F=(H=V.filter(Y=>{if(R){const Q=Ia(Y.placement);return Q===E||Q==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(Q=>Q>0).reduce((Q,K)=>Q+K,0)]).sort((Y,Q)=>Y[1]-Q[1])[0])==null?void 0:H[0];F&&(z=F);break}case"initialPlacement":z=u;break}if(a!==z)return{reset:{placement:z}}}return{}}}};function P2(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function D2(e){return LG.some(t=>e[t]>=0)}const QG=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...o}=Ti(e,t);switch(a){case"referenceHidden":{const l=await r.detectOverflow(t,{...o,elementContext:"reference"}),u=P2(l,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:D2(u)}}}case"escaped":{const l=await r.detectOverflow(t,{...o,altBoundary:!0}),u=P2(l,n.floating);return{data:{escapedOffsets:u,escaped:D2(u)}}}default:return{}}}}},zL=new Set(["left","top"]);async function JG(e,t){const{placement:n,platform:r,elements:a}=e,o=await(r.isRTL==null?void 0:r.isRTL(a.floating)),l=Ci(n),u=wu(n),f=Ia(n)==="y",d=zL.has(l)?-1:1,m=o&&f?-1:1,p=Ti(t,e);let{mainAxis:g,crossAxis:x,alignmentAxis:A}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof A=="number"&&(x=u==="end"?A*-1:A),f?{x:x*m,y:g*d}:{x:g*d,y:x*m}}const eW=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:l,middlewareData:u}=t,f=await JG(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:a+f.x,y:o+f.y,data:{...f,placement:l}}}}},tW=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a,platform:o}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:f={fn:O=>{let{x:E,y:T}=O;return{x:E,y:T}}},...d}=Ti(e,t),m={x:n,y:r},p=await o.detectOverflow(t,d),g=Ia(Ci(a)),x=Q_(g);let A=m[x],S=m[g];if(l){const O=x==="y"?"top":"left",E=x==="y"?"bottom":"right",T=A+p[O],C=A-p[E];A=q1(T,A,C)}if(u){const O=g==="y"?"top":"left",E=g==="y"?"bottom":"right",T=S+p[O],C=S-p[E];S=q1(T,S,C)}const w=f.fn({...t,[x]:A,[g]:S});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[x]:l,[g]:u}}}}}},nW=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:l}=t,{offset:u=0,mainAxis:f=!0,crossAxis:d=!0}=Ti(e,t),m={x:n,y:r},p=Ia(a),g=Q_(p);let x=m[g],A=m[p];const S=Ti(u,t),w=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(f){const T=g==="y"?"height":"width",C=o.reference[g]-o.floating[T]+w.mainAxis,j=o.reference[g]+o.reference[T]-w.mainAxis;x<C?x=C:x>j&&(x=j)}if(d){var O,E;const T=g==="y"?"width":"height",C=zL.has(Ci(a)),j=o.reference[p]-o.floating[T]+(C&&((O=l.offset)==null?void 0:O[p])||0)+(C?0:w.crossAxis),R=o.reference[p]+o.reference[T]+(C?0:((E=l.offset)==null?void 0:E[p])||0)-(C?w.crossAxis:0);A<j?A=j:A>R&&(A=R)}return{[g]:x,[p]:A}}}},rW=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:o,platform:l,elements:u}=t,{apply:f=()=>{},...d}=Ti(e,t),m=await l.detectOverflow(t,d),p=Ci(a),g=wu(a),x=Ia(a)==="y",{width:A,height:S}=o.floating;let w,O;p==="top"||p==="bottom"?(w=p,O=g===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(O=p,w=g==="end"?"top":"bottom");const E=S-m.top-m.bottom,T=A-m.left-m.right,C=Ao(S-m[w],E),j=Ao(A-m[O],T),R=!t.middlewareData.shift;let N=C,k=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=T),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=E),R&&!g){const V=Cr(m.left,0),I=Cr(m.right,0),L=Cr(m.top,0),H=Cr(m.bottom,0);x?k=A-2*(V!==0||I!==0?V+I:Cr(m.left,m.right)):N=S-2*(L!==0||H!==0?L+H:Cr(m.top,m.bottom))}await f({...t,availableWidth:k,availableHeight:N});const $=await l.getDimensions(u.floating);return A!==$.width||S!==$.height?{reset:{rects:!0}}:{}}}};function Zm(){return typeof window<"u"}function Su(e){return LL(e)?(e.nodeName||"").toLowerCase():"#document"}function Nr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ka(e){var t;return(t=(LL(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function LL(e){return Zm()?e instanceof Node||e instanceof Nr(e).Node:!1}function Ea(e){return Zm()?e instanceof Element||e instanceof Nr(e).Element:!1}function Di(e){return Zm()?e instanceof HTMLElement||e instanceof Nr(e).HTMLElement:!1}function k2(e){return!Zm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Nr(e).ShadowRoot}function nd(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=ja(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&a!=="inline"&&a!=="contents"}function aW(e){return/^(table|td|th)$/.test(Su(e))}function Ym(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const iW=/transform|translate|scale|rotate|perspective|filter/,oW=/paint|layout|strict|content/,rs=e=>!!e&&e!=="none";let Tb;function tA(e){const t=Ea(e)?ja(e):e;return rs(t.transform)||rs(t.translate)||rs(t.scale)||rs(t.rotate)||rs(t.perspective)||!nA()&&(rs(t.backdropFilter)||rs(t.filter))||iW.test(t.willChange||"")||oW.test(t.contain||"")}function sW(e){let t=Oo(e);for(;Di(t)&&!Fl(t);){if(tA(t))return t;if(Ym(t))return null;t=Oo(t)}return null}function nA(){return Tb==null&&(Tb=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Tb}function Fl(e){return/^(html|body|#document)$/.test(Su(e))}function ja(e){return Nr(e).getComputedStyle(e)}function Km(e){return Ea(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Oo(e){if(Su(e)==="html")return e;const t=e.assignedSlot||e.parentNode||k2(e)&&e.host||Ka(e);return k2(t)?t.host:t}function IL(e){const t=Oo(e);return Fl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Di(t)&&nd(t)?t:IL(t)}function rf(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=IL(e),o=a===((r=e.ownerDocument)==null?void 0:r.body),l=Nr(a);if(o){const u=F1(l);return t.concat(l,l.visualViewport||[],nd(a)?a:[],u&&n?rf(u):[])}else return t.concat(a,rf(a,[],n))}function F1(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function BL(e){const t=ja(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Di(e),o=a?e.offsetWidth:n,l=a?e.offsetHeight:r,u=wp(n)!==o||wp(r)!==l;return u&&(n=o,r=l),{width:n,height:r,$:u}}function rA(e){return Ea(e)?e:e.contextElement}function kl(e){const t=rA(e);if(!Di(t))return Ha(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=BL(t);let l=(o?wp(n.width):n.width)/r,u=(o?wp(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const lW=Ha(0);function UL(e){const t=Nr(e);return!nA()||!t.visualViewport?lW:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uW(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Nr(e)?!1:t}function ys(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=rA(e);let l=Ha(1);t&&(r?Ea(r)&&(l=kl(r)):l=kl(e));const u=uW(o,n,r)?UL(o):Ha(0);let f=(a.left+u.x)/l.x,d=(a.top+u.y)/l.y,m=a.width/l.x,p=a.height/l.y;if(o){const g=Nr(o),x=r&&Ea(r)?Nr(r):r;let A=g,S=F1(A);for(;S&&r&&x!==A;){const w=kl(S),O=S.getBoundingClientRect(),E=ja(S),T=O.left+(S.clientLeft+parseFloat(E.paddingLeft))*w.x,C=O.top+(S.clientTop+parseFloat(E.paddingTop))*w.y;f*=w.x,d*=w.y,m*=w.x,p*=w.y,f+=T,d+=C,A=Nr(S),S=F1(A)}}return _p({width:m,height:p,x:f,y:d})}function Xm(e,t){const n=Km(e).scrollLeft;return t?t.left+n:ys(Ka(e)).left+n}function qL(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Xm(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function cW(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o=a==="fixed",l=Ka(r),u=t?Ym(t.floating):!1;if(r===l||u&&o)return n;let f={scrollLeft:0,scrollTop:0},d=Ha(1);const m=Ha(0),p=Di(r);if((p||!p&&!o)&&((Su(r)!=="body"||nd(l))&&(f=Km(r)),p)){const x=ys(r);d=kl(r),m.x=x.x+r.clientLeft,m.y=x.y+r.clientTop}const g=l&&!p&&!o?qL(l,f):Ha(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-f.scrollLeft*d.x+m.x+g.x,y:n.y*d.y-f.scrollTop*d.y+m.y+g.y}}function fW(e){return Array.from(e.getClientRects())}function dW(e){const t=Ka(e),n=Km(e),r=e.ownerDocument.body,a=Cr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Cr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Xm(e);const u=-n.scrollTop;return ja(r).direction==="rtl"&&(l+=Cr(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:l,y:u}}const $2=25;function hW(e,t){const n=Nr(e),r=Ka(e),a=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,u=0,f=0;if(a){o=a.width,l=a.height;const m=nA();(!m||m&&t==="fixed")&&(u=a.offsetLeft,f=a.offsetTop)}const d=Xm(r);if(d<=0){const m=r.ownerDocument,p=m.body,g=getComputedStyle(p),x=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,A=Math.abs(r.clientWidth-p.clientWidth-x);A<=$2&&(o-=A)}else d<=$2&&(o+=d);return{width:o,height:l,x:u,y:f}}function pW(e,t){const n=ys(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=Di(e)?kl(e):Ha(1),l=e.clientWidth*o.x,u=e.clientHeight*o.y,f=a*o.x,d=r*o.y;return{width:l,height:u,x:f,y:d}}function z2(e,t,n){let r;if(t==="viewport")r=hW(e,n);else if(t==="document")r=dW(Ka(e));else if(Ea(t))r=pW(t,n);else{const a=UL(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return _p(r)}function HL(e,t){const n=Oo(e);return n===t||!Ea(n)||Fl(n)?!1:ja(n).position==="fixed"||HL(n,t)}function mW(e,t){const n=t.get(e);if(n)return n;let r=rf(e,[],!1).filter(u=>Ea(u)&&Su(u)!=="body"),a=null;const o=ja(e).position==="fixed";let l=o?Oo(e):e;for(;Ea(l)&&!Fl(l);){const u=ja(l),f=tA(l);!f&&u.position==="fixed"&&(a=null),(o?!f&&!a:!f&&u.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||nd(l)&&!f&&HL(e,l))?r=r.filter(m=>m!==l):a=u,l=Oo(l)}return t.set(e,r),r}function vW(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const l=[...n==="clippingAncestors"?Ym(t)?[]:mW(t,this._c):[].concat(n),r],u=z2(t,l[0],a);let f=u.top,d=u.right,m=u.bottom,p=u.left;for(let g=1;g<l.length;g++){const x=z2(t,l[g],a);f=Cr(x.top,f),d=Ao(x.right,d),m=Ao(x.bottom,m),p=Cr(x.left,p)}return{width:d-p,height:m-f,x:p,y:f}}function gW(e){const{width:t,height:n}=BL(e);return{width:t,height:n}}function yW(e,t,n){const r=Di(t),a=Ka(t),o=n==="fixed",l=ys(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const f=Ha(0);function d(){f.x=Xm(a)}if(r||!r&&!o)if((Su(t)!=="body"||nd(a))&&(u=Km(t)),r){const x=ys(t,!0,o,t);f.x=x.x+t.clientLeft,f.y=x.y+t.clientTop}else a&&d();o&&!r&&a&&d();const m=a&&!r&&!o?qL(a,u):Ha(0),p=l.left+u.scrollLeft-f.x-m.x,g=l.top+u.scrollTop-f.y-m.y;return{x:p,y:g,width:l.width,height:l.height}}function Cb(e){return ja(e).position==="static"}function L2(e,t){if(!Di(e)||ja(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ka(e)===n&&(n=n.ownerDocument.body),n}function FL(e,t){const n=Nr(e);if(Ym(e))return n;if(!Di(e)){let a=Oo(e);for(;a&&!Fl(a);){if(Ea(a)&&!Cb(a))return a;a=Oo(a)}return n}let r=L2(e,t);for(;r&&aW(r)&&Cb(r);)r=L2(r,t);return r&&Fl(r)&&Cb(r)&&!tA(r)?n:r||sW(e)||n}const bW=async function(e){const t=this.getOffsetParent||FL,n=this.getDimensions,r=await n(e.floating);return{reference:yW(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function xW(e){return ja(e).direction==="rtl"}const wW={convertOffsetParentRelativeRectToViewportRelativeRect:cW,getDocumentElement:Ka,getClippingRect:vW,getOffsetParent:FL,getElementRects:bW,getClientRects:fW,getDimensions:gW,getScale:kl,isElement:Ea,isRTL:xW};function VL(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function SW(e,t){let n=null,r;const a=Ka(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,f){u===void 0&&(u=!1),f===void 0&&(f=1),o();const d=e.getBoundingClientRect(),{left:m,top:p,width:g,height:x}=d;if(u||t(),!g||!x)return;const A=Ih(p),S=Ih(a.clientWidth-(m+g)),w=Ih(a.clientHeight-(p+x)),O=Ih(m),T={rootMargin:-A+"px "+-S+"px "+-w+"px "+-O+"px",threshold:Cr(0,Ao(1,f))||1};let C=!0;function j(R){const N=R[0].intersectionRatio;if(N!==f){if(!C)return l();N?l(!1,N):r=setTimeout(()=>{l(!1,1e-7)},1e3)}N===1&&!VL(d,e.getBoundingClientRect())&&l(),C=!1}try{n=new IntersectionObserver(j,{...T,root:a.ownerDocument})}catch{n=new IntersectionObserver(j,T)}n.observe(e)}return l(!0),o}function _W(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,d=rA(e),m=a||o?[...d?rf(d):[],...t?rf(t):[]]:[];m.forEach(O=>{a&&O.addEventListener("scroll",n,{passive:!0}),o&&O.addEventListener("resize",n)});const p=d&&u?SW(d,n):null;let g=-1,x=null;l&&(x=new ResizeObserver(O=>{let[E]=O;E&&E.target===d&&x&&t&&(x.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var T;(T=x)==null||T.observe(t)})),n()}),d&&!f&&x.observe(d),t&&x.observe(t));let A,S=f?ys(e):null;f&&w();function w(){const O=ys(e);S&&!VL(S,O)&&n(),S=O,A=requestAnimationFrame(w)}return n(),()=>{var O;m.forEach(E=>{a&&E.removeEventListener("scroll",n),o&&E.removeEventListener("resize",n)}),p==null||p(),(O=x)==null||O.disconnect(),x=null,f&&cancelAnimationFrame(A)}}const AW=eW,OW=tW,EW=XG,jW=rW,TW=QG,I2=KG,CW=nW,RW=(e,t,n)=>{const r=new Map,a={platform:wW,...n},o={...a.platform,_c:r};return YG(e,t,{...a,platform:o})};var NW=typeof document<"u",MW=function(){},sp=NW?y.useLayoutEffect:MW;function Ap(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ap(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const o=a[r];if(!(o==="_owner"&&e.$$typeof)&&!Ap(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function GL(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function B2(e,t){const n=GL(e);return Math.round(t*n)/n}function Rb(e){const t=y.useRef(e);return sp(()=>{t.current=e}),t}function PW(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:l}={},transform:u=!0,whileElementsMounted:f,open:d}=e,[m,p]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,x]=y.useState(r);Ap(g,r)||x(r);const[A,S]=y.useState(null),[w,O]=y.useState(null),E=y.useCallback(Y=>{Y!==R.current&&(R.current=Y,S(Y))},[]),T=y.useCallback(Y=>{Y!==N.current&&(N.current=Y,O(Y))},[]),C=o||A,j=l||w,R=y.useRef(null),N=y.useRef(null),k=y.useRef(m),$=f!=null,V=Rb(f),I=Rb(a),L=Rb(d),H=y.useCallback(()=>{if(!R.current||!N.current)return;const Y={placement:t,strategy:n,middleware:g};I.current&&(Y.platform=I.current),RW(R.current,N.current,Y).then(Q=>{const K={...Q,isPositioned:L.current!==!1};W.current&&!Ap(k.current,K)&&(k.current=K,Zf.flushSync(()=>{p(K)}))})},[g,t,n,I,L]);sp(()=>{d===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,p(Y=>({...Y,isPositioned:!1})))},[d]);const W=y.useRef(!1);sp(()=>(W.current=!0,()=>{W.current=!1}),[]),sp(()=>{if(C&&(R.current=C),j&&(N.current=j),C&&j){if(V.current)return V.current(C,j,H);H()}},[C,j,H,V,$]);const Z=y.useMemo(()=>({reference:R,floating:N,setReference:E,setFloating:T}),[E,T]),z=y.useMemo(()=>({reference:C,floating:j}),[C,j]),F=y.useMemo(()=>{const Y={position:n,left:0,top:0};if(!z.floating)return Y;const Q=B2(z.floating,m.x),K=B2(z.floating,m.y);return u?{...Y,transform:"translate("+Q+"px, "+K+"px)",...GL(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Q,top:K}},[n,u,z.floating,m.x,m.y]);return y.useMemo(()=>({...m,update:H,refs:Z,elements:z,floatingStyles:F}),[m,H,Z,z,F])}const DW=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?I2({element:r.current,padding:a}).fn(n):{}:r?I2({element:r,padding:a}).fn(n):{}}}},kW=(e,t)=>{const n=AW(e);return{name:n.name,fn:n.fn,options:[e,t]}},$W=(e,t)=>{const n=OW(e);return{name:n.name,fn:n.fn,options:[e,t]}},zW=(e,t)=>({fn:CW(e).fn,options:[e,t]}),LW=(e,t)=>{const n=EW(e);return{name:n.name,fn:n.fn,options:[e,t]}},IW=(e,t)=>{const n=jW(e);return{name:n.name,fn:n.fn,options:[e,t]}},BW=(e,t)=>{const n=TW(e);return{name:n.name,fn:n.fn,options:[e,t]}},UW=(e,t)=>{const n=DW(e);return{name:n.name,fn:n.fn,options:[e,t]}};var qW="Arrow",WL=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return v.jsx(Ye.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});WL.displayName=qW;var HW=WL;function ZL(e){const[t,n]=y.useState(void 0);return Un(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let l,u;if("borderBoxSize"in o){const f=o.borderBoxSize,d=Array.isArray(f)?f[0]:f;l=d.inlineSize,u=d.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var aA="Popper",[YL,_u]=aa(aA),[FW,KL]=YL(aA),XL=e=>{const{__scopePopper:t,children:n}=e,[r,a]=y.useState(null);return v.jsx(FW,{scope:t,anchor:r,onAnchorChange:a,children:n})};XL.displayName=aA;var QL="PopperAnchor",JL=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=KL(QL,n),l=y.useRef(null),u=ot(t,l),f=y.useRef(null);return y.useEffect(()=>{const d=f.current;f.current=(r==null?void 0:r.current)||l.current,d!==f.current&&o.onAnchorChange(f.current)}),r?null:v.jsx(Ye.div,{...a,ref:u})});JL.displayName=QL;var iA="PopperContent",[VW,GW]=YL(iA),e5=y.forwardRef((e,t)=>{var de,Ce,le,_e,Se,se;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:o="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:f=!0,collisionBoundary:d=[],collisionPadding:m=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:x="optimized",onPlaced:A,...S}=e,w=KL(iA,n),[O,E]=y.useState(null),T=ot(t,Ve=>E(Ve)),[C,j]=y.useState(null),R=ZL(C),N=(R==null?void 0:R.width)??0,k=(R==null?void 0:R.height)??0,$=r+(o!=="center"?"-"+o:""),V=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},I=Array.isArray(d)?d:[d],L=I.length>0,H={padding:V,boundary:I.filter(ZW),altBoundary:L},{refs:W,floatingStyles:Z,placement:z,isPositioned:F,middlewareData:Y}=PW({strategy:"fixed",placement:$,whileElementsMounted:(...Ve)=>_W(...Ve,{animationFrame:x==="always"}),elements:{reference:w.anchor},middleware:[kW({mainAxis:a+k,alignmentAxis:l}),f&&$W({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?zW():void 0,...H}),f&&LW({...H}),IW({...H,apply:({elements:Ve,rects:$e,availableWidth:Je,availableHeight:Ke})=>{const{width:vt,height:$t}=$e.reference,qt=Ve.floating.style;qt.setProperty("--radix-popper-available-width",`${Je}px`),qt.setProperty("--radix-popper-available-height",`${Ke}px`),qt.setProperty("--radix-popper-anchor-width",`${vt}px`),qt.setProperty("--radix-popper-anchor-height",`${$t}px`)}}),C&&UW({element:C,padding:u}),YW({arrowWidth:N,arrowHeight:k}),g&&BW({strategy:"referenceHidden",...H})]}),[Q,K]=r5(z),P=In(A);Un(()=>{F&&(P==null||P())},[F,P]);const U=(de=Y.arrow)==null?void 0:de.x,ne=(Ce=Y.arrow)==null?void 0:Ce.y,me=((le=Y.arrow)==null?void 0:le.centerOffset)!==0,[Ae,ce]=y.useState();return Un(()=>{O&&ce(window.getComputedStyle(O).zIndex)},[O]),v.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:F?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ae,"--radix-popper-transform-origin":[(_e=Y.transformOrigin)==null?void 0:_e.x,(Se=Y.transformOrigin)==null?void 0:Se.y].join(" "),...((se=Y.hide)==null?void 0:se.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(VW,{scope:n,placedSide:Q,onArrowChange:j,arrowX:U,arrowY:ne,shouldHideArrow:me,children:v.jsx(Ye.div,{"data-side":Q,"data-align":K,...S,ref:T,style:{...S.style,animation:F?void 0:"none"}})})})});e5.displayName=iA;var t5="PopperArrow",WW={top:"bottom",right:"left",bottom:"top",left:"right"},n5=y.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,o=GW(t5,r),l=WW[o.placedSide];return v.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:v.jsx(HW,{...a,ref:n,style:{...a.style,display:"block"}})})});n5.displayName=t5;function ZW(e){return e!==null}var YW=e=>({name:"transformOrigin",options:e,fn(t){var w,O,E;const{placement:n,rects:r,middlewareData:a}=t,l=((w=a.arrow)==null?void 0:w.centerOffset)!==0,u=l?0:e.arrowWidth,f=l?0:e.arrowHeight,[d,m]=r5(n),p={start:"0%",center:"50%",end:"100%"}[m],g=(((O=a.arrow)==null?void 0:O.x)??0)+u/2,x=(((E=a.arrow)==null?void 0:E.y)??0)+f/2;let A="",S="";return d==="bottom"?(A=l?p:`${g}px`,S=`${-f}px`):d==="top"?(A=l?p:`${g}px`,S=`${r.floating.height+f}px`):d==="right"?(A=`${-f}px`,S=l?p:`${x}px`):d==="left"&&(A=`${r.floating.width+f}px`,S=l?p:`${x}px`),{data:{x:A,y:S}}}});function r5(e){const[t,n="center"]=e.split("-");return[t,n]}var oA=XL,sA=JL,lA=e5,uA=n5,a5=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"}),KW="VisuallyHidden",i5=y.forwardRef((e,t)=>v.jsx(Ye.span,{...e,ref:t,style:{...a5,...e.style}}));i5.displayName=KW;var XW=i5,[Qm]=aa("Tooltip",[_u]),Jm=_u(),o5="TooltipProvider",QW=700,V1="tooltip.open",[JW,cA]=Qm(o5),s5=e=>{const{__scopeTooltip:t,delayDuration:n=QW,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:o}=e,l=y.useRef(!0),u=y.useRef(!1),f=y.useRef(0);return y.useEffect(()=>{const d=f.current;return()=>window.clearTimeout(d)},[]),v.jsx(JW,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(f.current),l.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:y.useCallback(d=>{u.current=d},[]),disableHoverableContent:a,children:o})};s5.displayName=o5;var af="Tooltip",[eZ,rd]=Qm(af),l5=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a,onOpenChange:o,disableHoverableContent:l,delayDuration:u}=e,f=cA(af,e.__scopeTooltip),d=Jm(t),[m,p]=y.useState(null),g=_a(),x=y.useRef(0),A=l??f.disableHoverableContent,S=u??f.delayDuration,w=y.useRef(!1),[O,E]=_o({prop:r,defaultProp:a??!1,onChange:N=>{N?(f.onOpen(),document.dispatchEvent(new CustomEvent(V1))):f.onClose(),o==null||o(N)},caller:af}),T=y.useMemo(()=>O?w.current?"delayed-open":"instant-open":"closed",[O]),C=y.useCallback(()=>{window.clearTimeout(x.current),x.current=0,w.current=!1,E(!0)},[E]),j=y.useCallback(()=>{window.clearTimeout(x.current),x.current=0,E(!1)},[E]),R=y.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>{w.current=!0,E(!0),x.current=0},S)},[S,E]);return y.useEffect(()=>()=>{x.current&&(window.clearTimeout(x.current),x.current=0)},[]),v.jsx(oA,{...d,children:v.jsx(eZ,{scope:t,contentId:g,open:O,stateAttribute:T,trigger:m,onTriggerChange:p,onTriggerEnter:y.useCallback(()=>{f.isOpenDelayedRef.current?R():C()},[f.isOpenDelayedRef,R,C]),onTriggerLeave:y.useCallback(()=>{A?j():(window.clearTimeout(x.current),x.current=0)},[j,A]),onOpen:C,onClose:j,disableHoverableContent:A,children:n})})};l5.displayName=af;var G1="TooltipTrigger",u5=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=rd(G1,n),o=cA(G1,n),l=Jm(n),u=y.useRef(null),f=ot(t,u,a.onTriggerChange),d=y.useRef(!1),m=y.useRef(!1),p=y.useCallback(()=>d.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),v.jsx(sA,{asChild:!0,...l,children:v.jsx(Ye.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:f,onPointerMove:De(e.onPointerMove,g=>{g.pointerType!=="touch"&&!m.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),m.current=!0)}),onPointerLeave:De(e.onPointerLeave,()=>{a.onTriggerLeave(),m.current=!1}),onPointerDown:De(e.onPointerDown,()=>{a.open&&a.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:De(e.onFocus,()=>{d.current||a.onOpen()}),onBlur:De(e.onBlur,a.onClose),onClick:De(e.onClick,a.onClose)})})});u5.displayName=G1;var fA="TooltipPortal",[tZ,nZ]=Qm(fA,{forceMount:void 0}),c5=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:a}=e,o=rd(fA,t);return v.jsx(tZ,{scope:t,forceMount:n,children:v.jsx(ar,{present:n||o.open,children:v.jsx(Xf,{asChild:!0,container:a,children:r})})})};c5.displayName=fA;var Vl="TooltipContent",f5=y.forwardRef((e,t)=>{const n=nZ(Vl,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...o}=e,l=rd(Vl,e.__scopeTooltip);return v.jsx(ar,{present:r||l.open,children:l.disableHoverableContent?v.jsx(d5,{side:a,...o,ref:t}):v.jsx(rZ,{side:a,...o,ref:t})})}),rZ=y.forwardRef((e,t)=>{const n=rd(Vl,e.__scopeTooltip),r=cA(Vl,e.__scopeTooltip),a=y.useRef(null),o=ot(t,a),[l,u]=y.useState(null),{trigger:f,onClose:d}=n,m=a.current,{onPointerInTransitChange:p}=r,g=y.useCallback(()=>{u(null),p(!1)},[p]),x=y.useCallback((A,S)=>{const w=A.currentTarget,O={x:A.clientX,y:A.clientY},E=lZ(O,w.getBoundingClientRect()),T=uZ(O,E),C=cZ(S.getBoundingClientRect()),j=dZ([...T,...C]);u(j),p(!0)},[p]);return y.useEffect(()=>()=>g(),[g]),y.useEffect(()=>{if(f&&m){const A=w=>x(w,m),S=w=>x(w,f);return f.addEventListener("pointerleave",A),m.addEventListener("pointerleave",S),()=>{f.removeEventListener("pointerleave",A),m.removeEventListener("pointerleave",S)}}},[f,m,x,g]),y.useEffect(()=>{if(l){const A=S=>{const w=S.target,O={x:S.clientX,y:S.clientY},E=(f==null?void 0:f.contains(w))||(m==null?void 0:m.contains(w)),T=!fZ(O,l);E?g():T&&(g(),d())};return document.addEventListener("pointermove",A),()=>document.removeEventListener("pointermove",A)}},[f,m,l,d,g]),v.jsx(d5,{...e,ref:o})}),[aZ,iZ]=Qm(af,{isInside:!1}),oZ=eL("TooltipContent"),d5=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:l,...u}=e,f=rd(Vl,n),d=Jm(n),{onClose:m}=f;return y.useEffect(()=>(document.addEventListener(V1,m),()=>document.removeEventListener(V1,m)),[m]),y.useEffect(()=>{if(f.trigger){const p=g=>{const x=g.target;x!=null&&x.contains(f.trigger)&&m()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[f.trigger,m]),v.jsx(Kf,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:p=>p.preventDefault(),onDismiss:m,children:v.jsxs(lA,{"data-state":f.stateAttribute,...d,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[v.jsx(oZ,{children:r}),v.jsx(aZ,{scope:n,isInside:!0,children:v.jsx(XW,{id:f.contentId,role:"tooltip",children:a||r})})]})})});f5.displayName=Vl;var h5="TooltipArrow",sZ=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=Jm(n);return iZ(h5,n).isInside?null:v.jsx(uA,{...a,...r,ref:t})});sZ.displayName=h5;function lZ(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,a,o)){case o:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function uZ(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function cZ(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}function fZ(e,t){const{x:n,y:r}=e;let a=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const u=t[o],f=t[l],d=u.x,m=u.y,p=f.x,g=f.y;m>r!=g>r&&n<(p-d)*(r-m)/(g-m)+d&&(a=!a)}return a}function dZ(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),hZ(t)}function hZ(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const a=e[r];for(;t.length>=2;){const o=t[t.length-1],l=t[t.length-2];if((o.x-l.x)*(a.y-l.y)>=(o.y-l.y)*(a.x-l.x))t.pop();else break}t.push(a)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const a=e[r];for(;n.length>=2;){const o=n[n.length-1],l=n[n.length-2];if((o.x-l.x)*(a.y-l.y)>=(o.y-l.y)*(a.x-l.x))n.pop();else break}n.push(a)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var pZ=s5,mZ=l5,vZ=u5,gZ=c5,p5=f5;const dA=pZ,Fa=mZ,Va=vZ,Aa=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>v.jsx(gZ,{children:v.jsx(p5,{ref:r,sideOffset:t,className:ye("z-[50] overflow-hidden rounded bg-black/75 px-[7px] py-0.5 text-[11px] text-white animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 origin-[--radix-tooltip-content-transform-origin]",e),...n})}));Aa.displayName=p5.displayName;const yZ="sidebar_state",bZ=3600*24*7,xZ="16rem",wZ="18rem",SZ="3rem",_Z="b",m5=y.createContext(null);function ev(){const e=y.useContext(m5);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const v5=y.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:a,children:o,...l},u)=>{const f=EV(),[d,m]=y.useState(!1),[p,g]=y.useState(e),x=t??p,A=y.useCallback(E=>{const T=typeof E=="function"?E(x):E;n?n(T):g(T),document.cookie=`${yZ}=${T}; path=/; max-age=${bZ}`},[n,x]),S=y.useCallback(()=>f?m(E=>!E):A(E=>!E),[f,A,m]);y.useEffect(()=>{const E=T=>{T.key===_Z&&(T.metaKey||T.ctrlKey)&&(T.preventDefault(),S())};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[S]);const w=x?"expanded":"collapsed",O=y.useMemo(()=>({state:w,open:x,setOpen:A,isMobile:f,openMobile:d,setOpenMobile:m,toggleSidebar:S}),[w,x,A,f,d,m,S]);return v.jsx(m5.Provider,{value:O,children:v.jsx(dA,{delayDuration:0,children:v.jsx("div",{style:{"--sidebar-width":xZ,"--sidebar-width-icon":SZ,...a},className:ye("group/sidebar-wrapper flex h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:u,...l,children:o})})})});v5.displayName="SidebarProvider";const g5=y.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:a,...o},l)=>{const{isMobile:u,state:f,openMobile:d,setOpenMobile:m}=ev();return n==="none"?v.jsx("div",{className:ye("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:l,...o,children:a}):u?v.jsx(kG,{open:d,onOpenChange:m,...o,children:v.jsxs(ML,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":wZ},side:e,children:[v.jsxs(PL,{className:"sr-only",children:[v.jsx(DL,{children:"Sidebar"}),v.jsx(kL,{children:"Displays the mobile sidebar."})]}),v.jsx("div",{className:"flex h-full w-full flex-col",children:a})]})}):v.jsxs("div",{ref:l,className:"group peer hidden text-sidebar-foreground md:block","data-state":f,"data-collapsible":f==="collapsed"?n:"","data-variant":t,"data-side":e,children:[v.jsx("div",{className:ye("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),v.jsx("div",{className:ye("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...o,children:v.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:a})})]})});g5.displayName="Sidebar";const y5=y.forwardRef(({className:e,onClick:t,...n},r)=>{const{toggleSidebar:a}=ev();return v.jsxs(ct,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:ye("h-7 w-7",e),onClick:o=>{t==null||t(o),a()},...n,children:[v.jsx(dV,{}),v.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});y5.displayName="SidebarTrigger";const AZ=y.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=ev();return v.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:ye("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});AZ.displayName="SidebarRail";const b5=y.forwardRef(({className:e,...t},n)=>v.jsx("main",{ref:n,className:ye("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));b5.displayName="SidebarInset";const OZ=y.forwardRef(({className:e,...t},n)=>v.jsx(cn,{ref:n,"data-sidebar":"input",className:ye("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));OZ.displayName="SidebarInput";const x5=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"header",className:ye("flex flex-col gap-2 p-2",e),...t}));x5.displayName="SidebarHeader";const w5=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"footer",className:ye("flex flex-col gap-2 p-2",e),...t}));w5.displayName="SidebarFooter";const EZ=y.forwardRef(({className:e,...t},n)=>v.jsx(So,{ref:n,"data-sidebar":"separator",className:ye("mx-2 w-auto bg-sidebar-border",e),...t}));EZ.displayName="SidebarSeparator";const S5=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"content",className:ye("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));S5.displayName="SidebarContent";const lp=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"group",className:ye("relative flex w-full min-w-0 flex-col p-2",e),...t}));lp.displayName="SidebarGroup";const W1=y.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const a=t?Ns:"div";return v.jsx(a,{ref:r,"data-sidebar":"group-label",className:ye("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});W1.displayName="SidebarGroupLabel";const jZ=y.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const a=t?Ns:"button";return v.jsx(a,{ref:r,"data-sidebar":"group-action",className:ye("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});jZ.displayName="SidebarGroupAction";const up=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"group-content",className:ye("w-full text-sm",e),...t}));up.displayName="SidebarGroupContent";const cp=y.forwardRef(({className:e,...t},n)=>v.jsx("ul",{ref:n,"data-sidebar":"menu",className:ye("flex w-full min-w-0 flex-col gap-1",e),...t}));cp.displayName="SidebarMenu";const fp=y.forwardRef(({className:e,...t},n)=>v.jsx("li",{ref:n,"data-sidebar":"menu-item",className:ye("group/menu-item relative",e),...t}));fp.displayName="SidebarMenuItem";const TZ=bu("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),dp=y.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:a,className:o,...l},u)=>{const f=e?Ns:"button",{isMobile:d,state:m}=ev(),p=v.jsx(f,{ref:u,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:ye(TZ({variant:n,size:r}),o),...l});return a?(typeof a=="string"&&(a={children:a}),v.jsxs(Fa,{children:[v.jsx(Va,{asChild:!0,children:p}),v.jsx(Aa,{side:"right",align:"center",hidden:m!=="collapsed"||d,...a})]})):p});dp.displayName="SidebarMenuButton";const CZ=y.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},a)=>{const o=t?Ns:"button";return v.jsx(o,{ref:a,"data-sidebar":"menu-action",className:ye("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})});CZ.displayName="SidebarMenuAction";const RZ=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:ye("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));RZ.displayName="SidebarMenuBadge";const NZ=y.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const a=y.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return v.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:ye("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&v.jsx(C2,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),v.jsx(C2,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":a}})]})});NZ.displayName="SidebarMenuSkeleton";const MZ=y.forwardRef(({className:e,...t},n)=>v.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:ye("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));MZ.displayName="SidebarMenuSub";const PZ=y.forwardRef(({...e},t)=>v.jsx("li",{ref:t,...e}));PZ.displayName="SidebarMenuSubItem";const DZ=y.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...a},o)=>{const l=e?Ns:"a";return v.jsx(l,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:ye("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),...a})});DZ.displayName="SidebarMenuSubButton";function hA(e){const t=e+"CollectionProvider",[n,r]=aa(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=S=>{const{scope:w,children:O}=S,E=q.useRef(null),T=q.useRef(new Map).current;return v.jsx(a,{scope:w,itemMap:T,collectionRef:E,children:O})};l.displayName=t;const u=e+"CollectionSlot",f=Hl(u),d=q.forwardRef((S,w)=>{const{scope:O,children:E}=S,T=o(u,O),C=ot(w,T.collectionRef);return v.jsx(f,{ref:C,children:E})});d.displayName=u;const m=e+"CollectionItemSlot",p="data-radix-collection-item",g=Hl(m),x=q.forwardRef((S,w)=>{const{scope:O,children:E,...T}=S,C=q.useRef(null),j=ot(w,C),R=o(m,O);return q.useEffect(()=>(R.itemMap.set(C,{ref:C,...T}),()=>void R.itemMap.delete(C))),v.jsx(g,{[p]:"",ref:j,children:E})});x.displayName=m;function A(S){const w=o(e+"CollectionConsumer",S);return q.useCallback(()=>{const E=w.collectionRef.current;if(!E)return[];const T=Array.from(E.querySelectorAll(`[${p}]`));return Array.from(w.itemMap.values()).sort((R,N)=>T.indexOf(R.ref.current)-T.indexOf(N.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:l,Slot:d,ItemSlot:x},A,r]}var kZ=y.createContext(void 0);function ad(e){const t=y.useContext(kZ);return e||t||"ltr"}var Nb="rovingFocusGroup.onEntryFocus",$Z={bubbles:!1,cancelable:!0},id="RovingFocusGroup",[Z1,_5,zZ]=hA(id),[LZ,tv]=aa(id,[zZ]),[IZ,BZ]=LZ(id),A5=y.forwardRef((e,t)=>v.jsx(Z1.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(Z1.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx(UZ,{...e,ref:t})})}));A5.displayName=id;var UZ=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:f,onEntryFocus:d,preventScrollOnEntryFocus:m=!1,...p}=e,g=y.useRef(null),x=ot(t,g),A=ad(o),[S,w]=_o({prop:l,defaultProp:u??null,onChange:f,caller:id}),[O,E]=y.useState(!1),T=In(d),C=_5(n),j=y.useRef(!1),[R,N]=y.useState(0);return y.useEffect(()=>{const k=g.current;if(k)return k.addEventListener(Nb,T),()=>k.removeEventListener(Nb,T)},[T]),v.jsx(IZ,{scope:n,orientation:r,dir:A,loop:a,currentTabStopId:S,onItemFocus:y.useCallback(k=>w(k),[w]),onItemShiftTab:y.useCallback(()=>E(!0),[]),onFocusableItemAdd:y.useCallback(()=>N(k=>k+1),[]),onFocusableItemRemove:y.useCallback(()=>N(k=>k-1),[]),children:v.jsx(Ye.div,{tabIndex:O||R===0?-1:0,"data-orientation":r,...p,ref:x,style:{outline:"none",...e.style},onMouseDown:De(e.onMouseDown,()=>{j.current=!0}),onFocus:De(e.onFocus,k=>{const $=!j.current;if(k.target===k.currentTarget&&$&&!O){const V=new CustomEvent(Nb,$Z);if(k.currentTarget.dispatchEvent(V),!V.defaultPrevented){const I=C().filter(z=>z.focusable),L=I.find(z=>z.active),H=I.find(z=>z.id===S),Z=[L,H,...I].filter(Boolean).map(z=>z.ref.current);j5(Z,m)}}j.current=!1}),onBlur:De(e.onBlur,()=>E(!1))})})}),O5="RovingFocusGroupItem",E5=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:o,children:l,...u}=e,f=_a(),d=o||f,m=BZ(O5,n),p=m.currentTabStopId===d,g=_5(n),{onFocusableItemAdd:x,onFocusableItemRemove:A,currentTabStopId:S}=m;return y.useEffect(()=>{if(r)return x(),()=>A()},[r,x,A]),v.jsx(Z1.ItemSlot,{scope:n,id:d,focusable:r,active:a,children:v.jsx(Ye.span,{tabIndex:p?0:-1,"data-orientation":m.orientation,...u,ref:t,onMouseDown:De(e.onMouseDown,w=>{r?m.onItemFocus(d):w.preventDefault()}),onFocus:De(e.onFocus,()=>m.onItemFocus(d)),onKeyDown:De(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){m.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const O=FZ(w,m.orientation,m.dir);if(O!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let T=g().filter(C=>C.focusable).map(C=>C.ref.current);if(O==="last")T.reverse();else if(O==="prev"||O==="next"){O==="prev"&&T.reverse();const C=T.indexOf(w.currentTarget);T=m.loop?VZ(T,C+1):T.slice(C+1)}setTimeout(()=>j5(T))}}),children:typeof l=="function"?l({isCurrentTabStop:p,hasTabStop:S!=null}):l})})});E5.displayName=O5;var qZ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function HZ(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function FZ(e,t,n){const r=HZ(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return qZ[r]}function j5(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function VZ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var T5=A5,C5=E5,Y1=["Enter"," "],GZ=["ArrowDown","PageUp","Home"],R5=["ArrowUp","PageDown","End"],WZ=[...GZ,...R5],ZZ={ltr:[...Y1,"ArrowRight"],rtl:[...Y1,"ArrowLeft"]},YZ={ltr:["ArrowLeft"],rtl:["ArrowRight"]},od="Menu",[of,KZ,XZ]=hA(od),[Ms,N5]=aa(od,[XZ,_u,tv]),nv=_u(),M5=tv(),[QZ,Ps]=Ms(od),[JZ,sd]=Ms(od),P5=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:o,modal:l=!0}=e,u=nv(t),[f,d]=y.useState(null),m=y.useRef(!1),p=In(o),g=ad(a);return y.useEffect(()=>{const x=()=>{m.current=!0,document.addEventListener("pointerdown",A,{capture:!0,once:!0}),document.addEventListener("pointermove",A,{capture:!0,once:!0})},A=()=>m.current=!1;return document.addEventListener("keydown",x,{capture:!0}),()=>{document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("pointerdown",A,{capture:!0}),document.removeEventListener("pointermove",A,{capture:!0})}},[]),v.jsx(oA,{...u,children:v.jsx(QZ,{scope:t,open:n,onOpenChange:p,content:f,onContentChange:d,children:v.jsx(JZ,{scope:t,onClose:y.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:m,dir:g,modal:l,children:r})})})};P5.displayName=od;var eY="MenuAnchor",pA=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=nv(n);return v.jsx(sA,{...a,...r,ref:t})});pA.displayName=eY;var mA="MenuPortal",[tY,D5]=Ms(mA,{forceMount:void 0}),k5=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,o=Ps(mA,t);return v.jsx(tY,{scope:t,forceMount:n,children:v.jsx(ar,{present:n||o.open,children:v.jsx(Xf,{asChild:!0,container:a,children:r})})})};k5.displayName=mA;var ea="MenuContent",[nY,vA]=Ms(ea),$5=y.forwardRef((e,t)=>{const n=D5(ea,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=Ps(ea,e.__scopeMenu),l=sd(ea,e.__scopeMenu);return v.jsx(of.Provider,{scope:e.__scopeMenu,children:v.jsx(ar,{present:r||o.open,children:v.jsx(of.Slot,{scope:e.__scopeMenu,children:l.modal?v.jsx(rY,{...a,ref:t}):v.jsx(aY,{...a,ref:t})})})})}),rY=y.forwardRef((e,t)=>{const n=Ps(ea,e.__scopeMenu),r=y.useRef(null),a=ot(t,r);return y.useEffect(()=>{const o=r.current;if(o)return G_(o)},[]),v.jsx(gA,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:De(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),aY=y.forwardRef((e,t)=>{const n=Ps(ea,e.__scopeMenu);return v.jsx(gA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),iY=Hl("MenuContent.ScrollLock"),gA=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:u,onEntryFocus:f,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:x,disableOutsideScroll:A,...S}=e,w=Ps(ea,n),O=sd(ea,n),E=nv(n),T=M5(n),C=KZ(n),[j,R]=y.useState(null),N=y.useRef(null),k=ot(t,N,w.onContentChange),$=y.useRef(0),V=y.useRef(""),I=y.useRef(0),L=y.useRef(null),H=y.useRef("right"),W=y.useRef(0),Z=A?Vm:y.Fragment,z=A?{as:iY,allowPinchZoom:!0}:void 0,F=Q=>{var de,Ce;const K=V.current+Q,P=C().filter(le=>!le.disabled),U=document.activeElement,ne=(de=P.find(le=>le.ref.current===U))==null?void 0:de.textValue,me=P.map(le=>le.textValue),Ae=gY(me,K,ne),ce=(Ce=P.find(le=>le.textValue===Ae))==null?void 0:Ce.ref.current;(function le(_e){V.current=_e,window.clearTimeout($.current),_e!==""&&($.current=window.setTimeout(()=>le(""),1e3))})(K),ce&&setTimeout(()=>ce.focus())};y.useEffect(()=>()=>window.clearTimeout($.current),[]),V_();const Y=y.useCallback(Q=>{var P,U;return H.current===((P=L.current)==null?void 0:P.side)&&bY(Q,(U=L.current)==null?void 0:U.area)},[]);return v.jsx(nY,{scope:n,searchRef:V,onItemEnter:y.useCallback(Q=>{Y(Q)&&Q.preventDefault()},[Y]),onItemLeave:y.useCallback(Q=>{var K;Y(Q)||((K=N.current)==null||K.focus(),R(null))},[Y]),onTriggerLeave:y.useCallback(Q=>{Y(Q)&&Q.preventDefault()},[Y]),pointerGraceTimerRef:I,onPointerGraceIntentChange:y.useCallback(Q=>{L.current=Q},[]),children:v.jsx(Z,{...z,children:v.jsx(Hm,{asChild:!0,trapped:a,onMountAutoFocus:De(o,Q=>{var K;Q.preventDefault(),(K=N.current)==null||K.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:v.jsx(Kf,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:x,children:v.jsx(T5,{asChild:!0,...T,dir:O.dir,orientation:"vertical",loop:r,currentTabStopId:j,onCurrentTabStopIdChange:R,onEntryFocus:De(f,Q=>{O.isUsingKeyboardRef.current||Q.preventDefault()}),preventScrollOnEntryFocus:!0,children:v.jsx(lA,{role:"menu","aria-orientation":"vertical","data-state":Q5(w.open),"data-radix-menu-content":"",dir:O.dir,...E,...S,ref:k,style:{outline:"none",...S.style},onKeyDown:De(S.onKeyDown,Q=>{const P=Q.target.closest("[data-radix-menu-content]")===Q.currentTarget,U=Q.ctrlKey||Q.altKey||Q.metaKey,ne=Q.key.length===1;P&&(Q.key==="Tab"&&Q.preventDefault(),!U&&ne&&F(Q.key));const me=N.current;if(Q.target!==me||!WZ.includes(Q.key))return;Q.preventDefault();const ce=C().filter(de=>!de.disabled).map(de=>de.ref.current);R5.includes(Q.key)&&ce.reverse(),mY(ce)}),onBlur:De(e.onBlur,Q=>{Q.currentTarget.contains(Q.target)||(window.clearTimeout($.current),V.current="")}),onPointerMove:De(e.onPointerMove,sf(Q=>{const K=Q.target,P=W.current!==Q.clientX;if(Q.currentTarget.contains(K)&&P){const U=Q.clientX>W.current?"right":"left";H.current=U,W.current=Q.clientX}}))})})})})})})});$5.displayName=ea;var oY="MenuGroup",yA=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(Ye.div,{role:"group",...r,ref:t})});yA.displayName=oY;var sY="MenuLabel",z5=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(Ye.div,{...r,ref:t})});z5.displayName=sY;var Op="MenuItem",U2="menu.itemSelect",rv=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,o=y.useRef(null),l=sd(Op,e.__scopeMenu),u=vA(Op,e.__scopeMenu),f=ot(t,o),d=y.useRef(!1),m=()=>{const p=o.current;if(!n&&p){const g=new CustomEvent(U2,{bubbles:!0,cancelable:!0});p.addEventListener(U2,x=>r==null?void 0:r(x),{once:!0}),tL(p,g),g.defaultPrevented?d.current=!1:l.onClose()}};return v.jsx(L5,{...a,ref:f,disabled:n,onClick:De(e.onClick,m),onPointerDown:p=>{var g;(g=e.onPointerDown)==null||g.call(e,p),d.current=!0},onPointerUp:De(e.onPointerUp,p=>{var g;d.current||(g=p.currentTarget)==null||g.click()}),onKeyDown:De(e.onKeyDown,p=>{const g=u.searchRef.current!=="";n||g&&p.key===" "||Y1.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});rv.displayName=Op;var L5=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...o}=e,l=vA(Op,n),u=M5(n),f=y.useRef(null),d=ot(t,f),[m,p]=y.useState(!1),[g,x]=y.useState("");return y.useEffect(()=>{const A=f.current;A&&x((A.textContent??"").trim())},[o.children]),v.jsx(of.ItemSlot,{scope:n,disabled:r,textValue:a??g,children:v.jsx(C5,{asChild:!0,...u,focusable:!r,children:v.jsx(Ye.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:d,onPointerMove:De(e.onPointerMove,sf(A=>{r?l.onItemLeave(A):(l.onItemEnter(A),A.defaultPrevented||A.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:De(e.onPointerLeave,sf(A=>l.onItemLeave(A))),onFocus:De(e.onFocus,()=>p(!0)),onBlur:De(e.onBlur,()=>p(!1))})})})}),lY="MenuCheckboxItem",I5=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return v.jsx(F5,{scope:e.__scopeMenu,checked:n,children:v.jsx(rv,{role:"menuitemcheckbox","aria-checked":Ep(n)?"mixed":n,...a,ref:t,"data-state":xA(n),onSelect:De(a.onSelect,()=>r==null?void 0:r(Ep(n)?!0:!n),{checkForDefaultPrevented:!1})})})});I5.displayName=lY;var B5="MenuRadioGroup",[uY,cY]=Ms(B5,{value:void 0,onValueChange:()=>{}}),U5=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,o=In(r);return v.jsx(uY,{scope:e.__scopeMenu,value:n,onValueChange:o,children:v.jsx(yA,{...a,ref:t})})});U5.displayName=B5;var q5="MenuRadioItem",H5=y.forwardRef((e,t)=>{const{value:n,...r}=e,a=cY(q5,e.__scopeMenu),o=n===a.value;return v.jsx(F5,{scope:e.__scopeMenu,checked:o,children:v.jsx(rv,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":xA(o),onSelect:De(r.onSelect,()=>{var l;return(l=a.onValueChange)==null?void 0:l.call(a,n)},{checkForDefaultPrevented:!1})})})});H5.displayName=q5;var bA="MenuItemIndicator",[F5,fY]=Ms(bA,{checked:!1}),V5=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,o=fY(bA,n);return v.jsx(ar,{present:r||Ep(o.checked)||o.checked===!0,children:v.jsx(Ye.span,{...a,ref:t,"data-state":xA(o.checked)})})});V5.displayName=bA;var dY="MenuSeparator",G5=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(Ye.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});G5.displayName=dY;var hY="MenuArrow",W5=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=nv(n);return v.jsx(uA,{...a,...r,ref:t})});W5.displayName=hY;var pY="MenuSub",[C0e,Z5]=Ms(pY),Bc="MenuSubTrigger",Y5=y.forwardRef((e,t)=>{const n=Ps(Bc,e.__scopeMenu),r=sd(Bc,e.__scopeMenu),a=Z5(Bc,e.__scopeMenu),o=vA(Bc,e.__scopeMenu),l=y.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:f}=o,d={__scopeMenu:e.__scopeMenu},m=y.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return y.useEffect(()=>m,[m]),y.useEffect(()=>{const p=u.current;return()=>{window.clearTimeout(p),f(null)}},[u,f]),v.jsx(pA,{asChild:!0,...d,children:v.jsx(L5,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":Q5(n.open),...e,ref:Yf(t,a.onTriggerChange),onClick:p=>{var g;(g=e.onClick)==null||g.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:De(e.onPointerMove,sf(p=>{o.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(o.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:De(e.onPointerLeave,sf(p=>{var x,A;m();const g=(x=n.content)==null?void 0:x.getBoundingClientRect();if(g){const S=(A=n.content)==null?void 0:A.dataset.side,w=S==="right",O=w?-5:5,E=g[w?"left":"right"],T=g[w?"right":"left"];o.onPointerGraceIntentChange({area:[{x:p.clientX+O,y:p.clientY},{x:E,y:g.top},{x:T,y:g.top},{x:T,y:g.bottom},{x:E,y:g.bottom}],side:S}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(p),p.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:De(e.onKeyDown,p=>{var x;const g=o.searchRef.current!=="";e.disabled||g&&p.key===" "||ZZ[r.dir].includes(p.key)&&(n.onOpenChange(!0),(x=n.content)==null||x.focus(),p.preventDefault())})})})});Y5.displayName=Bc;var K5="MenuSubContent",X5=y.forwardRef((e,t)=>{const n=D5(ea,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=Ps(ea,e.__scopeMenu),l=sd(ea,e.__scopeMenu),u=Z5(K5,e.__scopeMenu),f=y.useRef(null),d=ot(t,f);return v.jsx(of.Provider,{scope:e.__scopeMenu,children:v.jsx(ar,{present:r||o.open,children:v.jsx(of.Slot,{scope:e.__scopeMenu,children:v.jsx(gA,{id:u.contentId,"aria-labelledby":u.triggerId,...a,ref:d,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{var p;l.isUsingKeyboardRef.current&&((p=f.current)==null||p.focus()),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:De(e.onFocusOutside,m=>{m.target!==u.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:De(e.onEscapeKeyDown,m=>{l.onClose(),m.preventDefault()}),onKeyDown:De(e.onKeyDown,m=>{var x;const p=m.currentTarget.contains(m.target),g=YZ[l.dir].includes(m.key);p&&g&&(o.onOpenChange(!1),(x=u.trigger)==null||x.focus(),m.preventDefault())})})})})})});X5.displayName=K5;function Q5(e){return e?"open":"closed"}function Ep(e){return e==="indeterminate"}function xA(e){return Ep(e)?"indeterminate":e?"checked":"unchecked"}function mY(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function vY(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function gY(e,t,n){const a=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=vY(e,Math.max(o,0));a.length===1&&(l=l.filter(d=>d!==n));const f=l.find(d=>d.toLowerCase().startsWith(a.toLowerCase()));return f!==n?f:void 0}function yY(e,t){const{x:n,y:r}=e;let a=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const u=t[o],f=t[l],d=u.x,m=u.y,p=f.x,g=f.y;m>r!=g>r&&n<(p-d)*(r-m)/(g-m)+d&&(a=!a)}return a}function bY(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return yY(n,t)}function sf(e){return t=>t.pointerType==="mouse"?e(t):void 0}var xY=P5,wY=pA,SY=k5,_Y=$5,AY=yA,OY=z5,EY=rv,jY=I5,TY=U5,CY=H5,RY=V5,NY=G5,MY=W5,PY=Y5,DY=X5,av="DropdownMenu",[kY]=aa(av,[N5]),ir=N5(),[$Y,J5]=kY(av),eI=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:o,onOpenChange:l,modal:u=!0}=e,f=ir(t),d=y.useRef(null),[m,p]=_o({prop:a,defaultProp:o??!1,onChange:l,caller:av});return v.jsx($Y,{scope:t,triggerId:_a(),triggerRef:d,contentId:_a(),open:m,onOpenChange:p,onOpenToggle:y.useCallback(()=>p(g=>!g),[p]),modal:u,children:v.jsx(xY,{...f,open:m,onOpenChange:p,dir:r,modal:u,children:n})})};eI.displayName=av;var tI="DropdownMenuTrigger",nI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,o=J5(tI,n),l=ir(n);return v.jsx(wY,{asChild:!0,...l,children:v.jsx(Ye.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:Yf(t,o.triggerRef),onPointerDown:De(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(o.onOpenToggle(),o.open||u.preventDefault())}),onKeyDown:De(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&o.onOpenToggle(),u.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});nI.displayName=tI;var zY="DropdownMenuPortal",rI=e=>{const{__scopeDropdownMenu:t,...n}=e,r=ir(t);return v.jsx(SY,{...r,...n})};rI.displayName=zY;var aI="DropdownMenuContent",iI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=J5(aI,n),o=ir(n),l=y.useRef(!1);return v.jsx(_Y,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...r,ref:t,onCloseAutoFocus:De(e.onCloseAutoFocus,u=>{var f;l.current||(f=a.triggerRef.current)==null||f.focus(),l.current=!1,u.preventDefault()}),onInteractOutside:De(e.onInteractOutside,u=>{const f=u.detail.originalEvent,d=f.button===0&&f.ctrlKey===!0,m=f.button===2||d;(!a.modal||m)&&(l.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)"}})});iI.displayName=aI;var LY="DropdownMenuGroup",IY=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ir(n);return v.jsx(AY,{...a,...r,ref:t})});IY.displayName=LY;var BY="DropdownMenuLabel",oI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ir(n);return v.jsx(OY,{...a,...r,ref:t})});oI.displayName=BY;var UY="DropdownMenuItem",sI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ir(n);return v.jsx(EY,{...a,...r,ref:t})});sI.displayName=UY;var qY="DropdownMenuCheckboxItem",lI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ir(n);return v.jsx(jY,{...a,...r,ref:t})});lI.displayName=qY;var HY="DropdownMenuRadioGroup",FY=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ir(n);return v.jsx(TY,{...a,...r,ref:t})});FY.displayName=HY;var VY="DropdownMenuRadioItem",uI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ir(n);return v.jsx(CY,{...a,...r,ref:t})});uI.displayName=VY;var GY="DropdownMenuItemIndicator",cI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ir(n);return v.jsx(RY,{...a,...r,ref:t})});cI.displayName=GY;var WY="DropdownMenuSeparator",fI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ir(n);return v.jsx(NY,{...a,...r,ref:t})});fI.displayName=WY;var ZY="DropdownMenuArrow",YY=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ir(n);return v.jsx(MY,{...a,...r,ref:t})});YY.displayName=ZY;var KY="DropdownMenuSubTrigger",dI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ir(n);return v.jsx(PY,{...a,...r,ref:t})});dI.displayName=KY;var XY="DropdownMenuSubContent",hI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ir(n);return v.jsx(DY,{...a,...r,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)"}})});hI.displayName=XY;var QY=eI,JY=nI,eK=rI,pI=iI,mI=oI,vI=sI,gI=lI,yI=uI,bI=cI,xI=fI,wI=dI,SI=hI;const tK=QY,nK=JY,rK=y.forwardRef(({className:e,inset:t,children:n,...r},a)=>v.jsxs(wI,{ref:a,className:ye("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,v.jsx(q_,{className:"ml-auto"})]}));rK.displayName=wI.displayName;const aK=y.forwardRef(({className:e,...t},n)=>v.jsx(SI,{ref:n,className:ye("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));aK.displayName=SI.displayName;const _I=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>v.jsx(eK,{children:v.jsx(pI,{ref:r,sideOffset:t,className:ye("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));_I.displayName=pI.displayName;const K1=y.forwardRef(({className:e,inset:t,...n},r)=>v.jsx(vI,{ref:r,className:ye("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n}));K1.displayName=vI.displayName;const iK=y.forwardRef(({className:e,children:t,checked:n,...r},a)=>v.jsxs(gI,{ref:a,className:ye("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[v.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:v.jsx(bI,{children:v.jsx(Lz,{className:"h-4 w-4"})})}),t]}));iK.displayName=gI.displayName;const oK=y.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(yI,{ref:r,className:ye("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[v.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:v.jsx(bI,{children:v.jsx(JF,{className:"h-2 w-2 fill-current"})})}),t]}));oK.displayName=yI.displayName;const sK=y.forwardRef(({className:e,inset:t,...n},r)=>v.jsx(mI,{ref:r,className:ye("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));sK.displayName=mI.displayName;const AI=y.forwardRef(({className:e,...t},n)=>v.jsx(xI,{ref:n,className:ye("-mx-1 my-1 h-px bg-muted",e),...t}));AI.displayName=xI.displayName;const X1="";async function Bh(e,t,n,r){const a=await fetch(`${X1}${t}`,{method:e,credentials:"include",headers:{"Content-Type":"application/json",...r},body:n!=null?JSON.stringify(n):void 0});if(a.status===204)return{data:null,status:204};const o=await a.json().catch(()=>null);return a.ok?{data:o,status:a.status}:{data:null,status:a.status,error:(o==null?void 0:o.error)??"Request failed"}}const OI={get:e=>Bh("GET",e),post:(e,t)=>Bh("POST",e,t),patch:(e,t)=>Bh("PATCH",e,t),delete:e=>Bh("DELETE",e),upload:async(e,t)=>{const n=await fetch(`${X1}${e}`,{method:"POST",credentials:"include",body:t});if(n.status===204)return{data:null,status:204};const r=await n.json().catch(()=>null);return n.ok?{data:r,status:n.status}:{data:null,status:n.status,error:(r==null?void 0:r.error)??"Upload failed"}},uploadPatch:async(e,t)=>{const n=await fetch(`${X1}${e}`,{method:"PATCH",credentials:"include",body:t});if(n.status===204)return{data:null,status:204};const r=await n.json().catch(()=>null);return n.ok?{data:r,status:n.status}:{data:null,status:n.status,error:(r==null?void 0:r.error)??"Upload failed"}}};function wA(){const[e,t]=y.useState({user:null,loading:!0}),n=Ya();return y.useEffect(()=>{let r=!1;return OI.get("/api/v1/auth/me").then(({data:a,status:o})=>{r||(o===401||!a?(t({user:null,loading:!1}),n("/login",{replace:!0})):t({user:a,loading:!1}))}),()=>{r=!0}},[n]),e}const lK=6;function uK(e){let t=0;for(const n of e)t=t*31+n.charCodeAt(0)&4294967295;return Math.abs(t)}function SA(e){const t=uK(e)%lK+1;return{bg:`hsl(var(--avatar-${t}-bg))`,fg:`hsl(var(--avatar-${t}-fg))`}}function EI({name:e,avatarUrl:t,size:n=28}){const r=((e==null?void 0:e[0])??"?").toUpperCase(),a={width:n,height:n,borderRadius:"50%",flexShrink:0};if(t)return v.jsx("img",{src:t,alt:e,style:{...a,objectFit:"cover"}});const{bg:o,fg:l}=SA(e);return v.jsx("span",{style:{...a,background:o,display:"inline-flex",alignItems:"center",justifyContent:"center",color:l,fontSize:n*.42,fontWeight:600,userSelect:"none"},children:r})}const cK=[{label:"App Center",href:"/app-center",icon:Bz},{label:"Mac Resources",href:"/mac-resources",icon:Uz}],fK=[{label:"Default",href:"/settings/default",icon:Hz,adminOnly:!1},{label:"Team",href:"/settings/team",icon:SV,adminOnly:!0},{label:"Tokens",href:"/settings/tokens",icon:aV,adminOnly:!0}],dK=[{label:"Docs",href:"https://www.tapflow.dev",icon:KF}];function hK(){const{pathname:e}=Dr(),t=Ya(),{user:n}=wA(),r=(n==null?void 0:n.role)==="Admin",{resolvedTheme:a}=zm(),o=a==="dark"?"/logo-dark.svg":"/logo.svg",[l,u]=y.useState(null),[f,d]=y.useState("tapflow");y.useEffect(()=>{fetch("/api/v1/settings",{credentials:"include"}).then(p=>p.ok?p.json():null).then(p=>{p!=null&&p.logo_url&&u(p.logo_url),p!=null&&p.team_name&&d(p.team_name)})},[]);async function m(){await fetch("/api/v1/auth/logout",{method:"POST",credentials:"include"}),t("/login",{replace:!0})}return v.jsxs(g5,{collapsible:"icon",children:[v.jsx(x5,{className:"p-2",children:v.jsxs("div",{className:"flex items-center gap-2 p-1",children:[v.jsx("img",{src:l??o,alt:"tapflow",className:"w-6 h-6 min-w-6 shrink-0"}),v.jsx("span",{className:"text-base font-semibold tracking-tight truncate text-sidebar-accent-foreground group-data-[collapsible=icon]:hidden",children:f})]})}),v.jsxs(S5,{children:[v.jsx(lp,{children:v.jsx(up,{children:v.jsx(cp,{children:cK.map(p=>v.jsx(fp,{children:v.jsx(dp,{asChild:!0,isActive:e.startsWith(p.href),tooltip:p.label,children:v.jsxs(Zc,{to:p.href,children:[v.jsx(p.icon,{}),v.jsx("span",{children:p.label})]})})},p.href))})})}),v.jsxs(lp,{children:[v.jsx(W1,{children:"Settings"}),v.jsx(up,{children:v.jsx(cp,{children:fK.filter(p=>!p.adminOnly||r).map(p=>v.jsx(fp,{children:v.jsx(dp,{asChild:!0,isActive:e===p.href,tooltip:p.label,children:v.jsxs(Zc,{to:p.href,children:[v.jsx(p.icon,{}),v.jsx("span",{children:p.label})]})})},p.href))})})]}),v.jsxs(lp,{children:[v.jsx(W1,{children:"Reference"}),v.jsx(up,{children:v.jsx(cp,{children:dK.map(p=>v.jsx(fp,{children:v.jsx(dp,{asChild:!0,tooltip:p.label,children:v.jsxs("a",{href:p.href,target:"_blank",rel:"noopener noreferrer",children:[v.jsx(p.icon,{}),v.jsx("span",{children:p.label})]})})},p.href))})})]})]}),n&&v.jsx(w5,{className:"px-3 py-3",children:v.jsxs(tK,{children:[v.jsx(nK,{asChild:!0,children:v.jsxs("button",{className:"flex w-full items-center gap-2.5 rounded-md px-1 py-1 text-left hover:bg-sidebar-accent transition-colors group-data-[collapsible=icon]:justify-center",children:[v.jsx(EI,{name:n.displayName??"",avatarUrl:n.avatarUrl,size:28}),v.jsxs("div",{className:"flex flex-col min-w-0 flex-1 group-data-[collapsible=icon]:hidden",children:[v.jsx("span",{className:"text-sm font-medium truncate",children:n.displayName}),v.jsx("span",{className:"text-xs text-muted-foreground truncate",children:n.email})]})]})}),v.jsxs(_I,{side:"top",align:"start",className:"w-56",children:[v.jsx(K1,{asChild:!0,children:v.jsxs(Zc,{to:"/settings/default",children:[v.jsx(Hz,{className:"mr-2 h-4 w-4"}),"Settings"]})}),v.jsx(AI,{}),v.jsxs(K1,{onClick:m,className:"text-destructive focus:text-destructive",children:[v.jsx(lV,{className:"mr-2 h-4 w-4"}),"Log out"]})]})]})})]})}function pK(){const{theme:e,setTheme:t}=zm();return v.jsxs(ct,{variant:"ghost",size:"icon",onClick:()=>t(e==="dark"?"light":"dark"),"aria-label":"Toggle theme",children:[v.jsx(yV,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),v.jsx(cV,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"})]})}const jI=y.createContext({node:null,setNode:()=>{}});function mK({children:e}){const[t,n]=y.useState(null),r=y.useMemo(()=>({node:t,setNode:n}),[t]);return v.jsx(jI.Provider,{value:r,children:e})}function _A(){return y.useContext(jI)}function vK(){const{node:e}=_A();return v.jsxs("header",{className:"flex h-16 items-center gap-2 border-b px-4",children:[v.jsx(y5,{className:"-ml-1"}),v.jsx(So,{orientation:"vertical",className:"h-4"}),e,v.jsx("div",{className:"flex-1"}),v.jsx(pK,{}),v.jsx(So,{orientation:"vertical",className:"h-4"}),v.jsx("a",{href:"https://github.com/jo-duchan/tapflow",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center w-8 h-8 rounded-md hover:bg-accent transition-colors","aria-label":"GitHub",children:v.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4 fill-current","aria-hidden":"true",children:v.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})})})]})}function gK(){const{user:e,loading:t}=wA(),n=Dr();return t?null:e?["/settings/team","/settings/tokens"].some(a=>n.pathname.startsWith(a))&&e.role!=="Admin"?v.jsx("div",{className:"flex h-screen items-center justify-center",children:v.jsxs("div",{className:"text-center space-y-2",children:[v.jsx("p",{className:"text-lg font-semibold",children:"Access Denied"}),v.jsx("p",{className:"text-sm text-muted-foreground",children:"This page is only accessible to Admins."})]})}):v.jsx(mK,{children:v.jsxs(v5,{children:[v.jsx(hK,{}),v.jsxs(b5,{children:[v.jsx(vK,{}),v.jsx("main",{className:"flex-1 min-h-0 overflow-auto",children:v.jsx(eF,{})})]})]})}):v.jsx(k1,{to:"/login",replace:!0})}var ld=e=>e.type==="checkbox",us=e=>e instanceof Date,nr=e=>e==null;const TI=e=>typeof e=="object";var on=e=>!nr(e)&&!Array.isArray(e)&&TI(e)&&!us(e),CI=e=>on(e)&&e.target?ld(e.target)?e.target.checked:e.target.value:e,RI=(e,t)=>t.split(".").some((n,r,a)=>!isNaN(Number(n))&&e.has(a.slice(0,r).join("."))),yK=e=>{const t=e.constructor&&e.constructor.prototype;return on(t)&&t.hasOwnProperty("isPrototypeOf")},AA=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function un(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(AA&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(on(e)&&yK(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=un(e[a]));return r}var iv=e=>/^\w*$/.test(e),Wt=e=>e===void 0,OA=e=>Array.isArray(e)?e.filter(Boolean):[],EA=e=>OA(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ne=(e,t,n)=>{if(!t||!on(e))return n;const a=(iv(t)?[t]:EA(t)).reduce((o,l)=>nr(o)?void 0:o[l],e);return Wt(a)||a===e?Wt(e[t])?n:e[t]:a},jr=e=>typeof e=="boolean",Zn=e=>typeof e=="function",Tt=(e,t,n)=>{let r=-1;const a=iv(t)?[t]:EA(t),o=a.length,l=o-1;for(;++r<o;){const u=a[r];let f=n;if(r!==l){const d=e[u];f=on(d)||Array.isArray(d)?d:isNaN(+a[r+1])?{}:[]}if(u==="__proto__"||u==="constructor"||u==="prototype")return;e[u]=f,e=e[u]}};const ho={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},ya={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ma={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Mb="form",NI="root",MI=q.createContext(null);MI.displayName="HookFormControlContext";const jA=()=>q.useContext(MI);var PI=(e,t,n,r=!0)=>{const a={};for(const o in e)Object.defineProperty(a,o,{get:()=>{const l=o;return t._proxyFormState[l]!==ya.all&&(t._proxyFormState[l]=!r||ya.all),n&&(n[l]=!0),e[l]}});return a};const TA=typeof window<"u"?q.useLayoutEffect:q.useEffect;function bK(e){const t=jA(),{control:n=t,disabled:r,name:a,exact:o}=e||{},[l,u]=q.useState(()=>({...n._formState,defaultValues:n._defaultValues})),f=q.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return TA(()=>n._subscribe({name:a,formState:f.current,exact:o,callback:d=>{!r&&u({...n._formState,...d,defaultValues:n._defaultValues})}}),[a,r,o]),q.useEffect(()=>{f.current.isValid&&n._setValid(!0)},[n]),q.useMemo(()=>PI(l,n,f.current,!1),[l,n])}var Xn=e=>typeof e=="string",Q1=(e,t,n,r,a)=>Xn(e)?(r&&t.watch.add(e),Ne(n,e,a)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),Ne(n,o))):(r&&(t.watchAll=!0),n),J1=e=>nr(e)||!TI(e);function Tr(e,t,n=new WeakSet){if(e===t)return!0;if(J1(e)||J1(t))return Object.is(e,t);if(us(e)&&us(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const o of r){const l=e[o];if(!(o in t))return!1;if(o!=="ref"){const u=t[o];if(us(l)&&us(u)||(on(l)||Array.isArray(l))&&(on(u)||Array.isArray(u))?!Tr(l,u,n):!Object.is(l,u))return!1}}return!0}function CA(e){const t=jA(),{control:n=t,name:r,defaultValue:a,disabled:o,exact:l,compute:u}=e||{},f=q.useRef(a),d=q.useRef(u),m=q.useRef(void 0),p=q.useRef(n),g=q.useRef(r);d.current=u;const[x,A]=q.useState(()=>{const C=n._getWatch(r,f.current);return d.current?d.current(C):C}),S=q.useCallback(C=>{const j=Q1(r,n._names,C||n._formValues,!1,f.current);return d.current?d.current(j):j},[n._formValues,n._names,r]),w=q.useCallback(C=>{if(!o){const j=Q1(r,n._names,C||n._formValues,!1,f.current);if(d.current){const R=d.current(j);Tr(R,m.current)||(A(R),m.current=R)}else A(j)}},[n._formValues,n._names,o,r]);TA(()=>((p.current!==n||!Tr(g.current,r))&&(p.current=n,g.current=r,w()),n._subscribe({name:r,formState:{values:!0},exact:l,callback:C=>{w(C.values)}})),[n,l,r,w]),q.useEffect(()=>n._removeUnmounted());const O=p.current!==n,E=g.current,T=q.useMemo(()=>{if(o)return null;const C=!O&&!Tr(E,r);return O||C?S():null},[o,O,r,E,S]);return T!==null?T:x}function xK(e){const t=jA(),{name:n,disabled:r,control:a=t,shouldUnregister:o,defaultValue:l,exact:u=!0}=e,f=RI(a._names.array,n),d=q.useMemo(()=>Ne(a._formValues,n,Ne(a._defaultValues,n,l)),[a,n,l]),m=CA({control:a,name:n,defaultValue:d,exact:u}),p=bK({control:a,name:n,exact:u}),g=q.useRef(e),x=q.useRef(a.register(n,{...e.rules,value:m,...jr(e.disabled)?{disabled:e.disabled}:{}}));g.current=e;const A=q.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ne(p.errors,n)},isDirty:{enumerable:!0,get:()=>!!Ne(p.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Ne(p.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Ne(p.validatingFields,n)},error:{enumerable:!0,get:()=>Ne(p.errors,n)}}),[p,n]),S=q.useCallback(T=>x.current.onChange({target:{value:CI(T),name:n},type:ho.CHANGE}),[n]),w=q.useCallback(()=>x.current.onBlur({target:{value:Ne(a._formValues,n),name:n},type:ho.BLUR}),[n,a._formValues]),O=q.useCallback(T=>{const C=Ne(a._fields,n);C&&C._f&&T&&(C._f.ref={focus:()=>Zn(T.focus)&&T.focus(),select:()=>Zn(T.select)&&T.select(),setCustomValidity:j=>Zn(T.setCustomValidity)&&T.setCustomValidity(j),reportValidity:()=>Zn(T.reportValidity)&&T.reportValidity()})},[a._fields,n]),E=q.useMemo(()=>({name:n,value:m,...jr(r)||p.disabled?{disabled:p.disabled||r}:{},onChange:S,onBlur:w,ref:O}),[n,r,p.disabled,S,w,O,m]);return q.useEffect(()=>{const T=a._options.shouldUnregister||o;a.register(n,{...g.current.rules,...jr(g.current.disabled)?{disabled:g.current.disabled}:{}});const C=(j,R)=>{const N=Ne(a._fields,j);N&&N._f&&(N._f.mount=R)};if(C(n,!0),T){const j=un(Ne(a._options.defaultValues,n,g.current.defaultValue));Tt(a._defaultValues,n,j),Wt(Ne(a._formValues,n))&&Tt(a._formValues,n,j)}return!f&&a.register(n),()=>{(f?T&&!a._state.action:T)?a.unregister(n):C(n,!1)}},[n,a,f,o]),q.useEffect(()=>{a._setDisabledField({disabled:r,name:n})},[r,n,a]),q.useMemo(()=>({field:E,formState:p,fieldState:A}),[E,p,A])}const jp=e=>e.render(xK(e)),wK=q.createContext(null);wK.displayName="HookFormContext";var RA=(e,t,n,r,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:a||!0}}:{},Yc=e=>Array.isArray(e)?e:[e],q2=()=>{let e=[];return{get observers(){return e},next:a=>{for(const o of e)o.next&&o.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(o=>o!==a)}}),unsubscribe:()=>{e=[]}}};function DI(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const a=e[r],o=t[r];if(a&&on(a)&&o){const l=DI(a,o);on(l)&&(n[r]=l)}else e[r]&&(n[r]=o)}return n}var Gn=e=>on(e)&&!Object.keys(e).length,NA=e=>e.type==="file",Tp=e=>{if(!AA)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},kI=e=>e.type==="select-multiple",MA=e=>e.type==="radio",SK=e=>MA(e)||ld(e),Pb=e=>Tp(e)&&e.isConnected;function _K(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;){if(nr(e)){e=void 0;break}e=e[t[r]],r++}return e}function AK(e){for(const t in e)if(e.hasOwnProperty(t)&&!Wt(e[t]))return!1;return!0}function gn(e,t){if(Xn(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const n=Array.isArray(t)?t:iv(t)?[t]:EA(t),r=n.length===1?e:_K(e,n),a=n.length-1,o=n[a];return r&&delete r[o],a!==0&&(on(r)&&Gn(r)||Array.isArray(r)&&AK(r))&&gn(e,n.slice(0,-1)),e}var OK=e=>{for(const t in e)if(Zn(e[t]))return!0;return!1};function $I(e){return Array.isArray(e)||on(e)&&!OK(e)}function eS(e,t={}){for(const n in e){const r=e[n];$I(r)?(t[n]=Array.isArray(r)?[]:{},eS(r,t[n])):Wt(r)||(t[n]=!0)}return t}function tS(e){if(e!==!1){if(e===!0)return!0;if(Array.isArray(e)){const t=e.map(n=>tS(n));return t.some(n=>n!==void 0)?t:void 0}if(on(e)){const t={};for(const n in e){const r=tS(e[n]);Wt(r)||(t[n]=r)}return Object.keys(t).length?t:void 0}}}function Uc(e,t,n){n||(n=eS(t));for(const r in e){const a=e[r];if($I(a))Wt(t)||J1(n[r])?n[r]=eS(a,Array.isArray(a)?[]:{}):Uc(a,nr(t)?{}:t[r],n[r]);else{const o=t[r];n[r]=!Tr(a,o)}}return tS(n)||{}}const H2={value:!1,isValid:!1},F2={value:!0,isValid:!0};var zI=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Wt(e[0].attributes.value)?Wt(e[0].value)||e[0].value===""?F2:{value:e[0].value,isValid:!0}:F2:H2}return H2},LI=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Wt(e)?e:t?e===""?NaN:e&&+e:n&&Xn(e)?new Date(e):r?r(e):e;const V2={isValid:!1,value:null};var II=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,V2):V2;function G2(e){const t=e.ref;return NA(t)?t.files:MA(t)?II(e.refs).value:kI(t)?[...t.selectedOptions].map(({value:n})=>n):ld(t)?zI(e.refs).value:LI(Wt(t.value)?e.ref.value:t.value,e)}var EK=(e,t,n,r)=>{const a={};for(const o of e){const l=Ne(t,o);l&&Tt(a,o,l._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:r}},Cp=e=>e instanceof RegExp,Rc=e=>Wt(e)?e:Cp(e)?e.source:on(e)?Cp(e.value)?e.value.source:e.value:e,W2=e=>({isOnSubmit:!e||e===ya.onSubmit,isOnBlur:e===ya.onBlur,isOnChange:e===ya.onChange,isOnAll:e===ya.all,isOnTouch:e===ya.onTouched});const Z2="AsyncFunction";var jK=e=>!!e&&!!e.validate&&!!(Zn(e.validate)&&e.validate.constructor.name===Z2||on(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Z2)),TK=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Y2=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Kc=(e,t,n,r)=>{for(const a of n||Object.keys(e)){const o=Ne(e,a);if(o){const{_f:l,...u}=o;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],a)&&!r)return!0;if(l.ref&&t(l.ref,l.name)&&!r)return!0;if(Kc(u,t))break}else if(on(u)&&Kc(u,t))break}}};function K2(e,t,n){const r=Ne(e,n);if(r||iv(n))return{error:r,name:n};const a=n.split(".");for(;a.length;){const o=a.join("."),l=Ne(t,o),u=Ne(e,o);if(l&&!Array.isArray(l)&&n!==o)return{name:n};if(u&&u.type)return{name:o,error:u};if(u&&u.root&&u.root.type)return{name:`${o}.root`,error:u.root};a.pop()}return{name:n}}var CK=(e,t,n,r)=>{n(e);const{name:a,...o}=e;return Gn(o)||r&&Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(l=>t[l]===(!r||ya.all))},RK=(e,t,n)=>!e||!t||e===t||Yc(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),NK=(e,t,n,r,a)=>a.isOnAll?!1:!n&&a.isOnTouch?!(t||e):(n?r.isOnBlur:a.isOnBlur)?!e:(n?r.isOnChange:a.isOnChange)?e:!0,MK=(e,t)=>!OA(Ne(e,t)).length&&gn(e,t),PK=(e,t,n)=>{const r=Yc(Ne(e,n));return Tt(r,NI,t[n]),Tt(e,n,r),e};function X2(e,t,n="validate"){if(Xn(e)||Array.isArray(e)&&e.every(Xn)||jr(e)&&!e)return{type:n,message:Xn(e)?e:"",ref:t}}var Ol=e=>on(e)&&!Cp(e)?e:{value:e,message:""},Q2=async(e,t,n,r,a,o)=>{const{ref:l,refs:u,required:f,maxLength:d,minLength:m,min:p,max:g,pattern:x,validate:A,name:S,valueAsNumber:w,mount:O}=e._f,E=Ne(n,S);if(!O||t.has(S))return{};const T=u?u[0]:l,C=L=>{a&&T.reportValidity&&(T.setCustomValidity(jr(L)?"":L||""),T.reportValidity())},j={},R=MA(l),N=ld(l),k=R||N,$=(w||NA(l))&&Wt(l.value)&&Wt(E)||Tp(l)&&l.value===""||E===""||Array.isArray(E)&&!E.length||w&&typeof E=="number"&&isNaN(E),V=RA.bind(null,S,r,j),I=(L,H,W,Z=ma.maxLength,z=ma.minLength)=>{const F=L?H:W;j[S]={type:L?Z:z,message:F,ref:l,...V(L?Z:z,F)}};if(o?!Array.isArray(E)||!E.length:f&&(!k&&($||nr(E))||jr(E)&&!E||N&&!zI(u).isValid||R&&!II(u).isValid)){const{value:L,message:H}=Xn(f)?{value:!!f,message:f}:Ol(f);if(L&&(j[S]={type:ma.required,message:H,ref:T,...V(ma.required,H)},!r))return C(H),j}if(!$&&(!nr(p)||!nr(g))){let L,H;const W=Ol(g),Z=Ol(p);if(!nr(E)&&!isNaN(E)){const z=l.valueAsNumber||E&&+E;nr(W.value)||(L=z>W.value),nr(Z.value)||(H=z<Z.value)}else{const z=l.valueAsDate||new Date(E),F=K=>new Date(new Date().toDateString()+" "+K),Y=l.type=="time",Q=l.type=="week";Xn(W.value)&&E&&(L=Y?F(E)>F(W.value):Q?E>W.value:z>new Date(W.value)),Xn(Z.value)&&E&&(H=Y?F(E)<F(Z.value):Q?E<Z.value:z<new Date(Z.value))}if((L||H)&&(I(!!L,W.message,Z.message,ma.max,ma.min),!r))return C(j[S].message),j}if((d||m)&&!$&&(Xn(E)||o&&Array.isArray(E))){const L=Ol(d),H=Ol(m),W=!nr(L.value)&&E.length>+L.value,Z=!nr(H.value)&&E.length<+H.value;if((W||Z)&&(I(W,L.message,H.message),!r))return C(j[S].message),j}if(x&&!$&&Xn(E)){const{value:L,message:H}=Ol(x);if(Cp(L)&&!E.match(L)&&(j[S]={type:ma.pattern,message:H,ref:l,...V(ma.pattern,H)},!r))return C(H),j}if(A){if(Zn(A)){const L=await A(E,n),H=X2(L,T);if(H&&(j[S]={...H,...V(ma.validate,H.message)},!r))return C(H.message),j}else if(on(A)){let L={};for(const H in A){if(!Gn(L)&&!r)break;const W=X2(await A[H](E,n),T,H);W&&(L={...W,...V(H,W.message)},C(W.message),r&&(j[S]=L))}if(!Gn(L)&&(j[S]={ref:T,...L},!r))return j}}return C(!0),j};const DK={mode:ya.onSubmit,reValidateMode:ya.onChange,shouldFocusError:!0},BI={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function kK(e={}){let t={...DK,...e},n={...un(BI),isLoading:Zn(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},r={},a=on(t.defaultValues)||on(t.values)?un(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:un(a),l={action:!1,mount:!1,watch:!1,keepIsValid:!1},u={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},f,d=0;const m={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={...m};let g={...p};const x={array:q2(),state:q2()},A=t.criteriaMode===ya.all,S=B=>J=>{clearTimeout(d),d=setTimeout(B,J)},w=async B=>{if(!l.keepIsValid&&!t.disabled&&(p.isValid||g.isValid||B)){let J;t.resolver?(J=Gn((await $()).errors),O()):J=await L({fields:r,onlyCheckValid:!0,eventType:ho.VALID}),J!==n.isValid&&x.state.next({isValid:J})}},O=(B,J)=>{!t.disabled&&(p.isValidating||p.validatingFields||g.isValidating||g.validatingFields)&&((B||Array.from(u.mount)).forEach(ae=>{ae&&(J?Tt(n.validatingFields,ae,J):gn(n.validatingFields,ae))}),x.state.next({validatingFields:n.validatingFields,isValidating:!Gn(n.validatingFields)}))},E=()=>{n.dirtyFields=Uc(a,o)},T=(B,J=[],ae,Te,Ee=!0,Oe=!0)=>{if(Te&&ae&&!t.disabled){if(l.action=!0,Oe&&Array.isArray(Ne(r,B))){const Me=ae(Ne(r,B),Te.argA,Te.argB);Ee&&Tt(r,B,Me)}if(Oe&&Array.isArray(Ne(n.errors,B))){const Me=ae(Ne(n.errors,B),Te.argA,Te.argB);Ee&&Tt(n.errors,B,Me),MK(n.errors,B)}if((p.touchedFields||g.touchedFields)&&Oe&&Array.isArray(Ne(n.touchedFields,B))){const Me=ae(Ne(n.touchedFields,B),Te.argA,Te.argB);Ee&&Tt(n.touchedFields,B,Me)}(p.dirtyFields||g.dirtyFields)&&E(),x.state.next({name:B,isDirty:W(B,J),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Tt(o,B,J)},C=(B,J)=>{Tt(n.errors,B,J),x.state.next({errors:n.errors})},j=B=>{n.errors=B,x.state.next({errors:n.errors,isValid:!1})},R=(B,J,ae,Te)=>{const Ee=Ne(r,B);if(Ee){const Oe=Wt(Ne(o,B)),Me=Ne(o,B,Wt(ae)?Ne(a,B):ae);Wt(Me)||Te&&Te.defaultChecked||J?Tt(o,B,J?Me:G2(Ee._f)):F(B,Me),l.mount&&!l.action&&(w(),Oe&&n.isDirty&&(p.isDirty||g.isDirty)&&(W()||(n.isDirty=!1,x.state.next({...n}))))}},N=(B,J,ae,Te,Ee)=>{let Oe=!1,Me=!1;const qe={name:B};if(!t.disabled){if(!ae||Te){(p.isDirty||g.isDirty)&&(Me=n.isDirty,n.isDirty=qe.isDirty=W(),Oe=Me!==qe.isDirty);const et=Tr(Ne(a,B),J);Me=!!Ne(n.dirtyFields,B),et?gn(n.dirtyFields,B):Tt(n.dirtyFields,B,!0),qe.dirtyFields=n.dirtyFields,Oe=Oe||(p.dirtyFields||g.dirtyFields)&&Me!==!et}if(ae){const et=Ne(n.touchedFields,B);et||(Tt(n.touchedFields,B,ae),qe.touchedFields=n.touchedFields,Oe=Oe||(p.touchedFields||g.touchedFields)&&et!==ae)}Oe&&Ee&&x.state.next(qe)}return Oe?qe:{}},k=(B,J,ae,Te)=>{const Ee=Ne(n.errors,B),Oe=(p.isValid||g.isValid)&&jr(J)&&n.isValid!==J;if(t.delayError&&ae?(f=S(()=>C(B,ae)),f(t.delayError)):(clearTimeout(d),f=null,ae?Tt(n.errors,B,ae):gn(n.errors,B)),(ae?!Tr(Ee,ae):Ee)||!Gn(Te)||Oe){const Me={...Te,...Oe&&jr(J)?{isValid:J}:{},errors:n.errors,name:B};n={...n,...Me},x.state.next(Me)}},$=async B=>(O(B,!0),await t.resolver(o,t.context,EK(B||u.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),V=async B=>{const{errors:J}=await $(B);if(O(B),B)for(const ae of B){const Te=Ne(J,ae);Te?Tt(n.errors,ae,Te):gn(n.errors,ae)}else n.errors=J;return J},I=async({name:B,eventType:J})=>{if(e.validate){const ae=await e.validate({formValues:o,formState:n,name:B,eventType:J});if(on(ae))for(const Te in ae)ae[Te]&&de(`${Mb}.${Te}`,{message:Xn(ae.message)?ae.message:"",type:ma.validate});else Xn(ae)||!ae?de(Mb,{message:ae||"",type:ma.validate}):ce(Mb);return ae}return!0},L=async({fields:B,onlyCheckValid:J,name:ae,eventType:Te,context:Ee={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(Ee.runRootValidation=!0,!await I({name:ae,eventType:Te})&&(Ee.valid=!1,J)))return Ee.valid;for(const Oe in B){const Me=B[Oe];if(Me){const{_f:qe,...et}=Me;if(qe){const Ot=u.array.has(qe.name),gt=Me._f&&jK(Me._f);gt&&p.validatingFields&&O([qe.name],!0);const zt=await Q2(Me,u.disabled,o,A,t.shouldUseNativeValidation&&!J,Ot);if(gt&&p.validatingFields&&O([qe.name]),zt[qe.name]&&(Ee.valid=!1,J)||(!J&&(Ne(zt,qe.name)?Ot?PK(n.errors,zt,qe.name):Tt(n.errors,qe.name,zt[qe.name]):gn(n.errors,qe.name)),e.shouldUseNativeValidation&&zt[qe.name]))break}!Gn(et)&&await L({context:Ee,onlyCheckValid:J,fields:et,name:Oe,eventType:Te})}}return Ee.valid},H=()=>{for(const B of u.unMount){const J=Ne(r,B);J&&(J._f.refs?J._f.refs.every(ae=>!Pb(ae)):!Pb(J._f.ref))&&Se(B)}u.unMount=new Set},W=(B,J)=>!t.disabled&&(B&&J&&Tt(o,B,J),!Tr(me(),a)),Z=(B,J,ae)=>Q1(B,u,{...l.mount?o:Wt(J)?a:Xn(B)?{[B]:J}:J},ae,J),z=B=>OA(Ne(l.mount?o:a,B,t.shouldUnregister?Ne(a,B,[]):[])),F=(B,J,ae={})=>{const Te=Ne(r,B);let Ee=J;if(Te){const Oe=Te._f;Oe&&(!Oe.disabled&&Tt(o,B,LI(J,Oe)),Ee=Tp(Oe.ref)&&nr(J)?"":J,kI(Oe.ref)?[...Oe.ref.options].forEach(Me=>Me.selected=Ee.includes(Me.value)):Oe.refs?ld(Oe.ref)?Oe.refs.forEach(Me=>{(!Me.defaultChecked||!Me.disabled)&&(Array.isArray(Ee)?Me.checked=!!Ee.find(qe=>qe===Me.value):Me.checked=Ee===Me.value||!!Ee)}):Oe.refs.forEach(Me=>Me.checked=Me.value===Ee):NA(Oe.ref)?Oe.ref.value="":(Oe.ref.value=Ee,Oe.ref.type||x.state.next({name:B,values:un(o)})))}(ae.shouldDirty||ae.shouldTouch)&&N(B,Ee,ae.shouldTouch,ae.shouldDirty,!0),ae.shouldValidate&&ne(B)},Y=(B,J,ae)=>{for(const Te in J){if(!J.hasOwnProperty(Te))return;const Ee=J[Te],Oe=B+"."+Te,Me=Ne(r,Oe);(u.array.has(B)||on(Ee)||Me&&!Me._f)&&!us(Ee)?Y(Oe,Ee,ae):F(Oe,Ee,ae)}},Q=(B,J,ae={})=>{const Te=Ne(r,B),Ee=u.array.has(B),Oe=un(J),Me=Ne(o,B),qe=Tr(Me,Oe);if(Tt(o,B,Oe),Ee)x.array.next({name:B,values:un(o)}),(p.isDirty||p.dirtyFields||g.isDirty||g.dirtyFields)&&ae.shouldDirty&&(E(),x.state.next({name:B,dirtyFields:n.dirtyFields,isDirty:W(B,Oe)}));else{const et=Array.isArray(Oe)&&!Oe.length||Gn(Oe);!Te||Te._f||nr(Oe)||et?F(B,Oe,ae):Y(B,Oe,ae)}if(!qe){const et=Y2(B,u);x.state.next({...et&&n,name:l.mount||et?B:void 0,values:un(o)})}},K=B=>{const J=Zn(B)?B(o):B;Tr(o,J)||(o={...o,...J},x.state.next({...n,values:o}))},P=async B=>{l.mount=!0;const J=B.target;let ae=J.name,Te=!0;const Ee=Ne(r,ae),Oe=et=>{Te=Number.isNaN(et)||us(et)&&isNaN(et.getTime())||Tr(et,Ne(o,ae,et))},Me=W2(t.mode),qe=W2(t.reValidateMode);if(Ee){let et,Ot;const gt=J.type?G2(Ee._f):CI(B),zt=B.type===ho.BLUR||B.type===ho.FOCUS_OUT,dn=!TK(Ee._f)&&!e.validate&&!t.resolver&&!Ne(n.errors,ae)&&!Ee._f.deps||NK(zt,Ne(n.touchedFields,ae),n.isSubmitted,qe,Me),mr=Y2(ae,u,zt);Tt(o,ae,gt),zt?(!J||!J.readOnly)&&(Ee._f.onBlur&&Ee._f.onBlur(B),f&&f(0)):Ee._f.onChange&&Ee._f.onChange(B);const la=N(ae,gt,zt),ua=!Gn(la)||mr;if(!zt&&x.state.next({name:ae,type:B.type,values:un(o)}),dn)return(p.isValid||g.isValid)&&(t.mode==="onBlur"?zt&&w():zt||w()),ua&&x.state.next({name:ae,...mr?{}:la});if(!t.resolver&&e.validate&&await I({name:ae,eventType:B.type}),!zt&&mr&&x.state.next({...n}),t.resolver){const{errors:Jn}=await $([ae]);if(O([ae]),Oe(gt),Te){const vr=K2(n.errors,r,ae),or=K2(Jn,r,vr.name||ae);et=or.error,ae=or.name,Ot=Gn(Jn)}}else O([ae],!0),et=(await Q2(Ee,u.disabled,o,A,t.shouldUseNativeValidation))[ae],O([ae]),Oe(gt),Te&&(et?Ot=!1:(p.isValid||g.isValid)&&(Ot=await L({fields:r,onlyCheckValid:!0,name:ae,eventType:B.type})));Te&&(Ee._f.deps&&(!Array.isArray(Ee._f.deps)||Ee._f.deps.length>0)&&ne(Ee._f.deps),k(ae,Ot,et,la))}},U=(B,J)=>{if(Ne(n.errors,J)&&B.focus)return B.focus(),1},ne=async(B,J={})=>{let ae,Te;const Ee=Yc(B);if(t.resolver){const Oe=await V(Wt(B)?B:Ee);ae=Gn(Oe),Te=B?!Ee.some(Me=>Ne(Oe,Me)):ae}else B?(Te=(await Promise.all(Ee.map(async Oe=>{const Me=Ne(r,Oe);return await L({fields:Me&&Me._f?{[Oe]:Me}:Me,eventType:ho.TRIGGER})}))).every(Boolean),!(!Te&&!n.isValid)&&w()):Te=ae=await L({fields:r,name:B,eventType:ho.TRIGGER});return x.state.next({...!Xn(B)||(p.isValid||g.isValid)&&ae!==n.isValid?{}:{name:B},...t.resolver||!B?{isValid:ae}:{},errors:n.errors}),J.shouldFocus&&!Te&&Kc(r,U,B?Ee:u.mount),Te},me=(B,J)=>{let ae={...l.mount?o:a};return J&&(ae=DI(J.dirtyFields?n.dirtyFields:n.touchedFields,ae)),Wt(B)?ae:Xn(B)?Ne(ae,B):B.map(Te=>Ne(ae,Te))},Ae=(B,J)=>({invalid:!!Ne((J||n).errors,B),isDirty:!!Ne((J||n).dirtyFields,B),error:Ne((J||n).errors,B),isValidating:!!Ne(n.validatingFields,B),isTouched:!!Ne((J||n).touchedFields,B)}),ce=B=>{const J=B?Yc(B):void 0;J==null||J.forEach(ae=>gn(n.errors,ae)),J?J.forEach(ae=>{x.state.next({name:ae,errors:n.errors})}):x.state.next({errors:{}})},de=(B,J,ae)=>{const Te=(Ne(r,B,{_f:{}})._f||{}).ref,Ee=Ne(n.errors,B)||{},{ref:Oe,message:Me,type:qe,...et}=Ee;Tt(n.errors,B,{...et,...J,ref:Te}),x.state.next({name:B,errors:n.errors,isValid:!1}),ae&&ae.shouldFocus&&Te&&Te.focus&&Te.focus()},Ce=(B,J)=>Zn(B)?x.state.subscribe({next:ae=>"values"in ae&&B(ae.values||Z(void 0,J),ae)}):Z(B,J,!0),le=B=>x.state.subscribe({next:J=>{if(RK(B.name,J.name,B.exact)&&CK(J,B.formState||p,fn,B.reRenderRoot)){const ae={...o};B.callback({values:ae,...n,...J,defaultValues:a})}}}).unsubscribe,_e=B=>(l.mount=!0,g={...g,...B.formState},le({...B,formState:{...m,...B.formState}})),Se=(B,J={})=>{for(const ae of B?Yc(B):u.mount)u.mount.delete(ae),u.array.delete(ae),J.keepValue||(gn(r,ae),gn(o,ae)),!J.keepError&&gn(n.errors,ae),!J.keepDirty&&gn(n.dirtyFields,ae),!J.keepTouched&&gn(n.touchedFields,ae),!J.keepIsValidating&&gn(n.validatingFields,ae),!t.shouldUnregister&&!J.keepDefaultValue&&gn(a,ae);x.state.next({values:un(o)}),x.state.next({...n,...J.keepDirty?{isDirty:W()}:{}}),!J.keepIsValid&&w()},se=({disabled:B,name:J})=>{if(jr(B)&&l.mount||B||u.disabled.has(J)){const Ee=u.disabled.has(J)!==!!B;B?u.disabled.add(J):u.disabled.delete(J),Ee&&l.mount&&!l.action&&w()}},Ve=(B,J={})=>{let ae=Ne(r,B);const Te=jr(J.disabled)||jr(t.disabled),Ee=!u.registerName.has(B)&&ae&&ae._f&&!ae._f.mount;return Tt(r,B,{...ae||{},_f:{...ae&&ae._f?ae._f:{ref:{name:B}},name:B,mount:!0,...J}}),u.mount.add(B),ae&&!Ee?se({disabled:jr(J.disabled)?J.disabled:t.disabled,name:B}):R(B,!0,J.value),{...Te?{disabled:J.disabled||t.disabled}:{},...t.progressive?{required:!!J.required,min:Rc(J.min),max:Rc(J.max),minLength:Rc(J.minLength),maxLength:Rc(J.maxLength),pattern:Rc(J.pattern)}:{},name:B,onChange:P,onBlur:P,ref:Oe=>{if(Oe){u.registerName.add(B),Ve(B,J),u.registerName.delete(B),ae=Ne(r,B);const Me=Wt(Oe.value)&&Oe.querySelectorAll&&Oe.querySelectorAll("input,select,textarea")[0]||Oe,qe=SK(Me),et=ae._f.refs||[];if(qe?et.find(Ot=>Ot===Me):Me===ae._f.ref)return;Tt(r,B,{_f:{...ae._f,...qe?{refs:[...et.filter(Pb),Me,...Array.isArray(Ne(a,B))?[{}]:[]],ref:{type:Me.type,name:B}}:{ref:Me}}}),R(B,!1,void 0,Me)}else ae=Ne(r,B,{}),ae._f&&(ae._f.mount=!1),(t.shouldUnregister||J.shouldUnregister)&&!(RI(u.array,B)&&l.action)&&u.unMount.add(B)}}},$e=()=>t.shouldFocusError&&Kc(r,U,u.mount),Je=B=>{jr(B)&&(x.state.next({disabled:B}),Kc(r,(J,ae)=>{const Te=Ne(r,ae);Te&&(J.disabled=Te._f.disabled||B,Array.isArray(Te._f.refs)&&Te._f.refs.forEach(Ee=>{Ee.disabled=Te._f.disabled||B}))},0,!1))},Ke=(B,J)=>async ae=>{let Te;ae&&(ae.preventDefault&&ae.preventDefault(),ae.persist&&ae.persist());let Ee=un(o);if(x.state.next({isSubmitting:!0}),t.resolver){const{errors:Oe,values:Me}=await $();O(),n.errors=Oe,Ee=un(Me)}else await L({fields:r,eventType:ho.SUBMIT});if(u.disabled.size)for(const Oe of u.disabled)gn(Ee,Oe);if(gn(n.errors,NI),Gn(n.errors)){x.state.next({errors:{}});try{await B(Ee,ae)}catch(Oe){Te=Oe}}else J&&await J({...n.errors},ae),$e(),setTimeout($e);if(x.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Gn(n.errors)&&!Te,submitCount:n.submitCount+1,errors:n.errors}),Te)throw Te},vt=(B,J={})=>{Ne(r,B)&&(Wt(J.defaultValue)?Q(B,un(Ne(a,B))):(Q(B,J.defaultValue),Tt(a,B,un(J.defaultValue))),J.keepTouched||gn(n.touchedFields,B),J.keepDirty||(gn(n.dirtyFields,B),n.isDirty=J.defaultValue?W(B,un(Ne(a,B))):W()),J.keepError||(gn(n.errors,B),p.isValid&&w()),x.state.next({...n}))},$t=(B,J={})=>{const ae=B?un(B):a,Te=un(ae),Ee=Gn(B),Oe=Ee?a:Te;if(J.keepDefaultValues||(a=ae),!J.keepValues){if(J.keepDirtyValues){const Me=new Set([...u.mount,...Object.keys(Uc(a,o))]);for(const qe of Array.from(Me)){const et=Ne(n.dirtyFields,qe),Ot=Ne(o,qe),gt=Ne(Oe,qe);et&&!Wt(Ot)?Tt(Oe,qe,Ot):!et&&!Wt(gt)&&Q(qe,gt)}}else{if(AA&&Wt(B))for(const Me of u.mount){const qe=Ne(r,Me);if(qe&&qe._f){const et=Array.isArray(qe._f.refs)?qe._f.refs[0]:qe._f.ref;if(Tp(et)){const Ot=et.closest("form");if(Ot){Ot.reset();break}}}}if(J.keepFieldsRef)for(const Me of u.mount)Q(Me,Ne(Oe,Me));else r={}}o=t.shouldUnregister?J.keepDefaultValues?un(a):{}:un(Oe),x.array.next({values:{...Oe}}),x.state.next({values:{...Oe}})}u={mount:J.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!p.isValid||!!J.keepIsValid||!!J.keepDirtyValues||!t.shouldUnregister&&!Gn(Oe),l.watch=!!t.shouldUnregister,l.keepIsValid=!!J.keepIsValid,l.action=!1,J.keepErrors||(n.errors={}),x.state.next({submitCount:J.keepSubmitCount?n.submitCount:0,isDirty:Ee?!1:J.keepDirty?n.isDirty:!!(J.keepDefaultValues&&!Tr(B,a)),isSubmitted:J.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Ee?{}:J.keepDirtyValues?J.keepDefaultValues&&o?Uc(a,o):n.dirtyFields:J.keepDefaultValues&&B?Uc(a,B):J.keepDirty?n.dirtyFields:{},touchedFields:J.keepTouched?n.touchedFields:{},errors:J.keepErrors?n.errors:{},isSubmitSuccessful:J.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:a})},qt=(B,J)=>$t(Zn(B)?B(o):B,{...t.resetOptions,...J}),Tn=(B,J={})=>{const ae=Ne(r,B),Te=ae&&ae._f;if(Te){const Ee=Te.refs?Te.refs[0]:Te.ref;Ee.focus&&setTimeout(()=>{Ee.focus(),J.shouldSelect&&Zn(Ee.select)&&Ee.select()})}},fn=B=>{n={...n,...B}},Hn={control:{register:Ve,unregister:Se,getFieldState:Ae,handleSubmit:Ke,setError:de,_subscribe:le,_runSchema:$,_updateIsValidating:O,_focusError:$e,_getWatch:Z,_getDirty:W,_setValid:w,_setFieldArray:T,_setDisabledField:se,_setErrors:j,_getFieldArray:z,_reset:$t,_resetDefaultValues:()=>Zn(t.defaultValues)&&t.defaultValues().then(B=>{qt(B,t.resetOptions),x.state.next({isLoading:!1})}),_removeUnmounted:H,_disableForm:Je,_subjects:x,_proxyFormState:p,get _fields(){return r},get _formValues(){return o},get _state(){return l},set _state(B){l=B},get _defaultValues(){return a},get _names(){return u},set _names(B){u=B},get _formState(){return n},get _options(){return t},set _options(B){t={...t,...B}}},subscribe:_e,trigger:ne,register:Ve,handleSubmit:Ke,watch:Ce,setValue:Q,setValues:K,getValues:me,reset:qt,resetField:vt,clearErrors:ce,unregister:Se,setError:de,setFocus:Tn,getFieldState:Ae};return{...Hn,formControl:Hn}}function yo(e={}){const t=q.useRef(void 0),n=q.useRef(void 0),[r,a]=q.useState(()=>({...un(BI),isLoading:Zn(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Zn(e.defaultValues)?void 0:e.defaultValues}));if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Zn(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...u}=kK(e);t.current={...u,formState:r}}const o=t.current.control;return o._options=e,TA(()=>{const l=o._subscribe({formState:o._proxyFormState,callback:()=>a({...o._formState}),reRenderRoot:!0});return a(u=>({...u,isReady:!0})),o._formState.isReady=!0,l},[o]),q.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),q.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),q.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),q.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),q.useEffect(()=>{if(o._proxyFormState.isDirty){const l=o._getDirty();l!==r.isDirty&&o._subjects.state.next({isDirty:l})}},[o,r.isDirty]),q.useEffect(()=>{var l;e.values&&!Tr(e.values,n.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),!((l=o._options.resetOptions)===null||l===void 0)&&l.keepIsValid||o._setValid(),n.current=e.values,a(u=>({...u}))):o._resetDefaultValues()},[o,e.values]),q.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=q.useMemo(()=>PI(r,o),[o,r]),t.current}const J2=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Ne(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},nS=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?J2(r.ref,n,e):r&&r.refs&&r.refs.forEach(a=>J2(a,n,e))}},eR=(e,t)=>{t.shouldUseNativeValidation&&nS(e,t);const n={};for(const r in e){const a=Ne(t.fields,r),o=Object.assign(e[r]||{},{ref:a&&a.ref});if($K(t.names||Object.keys(e),r)){const l=Object.assign({},Ne(n,r));Tt(l,"root",o),Tt(n,r,l)}else Tt(n,r,o)}return n},$K=(e,t)=>{const n=tR(t);return e.some(r=>tR(r).match(`^${n}\\.\\d+`))};function tR(e){return e.replace(/\]|\[/g,"")}var nR;function xe(e,t,n){function r(u,f){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:f,constr:l,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,f);const d=l.prototype,m=Object.keys(d);for(let p=0;p<m.length;p++){const g=m[p];g in u||(u[g]=d[g].bind(u))}}const a=(n==null?void 0:n.Parent)??Object;class o extends a{}Object.defineProperty(o,"name",{value:e});function l(u){var f;const d=n!=null&&n.Parent?new o:this;r(d,u),(f=d._zod).deferred??(f.deferred=[]);for(const m of d._zod.deferred)m();return d}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:u=>{var f,d;return n!=null&&n.Parent&&u instanceof n.Parent?!0:(d=(f=u==null?void 0:u._zod)==null?void 0:f.traits)==null?void 0:d.has(e)}}),Object.defineProperty(l,"name",{value:e}),l}class $l extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class UI extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(nR=globalThis).__zod_globalConfig??(nR.__zod_globalConfig={});const PA=globalThis.__zod_globalConfig;function bs(e){return PA}function qI(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,a])=>t.indexOf(+r)===-1).map(([r,a])=>a)}function rS(e,t){return typeof t=="bigint"?t.toString():t}function DA(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function kA(e){return e==null}function $A(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const rR=Symbol("evaluating");function Dt(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==rR)return r===void 0&&(r=rR,r=n()),r},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function Ds(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function To(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function aR(e){return JSON.stringify(e)}function zK(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const HI="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Rp(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const LK=DA(()=>{var e;if(PA.jitless||typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function lf(e){if(Rp(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Rp(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function FI(e){return lf(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const IK=new Set(["string","number","symbol"]);function ov(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Co(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function Ze(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function BK(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function UK(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=To(e._zod.def,{get shape(){const l={};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(l[u]=n.shape[u])}return Ds(this,"shape",l),l},checks:[]});return Co(e,o)}function qK(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=To(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete l[u]}return Ds(this,"shape",l),l},checks:[]});return Co(e,o)}function HK(e,t){if(!lf(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const o=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(o,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const a=To(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Ds(this,"shape",o),o}});return Co(e,a)}function FK(e,t){if(!lf(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=To(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Ds(this,"shape",r),r}});return Co(e,n)}function VK(e,t){var r;if((r=e._zod.def.checks)!=null&&r.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=To(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t._zod.def.shape};return Ds(this,"shape",a),a},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Co(e,n)}function GK(e,t,n){const a=t._zod.def.checks;if(a&&a.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=To(t._zod.def,{get shape(){const u=t._zod.def.shape,f={...u};if(n)for(const d in n){if(!(d in u))throw new Error(`Unrecognized key: "${d}"`);n[d]&&(f[d]=e?new e({type:"optional",innerType:u[d]}):u[d])}else for(const d in u)f[d]=e?new e({type:"optional",innerType:u[d]}):u[d];return Ds(this,"shape",f),f},checks:[]});return Co(t,l)}function WK(e,t,n){const r=To(t._zod.def,{get shape(){const a=t._zod.def.shape,o={...a};if(n)for(const l in n){if(!(l in o))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(o[l]=new e({type:"nonoptional",innerType:a[l]}))}else for(const l in a)o[l]=new e({type:"nonoptional",innerType:a[l]});return Ds(this,"shape",o),o}});return Co(t,r)}function Cl(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function ZK(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)===!1)return!0;return!1}function VI(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Uh(e){return typeof e=="string"?e:e==null?void 0:e.message}function xs(e,t,n){var f,d,m,p,g,x;const r=e.message?e.message:Uh((m=(d=(f=e.inst)==null?void 0:f._zod.def)==null?void 0:d.error)==null?void 0:m.call(d,e))??Uh((p=t==null?void 0:t.error)==null?void 0:p.call(t,e))??Uh((g=n.customError)==null?void 0:g.call(n,e))??Uh((x=n.localeError)==null?void 0:x.call(n,e))??"Invalid input",{inst:a,continue:o,input:l,...u}=e;return u.path??(u.path=[]),u.message=r,t!=null&&t.reportInput&&(u.input=l),u}function zA(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function uf(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const GI=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,rS,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},LA=xe("$ZodError",GI),sv=xe("$ZodError",GI,{Parent:Error});function YK(e,t=n=>n.message){const n={},r=[];for(const a of e.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):r.push(t(a));return{formErrors:r,fieldErrors:n}}function KK(e,t=n=>n.message){const n={_errors:[]},r=(a,o=[])=>{for(const l of a.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(u=>r({issues:u},[...o,...l.path]));else if(l.code==="invalid_key")r({issues:l.issues},[...o,...l.path]);else if(l.code==="invalid_element")r({issues:l.issues},[...o,...l.path]);else{const u=[...o,...l.path];if(u.length===0)n._errors.push(t(l));else{let f=n,d=0;for(;d<u.length;){const m=u[d];d===u.length-1?(f[m]=f[m]||{_errors:[]},f[m]._errors.push(t(l))):f[m]=f[m]||{_errors:[]},f=f[m],d++}}}};return r(e),n}const lv=e=>(t,n,r,a)=>{const o=r?{...r,async:!1}:{async:!1},l=t._zod.run({value:n,issues:[]},o);if(l instanceof Promise)throw new $l;if(l.issues.length){const u=new((a==null?void 0:a.Err)??e)(l.issues.map(f=>xs(f,o,bs())));throw HI(u,a==null?void 0:a.callee),u}return l.value},XK=lv(sv),uv=e=>async(t,n,r,a)=>{const o=r?{...r,async:!0}:{async:!0};let l=t._zod.run({value:n,issues:[]},o);if(l instanceof Promise&&(l=await l),l.issues.length){const u=new((a==null?void 0:a.Err)??e)(l.issues.map(f=>xs(f,o,bs())));throw HI(u,a==null?void 0:a.callee),u}return l.value},QK=uv(sv),cv=e=>(t,n,r)=>{const a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new $l;return o.issues.length?{success:!1,error:new(e??LA)(o.issues.map(l=>xs(l,a,bs())))}:{success:!0,data:o.value}},JK=cv(sv),fv=e=>async(t,n,r)=>{const a=r?{...r,async:!0}:{async:!0};let o=t._zod.run({value:n,issues:[]},a);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(l=>xs(l,a,bs())))}:{success:!0,data:o.value}},eX=fv(sv),tX=e=>(t,n,r)=>{const a=r?{...r,direction:"backward"}:{direction:"backward"};return lv(e)(t,n,a)},nX=e=>(t,n,r)=>lv(e)(t,n,r),rX=e=>async(t,n,r)=>{const a=r?{...r,direction:"backward"}:{direction:"backward"};return uv(e)(t,n,a)},aX=e=>async(t,n,r)=>uv(e)(t,n,r),iX=e=>(t,n,r)=>{const a=r?{...r,direction:"backward"}:{direction:"backward"};return cv(e)(t,n,a)},oX=e=>(t,n,r)=>cv(e)(t,n,r),sX=e=>async(t,n,r)=>{const a=r?{...r,direction:"backward"}:{direction:"backward"};return fv(e)(t,n,a)},lX=e=>async(t,n,r)=>fv(e)(t,n,r),uX=/^[cC][0-9a-z]{6,}$/,cX=/^[0-9a-z]+$/,fX=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,dX=/^[0-9a-vA-V]{20}$/,hX=/^[A-Za-z0-9]{27}$/,pX=/^[a-zA-Z0-9_-]{21}$/,mX=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,vX=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,iR=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,gX=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,yX="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function bX(){return new RegExp(yX,"u")}const xX=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,wX=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,SX=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,_X=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,AX=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,WI=/^[A-Za-z0-9_-]*$/,OX=/^https?$/,EX=/^\+[1-9]\d{6,14}$/,ZI="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",jX=new RegExp(`^${ZI}$`);function YI(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function TX(e){return new RegExp(`^${YI(e)}$`)}function CX(e){const t=YI({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${ZI}T(?:${r})$`)}const RX=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},NX=/^[^A-Z]*$/,MX=/^[^a-z]*$/,Xa=xe("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),PX=xe("$ZodCheckMaxLength",(e,t)=>{var n;Xa.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!kA(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const a=r.value;if(a.length<=t.maximum)return;const l=zA(a);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),DX=xe("$ZodCheckMinLength",(e,t)=>{var n;Xa.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!kA(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const a=r.value;if(a.length>=t.minimum)return;const l=zA(a);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),kX=xe("$ZodCheckLengthEquals",(e,t)=>{var n;Xa.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!kA(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag;a.minimum=t.length,a.maximum=t.length,a.length=t.length}),e._zod.check=r=>{const a=r.value,o=a.length;if(o===t.length)return;const l=zA(a),u=o>t.length;r.issues.push({origin:l,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),dv=xe("$ZodCheckStringFormat",(e,t)=>{var n,r;Xa.init(e,t),e._zod.onattach.push(a=>{const o=a._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:t.format,input:a.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),$X=xe("$ZodCheckRegex",(e,t)=>{dv.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),zX=xe("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=NX),dv.init(e,t)}),LX=xe("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=MX),dv.init(e,t)}),IX=xe("$ZodCheckIncludes",(e,t)=>{Xa.init(e,t);const n=ov(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(a=>{const o=a._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=a=>{a.value.includes(t.includes,t.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:a.value,inst:e,continue:!t.abort})}}),BX=xe("$ZodCheckStartsWith",(e,t)=>{Xa.init(e,t);const n=new RegExp(`^${ov(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),UX=xe("$ZodCheckEndsWith",(e,t)=>{Xa.init(e,t);const n=new RegExp(`.*${ov(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),qX=xe("$ZodCheckOverwrite",(e,t)=>{Xa.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class HX{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
345
- `).filter(l=>l),a=Math.min(...r.map(l=>l.length-l.trimStart().length)),o=r.map(l=>l.slice(a)).map(l=>" ".repeat(this.indent*2)+l);for(const l of o)this.content.push(l)}compile(){const t=Function,n=this==null?void 0:this.args,a=[...((this==null?void 0:this.content)??[""]).map(o=>` ${o}`)];return new t(...n,a.join(`
346
- `))}}const FX={major:4,minor:4,patch:3},On=xe("$ZodType",(e,t)=>{var a;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=FX;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const l of o._zod.onattach)l(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),(a=e._zod.deferred)==null||a.push(()=>{e._zod.run=e._zod.parse});else{const o=(u,f,d)=>{let m=Cl(u),p;for(const g of f){if(g._zod.def.when){if(ZK(u)||!g._zod.def.when(u))continue}else if(m)continue;const x=u.issues.length,A=g._zod.check(u);if(A instanceof Promise&&(d==null?void 0:d.async)===!1)throw new $l;if(p||A instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await A,u.issues.length!==x&&(m||(m=Cl(u,x)))});else{if(u.issues.length===x)continue;m||(m=Cl(u,x))}}return p?p.then(()=>u):u},l=(u,f,d)=>{if(Cl(u))return u.aborted=!0,u;const m=o(f,r,d);if(m instanceof Promise){if(d.async===!1)throw new $l;return m.then(p=>e._zod.parse(p,d))}return e._zod.parse(m,d)};e._zod.run=(u,f)=>{if(f.skipChecks)return e._zod.parse(u,f);if(f.direction==="backward"){const m=e._zod.parse({value:u.value,issues:[]},{...f,skipChecks:!0});return m instanceof Promise?m.then(p=>l(p,u,f)):l(m,u,f)}const d=e._zod.parse(u,f);if(d instanceof Promise){if(f.async===!1)throw new $l;return d.then(m=>o(m,r,f))}return o(d,r,f)}}Dt(e,"~standard",()=>({validate:o=>{var l;try{const u=JK(e,o);return u.success?{value:u.data}:{issues:(l=u.error)==null?void 0:l.issues}}catch{return eX(e,o).then(f=>{var d;return f.success?{value:f.data}:{issues:(d=f.error)==null?void 0:d.issues}})}},vendor:"zod",version:1}))}),IA=xe("$ZodString",(e,t)=>{var n;On.init(e,t),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??RX(e._zod.bag),e._zod.parse=(r,a)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Qt=xe("$ZodStringFormat",(e,t)=>{dv.init(e,t),IA.init(e,t)}),VX=xe("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=vX),Qt.init(e,t)}),GX=xe("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=iR(r))}else t.pattern??(t.pattern=iR());Qt.init(e,t)}),WX=xe("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=gX),Qt.init(e,t)}),ZX=xe("$ZodURL",(e,t)=>{Qt.init(e,t),e._zod.check=n=>{var r;try{const a=n.value.trim();if(!t.normalize&&((r=t.protocol)==null?void 0:r.source)===OX.source&&!/^https?:\/\//i.test(a)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}const o=new URL(a);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=a;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),YX=xe("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=bX()),Qt.init(e,t)}),KX=xe("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=pX),Qt.init(e,t)}),XX=xe("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=uX),Qt.init(e,t)}),QX=xe("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=cX),Qt.init(e,t)}),JX=xe("$ZodULID",(e,t)=>{t.pattern??(t.pattern=fX),Qt.init(e,t)}),eQ=xe("$ZodXID",(e,t)=>{t.pattern??(t.pattern=dX),Qt.init(e,t)}),tQ=xe("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=hX),Qt.init(e,t)}),nQ=xe("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=CX(t)),Qt.init(e,t)}),rQ=xe("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=jX),Qt.init(e,t)}),aQ=xe("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=TX(t)),Qt.init(e,t)}),iQ=xe("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=mX),Qt.init(e,t)}),oQ=xe("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=xX),Qt.init(e,t),e._zod.bag.format="ipv4"}),sQ=xe("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=wX),Qt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),lQ=xe("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=SX),Qt.init(e,t)}),uQ=xe("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=_X),Qt.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[a,o]=r;if(!o)throw new Error;const l=Number(o);if(`${l}`!==o)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${a}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function KI(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const cQ=xe("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=AX),Qt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{KI(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function fQ(e){if(!WI.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return KI(n)}const dQ=xe("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=WI),Qt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{fQ(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),hQ=xe("$ZodE164",(e,t)=>{t.pattern??(t.pattern=EX),Qt.init(e,t)});function pQ(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const a=JSON.parse(atob(r));return!("typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||t&&(!("alg"in a)||a.alg!==t))}catch{return!1}}const mQ=xe("$ZodJWT",(e,t)=>{Qt.init(e,t),e._zod.check=n=>{pQ(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),vQ=xe("$ZodUnknown",(e,t)=>{On.init(e,t),e._zod.parse=n=>n}),gQ=xe("$ZodNever",(e,t)=>{On.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function oR(e,t,n){e.issues.length&&t.issues.push(...VI(n,e.issues)),t.value[n]=e.value}const yQ=xe("$ZodArray",(e,t)=>{On.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;if(!Array.isArray(a))return n.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),n;n.value=Array(a.length);const o=[];for(let l=0;l<a.length;l++){const u=a[l],f=t.element._zod.run({value:u,issues:[]},r);f instanceof Promise?o.push(f.then(d=>oR(d,n,l))):oR(f,n,l)}return o.length?Promise.all(o).then(()=>n):n}});function Np(e,t,n,r,a,o){const l=n in r;if(e.issues.length){if(a&&o&&!l)return;t.issues.push(...VI(n,e.issues))}if(!l&&!a){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?l&&(t.value[n]=void 0):t.value[n]=e.value}function XI(e){var r,a,o,l;const t=Object.keys(e.shape);for(const u of t)if(!((l=(o=(a=(r=e.shape)==null?void 0:r[u])==null?void 0:a._zod)==null?void 0:o.traits)!=null&&l.has("$ZodType")))throw new Error(`Invalid element at key "${u}": expected a Zod schema`);const n=BK(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function QI(e,t,n,r,a,o){const l=[],u=a.keySet,f=a.catchall._zod,d=f.def.type,m=f.optin==="optional",p=f.optout==="optional";for(const g in t){if(g==="__proto__"||u.has(g))continue;if(d==="never"){l.push(g);continue}const x=f.run({value:t[g],issues:[]},r);x instanceof Promise?e.push(x.then(A=>Np(A,n,g,t,m,p))):Np(x,n,g,t,m,p)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const bQ=xe("$ZodObject",(e,t)=>{On.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!(n!=null&&n.get)){const u=t.shape;Object.defineProperty(t,"shape",{get:()=>{const f={...u};return Object.defineProperty(t,"shape",{value:f}),f}})}const r=DA(()=>XI(t));Dt(e._zod,"propValues",()=>{const u=t.shape,f={};for(const d in u){const m=u[d]._zod;if(m.values){f[d]??(f[d]=new Set);for(const p of m.values)f[d].add(p)}}return f});const a=Rp,o=t.catchall;let l;e._zod.parse=(u,f)=>{l??(l=r.value);const d=u.value;if(!a(d))return u.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),u;u.value={};const m=[],p=l.shape;for(const g of l.keys){const x=p[g],A=x._zod.optin==="optional",S=x._zod.optout==="optional",w=x._zod.run({value:d[g],issues:[]},f);w instanceof Promise?m.push(w.then(O=>Np(O,u,g,d,A,S))):Np(w,u,g,d,A,S)}return o?QI(m,d,u,f,r.value,e):m.length?Promise.all(m).then(()=>u):u}}),xQ=xe("$ZodObjectJIT",(e,t)=>{bQ.init(e,t);const n=e._zod.parse,r=DA(()=>XI(t)),a=g=>{var T,C;const x=new HX(["shape","payload","ctx"]),A=r.value,S=j=>{const R=aR(j);return`shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`};x.write("const input = payload.value;");const w=Object.create(null);let O=0;for(const j of A.keys)w[j]=`key_${O++}`;x.write("const newResult = {};");for(const j of A.keys){const R=w[j],N=aR(j),k=g[j],$=((T=k==null?void 0:k._zod)==null?void 0:T.optin)==="optional",V=((C=k==null?void 0:k._zod)==null?void 0:C.optout)==="optional";x.write(`const ${R} = ${S(j)};`),$&&V?x.write(`
347
- if (${R}.issues.length) {
348
- if (${N} in input) {
349
- payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
350
- ...iss,
351
- path: iss.path ? [${N}, ...iss.path] : [${N}]
352
- })));
353
- }
354
- }
355
-
356
- if (${R}.value === undefined) {
357
- if (${N} in input) {
358
- newResult[${N}] = undefined;
359
- }
360
- } else {
361
- newResult[${N}] = ${R}.value;
362
- }
363
-
364
- `):$?x.write(`
365
- if (${R}.issues.length) {
366
- payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
367
- ...iss,
368
- path: iss.path ? [${N}, ...iss.path] : [${N}]
369
- })));
370
- }
371
-
372
- if (${R}.value === undefined) {
373
- if (${N} in input) {
374
- newResult[${N}] = undefined;
375
- }
376
- } else {
377
- newResult[${N}] = ${R}.value;
378
- }
379
-
380
- `):x.write(`
381
- const ${R}_present = ${N} in input;
382
- if (${R}.issues.length) {
383
- payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
384
- ...iss,
385
- path: iss.path ? [${N}, ...iss.path] : [${N}]
386
- })));
387
- }
388
- if (!${R}_present && !${R}.issues.length) {
389
- payload.issues.push({
390
- code: "invalid_type",
391
- expected: "nonoptional",
392
- input: undefined,
393
- path: [${N}]
394
- });
395
- }
396
-
397
- if (${R}_present) {
398
- if (${R}.value === undefined) {
399
- newResult[${N}] = undefined;
400
- } else {
401
- newResult[${N}] = ${R}.value;
402
- }
403
- }
404
-
405
- `)}x.write("payload.value = newResult;"),x.write("return payload;");const E=x.compile();return(j,R)=>E(g,j,R)};let o;const l=Rp,u=!PA.jitless,d=u&&LK.value,m=t.catchall;let p;e._zod.parse=(g,x)=>{p??(p=r.value);const A=g.value;return l(A)?u&&d&&(x==null?void 0:x.async)===!1&&x.jitless!==!0?(o||(o=a(t.shape)),g=o(g,x),m?QI([],A,g,x,p,e):g):n(g,x):(g.issues.push({expected:"object",code:"invalid_type",input:A,inst:e}),g)}});function sR(e,t,n,r){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const a=e.filter(o=>!Cl(o));return a.length===1?(t.value=a[0].value,a[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(l=>xs(l,r,bs())))}),t)}const wQ=xe("$ZodUnion",(e,t)=>{On.init(e,t),Dt(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),Dt(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),Dt(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),Dt(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${r.map(a=>$A(a.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,a)=>{if(n)return n(r,a);let o=!1;const l=[];for(const u of t.options){const f=u._zod.run({value:r.value,issues:[]},a);if(f instanceof Promise)l.push(f),o=!0;else{if(f.issues.length===0)return f;l.push(f)}}return o?Promise.all(l).then(u=>sR(u,r,e,a)):sR(l,r,e,a)}}),SQ=xe("$ZodIntersection",(e,t)=>{On.init(e,t),e._zod.parse=(n,r)=>{const a=n.value,o=t.left._zod.run({value:a,issues:[]},r),l=t.right._zod.run({value:a,issues:[]},r);return o instanceof Promise||l instanceof Promise?Promise.all([o,l]).then(([f,d])=>lR(n,f,d)):lR(n,o,l)}});function aS(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(lf(e)&&lf(t)){const n=Object.keys(t),r=Object.keys(e).filter(o=>n.indexOf(o)!==-1),a={...e,...t};for(const o of r){const l=aS(e[o],t[o]);if(!l.valid)return{valid:!1,mergeErrorPath:[o,...l.mergeErrorPath]};a[o]=l.data}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const a=e[r],o=t[r],l=aS(a,o);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function lR(e,t,n){const r=new Map;let a;for(const u of t.issues)if(u.code==="unrecognized_keys"){a??(a=u);for(const f of u.keys)r.has(f)||r.set(f,{}),r.get(f).l=!0}else e.issues.push(u);for(const u of n.issues)if(u.code==="unrecognized_keys")for(const f of u.keys)r.has(f)||r.set(f,{}),r.get(f).r=!0;else e.issues.push(u);const o=[...r].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(o.length&&a&&e.issues.push({...a,keys:o}),Cl(e))return e;const l=aS(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const _Q=xe("$ZodEnum",(e,t)=>{On.init(e,t);const n=qI(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(a=>IK.has(typeof a)).map(a=>typeof a=="string"?ov(a):a.toString()).join("|")})$`),e._zod.parse=(a,o)=>{const l=a.value;return r.has(l)||a.issues.push({code:"invalid_value",values:n,input:l,inst:e}),a}}),AQ=xe("$ZodTransform",(e,t)=>{On.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new UI(e.constructor.name);const a=t.transform(n.value,n);if(r.async)return(a instanceof Promise?a:Promise.resolve(a)).then(l=>(n.value=l,n.fallback=!0,n));if(a instanceof Promise)throw new $l;return n.value=a,n.fallback=!0,n}});function uR(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const JI=xe("$ZodOptional",(e,t)=>{On.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Dt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Dt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${$A(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const a=n.value,o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(l=>uR(l,a)):uR(o,a)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),OQ=xe("$ZodExactOptional",(e,t)=>{JI.init(e,t),Dt(e._zod,"values",()=>t.innerType._zod.values),Dt(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),EQ=xe("$ZodNullable",(e,t)=>{On.init(e,t),Dt(e._zod,"optin",()=>t.innerType._zod.optin),Dt(e._zod,"optout",()=>t.innerType._zod.optout),Dt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${$A(n.source)}|null)$`):void 0}),Dt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),jQ=xe("$ZodDefault",(e,t)=>{On.init(e,t),e._zod.optin="optional",Dt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(o=>cR(o,t)):cR(a,t)}});function cR(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const TQ=xe("$ZodPrefault",(e,t)=>{On.init(e,t),e._zod.optin="optional",Dt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),CQ=xe("$ZodNonOptional",(e,t)=>{On.init(e,t),Dt(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(o=>fR(o,e)):fR(a,e)}});function fR(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const RQ=xe("$ZodCatch",(e,t)=>{On.init(e,t),e._zod.optin="optional",Dt(e._zod,"optout",()=>t.innerType._zod.optout),Dt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(l=>xs(l,r,bs()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(o=>xs(o,r,bs()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),NQ=xe("$ZodPipe",(e,t)=>{On.init(e,t),Dt(e._zod,"values",()=>t.in._zod.values),Dt(e._zod,"optin",()=>t.in._zod.optin),Dt(e._zod,"optout",()=>t.out._zod.optout),Dt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const o=t.out._zod.run(n,r);return o instanceof Promise?o.then(l=>qh(l,t.in,r)):qh(o,t.in,r)}const a=t.in._zod.run(n,r);return a instanceof Promise?a.then(o=>qh(o,t.out,r)):qh(a,t.out,r)}});function qh(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const MQ=xe("$ZodReadonly",(e,t)=>{On.init(e,t),Dt(e._zod,"propValues",()=>t.innerType._zod.propValues),Dt(e._zod,"values",()=>t.innerType._zod.values),Dt(e._zod,"optin",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),Dt(e._zod,"optout",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optout}),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(dR):dR(a)}});function dR(e){return e.value=Object.freeze(e.value),e}const PQ=xe("$ZodCustom",(e,t)=>{Xa.init(e,t),On.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,a=t.fn(r);if(a instanceof Promise)return a.then(o=>hR(o,n,r,e));hR(a,n,r,e)}});function hR(e,t,n,r){if(!e){const a={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(a.params=r._zod.def.params),t.issues.push(uf(a))}}var pR;class DQ{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const a={...r,...this._map.get(t)};return Object.keys(a).length?a:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function kQ(){return new DQ}(pR=globalThis).__zod_globalRegistry??(pR.__zod_globalRegistry=kQ());const qc=globalThis.__zod_globalRegistry;function $Q(e,t){return new e({type:"string",...Ze(t)})}function zQ(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ze(t)})}function mR(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ze(t)})}function LQ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ze(t)})}function IQ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ze(t)})}function BQ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ze(t)})}function UQ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ze(t)})}function qQ(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ze(t)})}function HQ(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ze(t)})}function FQ(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ze(t)})}function VQ(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ze(t)})}function GQ(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ze(t)})}function WQ(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ze(t)})}function ZQ(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ze(t)})}function YQ(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ze(t)})}function KQ(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ze(t)})}function XQ(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ze(t)})}function QQ(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ze(t)})}function JQ(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ze(t)})}function eJ(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ze(t)})}function tJ(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ze(t)})}function nJ(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ze(t)})}function rJ(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ze(t)})}function aJ(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ze(t)})}function iJ(e,t){return new e({type:"string",format:"date",check:"string_format",...Ze(t)})}function oJ(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ze(t)})}function sJ(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ze(t)})}function lJ(e){return new e({type:"unknown"})}function uJ(e,t){return new e({type:"never",...Ze(t)})}function e3(e,t){return new PX({check:"max_length",...Ze(t),maximum:e})}function Mp(e,t){return new DX({check:"min_length",...Ze(t),minimum:e})}function t3(e,t){return new kX({check:"length_equals",...Ze(t),length:e})}function cJ(e,t){return new $X({check:"string_format",format:"regex",...Ze(t),pattern:e})}function fJ(e){return new zX({check:"string_format",format:"lowercase",...Ze(e)})}function dJ(e){return new LX({check:"string_format",format:"uppercase",...Ze(e)})}function hJ(e,t){return new IX({check:"string_format",format:"includes",...Ze(t),includes:e})}function pJ(e,t){return new BX({check:"string_format",format:"starts_with",...Ze(t),prefix:e})}function mJ(e,t){return new UX({check:"string_format",format:"ends_with",...Ze(t),suffix:e})}function Au(e){return new qX({check:"overwrite",tx:e})}function vJ(e){return Au(t=>t.normalize(e))}function gJ(){return Au(e=>e.trim())}function yJ(){return Au(e=>e.toLowerCase())}function bJ(){return Au(e=>e.toUpperCase())}function xJ(){return Au(e=>zK(e))}function wJ(e,t,n){return new e({type:"array",element:t,...Ze(n)})}function SJ(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Ze(n)})}function _J(e,t){const n=AJ(r=>(r.addIssue=a=>{if(typeof a=="string")r.issues.push(uf(a,r.value,n._zod.def));else{const o=a;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),r.issues.push(uf(o))}},e(r.value,r)),t);return n}function AJ(e,t){const n=new Xa({check:"custom",...Ze(t)});return n._zod.check=e,n}function n3(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??qc,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function qn(e,t,n={path:[],schemaPath:[]}){var m,p;var r;const a=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const u=(p=(m=e._zod).toJSONSchema)==null?void 0:p.call(m);if(u)l.schema=u;else{const g={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,g);else{const A=l.schema,S=t.processors[a.type];if(!S)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${a.type}`);S(e,t,A,g)}const x=e._zod.parent;x&&(l.ref||(l.ref=x),qn(x,t,g),t.seen.get(x).isParent=!0)}const f=t.metadataRegistry.get(e);return f&&Object.assign(l.schema,f),t.io==="input"&&tr(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&"_prefault"in l.schema&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function r3(e,t){var l,u,f,d;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const m of e.seen.entries()){const p=(l=e.metadataRegistry.get(m[0]))==null?void 0:l.id;if(p){const g=r.get(p);if(g&&g!==m[0])throw new Error(`Duplicate schema id "${p}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(p,m[0])}}const a=m=>{var S;const p=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const w=(S=e.external.registry.get(m[0]))==null?void 0:S.id,O=e.external.uri??(T=>T);if(w)return{ref:O(w)};const E=m[1].defId??m[1].schema.id??`schema${e.counter++}`;return m[1].defId=E,{defId:E,ref:`${O("__shared")}#/${p}/${E}`}}if(m[1]===n)return{ref:"#"};const x=`#/${p}/`,A=m[1].schema.id??`__schema${e.counter++}`;return{defId:A,ref:x+A}},o=m=>{if(m[1].schema.$ref)return;const p=m[1],{ref:g,defId:x}=a(m);p.def={...p.schema},x&&(p.defId=x);const A=p.schema;for(const S in A)delete A[S];A.$ref=g};if(e.cycles==="throw")for(const m of e.seen.entries()){const p=m[1];if(p.cycle)throw new Error(`Cycle detected: #/${(u=p.cycle)==null?void 0:u.join("/")}/<root>
406
-
407
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const m of e.seen.entries()){const p=m[1];if(t===m[0]){o(m);continue}if(e.external){const x=(f=e.external.registry.get(m[0]))==null?void 0:f.id;if(t!==m[0]&&x){o(m);continue}}if((d=e.metadataRegistry.get(m[0]))==null?void 0:d.id){o(m);continue}if(p.cycle){o(m);continue}if(p.count>1&&e.reused==="ref"){o(m);continue}}}function a3(e,t){var u,f,d,m;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=p=>{const g=e.seen.get(p);if(g.ref===null)return;const x=g.def??g.schema,A={...x},S=g.ref;if(g.ref=null,S){r(S);const O=e.seen.get(S),E=O.schema;if(E.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(x.allOf=x.allOf??[],x.allOf.push(E)):Object.assign(x,E),Object.assign(x,A),p._zod.parent===S)for(const C in x)C==="$ref"||C==="allOf"||C in A||delete x[C];if(E.$ref&&O.def)for(const C in x)C==="$ref"||C==="allOf"||C in O.def&&JSON.stringify(x[C])===JSON.stringify(O.def[C])&&delete x[C]}const w=p._zod.parent;if(w&&w!==S){r(w);const O=e.seen.get(w);if(O!=null&&O.schema.$ref&&(x.$ref=O.schema.$ref,O.def))for(const E in x)E==="$ref"||E==="allOf"||E in O.def&&JSON.stringify(x[E])===JSON.stringify(O.def[E])&&delete x[E]}e.override({zodSchema:p,jsonSchema:x,path:g.path??[]})};for(const p of[...e.seen.entries()].reverse())r(p[0]);const a={};if(e.target==="draft-2020-12"?a.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?a.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?a.$schema="http://json-schema.org/draft-04/schema#":e.target,(u=e.external)!=null&&u.uri){const p=(f=e.external.registry.get(t))==null?void 0:f.id;if(!p)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(p)}Object.assign(a,n.def??n.schema);const o=(d=e.metadataRegistry.get(t))==null?void 0:d.id;o!==void 0&&a.id===o&&delete a.id;const l=((m=e.external)==null?void 0:m.defs)??{};for(const p of e.seen.entries()){const g=p[1];g.def&&g.defId&&(g.def.id===g.defId&&delete g.def.id,l[g.defId]=g.def)}e.external||Object.keys(l).length>0&&(e.target==="draft-2020-12"?a.$defs=l:a.definitions=l);try{const p=JSON.parse(JSON.stringify(a));return Object.defineProperty(p,"~standard",{value:{...t["~standard"],jsonSchema:{input:Pp(t,"input",e.processors),output:Pp(t,"output",e.processors)}},enumerable:!1,writable:!1}),p}catch{throw new Error("Error converting schema to JSON.")}}function tr(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return tr(r.element,n);if(r.type==="set")return tr(r.valueType,n);if(r.type==="lazy")return tr(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return tr(r.innerType,n);if(r.type==="intersection")return tr(r.left,n)||tr(r.right,n);if(r.type==="record"||r.type==="map")return tr(r.keyType,n)||tr(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:tr(r.in,n)||tr(r.out,n);if(r.type==="object"){for(const a in r.shape)if(tr(r.shape[a],n))return!0;return!1}if(r.type==="union"){for(const a of r.options)if(tr(a,n))return!0;return!1}if(r.type==="tuple"){for(const a of r.items)if(tr(a,n))return!0;return!!(r.rest&&tr(r.rest,n))}return!1}const OJ=(e,t={})=>n=>{const r=n3({...n,processors:t});return qn(e,r),r3(r,e),a3(r,e)},Pp=(e,t,n={})=>r=>{const{libraryOptions:a,target:o}=r??{},l=n3({...a??{},target:o,io:t,processors:n});return qn(e,l),r3(l,e),a3(l,e)},EJ={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},jJ=(e,t,n,r)=>{const a=n;a.type="string";const{minimum:o,maximum:l,format:u,patterns:f,contentEncoding:d}=e._zod.bag;if(typeof o=="number"&&(a.minLength=o),typeof l=="number"&&(a.maxLength=l),u&&(a.format=EJ[u]??u,a.format===""&&delete a.format,u==="time"&&delete a.format),d&&(a.contentEncoding=d),f&&f.size>0){const m=[...f];m.length===1?a.pattern=m[0].source:m.length>1&&(a.allOf=[...m.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},TJ=(e,t,n,r)=>{n.not={}},CJ=(e,t,n,r)=>{},RJ=(e,t,n,r)=>{const a=e._zod.def,o=qI(a.entries);o.every(l=>typeof l=="number")&&(n.type="number"),o.every(l=>typeof l=="string")&&(n.type="string"),n.enum=o},NJ=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},MJ=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},PJ=(e,t,n,r)=>{const a=n,o=e._zod.def,{minimum:l,maximum:u}=e._zod.bag;typeof l=="number"&&(a.minItems=l),typeof u=="number"&&(a.maxItems=u),a.type="array",a.items=qn(o.element,t,{...r,path:[...r.path,"items"]})},DJ=(e,t,n,r)=>{var d;const a=n,o=e._zod.def;a.type="object",a.properties={};const l=o.shape;for(const m in l)a.properties[m]=qn(l[m],t,{...r,path:[...r.path,"properties",m]});const u=new Set(Object.keys(l)),f=new Set([...u].filter(m=>{const p=o.shape[m]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));f.size>0&&(a.required=Array.from(f)),((d=o.catchall)==null?void 0:d._zod.def.type)==="never"?a.additionalProperties=!1:o.catchall?o.catchall&&(a.additionalProperties=qn(o.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},kJ=(e,t,n,r)=>{const a=e._zod.def,o=a.inclusive===!1,l=a.options.map((u,f)=>qn(u,t,{...r,path:[...r.path,o?"oneOf":"anyOf",f]}));o?n.oneOf=l:n.anyOf=l},$J=(e,t,n,r)=>{const a=e._zod.def,o=qn(a.left,t,{...r,path:[...r.path,"allOf",0]}),l=qn(a.right,t,{...r,path:[...r.path,"allOf",1]}),u=d=>"allOf"in d&&Object.keys(d).length===1,f=[...u(o)?o.allOf:[o],...u(l)?l.allOf:[l]];n.allOf=f},zJ=(e,t,n,r)=>{const a=e._zod.def,o=qn(a.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=a.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},LJ=(e,t,n,r)=>{const a=e._zod.def;qn(a.innerType,t,r);const o=t.seen.get(e);o.ref=a.innerType},IJ=(e,t,n,r)=>{const a=e._zod.def;qn(a.innerType,t,r);const o=t.seen.get(e);o.ref=a.innerType,n.default=JSON.parse(JSON.stringify(a.defaultValue))},BJ=(e,t,n,r)=>{const a=e._zod.def;qn(a.innerType,t,r);const o=t.seen.get(e);o.ref=a.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(a.defaultValue)))},UJ=(e,t,n,r)=>{const a=e._zod.def;qn(a.innerType,t,r);const o=t.seen.get(e);o.ref=a.innerType;let l;try{l=a.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},qJ=(e,t,n,r)=>{const a=e._zod.def,o=a.in._zod.traits.has("$ZodTransform"),l=t.io==="input"?o?a.out:a.in:a.out;qn(l,t,r);const u=t.seen.get(e);u.ref=l},HJ=(e,t,n,r)=>{const a=e._zod.def;qn(a.innerType,t,r);const o=t.seen.get(e);o.ref=a.innerType,n.readOnly=!0},i3=(e,t,n,r)=>{const a=e._zod.def;qn(a.innerType,t,r);const o=t.seen.get(e);o.ref=a.innerType};function vR(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function FJ(e,t){for(var n={};e.length;){var r=e[0],a=r.code,o=r.message,l=r.path.join(".");if(!n[l])if("unionErrors"in r){var u=r.unionErrors[0].errors[0];n[l]={message:u.message,type:u.code}}else n[l]={message:o,type:a};if("unionErrors"in r&&r.unionErrors.forEach(function(m){return m.errors.forEach(function(p){return e.push(p)})}),t){var f=n[l].types,d=f&&f[r.code];n[l]=RA(l,t,n,a,d?[].concat(d,r.message):r.message)}e.shift()}return n}function VJ(e,t){for(var n={};e.length;){var r=e[0],a=r.code,o=r.message,l=r.path.join(".");if(!n[l])if(r.code==="invalid_union"&&r.errors.length>0){var u=r.errors[0][0];n[l]={message:u.message,type:u.code}}else n[l]={message:o,type:a};if(r.code==="invalid_union"&&r.errors.forEach(function(m){return m.forEach(function(p){return e.push(p)})}),t){var f=n[l].types,d=f&&f[r.code];n[l]=RA(l,t,n,a,d?[].concat(d,r.message):r.message)}e.shift()}return n}function bo(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,a,o){try{return Promise.resolve(vR(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return o.shouldUseNativeValidation&&nS({},o),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(u){return Array.isArray(u==null?void 0:u.issues)})(l))return{values:{},errors:eR(FJ(l.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw l}))}catch(l){return Promise.reject(l)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,a,o){try{return Promise.resolve(vR(function(){return Promise.resolve((n.mode==="sync"?XK:QK)(e,r,t)).then(function(l){return o.shouldUseNativeValidation&&nS({},o),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(u){return u instanceof LA})(l))return{values:{},errors:eR(VJ(l.issues,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw l}))}catch(l){return Promise.reject(l)}};throw new Error("Invalid input: not a Zod schema")}const GJ=xe("ZodISODateTime",(e,t)=>{nQ.init(e,t),en.init(e,t)});function WJ(e){return aJ(GJ,e)}const ZJ=xe("ZodISODate",(e,t)=>{rQ.init(e,t),en.init(e,t)});function YJ(e){return iJ(ZJ,e)}const KJ=xe("ZodISOTime",(e,t)=>{aQ.init(e,t),en.init(e,t)});function XJ(e){return oJ(KJ,e)}const QJ=xe("ZodISODuration",(e,t)=>{iQ.init(e,t),en.init(e,t)});function JJ(e){return sJ(QJ,e)}const eee=(e,t)=>{LA.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>KK(e,n)},flatten:{value:n=>YK(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,rS,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,rS,2)}},isEmpty:{get(){return e.issues.length===0}}})},ia=xe("ZodError",eee,{Parent:Error}),tee=lv(ia),nee=uv(ia),ree=cv(ia),aee=fv(ia),iee=tX(ia),oee=nX(ia),see=rX(ia),lee=aX(ia),uee=iX(ia),cee=oX(ia),fee=sX(ia),dee=lX(ia),gR=new WeakMap;function hv(e,t,n){const r=Object.getPrototypeOf(e);let a=gR.get(r);if(a||(a=new Set,gR.set(r,a)),!a.has(t)){a.add(t);for(const o in n){const l=n[o];Object.defineProperty(r,o,{configurable:!0,enumerable:!1,get(){const u=l.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:u}),u},set(u){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:u})}})}}}const En=xe("ZodType",(e,t)=>(On.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Pp(e,"input"),output:Pp(e,"output")}}),e.toJSONSchema=OJ(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>tee(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>ree(e,n,r),e.parseAsync=async(n,r)=>nee(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>aee(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>iee(e,n,r),e.decode=(n,r)=>oee(e,n,r),e.encodeAsync=async(n,r)=>see(e,n,r),e.decodeAsync=async(n,r)=>lee(e,n,r),e.safeEncode=(n,r)=>uee(e,n,r),e.safeDecode=(n,r)=>cee(e,n,r),e.safeEncodeAsync=async(n,r)=>fee(e,n,r),e.safeDecodeAsync=async(n,r)=>dee(e,n,r),hv(e,"ZodType",{check(...n){const r=this.def;return this.clone(To(r,{checks:[...r.checks??[],...n.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,r){return Co(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(rte(n,r))},superRefine(n,r){return this.check(ate(n,r))},overwrite(n){return this.check(Au(n))},optional(){return xR(this)},exactOptional(){return Vee(this)},nullable(){return wR(this)},nullish(){return xR(wR(this))},nonoptional(n){return Xee(this,n)},array(){return kee(this)},or(n){return Lee([this,n])},and(n){return Bee(this,n)},transform(n){return SR(this,Hee(n))},default(n){return Zee(this,n)},prefault(n){return Kee(this,n)},catch(n){return Jee(this,n)},pipe(n){return SR(this,n)},readonly(){return nte(this)},describe(n){const r=this.clone();return qc.add(r,{description:n}),r},meta(...n){if(n.length===0)return qc.get(this);const r=this.clone();return qc.add(r,n[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){var n;return(n=qc.get(e))==null?void 0:n.description},configurable:!0}),e)),o3=xe("_ZodString",(e,t)=>{IA.init(e,t),En.init(e,t),e._zod.processJSONSchema=(r,a,o)=>jJ(e,r,a);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,hv(e,"_ZodString",{regex(...r){return this.check(cJ(...r))},includes(...r){return this.check(hJ(...r))},startsWith(...r){return this.check(pJ(...r))},endsWith(...r){return this.check(mJ(...r))},min(...r){return this.check(Mp(...r))},max(...r){return this.check(e3(...r))},length(...r){return this.check(t3(...r))},nonempty(...r){return this.check(Mp(1,...r))},lowercase(r){return this.check(fJ(r))},uppercase(r){return this.check(dJ(r))},trim(){return this.check(gJ())},normalize(...r){return this.check(vJ(...r))},toLowerCase(){return this.check(yJ())},toUpperCase(){return this.check(bJ())},slugify(){return this.check(xJ())}})}),hee=xe("ZodString",(e,t)=>{IA.init(e,t),o3.init(e,t),e.email=n=>e.check(zQ(pee,n)),e.url=n=>e.check(qQ(mee,n)),e.jwt=n=>e.check(rJ(Ree,n)),e.emoji=n=>e.check(HQ(vee,n)),e.guid=n=>e.check(mR(yR,n)),e.uuid=n=>e.check(LQ(Hh,n)),e.uuidv4=n=>e.check(IQ(Hh,n)),e.uuidv6=n=>e.check(BQ(Hh,n)),e.uuidv7=n=>e.check(UQ(Hh,n)),e.nanoid=n=>e.check(FQ(gee,n)),e.guid=n=>e.check(mR(yR,n)),e.cuid=n=>e.check(VQ(yee,n)),e.cuid2=n=>e.check(GQ(bee,n)),e.ulid=n=>e.check(WQ(xee,n)),e.base64=n=>e.check(eJ(jee,n)),e.base64url=n=>e.check(tJ(Tee,n)),e.xid=n=>e.check(ZQ(wee,n)),e.ksuid=n=>e.check(YQ(See,n)),e.ipv4=n=>e.check(KQ(_ee,n)),e.ipv6=n=>e.check(XQ(Aee,n)),e.cidrv4=n=>e.check(QQ(Oee,n)),e.cidrv6=n=>e.check(JQ(Eee,n)),e.e164=n=>e.check(nJ(Cee,n)),e.datetime=n=>e.check(WJ(n)),e.date=n=>e.check(YJ(n)),e.time=n=>e.check(XJ(n)),e.duration=n=>e.check(JJ(n))});function Qn(e){return $Q(hee,e)}const en=xe("ZodStringFormat",(e,t)=>{Qt.init(e,t),o3.init(e,t)}),pee=xe("ZodEmail",(e,t)=>{WX.init(e,t),en.init(e,t)}),yR=xe("ZodGUID",(e,t)=>{VX.init(e,t),en.init(e,t)}),Hh=xe("ZodUUID",(e,t)=>{GX.init(e,t),en.init(e,t)}),mee=xe("ZodURL",(e,t)=>{ZX.init(e,t),en.init(e,t)}),vee=xe("ZodEmoji",(e,t)=>{YX.init(e,t),en.init(e,t)}),gee=xe("ZodNanoID",(e,t)=>{KX.init(e,t),en.init(e,t)}),yee=xe("ZodCUID",(e,t)=>{XX.init(e,t),en.init(e,t)}),bee=xe("ZodCUID2",(e,t)=>{QX.init(e,t),en.init(e,t)}),xee=xe("ZodULID",(e,t)=>{JX.init(e,t),en.init(e,t)}),wee=xe("ZodXID",(e,t)=>{eQ.init(e,t),en.init(e,t)}),See=xe("ZodKSUID",(e,t)=>{tQ.init(e,t),en.init(e,t)}),_ee=xe("ZodIPv4",(e,t)=>{oQ.init(e,t),en.init(e,t)}),Aee=xe("ZodIPv6",(e,t)=>{sQ.init(e,t),en.init(e,t)}),Oee=xe("ZodCIDRv4",(e,t)=>{lQ.init(e,t),en.init(e,t)}),Eee=xe("ZodCIDRv6",(e,t)=>{uQ.init(e,t),en.init(e,t)}),jee=xe("ZodBase64",(e,t)=>{cQ.init(e,t),en.init(e,t)}),Tee=xe("ZodBase64URL",(e,t)=>{dQ.init(e,t),en.init(e,t)}),Cee=xe("ZodE164",(e,t)=>{hQ.init(e,t),en.init(e,t)}),Ree=xe("ZodJWT",(e,t)=>{mQ.init(e,t),en.init(e,t)}),Nee=xe("ZodUnknown",(e,t)=>{vQ.init(e,t),En.init(e,t),e._zod.processJSONSchema=(n,r,a)=>CJ()});function bR(){return lJ(Nee)}const Mee=xe("ZodNever",(e,t)=>{gQ.init(e,t),En.init(e,t),e._zod.processJSONSchema=(n,r,a)=>TJ(e,n,r)});function Pee(e){return uJ(Mee,e)}const Dee=xe("ZodArray",(e,t)=>{yQ.init(e,t),En.init(e,t),e._zod.processJSONSchema=(n,r,a)=>PJ(e,n,r,a),e.element=t.element,hv(e,"ZodArray",{min(n,r){return this.check(Mp(n,r))},nonempty(n){return this.check(Mp(1,n))},max(n,r){return this.check(e3(n,r))},length(n,r){return this.check(t3(n,r))},unwrap(){return this.element}})});function kee(e,t){return wJ(Dee,e,t)}const $ee=xe("ZodObject",(e,t)=>{xQ.init(e,t),En.init(e,t),e._zod.processJSONSchema=(n,r,a)=>DJ(e,n,r,a),Dt(e,"shape",()=>t.shape),hv(e,"ZodObject",{keyof(){return Uee(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:bR()})},loose(){return this.clone({...this._zod.def,catchall:bR()})},strict(){return this.clone({...this._zod.def,catchall:Pee()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return HK(this,n)},safeExtend(n){return FK(this,n)},merge(n){return VK(this,n)},pick(n){return UK(this,n)},omit(n){return qK(this,n)},partial(...n){return GK(s3,this,n[0])},required(...n){return WK(l3,this,n[0])}})});function Ro(e,t){const n={type:"object",shape:e??{},...Ze(t)};return new $ee(n)}const zee=xe("ZodUnion",(e,t)=>{wQ.init(e,t),En.init(e,t),e._zod.processJSONSchema=(n,r,a)=>kJ(e,n,r,a),e.options=t.options});function Lee(e,t){return new zee({type:"union",options:e,...Ze(t)})}const Iee=xe("ZodIntersection",(e,t)=>{SQ.init(e,t),En.init(e,t),e._zod.processJSONSchema=(n,r,a)=>$J(e,n,r,a)});function Bee(e,t){return new Iee({type:"intersection",left:e,right:t})}const iS=xe("ZodEnum",(e,t)=>{_Q.init(e,t),En.init(e,t),e._zod.processJSONSchema=(r,a,o)=>RJ(e,r,a),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,a)=>{const o={};for(const l of r)if(n.has(l))o[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new iS({...t,checks:[],...Ze(a),entries:o})},e.exclude=(r,a)=>{const o={...t.entries};for(const l of r)if(n.has(l))delete o[l];else throw new Error(`Key ${l} not found in enum`);return new iS({...t,checks:[],...Ze(a),entries:o})}});function Uee(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new iS({type:"enum",entries:n,...Ze(t)})}const qee=xe("ZodTransform",(e,t)=>{AQ.init(e,t),En.init(e,t),e._zod.processJSONSchema=(n,r,a)=>MJ(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new UI(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(uf(o,n.value,t));else{const l=o;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(uf(l))}};const a=t.transform(n.value,n);return a instanceof Promise?a.then(o=>(n.value=o,n.fallback=!0,n)):(n.value=a,n.fallback=!0,n)}});function Hee(e){return new qee({type:"transform",transform:e})}const s3=xe("ZodOptional",(e,t)=>{JI.init(e,t),En.init(e,t),e._zod.processJSONSchema=(n,r,a)=>i3(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function xR(e){return new s3({type:"optional",innerType:e})}const Fee=xe("ZodExactOptional",(e,t)=>{OQ.init(e,t),En.init(e,t),e._zod.processJSONSchema=(n,r,a)=>i3(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function Vee(e){return new Fee({type:"optional",innerType:e})}const Gee=xe("ZodNullable",(e,t)=>{EQ.init(e,t),En.init(e,t),e._zod.processJSONSchema=(n,r,a)=>zJ(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function wR(e){return new Gee({type:"nullable",innerType:e})}const Wee=xe("ZodDefault",(e,t)=>{jQ.init(e,t),En.init(e,t),e._zod.processJSONSchema=(n,r,a)=>IJ(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Zee(e,t){return new Wee({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():FI(t)}})}const Yee=xe("ZodPrefault",(e,t)=>{TQ.init(e,t),En.init(e,t),e._zod.processJSONSchema=(n,r,a)=>BJ(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function Kee(e,t){return new Yee({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():FI(t)}})}const l3=xe("ZodNonOptional",(e,t)=>{CQ.init(e,t),En.init(e,t),e._zod.processJSONSchema=(n,r,a)=>LJ(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function Xee(e,t){return new l3({type:"nonoptional",innerType:e,...Ze(t)})}const Qee=xe("ZodCatch",(e,t)=>{RQ.init(e,t),En.init(e,t),e._zod.processJSONSchema=(n,r,a)=>UJ(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Jee(e,t){return new Qee({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const ete=xe("ZodPipe",(e,t)=>{NQ.init(e,t),En.init(e,t),e._zod.processJSONSchema=(n,r,a)=>qJ(e,n,r,a),e.in=t.in,e.out=t.out});function SR(e,t){return new ete({type:"pipe",in:e,out:t})}const tte=xe("ZodReadonly",(e,t)=>{MQ.init(e,t),En.init(e,t),e._zod.processJSONSchema=(n,r,a)=>HJ(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function nte(e){return new tte({type:"readonly",innerType:e})}const u3=xe("ZodCustom",(e,t)=>{PQ.init(e,t),En.init(e,t),e._zod.processJSONSchema=(n,r,a)=>NJ(e,n)});function rte(e,t={}){return SJ(u3,e,t)}function ate(e,t){return _J(e,t)}function BA(e,t={}){const n=new u3({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Ze(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}var ite="Label",c3=y.forwardRef((e,t)=>v.jsx(Kz.label,{...e,ref:t,onMouseDown:n=>{var a;n.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));c3.displayName=ite;var f3=c3;const ote=bu("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Bt=y.forwardRef(({className:e,...t},n)=>v.jsx(f3,{ref:n,className:ye(ote(),e),...t}));Bt.displayName=f3.displayName;const ste=bu("rounded-lg bg-card text-card-foreground",{variants:{level:{0:"",1:"shadow-card-1",2:"shadow-card-2",3:"shadow-card-3",4:"shadow-card-4"}},defaultVariants:{level:2}}),Kr=y.forwardRef(({className:e,level:t,...n},r)=>v.jsx("div",{ref:r,className:ye(ste({level:t}),e),...n}));Kr.displayName="Card";const Xr=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:ye("flex flex-col space-y-1.5 p-6",e),...t}));Xr.displayName="CardHeader";const Qr=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:ye("text-2xl font-semibold leading-none tracking-tight",e),...t}));Qr.displayName="CardTitle";const ws=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:ye("text-sm text-muted-foreground",e),...t}));ws.displayName="CardDescription";const Ba=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:ye("p-6 pt-0",e),...t}));Ba.displayName="CardContent";const lte=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:ye("flex items-center p-6 pt-0",e),...t}));lte.displayName="CardFooter";const ute=Ro({email:Qn().email(),password:Qn().min(8)});function cte(){const e=Ya(),{resolvedTheme:t}=zm(),n=t==="dark"?"/logo-dark.svg":"/logo.svg",{register:r,handleSubmit:a,setError:o,formState:{errors:l,isSubmitting:u}}=yo({resolver:bo(ute),mode:"onBlur"});async function f(d){try{const{status:m}=await OI.post("/api/v1/auth/login",{email:d.email,password:d.password});if(m!==200){o("root",{message:"Invalid email or password"});return}e("/app-center",{replace:!0})}catch{o("root",{message:"Network error. Please try again."})}}return v.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:v.jsxs("div",{className:"flex flex-col items-center gap-6 w-full max-w-sm",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("img",{src:n,alt:"tapflow",className:"w-6 h-6"}),v.jsx("span",{className:"text-base font-semibold tracking-tight",children:"tapflow"})]}),v.jsxs(Kr,{level:4,className:"w-full",children:[v.jsxs(Xr,{className:"text-center",children:[v.jsx(Qr,{className:"text-2xl tracking-display-md",children:"Welcome back"}),v.jsx(ws,{children:"Sign in to your team workspace"})]}),v.jsx(Ba,{children:v.jsxs("form",{onSubmit:a(f),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Bt,{htmlFor:"email",children:"Email"}),v.jsx(cn,{id:"email",type:"email",placeholder:"you@company.com",autoComplete:"email",...r("email")}),l.email&&v.jsx("p",{className:"text-sm text-destructive",children:l.email.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Bt,{htmlFor:"password",children:"Password"}),v.jsx(cn,{id:"password",type:"password",autoComplete:"current-password",...r("password")}),l.password&&v.jsx("p",{className:"text-sm text-destructive",children:l.password.message})]}),l.root&&v.jsx("p",{className:"text-sm text-destructive",children:l.root.message}),v.jsx(ct,{type:"submit",size:"pill",disabled:u,className:"w-full mt-1",children:u?"Signing in…":"Sign in"}),v.jsxs("p",{className:"text-center text-sm text-muted-foreground",children:["First time here?"," ",v.jsx("a",{href:"https://www.tapflow.dev/dashboard/setup.html",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-4 hover:text-foreground transition-colors",children:"Set up your workspace"})]})]})})]})]})})}const fte=Ro({displayName:Qn().optional(),avatar:BA(File).nullable().optional(),password:Qn().min(8),confirm:Qn()}).refine(e=>e.password===e.confirm,{message:"Passwords do not match",path:["confirm"]});function dte(){const e=Ya(),[t]=Um(),n=t.get("token")??"",[r,a]=y.useState("loading"),[o,l]=y.useState(""),[u,f]=y.useState(null),d=y.useRef(null),{register:m,handleSubmit:p,control:g,setError:x,formState:{errors:A,isSubmitting:S}}=yo({resolver:bo(fte),mode:"onBlur",defaultValues:{displayName:"",avatar:null}}),w=CA({control:g,name:"displayName"})??"";y.useEffect(()=>{if(!n){a("invalid");return}fetch(`/api/v1/invitations/verify?token=${n}`).then(E=>E.ok?E.json():Promise.reject()).then(E=>{l(E.role),a("valid")}).catch(()=>a("invalid"))},[n]);async function O(E){var T;try{const C=new FormData;if(C.append("token",n),C.append("password",E.password),(T=E.displayName)!=null&&T.trim()&&C.append("display_name",E.displayName.trim()),E.avatar&&C.append("avatar",E.avatar),!(await fetch("/api/v1/invitations/accept",{method:"POST",body:C})).ok){x("root",{message:"Failed to accept invitation"});return}e("/app-center",{replace:!0})}catch{x("root",{message:"Network error. Please try again."})}}return r==="loading"?v.jsx("div",{className:"flex min-h-svh items-center justify-center"}):r==="invalid"?v.jsx("div",{className:"bg-mesh-gradient flex min-h-svh items-center justify-center overflow-hidden p-4",children:v.jsx(Kr,{level:4,className:"w-full max-w-sm text-center",children:v.jsxs(Xr,{children:[v.jsx(Qr,{children:"Invitation expired"}),v.jsx(ws,{children:"This invite link is invalid or has expired. Ask your admin for a new one."})]})})}):v.jsx("div",{className:"bg-mesh-gradient flex min-h-svh items-center justify-center overflow-hidden p-4",children:v.jsxs(Kr,{level:4,className:"w-full max-w-sm",children:[v.jsxs(Xr,{className:"text-center",children:[v.jsx(Qr,{children:"Set up your account"}),v.jsxs(ws,{children:["You're joining as ",v.jsx("strong",{children:o})]})]}),v.jsx(Ba,{children:v.jsxs("form",{onSubmit:p(O),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsxs(Bt,{htmlFor:"display-name",children:["Nickname ",v.jsx("span",{className:"text-muted-foreground text-xs",children:"(optional)"})]}),v.jsx(cn,{id:"display-name",placeholder:"Your name",...m("displayName")})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsxs(Bt,{children:["Avatar ",v.jsx("span",{className:"text-muted-foreground text-xs",children:"(optional, png · jpg, max 2MB)"})]}),v.jsx(jp,{name:"avatar",control:g,render:({field:E})=>{var T;return v.jsxs("div",{className:"relative w-14 h-14",children:[u?v.jsx("img",{src:u,alt:"avatar",className:"w-14 h-14 rounded-full object-cover border"}):v.jsx("div",{className:"w-14 h-14 rounded-full flex items-center justify-center text-lg font-medium",style:(()=>{const C=SA(w);return{backgroundColor:C.bg,color:C.fg}})(),children:((T=w==null?void 0:w[0])==null?void 0:T.toUpperCase())??"?"}),v.jsx("button",{type:"button",onClick:()=>{var C;return(C=d.current)==null?void 0:C.click()},className:"absolute bottom-0 right-0 w-6 h-6 rounded-full bg-background border border-border shadow-sm flex items-center justify-center hover:bg-accent transition-colors",children:v.jsx(L1,{className:"w-3 h-3"})}),v.jsx("input",{ref:d,type:"file",accept:"image/png,image/jpeg",className:"hidden",onChange:C=>{var R;const j=(R=C.target.files)==null?void 0:R[0];if(j){if(j.size>2*1024*1024){x("avatar",{message:"Max 2MB for avatar"});return}E.onChange(j),f(URL.createObjectURL(j))}}})]})}}),A.avatar&&v.jsx("p",{className:"text-sm text-destructive",children:A.avatar.message})]}),v.jsx(So,{}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Bt,{htmlFor:"password",children:"Password"}),v.jsx(cn,{id:"password",type:"password",...m("password")}),A.password&&v.jsx("p",{className:"text-sm text-destructive",children:A.password.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Bt,{htmlFor:"confirm",children:"Confirm password"}),v.jsx(cn,{id:"confirm",type:"password",...m("confirm")}),A.confirm&&v.jsx("p",{className:"text-sm text-destructive",children:A.confirm.message})]}),A.root&&v.jsx("p",{className:"text-sm text-destructive",children:A.root.message}),v.jsx(ct,{type:"submit",disabled:S,className:"w-full",children:S?"Creating account…":"Create account"})]})})]})})}const hte=Ro({password:Qn().min(8),confirm:Qn()}).refine(e=>e.password===e.confirm,{message:"Passwords do not match",path:["confirm"]});function pte(){const e=Ya(),[t]=Um(),n=t.get("token")??"",[r,a]=y.useState("loading"),{register:o,handleSubmit:l,setError:u,formState:{errors:f,isSubmitting:d}}=yo({resolver:bo(hte),mode:"onBlur"});y.useEffect(()=>{if(!n){a("invalid");return}fetch(`/api/v1/auth/reset-password/verify?token=${n}`).then(p=>p.ok?a("valid"):Promise.reject()).catch(()=>a("invalid"))},[n]);async function m(p){try{const g=await fetch("/api/v1/auth/reset-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:n,password:p.password})});if(!g.ok){const x=await g.json();u("root",{message:x.error??"Failed to reset password"});return}e("/login",{replace:!0})}catch{u("root",{message:"Network error. Please try again."})}}return r==="loading"?v.jsx("div",{className:"flex min-h-svh items-center justify-center"}):r==="invalid"?v.jsx("div",{className:"bg-mesh-gradient flex min-h-svh items-center justify-center overflow-hidden p-4",children:v.jsx(Kr,{level:4,className:"w-full max-w-sm text-center",children:v.jsxs(Xr,{children:[v.jsx(Qr,{children:"Link expired"}),v.jsx(ws,{children:"This password reset link is invalid or has expired. Ask your admin to send a new one."})]})})}):v.jsx("div",{className:"bg-mesh-gradient flex min-h-svh items-center justify-center overflow-hidden p-4",children:v.jsxs(Kr,{level:4,className:"w-full max-w-sm",children:[v.jsxs(Xr,{className:"text-center",children:[v.jsx(Qr,{children:"Reset password"}),v.jsx(ws,{children:"Enter your new password below."})]}),v.jsx(Ba,{children:v.jsxs("form",{onSubmit:l(m),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Bt,{htmlFor:"password",children:"New password"}),v.jsx(cn,{id:"password",type:"password",...o("password")}),f.password&&v.jsx("p",{className:"text-sm text-destructive",children:f.password.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Bt,{htmlFor:"confirm",children:"Confirm password"}),v.jsx(cn,{id:"confirm",type:"password",...o("confirm")}),f.confirm&&v.jsx("p",{className:"text-sm text-destructive",children:f.confirm.message})]}),f.root&&v.jsx("p",{className:"text-sm text-destructive",children:f.root.message}),v.jsx(ct,{type:"submit",disabled:d,className:"w-full",children:d?"Saving…":"Set new password"})]})})]})})}function d3({value:e,onChange:t,placeholder:n,className:r}){return v.jsxs("div",{className:"relative",children:[v.jsx(vV,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"}),v.jsx(cn,{placeholder:n,value:e,onChange:a=>t(a.target.value),className:`h-8 pl-8 ${r??"w-48"}`})]})}function oS(e,[t,n]){return Math.min(n,Math.max(t,e))}function h3(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var mte=[" ","Enter","ArrowUp","ArrowDown"],vte=[" ","Enter"],Ss="Select",[pv,mv,gte]=hA(Ss),[Ou]=aa(Ss,[gte,_u]),vv=_u(),[yte,No]=Ou(Ss),[bte,xte]=Ou(Ss),p3=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:l,defaultValue:u,onValueChange:f,dir:d,name:m,autoComplete:p,disabled:g,required:x,form:A}=e,S=vv(t),[w,O]=y.useState(null),[E,T]=y.useState(null),[C,j]=y.useState(!1),R=ad(d),[N,k]=_o({prop:r,defaultProp:a??!1,onChange:o,caller:Ss}),[$,V]=_o({prop:l,defaultProp:u,onChange:f,caller:Ss}),I=y.useRef(null),L=w?A||!!w.closest("form"):!0,[H,W]=y.useState(new Set),Z=Array.from(H).map(z=>z.props.value).join(";");return v.jsx(oA,{...S,children:v.jsxs(yte,{required:x,scope:t,trigger:w,onTriggerChange:O,valueNode:E,onValueNodeChange:T,valueNodeHasChildren:C,onValueNodeHasChildrenChange:j,contentId:_a(),value:$,onValueChange:V,open:N,onOpenChange:k,dir:R,triggerPointerDownPosRef:I,disabled:g,children:[v.jsx(pv.Provider,{scope:t,children:v.jsx(bte,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(z=>{W(F=>new Set(F).add(z))},[]),onNativeOptionRemove:y.useCallback(z=>{W(F=>{const Y=new Set(F);return Y.delete(z),Y})},[]),children:n})}),L?v.jsxs(L3,{"aria-hidden":!0,required:x,tabIndex:-1,name:m,autoComplete:p,value:$,onChange:z=>V(z.target.value),disabled:g,form:A,children:[$===void 0?v.jsx("option",{value:""}):null,Array.from(H)]},Z):null]})})};p3.displayName=Ss;var m3="SelectTrigger",v3=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,o=vv(n),l=No(m3,n),u=l.disabled||r,f=ot(t,l.onTriggerChange),d=mv(n),m=y.useRef("touch"),[p,g,x]=B3(S=>{const w=d().filter(T=>!T.disabled),O=w.find(T=>T.value===l.value),E=U3(w,S,O);E!==void 0&&l.onValueChange(E.value)}),A=S=>{u||(l.onOpenChange(!0),x()),S&&(l.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return v.jsx(sA,{asChild:!0,...o,children:v.jsx(Ye.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":I3(l.value)?"":void 0,...a,ref:f,onClick:De(a.onClick,S=>{S.currentTarget.focus(),m.current!=="mouse"&&A(S)}),onPointerDown:De(a.onPointerDown,S=>{m.current=S.pointerType;const w=S.target;w.hasPointerCapture(S.pointerId)&&w.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(A(S),S.preventDefault())}),onKeyDown:De(a.onKeyDown,S=>{const w=p.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&g(S.key),!(w&&S.key===" ")&&mte.includes(S.key)&&(A(),S.preventDefault())})})})});v3.displayName=m3;var g3="SelectValue",y3=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:o,placeholder:l="",...u}=e,f=No(g3,n),{onValueNodeHasChildrenChange:d}=f,m=o!==void 0,p=ot(t,f.onValueNodeChange);return Un(()=>{d(m)},[d,m]),v.jsx(Ye.span,{...u,ref:p,style:{pointerEvents:"none"},children:I3(f.value)?v.jsx(v.Fragment,{children:l}):o})});y3.displayName=g3;var wte="SelectIcon",b3=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return v.jsx(Ye.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});b3.displayName=wte;var Ste="SelectPortal",x3=e=>v.jsx(Xf,{asChild:!0,...e});x3.displayName=Ste;var _s="SelectContent",w3=y.forwardRef((e,t)=>{const n=No(_s,e.__scopeSelect),[r,a]=y.useState();if(Un(()=>{a(new DocumentFragment)},[]),!n.open){const o=r;return o?Zf.createPortal(v.jsx(S3,{scope:e.__scopeSelect,children:v.jsx(pv.Slot,{scope:e.__scopeSelect,children:v.jsx("div",{children:e.children})})}),o):null}return v.jsx(_3,{...e,ref:t})});w3.displayName=_s;var va=10,[S3,Mo]=Ou(_s),_te="SelectContentImpl",Ate=Hl("SelectContent.RemoveScroll"),_3=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:l,side:u,sideOffset:f,align:d,alignOffset:m,arrowPadding:p,collisionBoundary:g,collisionPadding:x,sticky:A,hideWhenDetached:S,avoidCollisions:w,...O}=e,E=No(_s,n),[T,C]=y.useState(null),[j,R]=y.useState(null),N=ot(t,de=>C(de)),[k,$]=y.useState(null),[V,I]=y.useState(null),L=mv(n),[H,W]=y.useState(!1),Z=y.useRef(!1);y.useEffect(()=>{if(T)return G_(T)},[T]),V_();const z=y.useCallback(de=>{const[Ce,...le]=L().map(se=>se.ref.current),[_e]=le.slice(-1),Se=document.activeElement;for(const se of de)if(se===Se||(se==null||se.scrollIntoView({block:"nearest"}),se===Ce&&j&&(j.scrollTop=0),se===_e&&j&&(j.scrollTop=j.scrollHeight),se==null||se.focus(),document.activeElement!==Se))return},[L,j]),F=y.useCallback(()=>z([k,T]),[z,k,T]);y.useEffect(()=>{H&&F()},[H,F]);const{onOpenChange:Y,triggerPointerDownPosRef:Q}=E;y.useEffect(()=>{if(T){let de={x:0,y:0};const Ce=_e=>{var Se,se;de={x:Math.abs(Math.round(_e.pageX)-(((Se=Q.current)==null?void 0:Se.x)??0)),y:Math.abs(Math.round(_e.pageY)-(((se=Q.current)==null?void 0:se.y)??0))}},le=_e=>{de.x<=10&&de.y<=10?_e.preventDefault():T.contains(_e.target)||Y(!1),document.removeEventListener("pointermove",Ce),Q.current=null};return Q.current!==null&&(document.addEventListener("pointermove",Ce),document.addEventListener("pointerup",le,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ce),document.removeEventListener("pointerup",le,{capture:!0})}}},[T,Y,Q]),y.useEffect(()=>{const de=()=>Y(!1);return window.addEventListener("blur",de),window.addEventListener("resize",de),()=>{window.removeEventListener("blur",de),window.removeEventListener("resize",de)}},[Y]);const[K,P]=B3(de=>{const Ce=L().filter(Se=>!Se.disabled),le=Ce.find(Se=>Se.ref.current===document.activeElement),_e=U3(Ce,de,le);_e&&setTimeout(()=>_e.ref.current.focus())}),U=y.useCallback((de,Ce,le)=>{const _e=!Z.current&&!le;(E.value!==void 0&&E.value===Ce||_e)&&($(de),_e&&(Z.current=!0))},[E.value]),ne=y.useCallback(()=>T==null?void 0:T.focus(),[T]),me=y.useCallback((de,Ce,le)=>{const _e=!Z.current&&!le;(E.value!==void 0&&E.value===Ce||_e)&&I(de)},[E.value]),Ae=r==="popper"?sS:A3,ce=Ae===sS?{side:u,sideOffset:f,align:d,alignOffset:m,arrowPadding:p,collisionBoundary:g,collisionPadding:x,sticky:A,hideWhenDetached:S,avoidCollisions:w}:{};return v.jsx(S3,{scope:n,content:T,viewport:j,onViewportChange:R,itemRefCallback:U,selectedItem:k,onItemLeave:ne,itemTextRefCallback:me,focusSelectedItem:F,selectedItemText:V,position:r,isPositioned:H,searchRef:K,children:v.jsx(Vm,{as:Ate,allowPinchZoom:!0,children:v.jsx(Hm,{asChild:!0,trapped:E.open,onMountAutoFocus:de=>{de.preventDefault()},onUnmountAutoFocus:De(a,de=>{var Ce;(Ce=E.trigger)==null||Ce.focus({preventScroll:!0}),de.preventDefault()}),children:v.jsx(Kf,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:de=>de.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:v.jsx(Ae,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:de=>de.preventDefault(),...O,...ce,onPlaced:()=>W(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...O.style},onKeyDown:De(O.onKeyDown,de=>{const Ce=de.ctrlKey||de.altKey||de.metaKey;if(de.key==="Tab"&&de.preventDefault(),!Ce&&de.key.length===1&&P(de.key),["ArrowUp","ArrowDown","Home","End"].includes(de.key)){let _e=L().filter(Se=>!Se.disabled).map(Se=>Se.ref.current);if(["ArrowUp","End"].includes(de.key)&&(_e=_e.slice().reverse()),["ArrowUp","ArrowDown"].includes(de.key)){const Se=de.target,se=_e.indexOf(Se);_e=_e.slice(se+1)}setTimeout(()=>z(_e)),de.preventDefault()}})})})})})})});_3.displayName=_te;var Ote="SelectItemAlignedPosition",A3=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,o=No(_s,n),l=Mo(_s,n),[u,f]=y.useState(null),[d,m]=y.useState(null),p=ot(t,N=>m(N)),g=mv(n),x=y.useRef(!1),A=y.useRef(!0),{viewport:S,selectedItem:w,selectedItemText:O,focusSelectedItem:E}=l,T=y.useCallback(()=>{if(o.trigger&&o.valueNode&&u&&d&&S&&w&&O){const N=o.trigger.getBoundingClientRect(),k=d.getBoundingClientRect(),$=o.valueNode.getBoundingClientRect(),V=O.getBoundingClientRect();if(o.dir!=="rtl"){const Se=V.left-k.left,se=$.left-Se,Ve=N.left-se,$e=N.width+Ve,Je=Math.max($e,k.width),Ke=window.innerWidth-va,vt=oS(se,[va,Math.max(va,Ke-Je)]);u.style.minWidth=$e+"px",u.style.left=vt+"px"}else{const Se=k.right-V.right,se=window.innerWidth-$.right-Se,Ve=window.innerWidth-N.right-se,$e=N.width+Ve,Je=Math.max($e,k.width),Ke=window.innerWidth-va,vt=oS(se,[va,Math.max(va,Ke-Je)]);u.style.minWidth=$e+"px",u.style.right=vt+"px"}const I=g(),L=window.innerHeight-va*2,H=S.scrollHeight,W=window.getComputedStyle(d),Z=parseInt(W.borderTopWidth,10),z=parseInt(W.paddingTop,10),F=parseInt(W.borderBottomWidth,10),Y=parseInt(W.paddingBottom,10),Q=Z+z+H+Y+F,K=Math.min(w.offsetHeight*5,Q),P=window.getComputedStyle(S),U=parseInt(P.paddingTop,10),ne=parseInt(P.paddingBottom,10),me=N.top+N.height/2-va,Ae=L-me,ce=w.offsetHeight/2,de=w.offsetTop+ce,Ce=Z+z+de,le=Q-Ce;if(Ce<=me){const Se=I.length>0&&w===I[I.length-1].ref.current;u.style.bottom="0px";const se=d.clientHeight-S.offsetTop-S.offsetHeight,Ve=Math.max(Ae,ce+(Se?ne:0)+se+F),$e=Ce+Ve;u.style.height=$e+"px"}else{const Se=I.length>0&&w===I[0].ref.current;u.style.top="0px";const Ve=Math.max(me,Z+S.offsetTop+(Se?U:0)+ce)+le;u.style.height=Ve+"px",S.scrollTop=Ce-me+S.offsetTop}u.style.margin=`${va}px 0`,u.style.minHeight=K+"px",u.style.maxHeight=L+"px",r==null||r(),requestAnimationFrame(()=>x.current=!0)}},[g,o.trigger,o.valueNode,u,d,S,w,O,o.dir,r]);Un(()=>T(),[T]);const[C,j]=y.useState();Un(()=>{d&&j(window.getComputedStyle(d).zIndex)},[d]);const R=y.useCallback(N=>{N&&A.current===!0&&(T(),E==null||E(),A.current=!1)},[T,E]);return v.jsx(jte,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:x,onScrollButtonChange:R,children:v.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:v.jsx(Ye.div,{...a,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});A3.displayName=Ote;var Ete="SelectPopperPosition",sS=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=va,...o}=e,l=vv(n);return v.jsx(lA,{...l,...o,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...o.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)"}})});sS.displayName=Ete;var[jte,UA]=Ou(_s,{}),lS="SelectViewport",O3=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,o=Mo(lS,n),l=UA(lS,n),u=ot(t,o.onViewportChange),f=y.useRef(0);return v.jsxs(v.Fragment,{children:[v.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:r}),v.jsx(pv.Slot,{scope:n,children:v.jsx(Ye.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:De(a.onScroll,d=>{const m=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=l;if(g!=null&&g.current&&p){const x=Math.abs(f.current-m.scrollTop);if(x>0){const A=window.innerHeight-va*2,S=parseFloat(p.style.minHeight),w=parseFloat(p.style.height),O=Math.max(S,w);if(O<A){const E=O+x,T=Math.min(A,E),C=E-T;p.style.height=T+"px",p.style.bottom==="0px"&&(m.scrollTop=C>0?C:0,p.style.justifyContent="flex-end")}}}f.current=m.scrollTop})})})]})});O3.displayName=lS;var E3="SelectGroup",[Tte,Cte]=Ou(E3),Rte=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=_a();return v.jsx(Tte,{scope:n,id:a,children:v.jsx(Ye.div,{role:"group","aria-labelledby":a,...r,ref:t})})});Rte.displayName=E3;var j3="SelectLabel",T3=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Cte(j3,n);return v.jsx(Ye.div,{id:a.id,...r,ref:t})});T3.displayName=j3;var Dp="SelectItem",[Nte,C3]=Ou(Dp),R3=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...l}=e,u=No(Dp,n),f=Mo(Dp,n),d=u.value===r,[m,p]=y.useState(o??""),[g,x]=y.useState(!1),A=ot(t,E=>{var T;return(T=f.itemRefCallback)==null?void 0:T.call(f,E,r,a)}),S=_a(),w=y.useRef("touch"),O=()=>{a||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")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 v.jsx(Nte,{scope:n,value:r,disabled:a,textId:S,isSelected:d,onItemTextChange:y.useCallback(E=>{p(T=>T||((E==null?void 0:E.textContent)??"").trim())},[]),children:v.jsx(pv.ItemSlot,{scope:n,value:r,disabled:a,textValue:m,children:v.jsx(Ye.div,{role:"option","aria-labelledby":S,"data-highlighted":g?"":void 0,"aria-selected":d&&g,"data-state":d?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:A,onFocus:De(l.onFocus,()=>x(!0)),onBlur:De(l.onBlur,()=>x(!1)),onClick:De(l.onClick,()=>{w.current!=="mouse"&&O()}),onPointerUp:De(l.onPointerUp,()=>{w.current==="mouse"&&O()}),onPointerDown:De(l.onPointerDown,E=>{w.current=E.pointerType}),onPointerMove:De(l.onPointerMove,E=>{var T;w.current=E.pointerType,a?(T=f.onItemLeave)==null||T.call(f):w.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:De(l.onPointerLeave,E=>{var T;E.currentTarget===document.activeElement&&((T=f.onItemLeave)==null||T.call(f))}),onKeyDown:De(l.onKeyDown,E=>{var C;((C=f.searchRef)==null?void 0:C.current)!==""&&E.key===" "||(vte.includes(E.key)&&O(),E.key===" "&&E.preventDefault())})})})})});R3.displayName=Dp;var Hc="SelectItemText",N3=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...o}=e,l=No(Hc,n),u=Mo(Hc,n),f=C3(Hc,n),d=xte(Hc,n),[m,p]=y.useState(null),g=ot(t,O=>p(O),f.onItemTextChange,O=>{var E;return(E=u.itemTextRefCallback)==null?void 0:E.call(u,O,f.value,f.disabled)}),x=m==null?void 0:m.textContent,A=y.useMemo(()=>v.jsx("option",{value:f.value,disabled:f.disabled,children:x},f.value),[f.disabled,f.value,x]),{onNativeOptionAdd:S,onNativeOptionRemove:w}=d;return Un(()=>(S(A),()=>w(A)),[S,w,A]),v.jsxs(v.Fragment,{children:[v.jsx(Ye.span,{id:f.textId,...o,ref:g}),f.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Zf.createPortal(o.children,l.valueNode):null]})});N3.displayName=Hc;var M3="SelectItemIndicator",P3=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return C3(M3,n).isSelected?v.jsx(Ye.span,{"aria-hidden":!0,...r,ref:t}):null});P3.displayName=M3;var uS="SelectScrollUpButton",D3=y.forwardRef((e,t)=>{const n=Mo(uS,e.__scopeSelect),r=UA(uS,e.__scopeSelect),[a,o]=y.useState(!1),l=ot(t,r.onScrollButtonChange);return Un(()=>{if(n.viewport&&n.isPositioned){let u=function(){const d=f.scrollTop>0;o(d)};const f=n.viewport;return u(),f.addEventListener("scroll",u),()=>f.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),a?v.jsx($3,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:f}=n;u&&f&&(u.scrollTop=u.scrollTop-f.offsetHeight)}}):null});D3.displayName=uS;var cS="SelectScrollDownButton",k3=y.forwardRef((e,t)=>{const n=Mo(cS,e.__scopeSelect),r=UA(cS,e.__scopeSelect),[a,o]=y.useState(!1),l=ot(t,r.onScrollButtonChange);return Un(()=>{if(n.viewport&&n.isPositioned){let u=function(){const d=f.scrollHeight-f.clientHeight,m=Math.ceil(f.scrollTop)<d;o(m)};const f=n.viewport;return u(),f.addEventListener("scroll",u),()=>f.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),a?v.jsx($3,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:f}=n;u&&f&&(u.scrollTop=u.scrollTop+f.offsetHeight)}}):null});k3.displayName=cS;var $3=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,o=Mo("SelectScrollButton",n),l=y.useRef(null),u=mv(n),f=y.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return y.useEffect(()=>()=>f(),[f]),Un(()=>{var m;const d=u().find(p=>p.ref.current===document.activeElement);(m=d==null?void 0:d.ref.current)==null||m.scrollIntoView({block:"nearest"})},[u]),v.jsx(Ye.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:De(a.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:De(a.onPointerMove,()=>{var d;(d=o.onItemLeave)==null||d.call(o),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:De(a.onPointerLeave,()=>{f()})})}),Mte="SelectSeparator",z3=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return v.jsx(Ye.div,{"aria-hidden":!0,...r,ref:t})});z3.displayName=Mte;var fS="SelectArrow",Pte=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=vv(n),o=No(fS,n),l=Mo(fS,n);return o.open&&l.position==="popper"?v.jsx(uA,{...a,...r,ref:t}):null});Pte.displayName=fS;var Dte="SelectBubbleInput",L3=y.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const a=y.useRef(null),o=ot(r,a),l=h3(t);return y.useEffect(()=>{const u=a.current;if(!u)return;const f=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(f,"value").set;if(l!==t&&m){const p=new Event("change",{bubbles:!0});m.call(u,t),u.dispatchEvent(p)}},[l,t]),v.jsx(Ye.select,{...n,style:{...a5,...n.style},ref:o,defaultValue:t})});L3.displayName=Dte;function I3(e){return e===""||e===void 0}function B3(e){const t=In(e),n=y.useRef(""),r=y.useRef(0),a=y.useCallback(l=>{const u=n.current+l;t(u),(function f(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>f(""),1e3))})(u)},[t]),o=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,o]}function U3(e,t,n){const a=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=kte(e,Math.max(o,0));a.length===1&&(l=l.filter(d=>d!==n));const f=l.find(d=>d.textValue.toLowerCase().startsWith(a.toLowerCase()));return f!==n?f:void 0}function kte(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var $te=p3,q3=v3,zte=y3,Lte=b3,Ite=x3,H3=w3,Bte=O3,F3=T3,V3=R3,Ute=N3,qte=P3,G3=D3,W3=k3,Z3=z3;const As=$te,Os=zte,Eo=y.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(q3,{ref:r,className:ye("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,v.jsx(Lte,{asChild:!0,children:v.jsx(U_,{className:"h-4 w-4 opacity-50"})})]}));Eo.displayName=q3.displayName;const Y3=y.forwardRef(({className:e,...t},n)=>v.jsx(G3,{ref:n,className:ye("flex cursor-default items-center justify-center py-1",e),...t,children:v.jsx(QF,{className:"h-4 w-4"})}));Y3.displayName=G3.displayName;const K3=y.forwardRef(({className:e,...t},n)=>v.jsx(W3,{ref:n,className:ye("flex cursor-default items-center justify-center py-1",e),...t,children:v.jsx(U_,{className:"h-4 w-4"})}));K3.displayName=W3.displayName;const jo=y.forwardRef(({className:e,children:t,position:n="popper",...r},a)=>v.jsx(Ite,{children:v.jsxs(H3,{ref:a,className:ye("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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 origin-[--radix-select-content-transform-origin]",n==="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:n,...r,children:[v.jsx(Y3,{}),v.jsx(Bte,{className:ye("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),v.jsx(K3,{})]})}));jo.displayName=H3.displayName;const Hte=y.forwardRef(({className:e,...t},n)=>v.jsx(F3,{ref:n,className:ye("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Hte.displayName=F3.displayName;const Ct=y.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(V3,{ref:r,className:ye("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[v.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:v.jsx(qte,{children:v.jsx(Lz,{className:"h-4 w-4"})})}),v.jsx(Ute,{children:t})]}));Ct.displayName=V3.displayName;const Fte=y.forwardRef(({className:e,...t},n)=>v.jsx(Z3,{ref:n,className:ye("-mx-1 my-1 h-px bg-muted",e),...t}));Fte.displayName=Z3.displayName;const gv=K_,yv=RL,Vte=X_,X3=y.forwardRef(({className:e,...t},n)=>v.jsx(Qf,{ref:n,className:ye("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));X3.displayName=Qf.displayName;const ud=y.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(Vte,{children:[v.jsx(X3,{}),v.jsxs(Jf,{ref:r,className:ye("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,v.jsxs(Wm,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[v.jsx(Fz,{className:"h-4 w-4"}),v.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ud.displayName=Jf.displayName;const cd=({className:e,...t})=>v.jsx("div",{className:ye("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});cd.displayName="DialogHeader";const fd=y.forwardRef(({className:e,...t},n)=>v.jsx(ed,{ref:n,className:ye("text-lg font-semibold leading-none tracking-tight",e),...t}));fd.displayName=ed.displayName;const Gte=y.forwardRef(({className:e,...t},n)=>v.jsx(td,{ref:n,className:ye("text-sm text-muted-foreground",e),...t}));Gte.displayName=td.displayName;function Wte({onSuccess:e,appId:t}){const[n,r]=y.useState(!1),[a,o]=y.useState(null),[l,u]=y.useState("none"),[f,d]=y.useState(""),[m,p]=y.useState(!1),g=y.useRef(null);async function x(S){if(S.preventDefault(),!!a){d(""),p(!0);try{const w=new FormData;w.append("file",a),l!=="none"&&w.append("status",l),t&&w.append("app_id",String(t));const O=await fetch("/api/v1/builds",{method:"POST",credentials:"include",body:w});if(!O.ok){const E=await O.json().catch(()=>({}));d(E.error??"Upload failed. Check the file format.");return}r(!1),o(null),u("none"),e()}catch{d("Network error.")}finally{p(!1)}}}function A(S){r(S),S||(o(null),d(""),u("none"))}return v.jsxs(gv,{open:n,onOpenChange:A,children:[v.jsx(yv,{asChild:!0,children:v.jsxs(ct,{size:"sm",children:[v.jsx(xV,{className:"mr-2 h-4 w-4"}),"Upload build"]})}),v.jsxs(ud,{className:"sm:max-w-md",children:[v.jsx(cd,{children:v.jsx(fd,{children:"Upload build"})}),v.jsxs("form",{onSubmit:x,className:"flex flex-col gap-4 pt-2",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Bt,{children:"File"}),v.jsx("div",{className:"flex h-24 cursor-pointer items-center justify-center rounded-md border-2 border-dashed text-sm text-muted-foreground hover:border-primary",onClick:()=>{var S;return(S=g.current)==null?void 0:S.click()},onDragOver:S=>S.preventDefault(),onDrop:S=>{S.preventDefault();const w=S.dataTransfer.files[0];w&&o(w)},children:a?a.name:"Click or drag to upload"}),v.jsx("input",{ref:g,type:"file",accept:".zip,.apk",className:"hidden",onChange:S=>{var w;return o(((w=S.target.files)==null?void 0:w[0])??null)}}),v.jsxs("p",{className:"text-xs text-muted-foreground",children:["iOS: ",v.jsx("code",{children:".app.zip"})," (zip the ",v.jsx("code",{children:".app"})," folder after ",v.jsx("code",{children:"xcodebuild -sdk iphonesimulator"}),")  · Android: ",v.jsx("code",{children:".apk"})]})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsxs(Bt,{children:["Status ",v.jsx("span",{className:"text-muted-foreground",children:"(optional)"})]}),v.jsxs(As,{value:l,onValueChange:u,children:[v.jsx(Eo,{children:v.jsx(Os,{})}),v.jsxs(jo,{children:[v.jsx(Ct,{value:"none",children:"None"}),v.jsx(Ct,{value:"Backlog",children:"Backlog"}),v.jsx(Ct,{value:"In Progress",children:"In Progress"}),v.jsx(Ct,{value:"Done",children:"Done"}),v.jsx(Ct,{value:"Rejected",children:"Rejected"})]})]})]}),f&&v.jsx("p",{className:"text-sm text-destructive",children:f}),v.jsxs("div",{className:"flex justify-end gap-2",children:[v.jsx(ct,{type:"button",variant:"outline",className:"w-24",onClick:()=>r(!1),children:"Cancel"}),v.jsx(ct,{type:"submit",className:"w-24",disabled:!a||m,children:m?"Uploading…":"Upload"})]})]})]})]})}function kp({className:e,...t}){return v.jsx("span",{className:ye("font-mono text-xs tabular-nums tracking-tight",e),...t})}async function Zte(){const e=await fetch("/api/v1/apps",{credentials:"include"});return e.ok?(await e.json()).items:[]}async function Yte({appId:e,search:t,statusFilter:n}){const r=new URLSearchParams({app_id:String(e),limit:"100",sort:"uploaded_at",dir:"desc"});t&&r.set("q",t),n&&n!=="all"&&r.set("status",n);const a=await fetch(`/api/v1/builds?${r}`,{credentials:"include"});return a.ok?(await a.json()).items:[]}async function Kte(e){const t=await fetch("/api/v1/apps",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return t.status===409?{error:"App with this bundle ID and platform already exists"}:t.ok?t.json():null}async function Xte(e,t){await fetch(`/api/v1/builds/${e}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({status_label:t})})}async function Qte(e){const t=await fetch(`/api/v1/builds/${e}`,{credentials:"include"});return t.ok?t.json():null}function Jte(e){const t=new Map;for(const n of e){const r=n.version_name??"Unversioned";t.has(r)||t.set(r,[]),t.get(r).push(n)}return Array.from(t.entries()).map(([n,r])=>({versionName:n,builds:r}))}function ene({onSuccess:e}){const[t,n]=y.useState(!1),[r,a]=y.useState(""),[o,l]=y.useState(""),[u,f]=y.useState("ios"),[d,m]=y.useState(""),[p,g]=y.useState(!1);async function x(A){A.preventDefault(),m(""),g(!0);try{const S=await Kte({name:r.trim(),bundle_id_key:o.trim(),platform:u});if(!S){m("Failed to create app");return}if("error"in S){m(S.error);return}n(!1),a(""),l(""),f("ios"),e()}finally{g(!1)}}return v.jsxs(gv,{open:t,onOpenChange:n,children:[v.jsx(yv,{asChild:!0,children:v.jsxs("button",{className:"flex w-full items-center gap-1.5 rounded-md px-2 py-1.5 text-left text-sm text-muted-foreground hover:bg-accent hover:text-foreground transition-colors",children:[v.jsx(qz,{className:"size-3.5 shrink-0"}),v.jsx("span",{children:"Add App"})]})}),v.jsxs(ud,{className:"sm:max-w-sm",children:[v.jsx(cd,{children:v.jsx(fd,{children:"Add App"})}),v.jsxs("form",{onSubmit:x,className:"flex flex-col gap-4 pt-2",children:[v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsx(Bt,{htmlFor:"app-name",children:"Name"}),v.jsx(cn,{id:"app-name",value:r,onChange:A=>a(A.target.value),placeholder:"My App",required:!0})]}),v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsx(Bt,{htmlFor:"bundle-id",children:"Bundle ID"}),v.jsx(cn,{id:"bundle-id",value:o,onChange:A=>l(A.target.value),placeholder:"com.example.myapp",required:!0})]}),v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsx(Bt,{htmlFor:"platform",children:"Platform"}),v.jsxs(As,{value:u,onValueChange:A=>f(A),children:[v.jsx(Eo,{id:"platform",children:v.jsx(Os,{})}),v.jsxs(jo,{children:[v.jsx(Ct,{value:"ios",children:"iOS"}),v.jsx(Ct,{value:"android",children:"Android"}),v.jsx(Ct,{value:"both",children:"Both"})]})]})]}),d&&v.jsx("p",{className:"text-sm text-destructive",children:d}),v.jsx(ct,{type:"submit",disabled:p,className:"w-full",children:p?"Creating…":"Create App"})]})]})]})}function tne({apps:e,selectedAppId:t,onSelect:n,onAdd:r}){return v.jsxs("aside",{className:"w-64 shrink-0 border-r flex flex-col gap-1 p-3 overflow-y-auto",children:[v.jsx("span",{className:"px-2 pb-1 font-mono text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Apps"}),e.length===0&&v.jsx("span",{className:"px-2 text-sm text-muted-foreground",children:"No apps yet"}),e.map(a=>v.jsxs("button",{onClick:()=>n(a.id),className:["flex flex-col gap-0.5 rounded-md px-2 py-2 text-left text-sm hover:bg-accent overflow-hidden",a.id===t?"bg-accent font-medium":""].join(" "),children:[v.jsx("span",{className:"truncate",children:a.name}),v.jsx(kp,{className:"text-muted-foreground truncate",children:a.bundle_id_key})]},a.id)),v.jsx("div",{className:"mt-1 border-t pt-1",children:v.jsx(ene,{onSuccess:r})})]})}const nne=bu("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"},tone:{backlog:"border-transparent bg-zinc-100 text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",progress:"border-transparent bg-blue-50 text-blue-700 dark:bg-blue-950 dark:text-blue-300",done:"border-transparent bg-green-50 text-green-700 dark:bg-green-950 dark:text-green-300",rejected:"border-transparent bg-red-50 text-red-700 dark:bg-red-950 dark:text-red-300",ios:"border-transparent bg-sky-50 text-sky-700 dark:bg-sky-950 dark:text-sky-300",android:"border-transparent bg-emerald-50 text-emerald-700 dark:bg-emerald-950 dark:text-emerald-300"}},defaultVariants:{variant:"default"}});function Gl({className:e,variant:t,tone:n,...r}){return v.jsx("div",{className:ye(nne({variant:t,tone:n}),e),...r})}const Q3={Backlog:"backlog","In Progress":"progress",Done:"done",Rejected:"rejected"};function _R(e){return e.version_name&&e.build_number?`${e.version_name} · build ${e.build_number}`:e.version_name??e.version_label??(e.build_number?`build ${e.build_number}`:"Build")}function rne({build:e,isLast:t,onNavigate:n,onStatusChange:r}){return v.jsxs("div",{className:["flex items-center gap-3 px-4 py-3",t?"":"border-b"].join(" "),children:[v.jsxs("div",{className:"flex-1 min-w-0",children:[v.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[v.jsxs("span",{className:"text-sm font-medium",children:["build ",v.jsx(kp,{children:e.build_number??"—"})]}),v.jsx(Gl,{tone:e.platform==="ios"?"ios":"android",className:"text-xs capitalize",children:e.platform}),e.status_label&&v.jsx(Gl,{tone:Q3[e.status_label],className:"text-xs",children:e.status_label})]}),v.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:[e.uploader??"—"," · ",v.jsx(kp,{children:new Date(e.uploaded_at).toLocaleDateString()})]})]}),v.jsxs(As,{value:e.status_label??"none",onValueChange:a=>r(e.id,a==="none"?null:a),children:[v.jsx(Eo,{className:"h-9 w-32 text-xs",children:v.jsx(Os,{})}),v.jsxs(jo,{children:[v.jsx(Ct,{value:"none",children:v.jsx("span",{className:"text-muted-foreground",children:"—"})}),v.jsx(Ct,{value:"Backlog",children:"Backlog"}),v.jsx(Ct,{value:"In Progress",children:"In Progress"}),v.jsx(Ct,{value:"Done",children:"Done"}),v.jsx(Ct,{value:"Rejected",children:"Rejected"})]})]}),v.jsxs(ct,{size:"sm",onClick:()=>n(e.id),children:[v.jsx(H_,{className:"mr-1.5 h-3.5 w-3.5"}),"Start QA"]})]})}function ane({versionName:e,builds:t,isOpen:n,onToggle:r,onNavigate:a,onStatusChange:o}){return v.jsxs("div",{className:"rounded-lg shadow-card-2 overflow-hidden",children:[v.jsxs("button",{className:"flex w-full items-center gap-2 px-4 py-3 text-left hover:bg-accent/50 bg-card",onClick:r,children:[n?v.jsx(U_,{className:"h-4 w-4 shrink-0 text-muted-foreground"}):v.jsx(q_,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),v.jsx(kp,{className:"font-medium text-sm text-foreground",children:e}),v.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",t.length," build",t.length>1?"s":"",")"]})]}),n&&v.jsx("div",{className:"border-t bg-card",children:t.map((l,u)=>v.jsx(rne,{build:l,isLast:u===t.length-1,onNavigate:a,onStatusChange:o},l.id))})]})}function ine(){const e=Ya(),[t,n]=Um(),[r,a]=y.useState([]),[o,l]=y.useState([]),[u,f]=y.useState(""),[d,m]=y.useState("all"),[p,g]=y.useState(!0),[x,A]=y.useState(new Set),S=t.get("appId")?Number(t.get("appId")):null,w=r.find(N=>N.id===S)??null,O=y.useCallback(async()=>{const N=await Zte();a(N),!t.get("appId")&&N.length>0&&n({appId:String(N[0].id)},{replace:!0})},[t,n]),E=y.useCallback(async()=>{if(!S){l([]),g(!1);return}g(!0);try{const N=await Yte({appId:S,search:u,statusFilter:d});l(N),N.length>0&&x.size===0&&A(new Set([N[0].version_name??"Unversioned"]))}finally{g(!1)}},[S,u,d]);y.useEffect(()=>{O()},[]),y.useEffect(()=>{E()},[E]);function T(N){N!==S&&(l([]),A(new Set)),n({appId:String(N)})}function C(N){A(k=>{const $=new Set(k);return $.has(N)?$.delete(N):$.add(N),$})}async function j(N,k){await Xte(N,k),l($=>$.map(V=>V.id===N?{...V,status_label:k}:V))}const R=Jte(o);return v.jsxs("div",{className:"flex h-full gap-0",children:[v.jsx(tne,{apps:r,selectedAppId:S,onSelect:T,onAdd:O}),v.jsxs("main",{className:"flex-1 flex flex-col gap-4 p-4 overflow-y-auto min-w-0",children:[v.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[v.jsx("h1",{className:"text-xl font-semibold tracking-display-sm",children:w?w.name:"App Center"}),v.jsx(Wte,{onSuccess:()=>{O(),E()},appId:S})]}),S?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"flex flex-wrap gap-2",children:[v.jsx(d3,{placeholder:"Search version…",value:u,onChange:f}),v.jsxs(As,{value:d,onValueChange:m,children:[v.jsx(Eo,{className:"h-8 w-36",children:v.jsx(Os,{placeholder:"Status"})}),v.jsxs(jo,{children:[v.jsx(Ct,{value:"all",children:"All statuses"}),v.jsx(Ct,{value:"Backlog",children:"Backlog"}),v.jsx(Ct,{value:"In Progress",children:"In Progress"}),v.jsx(Ct,{value:"Done",children:"Done"}),v.jsx(Ct,{value:"Rejected",children:"Rejected"})]})]})]}),p?v.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading…"}):R.length===0?v.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center",children:[v.jsx(fV,{className:"w-8 h-8 text-muted-foreground/40"}),v.jsx("p",{className:"text-sm font-medium",children:"No builds yet"}),v.jsx("p",{className:"text-sm text-muted-foreground",children:"Upload the first build to get started."})]}):v.jsx("div",{className:"flex flex-col gap-2",children:R.map(({versionName:N,builds:k})=>v.jsx(ane,{versionName:N,builds:k,isOpen:x.has(N),onToggle:()=>C(N),onNavigate:$=>e(`/app-center/build?id=${$}`),onStatusChange:j},N))})]}):v.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center",children:[v.jsx(oV,{className:"w-8 h-8 text-muted-foreground/40"}),v.jsx("p",{className:"text-sm font-medium",children:"No app selected"}),v.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose an app from the sidebar to view its builds."})]})]})]})}const one=`ws://${location.host}`,sne=2e3;function qA(e,t){const n=y.useRef(null),[r,a]=y.useState(!1),o=y.useRef(e);o.current=e;const l=y.useRef(t);return l.current=t,y.useEffect(()=>{let f=!1;const d=()=>{if(f)return;const m=new WebSocket(one);m.binaryType="arraybuffer",n.current=m,m.onopen=()=>a(!0),m.onclose=()=>{a(!1),f||setTimeout(d,sne)},m.onmessage=p=>{var g;if(p.data instanceof ArrayBuffer){(g=l.current)==null||g.call(l,p.data);return}try{o.current(JSON.parse(p.data))}catch{}}};return d(),()=>{var m;f=!0,(m=n.current)==null||m.close()}},[]),{send:y.useCallback(f=>{var d;((d=n.current)==null?void 0:d.readyState)===WebSocket.OPEN&&n.current.send(JSON.stringify(f))},[]),connected:r}}function J3(){const e=y.useRef(0),[t,n]=y.useState(0);return y.useEffect(()=>{const r=setInterval(()=>{n(e.current),e.current=0},1e3);return()=>clearInterval(r)},[]),{fps:t,frameCount:e}}function e4({joined:e,onScreenshot:t,onRecordToggle:n,recordState:r,onRotate:a,platformSlot:o,launchSlot:l}){return e?v.jsx(dA,{delayDuration:400,children:v.jsxs("div",{className:"flex flex-col items-center gap-0.5 rounded-2xl border bg-background/90 backdrop-blur-sm px-1.5 py-2.5 shrink-0 mt-3",children:[l,o,v.jsx("div",{className:"w-4 h-px bg-border my-1"}),v.jsxs(Fa,{children:[v.jsx(Va,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:t,children:v.jsx(XF,{className:"h-4 w-4"})})}),v.jsx(Aa,{side:"left",children:"Screenshot"})]}),v.jsxs(Fa,{children:[v.jsx(Va,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:ye("h-8 w-8",r==="recording"&&"text-red-500 hover:text-red-500"),disabled:r==="uploading"||r==="done",onClick:n,children:r==="uploading"?v.jsx(bp,{className:"h-4 w-4 animate-spin"}):r==="recording"?v.jsx(gV,{className:"h-4 w-4 fill-current"}):v.jsx(_V,{className:"h-4 w-4"})})}),v.jsx(Aa,{side:"left",children:r==="idle"?"Start recording":r==="recording"?"Stop recording":"Processing…"})]}),v.jsx("div",{className:"w-4 h-px bg-border my-1"}),v.jsxs(Fa,{children:[v.jsx(Va,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:a,children:v.jsx(pV,{className:"h-4 w-4"})})}),v.jsx(Aa,{side:"left",children:"Rotate"})]})]})}):null}function lne(e){const{connected:t,joined:n,bootError:r,deviceReady:a,installing:o,installError:l}=e;return t?n?r?`Boot failed: ${r.length>40?r.slice(0,40)+"…":r}`:a?o?"Installing app…":l?`Install failed: ${l}`:null:"Starting device…":"Joining session…":"Connecting…"}function HA(e){const{joined:t,fps:n,keyboardActive:r}=e,a=lne(e),o=n>15,l=n>0&&n<=15,u=o?"#10b981":l?"#94a3b8":"transparent",f=o?"Active":l?"Idle":null;return v.jsxs("div",{className:"w-[300px] shrink-0 mt-3 rounded-xl border bg-background px-4 py-4 flex flex-col gap-3",children:[v.jsxs("div",{className:ye("flex items-center",r?"text-emerald-500":"text-muted-foreground"),style:{gap:6},children:[v.jsx(mV,{className:"h-3.5 w-3.5 shrink-0"}),v.jsx("span",{className:"text-[12px] font-medium",children:"Focus"})]}),t&&n>0&&v.jsxs("div",{className:"flex items-center",style:{gap:6},children:[v.jsx("span",{className:"h-2 w-2 rounded-full shrink-0",style:{background:u}}),v.jsx("span",{className:"text-[12px] font-mono text-foreground/75",children:n}),v.jsx("span",{className:"text-[12px] text-muted-foreground",children:"fps"}),f&&v.jsxs("span",{className:ye("text-[11px]",o?"text-emerald-500":"text-muted-foreground/60"),children:["· ",f]})]}),a&&v.jsx("p",{className:"text-[12px] text-muted-foreground leading-relaxed break-all",children:a})]})}function une(e,t,n,r,a,o){const{x:l,y:u,width:f,height:d}=a;let m,p;if(o){const g=(e.x-t.left)/t.width;m=(1-(e.y-t.top)/t.height)*n,p=g*r}else m=(e.x-t.left)*(n/t.width),p=(e.y-t.top)*(r/t.height);return m<l||m>l+f||p<u||p>u+d?null:{x:(m-l)/f,y:(p-u)/d}}function cne(e,t,n){const r=(e.x-t.left)/t.width,a=(e.y-t.top)/t.height;return r<0||r>1||a<0||a>1?null:n?{x:a,y:1-r}:{x:r,y:a}}function t4(e){return{f0:{x:1-e.x,y:1-e.y},f1:e}}function fne(e,t){return e>0?Math.min(1,t/e):1}const ka=13,as=8,AR=16,dne=.02,hne=100;function pne({sessionId:e,buildId:t,send:n,connected:r,joined:a,deviceReady:o,installing:l,installed:u,installError:f,bootError:d,launching:m,setLaunching:p,chrome:g,binaryFrameHandlerRef:x,onRecordingUploaded:A,swKeyboardVisible:S,swKeyboardPending:w,onKbdToggle:O}){const E=y.useRef(null),T=y.useRef(null),C=y.useRef(null),j=y.useRef(null),{fps:R,frameCount:N}=J3(),k=y.useRef(0),[$,V]=y.useState(!1),[I,L]=y.useState(!1),[H,W]=y.useState(!1),[Z,z]=y.useState(null),[F,Y]=y.useState(null),[Q,K]=y.useState(!1),[P,U]=y.useState(null),ne=y.useRef(P);y.useEffect(()=>{ne.current=P},[P]);const me=y.useRef(null),Ae=y.useRef(null),ce=y.useRef(!1),de=y.useRef(!1),Ce=y.useRef(0),le=y.useRef(null),_e=y.useRef(null),Se=y.useRef("idle"),se=y.useRef(null),Ve=y.useRef(null),$e=y.useRef(null);y.useEffect(()=>{$e.current=g},[g]),y.useEffect(()=>{const te=new Image;te.onload=()=>{Ve.current=te},te.src=`data:image/png;base64,${g.framePng}`},[g.framePng]),y.useEffect(()=>(x.current=te=>{const be=k.current;createImageBitmap(new Blob([te],{type:"image/jpeg"})).then(fe=>{if(k.current!==be){fe.close();return}const Be=E.current,ke=Be==null?void 0:Be.getContext("2d");if(!Be||!ke){fe.close();return}if((Be.width!==fe.width||Be.height!==fe.height)&&(Be.width=fe.width,Be.height=fe.height,!$e.current)){const Pe=j.current;Pe&&(Pe.width=fe.width,Pe.height=fe.height)}ke.drawImage(fe,0,0),fe.close(),V(!0),N.current+=1}).catch(()=>{})},()=>{x.current=void 0}),[x,N]),y.useEffect(()=>{const te=j.current,be=T.current;te&&be&&(te.width=be.clientWidth,te.height=be.clientHeight)},[g]);const[Je,Ke]=y.useState("idle"),vt=y.useRef(!1),$t=y.useRef(null),qt=y.useRef([]),Tn=y.useRef(""),fn=y.useRef(0),Pn=y.useRef(()=>{}),Hn=y.useCallback(()=>{if(!vt.current)return;const te=j.current,be=E.current;if(!te||!be)return;const fe=te.getContext("2d");if(!fe)return;const Be=$e.current;if(fe.clearRect(0,0,te.width,te.height),Be){Ve.current&&fe.drawImage(Ve.current,0,0,te.width,te.height);const Ue=Math.round(Be.screenCornerRadius/2*(te.height/(Be.compositeHeight/2)));fe.save(),fe.beginPath(),Ue>0?fe.roundRect(be.offsetLeft,be.offsetTop,be.clientWidth,be.clientHeight,Ue):fe.rect(be.offsetLeft,be.offsetTop,be.clientWidth,be.clientHeight),fe.clip(),fe.drawImage(be,be.offsetLeft,be.offsetTop,be.clientWidth,be.clientHeight),fe.restore()}else fe.drawImage(be,0,0,te.width,te.height);const ke=ne.current;if(ke)for(const Ue of[ke.f0,ke.f1]){const wt=Be?be.offsetLeft+Ue.x*be.clientWidth:Ue.x*te.width,tn=Be?be.offsetTop+Ue.y*be.clientHeight:Ue.y*te.height;ce.current?(fe.beginPath(),fe.arc(wt,tn,as,0,Math.PI*2),fe.fillStyle="rgba(255,255,255,0.92)",fe.fill(),fe.strokeStyle="rgba(0,0,0,0.2)",fe.lineWidth=1,fe.stroke()):(fe.beginPath(),fe.arc(wt,tn,ka,0,Math.PI*2),fe.strokeStyle="rgba(0,0,0,0.3)",fe.lineWidth=3,fe.stroke(),fe.beginPath(),fe.arc(wt,tn,ka,0,Math.PI*2),fe.strokeStyle="rgba(255,255,255,0.65)",fe.lineWidth=1.5,fe.stroke())}const Pe=_e.current;if(Pe){const Ue=Se.current,wt=se.current;if(fe.save(),Ue==="down")fe.beginPath(),fe.arc(Pe.x,Pe.y,as,0,Math.PI*2),fe.fillStyle="rgba(255,255,255,0.92)",fe.fill(),fe.strokeStyle="rgba(0,0,0,0.2)",fe.lineWidth=1,fe.stroke();else if(Ue==="release"&&wt){const tn=Math.min((performance.now()-wt.startTime)/350,1);fe.beginPath(),fe.arc(Pe.x,Pe.y,as+26*tn,0,Math.PI*2),fe.strokeStyle=`rgba(255,255,255,${(1-tn)*.55})`,fe.lineWidth=1.5,fe.stroke(),tn>=1&&(Se.current="idle",se.current=null)}else fe.beginPath(),fe.arc(Pe.x,Pe.y,ka,0,Math.PI*2),fe.strokeStyle="rgba(0,0,0,0.3)",fe.lineWidth=3,fe.stroke(),fe.beginPath(),fe.arc(Pe.x,Pe.y,ka,0,Math.PI*2),fe.strokeStyle="rgba(255,255,255,0.65)",fe.lineWidth=1.5,fe.stroke();fe.restore()}fn.current=requestAnimationFrame(Pn.current)},[]);y.useLayoutEffect(()=>{Pn.current=Hn},[Hn]);const B=y.useCallback(()=>{const te=j.current;if(!te)return;const be=T.current;if(be&&be.clientWidth>0)te.width=be.clientWidth,te.height=be.clientHeight;else{const Ue=E.current;if(Ue&&Ue.width>0)te.width=Ue.width,te.height=Ue.height;else return}const fe=te.getContext("2d");fe&&(fe.fillStyle="#000",fe.fillRect(0,0,te.width,te.height));const ke=["video/mp4;codecs=avc1","video/webm;codecs=vp9","video/webm;codecs=vp8","video/webm"].find(Ue=>MediaRecorder.isTypeSupported(Ue))??"";if(!ke)return;Tn.current=ke,qt.current=[];const Pe=new MediaRecorder(te.captureStream(30),{mimeType:ke});Pe.ondataavailable=Ue=>{Ue.data.size>0&&qt.current.push(Ue.data)},$t.current=Pe,Pe.start(1e3),vt.current=!0,fn.current=requestAnimationFrame(Hn),Ke("recording")},[Hn]),J=y.useCallback(async()=>{Ke("uploading"),vt.current=!1,cancelAnimationFrame(fn.current);const te=$t.current;if(!te){Ke("idle");return}await new Promise(Pe=>{const Ue=setTimeout(Pe,5e3);te.onstop=()=>{clearTimeout(Ue),Pe()};try{te.stop()}catch{clearTimeout(Ue),Pe()}}),$t.current=null;const be=Tn.current,fe=be.includes("mp4")?".mp4":".webm",Be=new Blob(qt.current,{type:be});qt.current=[];const ke=new FormData;ke.append("file",Be,`tapflow-${Date.now()}${fe}`);try{const Pe=new URLSearchParams({sessionId:e});t&&Pe.set("buildId",String(t));const Ue=await fetch(`/api/v1/recordings/upload?${Pe}`,{method:"POST",credentials:"include",body:ke}),wt=await Ue.json();if(Ue.ok&&wt.url){const tn=document.createElement("a");tn.href=wt.url,tn.download="",tn.click(),A==null||A(),Ke("done"),setTimeout(()=>Ke("idle"),2e3)}else Ke("idle")}catch{Ke("idle")}},[e,t,A]);y.useEffect(()=>{if(Je!=="recording")return;const te=()=>{document.visibilityState==="hidden"&&J()};return document.addEventListener("visibilitychange",te),()=>{var be;document.removeEventListener("visibilitychange",te),vt.current&&(vt.current=!1,cancelAnimationFrame(fn.current),(be=$t.current)==null||be.stop(),$t.current=null)}},[Je,J]),y.useEffect(()=>{const te=new Set(["ShiftLeft","ShiftRight","ControlLeft","ControlRight","MetaLeft","MetaRight"]),be=Pe=>{if(Pe.code==="AltLeft"||Pe.code==="AltRight"){de.current=!0;return}if(!H||te.has(Pe.code))return;Pe.preventDefault();const Ue=(Pe.shiftKey?2:0)|(Pe.ctrlKey?1:0)|(Pe.metaKey?8:0);n({type:"input:key",sessionId:e,payload:{code:Pe.code,modifiers:Ue}})},fe=()=>{ce.current&&(ce.current=!1,K(!1),n({type:"input:pinch:end",sessionId:e})),de.current=!1,U(null)},Be=Pe=>{(Pe.code==="AltLeft"||Pe.code==="AltRight")&&fe()},ke=()=>{de.current&&fe()};return window.addEventListener("keydown",be),window.addEventListener("keyup",Be),window.addEventListener("blur",ke),()=>{window.removeEventListener("keydown",be),window.removeEventListener("keyup",Be),window.removeEventListener("blur",ke)}},[H,n,e]),y.useEffect(()=>{if(!H)return;const te=be=>{const fe=T.current??E.current;fe&&!fe.contains(be.target)&&W(!1)};return document.addEventListener("pointerdown",te),()=>document.removeEventListener("pointerdown",te)},[H]);const ae=y.useCallback(te=>{const be=(I?C.current:null)??T.current;if(!be)return null;const fe=be.getBoundingClientRect(),Be=g.compositeWidth/2,ke=g.compositeHeight/2,Pe=g.screenRect.x/2,Ue=g.screenRect.y/2,wt=g.screenRect.width/2,tn=g.screenRect.height/2;return une({x:te.clientX,y:te.clientY},fe,Be,ke,{x:Pe,y:Ue,width:wt,height:tn},I)},[g,I]),Te=y.useCallback(te=>{const be=ae(te);return be?t4(be):null},[ae]),Ee=y.useCallback(te=>{if(!T.current||I)return null;const be=T.current.getBoundingClientRect(),fe=(te.clientX-be.left)*(g.compositeWidth/be.width),Be=(te.clientY-be.top)*(g.compositeHeight/be.height);for(const ke of g.buttons){const Pe=fe-ke.normalOffset.x,Ue=Be-ke.normalOffset.y;if(Pe*Pe+Ue*Ue<hne**2)return ke.name}return null},[g,I]),Oe=y.useCallback(te=>{const be=E.current,fe=j.current;return be&&be.clientWidth>0?{x:be.offsetLeft+te.x*be.clientWidth,y:be.offsetTop+te.y*be.clientHeight}:{x:te.x*((fe==null?void 0:fe.width)??1),y:te.y*((fe==null?void 0:fe.height)??1)}},[]),Me=y.useCallback(te=>{if(W(!0),de.current){const Pe=Te(te);if(!Pe)return;ce.current=!0,K(!0),te.target.setPointerCapture(te.pointerId),U(Pe),n({type:"input:pinch:start",sessionId:e,payload:Pe});return}const be=Ee(te);if(be){me.current=be,z(be);return}const fe=ae(te);if(!fe)return;Ae.current=fe,te.target.setPointerCapture(te.pointerId),_e.current=Oe(fe),Se.current="down",se.current=null;const Be=te.currentTarget.getBoundingClientRect(),ke=le.current;ke&&(ke.style.display="block",ke.style.left=`${te.clientX-Be.left}px`,ke.style.top=`${te.clientY-Be.top}px`,ke.style.width=`${as*2}px`,ke.style.height=`${as*2}px`,ke.style.background="rgba(255,255,255,0.92)",ke.style.border="1.5px solid rgba(0,0,0,0.2)",ke.style.boxShadow="0 0 0 1px rgba(0,0,0,0.15), 0 0 8px rgba(255,255,255,0.25)"),n({type:"input:touch:start",sessionId:e,payload:fe})},[Ee,ae,Te,Oe,n,e]),qe=y.useCallback(te=>{if(te.buttons===0){if(Y(Ee(te)),de.current){U(Te(te)),_e.current=null;const Ue=le.current;Ue&&(Ue.style.display="none")}else{U(null);const Ue=ae(te);_e.current=Ue?Oe(Ue):null,Se.current!=="down"&&(Se.current="idle");const wt=le.current;if(wt)if(Ue){const tn=te.currentTarget.getBoundingClientRect();wt.style.display="block",wt.style.left=`${te.clientX-tn.left}px`,wt.style.top=`${te.clientY-tn.top}px`,wt.style.width=`${ka*2}px`,wt.style.height=`${ka*2}px`,wt.style.background="transparent",wt.style.border="1.5px solid rgba(255,255,255,0.6)",wt.style.boxShadow="0 0 0 1px rgba(0,0,0,0.3)"}else wt.style.display="none"}return}if(ce.current){const Ue=Te(te);if(!Ue)return;const wt=performance.now();if(wt-Ce.current<AR)return;Ce.current=wt,U(Ue),n({type:"input:pinch:move",sessionId:e,payload:Ue});return}if(me.current||!Ae.current)return;const be=ae(te);if(!be)return;const fe=be.x-Ae.current.x,Be=be.y-Ae.current.y;if(Math.sqrt(fe*fe+Be*Be)<dne)return;const ke=performance.now();if(ke-Ce.current<AR)return;Ce.current=ke,_e.current=Oe(be);const Pe=le.current;if(Pe&&Pe.style.display!=="none"){const Ue=te.currentTarget.getBoundingClientRect();Pe.style.left=`${te.clientX-Ue.left}px`,Pe.style.top=`${te.clientY-Ue.top}px`}n({type:"input:touch:move",sessionId:e,payload:be})},[Ee,ae,Te,Oe,n,e]),et=y.useCallback(()=>{if(ce.current){ce.current=!1,K(!1),U(null),n({type:"input:pinch:end",sessionId:e});return}if(Ae.current=null,me.current){n({type:"input:button",sessionId:e,payload:{name:me.current}}),me.current=null,setTimeout(()=>z(null),100);return}Se.current="release",se.current={startTime:performance.now()};const te=le.current;te&&(te.style.width=`${ka*2}px`,te.style.height=`${ka*2}px`,te.style.background="transparent",te.style.border="1.5px solid rgba(255,255,255,0.6)",te.style.boxShadow="0 0 0 1px rgba(0,0,0,0.3)"),n({type:"input:touch:end",sessionId:e})},[n,e]),Ot=y.useCallback(()=>{if(ce.current){ce.current=!1,K(!1),U(null),n({type:"input:pinch:end",sessionId:e});return}if(Ae.current=null,me.current){me.current=null,z(null);return}Se.current="release",se.current={startTime:performance.now()},n({type:"input:touch:end",sessionId:e})},[n,e]),gt=y.useCallback(()=>{Y(null),U(null),_e.current=null;const te=le.current;te&&(te.style.display="none")},[]),zt=g.compositeWidth/2,dn=g.compositeHeight/2,la=fne(dn,750),ua=Math.round(zt*la),Jn=Math.round(dn*la),vr=g.screenRect.x/g.compositeWidth*100,or=g.screenRect.y/g.compositeHeight*100,we=g.screenRect.width/g.compositeWidth*100,Fe=g.screenRect.height/g.compositeHeight*100,Re=Math.round(g.screenCornerRadius/2*la),it=v.jsxs(v.Fragment,{children:[v.jsxs(Fa,{children:[v.jsx(Va,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>n({type:"input:button",sessionId:e,payload:{name:"home"}}),children:v.jsx(Iz,{className:"h-4 w-4"})})}),v.jsx(Aa,{side:"left",children:"Home"})]}),v.jsxs(Fa,{children:[v.jsx(Va,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",disabled:w,onClick:O,"data-active":S,children:w?v.jsx(bp,{className:"h-4 w-4 animate-spin"}):v.jsx(iV,{className:"h-4 w-4"})})}),v.jsx(Aa,{side:"left",children:"Software keyboard"})]})]}),Lt=u&&t?v.jsxs(Fa,{children:[v.jsx(Va,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",disabled:m,onClick:()=>{p(!0),n({type:"app:launch",sessionId:e,buildId:t})},children:m?v.jsx(bp,{className:"h-4 w-4 animate-spin"}):v.jsx(H_,{className:"h-4 w-4"})})}),v.jsx(Aa,{side:"left",children:m?"Launching…":"Launch app"})]}):null;return v.jsxs("div",{className:"flex items-start justify-center gap-16",children:[v.jsx("canvas",{ref:j,style:{display:"none"}}),v.jsx(e4,{joined:a,onScreenshot:()=>{const te=E.current;if(!te)return;const be=document.createElement("canvas"),fe=be.getContext("2d");fe&&(be.width=te.width,be.height=te.height,fe.drawImage(te,0,0),be.toBlob(Be=>{if(!Be)return;const ke=URL.createObjectURL(Be),Pe=document.createElement("a");Pe.href=ke,Pe.download=`tapflow-${Date.now()}.png`,Pe.click(),URL.revokeObjectURL(ke)},"image/png"))},onRecordToggle:()=>{Je==="idle"?B():Je==="recording"&&J()},recordState:Je,onRotate:()=>{n({type:"input:rotate",sessionId:e}),L(te=>!te)},platformSlot:it,launchSlot:Lt}),v.jsxs("div",{className:"flex items-start gap-8",children:[v.jsxs("div",{ref:C,style:{width:I?Jn:ua,height:I?ua:Jn,position:"relative",flexShrink:0},children:[v.jsxs("div",{ref:T,className:`relative ${F?"cursor-pointer":"cursor-default"}`,style:{width:ua,height:Jn,...I?{position:"absolute",top:(ua-Jn)/2,left:(Jn-ua)/2,transform:"rotate(-90deg)",transformOrigin:"center center"}:{}},onPointerDown:Me,onPointerMove:qe,onPointerUp:et,onPointerCancel:Ot,onPointerLeave:gt,children:[v.jsx("img",{src:`data:image/png;base64,${g.framePng}`,style:{position:"absolute",top:0,left:0,zIndex:2,width:"100%",height:"100%",display:"block",pointerEvents:"none",userSelect:"none"},draggable:!1,alt:""}),v.jsx("canvas",{ref:E,style:{position:"absolute",zIndex:3,left:`${vr}%`,top:`${or}%`,width:`${we}%`,height:`${Fe}%`,borderRadius:Re>0?`${Re}px`:void 0,backgroundColor:"#010101",cursor:"none",visibility:$?"visible":"hidden"}}),!$&&v.jsx("div",{className:"absolute animate-pulse bg-zinc-800",style:{zIndex:3,left:`${vr}%`,top:`${or}%`,width:`${we}%`,height:`${Fe}%`,borderRadius:Re>0?`${Re}px`:void 0}}),P&&(()=>{const te=vr/100,be=or/100,fe=we/100,Be=Fe/100,ke=(Pe,Ue)=>({left:`${(te+Pe*fe)*100}%`,top:`${(be+Ue*Be)*100}%`});return v.jsx(v.Fragment,{children:[P.f0,P.f1].map((Pe,Ue)=>v.jsx("div",{style:{position:"absolute",zIndex:10,borderRadius:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none",transition:"width 0.1s ease, height 0.1s ease, background 0.1s ease",...Q?{width:as*2,height:as*2,background:"rgba(255,255,255,0.92)",border:"1.5px solid rgba(0,0,0,0.2)",boxShadow:"0 0 0 1px rgba(0,0,0,0.15), 0 0 8px rgba(255,255,255,0.25)"}:{width:ka*2,height:ka*2,background:"transparent",border:"1.5px solid rgba(255,255,255,0.6)",boxShadow:"0 0 0 1px rgba(0,0,0,0.3)"},...ke(Pe.x,Pe.y)}},Ue))})})(),a&&R===0&&v.jsx("div",{style:{position:"absolute",zIndex:8,left:`${vr}%`,top:`${or}%`,width:`${we}%`,height:`${Fe}%`,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:v.jsx("span",{style:{color:"white",fontSize:"0.875rem"},children:"Waiting for first frame..."})}),g.buttons.map(te=>{const be=Z===te.name,fe=F===te.name,Be=te.anchor==="bottom",ke=te.anchor==="top",Pe=Be?(te.normalOffset.y-te.buttonH/2)/g.compositeHeight*100:ke?te.rolloverOffset.y/g.compositeHeight*100:te.normalOffset.y/g.compositeHeight*100,Ue=te.buttonH/g.compositeHeight*100,wt=te.buttonW/g.compositeWidth*100,tn=te.buttonW/2,Io=(te.rolloverOffset.x-tn)/g.compositeWidth*100,ca=(2*te.rolloverOffset.x-te.normalOffset.x-tn)/g.compositeWidth*100,xn=te.rolloverOffset.x/g.compositeWidth*100,Fn=Be?(te.normalOffset.y-te.buttonH/2)/g.compositeHeight*100:ke?te.rolloverOffset.y/g.compositeHeight*100:te.normalOffset.y/g.compositeHeight*100,ei=ke?(2*te.rolloverOffset.y-te.normalOffset.y)/g.compositeHeight*100:0,ku=te.onTop?4:1;return v.jsxs(y.Fragment,{children:[te.buttonPng&&v.jsx("img",{src:`data:image/png;base64,${te.buttonPng}`,style:{position:"absolute",zIndex:ku,top:`${ke&&fe?ei:Pe}%`,left:`${ke?Io:fe?ca:Io}%`,width:`${wt}%`,height:`${Ue}%`,transition:ke?"top 0.15s ease":"left 0.15s ease",pointerEvents:"none",userSelect:"none"},draggable:!1,alt:""}),be&&te.pressedPng&&te.pressedRect&&v.jsx("img",{src:`data:image/png;base64,${te.pressedPng}`,style:{position:"absolute",zIndex:te.onTop?3:1,left:`${ke?Io:fe?ca:Io}%`,top:`${ke?fe?ei:Pe:te.pressedRect.y/g.compositeHeight*100}%`,width:`${te.pressedRect.width/g.compositeWidth*100}%`,height:`${te.pressedRect.height/g.compositeHeight*100}%`,pointerEvents:"none",userSelect:"none"},draggable:!1,alt:""}),fe&&v.jsx("div",{style:{position:"absolute",zIndex:5,left:`${xn}%`,top:`${Fn}%`,transform:"translate(-50%, calc(-100% - 8px))",background:"rgba(0,0,0,0.72)",color:"#fff",fontSize:11,padding:"2px 7px",borderRadius:4,whiteSpace:"nowrap",pointerEvents:"none"},children:te.accessibilityTitle})]},te.name)})]}),v.jsx("div",{ref:le,style:{display:"none",position:"absolute",zIndex:20,borderRadius:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none",transition:"width 0.1s ease, height 0.1s ease, background 0.1s ease, box-shadow 0.1s ease"}})]}),v.jsx(HA,{joined:a,fps:R,connected:r,deviceReady:o,bootError:d,installing:l,installError:f,keyboardActive:H})]})]})}class mne{constructor(t){this.onFrame=t,this.decoder=null,this.sps=null,this.pps=null,this.frameCount=0}decode(t){const n=new Uint8Array(t),a=n[0]===0&&n[1]===0&&n[2]===0&&n[3]===1?n.subarray(4):n,o=a[0]&31;if(o===7){const u=!this.sps||n.length!==this.sps.length||n.some((f,d)=>f!==this.sps[d]);this.sps=n,u&&this.decoder&&(this.decoder.close(),this.decoder=null);return}if(o===8){this.pps=n;return}if(o===5&&this.sps&&this.pps&&!this.decoder&&this.initDecoder(this.sps,this.pps),!this.decoder)return;const l=new Uint8Array(4+a.length);new DataView(l.buffer).setUint32(0,a.length,!1),l.set(a,4);try{this.decoder.decode(new EncodedVideoChunk({type:o===5?"key":"delta",timestamp:this.frameCount++*(1e6/30),data:l}))}catch{}}close(){var t;(t=this.decoder)==null||t.close(),this.decoder=null}initDecoder(t,n){const r=t[0]===0?t.subarray(4):t,a=`avc1.${r[1].toString(16).padStart(2,"0")}${r[2].toString(16).padStart(2,"0")}${r[3].toString(16).padStart(2,"0")}`,o=this.buildAVCC(t,n);this.decoder=new VideoDecoder({output:l=>this.onFrame(l),error:l=>console.error("[H264Decoder]",l)}),this.decoder.configure({codec:a,description:o,optimizeForLatency:!0})}buildAVCC(t,n){const r=t[0]===0?t.subarray(4):t,a=n[0]===0?n.subarray(4):n,o=new Uint8Array(8+r.length+1+2+a.length);let l=0;return o[l++]=1,o[l++]=r[1],o[l++]=r[2],o[l++]=r[3],o[l++]=255,o[l++]=225,o[l++]=r.length>>8&255,o[l++]=r.length&255,o.set(r,l),l+=r.length,o[l++]=1,o[l++]=a.length>>8&255,o[l++]=a.length&255,o.set(a,l),o}}const vne=`#version 300 es
408
- in vec2 a_pos;
409
- out vec2 v_uv;
410
- void main() {
411
- v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);
412
- gl_Position = vec4(a_pos, 0.0, 1.0);
413
- }`,gne=`#version 300 es
414
- precision mediump float;
415
- in vec2 v_uv;
416
- uniform sampler2D u_tex;
417
- out vec4 out_color;
418
- void main() {
419
- out_color = texture(u_tex, v_uv);
420
- }`;function yne(e){const t=e.getContext("webgl2",{alpha:!1,antialias:!1,powerPreference:"high-performance",preserveDrawingBuffer:!0});if(!t)return null;const n=(m,p)=>{const g=t.createShader(m);return t.shaderSource(g,p),t.compileShader(g),g},r=t.createProgram(),a=n(t.VERTEX_SHADER,vne),o=n(t.FRAGMENT_SHADER,gne);t.attachShader(r,a),t.attachShader(r,o),t.linkProgram(r),t.deleteShader(a),t.deleteShader(o),t.useProgram(r);const l=t.createVertexArray();t.bindVertexArray(l);const u=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,u),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),t.STATIC_DRAW);const f=t.getAttribLocation(r,"a_pos");t.enableVertexAttribArray(f),t.vertexAttribPointer(f,2,t.FLOAT,!1,0,0),t.bindVertexArray(null);const d=t.createTexture();return t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,d),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.uniform1i(t.getUniformLocation(r,"u_tex"),0),{gl:t,program:r,tex:d,vao:l}}function bne(e){const t=y.useRef(null),n=y.useCallback(()=>{const o=e.current;if(!o)return!1;const l=yne(o);return t.current=l,l!==null},[e]),r=y.useCallback(()=>{const o=t.current;o&&(o.gl.deleteTexture(o.tex),o.gl.deleteVertexArray(o.vao),o.gl.deleteProgram(o.program),t.current=null)},[]),a=y.useCallback(o=>{const l=e.current,u=t.current;if(!l||!u)return o.close(),null;const f=o.displayWidth,d=o.displayHeight;return(l.width!==f||l.height!==d)&&(l.width=f,l.height=d,u.gl.viewport(0,0,f,d)),u.gl.activeTexture(u.gl.TEXTURE0),u.gl.bindTexture(u.gl.TEXTURE_2D,u.tex),u.gl.texImage2D(u.gl.TEXTURE_2D,0,u.gl.RGBA,u.gl.RGBA,u.gl.UNSIGNED_BYTE,o),o.close(),u.gl.bindVertexArray(u.vao),u.gl.drawArrays(u.gl.TRIANGLES,0,6),u.gl.bindVertexArray(null),u.gl.bindTexture(u.gl.TEXTURE_2D,null),{width:f,height:d}},[e]);return{init:n,dispose:r,drawFrame:a}}const $a=13,is=8,OR=16,xne=.02,wne=720;function Sne({sessionId:e,buildId:t,send:n,connected:r,joined:a,deviceReady:o,installing:l,installed:u,installError:f,bootError:d,launching:m,setLaunching:p,androidButtons:g,binaryFrameHandlerRef:x,onRecordingUploaded:A,screenWidth:S,screenHeight:w,deviceRotation:O=0}){const E=y.useRef(null),T=y.useRef(null),{init:C,dispose:j,drawFrame:R}=bne(E),{fps:N,frameCount:k}=J3(),[$,V]=y.useState(!1),[I,L]=y.useState(!1),H=y.useRef(null),[W,Z]=y.useState(null),[z,F]=y.useState(!1),[Y,Q]=y.useState(!1),[K,P]=y.useState(null),U=y.useRef(K);y.useEffect(()=>{U.current=K},[K]);const ne=y.useRef(!1),me=y.useRef(!1),Ae=y.useRef(null),ce=y.useRef(0),de=y.useRef(null),Ce=y.useRef(null),le=y.useRef("idle"),_e=y.useRef(null);y.useEffect(()=>{if(!C()){L(!0);return}const Fe=new mne(Re=>{const it=R(Re);if(!it)return;k.current+=1,V(!0);const Lt=H.current;(!Lt||Lt.width!==it.width||Lt.height!==it.height)&&(H.current=it,Z(it))});return x.current=Re=>Fe.decode(Re),()=>{x.current=void 0,Fe.close(),j()}},[C,j,R,k,x]);const[Se,se]=y.useState("idle"),Ve=y.useRef(null),$e=y.useRef(!1),Je=y.useRef(null),Ke=y.useRef([]),vt=y.useRef(""),$t=y.useRef(0),qt=y.useRef(()=>{}),Tn=y.useCallback(()=>{if(!$e.current)return;const we=Ve.current,Fe=E.current;if(!we||!Fe)return;const Re=we.getContext("2d");if(!Re)return;Re.drawImage(Fe,0,0,we.width,we.height);const it=window.devicePixelRatio||1,Lt=we.width/it,te=we.height/it;Re.save(),Re.scale(it,it);const be=U.current;if(be)for(const Be of[be.f0,be.f1]){const ke=Be.x*Lt,Pe=Be.y*te;ne.current?(Re.beginPath(),Re.arc(ke,Pe,is,0,Math.PI*2),Re.fillStyle="rgba(255,255,255,0.92)",Re.fill(),Re.strokeStyle="rgba(0,0,0,0.2)",Re.lineWidth=1,Re.stroke()):(Re.beginPath(),Re.arc(ke,Pe,$a,0,Math.PI*2),Re.strokeStyle="rgba(0,0,0,0.3)",Re.lineWidth=3,Re.stroke(),Re.beginPath(),Re.arc(ke,Pe,$a,0,Math.PI*2),Re.strokeStyle="rgba(255,255,255,0.65)",Re.lineWidth=1.5,Re.stroke())}const fe=Ce.current;if(fe){const Be=le.current,ke=_e.current;if(Be==="down")Re.beginPath(),Re.arc(fe.x,fe.y,is,0,Math.PI*2),Re.fillStyle="rgba(255,255,255,0.92)",Re.fill(),Re.strokeStyle="rgba(0,0,0,0.2)",Re.lineWidth=1,Re.stroke();else if(Be==="release"&&ke){const Pe=Math.min((performance.now()-ke.startTime)/350,1);Re.beginPath(),Re.arc(fe.x,fe.y,is+26*Pe,0,Math.PI*2),Re.strokeStyle=`rgba(255,255,255,${(1-Pe)*.55})`,Re.lineWidth=1.5,Re.stroke(),Pe>=1&&(le.current="idle",_e.current=null)}else Re.beginPath(),Re.arc(fe.x,fe.y,$a,0,Math.PI*2),Re.strokeStyle="rgba(0,0,0,0.3)",Re.lineWidth=3,Re.stroke(),Re.beginPath(),Re.arc(fe.x,fe.y,$a,0,Math.PI*2),Re.strokeStyle="rgba(255,255,255,0.65)",Re.lineWidth=1.5,Re.stroke()}Re.restore(),$t.current=requestAnimationFrame(qt.current)},[]);y.useLayoutEffect(()=>{qt.current=Tn},[Tn]);const fn=y.useCallback(()=>{const we=Ve.current;if(!we)return;const Fe=T.current,Re=window.devicePixelRatio||1;if(Fe&&Fe.clientWidth>0)we.width=Fe.clientWidth*Re,we.height=Fe.clientHeight*Re;else{const fe=E.current;if(fe&&fe.width>0)we.width=fe.width,we.height=fe.height;else return}const it=we.getContext("2d");it&&(it.fillStyle="#000",it.fillRect(0,0,we.width,we.height));const te=["video/mp4;codecs=avc1","video/webm;codecs=vp9","video/webm;codecs=vp8","video/webm"].find(fe=>MediaRecorder.isTypeSupported(fe))??"";if(!te){console.error("[record] no supported codec");return}vt.current=te,Ke.current=[];const be=new MediaRecorder(we.captureStream(30),{mimeType:te});be.ondataavailable=fe=>{fe.data.size>0&&Ke.current.push(fe.data)},Je.current=be,be.start(1e3),$e.current=!0,$t.current=requestAnimationFrame(Tn),se("recording")},[Tn]),Pn=y.useCallback(async()=>{se("uploading"),$e.current=!1,cancelAnimationFrame($t.current);const we=Je.current;if(!we){se("idle");return}await new Promise(te=>{const be=setTimeout(te,5e3);we.onstop=()=>{clearTimeout(be),te()};try{we.stop()}catch{clearTimeout(be),te()}}),Je.current=null;const Fe=vt.current,Re=Fe.includes("mp4")?".mp4":".webm",it=new Blob(Ke.current,{type:Fe});Ke.current=[];const Lt=new FormData;Lt.append("file",it,`tapflow-${Date.now()}${Re}`);try{const te=new URLSearchParams({sessionId:e});t&&te.set("buildId",String(t));const be=await fetch(`/api/v1/recordings/upload?${te}`,{method:"POST",credentials:"include",body:Lt}),fe=await be.json();if(be.ok&&fe.url){const Be=document.createElement("a");Be.href=fe.url,Be.download="",Be.click(),A==null||A(),se("done"),setTimeout(()=>se("idle"),2e3)}else se("idle")}catch{se("idle")}},[e,t,A]);y.useEffect(()=>{if(Se!=="recording")return;const we=()=>{document.visibilityState==="hidden"&&Pn()};return document.addEventListener("visibilitychange",we),()=>{var Fe;document.removeEventListener("visibilitychange",we),$e.current&&($e.current=!1,cancelAnimationFrame($t.current),(Fe=Je.current)==null||Fe.stop(),Je.current=null)}},[Se,Pn]),y.useEffect(()=>{const we=new Set(["ShiftLeft","ShiftRight","ControlLeft","ControlRight","MetaLeft","MetaRight"]),Fe=te=>{if(te.code==="AltLeft"||te.code==="AltRight"){me.current=!0;return}if(!z||we.has(te.code))return;te.preventDefault();const be=(te.shiftKey?2:0)|(te.ctrlKey?1:0)|(te.metaKey?8:0);n({type:"input:key",sessionId:e,payload:{code:te.code,modifiers:be}})},Re=()=>{ne.current&&(ne.current=!1,Q(!1),n({type:"input:pinch:end",sessionId:e})),me.current=!1,P(null)},it=te=>{(te.code==="AltLeft"||te.code==="AltRight")&&Re()},Lt=()=>{me.current&&Re()};return window.addEventListener("keydown",Fe),window.addEventListener("keyup",it),window.addEventListener("blur",Lt),()=>{window.removeEventListener("keydown",Fe),window.removeEventListener("keyup",it),window.removeEventListener("blur",Lt)}},[z,n,e]),y.useEffect(()=>{if(!z)return;const we=Fe=>{const Re=T.current??E.current;Re&&!Re.contains(Fe.target)&&F(!1)};return document.addEventListener("pointerdown",we),()=>document.removeEventListener("pointerdown",we)},[z]);const Hn=y.useRef(!1),B=y.useCallback(we=>{const Fe=E.current;if(!Fe)return null;const Re=Fe.getBoundingClientRect();return cne({x:we.clientX,y:we.clientY},Re,Hn.current)},[]),J=y.useCallback(we=>{const Fe=B(we);return Fe?t4(Fe):null},[B]),ae=y.useCallback(we=>{if(me.current){const Lt=J(we);if(!Lt)return;ne.current=!0,Q(!0),we.target.setPointerCapture(we.pointerId),P(Lt),n({type:"input:pinch:start",sessionId:e,payload:Lt});return}const Fe=B(we);if(!Fe)return;F(!0),Ae.current=Fe,we.target.setPointerCapture(we.pointerId);const Re=we.currentTarget.getBoundingClientRect();Ce.current={x:we.clientX-Re.left,y:we.clientY-Re.top},le.current="down",_e.current=null;const it=de.current;it&&(it.style.display="block",it.style.left=`${we.clientX-Re.left}px`,it.style.top=`${we.clientY-Re.top}px`,it.style.width=`${is*2}px`,it.style.height=`${is*2}px`,it.style.background="rgba(255,255,255,0.92)",it.style.border="1.5px solid rgba(0,0,0,0.2)",it.style.boxShadow="0 0 0 1px rgba(0,0,0,0.15), 0 0 8px rgba(255,255,255,0.25)"),n({type:"input:touch:start",sessionId:e,payload:Fe})},[B,J,n,e]),Te=y.useCallback(we=>{if(we.buttons===0){if(me.current){P(J(we)),Ce.current=null;return}const fe=B(we),Be=we.currentTarget.getBoundingClientRect(),ke=de.current;fe?(Ce.current={x:we.clientX-Be.left,y:we.clientY-Be.top},le.current!=="down"&&(le.current="idle"),ke&&(ke.style.display="block",ke.style.left=`${we.clientX-Be.left}px`,ke.style.top=`${we.clientY-Be.top}px`,ke.style.width=`${$a*2}px`,ke.style.height=`${$a*2}px`,ke.style.background="transparent",ke.style.border="1.5px solid rgba(255,255,255,0.6)",ke.style.boxShadow="0 0 0 1px rgba(0,0,0,0.3)")):(Ce.current=null,ke&&(ke.style.display="none"));return}if(ne.current){const fe=J(we);if(!fe)return;const Be=performance.now();if(Be-ce.current<OR)return;ce.current=Be,P(fe),n({type:"input:pinch:move",sessionId:e,payload:fe});return}if(!Ae.current)return;const Fe=B(we);if(!Fe)return;const Re=Fe.x-Ae.current.x,it=Fe.y-Ae.current.y;if(Math.sqrt(Re*Re+it*it)<xne)return;const Lt=performance.now();if(Lt-ce.current<OR)return;ce.current=Lt;const te=we.currentTarget.getBoundingClientRect();Ce.current={x:we.clientX-te.left,y:we.clientY-te.top};const be=de.current;be&&be.style.display!=="none"&&(be.style.left=`${we.clientX-te.left}px`,be.style.top=`${we.clientY-te.top}px`),n({type:"input:touch:move",sessionId:e,payload:Fe})},[B,J,n,e]),Ee=y.useCallback(()=>{if(ne.current){ne.current=!1,Q(!1),P(null),n({type:"input:pinch:end",sessionId:e});return}Ae.current=null,le.current="release",_e.current={startTime:performance.now()};const we=de.current;we&&(we.style.width=`${$a*2}px`,we.style.height=`${$a*2}px`,we.style.background="transparent",we.style.border="1.5px solid rgba(255,255,255,0.6)",we.style.boxShadow="0 0 0 1px rgba(0,0,0,0.3)"),n({type:"input:touch:end",sessionId:e})},[n,e]),Oe=y.useCallback(()=>{if(ne.current){ne.current=!1,Q(!1),P(null),n({type:"input:pinch:end",sessionId:e});return}Ae.current=null,le.current="release",_e.current={startTime:performance.now()},n({type:"input:touch:end",sessionId:e})},[n,e]),Me=y.useCallback(()=>{P(null),Ce.current=null;const we=de.current;we&&(we.style.display="none")},[]),qe=W??(S&&w?{width:S,height:w}:null),et=qe?Math.min(1,wne/Math.max(qe.width,qe.height)):.3,Ot=qe?Math.round(qe.width*et):324,gt=qe?Math.round(qe.height*et):720,zt=O===1||O===3,dn=qe?qe.width>qe.height:!1,mr=zt&&!dn;y.useLayoutEffect(()=>{Hn.current=mr},[mr]);const la=mr?gt:Ot,ua=mr?Ot:gt,Jn=mr?{position:"absolute",width:Ot,height:gt,top:(Ot-gt)/2,left:(gt-Ot)/2,transform:"rotate(90deg)",transformOrigin:"center center",visibility:$?"visible":"hidden",cursor:"none"}:{visibility:$?"visible":"hidden",cursor:"none"},vr=v.jsx(v.Fragment,{children:g==null?void 0:g.map(we=>v.jsxs(Fa,{children:[v.jsx(Va,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>n({type:"input:button",sessionId:e,payload:{name:we.name}}),children:we.name==="back"?v.jsx(ZF,{className:"h-4 w-4"}):we.name==="recent_apps"?v.jsx(Bz,{className:"h-4 w-4"}):we.name==="volume_up"?v.jsx(OV,{className:"h-4 w-4"}):we.name==="volume_down"?v.jsx(AV,{className:"h-4 w-4"}):we.name==="power"?v.jsx(hV,{className:"h-4 w-4"}):v.jsx(Iz,{className:"h-4 w-4"})})}),v.jsx(Aa,{side:"left",children:we.accessibilityTitle})]},we.name))}),or=u&&t?v.jsxs(Fa,{children:[v.jsx(Va,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",disabled:m||l,onClick:()=>{p(!0),n({type:"app:launch",sessionId:e,buildId:t})},children:m?v.jsx(bp,{className:"h-4 w-4 animate-spin"}):v.jsx(H_,{className:"h-4 w-4"})})}),v.jsx(Aa,{side:"left",children:m?"Launching…":l?"Installing…":"Launch app"})]}):null;return v.jsxs("div",{className:"flex items-start justify-center gap-16",children:[v.jsx("canvas",{ref:Ve,style:{display:"none"}}),v.jsx(e4,{joined:a,onScreenshot:()=>{const we=E.current;if(!we)return;const Fe=document.createElement("canvas"),Re=Fe.getContext("2d");Re&&(Fe.width=we.width,Fe.height=we.height,Re.drawImage(we,0,0),Fe.toBlob(it=>{if(!it)return;const Lt=URL.createObjectURL(it),te=document.createElement("a");te.href=Lt,te.download=`tapflow-${Date.now()}.png`,te.click(),URL.revokeObjectURL(Lt)},"image/png"))},onRecordToggle:()=>{Se==="idle"?fn():Se==="recording"&&Pn()},recordState:Se,onRotate:()=>n({type:"input:rotate",sessionId:e}),platformSlot:vr,launchSlot:or}),v.jsxs("div",{className:"flex items-start gap-8",children:[v.jsx("div",{style:{background:"#1c1c1e",borderRadius:"34px",padding:"12px",flexShrink:0,boxShadow:"0 8px 32px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06)"},children:v.jsx("div",{ref:T,className:"relative",style:{width:la,height:ua,backgroundColor:"#010101",borderRadius:"22px",overflow:"hidden"},children:I?v.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:v.jsx("span",{style:{color:"rgba(255,255,255,0.6)",fontSize:"0.875rem"},children:"WebGL2 not supported"})}):v.jsxs(v.Fragment,{children:[v.jsx("canvas",{ref:E,className:mr?void 0:"block w-full h-full",style:Jn,onPointerDown:ae,onPointerMove:Te,onPointerUp:Ee,onPointerCancel:Oe,onPointerLeave:Me}),!$&&v.jsx("div",{className:"absolute inset-0 animate-pulse bg-zinc-800"}),!$&&o&&v.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:v.jsx("span",{style:{color:"rgba(255,255,255,0.6)",fontSize:"0.875rem"},children:"Waiting for stream…"})}),v.jsx("div",{ref:de,style:{display:"none",position:"absolute",zIndex:20,borderRadius:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none",transition:"width 0.1s ease, height 0.1s ease, background 0.1s ease, box-shadow 0.1s ease"}}),K&&v.jsx(v.Fragment,{children:[K.f0,K.f1].map((we,Fe)=>v.jsx("div",{style:{position:"absolute",zIndex:10,borderRadius:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none",transition:"width 0.1s ease, height 0.1s ease, background 0.1s ease",left:`${we.x*100}%`,top:`${we.y*100}%`,...Y?{width:is*2,height:is*2,background:"rgba(255,255,255,0.92)",border:"1.5px solid rgba(0,0,0,0.2)",boxShadow:"0 0 0 1px rgba(0,0,0,0.15), 0 0 8px rgba(255,255,255,0.25)"}:{width:$a*2,height:$a*2,background:"transparent",border:"1.5px solid rgba(255,255,255,0.6)",boxShadow:"0 0 0 1px rgba(0,0,0,0.3)"}}},Fe))})]})})}),v.jsx(HA,{joined:a,fps:N,connected:r,deviceReady:o,bootError:d,installing:l,installError:f,keyboardActive:z})]})]})}function _ne({sessionId:e,deviceId:t,buildId:n,resetMode:r,onRecordingUploaded:a}){const o=y.useRef(()=>{}),[l,u]=y.useState(!1),[f,d]=y.useState(!1),[m,p]=y.useState(null),[g,x]=y.useState(!1),[A,S]=y.useState(!1),[w,O]=y.useState(null),[E,T]=y.useState(null),[C,j]=y.useState(!1),[R,N]=y.useState(0),[k,$]=y.useState(!1),[V,I]=y.useState(!1),L=y.useRef(void 0),H=y.useCallback(P=>{if(P.type==="session:joined"&&(u(!0),o.current({type:"device:boot",sessionId:e,payload:{deviceId:t,resetMode:r}})),P.type==="device:boot-error"&&T(P.message),P.type==="device:booting"&&(d(!1),x(!1),S(!1),O(null),T(null),p(null),N(0)),P.type==="device:rotate"&&N(P.payload.rotation),P.type==="device:ready"&&(d(!0),n&&(x(!0),o.current({type:"app:install",sessionId:e,buildId:n}))),P.type==="app:install-done"&&(x(!1),S(!0)),P.type==="app:install-error"&&(x(!1),O(P.message)),P.type==="app:launch-done"&&j(!1),P.type==="app:launch-error"&&j(!1),P.type==="session:chrome"&&p(P.payload),P.type==="keyboard:toggled"){const{visible:U}=P.payload;$(U),I(!1)}},[e,t,n]),W=y.useCallback(P=>{var U;(U=L.current)==null||U.call(L,P)},[]),{send:Z,connected:z}=qA(H,W);o.current=Z,y.useEffect(()=>{z&&Z({type:"session:start",sessionId:e})},[z,Z,e]);const F=m!==null&&"framePng"in m?m:null,Y=m!==null&&!("framePng"in m)?m:null,K={sessionId:e,buildId:n,send:Z,connected:z,joined:l,deviceReady:f,installing:g,installed:A,installError:w,bootError:E,launching:C,setLaunching:j,binaryFrameHandlerRef:L,onRecordingUploaded:a,swKeyboardVisible:k,swKeyboardPending:V,onKbdToggle:()=>{I(!0),Z({type:"input:keyboard:toggle",sessionId:e})}};return!F&&!Y?v.jsxs("div",{className:"flex items-start justify-center gap-16",children:[v.jsx("div",{className:"flex flex-col items-center gap-0.5 rounded-2xl border bg-background/90 px-1.5 py-2.5 shrink-0 mt-3 opacity-40",children:Array.from({length:5}).map((P,U)=>v.jsx("div",{className:"h-8 w-8 rounded-md bg-muted animate-pulse"},U))}),v.jsxs("div",{className:"flex items-start gap-8",children:[v.jsx("div",{style:{background:"#1c1c1e",borderRadius:"34px",padding:"12px",flexShrink:0},children:v.jsx("div",{className:"animate-pulse bg-zinc-800",style:{width:324,height:720,borderRadius:"22px"}})}),v.jsx(HA,{joined:l,fps:0,connected:z,deviceReady:f,bootError:E,installing:g,installError:w,keyboardActive:!1})]})]}):v.jsxs(v.Fragment,{children:[F&&v.jsx(pne,{...K,chrome:F}),Y&&v.jsx(Sne,{...K,androidButtons:Y.buttons,screenWidth:Y.screenWidth,screenHeight:Y.screenHeight,deviceRotation:R})]})}var bv="Tabs",[Ane]=aa(bv,[tv]),n4=tv(),[One,FA]=Ane(bv),r4=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:a,defaultValue:o,orientation:l="horizontal",dir:u,activationMode:f="automatic",...d}=e,m=ad(u),[p,g]=_o({prop:r,onChange:a,defaultProp:o??"",caller:bv});return v.jsx(One,{scope:n,baseId:_a(),value:p,onValueChange:g,orientation:l,dir:m,activationMode:f,children:v.jsx(Ye.div,{dir:m,"data-orientation":l,...d,ref:t})})});r4.displayName=bv;var a4="TabsList",i4=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...a}=e,o=FA(a4,n),l=n4(n);return v.jsx(T5,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:r,children:v.jsx(Ye.div,{role:"tablist","aria-orientation":o.orientation,...a,ref:t})})});i4.displayName=a4;var o4="TabsTrigger",s4=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:a=!1,...o}=e,l=FA(o4,n),u=n4(n),f=c4(l.baseId,r),d=f4(l.baseId,r),m=r===l.value;return v.jsx(C5,{asChild:!0,...u,focusable:!a,active:m,children:v.jsx(Ye.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":d,"data-state":m?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:f,...o,ref:t,onMouseDown:De(e.onMouseDown,p=>{!a&&p.button===0&&p.ctrlKey===!1?l.onValueChange(r):p.preventDefault()}),onKeyDown:De(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&l.onValueChange(r)}),onFocus:De(e.onFocus,()=>{const p=l.activationMode!=="manual";!m&&!a&&p&&l.onValueChange(r)})})})});s4.displayName=o4;var l4="TabsContent",u4=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:a,children:o,...l}=e,u=FA(l4,n),f=c4(u.baseId,r),d=f4(u.baseId,r),m=r===u.value,p=y.useRef(m);return y.useEffect(()=>{const g=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(g)},[]),v.jsx(ar,{present:a||m,children:({present:g})=>v.jsx(Ye.div,{"data-state":m?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":f,hidden:!g,id:d,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:g&&o})})});u4.displayName=l4;function c4(e,t){return`${e}-trigger-${t}`}function f4(e,t){return`${e}-content-${t}`}var Ene=r4,d4=i4,h4=s4,p4=u4;const m4=Ene,VA=y.forwardRef(({className:e,...t},n)=>v.jsx(d4,{ref:n,className:ye("inline-flex h-9 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));VA.displayName=d4.displayName;const $p=y.forwardRef(({className:e,...t},n)=>v.jsx(h4,{ref:n,className:ye("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));$p.displayName=h4.displayName;const dS=y.forwardRef(({className:e,...t},n)=>v.jsx(p4,{ref:n,className:ye("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));dS.displayName=p4.displayName;const v4=y.forwardRef(({className:e,...t},n)=>v.jsx("textarea",{className:ye("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));v4.displayName="Textarea";function jne(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var GA="ScrollArea",[g4]=aa(GA),[Tne,oa]=g4(GA),y4=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:o=600,...l}=e,[u,f]=y.useState(null),[d,m]=y.useState(null),[p,g]=y.useState(null),[x,A]=y.useState(null),[S,w]=y.useState(null),[O,E]=y.useState(0),[T,C]=y.useState(0),[j,R]=y.useState(!1),[N,k]=y.useState(!1),$=ot(t,I=>f(I)),V=ad(a);return v.jsx(Tne,{scope:n,type:r,dir:V,scrollHideDelay:o,scrollArea:u,viewport:d,onViewportChange:m,content:p,onContentChange:g,scrollbarX:x,onScrollbarXChange:A,scrollbarXEnabled:j,onScrollbarXEnabledChange:R,scrollbarY:S,onScrollbarYChange:w,scrollbarYEnabled:N,onScrollbarYEnabledChange:k,onCornerWidthChange:E,onCornerHeightChange:C,children:v.jsx(Ye.div,{dir:V,...l,ref:$,style:{position:"relative","--radix-scroll-area-corner-width":O+"px","--radix-scroll-area-corner-height":T+"px",...e.style}})})});y4.displayName=GA;var b4="ScrollAreaViewport",x4=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...o}=e,l=oa(b4,n),u=y.useRef(null),f=ot(t,u,l.onViewportChange);return v.jsxs(v.Fragment,{children:[v.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),v.jsx(Ye.div,{"data-radix-scroll-area-viewport":"",...o,ref:f,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:v.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});x4.displayName=b4;var Qa="ScrollAreaScrollbar",WA=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=oa(Qa,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:l}=a,u=e.orientation==="horizontal";return y.useEffect(()=>(u?o(!0):l(!0),()=>{u?o(!1):l(!1)}),[u,o,l]),a.type==="hover"?v.jsx(Cne,{...r,ref:t,forceMount:n}):a.type==="scroll"?v.jsx(Rne,{...r,ref:t,forceMount:n}):a.type==="auto"?v.jsx(w4,{...r,ref:t,forceMount:n}):a.type==="always"?v.jsx(ZA,{...r,ref:t}):null});WA.displayName=Qa;var Cne=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=oa(Qa,e.__scopeScrollArea),[o,l]=y.useState(!1);return y.useEffect(()=>{const u=a.scrollArea;let f=0;if(u){const d=()=>{window.clearTimeout(f),l(!0)},m=()=>{f=window.setTimeout(()=>l(!1),a.scrollHideDelay)};return u.addEventListener("pointerenter",d),u.addEventListener("pointerleave",m),()=>{window.clearTimeout(f),u.removeEventListener("pointerenter",d),u.removeEventListener("pointerleave",m)}}},[a.scrollArea,a.scrollHideDelay]),v.jsx(ar,{present:n||o,children:v.jsx(w4,{"data-state":o?"visible":"hidden",...r,ref:t})})}),Rne=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=oa(Qa,e.__scopeScrollArea),o=e.orientation==="horizontal",l=wv(()=>f("SCROLL_END"),100),[u,f]=jne("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(u==="idle"){const d=window.setTimeout(()=>f("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(d)}},[u,a.scrollHideDelay,f]),y.useEffect(()=>{const d=a.viewport,m=o?"scrollLeft":"scrollTop";if(d){let p=d[m];const g=()=>{const x=d[m];p!==x&&(f("SCROLL"),l()),p=x};return d.addEventListener("scroll",g),()=>d.removeEventListener("scroll",g)}},[a.viewport,o,f,l]),v.jsx(ar,{present:n||u!=="hidden",children:v.jsx(ZA,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:De(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:De(e.onPointerLeave,()=>f("POINTER_LEAVE"))})})}),w4=y.forwardRef((e,t)=>{const n=oa(Qa,e.__scopeScrollArea),{forceMount:r,...a}=e,[o,l]=y.useState(!1),u=e.orientation==="horizontal",f=wv(()=>{if(n.viewport){const d=n.viewport.offsetWidth<n.viewport.scrollWidth,m=n.viewport.offsetHeight<n.viewport.scrollHeight;l(u?d:m)}},10);return Wl(n.viewport,f),Wl(n.content,f),v.jsx(ar,{present:r||o,children:v.jsx(ZA,{"data-state":o?"visible":"hidden",...a,ref:t})})}),ZA=y.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,a=oa(Qa,e.__scopeScrollArea),o=y.useRef(null),l=y.useRef(0),[u,f]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=E4(u.viewport,u.content),m={...r,sizes:u,onSizesChange:f,hasThumb:d>0&&d<1,onThumbChange:g=>o.current=g,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:g=>l.current=g};function p(g,x){return $ne(g,l.current,u,x)}return n==="horizontal"?v.jsx(Nne,{...m,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const g=a.viewport.scrollLeft,x=ER(g,u,a.dir);o.current.style.transform=`translate3d(${x}px, 0, 0)`}},onWheelScroll:g=>{a.viewport&&(a.viewport.scrollLeft=g)},onDragScroll:g=>{a.viewport&&(a.viewport.scrollLeft=p(g,a.dir))}}):n==="vertical"?v.jsx(Mne,{...m,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const g=a.viewport.scrollTop,x=ER(g,u);o.current.style.transform=`translate3d(0, ${x}px, 0)`}},onWheelScroll:g=>{a.viewport&&(a.viewport.scrollTop=g)},onDragScroll:g=>{a.viewport&&(a.viewport.scrollTop=p(g))}}):null}),Nne=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=oa(Qa,e.__scopeScrollArea),[l,u]=y.useState(),f=y.useRef(null),d=ot(t,f,o.onScrollbarXChange);return y.useEffect(()=>{f.current&&u(getComputedStyle(f.current))},[f]),v.jsx(_4,{"data-orientation":"horizontal",...a,ref:d,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":xv(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.x),onDragScroll:m=>e.onDragScroll(m.x),onWheelScroll:(m,p)=>{if(o.viewport){const g=o.viewport.scrollLeft+m.deltaX;e.onWheelScroll(g),T4(g,p)&&m.preventDefault()}},onResize:()=>{f.current&&o.viewport&&l&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:Lp(l.paddingLeft),paddingEnd:Lp(l.paddingRight)}})}})}),Mne=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=oa(Qa,e.__scopeScrollArea),[l,u]=y.useState(),f=y.useRef(null),d=ot(t,f,o.onScrollbarYChange);return y.useEffect(()=>{f.current&&u(getComputedStyle(f.current))},[f]),v.jsx(_4,{"data-orientation":"vertical",...a,ref:d,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":xv(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.y),onDragScroll:m=>e.onDragScroll(m.y),onWheelScroll:(m,p)=>{if(o.viewport){const g=o.viewport.scrollTop+m.deltaY;e.onWheelScroll(g),T4(g,p)&&m.preventDefault()}},onResize:()=>{f.current&&o.viewport&&l&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:Lp(l.paddingTop),paddingEnd:Lp(l.paddingBottom)}})}})}),[Pne,S4]=g4(Qa),_4=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:o,onThumbPointerUp:l,onThumbPointerDown:u,onThumbPositionChange:f,onDragScroll:d,onWheelScroll:m,onResize:p,...g}=e,x=oa(Qa,n),[A,S]=y.useState(null),w=ot(t,$=>S($)),O=y.useRef(null),E=y.useRef(""),T=x.viewport,C=r.content-r.viewport,j=In(m),R=In(f),N=wv(p,10);function k($){if(O.current){const V=$.clientX-O.current.left,I=$.clientY-O.current.top;d({x:V,y:I})}}return y.useEffect(()=>{const $=V=>{const I=V.target;(A==null?void 0:A.contains(I))&&j(V,C)};return document.addEventListener("wheel",$,{passive:!1}),()=>document.removeEventListener("wheel",$,{passive:!1})},[T,A,C,j]),y.useEffect(R,[r,R]),Wl(A,N),Wl(x.content,N),v.jsx(Pne,{scope:n,scrollbar:A,hasThumb:a,onThumbChange:In(o),onThumbPointerUp:In(l),onThumbPositionChange:R,onThumbPointerDown:In(u),children:v.jsx(Ye.div,{...g,ref:w,style:{position:"absolute",...g.style},onPointerDown:De(e.onPointerDown,$=>{$.button===0&&($.target.setPointerCapture($.pointerId),O.current=A.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",x.viewport&&(x.viewport.style.scrollBehavior="auto"),k($))}),onPointerMove:De(e.onPointerMove,k),onPointerUp:De(e.onPointerUp,$=>{const V=$.target;V.hasPointerCapture($.pointerId)&&V.releasePointerCapture($.pointerId),document.body.style.webkitUserSelect=E.current,x.viewport&&(x.viewport.style.scrollBehavior=""),O.current=null})})})}),zp="ScrollAreaThumb",A4=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=S4(zp,e.__scopeScrollArea);return v.jsx(ar,{present:n||a.hasThumb,children:v.jsx(Dne,{ref:t,...r})})}),Dne=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,o=oa(zp,n),l=S4(zp,n),{onThumbPositionChange:u}=l,f=ot(t,p=>l.onThumbChange(p)),d=y.useRef(void 0),m=wv(()=>{d.current&&(d.current(),d.current=void 0)},100);return y.useEffect(()=>{const p=o.viewport;if(p){const g=()=>{if(m(),!d.current){const x=zne(p,u);d.current=x,u()}};return u(),p.addEventListener("scroll",g),()=>p.removeEventListener("scroll",g)}},[o.viewport,m,u]),v.jsx(Ye.div,{"data-state":l.hasThumb?"visible":"hidden",...a,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:De(e.onPointerDownCapture,p=>{const x=p.target.getBoundingClientRect(),A=p.clientX-x.left,S=p.clientY-x.top;l.onThumbPointerDown({x:A,y:S})}),onPointerUp:De(e.onPointerUp,l.onThumbPointerUp)})});A4.displayName=zp;var YA="ScrollAreaCorner",O4=y.forwardRef((e,t)=>{const n=oa(YA,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?v.jsx(kne,{...e,ref:t}):null});O4.displayName=YA;var kne=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=oa(YA,n),[o,l]=y.useState(0),[u,f]=y.useState(0),d=!!(o&&u);return Wl(a.scrollbarX,()=>{var p;const m=((p=a.scrollbarX)==null?void 0:p.offsetHeight)||0;a.onCornerHeightChange(m),f(m)}),Wl(a.scrollbarY,()=>{var p;const m=((p=a.scrollbarY)==null?void 0:p.offsetWidth)||0;a.onCornerWidthChange(m),l(m)}),d?v.jsx(Ye.div,{...r,ref:t,style:{width:o,height:u,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Lp(e){return e?parseInt(e,10):0}function E4(e,t){const n=e/t;return isNaN(n)?0:n}function xv(e){const t=E4(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function $ne(e,t,n,r="ltr"){const a=xv(n),o=a/2,l=t||o,u=a-l,f=n.scrollbar.paddingStart+l,d=n.scrollbar.size-n.scrollbar.paddingEnd-u,m=n.content-n.viewport,p=r==="ltr"?[0,m]:[m*-1,0];return j4([f,d],p)(e)}function ER(e,t,n="ltr"){const r=xv(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-a,l=t.content-t.viewport,u=o-r,f=n==="ltr"?[0,l]:[l*-1,0],d=oS(e,f);return j4([0,l],[0,u])(d)}function j4(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function T4(e,t){return e>0&&e<t}var zne=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function a(){const o={left:e.scrollLeft,top:e.scrollTop},l=n.left!==o.left,u=n.top!==o.top;(l||u)&&t(),n=o,r=window.requestAnimationFrame(a)})(),()=>window.cancelAnimationFrame(r)};function wv(e,t){const n=In(e),r=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),y.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Wl(e,t){const n=In(t);Un(()=>{let r=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return a.observe(e),()=>{window.cancelAnimationFrame(r),a.unobserve(e)}}},[e,n])}var C4=y4,Lne=x4,Ine=O4;const R4=y.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(C4,{ref:r,className:ye("relative overflow-hidden",e),...n,children:[v.jsx(Lne,{className:"h-full w-full rounded-[inherit]",children:t}),v.jsx(N4,{}),v.jsx(Ine,{})]}));R4.displayName=C4.displayName;const N4=y.forwardRef(({className:e,orientation:t="vertical",...n},r)=>v.jsx(WA,{ref:r,orientation:t,className:ye("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:v.jsx(A4,{className:"relative flex-1 rounded-full bg-border"})}));N4.displayName=WA.displayName;function M4(e){return/[Zz]|[+-]\d{2}/.test(e)?new Date(e):new Date(e.replace(" ","T")+"Z")}function Bne(e){const t=new Map;for(const a of e){const o=M4(a.created_at).toDateString();t.has(o)||t.set(o,[]),t.get(o).push(a)}const n=new Date().toDateString(),r=new Date(Date.now()-864e5).toDateString();return Array.from(t.entries()).map(([a,o])=>{let l;if(a===n)l="Today";else if(a===r)l="Yesterday";else{const u=new Date(a);l=u.toLocaleDateString(void 0,{month:"short",day:"numeric",...u.getFullYear()!==new Date().getFullYear()?{year:"numeric"}:{}})}return{label:l,items:o}})}function Une(e){return M4(e).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}const qne=5*1024*1024,Hne=["image/png","image/jpeg","image/webp"];function Fne({buildId:e}){const[t,n]=y.useState([]),[r,a]=y.useState(""),[o,l]=y.useState(null),[u,f]=y.useState(!1),[d,m]=y.useState(""),p=y.useRef(null),g=y.useRef({});function x(){fetch(`/api/v1/comments?build_id=${e}`,{credentials:"include"}).then(E=>E.ok?E.json():[]).then(n)}y.useEffect(()=>{x()},[e]),y.useEffect(()=>{const E=window.location.hash;if(!E.startsWith("#comment-"))return;const T=Number(E.replace("#comment-","")),C=g.current[T];if(!C)return;C.scrollIntoView({behavior:"smooth"});const j=document.documentElement.classList.contains("dark");C.style.backgroundColor=j?"rgb(0 112 243 / 0.18)":"#d3e5ff",setTimeout(()=>{C.style.backgroundColor=""},2e3)},[t]);function A(E){const T=`${location.origin}${location.pathname}${location.search}#comment-${E}`;navigator.clipboard.writeText(T).catch(()=>{})}function S(E){if(m(""),!Hne.includes(E.type)){m("Only png, jpg, webp allowed");return}if(E.size>qne){m("Max 5MB");return}l(E)}async function w(E){if(E.preventDefault(),!r.trim()&&!o)return;f(!0);const T=new FormData;T.append("build_id",String(e)),T.append("body",r),o&&T.append("attachment",o),(await fetch("/api/v1/comments",{method:"POST",credentials:"include",body:T})).ok&&(a(""),l(null),x()),f(!1)}const O=Bne(t);return v.jsxs("div",{className:"flex h-full flex-col gap-3",children:[v.jsx(R4,{className:"flex-1 rounded-md border",children:v.jsx("div",{className:"p-3",children:t.length===0?v.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No comments yet."}):v.jsx("div",{className:"flex flex-col",children:O.map(({label:E,items:T})=>v.jsxs("div",{children:[v.jsxs("div",{className:"flex items-center gap-2 py-3",children:[v.jsx("div",{className:"h-px flex-1 bg-border"}),v.jsx("span",{className:"text-[11px] font-medium text-muted-foreground px-1 select-none",children:E}),v.jsx("div",{className:"h-px flex-1 bg-border"})]}),v.jsx("div",{className:"flex flex-col gap-4",children:T.map(C=>v.jsxs("div",{id:`comment-${C.id}`,ref:j=>{g.current[C.id]=j},className:"group flex gap-2.5 rounded-md px-2 py-1.5 transition-all",children:[v.jsx("div",{className:"mt-0.5 shrink-0",children:v.jsx(EI,{name:C.author,avatarUrl:C.authorAvatarUrl,size:28})}),v.jsxs("div",{className:"flex-1 min-w-0",children:[v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("span",{className:"text-sm font-semibold leading-none",children:C.author}),v.jsx("span",{className:"text-[11px] text-muted-foreground leading-none",children:Une(C.created_at)}),v.jsx(ct,{variant:"ghost",size:"icon",className:"h-4 w-4 ml-0.5 opacity-0 group-hover:opacity-50 hover:!opacity-100 transition-opacity",onClick:()=>A(C.id),children:v.jsx(sV,{className:"h-3 w-3"})})]}),v.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap mt-1",children:C.body}),C.attachments.map(j=>v.jsx("a",{href:j.file_path,target:"_blank",rel:"noreferrer",className:"mt-1.5 block",children:v.jsx("img",{src:j.file_path,alt:"attachment",className:"max-h-48 rounded border object-contain"})},j.id))]})]},C.id))})]},E))})})}),v.jsx("div",{className:"px-1 pb-1",children:v.jsx("form",{onSubmit:w,children:v.jsxs("div",{className:"rounded-xl border border-input bg-background ring-offset-background transition-shadow focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",children:[v.jsx(v4,{placeholder:"Leave a comment…",value:r,onChange:E=>a(E.target.value),className:"min-h-16 resize-none border-0 bg-transparent shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 text-sm"}),(o||d)&&v.jsxs("div",{className:"px-3 -mt-1 pb-1",children:[o&&v.jsx("p",{className:"text-xs text-muted-foreground",children:o.name}),d&&v.jsx("p",{className:"text-xs text-destructive",children:d})]}),v.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[v.jsx(ct,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>{var E;return(E=p.current)==null?void 0:E.click()},children:v.jsx(nV,{className:"h-4 w-4"})}),v.jsx("input",{ref:p,type:"file",accept:"image/png,image/jpeg,image/webp",className:"hidden",onChange:E=>{var C;const T=(C=E.target.files)==null?void 0:C[0];T&&S(T)}}),v.jsx("div",{className:"flex-1"}),v.jsx(ct,{type:"submit",size:"icon",className:"h-7 w-7 rounded-full",disabled:u||!r.trim()&&!o,children:v.jsx(YF,{className:"h-3.5 w-3.5"})})]})]})})})]})}function Vne(e){return e<1024*1024?`${(e/1024).toFixed(0)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function Gne(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Wne(e){const t=new Date(e).getTime()-Date.now();if(t<=0)return{label:"Expired",urgent:!0};const n=Math.floor(t/36e5);return n<1?{label:"< 1 hour left",urgent:!0}:n<24?{label:`Expires in ${n}h`,urgent:n<6}:{label:`Expires in ${Math.floor(n/24)}d`,urgent:!1}}function Zne({buildId:e,refreshKey:t}){const[n,r]=y.useState([]),[a,o]=y.useState(!0);return y.useEffect(()=>{o(!0),fetch(`/api/v1/recordings?buildId=${e}`,{credentials:"include"}).then(l=>l.ok?l.json():[]).then(l=>r(l)).catch(()=>r([])).finally(()=>o(!1))},[e,t]),a?v.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading recordings…"}):n.length===0?v.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"No recordings yet."}):v.jsx("div",{className:"flex flex-col gap-2",children:n.map(l=>{const u=Wne(l.expiresAt);return v.jsxs("div",{className:"flex items-center justify-between rounded-md border border-border px-3 py-2 text-sm",children:[v.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0",children:[v.jsx("span",{className:"text-xs font-medium truncate",children:Gne(l.createdAt)}),v.jsxs("span",{className:`text-xs ${u.urgent?"text-destructive":"text-muted-foreground"}`,children:[u.label," · ",Vne(l.fileSize)]})]}),v.jsx(ct,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0 ml-2",title:"Download",onClick:()=>{const f=document.createElement("a");f.href=l.url,f.download="",f.click()},children:v.jsx(eV,{className:"h-3.5 w-3.5"})})]},l.id)})})}function Yne({buildId:e,recordingsRefreshKey:t=0}){return v.jsxs(m4,{defaultValue:"comments",className:"flex h-full flex-col",children:[v.jsxs(VA,{className:"w-full shrink-0",children:[v.jsxs($p,{value:"comments",className:"flex-1 gap-1.5",children:[v.jsx(uV,{className:"h-3.5 w-3.5"}),"Comments"]}),v.jsxs($p,{value:"recordings",className:"flex-1 gap-1.5",children:[v.jsx(tV,{className:"h-3.5 w-3.5"}),"Recordings"]})]}),v.jsx(dS,{value:"comments",className:"mt-3 min-h-0 flex-1 overflow-hidden",children:v.jsx(Fne,{buildId:e})}),v.jsx(dS,{value:"recordings",className:"mt-3 min-h-0 flex-1 overflow-y-auto",children:v.jsx(Zne,{buildId:e,refreshKey:t})})]})}const P4=y.forwardRef(({...e},t)=>v.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));P4.displayName="Breadcrumb";const D4=y.forwardRef(({className:e,...t},n)=>v.jsx("ol",{ref:n,className:ye("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));D4.displayName="BreadcrumbList";const Fc=y.forwardRef(({className:e,...t},n)=>v.jsx("li",{ref:n,className:ye("inline-flex items-center gap-1.5",e),...t}));Fc.displayName="BreadcrumbItem";const hp=y.forwardRef(({asChild:e,className:t,...n},r)=>{const a=e?Ns:"a";return v.jsx(a,{ref:r,className:ye("transition-colors hover:text-foreground cursor-pointer",t),...n})});hp.displayName="BreadcrumbLink";const pp=y.forwardRef(({className:e,...t},n)=>v.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:ye("font-medium text-foreground",e),...t}));pp.displayName="BreadcrumbPage";const mp=({children:e,className:t,...n})=>v.jsx("li",{role:"presentation","aria-hidden":"true",className:ye("[&>svg]:h-3.5 [&>svg]:w-3.5",t),...n,children:e??v.jsx(q_,{})});mp.displayName="BreadcrumbSeparator";var Sv="Switch",[Kne]=aa(Sv),[Xne,Qne]=Kne(Sv),k4=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:a,defaultChecked:o,required:l,disabled:u,value:f="on",onCheckedChange:d,form:m,...p}=e,[g,x]=y.useState(null),A=ot(t,T=>x(T)),S=y.useRef(!1),w=g?m||!!g.closest("form"):!0,[O,E]=_o({prop:a,defaultProp:o??!1,onChange:d,caller:Sv});return v.jsxs(Xne,{scope:n,checked:O,disabled:u,children:[v.jsx(Ye.button,{type:"button",role:"switch","aria-checked":O,"aria-required":l,"data-state":I4(O),"data-disabled":u?"":void 0,disabled:u,value:f,...p,ref:A,onClick:De(e.onClick,T=>{E(C=>!C),w&&(S.current=T.isPropagationStopped(),S.current||T.stopPropagation())})}),w&&v.jsx(L4,{control:g,bubbles:!S.current,name:r,value:f,checked:O,required:l,disabled:u,form:m,style:{transform:"translateX(-100%)"}})]})});k4.displayName=Sv;var $4="SwitchThumb",z4=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,a=Qne($4,n);return v.jsx(Ye.span,{"data-state":I4(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})});z4.displayName=$4;var Jne="SwitchBubbleInput",L4=y.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...a},o)=>{const l=y.useRef(null),u=ot(l,o),f=h3(n),d=ZL(t);return y.useEffect(()=>{const m=l.current;if(!m)return;const p=window.HTMLInputElement.prototype,x=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==n&&x){const A=new Event("click",{bubbles:r});x.call(m,n),m.dispatchEvent(A)}},[f,n,r]),v.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:u,style:{...a.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});L4.displayName=Jne;function I4(e){return e?"checked":"unchecked"}var B4=k4,ere=z4;const U4=y.forwardRef(({className:e,...t},n)=>v.jsx(B4,{className:ye("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:v.jsx(ere,{className:ye("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));U4.displayName=B4.displayName;function tre(){const[e]=Um(),t=Ya(),n=e.get("id"),[r,a]=y.useState(null),[o,l]=y.useState([]),[u,f]=y.useState(null),[d,m]=y.useState(""),[p,g]=y.useState(null),[x,A]=y.useState(!1),[S,w]=y.useState(""),[O,E]=y.useState(0),[T,C]=y.useState("app-only");y.useEffect(()=>{n&&Qte(n).then(a)},[n]);const j=y.useCallback(ce=>{ce.type==="agents:listed"&&l(ce.sessions),ce.type==="session:joined"&&(A(!1),w("Connected")),ce.type==="error"&&(A(!1),w(`Error: ${ce.message}`))},[]),{send:R,connected:N}=qA(j);y.useEffect(()=>{if(!N)return;R({type:"agents:list"});const ce=setInterval(()=>R({type:"agents:list"}),5e3);return()=>clearInterval(ce)},[N,R]);const k=(r==null?void 0:r.platform)??"ios",$=o.filter(ce=>ce.devices.some(de=>de.platform===k)),V=$.find(ce=>ce.agentName===u),I=(V==null?void 0:V.devices.filter(ce=>ce.platform===k))??[],H=o.flatMap(ce=>ce.devices).find(ce=>ce.id===d),W=H?`${H.name}${H.osVersion?` · ${H.osVersion}`:""}`:"",Z=[...new Set(I.map(ce=>ce.osVersion).filter(Boolean))].sort((ce,de)=>{const Ce=Se=>Se.replace(/^[^\d]*/,"").split(".").map(Number),[le,_e]=[Ce(ce),Ce(de)];for(let Se=0;Se<Math.max(le.length,_e.length);Se++){const se=(_e[Se]??0)-(le[Se]??0);if(se!==0)return se}return 0}),[z,F]=y.useState(""),[Y,Q]=y.useState(""),K=(z?I.filter(ce=>ce.osVersion===z):I).filter(ce=>!Y||ce.name.toLowerCase().includes(Y.toLowerCase())),P=y.useCallback(()=>{p&&d&&R({type:"device:shutdown",sessionId:p,payload:{deviceId:d}}),g(null),A(!1),w("")},[p,d,R]),U=y.useCallback(()=>E(ce=>ce+1),[]),ne=y.useCallback(()=>{p&&d&&R({type:"device:shutdown",sessionId:p,payload:{deviceId:d}}),g(null),f(null),A(!1),w("")},[p,d,R]),me=y.useRef({sessionId:p,deviceId:d});y.useEffect(()=>{me.current={sessionId:p,deviceId:d}},[p,d]),y.useEffect(()=>()=>{const{sessionId:ce,deviceId:de}=me.current;ce&&de&&R({type:"device:shutdown",sessionId:ce,payload:{deviceId:de}})},[R]);const{setNode:Ae}=_A();return y.useEffect(()=>{if(r)return Ae(v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx(P4,{children:v.jsxs(D4,{children:[v.jsx(Fc,{children:v.jsx(hp,{asChild:!0,children:v.jsx("button",{onClick:()=>t(`/app-center?appId=${r.app_id}`),children:r.name})})}),v.jsx(mp,{}),v.jsx(Fc,{children:u?v.jsx(hp,{asChild:!0,children:v.jsx("button",{onClick:ne,children:_R(r)})}):v.jsx(pp,{children:_R(r)})}),u&&v.jsxs(v.Fragment,{children:[v.jsx(mp,{}),v.jsx(Fc,{children:p?v.jsx(hp,{asChild:!0,children:v.jsx("button",{onClick:P,children:u})}):v.jsx(pp,{children:u})})]}),p&&v.jsxs(v.Fragment,{children:[v.jsx(mp,{}),v.jsx(Fc,{children:v.jsx(pp,{children:W})})]})]})}),!u&&r.status_label&&v.jsx(Gl,{tone:Q3[r.status_label],children:r.status_label})]})),()=>Ae(null)},[r,u,p,W,t,P,ne,Ae]),v.jsxs("div",{className:"flex h-full min-h-0 gap-6 p-6",children:[v.jsx("div",{className:"flex flex-col gap-3 flex-1 min-w-0 min-h-0",children:v.jsx("div",{className:"flex-1 min-h-0 overflow-auto -ml-1 pl-1 -mr-4 pr-4",children:p?v.jsx("div",{className:"min-h-full flex items-center justify-center py-6 px-8 min-w-max",children:v.jsx(_ne,{sessionId:p,deviceId:d,buildId:r==null?void 0:r.id,resetMode:T,onRecordingUploaded:U})}):u?v.jsxs("div",{className:"flex flex-col gap-5",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("button",{onClick:ne,className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:"← All Macs"}),v.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Select device"})]}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(d3,{placeholder:"Search device…",value:Y,onChange:Q}),Z.length>0&&v.jsxs(As,{value:z||"__all__",onValueChange:ce=>{F(ce==="__all__"?"":ce),m("")},children:[v.jsx(Eo,{className:"h-8 w-36 shrink-0",children:v.jsx(Os,{})}),v.jsxs(jo,{children:[v.jsx(Ct,{value:"__all__",children:"Any version"}),Z.map(ce=>v.jsx(Ct,{value:ce,children:ce},ce))]})]}),v.jsx(dA,{children:v.jsxs(Fa,{children:[v.jsxs("div",{className:"ml-auto flex items-center gap-2 shrink-0",children:[v.jsx(Va,{asChild:!0,children:v.jsxs(Bt,{htmlFor:"reset-mode",className:"flex items-center gap-1 text-sm cursor-pointer whitespace-nowrap",children:[v.jsx(rV,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Full reset"]})}),v.jsx(U4,{id:"reset-mode",checked:T==="full-erase",onCheckedChange:ce=>C(ce?"full-erase":"app-only")})]}),v.jsx(Aa,{children:T==="full-erase"?"Erase all data before booting":"Keep existing data"})]})})]}),K.length===0?v.jsx("p",{className:"text-sm text-muted-foreground",children:N?"No devices available for this OS.":"Connecting to relay…"}):v.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 gap-2",children:K.map(ce=>{const de=ce.status==="booted",Ce=ce.busy,le=Ce?"In use":de?"Booted":"Available",_e=Ce?"bg-amber-400":de?"bg-emerald-400":"bg-muted-foreground/40";return v.jsxs("button",{disabled:Ce||x||!N,onClick:()=>{m(ce.id),A(!0),w("Booting…"),g(ce.sessionId)},className:ye("flex flex-col gap-3 rounded-lg border p-3 text-left transition-colors min-h-[100px]","hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50"),children:[v.jsx("span",{className:"text-sm font-medium leading-tight",children:ce.name}),ce.osVersion&&v.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:ce.osVersion}),v.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[v.jsx("span",{className:ye("inline-block h-1.5 w-1.5 rounded-full",_e)}),le]})]},ce.id)})}),S&&v.jsx("p",{className:"text-sm text-muted-foreground",children:S})]}):v.jsxs("div",{className:"flex flex-col gap-5",children:[v.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Select Mac"}),$.length===0?v.jsx("p",{className:"text-sm text-muted-foreground",children:N?`No agents available for ${k}.`:"Connecting to relay…"}):v.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 gap-2",children:$.map(ce=>{const de=ce.resources,Ce=de?Date.now()-de.reportedAt>3e4:!1,le=ce.devices.filter(se=>se.platform===k).length,_e=(de==null?void 0:de.cpuPercent)??0,Se=de?de.memUsedMB/de.memTotalMB*100:0;return v.jsxs("button",{onClick:()=>f(ce.agentName??null),className:ye("flex flex-col gap-3 rounded-lg border p-3 text-left transition-colors min-h-[100px]","hover:bg-accent"),children:[v.jsxs("div",{className:"flex items-start justify-between gap-2",children:[v.jsx("span",{className:"text-sm font-medium leading-tight truncate",children:ce.agentName??"Unknown"}),Ce&&v.jsx("span",{className:"shrink-0 text-[10px] font-medium text-amber-500",children:"Stale"})]}),v.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[v.jsxs("span",{children:[le," device",le!==1?"s":""]}),de&&v.jsxs(v.Fragment,{children:[v.jsx("span",{children:"·"}),v.jsxs("span",{children:[de.slotsAvailable,"/",de.slotsTotal," slots"]})]})]}),de&&!Ce&&v.jsxs("div",{className:"flex flex-col gap-1.5 w-full",children:[v.jsx(jR,{label:"CPU",percent:_e,colorClass:"bg-blue-400"}),v.jsx(jR,{label:"RAM",percent:Se,colorClass:"bg-violet-400"})]})]},ce.agentName)})})]})})}),n&&v.jsxs(v.Fragment,{children:[v.jsx(So,{orientation:"vertical",className:"h-auto"}),v.jsx("div",{className:"w-80 shrink-0 h-full",children:v.jsx(Yne,{buildId:Number(n),recordingsRefreshKey:O})})]})]})}function jR({label:e,percent:t,colorClass:n}){return v.jsxs("div",{className:"flex flex-col gap-0.5",children:[v.jsxs("div",{className:"flex justify-between text-[10px] text-muted-foreground",children:[v.jsx("span",{children:e}),v.jsxs("span",{children:[t.toFixed(0),"%"]})]}),v.jsx("div",{className:"h-1 w-full rounded-full bg-muted overflow-hidden",children:v.jsx("div",{className:ye("h-full rounded-full transition-all",n),style:{width:`${Math.min(100,t)}%`}})})]})}var Db,TR;function pr(){if(TR)return Db;TR=1;var e=Array.isArray;return Db=e,Db}var kb,CR;function q4(){if(CR)return kb;CR=1;var e=typeof Mh=="object"&&Mh&&Mh.Object===Object&&Mh;return kb=e,kb}var $b,RR;function Ja(){if(RR)return $b;RR=1;var e=q4(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return $b=n,$b}var zb,NR;function dd(){if(NR)return zb;NR=1;var e=Ja(),t=e.Symbol;return zb=t,zb}var Lb,MR;function nre(){if(MR)return Lb;MR=1;var e=dd(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,a=e?e.toStringTag:void 0;function o(l){var u=n.call(l,a),f=l[a];try{l[a]=void 0;var d=!0}catch{}var m=r.call(l);return d&&(u?l[a]=f:delete l[a]),m}return Lb=o,Lb}var Ib,PR;function rre(){if(PR)return Ib;PR=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return Ib=n,Ib}var Bb,DR;function ki(){if(DR)return Bb;DR=1;var e=dd(),t=nre(),n=rre(),r="[object Null]",a="[object Undefined]",o=e?e.toStringTag:void 0;function l(u){return u==null?u===void 0?a:r:o&&o in Object(u)?t(u):n(u)}return Bb=l,Bb}var Ub,kR;function $i(){if(kR)return Ub;kR=1;function e(t){return t!=null&&typeof t=="object"}return Ub=e,Ub}var qb,$R;function Eu(){if($R)return qb;$R=1;var e=ki(),t=$i(),n="[object Symbol]";function r(a){return typeof a=="symbol"||t(a)&&e(a)==n}return qb=r,qb}var Hb,zR;function KA(){if(zR)return Hb;zR=1;var e=pr(),t=Eu(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function a(o,l){if(e(o))return!1;var u=typeof o;return u=="number"||u=="symbol"||u=="boolean"||o==null||t(o)?!0:r.test(o)||!n.test(o)||l!=null&&o in Object(l)}return Hb=a,Hb}var Fb,LR;function Po(){if(LR)return Fb;LR=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Fb=e,Fb}var Vb,IR;function XA(){if(IR)return Vb;IR=1;var e=ki(),t=Po(),n="[object AsyncFunction]",r="[object Function]",a="[object GeneratorFunction]",o="[object Proxy]";function l(u){if(!t(u))return!1;var f=e(u);return f==r||f==a||f==n||f==o}return Vb=l,Vb}var Gb,BR;function are(){if(BR)return Gb;BR=1;var e=Ja(),t=e["__core-js_shared__"];return Gb=t,Gb}var Wb,UR;function ire(){if(UR)return Wb;UR=1;var e=are(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return Wb=n,Wb}var Zb,qR;function H4(){if(qR)return Zb;qR=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return Zb=n,Zb}var Yb,HR;function ore(){if(HR)return Yb;HR=1;var e=XA(),t=ire(),n=Po(),r=H4(),a=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,f=l.toString,d=u.hasOwnProperty,m=RegExp("^"+f.call(d).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p(g){if(!n(g)||t(g))return!1;var x=e(g)?m:o;return x.test(r(g))}return Yb=p,Yb}var Kb,FR;function sre(){if(FR)return Kb;FR=1;function e(t,n){return t==null?void 0:t[n]}return Kb=e,Kb}var Xb,VR;function ks(){if(VR)return Xb;VR=1;var e=ore(),t=sre();function n(r,a){var o=t(r,a);return e(o)?o:void 0}return Xb=n,Xb}var Qb,GR;function _v(){if(GR)return Qb;GR=1;var e=ks(),t=e(Object,"create");return Qb=t,Qb}var Jb,WR;function lre(){if(WR)return Jb;WR=1;var e=_v();function t(){this.__data__=e?e(null):{},this.size=0}return Jb=t,Jb}var e0,ZR;function ure(){if(ZR)return e0;ZR=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return e0=e,e0}var t0,YR;function cre(){if(YR)return t0;YR=1;var e=_v(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function a(o){var l=this.__data__;if(e){var u=l[o];return u===t?void 0:u}return r.call(l,o)?l[o]:void 0}return t0=a,t0}var n0,KR;function fre(){if(KR)return n0;KR=1;var e=_v(),t=Object.prototype,n=t.hasOwnProperty;function r(a){var o=this.__data__;return e?o[a]!==void 0:n.call(o,a)}return n0=r,n0}var r0,XR;function dre(){if(XR)return r0;XR=1;var e=_v(),t="__lodash_hash_undefined__";function n(r,a){var o=this.__data__;return this.size+=this.has(r)?0:1,o[r]=e&&a===void 0?t:a,this}return r0=n,r0}var a0,QR;function hre(){if(QR)return a0;QR=1;var e=lre(),t=ure(),n=cre(),r=fre(),a=dre();function o(l){var u=-1,f=l==null?0:l.length;for(this.clear();++u<f;){var d=l[u];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=a,a0=o,a0}var i0,JR;function pre(){if(JR)return i0;JR=1;function e(){this.__data__=[],this.size=0}return i0=e,i0}var o0,eN;function QA(){if(eN)return o0;eN=1;function e(t,n){return t===n||t!==t&&n!==n}return o0=e,o0}var s0,tN;function Av(){if(tN)return s0;tN=1;var e=QA();function t(n,r){for(var a=n.length;a--;)if(e(n[a][0],r))return a;return-1}return s0=t,s0}var l0,nN;function mre(){if(nN)return l0;nN=1;var e=Av(),t=Array.prototype,n=t.splice;function r(a){var o=this.__data__,l=e(o,a);if(l<0)return!1;var u=o.length-1;return l==u?o.pop():n.call(o,l,1),--this.size,!0}return l0=r,l0}var u0,rN;function vre(){if(rN)return u0;rN=1;var e=Av();function t(n){var r=this.__data__,a=e(r,n);return a<0?void 0:r[a][1]}return u0=t,u0}var c0,aN;function gre(){if(aN)return c0;aN=1;var e=Av();function t(n){return e(this.__data__,n)>-1}return c0=t,c0}var f0,iN;function yre(){if(iN)return f0;iN=1;var e=Av();function t(n,r){var a=this.__data__,o=e(a,n);return o<0?(++this.size,a.push([n,r])):a[o][1]=r,this}return f0=t,f0}var d0,oN;function Ov(){if(oN)return d0;oN=1;var e=pre(),t=mre(),n=vre(),r=gre(),a=yre();function o(l){var u=-1,f=l==null?0:l.length;for(this.clear();++u<f;){var d=l[u];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=a,d0=o,d0}var h0,sN;function JA(){if(sN)return h0;sN=1;var e=ks(),t=Ja(),n=e(t,"Map");return h0=n,h0}var p0,lN;function bre(){if(lN)return p0;lN=1;var e=hre(),t=Ov(),n=JA();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return p0=r,p0}var m0,uN;function xre(){if(uN)return m0;uN=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return m0=e,m0}var v0,cN;function Ev(){if(cN)return v0;cN=1;var e=xre();function t(n,r){var a=n.__data__;return e(r)?a[typeof r=="string"?"string":"hash"]:a.map}return v0=t,v0}var g0,fN;function wre(){if(fN)return g0;fN=1;var e=Ev();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return g0=t,g0}var y0,dN;function Sre(){if(dN)return y0;dN=1;var e=Ev();function t(n){return e(this,n).get(n)}return y0=t,y0}var b0,hN;function _re(){if(hN)return b0;hN=1;var e=Ev();function t(n){return e(this,n).has(n)}return b0=t,b0}var x0,pN;function Are(){if(pN)return x0;pN=1;var e=Ev();function t(n,r){var a=e(this,n),o=a.size;return a.set(n,r),this.size+=a.size==o?0:1,this}return x0=t,x0}var w0,mN;function eO(){if(mN)return w0;mN=1;var e=bre(),t=wre(),n=Sre(),r=_re(),a=Are();function o(l){var u=-1,f=l==null?0:l.length;for(this.clear();++u<f;){var d=l[u];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=a,w0=o,w0}var S0,vN;function F4(){if(vN)return S0;vN=1;var e=eO(),t="Expected a function";function n(r,a){if(typeof r!="function"||a!=null&&typeof a!="function")throw new TypeError(t);var o=function(){var l=arguments,u=a?a.apply(this,l):l[0],f=o.cache;if(f.has(u))return f.get(u);var d=r.apply(this,l);return o.cache=f.set(u,d)||f,d};return o.cache=new(n.Cache||e),o}return n.Cache=e,S0=n,S0}var _0,gN;function Ore(){if(gN)return _0;gN=1;var e=F4(),t=500;function n(r){var a=e(r,function(l){return o.size===t&&o.clear(),l}),o=a.cache;return a}return _0=n,_0}var A0,yN;function Ere(){if(yN)return A0;yN=1;var e=Ore(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(a){var o=[];return a.charCodeAt(0)===46&&o.push(""),a.replace(t,function(l,u,f,d){o.push(f?d.replace(n,"$1"):u||l)}),o});return A0=r,A0}var O0,bN;function tO(){if(bN)return O0;bN=1;function e(t,n){for(var r=-1,a=t==null?0:t.length,o=Array(a);++r<a;)o[r]=n(t[r],r,t);return o}return O0=e,O0}var E0,xN;function jre(){if(xN)return E0;xN=1;var e=dd(),t=tO(),n=pr(),r=Eu(),a=e?e.prototype:void 0,o=a?a.toString:void 0;function l(u){if(typeof u=="string")return u;if(n(u))return t(u,l)+"";if(r(u))return o?o.call(u):"";var f=u+"";return f=="0"&&1/u==-1/0?"-0":f}return E0=l,E0}var j0,wN;function V4(){if(wN)return j0;wN=1;var e=jre();function t(n){return n==null?"":e(n)}return j0=t,j0}var T0,SN;function G4(){if(SN)return T0;SN=1;var e=pr(),t=KA(),n=Ere(),r=V4();function a(o,l){return e(o)?o:t(o,l)?[o]:n(r(o))}return T0=a,T0}var C0,_N;function jv(){if(_N)return C0;_N=1;var e=Eu();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return C0=t,C0}var R0,AN;function nO(){if(AN)return R0;AN=1;var e=G4(),t=jv();function n(r,a){a=e(a,r);for(var o=0,l=a.length;r!=null&&o<l;)r=r[t(a[o++])];return o&&o==l?r:void 0}return R0=n,R0}var N0,ON;function W4(){if(ON)return N0;ON=1;var e=nO();function t(n,r,a){var o=n==null?void 0:e(n,r);return o===void 0?a:o}return N0=t,N0}var Tre=W4();const ta=kt(Tre);var M0,EN;function Cre(){if(EN)return M0;EN=1;function e(t){return t==null}return M0=e,M0}var Rre=Cre();const ht=kt(Rre);var P0,jN;function Nre(){if(jN)return P0;jN=1;var e=ki(),t=pr(),n=$i(),r="[object String]";function a(o){return typeof o=="string"||!t(o)&&n(o)&&e(o)==r}return P0=a,P0}var Mre=Nre();const Es=kt(Mre);var Pre=XA();const at=kt(Pre);var Dre=Po();const ju=kt(Dre);var D0={exports:{}},_t={};/**
421
- * @license React
422
- * react-is.production.min.js
423
- *
424
- * Copyright (c) Facebook, Inc. and its affiliates.
425
- *
426
- * This source code is licensed under the MIT license found in the
427
- * LICENSE file in the root directory of this source tree.
428
- */var TN;function kre(){if(TN)return _t;TN=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),A;A=Symbol.for("react.module.reference");function S(w){if(typeof w=="object"&&w!==null){var O=w.$$typeof;switch(O){case e:switch(w=w.type,w){case n:case a:case r:case d:case m:return w;default:switch(w=w&&w.$$typeof,w){case u:case l:case f:case g:case p:case o:return w;default:return O}}case t:return O}}}return _t.ContextConsumer=l,_t.ContextProvider=o,_t.Element=e,_t.ForwardRef=f,_t.Fragment=n,_t.Lazy=g,_t.Memo=p,_t.Portal=t,_t.Profiler=a,_t.StrictMode=r,_t.Suspense=d,_t.SuspenseList=m,_t.isAsyncMode=function(){return!1},_t.isConcurrentMode=function(){return!1},_t.isContextConsumer=function(w){return S(w)===l},_t.isContextProvider=function(w){return S(w)===o},_t.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},_t.isForwardRef=function(w){return S(w)===f},_t.isFragment=function(w){return S(w)===n},_t.isLazy=function(w){return S(w)===g},_t.isMemo=function(w){return S(w)===p},_t.isPortal=function(w){return S(w)===t},_t.isProfiler=function(w){return S(w)===a},_t.isStrictMode=function(w){return S(w)===r},_t.isSuspense=function(w){return S(w)===d},_t.isSuspenseList=function(w){return S(w)===m},_t.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===n||w===a||w===r||w===d||w===m||w===x||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===p||w.$$typeof===o||w.$$typeof===l||w.$$typeof===f||w.$$typeof===A||w.getModuleId!==void 0)},_t.typeOf=S,_t}var CN;function $re(){return CN||(CN=1,D0.exports=kre()),D0.exports}var zre=$re(),k0,RN;function Z4(){if(RN)return k0;RN=1;var e=ki(),t=$i(),n="[object Number]";function r(a){return typeof a=="number"||t(a)&&e(a)==n}return k0=r,k0}var $0,NN;function Lre(){if(NN)return $0;NN=1;var e=Z4();function t(n){return e(n)&&n!=+n}return $0=t,$0}var Ire=Lre();const Tu=kt(Ire);var Bre=Z4();const Ure=kt(Bre);var wa=function(t){return t===0?0:t>0?1:-1},cs=function(t){return Es(t)&&t.indexOf("%")===t.length-1},je=function(t){return Ure(t)&&!Tu(t)},qre=function(t){return ht(t)},An=function(t){return je(t)||Es(t)},Hre=0,hd=function(t){var n=++Hre;return"".concat(t||"").concat(n)},js=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!je(t)&&!Es(t))return r;var o;if(cs(t)){var l=t.indexOf("%");o=n*parseFloat(t.slice(0,l))/100}else o=+t;return Tu(o)&&(o=r),a&&o>n&&(o=n),o},mo=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},Fre=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},a=0;a<n;a++)if(!r[t[a]])r[t[a]]=!0;else return!0;return!1},Zr=function(t,n){return je(t)&&je(n)?function(r){return t+r*(n-t)}:function(){return n}};function Ip(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):ta(r,t))===n})}var Vre=function(t,n){return je(t)&&je(n)?t-n:Es(t)&&Es(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function zl(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function hS(e){"@babel/helpers - typeof";return hS=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},hS(e)}var Gre=["viewBox","children"],Wre=["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"],MN=["points","pathLength"],z0={svg:Gre,polygon:MN,polyline:MN},rO=["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"],Bp=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(y.isValidElement(t)&&(r=t.props),!ju(r))return null;var a={};return Object.keys(r).forEach(function(o){rO.includes(o)&&(a[o]=n||function(l){return r[o](r,l)})}),a},Zre=function(t,n,r){return function(a){return t(n,r,a),null}},Up=function(t,n,r){if(!ju(t)||hS(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(o){var l=t[o];rO.includes(o)&&typeof l=="function"&&(a||(a={}),a[o]=Zre(l,n,r))}),a},Yre=["children"],Kre=["children"];function PN(e,t){if(e==null)return{};var n=Xre(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Xre(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function pS(e){"@babel/helpers - typeof";return pS=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},pS(e)}var DN={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"},Ai=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},kN=null,L0=null,aO=function e(t){if(t===kN&&Array.isArray(L0))return L0;var n=[];return y.Children.forEach(t,function(r){ht(r)||(zre.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),L0=n,kN=t,n};function Oa(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(a){return Ai(a)}):r=[Ai(t)],aO(e).forEach(function(a){var o=ta(a,"type.displayName")||ta(a,"type.name");r.indexOf(o)!==-1&&n.push(a)}),n}function Er(e,t){var n=Oa(e,t);return n&&n[0]}var $N=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,a=n.height;return!(!je(r)||r<=0||!je(a)||a<=0)},Qre=["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"],Jre=function(t){return t&&t.type&&Es(t.type)&&Qre.indexOf(t.type)>=0},eae=function(t){return t&&pS(t)==="object"&&"clipDot"in t},tae=function(t,n,r,a){var o,l=(o=z0==null?void 0:z0[a])!==null&&o!==void 0?o:[];return n.startsWith("data-")||!at(t)&&(a&&l.includes(n)||Wre.includes(n))||r&&rO.includes(n)},ut=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(y.isValidElement(t)&&(a=t.props),!ju(a))return null;var o={};return Object.keys(a).forEach(function(l){var u;tae((u=a)===null||u===void 0?void 0:u[l],l,n,r)&&(o[l]=a[l])}),o},mS=function e(t,n){if(t===n)return!0;var r=y.Children.count(t);if(r!==y.Children.count(n))return!1;if(r===0)return!0;if(r===1)return zN(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var a=0;a<r;a++){var o=t[a],l=n[a];if(Array.isArray(o)||Array.isArray(l)){if(!e(o,l))return!1}else if(!zN(o,l))return!1}return!0},zN=function(t,n){if(ht(t)&&ht(n))return!0;if(!ht(t)&&!ht(n)){var r=t.props||{},a=r.children,o=PN(r,Yre),l=n.props||{},u=l.children,f=PN(l,Kre);return a&&u?zl(o,f)&&mS(a,u):!a&&!u?zl(o,f):!1}return!1},LN=function(t,n){var r=[],a={};return aO(t).forEach(function(o,l){if(Jre(o))r.push(o);else if(o){var u=Ai(o.type),f=n[u]||{},d=f.handler,m=f.once;if(d&&(!m||!a[u])){var p=d(o,u,l);r.push(p),a[u]=!0}}}),r},nae=function(t){var n=t&&t.type;return n&&DN[n]?DN[n]:null},rae=function(t,n){return aO(n).indexOf(t)},aae=["children","width","height","viewBox","className","style","title","desc"];function vS(){return vS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vS.apply(this,arguments)}function iae(e,t){if(e==null)return{};var n=oae(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oae(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function gS(e){var t=e.children,n=e.width,r=e.height,a=e.viewBox,o=e.className,l=e.style,u=e.title,f=e.desc,d=iae(e,aae),m=a||{width:n,height:r,x:0,y:0},p=mt("recharts-surface",o);return q.createElement("svg",vS({},ut(d,!0,"svg"),{className:p,width:n,height:r,style:l,viewBox:"".concat(m.x," ").concat(m.y," ").concat(m.width," ").concat(m.height)}),q.createElement("title",null,u),q.createElement("desc",null,f),t)}var sae=["children","className"];function yS(){return yS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yS.apply(this,arguments)}function lae(e,t){if(e==null)return{};var n=uae(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uae(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Jt=q.forwardRef(function(e,t){var n=e.children,r=e.className,a=lae(e,sae),o=mt("recharts-layer",r);return q.createElement("g",yS({className:o},ut(a,!0),{ref:t}),n)}),Oi=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),o=2;o<r;o++)a[o-2]=arguments[o]},I0,IN;function cae(){if(IN)return I0;IN=1;function e(t,n,r){var a=-1,o=t.length;n<0&&(n=-n>o?0:o+n),r=r>o?o:r,r<0&&(r+=o),o=n>r?0:r-n>>>0,n>>>=0;for(var l=Array(o);++a<o;)l[a]=t[a+n];return l}return I0=e,I0}var B0,BN;function fae(){if(BN)return B0;BN=1;var e=cae();function t(n,r,a){var o=n.length;return a=a===void 0?o:a,!r&&a>=o?n:e(n,r,a)}return B0=t,B0}var U0,UN;function Y4(){if(UN)return U0;UN=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",a=t+n+r,o="\\ufe0e\\ufe0f",l="\\u200d",u=RegExp("["+l+e+a+o+"]");function f(d){return u.test(d)}return U0=f,U0}var q0,qN;function dae(){if(qN)return q0;qN=1;function e(t){return t.split("")}return q0=e,q0}var H0,HN;function hae(){if(HN)return H0;HN=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",a=t+n+r,o="\\ufe0e\\ufe0f",l="["+e+"]",u="["+a+"]",f="\\ud83c[\\udffb-\\udfff]",d="(?:"+u+"|"+f+")",m="[^"+e+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",x="\\u200d",A=d+"?",S="["+o+"]?",w="(?:"+x+"(?:"+[m,p,g].join("|")+")"+S+A+")*",O=S+A+w,E="(?:"+[m+u+"?",u,p,g,l].join("|")+")",T=RegExp(f+"(?="+f+")|"+E+O,"g");function C(j){return j.match(T)||[]}return H0=C,H0}var F0,FN;function pae(){if(FN)return F0;FN=1;var e=dae(),t=Y4(),n=hae();function r(a){return t(a)?n(a):e(a)}return F0=r,F0}var V0,VN;function mae(){if(VN)return V0;VN=1;var e=fae(),t=Y4(),n=pae(),r=V4();function a(o){return function(l){l=r(l);var u=t(l)?n(l):void 0,f=u?u[0]:l.charAt(0),d=u?e(u,1).join(""):l.slice(1);return f[o]()+d}}return V0=a,V0}var G0,GN;function vae(){if(GN)return G0;GN=1;var e=mae(),t=e("toUpperCase");return G0=t,G0}var gae=vae();const Tv=kt(gae);function Ht(e){return function(){return e}}const K4=Math.cos,qp=Math.sin,Ra=Math.sqrt,Hp=Math.PI,Cv=2*Hp,bS=Math.PI,xS=2*bS,ss=1e-6,yae=xS-ss;function X4(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function bae(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return X4;const n=10**t;return function(r){this._+=r[0];for(let a=1,o=r.length;a<o;++a)this._+=Math.round(arguments[a]*n)/n+r[a]}}class xae{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?X4:bae(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,a){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+a}`}bezierCurveTo(t,n,r,a,o,l){this._append`C${+t},${+n},${+r},${+a},${this._x1=+o},${this._y1=+l}`}arcTo(t,n,r,a,o){if(t=+t,n=+n,r=+r,a=+a,o=+o,o<0)throw new Error(`negative radius: ${o}`);let l=this._x1,u=this._y1,f=r-t,d=a-n,m=l-t,p=u-n,g=m*m+p*p;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(g>ss)if(!(Math.abs(p*f-d*m)>ss)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let x=r-l,A=a-u,S=f*f+d*d,w=x*x+A*A,O=Math.sqrt(S),E=Math.sqrt(g),T=o*Math.tan((bS-Math.acos((S+g-w)/(2*O*E)))/2),C=T/E,j=T/O;Math.abs(C-1)>ss&&this._append`L${t+C*m},${n+C*p}`,this._append`A${o},${o},0,0,${+(p*x>m*A)},${this._x1=t+j*f},${this._y1=n+j*d}`}}arc(t,n,r,a,o,l){if(t=+t,n=+n,r=+r,l=!!l,r<0)throw new Error(`negative radius: ${r}`);let u=r*Math.cos(a),f=r*Math.sin(a),d=t+u,m=n+f,p=1^l,g=l?a-o:o-a;this._x1===null?this._append`M${d},${m}`:(Math.abs(this._x1-d)>ss||Math.abs(this._y1-m)>ss)&&this._append`L${d},${m}`,r&&(g<0&&(g=g%xS+xS),g>yae?this._append`A${r},${r},0,1,${p},${t-u},${n-f}A${r},${r},0,1,${p},${this._x1=d},${this._y1=m}`:g>ss&&this._append`A${r},${r},0,${+(g>=bS)},${p},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function iO(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new xae(t)}function oO(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Q4(e){this._context=e}Q4.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 Rv(e){return new Q4(e)}function J4(e){return e[0]}function eB(e){return e[1]}function tB(e,t){var n=Ht(!0),r=null,a=Rv,o=null,l=iO(u);e=typeof e=="function"?e:e===void 0?J4:Ht(e),t=typeof t=="function"?t:t===void 0?eB:Ht(t);function u(f){var d,m=(f=oO(f)).length,p,g=!1,x;for(r==null&&(o=a(x=l())),d=0;d<=m;++d)!(d<m&&n(p=f[d],d,f))===g&&((g=!g)?o.lineStart():o.lineEnd()),g&&o.point(+e(p,d,f),+t(p,d,f));if(x)return o=null,x+""||null}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:Ht(+f),u):e},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:Ht(+f),u):t},u.defined=function(f){return arguments.length?(n=typeof f=="function"?f:Ht(!!f),u):n},u.curve=function(f){return arguments.length?(a=f,r!=null&&(o=a(r)),u):a},u.context=function(f){return arguments.length?(f==null?r=o=null:o=a(r=f),u):r},u}function Fh(e,t,n){var r=null,a=Ht(!0),o=null,l=Rv,u=null,f=iO(d);e=typeof e=="function"?e:e===void 0?J4:Ht(+e),t=typeof t=="function"?t:Ht(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?eB:Ht(+n);function d(p){var g,x,A,S=(p=oO(p)).length,w,O=!1,E,T=new Array(S),C=new Array(S);for(o==null&&(u=l(E=f())),g=0;g<=S;++g){if(!(g<S&&a(w=p[g],g,p))===O)if(O=!O)x=g,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),A=g-1;A>=x;--A)u.point(T[A],C[A]);u.lineEnd(),u.areaEnd()}O&&(T[g]=+e(w,g,p),C[g]=+t(w,g,p),u.point(r?+r(w,g,p):T[g],n?+n(w,g,p):C[g]))}if(E)return u=null,E+""||null}function m(){return tB().defined(a).curve(l).context(o)}return d.x=function(p){return arguments.length?(e=typeof p=="function"?p:Ht(+p),r=null,d):e},d.x0=function(p){return arguments.length?(e=typeof p=="function"?p:Ht(+p),d):e},d.x1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:Ht(+p),d):r},d.y=function(p){return arguments.length?(t=typeof p=="function"?p:Ht(+p),n=null,d):t},d.y0=function(p){return arguments.length?(t=typeof p=="function"?p:Ht(+p),d):t},d.y1=function(p){return arguments.length?(n=p==null?null:typeof p=="function"?p:Ht(+p),d):n},d.lineX0=d.lineY0=function(){return m().x(e).y(t)},d.lineY1=function(){return m().x(e).y(n)},d.lineX1=function(){return m().x(r).y(t)},d.defined=function(p){return arguments.length?(a=typeof p=="function"?p:Ht(!!p),d):a},d.curve=function(p){return arguments.length?(l=p,o!=null&&(u=l(o)),d):l},d.context=function(p){return arguments.length?(p==null?o=u=null:u=l(o=p),d):o},d}class nB{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function wae(e){return new nB(e,!0)}function Sae(e){return new nB(e,!1)}const sO={draw(e,t){const n=Ra(t/Hp);e.moveTo(n,0),e.arc(0,0,n,0,Cv)}},_ae={draw(e,t){const n=Ra(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},rB=Ra(1/3),Aae=rB*2,Oae={draw(e,t){const n=Ra(t/Aae),r=n*rB;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Eae={draw(e,t){const n=Ra(t),r=-n/2;e.rect(r,r,n,n)}},jae=.8908130915292852,aB=qp(Hp/10)/qp(7*Hp/10),Tae=qp(Cv/10)*aB,Cae=-K4(Cv/10)*aB,Rae={draw(e,t){const n=Ra(t*jae),r=Tae*n,a=Cae*n;e.moveTo(0,-n),e.lineTo(r,a);for(let o=1;o<5;++o){const l=Cv*o/5,u=K4(l),f=qp(l);e.lineTo(f*n,-u*n),e.lineTo(u*r-f*a,f*r+u*a)}e.closePath()}},W0=Ra(3),Nae={draw(e,t){const n=-Ra(t/(W0*3));e.moveTo(0,n*2),e.lineTo(-W0*n,-n),e.lineTo(W0*n,-n),e.closePath()}},Vr=-.5,Gr=Ra(3)/2,wS=1/Ra(12),Mae=(wS/2+1)*3,Pae={draw(e,t){const n=Ra(t/Mae),r=n/2,a=n*wS,o=r,l=n*wS+n,u=-o,f=l;e.moveTo(r,a),e.lineTo(o,l),e.lineTo(u,f),e.lineTo(Vr*r-Gr*a,Gr*r+Vr*a),e.lineTo(Vr*o-Gr*l,Gr*o+Vr*l),e.lineTo(Vr*u-Gr*f,Gr*u+Vr*f),e.lineTo(Vr*r+Gr*a,Vr*a-Gr*r),e.lineTo(Vr*o+Gr*l,Vr*l-Gr*o),e.lineTo(Vr*u+Gr*f,Vr*f-Gr*u),e.closePath()}};function Dae(e,t){let n=null,r=iO(a);e=typeof e=="function"?e:Ht(e||sO),t=typeof t=="function"?t:Ht(t===void 0?64:+t);function a(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return a.type=function(o){return arguments.length?(e=typeof o=="function"?o:Ht(o),a):e},a.size=function(o){return arguments.length?(t=typeof o=="function"?o:Ht(+o),a):t},a.context=function(o){return arguments.length?(n=o??null,a):n},a}function Fp(){}function Vp(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function iB(e){this._context=e}iB.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:Vp(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:Vp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function kae(e){return new iB(e)}function oB(e){this._context=e}oB.prototype={areaStart:Fp,areaEnd:Fp,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:Vp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function $ae(e){return new oB(e)}function sB(e){this._context=e}sB.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Vp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function zae(e){return new sB(e)}function lB(e){this._context=e}lB.prototype={areaStart:Fp,areaEnd:Fp,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 Lae(e){return new lB(e)}function WN(e){return e<0?-1:1}function ZN(e,t,n){var r=e._x1-e._x0,a=t-e._x1,o=(e._y1-e._y0)/(r||a<0&&-0),l=(n-e._y1)/(a||r<0&&-0),u=(o*a+l*r)/(r+a);return(WN(o)+WN(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(u))||0}function YN(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Z0(e,t,n){var r=e._x0,a=e._y0,o=e._x1,l=e._y1,u=(o-r)/3;e._context.bezierCurveTo(r+u,a+u*t,o-u,l-u*n,o,l)}function Gp(e){this._context=e}Gp.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:Z0(this,this._t0,YN(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Z0(this,YN(this,n=ZN(this,e,t)),n);break;default:Z0(this,this._t0,n=ZN(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function uB(e){this._context=new cB(e)}(uB.prototype=Object.create(Gp.prototype)).point=function(e,t){Gp.prototype.point.call(this,t,e)};function cB(e){this._context=e}cB.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,a,o){this._context.bezierCurveTo(t,e,r,n,o,a)}};function Iae(e){return new Gp(e)}function Bae(e){return new uB(e)}function fB(e){this._context=e}fB.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=KN(e),a=KN(t),o=0,l=1;l<n;++o,++l)this._context.bezierCurveTo(r[0][o],a[0][o],r[1][o],a[1][o],e[l],t[l]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function KN(e){var t,n=e.length-1,r,a=new Array(n),o=new Array(n),l=new Array(n);for(a[0]=0,o[0]=2,l[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,o[t]=4,l[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,o[n-1]=7,l[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/o[t-1],o[t]-=r,l[t]-=r*l[t-1];for(a[n-1]=l[n-1]/o[n-1],t=n-2;t>=0;--t)a[t]=(l[t]-a[t+1])/o[t];for(o[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-a[t+1];return[a,o]}function Uae(e){return new fB(e)}function Nv(e,t){this._context=e,this._t=t}Nv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function qae(e){return new Nv(e,.5)}function Hae(e){return new Nv(e,0)}function Fae(e){return new Nv(e,1)}function Zl(e,t){if((l=e.length)>1)for(var n=1,r,a,o=e[t[0]],l,u=o.length;n<l;++n)for(a=o,o=e[t[n]],r=0;r<u;++r)o[r][1]+=o[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function SS(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Vae(e,t){return e[t]}function Gae(e){const t=[];return t.key=e,t}function Wae(){var e=Ht([]),t=SS,n=Zl,r=Vae;function a(o){var l=Array.from(e.apply(this,arguments),Gae),u,f=l.length,d=-1,m;for(const p of o)for(u=0,++d;u<f;++u)(l[u][d]=[0,+r(p,l[u].key,d,o)]).data=p;for(u=0,m=oO(t(l));u<f;++u)l[m[u]].index=u;return n(l,m),l}return a.keys=function(o){return arguments.length?(e=typeof o=="function"?o:Ht(Array.from(o)),a):e},a.value=function(o){return arguments.length?(r=typeof o=="function"?o:Ht(+o),a):r},a.order=function(o){return arguments.length?(t=o==null?SS:typeof o=="function"?o:Ht(Array.from(o)),a):t},a.offset=function(o){return arguments.length?(n=o??Zl,a):n},a}function Zae(e,t){if((r=e.length)>0){for(var n,r,a=0,o=e[0].length,l;a<o;++a){for(l=n=0;n<r;++n)l+=e[n][a][1]||0;if(l)for(n=0;n<r;++n)e[n][a][1]/=l}Zl(e,t)}}function Yae(e,t){if((a=e.length)>0){for(var n=0,r=e[t[0]],a,o=r.length;n<o;++n){for(var l=0,u=0;l<a;++l)u+=e[l][n][1]||0;r[n][1]+=r[n][0]=-u/2}Zl(e,t)}}function Kae(e,t){if(!(!((l=e.length)>0)||!((o=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,o,l;r<o;++r){for(var u=0,f=0,d=0;u<l;++u){for(var m=e[t[u]],p=m[r][1]||0,g=m[r-1][1]||0,x=(p-g)/2,A=0;A<u;++A){var S=e[t[A]],w=S[r][1]||0,O=S[r-1][1]||0;x+=w-O}f+=p,d+=x*p}a[r-1][1]+=a[r-1][0]=n,f&&(n-=d/f)}a[r-1][1]+=a[r-1][0]=n,Zl(e,t)}}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)}var Xae=["type","size","sizeType"];function _S(){return _S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_S.apply(this,arguments)}function XN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function QN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XN(Object(n),!0).forEach(function(r){Qae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qae(e,t,n){return t=Jae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jae(e){var t=eie(e,"string");return cf(t)=="symbol"?t:t+""}function eie(e,t){if(cf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tie(e,t){if(e==null)return{};var n=nie(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var dB={symbolCircle:sO,symbolCross:_ae,symbolDiamond:Oae,symbolSquare:Eae,symbolStar:Rae,symbolTriangle:Nae,symbolWye:Pae},rie=Math.PI/180,aie=function(t){var n="symbol".concat(Tv(t));return dB[n]||sO},iie=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*rie;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),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}},oie=function(t,n){dB["symbol".concat(Tv(t))]=n},lO=function(t){var n=t.type,r=n===void 0?"circle":n,a=t.size,o=a===void 0?64:a,l=t.sizeType,u=l===void 0?"area":l,f=tie(t,Xae),d=QN(QN({},f),{},{type:r,size:o,sizeType:u}),m=function(){var w=aie(r),O=Dae().type(w).size(iie(o,u,r));return O()},p=d.className,g=d.cx,x=d.cy,A=ut(d,!0);return g===+g&&x===+x&&o===+o?q.createElement("path",_S({},A,{className:mt("recharts-symbols",p),transform:"translate(".concat(g,", ").concat(x,")"),d:m()})):null};lO.registerSymbol=oie;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 AS(){return AS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},AS.apply(this,arguments)}function JN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function sie(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JN(Object(n),!0).forEach(function(r){ff(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pB(r.key),r)}}function cie(e,t,n){return t&&uie(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function fie(e,t,n){return t=Wp(t),die(e,hB()?Reflect.construct(t,n||[],Wp(e).constructor):t.apply(e,n))}function die(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 hie(e)}function hie(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hB=function(){return!!e})()}function Wp(e){return Wp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wp(e)}function pie(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(r,a){return r.__proto__=a,r},OS(e,t)}function ff(e,t,n){return t=pB(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pB(e){var t=mie(e,"string");return Yl(t)=="symbol"?t:t+""}function mie(e,t){if(Yl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Wr=32,uO=(function(e){function t(){return lie(this,t),fie(this,t,arguments)}return pie(t,e),cie(t,[{key:"renderIcon",value:function(r){var a=this.props.inactiveColor,o=Wr/2,l=Wr/6,u=Wr/3,f=r.inactive?a:r.color;if(r.type==="plainline")return q.createElement("line",{strokeWidth:4,fill:"none",stroke:f,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:o,x2:Wr,y2:o,className:"recharts-legend-icon"});if(r.type==="line")return q.createElement("path",{strokeWidth:4,fill:"none",stroke:f,d:"M0,".concat(o,"h").concat(u,`
429
- A`).concat(l,",").concat(l,",0,1,1,").concat(2*u,",").concat(o,`
430
- H`).concat(Wr,"M").concat(2*u,",").concat(o,`
431
- A`).concat(l,",").concat(l,",0,1,1,").concat(u,",").concat(o),className:"recharts-legend-icon"});if(r.type==="rect")return q.createElement("path",{stroke:"none",fill:f,d:"M0,".concat(Wr/8,"h").concat(Wr,"v").concat(Wr*3/4,"h").concat(-Wr,"z"),className:"recharts-legend-icon"});if(q.isValidElement(r.legendIcon)){var d=sie({},r);return delete d.legendIcon,q.cloneElement(r.legendIcon,d)}return q.createElement(lO,{fill:f,cx:o,cy:o,size:Wr,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,a=this.props,o=a.payload,l=a.iconSize,u=a.layout,f=a.formatter,d=a.inactiveColor,m={x:0,y:0,width:Wr,height:Wr},p={display:u==="horizontal"?"inline-block":"block",marginRight:10},g={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(x,A){var S=x.formatter||f,w=mt(ff(ff({"recharts-legend-item":!0},"legend-item-".concat(A),!0),"inactive",x.inactive));if(x.type==="none")return null;var O=at(x.value)?null:x.value;Oi(!at(x.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 E=x.inactive?d:x.color;return q.createElement("li",AS({className:w,style:p,key:"legend-item-".concat(A)},Up(r.props,x,A)),q.createElement(gS,{width:l,height:l,viewBox:m,style:g},r.renderIcon(x)),q.createElement("span",{className:"recharts-legend-item-text",style:{color:E}},S?S(O,x,A):O))})}},{key:"render",value:function(){var r=this.props,a=r.payload,o=r.layout,l=r.align;if(!a||!a.length)return null;var u={padding:0,margin:0,textAlign:o==="horizontal"?l:"left"};return q.createElement("ul",{className:"recharts-default-legend",style:u},this.renderItems())}}])})(y.PureComponent);ff(uO,"displayName","Legend");ff(uO,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Y0,eM;function vie(){if(eM)return Y0;eM=1;var e=Ov();function t(){this.__data__=new e,this.size=0}return Y0=t,Y0}var K0,tM;function gie(){if(tM)return K0;tM=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return K0=e,K0}var X0,nM;function yie(){if(nM)return X0;nM=1;function e(t){return this.__data__.get(t)}return X0=e,X0}var Q0,rM;function bie(){if(rM)return Q0;rM=1;function e(t){return this.__data__.has(t)}return Q0=e,Q0}var J0,aM;function xie(){if(aM)return J0;aM=1;var e=Ov(),t=JA(),n=eO(),r=200;function a(o,l){var u=this.__data__;if(u instanceof e){var f=u.__data__;if(!t||f.length<r-1)return f.push([o,l]),this.size=++u.size,this;u=this.__data__=new n(f)}return u.set(o,l),this.size=u.size,this}return J0=a,J0}var ex,iM;function mB(){if(iM)return ex;iM=1;var e=Ov(),t=vie(),n=gie(),r=yie(),a=bie(),o=xie();function l(u){var f=this.__data__=new e(u);this.size=f.size}return l.prototype.clear=t,l.prototype.delete=n,l.prototype.get=r,l.prototype.has=a,l.prototype.set=o,ex=l,ex}var tx,oM;function wie(){if(oM)return tx;oM=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return tx=t,tx}var nx,sM;function Sie(){if(sM)return nx;sM=1;function e(t){return this.__data__.has(t)}return nx=e,nx}var rx,lM;function vB(){if(lM)return rx;lM=1;var e=eO(),t=wie(),n=Sie();function r(a){var o=-1,l=a==null?0:a.length;for(this.__data__=new e;++o<l;)this.add(a[o])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,rx=r,rx}var ax,uM;function gB(){if(uM)return ax;uM=1;function e(t,n){for(var r=-1,a=t==null?0:t.length;++r<a;)if(n(t[r],r,t))return!0;return!1}return ax=e,ax}var ix,cM;function yB(){if(cM)return ix;cM=1;function e(t,n){return t.has(n)}return ix=e,ix}var ox,fM;function bB(){if(fM)return ox;fM=1;var e=vB(),t=gB(),n=yB(),r=1,a=2;function o(l,u,f,d,m,p){var g=f&r,x=l.length,A=u.length;if(x!=A&&!(g&&A>x))return!1;var S=p.get(l),w=p.get(u);if(S&&w)return S==u&&w==l;var O=-1,E=!0,T=f&a?new e:void 0;for(p.set(l,u),p.set(u,l);++O<x;){var C=l[O],j=u[O];if(d)var R=g?d(j,C,O,u,l,p):d(C,j,O,l,u,p);if(R!==void 0){if(R)continue;E=!1;break}if(T){if(!t(u,function(N,k){if(!n(T,k)&&(C===N||m(C,N,f,d,p)))return T.push(k)})){E=!1;break}}else if(!(C===j||m(C,j,f,d,p))){E=!1;break}}return p.delete(l),p.delete(u),E}return ox=o,ox}var sx,dM;function _ie(){if(dM)return sx;dM=1;var e=Ja(),t=e.Uint8Array;return sx=t,sx}var lx,hM;function Aie(){if(hM)return lx;hM=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(a,o){r[++n]=[o,a]}),r}return lx=e,lx}var ux,pM;function cO(){if(pM)return ux;pM=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(a){r[++n]=a}),r}return ux=e,ux}var cx,mM;function Oie(){if(mM)return cx;mM=1;var e=dd(),t=_ie(),n=QA(),r=bB(),a=Aie(),o=cO(),l=1,u=2,f="[object Boolean]",d="[object Date]",m="[object Error]",p="[object Map]",g="[object Number]",x="[object RegExp]",A="[object Set]",S="[object String]",w="[object Symbol]",O="[object ArrayBuffer]",E="[object DataView]",T=e?e.prototype:void 0,C=T?T.valueOf:void 0;function j(R,N,k,$,V,I,L){switch(k){case E:if(R.byteLength!=N.byteLength||R.byteOffset!=N.byteOffset)return!1;R=R.buffer,N=N.buffer;case O:return!(R.byteLength!=N.byteLength||!I(new t(R),new t(N)));case f:case d:case g:return n(+R,+N);case m:return R.name==N.name&&R.message==N.message;case x:case S:return R==N+"";case p:var H=a;case A:var W=$&l;if(H||(H=o),R.size!=N.size&&!W)return!1;var Z=L.get(R);if(Z)return Z==N;$|=u,L.set(R,N);var z=r(H(R),H(N),$,V,I,L);return L.delete(R),z;case w:if(C)return C.call(R)==C.call(N)}return!1}return cx=j,cx}var fx,vM;function xB(){if(vM)return fx;vM=1;function e(t,n){for(var r=-1,a=n.length,o=t.length;++r<a;)t[o+r]=n[r];return t}return fx=e,fx}var dx,gM;function Eie(){if(gM)return dx;gM=1;var e=xB(),t=pr();function n(r,a,o){var l=a(r);return t(r)?l:e(l,o(r))}return dx=n,dx}var hx,yM;function jie(){if(yM)return hx;yM=1;function e(t,n){for(var r=-1,a=t==null?0:t.length,o=0,l=[];++r<a;){var u=t[r];n(u,r,t)&&(l[o++]=u)}return l}return hx=e,hx}var px,bM;function Tie(){if(bM)return px;bM=1;function e(){return[]}return px=e,px}var mx,xM;function Cie(){if(xM)return mx;xM=1;var e=jie(),t=Tie(),n=Object.prototype,r=n.propertyIsEnumerable,a=Object.getOwnPropertySymbols,o=a?function(l){return l==null?[]:(l=Object(l),e(a(l),function(u){return r.call(l,u)}))}:t;return mx=o,mx}var vx,wM;function Rie(){if(wM)return vx;wM=1;function e(t,n){for(var r=-1,a=Array(t);++r<t;)a[r]=n(r);return a}return vx=e,vx}var gx,SM;function Nie(){if(SM)return gx;SM=1;var e=ki(),t=$i(),n="[object Arguments]";function r(a){return t(a)&&e(a)==n}return gx=r,gx}var yx,_M;function fO(){if(_M)return yx;_M=1;var e=Nie(),t=$i(),n=Object.prototype,r=n.hasOwnProperty,a=n.propertyIsEnumerable,o=e((function(){return arguments})())?e:function(l){return t(l)&&r.call(l,"callee")&&!a.call(l,"callee")};return yx=o,yx}var Vc={exports:{}},bx,AM;function Mie(){if(AM)return bx;AM=1;function e(){return!1}return bx=e,bx}Vc.exports;var OM;function wB(){return OM||(OM=1,(function(e,t){var n=Ja(),r=Mie(),a=t&&!t.nodeType&&t,o=a&&!0&&e&&!e.nodeType&&e,l=o&&o.exports===a,u=l?n.Buffer:void 0,f=u?u.isBuffer:void 0,d=f||r;e.exports=d})(Vc,Vc.exports)),Vc.exports}var xx,EM;function dO(){if(EM)return xx;EM=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,a){var o=typeof r;return a=a??e,!!a&&(o=="number"||o!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<a}return xx=n,xx}var wx,jM;function hO(){if(jM)return wx;jM=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return wx=t,wx}var Sx,TM;function Pie(){if(TM)return Sx;TM=1;var e=ki(),t=hO(),n=$i(),r="[object Arguments]",a="[object Array]",o="[object Boolean]",l="[object Date]",u="[object Error]",f="[object Function]",d="[object Map]",m="[object Number]",p="[object Object]",g="[object RegExp]",x="[object Set]",A="[object String]",S="[object WeakMap]",w="[object ArrayBuffer]",O="[object DataView]",E="[object Float32Array]",T="[object Float64Array]",C="[object Int8Array]",j="[object Int16Array]",R="[object Int32Array]",N="[object Uint8Array]",k="[object Uint8ClampedArray]",$="[object Uint16Array]",V="[object Uint32Array]",I={};I[E]=I[T]=I[C]=I[j]=I[R]=I[N]=I[k]=I[$]=I[V]=!0,I[r]=I[a]=I[w]=I[o]=I[O]=I[l]=I[u]=I[f]=I[d]=I[m]=I[p]=I[g]=I[x]=I[A]=I[S]=!1;function L(H){return n(H)&&t(H.length)&&!!I[e(H)]}return Sx=L,Sx}var _x,CM;function SB(){if(CM)return _x;CM=1;function e(t){return function(n){return t(n)}}return _x=e,_x}var Gc={exports:{}};Gc.exports;var RM;function Die(){return RM||(RM=1,(function(e,t){var n=q4(),r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===r,l=o&&n.process,u=(function(){try{var f=a&&a.require&&a.require("util").types;return f||l&&l.binding&&l.binding("util")}catch{}})();e.exports=u})(Gc,Gc.exports)),Gc.exports}var Ax,NM;function _B(){if(NM)return Ax;NM=1;var e=Pie(),t=SB(),n=Die(),r=n&&n.isTypedArray,a=r?t(r):e;return Ax=a,Ax}var Ox,MM;function kie(){if(MM)return Ox;MM=1;var e=Rie(),t=fO(),n=pr(),r=wB(),a=dO(),o=_B(),l=Object.prototype,u=l.hasOwnProperty;function f(d,m){var p=n(d),g=!p&&t(d),x=!p&&!g&&r(d),A=!p&&!g&&!x&&o(d),S=p||g||x||A,w=S?e(d.length,String):[],O=w.length;for(var E in d)(m||u.call(d,E))&&!(S&&(E=="length"||x&&(E=="offset"||E=="parent")||A&&(E=="buffer"||E=="byteLength"||E=="byteOffset")||a(E,O)))&&w.push(E);return w}return Ox=f,Ox}var Ex,PM;function $ie(){if(PM)return Ex;PM=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,a=typeof r=="function"&&r.prototype||e;return n===a}return Ex=t,Ex}var jx,DM;function AB(){if(DM)return jx;DM=1;function e(t,n){return function(r){return t(n(r))}}return jx=e,jx}var Tx,kM;function zie(){if(kM)return Tx;kM=1;var e=AB(),t=e(Object.keys,Object);return Tx=t,Tx}var Cx,$M;function Lie(){if($M)return Cx;$M=1;var e=$ie(),t=zie(),n=Object.prototype,r=n.hasOwnProperty;function a(o){if(!e(o))return t(o);var l=[];for(var u in Object(o))r.call(o,u)&&u!="constructor"&&l.push(u);return l}return Cx=a,Cx}var Rx,zM;function pd(){if(zM)return Rx;zM=1;var e=XA(),t=hO();function n(r){return r!=null&&t(r.length)&&!e(r)}return Rx=n,Rx}var Nx,LM;function Mv(){if(LM)return Nx;LM=1;var e=kie(),t=Lie(),n=pd();function r(a){return n(a)?e(a):t(a)}return Nx=r,Nx}var Mx,IM;function Iie(){if(IM)return Mx;IM=1;var e=Eie(),t=Cie(),n=Mv();function r(a){return e(a,n,t)}return Mx=r,Mx}var Px,BM;function Bie(){if(BM)return Px;BM=1;var e=Iie(),t=1,n=Object.prototype,r=n.hasOwnProperty;function a(o,l,u,f,d,m){var p=u&t,g=e(o),x=g.length,A=e(l),S=A.length;if(x!=S&&!p)return!1;for(var w=x;w--;){var O=g[w];if(!(p?O in l:r.call(l,O)))return!1}var E=m.get(o),T=m.get(l);if(E&&T)return E==l&&T==o;var C=!0;m.set(o,l),m.set(l,o);for(var j=p;++w<x;){O=g[w];var R=o[O],N=l[O];if(f)var k=p?f(N,R,O,l,o,m):f(R,N,O,o,l,m);if(!(k===void 0?R===N||d(R,N,u,f,m):k)){C=!1;break}j||(j=O=="constructor")}if(C&&!j){var $=o.constructor,V=l.constructor;$!=V&&"constructor"in o&&"constructor"in l&&!(typeof $=="function"&&$ instanceof $&&typeof V=="function"&&V instanceof V)&&(C=!1)}return m.delete(o),m.delete(l),C}return Px=a,Px}var Dx,UM;function Uie(){if(UM)return Dx;UM=1;var e=ks(),t=Ja(),n=e(t,"DataView");return Dx=n,Dx}var kx,qM;function qie(){if(qM)return kx;qM=1;var e=ks(),t=Ja(),n=e(t,"Promise");return kx=n,kx}var $x,HM;function OB(){if(HM)return $x;HM=1;var e=ks(),t=Ja(),n=e(t,"Set");return $x=n,$x}var zx,FM;function Hie(){if(FM)return zx;FM=1;var e=ks(),t=Ja(),n=e(t,"WeakMap");return zx=n,zx}var Lx,VM;function Fie(){if(VM)return Lx;VM=1;var e=Uie(),t=JA(),n=qie(),r=OB(),a=Hie(),o=ki(),l=H4(),u="[object Map]",f="[object Object]",d="[object Promise]",m="[object Set]",p="[object WeakMap]",g="[object DataView]",x=l(e),A=l(t),S=l(n),w=l(r),O=l(a),E=o;return(e&&E(new e(new ArrayBuffer(1)))!=g||t&&E(new t)!=u||n&&E(n.resolve())!=d||r&&E(new r)!=m||a&&E(new a)!=p)&&(E=function(T){var C=o(T),j=C==f?T.constructor:void 0,R=j?l(j):"";if(R)switch(R){case x:return g;case A:return u;case S:return d;case w:return m;case O:return p}return C}),Lx=E,Lx}var Ix,GM;function Vie(){if(GM)return Ix;GM=1;var e=mB(),t=bB(),n=Oie(),r=Bie(),a=Fie(),o=pr(),l=wB(),u=_B(),f=1,d="[object Arguments]",m="[object Array]",p="[object Object]",g=Object.prototype,x=g.hasOwnProperty;function A(S,w,O,E,T,C){var j=o(S),R=o(w),N=j?m:a(S),k=R?m:a(w);N=N==d?p:N,k=k==d?p:k;var $=N==p,V=k==p,I=N==k;if(I&&l(S)){if(!l(w))return!1;j=!0,$=!1}if(I&&!$)return C||(C=new e),j||u(S)?t(S,w,O,E,T,C):n(S,w,N,O,E,T,C);if(!(O&f)){var L=$&&x.call(S,"__wrapped__"),H=V&&x.call(w,"__wrapped__");if(L||H){var W=L?S.value():S,Z=H?w.value():w;return C||(C=new e),T(W,Z,O,E,C)}}return I?(C||(C=new e),r(S,w,O,E,T,C)):!1}return Ix=A,Ix}var Bx,WM;function pO(){if(WM)return Bx;WM=1;var e=Vie(),t=$i();function n(r,a,o,l,u){return r===a?!0:r==null||a==null||!t(r)&&!t(a)?r!==r&&a!==a:e(r,a,o,l,n,u)}return Bx=n,Bx}var Ux,ZM;function Gie(){if(ZM)return Ux;ZM=1;var e=mB(),t=pO(),n=1,r=2;function a(o,l,u,f){var d=u.length,m=d,p=!f;if(o==null)return!m;for(o=Object(o);d--;){var g=u[d];if(p&&g[2]?g[1]!==o[g[0]]:!(g[0]in o))return!1}for(;++d<m;){g=u[d];var x=g[0],A=o[x],S=g[1];if(p&&g[2]){if(A===void 0&&!(x in o))return!1}else{var w=new e;if(f)var O=f(A,S,x,o,l,w);if(!(O===void 0?t(S,A,n|r,f,w):O))return!1}}return!0}return Ux=a,Ux}var qx,YM;function EB(){if(YM)return qx;YM=1;var e=Po();function t(n){return n===n&&!e(n)}return qx=t,qx}var Hx,KM;function Wie(){if(KM)return Hx;KM=1;var e=EB(),t=Mv();function n(r){for(var a=t(r),o=a.length;o--;){var l=a[o],u=r[l];a[o]=[l,u,e(u)]}return a}return Hx=n,Hx}var Fx,XM;function jB(){if(XM)return Fx;XM=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return Fx=e,Fx}var Vx,QM;function Zie(){if(QM)return Vx;QM=1;var e=Gie(),t=Wie(),n=jB();function r(a){var o=t(a);return o.length==1&&o[0][2]?n(o[0][0],o[0][1]):function(l){return l===a||e(l,a,o)}}return Vx=r,Vx}var Gx,JM;function Yie(){if(JM)return Gx;JM=1;function e(t,n){return t!=null&&n in Object(t)}return Gx=e,Gx}var Wx,eP;function Kie(){if(eP)return Wx;eP=1;var e=G4(),t=fO(),n=pr(),r=dO(),a=hO(),o=jv();function l(u,f,d){f=e(f,u);for(var m=-1,p=f.length,g=!1;++m<p;){var x=o(f[m]);if(!(g=u!=null&&d(u,x)))break;u=u[x]}return g||++m!=p?g:(p=u==null?0:u.length,!!p&&a(p)&&r(x,p)&&(n(u)||t(u)))}return Wx=l,Wx}var Zx,tP;function Xie(){if(tP)return Zx;tP=1;var e=Yie(),t=Kie();function n(r,a){return r!=null&&t(r,a,e)}return Zx=n,Zx}var Yx,nP;function Qie(){if(nP)return Yx;nP=1;var e=pO(),t=W4(),n=Xie(),r=KA(),a=EB(),o=jB(),l=jv(),u=1,f=2;function d(m,p){return r(m)&&a(p)?o(l(m),p):function(g){var x=t(g,m);return x===void 0&&x===p?n(g,m):e(p,x,u|f)}}return Yx=d,Yx}var Kx,rP;function Cu(){if(rP)return Kx;rP=1;function e(t){return t}return Kx=e,Kx}var Xx,aP;function Jie(){if(aP)return Xx;aP=1;function e(t){return function(n){return n==null?void 0:n[t]}}return Xx=e,Xx}var Qx,iP;function eoe(){if(iP)return Qx;iP=1;var e=nO();function t(n){return function(r){return e(r,n)}}return Qx=t,Qx}var Jx,oP;function toe(){if(oP)return Jx;oP=1;var e=Jie(),t=eoe(),n=KA(),r=jv();function a(o){return n(o)?e(r(o)):t(o)}return Jx=a,Jx}var ew,sP;function Do(){if(sP)return ew;sP=1;var e=Zie(),t=Qie(),n=Cu(),r=pr(),a=toe();function o(l){return typeof l=="function"?l:l==null?n:typeof l=="object"?r(l)?t(l[0],l[1]):e(l):a(l)}return ew=o,ew}var tw,lP;function TB(){if(lP)return tw;lP=1;function e(t,n,r,a){for(var o=t.length,l=r+(a?1:-1);a?l--:++l<o;)if(n(t[l],l,t))return l;return-1}return tw=e,tw}var nw,uP;function noe(){if(uP)return nw;uP=1;function e(t){return t!==t}return nw=e,nw}var rw,cP;function roe(){if(cP)return rw;cP=1;function e(t,n,r){for(var a=r-1,o=t.length;++a<o;)if(t[a]===n)return a;return-1}return rw=e,rw}var aw,fP;function aoe(){if(fP)return aw;fP=1;var e=TB(),t=noe(),n=roe();function r(a,o,l){return o===o?n(a,o,l):e(a,t,l)}return aw=r,aw}var iw,dP;function ioe(){if(dP)return iw;dP=1;var e=aoe();function t(n,r){var a=n==null?0:n.length;return!!a&&e(n,r,0)>-1}return iw=t,iw}var ow,hP;function ooe(){if(hP)return ow;hP=1;function e(t,n,r){for(var a=-1,o=t==null?0:t.length;++a<o;)if(r(n,t[a]))return!0;return!1}return ow=e,ow}var sw,pP;function soe(){if(pP)return sw;pP=1;function e(){}return sw=e,sw}var lw,mP;function loe(){if(mP)return lw;mP=1;var e=OB(),t=soe(),n=cO(),r=1/0,a=e&&1/n(new e([,-0]))[1]==r?function(o){return new e(o)}:t;return lw=a,lw}var uw,vP;function uoe(){if(vP)return uw;vP=1;var e=vB(),t=ioe(),n=ooe(),r=yB(),a=loe(),o=cO(),l=200;function u(f,d,m){var p=-1,g=t,x=f.length,A=!0,S=[],w=S;if(m)A=!1,g=n;else if(x>=l){var O=d?null:a(f);if(O)return o(O);A=!1,g=r,w=new e}else w=d?[]:S;e:for(;++p<x;){var E=f[p],T=d?d(E):E;if(E=m||E!==0?E:0,A&&T===T){for(var C=w.length;C--;)if(w[C]===T)continue e;d&&w.push(T),S.push(E)}else g(w,T,m)||(w!==S&&w.push(T),S.push(E))}return S}return uw=u,uw}var cw,gP;function coe(){if(gP)return cw;gP=1;var e=Do(),t=uoe();function n(r,a){return r&&r.length?t(r,e(a,2)):[]}return cw=n,cw}var foe=coe();const yP=kt(foe);function CB(e,t,n){return t===!0?yP(e,n):at(t)?yP(e,t):e}function Kl(e){"@babel/helpers - typeof";return Kl=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},Kl(e)}var doe=["ref"];function bP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function xi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bP(Object(n),!0).forEach(function(r){Pv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hoe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,NB(r.key),r)}}function poe(e,t,n){return t&&xP(e.prototype,t),n&&xP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function moe(e,t,n){return t=Zp(t),voe(e,RB()?Reflect.construct(t,n||[],Zp(e).constructor):t.apply(e,n))}function voe(e,t){if(t&&(Kl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return goe(e)}function goe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(RB=function(){return!!e})()}function Zp(e){return Zp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zp(e)}function yoe(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&&ES(e,t)}function ES(e,t){return ES=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},ES(e,t)}function Pv(e,t,n){return t=NB(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NB(e){var t=boe(e,"string");return Kl(t)=="symbol"?t:t+""}function boe(e,t){if(Kl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function xoe(e,t){if(e==null)return{};var n=woe(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function woe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Soe(e){return e.value}function _oe(e,t){if(q.isValidElement(e))return q.cloneElement(e,t);if(typeof e=="function")return q.createElement(e,t);t.ref;var n=xoe(t,doe);return q.createElement(uO,n)}var wP=1,Ll=(function(e){function t(){var n;hoe(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=moe(this,t,[].concat(a)),Pv(n,"lastBoundingBox",{width:-1,height:-1}),n}return yoe(t,e),poe(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>wP||Math.abs(a.height-this.lastBoundingBox.height)>wP)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,r&&r(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?xi({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var a=this.props,o=a.layout,l=a.align,u=a.verticalAlign,f=a.margin,d=a.chartWidth,m=a.chartHeight,p,g;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(l==="center"&&o==="vertical"){var x=this.getBBoxSnapshot();p={left:((d||0)-x.width)/2}}else p=l==="right"?{right:f&&f.right||0}:{left:f&&f.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(u==="middle"){var A=this.getBBoxSnapshot();g={top:((m||0)-A.height)/2}}else g=u==="bottom"?{bottom:f&&f.bottom||0}:{top:f&&f.top||0};return xi(xi({},p),g)}},{key:"render",value:function(){var r=this,a=this.props,o=a.content,l=a.width,u=a.height,f=a.wrapperStyle,d=a.payloadUniqBy,m=a.payload,p=xi(xi({position:"absolute",width:l||"auto",height:u||"auto"},this.getDefaultPosition(f)),f);return q.createElement("div",{className:"recharts-legend-wrapper",style:p,ref:function(x){r.wrapperNode=x}},_oe(o,xi(xi({},this.props),{},{payload:CB(m,d,Soe)})))}}],[{key:"getWithHeight",value:function(r,a){var o=xi(xi({},this.defaultProps),r.props),l=o.layout;return l==="vertical"&&je(r.props.height)?{height:r.props.height}:l==="horizontal"?{width:r.props.width||a}:null}}])})(y.PureComponent);Pv(Ll,"displayName","Legend");Pv(Ll,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var fw,SP;function Aoe(){if(SP)return fw;SP=1;var e=dd(),t=fO(),n=pr(),r=e?e.isConcatSpreadable:void 0;function a(o){return n(o)||t(o)||!!(r&&o&&o[r])}return fw=a,fw}var dw,_P;function MB(){if(_P)return dw;_P=1;var e=xB(),t=Aoe();function n(r,a,o,l,u){var f=-1,d=r.length;for(o||(o=t),u||(u=[]);++f<d;){var m=r[f];a>0&&o(m)?a>1?n(m,a-1,o,l,u):e(u,m):l||(u[u.length]=m)}return u}return dw=n,dw}var hw,AP;function Ooe(){if(AP)return hw;AP=1;function e(t){return function(n,r,a){for(var o=-1,l=Object(n),u=a(n),f=u.length;f--;){var d=u[t?f:++o];if(r(l[d],d,l)===!1)break}return n}}return hw=e,hw}var pw,OP;function Eoe(){if(OP)return pw;OP=1;var e=Ooe(),t=e();return pw=t,pw}var mw,EP;function PB(){if(EP)return mw;EP=1;var e=Eoe(),t=Mv();function n(r,a){return r&&e(r,a,t)}return mw=n,mw}var vw,jP;function joe(){if(jP)return vw;jP=1;var e=pd();function t(n,r){return function(a,o){if(a==null)return a;if(!e(a))return n(a,o);for(var l=a.length,u=r?l:-1,f=Object(a);(r?u--:++u<l)&&o(f[u],u,f)!==!1;);return a}}return vw=t,vw}var gw,TP;function mO(){if(TP)return gw;TP=1;var e=PB(),t=joe(),n=t(e);return gw=n,gw}var yw,CP;function DB(){if(CP)return yw;CP=1;var e=mO(),t=pd();function n(r,a){var o=-1,l=t(r)?Array(r.length):[];return e(r,function(u,f,d){l[++o]=a(u,f,d)}),l}return yw=n,yw}var bw,RP;function Toe(){if(RP)return bw;RP=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return bw=e,bw}var xw,NP;function Coe(){if(NP)return xw;NP=1;var e=Eu();function t(n,r){if(n!==r){var a=n!==void 0,o=n===null,l=n===n,u=e(n),f=r!==void 0,d=r===null,m=r===r,p=e(r);if(!d&&!p&&!u&&n>r||u&&f&&m&&!d&&!p||o&&f&&m||!a&&m||!l)return 1;if(!o&&!u&&!p&&n<r||p&&a&&l&&!o&&!u||d&&a&&l||!f&&l||!m)return-1}return 0}return xw=t,xw}var ww,MP;function Roe(){if(MP)return ww;MP=1;var e=Coe();function t(n,r,a){for(var o=-1,l=n.criteria,u=r.criteria,f=l.length,d=a.length;++o<f;){var m=e(l[o],u[o]);if(m){if(o>=d)return m;var p=a[o];return m*(p=="desc"?-1:1)}}return n.index-r.index}return ww=t,ww}var Sw,PP;function Noe(){if(PP)return Sw;PP=1;var e=tO(),t=nO(),n=Do(),r=DB(),a=Toe(),o=SB(),l=Roe(),u=Cu(),f=pr();function d(m,p,g){p.length?p=e(p,function(S){return f(S)?function(w){return t(w,S.length===1?S[0]:S)}:S}):p=[u];var x=-1;p=e(p,o(n));var A=r(m,function(S,w,O){var E=e(p,function(T){return T(S)});return{criteria:E,index:++x,value:S}});return a(A,function(S,w){return l(S,w,g)})}return Sw=d,Sw}var _w,DP;function Moe(){if(DP)return _w;DP=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return _w=e,_w}var Aw,kP;function Poe(){if(kP)return Aw;kP=1;var e=Moe(),t=Math.max;function n(r,a,o){return a=t(a===void 0?r.length-1:a,0),function(){for(var l=arguments,u=-1,f=t(l.length-a,0),d=Array(f);++u<f;)d[u]=l[a+u];u=-1;for(var m=Array(a+1);++u<a;)m[u]=l[u];return m[a]=o(d),e(r,this,m)}}return Aw=n,Aw}var Ow,$P;function Doe(){if($P)return Ow;$P=1;function e(t){return function(){return t}}return Ow=e,Ow}var Ew,zP;function kB(){if(zP)return Ew;zP=1;var e=ks(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return Ew=t,Ew}var jw,LP;function koe(){if(LP)return jw;LP=1;var e=Doe(),t=kB(),n=Cu(),r=t?function(a,o){return t(a,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:n;return jw=r,jw}var Tw,IP;function $oe(){if(IP)return Tw;IP=1;var e=800,t=16,n=Date.now;function r(a){var o=0,l=0;return function(){var u=n(),f=t-(u-l);if(l=u,f>0){if(++o>=e)return arguments[0]}else o=0;return a.apply(void 0,arguments)}}return Tw=r,Tw}var Cw,BP;function zoe(){if(BP)return Cw;BP=1;var e=koe(),t=$oe(),n=t(e);return Cw=n,Cw}var Rw,UP;function Loe(){if(UP)return Rw;UP=1;var e=Cu(),t=Poe(),n=zoe();function r(a,o){return n(t(a,o,e),a+"")}return Rw=r,Rw}var Nw,qP;function Dv(){if(qP)return Nw;qP=1;var e=QA(),t=pd(),n=dO(),r=Po();function a(o,l,u){if(!r(u))return!1;var f=typeof l;return(f=="number"?t(u)&&n(l,u.length):f=="string"&&l in u)?e(u[l],o):!1}return Nw=a,Nw}var Mw,HP;function Ioe(){if(HP)return Mw;HP=1;var e=MB(),t=Noe(),n=Loe(),r=Dv(),a=n(function(o,l){if(o==null)return[];var u=l.length;return u>1&&r(o,l[0],l[1])?l=[]:u>2&&r(l[0],l[1],l[2])&&(l=[l[0]]),t(o,e(l,1),[])});return Mw=a,Mw}var Boe=Ioe();const vO=kt(Boe);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 jS(){return jS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jS.apply(this,arguments)}function Uoe(e,t){return Voe(e)||Foe(e,t)||Hoe(e,t)||qoe()}function qoe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
432
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hoe(e,t){if(e){if(typeof e=="string")return FP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FP(e,t)}}function FP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Foe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return u}}function Voe(e){if(Array.isArray(e))return e}function VP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Pw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VP(Object(n),!0).forEach(function(r){Goe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Goe(e,t,n){return t=Woe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Woe(e){var t=Zoe(e,"string");return df(t)=="symbol"?t:t+""}function Zoe(e,t){if(df(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(df(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yoe(e){return Array.isArray(e)&&An(e[0])&&An(e[1])?e.join(" ~ "):e}var Koe=function(t){var n=t.separator,r=n===void 0?" : ":n,a=t.contentStyle,o=a===void 0?{}:a,l=t.itemStyle,u=l===void 0?{}:l,f=t.labelStyle,d=f===void 0?{}:f,m=t.payload,p=t.formatter,g=t.itemSorter,x=t.wrapperClassName,A=t.labelClassName,S=t.label,w=t.labelFormatter,O=t.accessibilityLayer,E=O===void 0?!1:O,T=function(){if(m&&m.length){var L={padding:0,margin:0},H=(g?vO(m,g):m).map(function(W,Z){if(W.type==="none")return null;var z=Pw({display:"block",paddingTop:4,paddingBottom:4,color:W.color||"#000"},u),F=W.formatter||p||Yoe,Y=W.value,Q=W.name,K=Y,P=Q;if(F&&K!=null&&P!=null){var U=F(Y,Q,W,Z,m);if(Array.isArray(U)){var ne=Uoe(U,2);K=ne[0],P=ne[1]}else K=U}return q.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(Z),style:z},An(P)?q.createElement("span",{className:"recharts-tooltip-item-name"},P):null,An(P)?q.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,q.createElement("span",{className:"recharts-tooltip-item-value"},K),q.createElement("span",{className:"recharts-tooltip-item-unit"},W.unit||""))});return q.createElement("ul",{className:"recharts-tooltip-item-list",style:L},H)}return null},C=Pw({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),j=Pw({margin:0},d),R=!ht(S),N=R?S:"",k=mt("recharts-default-tooltip",x),$=mt("recharts-tooltip-label",A);R&&w&&m!==void 0&&m!==null&&(N=w(S,m));var V=E?{role:"status","aria-live":"assertive"}:{};return q.createElement("div",jS({className:k,style:C},V),q.createElement("p",{className:$,style:j},q.isValidElement(N)?N:"".concat(N)),T())};function hf(e){"@babel/helpers - typeof";return hf=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},hf(e)}function Vh(e,t,n){return t=Xoe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xoe(e){var t=Qoe(e,"string");return hf(t)=="symbol"?t:t+""}function Qoe(e,t){if(hf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Nc="recharts-tooltip-wrapper",Joe={visibility:"hidden"};function ese(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return mt(Nc,Vh(Vh(Vh(Vh({},"".concat(Nc,"-right"),je(n)&&t&&je(t.x)&&n>=t.x),"".concat(Nc,"-left"),je(n)&&t&&je(t.x)&&n<t.x),"".concat(Nc,"-bottom"),je(r)&&t&&je(t.y)&&r>=t.y),"".concat(Nc,"-top"),je(r)&&t&&je(t.y)&&r<t.y))}function GP(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,a=e.offsetTopLeft,o=e.position,l=e.reverseDirection,u=e.tooltipDimension,f=e.viewBox,d=e.viewBoxDimension;if(o&&je(o[r]))return o[r];var m=n[r]-u-a,p=n[r]+a;if(t[r])return l[r]?m:p;if(l[r]){var g=m,x=f[r];return g<x?Math.max(p,f[r]):Math.max(m,f[r])}var A=p+u,S=f[r]+d;return A>S?Math.max(m,f[r]):Math.max(p,f[r])}function tse(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function nse(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,a=e.position,o=e.reverseDirection,l=e.tooltipBox,u=e.useTranslate3d,f=e.viewBox,d,m,p;return l.height>0&&l.width>0&&n?(m=GP({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:a,reverseDirection:o,tooltipDimension:l.width,viewBox:f,viewBoxDimension:f.width}),p=GP({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:a,reverseDirection:o,tooltipDimension:l.height,viewBox:f,viewBoxDimension:f.height}),d=tse({translateX:m,translateY:p,useTranslate3d:u})):d=Joe,{cssProperties:d,cssClasses:ese({translateX:m,translateY:p,coordinate:n})}}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 WP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ZP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WP(Object(n),!0).forEach(function(r){CS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ase(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,zB(r.key),r)}}function ise(e,t,n){return t&&ase(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ose(e,t,n){return t=Yp(t),sse(e,$B()?Reflect.construct(t,n||[],Yp(e).constructor):t.apply(e,n))}function sse(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 lse(e)}function lse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $B(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($B=function(){return!!e})()}function Yp(e){return Yp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Yp(e)}function use(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(r,a){return r.__proto__=a,r},TS(e,t)}function CS(e,t,n){return t=zB(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zB(e){var t=cse(e,"string");return Xl(t)=="symbol"?t:t+""}function cse(e,t){if(Xl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var YP=1,fse=(function(e){function t(){var n;rse(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=ose(this,t,[].concat(a)),CS(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),CS(n,"handleKeyDown",function(l){if(l.key==="Escape"){var u,f,d,m;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(u=(f=n.props.coordinate)===null||f===void 0?void 0:f.x)!==null&&u!==void 0?u:0,y:(d=(m=n.props.coordinate)===null||m===void 0?void 0:m.y)!==null&&d!==void 0?d:0}})}}),n}return use(t,e),ise(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>YP||Math.abs(r.height-this.state.lastBoundingBox.height)>YP)&&this.setState({lastBoundingBox:{width:r.width,height:r.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 r,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,a=this.props,o=a.active,l=a.allowEscapeViewBox,u=a.animationDuration,f=a.animationEasing,d=a.children,m=a.coordinate,p=a.hasPayload,g=a.isAnimationActive,x=a.offset,A=a.position,S=a.reverseDirection,w=a.useTranslate3d,O=a.viewBox,E=a.wrapperStyle,T=nse({allowEscapeViewBox:l,coordinate:m,offsetTopLeft:x,position:A,reverseDirection:S,tooltipBox:this.state.lastBoundingBox,useTranslate3d:w,viewBox:O}),C=T.cssClasses,j=T.cssProperties,R=ZP(ZP({transition:g&&o?"transform ".concat(u,"ms ").concat(f):void 0},j),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&p?"visible":"hidden",position:"absolute",top:0,left:0},E);return q.createElement("div",{tabIndex:-1,className:C,style:R,ref:function(k){r.wrapperNode=k}},d)}}])})(y.PureComponent),dse=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ru={isSsr:dse()};function Ql(e){"@babel/helpers - typeof";return Ql=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},Ql(e)}function KP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function XP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KP(Object(n),!0).forEach(function(r){gO(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pse(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,IB(r.key),r)}}function mse(e,t,n){return t&&pse(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vse(e,t,n){return t=Kp(t),gse(e,LB()?Reflect.construct(t,n||[],Kp(e).constructor):t.apply(e,n))}function gse(e,t){if(t&&(Ql(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yse(e)}function yse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(LB=function(){return!!e})()}function Kp(e){return Kp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kp(e)}function bse(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(r,a){return r.__proto__=a,r},RS(e,t)}function gO(e,t,n){return t=IB(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IB(e){var t=xse(e,"string");return Ql(t)=="symbol"?t:t+""}function xse(e,t){if(Ql(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ql(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function wse(e){return e.dataKey}function Sse(e,t){return q.isValidElement(e)?q.cloneElement(e,t):typeof e=="function"?q.createElement(e,t):q.createElement(Koe,t)}var za=(function(e){function t(){return hse(this,t),vse(this,t,arguments)}return bse(t,e),mse(t,[{key:"render",value:function(){var r=this,a=this.props,o=a.active,l=a.allowEscapeViewBox,u=a.animationDuration,f=a.animationEasing,d=a.content,m=a.coordinate,p=a.filterNull,g=a.isAnimationActive,x=a.offset,A=a.payload,S=a.payloadUniqBy,w=a.position,O=a.reverseDirection,E=a.useTranslate3d,T=a.viewBox,C=a.wrapperStyle,j=A??[];p&&j.length&&(j=CB(A.filter(function(N){return N.value!=null&&(N.hide!==!0||r.props.includeHidden)}),S,wse));var R=j.length>0;return q.createElement(fse,{allowEscapeViewBox:l,animationDuration:u,animationEasing:f,isAnimationActive:g,active:o,coordinate:m,hasPayload:R,offset:x,position:w,reverseDirection:O,useTranslate3d:E,viewBox:T,wrapperStyle:C},Sse(d,XP(XP({},this.props),{},{payload:j})))}}])})(y.PureComponent);gO(za,"displayName","Tooltip");gO(za,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ru.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 Dw,QP;function _se(){if(QP)return Dw;QP=1;var e=Ja(),t=function(){return e.Date.now()};return Dw=t,Dw}var kw,JP;function Ase(){if(JP)return kw;JP=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return kw=t,kw}var $w,eD;function Ose(){if(eD)return $w;eD=1;var e=Ase(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return $w=n,$w}var zw,tD;function BB(){if(tD)return zw;tD=1;var e=Ose(),t=Po(),n=Eu(),r=NaN,a=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;function f(d){if(typeof d=="number")return d;if(n(d))return r;if(t(d)){var m=typeof d.valueOf=="function"?d.valueOf():d;d=t(m)?m+"":m}if(typeof d!="string")return d===0?d:+d;d=e(d);var p=o.test(d);return p||l.test(d)?u(d.slice(2),p?2:8):a.test(d)?r:+d}return zw=f,zw}var Lw,nD;function Ese(){if(nD)return Lw;nD=1;var e=Po(),t=_se(),n=BB(),r="Expected a function",a=Math.max,o=Math.min;function l(u,f,d){var m,p,g,x,A,S,w=0,O=!1,E=!1,T=!0;if(typeof u!="function")throw new TypeError(r);f=n(f)||0,e(d)&&(O=!!d.leading,E="maxWait"in d,g=E?a(n(d.maxWait)||0,f):g,T="trailing"in d?!!d.trailing:T);function C(H){var W=m,Z=p;return m=p=void 0,w=H,x=u.apply(Z,W),x}function j(H){return w=H,A=setTimeout(k,f),O?C(H):x}function R(H){var W=H-S,Z=H-w,z=f-W;return E?o(z,g-Z):z}function N(H){var W=H-S,Z=H-w;return S===void 0||W>=f||W<0||E&&Z>=g}function k(){var H=t();if(N(H))return $(H);A=setTimeout(k,R(H))}function $(H){return A=void 0,T&&m?C(H):(m=p=void 0,x)}function V(){A!==void 0&&clearTimeout(A),w=0,m=S=p=A=void 0}function I(){return A===void 0?x:$(t())}function L(){var H=t(),W=N(H);if(m=arguments,p=this,S=H,W){if(A===void 0)return j(S);if(E)return clearTimeout(A),A=setTimeout(k,f),C(S)}return A===void 0&&(A=setTimeout(k,f)),x}return L.cancel=V,L.flush=I,L}return Lw=l,Lw}var Iw,rD;function jse(){if(rD)return Iw;rD=1;var e=Ese(),t=Po(),n="Expected a function";function r(a,o,l){var u=!0,f=!0;if(typeof a!="function")throw new TypeError(n);return t(l)&&(u="leading"in l?!!l.leading:u,f="trailing"in l?!!l.trailing:f),e(a,o,{leading:u,maxWait:o,trailing:f})}return Iw=r,Iw}var Tse=jse();const UB=kt(Tse);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 aD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Gh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aD(Object(n),!0).forEach(function(r){Cse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cse(e,t,n){return t=Rse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rse(e){var t=Nse(e,"string");return pf(t)=="symbol"?t:t+""}function Nse(e,t){if(pf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mse(e,t){return $se(e)||kse(e,t)||Dse(e,t)||Pse()}function Pse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
433
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dse(e,t){if(e){if(typeof e=="string")return iD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iD(e,t)}}function iD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kse(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return u}}function $se(e){if(Array.isArray(e))return e}var zse=y.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,a=r===void 0?{width:-1,height:-1}:r,o=e.width,l=o===void 0?"100%":o,u=e.height,f=u===void 0?"100%":u,d=e.minWidth,m=d===void 0?0:d,p=e.minHeight,g=e.maxHeight,x=e.children,A=e.debounce,S=A===void 0?0:A,w=e.id,O=e.className,E=e.onResize,T=e.style,C=T===void 0?{}:T,j=y.useRef(null),R=y.useRef();R.current=E,y.useImperativeHandle(t,function(){return Object.defineProperty(j.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),j.current},configurable:!0})});var N=y.useState({containerWidth:a.width,containerHeight:a.height}),k=Mse(N,2),$=k[0],V=k[1],I=y.useCallback(function(H,W){V(function(Z){var z=Math.round(H),F=Math.round(W);return Z.containerWidth===z&&Z.containerHeight===F?Z:{containerWidth:z,containerHeight:F}})},[]);y.useEffect(function(){var H=function(Q){var K,P=Q[0].contentRect,U=P.width,ne=P.height;I(U,ne),(K=R.current)===null||K===void 0||K.call(R,U,ne)};S>0&&(H=UB(H,S,{trailing:!0,leading:!1}));var W=new ResizeObserver(H),Z=j.current.getBoundingClientRect(),z=Z.width,F=Z.height;return I(z,F),W.observe(j.current),function(){W.disconnect()}},[I,S]);var L=y.useMemo(function(){var H=$.containerWidth,W=$.containerHeight;if(H<0||W<0)return null;Oi(cs(l)||cs(f),`The width(%s) and height(%s) are both fixed numbers,
434
- maybe you don't need to use a ResponsiveContainer.`,l,f),Oi(!n||n>0,"The aspect(%s) must be greater than zero.",n);var Z=cs(l)?H:l,z=cs(f)?W:f;n&&n>0&&(Z?z=Z/n:z&&(Z=z*n),g&&z>g&&(z=g)),Oi(Z>0||z>0,`The width(%s) and height(%s) of chart should be greater than 0,
435
- please check the style of container, or the props width(%s) and height(%s),
436
- or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
437
- height and width.`,Z,z,l,f,m,p,n);var F=!Array.isArray(x)&&Ai(x.type).endsWith("Chart");return q.Children.map(x,function(Y){return q.isValidElement(Y)?y.cloneElement(Y,Gh({width:Z,height:z},F?{style:Gh({height:"100%",width:"100%",maxHeight:z,maxWidth:Z},Y.props.style)}:{})):Y})},[n,x,f,g,p,m,$,l]);return q.createElement("div",{id:w?"".concat(w):void 0,className:mt("recharts-responsive-container",O),style:Gh(Gh({},C),{},{width:l,height:f,minWidth:m,minHeight:p,maxHeight:g}),ref:j},L)}),qB=function(t){return null};qB.displayName="Cell";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 oD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function NS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oD(Object(n),!0).forEach(function(r){Lse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lse(e,t,n){return t=Ise(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ise(e){var t=Bse(e,"string");return mf(t)=="symbol"?t:t+""}function Bse(e,t){if(mf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var El={widthCache:{},cacheCount:0},Use=2e3,qse={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},sD="recharts_measurement_span";function Hse(e){var t=NS({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var Xc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ru.isSsr)return{width:0,height:0};var r=Hse(n),a=JSON.stringify({text:t,copyStyle:r});if(El.widthCache[a])return El.widthCache[a];try{var o=document.getElementById(sD);o||(o=document.createElement("span"),o.setAttribute("id",sD),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var l=NS(NS({},qse),r);Object.assign(o.style,l),o.textContent="".concat(t);var u=o.getBoundingClientRect(),f={width:u.width,height:u.height};return El.widthCache[a]=f,++El.cacheCount>Use&&(El.cacheCount=0,El.widthCache={}),f}catch{return{width:0,height:0}}},Fse=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};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 Xp(e,t){return Zse(e)||Wse(e,t)||Gse(e,t)||Vse()}function Vse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
438
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gse(e,t){if(e){if(typeof e=="string")return lD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lD(e,t)}}function lD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wse(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return u}}function Zse(e){if(Array.isArray(e))return e}function Yse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xse(r.key),r)}}function Kse(e,t,n){return t&&uD(e.prototype,t),n&&uD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xse(e){var t=Qse(e,"string");return vf(t)=="symbol"?t:t+""}function Qse(e,t){if(vf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var cD=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,fD=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Jse=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,ele=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,HB={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},tle=Object.keys(HB),Rl="NaN";function nle(e,t){return e*HB[t]}var Wh=(function(){function e(t,n){Yse(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!Jse.test(n)&&(this.num=NaN,this.unit=""),tle.includes(n)&&(this.num=nle(t,n),this.unit="px")}return Kse(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.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(n){var r,a=(r=ele.exec(n))!==null&&r!==void 0?r:[],o=Xp(a,3),l=o[1],u=o[2];return new e(parseFloat(l),u??"")}}])})();function FB(e){if(e.includes(Rl))return Rl;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=cD.exec(t))!==null&&n!==void 0?n:[],a=Xp(r,4),o=a[1],l=a[2],u=a[3],f=Wh.parse(o??""),d=Wh.parse(u??""),m=l==="*"?f.multiply(d):f.divide(d);if(m.isNaN())return Rl;t=t.replace(cD,m.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var p,g=(p=fD.exec(t))!==null&&p!==void 0?p:[],x=Xp(g,4),A=x[1],S=x[2],w=x[3],O=Wh.parse(A??""),E=Wh.parse(w??""),T=S==="+"?O.add(E):O.subtract(E);if(T.isNaN())return Rl;t=t.replace(fD,T.toString())}return t}var dD=/\(([^()]*)\)/;function rle(e){for(var t=e;t.includes("(");){var n=dD.exec(t),r=Xp(n,2),a=r[1];t=t.replace(dD,FB(a))}return t}function ale(e){var t=e.replace(/\s+/g,"");return t=rle(t),t=FB(t),t}function ile(e){try{return ale(e)}catch{return Rl}}function Bw(e){var t=ile(e.slice(5,-1));return t===Rl?"":t}var ole=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],sle=["dx","dy","angle","className","breakAll"];function MS(){return MS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},MS.apply(this,arguments)}function hD(e,t){if(e==null)return{};var n=lle(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lle(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function pD(e,t){return dle(e)||fle(e,t)||cle(e,t)||ule()}function ule(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
439
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cle(e,t){if(e){if(typeof e=="string")return mD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mD(e,t)}}function mD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fle(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return u}}function dle(e){if(Array.isArray(e))return e}var VB=/[ \f\n\r\t\v\u2028\u2029]+/,GB=function(t){var n=t.children,r=t.breakAll,a=t.style;try{var o=[];ht(n)||(r?o=n.toString().split(""):o=n.toString().split(VB));var l=o.map(function(f){return{word:f,width:Xc(f,a).width}}),u=r?0:Xc(" ",a).width;return{wordsWithComputedWidth:l,spaceWidth:u}}catch{return null}},hle=function(t,n,r,a,o){var l=t.maxLines,u=t.children,f=t.style,d=t.breakAll,m=je(l),p=u,g=function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Z.reduce(function(z,F){var Y=F.word,Q=F.width,K=z[z.length-1];if(K&&(a==null||o||K.width+Q+r<Number(a)))K.words.push(Y),K.width+=Q+r;else{var P={words:[Y],width:Q};z.push(P)}return z},[])},x=g(n),A=function(Z){return Z.reduce(function(z,F){return z.width>F.width?z:F})};if(!m)return x;for(var S="…",w=function(Z){var z=p.slice(0,Z),F=GB({breakAll:d,style:f,children:z+S}).wordsWithComputedWidth,Y=g(F),Q=Y.length>l||A(Y).width>Number(a);return[Q,Y]},O=0,E=p.length-1,T=0,C;O<=E&&T<=p.length-1;){var j=Math.floor((O+E)/2),R=j-1,N=w(R),k=pD(N,2),$=k[0],V=k[1],I=w(j),L=pD(I,1),H=L[0];if(!$&&!H&&(O=j+1),$&&H&&(E=j-1),!$&&H){C=V;break}T++}return C||x},vD=function(t){var n=ht(t)?[]:t.toString().split(VB);return[{words:n}]},ple=function(t){var n=t.width,r=t.scaleToFit,a=t.children,o=t.style,l=t.breakAll,u=t.maxLines;if((n||r)&&!Ru.isSsr){var f,d,m=GB({breakAll:l,children:a,style:o});if(m){var p=m.wordsWithComputedWidth,g=m.spaceWidth;f=p,d=g}else return vD(a);return hle({breakAll:l,children:a,maxLines:u,style:o},f,d,n,r)}return vD(a)},gD="#808080",Qp=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,o=a===void 0?0:a,l=t.lineHeight,u=l===void 0?"1em":l,f=t.capHeight,d=f===void 0?"0.71em":f,m=t.scaleToFit,p=m===void 0?!1:m,g=t.textAnchor,x=g===void 0?"start":g,A=t.verticalAnchor,S=A===void 0?"end":A,w=t.fill,O=w===void 0?gD:w,E=hD(t,ole),T=y.useMemo(function(){return ple({breakAll:E.breakAll,children:E.children,maxLines:E.maxLines,scaleToFit:p,style:E.style,width:E.width})},[E.breakAll,E.children,E.maxLines,p,E.style,E.width]),C=E.dx,j=E.dy,R=E.angle,N=E.className,k=E.breakAll,$=hD(E,sle);if(!An(r)||!An(o))return null;var V=r+(je(C)?C:0),I=o+(je(j)?j:0),L;switch(S){case"start":L=Bw("calc(".concat(d,")"));break;case"middle":L=Bw("calc(".concat((T.length-1)/2," * -").concat(u," + (").concat(d," / 2))"));break;default:L=Bw("calc(".concat(T.length-1," * -").concat(u,")"));break}var H=[];if(p){var W=T[0].width,Z=E.width;H.push("scale(".concat((je(Z)?Z/W:1)/W,")"))}return R&&H.push("rotate(".concat(R,", ").concat(V,", ").concat(I,")")),H.length&&($.transform=H.join(" ")),q.createElement("text",MS({},ut($,!0),{x:V,y:I,className:mt("recharts-text",N),textAnchor:x,fill:O.includes("url")?gD:O}),T.map(function(z,F){var Y=z.words.join(k?"":" ");return q.createElement("tspan",{x:V,dy:F===0?L:u,key:"".concat(Y,"-").concat(F)},Y)}))};function xo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function mle(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function yO(e){let t,n,r;e.length!==2?(t=xo,n=(u,f)=>xo(e(u),f),r=(u,f)=>e(u)-f):(t=e===xo||e===mle?e:vle,n=e,r=e);function a(u,f,d=0,m=u.length){if(d<m){if(t(f,f)!==0)return m;do{const p=d+m>>>1;n(u[p],f)<0?d=p+1:m=p}while(d<m)}return d}function o(u,f,d=0,m=u.length){if(d<m){if(t(f,f)!==0)return m;do{const p=d+m>>>1;n(u[p],f)<=0?d=p+1:m=p}while(d<m)}return d}function l(u,f,d=0,m=u.length){const p=a(u,f,d,m-1);return p>d&&r(u[p-1],f)>-r(u[p],f)?p-1:p}return{left:a,center:l,right:o}}function vle(){return 0}function WB(e){return e===null?NaN:+e}function*gle(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const yle=yO(xo),md=yle.right;yO(WB).center;class yD extends Map{constructor(t,n=wle){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(bD(this,t))}has(t){return super.has(bD(this,t))}set(t,n){return super.set(ble(this,t),n)}delete(t){return super.delete(xle(this,t))}}function bD({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function ble({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function xle({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function wle(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Sle(e=xo){if(e===xo)return ZB;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function ZB(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const _le=Math.sqrt(50),Ale=Math.sqrt(10),Ole=Math.sqrt(2);function Jp(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),o=r/Math.pow(10,a),l=o>=_le?10:o>=Ale?5:o>=Ole?2:1;let u,f,d;return a<0?(d=Math.pow(10,-a)/l,u=Math.round(e*d),f=Math.round(t*d),u/d<e&&++u,f/d>t&&--f,d=-d):(d=Math.pow(10,a)*l,u=Math.round(e/d),f=Math.round(t/d),u*d<e&&++u,f*d>t&&--f),f<u&&.5<=n&&n<2?Jp(e,t,n*2):[u,f,d]}function PS(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[a,o,l]=r?Jp(t,e,n):Jp(e,t,n);if(!(o>=a))return[];const u=o-a+1,f=new Array(u);if(r)if(l<0)for(let d=0;d<u;++d)f[d]=(o-d)/-l;else for(let d=0;d<u;++d)f[d]=(o-d)*l;else if(l<0)for(let d=0;d<u;++d)f[d]=(a+d)/-l;else for(let d=0;d<u;++d)f[d]=(a+d)*l;return f}function DS(e,t,n){return t=+t,e=+e,n=+n,Jp(e,t,n)[2]}function kS(e,t,n){t=+t,e=+e,n=+n;const r=t<e,a=r?DS(t,e,n):DS(e,t,n);return(r?-1:1)*(a<0?1/-a:a)}function xD(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function wD(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function YB(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=a===void 0?ZB:Sle(a);r>n;){if(r-n>600){const f=r-n+1,d=t-n+1,m=Math.log(f),p=.5*Math.exp(2*m/3),g=.5*Math.sqrt(m*p*(f-p)/f)*(d-f/2<0?-1:1),x=Math.max(n,Math.floor(t-d*p/f+g)),A=Math.min(r,Math.floor(t+(f-d)*p/f+g));YB(e,t,x,A,a)}const o=e[t];let l=n,u=r;for(Mc(e,n,t),a(e[r],o)>0&&Mc(e,n,r);l<u;){for(Mc(e,l,u),++l,--u;a(e[l],o)<0;)++l;for(;a(e[u],o)>0;)--u}a(e[n],o)===0?Mc(e,n,u):(++u,Mc(e,u,r)),u<=t&&(n=u+1),t<=u&&(r=u-1)}return e}function Mc(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Ele(e,t,n){if(e=Float64Array.from(gle(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return wD(e);if(t>=1)return xD(e);var r,a=(r-1)*t,o=Math.floor(a),l=xD(YB(e,o).subarray(0,o+1)),u=wD(e.subarray(o+1));return l+(u-l)*(a-o)}}function jle(e,t,n=WB){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,o=Math.floor(a),l=+n(e[o],o,e),u=+n(e[o+1],o+1,e);return l+(u-l)*(a-o)}}function Tle(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(a);++r<a;)o[r]=e+r*n;return o}function sa(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function zi(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 $S=Symbol("implicit");function bO(){var e=new yD,t=[],n=[],r=$S;function a(o){let l=e.get(o);if(l===void 0){if(r!==$S)return r;e.set(o,l=t.push(o)-1)}return n[l%n.length]}return a.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new yD;for(const l of o)e.has(l)||e.set(l,t.push(l)-1);return a},a.range=function(o){return arguments.length?(n=Array.from(o),a):n.slice()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return bO(t,n).unknown(r)},sa.apply(a,arguments),a}function gf(){var e=bO().unknown(void 0),t=e.domain,n=e.range,r=0,a=1,o,l,u=!1,f=0,d=0,m=.5;delete e.unknown;function p(){var g=t().length,x=a<r,A=x?a:r,S=x?r:a;o=(S-A)/Math.max(1,g-f+d*2),u&&(o=Math.floor(o)),A+=(S-A-o*(g-f))*m,l=o*(1-f),u&&(A=Math.round(A),l=Math.round(l));var w=Tle(g).map(function(O){return A+o*O});return n(x?w.reverse():w)}return e.domain=function(g){return arguments.length?(t(g),p()):t()},e.range=function(g){return arguments.length?([r,a]=g,r=+r,a=+a,p()):[r,a]},e.rangeRound=function(g){return[r,a]=g,r=+r,a=+a,u=!0,p()},e.bandwidth=function(){return l},e.step=function(){return o},e.round=function(g){return arguments.length?(u=!!g,p()):u},e.padding=function(g){return arguments.length?(f=Math.min(1,d=+g),p()):f},e.paddingInner=function(g){return arguments.length?(f=Math.min(1,g),p()):f},e.paddingOuter=function(g){return arguments.length?(d=+g,p()):d},e.align=function(g){return arguments.length?(m=Math.max(0,Math.min(1,g)),p()):m},e.copy=function(){return gf(t(),[r,a]).round(u).paddingInner(f).paddingOuter(d).align(m)},sa.apply(p(),arguments)}function KB(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return KB(t())},e}function Qc(){return KB(gf.apply(null,arguments).paddingInner(1))}function xO(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function XB(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function vd(){}var yf=.7,em=1/yf,Il="\\s*([+-]?\\d+)\\s*",bf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ga="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Cle=/^#([0-9a-f]{3,8})$/,Rle=new RegExp(`^rgb\\(${Il},${Il},${Il}\\)$`),Nle=new RegExp(`^rgb\\(${Ga},${Ga},${Ga}\\)$`),Mle=new RegExp(`^rgba\\(${Il},${Il},${Il},${bf}\\)$`),Ple=new RegExp(`^rgba\\(${Ga},${Ga},${Ga},${bf}\\)$`),Dle=new RegExp(`^hsl\\(${bf},${Ga},${Ga}\\)$`),kle=new RegExp(`^hsla\\(${bf},${Ga},${Ga},${bf}\\)$`),SD={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};xO(vd,xf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_D,formatHex:_D,formatHex8:$le,formatHsl:zle,formatRgb:AD,toString:AD});function _D(){return this.rgb().formatHex()}function $le(){return this.rgb().formatHex8()}function zle(){return QB(this).formatHsl()}function AD(){return this.rgb().formatRgb()}function xf(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Cle.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?OD(t):n===3?new hr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Zh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Zh(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=Rle.exec(e))?new hr(t[1],t[2],t[3],1):(t=Nle.exec(e))?new hr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Mle.exec(e))?Zh(t[1],t[2],t[3],t[4]):(t=Ple.exec(e))?Zh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Dle.exec(e))?TD(t[1],t[2]/100,t[3]/100,1):(t=kle.exec(e))?TD(t[1],t[2]/100,t[3]/100,t[4]):SD.hasOwnProperty(e)?OD(SD[e]):e==="transparent"?new hr(NaN,NaN,NaN,0):null}function OD(e){return new hr(e>>16&255,e>>8&255,e&255,1)}function Zh(e,t,n,r){return r<=0&&(e=t=n=NaN),new hr(e,t,n,r)}function Lle(e){return e instanceof vd||(e=xf(e)),e?(e=e.rgb(),new hr(e.r,e.g,e.b,e.opacity)):new hr}function zS(e,t,n,r){return arguments.length===1?Lle(e):new hr(e,t,n,r??1)}function hr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}xO(hr,zS,XB(vd,{brighter(e){return e=e==null?em:Math.pow(em,e),new hr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?yf:Math.pow(yf,e),new hr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new hr(ms(this.r),ms(this.g),ms(this.b),tm(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:ED,formatHex:ED,formatHex8:Ile,formatRgb:jD,toString:jD}));function ED(){return`#${fs(this.r)}${fs(this.g)}${fs(this.b)}`}function Ile(){return`#${fs(this.r)}${fs(this.g)}${fs(this.b)}${fs((isNaN(this.opacity)?1:this.opacity)*255)}`}function jD(){const e=tm(this.opacity);return`${e===1?"rgb(":"rgba("}${ms(this.r)}, ${ms(this.g)}, ${ms(this.b)}${e===1?")":`, ${e})`}`}function tm(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ms(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function fs(e){return e=ms(e),(e<16?"0":"")+e.toString(16)}function TD(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ba(e,t,n,r)}function QB(e){if(e instanceof ba)return new ba(e.h,e.s,e.l,e.opacity);if(e instanceof vd||(e=xf(e)),!e)return new ba;if(e instanceof ba)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),o=Math.max(t,n,r),l=NaN,u=o-a,f=(o+a)/2;return u?(t===o?l=(n-r)/u+(n<r)*6:n===o?l=(r-t)/u+2:l=(t-n)/u+4,u/=f<.5?o+a:2-o-a,l*=60):u=f>0&&f<1?0:l,new ba(l,u,f,e.opacity)}function Ble(e,t,n,r){return arguments.length===1?QB(e):new ba(e,t,n,r??1)}function ba(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}xO(ba,Ble,XB(vd,{brighter(e){return e=e==null?em:Math.pow(em,e),new ba(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?yf:Math.pow(yf,e),new ba(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new hr(Uw(e>=240?e-240:e+120,a,r),Uw(e,a,r),Uw(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new ba(CD(this.h),Yh(this.s),Yh(this.l),tm(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=tm(this.opacity);return`${e===1?"hsl(":"hsla("}${CD(this.h)}, ${Yh(this.s)*100}%, ${Yh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function CD(e){return e=(e||0)%360,e<0?e+360:e}function Yh(e){return Math.max(0,Math.min(1,e||0))}function Uw(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const wO=e=>()=>e;function Ule(e,t){return function(n){return e+n*t}}function qle(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Hle(e){return(e=+e)==1?JB:function(t,n){return n-t?qle(t,n,e):wO(isNaN(t)?n:t)}}function JB(e,t){var n=t-e;return n?Ule(e,n):wO(isNaN(e)?t:e)}const RD=(function e(t){var n=Hle(t);function r(a,o){var l=n((a=zS(a)).r,(o=zS(o)).r),u=n(a.g,o.g),f=n(a.b,o.b),d=JB(a.opacity,o.opacity);return function(m){return a.r=l(m),a.g=u(m),a.b=f(m),a.opacity=d(m),a+""}}return r.gamma=e,r})(1);function Fle(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(o){for(a=0;a<n;++a)r[a]=e[a]*(1-o)+t[a]*o;return r}}function Vle(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Gle(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),o=new Array(n),l;for(l=0;l<r;++l)a[l]=Nu(e[l],t[l]);for(;l<n;++l)o[l]=t[l];return function(u){for(l=0;l<r;++l)o[l]=a[l](u);return o}}function Wle(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function nm(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Zle(e,t){var n={},r={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?n[a]=Nu(e[a],t[a]):r[a]=t[a];return function(o){for(a in n)r[a]=n[a](o);return r}}var LS=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,qw=new RegExp(LS.source,"g");function Yle(e){return function(){return e}}function Kle(e){return function(t){return e(t)+""}}function Xle(e,t){var n=LS.lastIndex=qw.lastIndex=0,r,a,o,l=-1,u=[],f=[];for(e=e+"",t=t+"";(r=LS.exec(e))&&(a=qw.exec(t));)(o=a.index)>n&&(o=t.slice(n,o),u[l]?u[l]+=o:u[++l]=o),(r=r[0])===(a=a[0])?u[l]?u[l]+=a:u[++l]=a:(u[++l]=null,f.push({i:l,x:nm(r,a)})),n=qw.lastIndex;return n<t.length&&(o=t.slice(n),u[l]?u[l]+=o:u[++l]=o),u.length<2?f[0]?Kle(f[0].x):Yle(t):(t=f.length,function(d){for(var m=0,p;m<t;++m)u[(p=f[m]).i]=p.x(d);return u.join("")})}function Nu(e,t){var n=typeof t,r;return t==null||n==="boolean"?wO(t):(n==="number"?nm:n==="string"?(r=xf(t))?(t=r,RD):Xle:t instanceof xf?RD:t instanceof Date?Wle:Vle(t)?Fle:Array.isArray(t)?Gle:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Zle:nm)(e,t)}function SO(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Qle(e,t){t===void 0&&(t=e,e=Nu);for(var n=0,r=t.length-1,a=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(a,a=t[++n]);return function(l){var u=Math.max(0,Math.min(r-1,Math.floor(l*=r)));return o[u](l-u)}}function Jle(e){return function(){return e}}function rm(e){return+e}var ND=[0,1];function rr(e){return e}function IS(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Jle(isNaN(t)?NaN:.5)}function eue(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function tue(e,t,n){var r=e[0],a=e[1],o=t[0],l=t[1];return a<r?(r=IS(a,r),o=n(l,o)):(r=IS(r,a),o=n(o,l)),function(u){return o(r(u))}}function nue(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),o=new Array(r),l=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<r;)a[l]=IS(e[l],e[l+1]),o[l]=n(t[l],t[l+1]);return function(u){var f=md(e,u,1,r)-1;return o[f](a[f](u))}}function gd(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function kv(){var e=ND,t=ND,n=Nu,r,a,o,l=rr,u,f,d;function m(){var g=Math.min(e.length,t.length);return l!==rr&&(l=eue(e[0],e[g-1])),u=g>2?nue:tue,f=d=null,p}function p(g){return g==null||isNaN(g=+g)?o:(f||(f=u(e.map(r),t,n)))(r(l(g)))}return p.invert=function(g){return l(a((d||(d=u(t,e.map(r),nm)))(g)))},p.domain=function(g){return arguments.length?(e=Array.from(g,rm),m()):e.slice()},p.range=function(g){return arguments.length?(t=Array.from(g),m()):t.slice()},p.rangeRound=function(g){return t=Array.from(g),n=SO,m()},p.clamp=function(g){return arguments.length?(l=g?!0:rr,m()):l!==rr},p.interpolate=function(g){return arguments.length?(n=g,m()):n},p.unknown=function(g){return arguments.length?(o=g,p):o},function(g,x){return r=g,a=x,m()}}function _O(){return kv()(rr,rr)}function rue(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function am(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Jl(e){return e=am(Math.abs(e)),e?e[1]:NaN}function aue(e,t){return function(n,r){for(var a=n.length,o=[],l=0,u=e[0],f=0;a>0&&u>0&&(f+u+1>r&&(u=Math.max(1,r-f)),o.push(n.substring(a-=u,a+u)),!((f+=u+1)>r));)u=e[l=(l+1)%e.length];return o.reverse().join(t)}}function iue(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var oue=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wf(e){if(!(t=oue.exec(e)))throw new Error("invalid format: "+e);var t;return new AO({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]})}wf.prototype=AO.prototype;function AO(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+""}AO.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 sue(e){e:for(var t=e.length,n=1,r=-1,a;n<t;++n)switch(e[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var im;function lue(e,t){var n=am(e,t);if(!n)return im=void 0,e.toPrecision(t);var r=n[0],a=n[1],o=a-(im=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,l=r.length;return o===l?r:o>l?r+new Array(o-l+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+am(e,Math.max(0,t+o-1))[0]}function MD(e,t){var n=am(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const PD={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:rue,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)=>MD(e*100,t),r:MD,s:lue,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function DD(e){return e}var kD=Array.prototype.map,$D=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function uue(e){var t=e.grouping===void 0||e.thousands===void 0?DD:aue(kD.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?DD:iue(kD.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function d(p,g){p=wf(p);var x=p.fill,A=p.align,S=p.sign,w=p.symbol,O=p.zero,E=p.width,T=p.comma,C=p.precision,j=p.trim,R=p.type;R==="n"?(T=!0,R="g"):PD[R]||(C===void 0&&(C=12),j=!0,R="g"),(O||x==="0"&&A==="=")&&(O=!0,x="0",A="=");var N=(g&&g.prefix!==void 0?g.prefix:"")+(w==="$"?n:w==="#"&&/[boxX]/.test(R)?"0"+R.toLowerCase():""),k=(w==="$"?r:/[%p]/.test(R)?l:"")+(g&&g.suffix!==void 0?g.suffix:""),$=PD[R],V=/[defgprs%]/.test(R);C=C===void 0?6:/[gprs]/.test(R)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function I(L){var H=N,W=k,Z,z,F;if(R==="c")W=$(L)+W,L="";else{L=+L;var Y=L<0||1/L<0;if(L=isNaN(L)?f:$(Math.abs(L),C),j&&(L=sue(L)),Y&&+L==0&&S!=="+"&&(Y=!1),H=(Y?S==="("?S:u:S==="-"||S==="("?"":S)+H,W=(R==="s"&&!isNaN(L)&&im!==void 0?$D[8+im/3]:"")+W+(Y&&S==="("?")":""),V){for(Z=-1,z=L.length;++Z<z;)if(F=L.charCodeAt(Z),48>F||F>57){W=(F===46?a+L.slice(Z+1):L.slice(Z))+W,L=L.slice(0,Z);break}}}T&&!O&&(L=t(L,1/0));var Q=H.length+L.length+W.length,K=Q<E?new Array(E-Q+1).join(x):"";switch(T&&O&&(L=t(K+L,K.length?E-W.length:1/0),K=""),A){case"<":L=H+L+W+K;break;case"=":L=H+K+L+W;break;case"^":L=K.slice(0,Q=K.length>>1)+H+L+W+K.slice(Q);break;default:L=K+H+L+W;break}return o(L)}return I.toString=function(){return p+""},I}function m(p,g){var x=Math.max(-8,Math.min(8,Math.floor(Jl(g)/3)))*3,A=Math.pow(10,-x),S=d((p=wf(p),p.type="f",p),{suffix:$D[8+x/3]});return function(w){return S(A*w)}}return{format:d,formatPrefix:m}}var Kh,OO,e6;cue({thousands:",",grouping:[3],currency:["$",""]});function cue(e){return Kh=uue(e),OO=Kh.format,e6=Kh.formatPrefix,Kh}function fue(e){return Math.max(0,-Jl(Math.abs(e)))}function due(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Jl(t)/3)))*3-Jl(Math.abs(e)))}function hue(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Jl(t)-Jl(e))+1}function t6(e,t,n,r){var a=kS(e,t,n),o;switch(r=wf(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=due(a,l))&&(r.precision=o),e6(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=hue(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=fue(a))&&(r.precision=o-(r.type==="%")*2);break}}return OO(r)}function ko(e){var t=e.domain;return e.ticks=function(n){var r=t();return PS(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return t6(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,o=r.length-1,l=r[a],u=r[o],f,d,m=10;for(u<l&&(d=l,l=u,u=d,d=a,a=o,o=d);m-- >0;){if(d=DS(l,u,n),d===f)return r[a]=l,r[o]=u,t(r);if(d>0)l=Math.floor(l/d)*d,u=Math.ceil(u/d)*d;else if(d<0)l=Math.ceil(l*d)/d,u=Math.floor(u*d)/d;else break;f=d}return e},e}function om(){var e=_O();return e.copy=function(){return gd(e,om())},sa.apply(e,arguments),ko(e)}function n6(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,rm),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return n6(e).unknown(t)},e=arguments.length?Array.from(e,rm):[0,1],ko(n)}function r6(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],o=e[r],l;return o<a&&(l=n,n=r,r=l,l=a,a=o,o=l),e[n]=t.floor(a),e[r]=t.ceil(o),e}function zD(e){return Math.log(e)}function LD(e){return Math.exp(e)}function pue(e){return-Math.log(-e)}function mue(e){return-Math.exp(-e)}function vue(e){return isFinite(e)?+("1e"+e):e<0?0:e}function gue(e){return e===10?vue:e===Math.E?Math.exp:t=>Math.pow(e,t)}function yue(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 ID(e){return(t,n)=>-e(-t,n)}function EO(e){const t=e(zD,LD),n=t.domain;let r=10,a,o;function l(){return a=yue(r),o=gue(r),n()[0]<0?(a=ID(a),o=ID(o),e(pue,mue)):e(zD,LD),t}return t.base=function(u){return arguments.length?(r=+u,l()):r},t.domain=function(u){return arguments.length?(n(u),l()):n()},t.ticks=u=>{const f=n();let d=f[0],m=f[f.length-1];const p=m<d;p&&([d,m]=[m,d]);let g=a(d),x=a(m),A,S;const w=u==null?10:+u;let O=[];if(!(r%1)&&x-g<w){if(g=Math.floor(g),x=Math.ceil(x),d>0){for(;g<=x;++g)for(A=1;A<r;++A)if(S=g<0?A/o(-g):A*o(g),!(S<d)){if(S>m)break;O.push(S)}}else for(;g<=x;++g)for(A=r-1;A>=1;--A)if(S=g>0?A/o(-g):A*o(g),!(S<d)){if(S>m)break;O.push(S)}O.length*2<w&&(O=PS(d,m,w))}else O=PS(g,x,Math.min(x-g,w)).map(o);return p?O.reverse():O},t.tickFormat=(u,f)=>{if(u==null&&(u=10),f==null&&(f=r===10?"s":","),typeof f!="function"&&(!(r%1)&&(f=wf(f)).precision==null&&(f.trim=!0),f=OO(f)),u===1/0)return f;const d=Math.max(1,r*u/t.ticks().length);return m=>{let p=m/o(Math.round(a(m)));return p*r<r-.5&&(p*=r),p<=d?f(m):""}},t.nice=()=>n(r6(n(),{floor:u=>o(Math.floor(a(u))),ceil:u=>o(Math.ceil(a(u)))})),t}function a6(){const e=EO(kv()).domain([1,10]);return e.copy=()=>gd(e,a6()).base(e.base()),sa.apply(e,arguments),e}function BD(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function UD(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function jO(e){var t=1,n=e(BD(t),UD(t));return n.constant=function(r){return arguments.length?e(BD(t=+r),UD(t)):t},ko(n)}function i6(){var e=jO(kv());return e.copy=function(){return gd(e,i6()).constant(e.constant())},sa.apply(e,arguments)}function qD(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function bue(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function xue(e){return e<0?-e*e:e*e}function TO(e){var t=e(rr,rr),n=1;function r(){return n===1?e(rr,rr):n===.5?e(bue,xue):e(qD(n),qD(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},ko(t)}function CO(){var e=TO(kv());return e.copy=function(){return gd(e,CO()).exponent(e.exponent())},sa.apply(e,arguments),e}function wue(){return CO.apply(null,arguments).exponent(.5)}function HD(e){return Math.sign(e)*e*e}function Sue(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function o6(){var e=_O(),t=[0,1],n=!1,r;function a(o){var l=Sue(e(o));return isNaN(l)?r:n?Math.round(l):l}return a.invert=function(o){return e.invert(HD(o))},a.domain=function(o){return arguments.length?(e.domain(o),a):e.domain()},a.range=function(o){return arguments.length?(e.range((t=Array.from(o,rm)).map(HD)),a):t.slice()},a.rangeRound=function(o){return a.range(o).round(!0)},a.round=function(o){return arguments.length?(n=!!o,a):n},a.clamp=function(o){return arguments.length?(e.clamp(o),a):e.clamp()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return o6(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},sa.apply(a,arguments),ko(a)}function s6(){var e=[],t=[],n=[],r;function a(){var l=0,u=Math.max(1,t.length);for(n=new Array(u-1);++l<u;)n[l-1]=jle(e,l/u);return o}function o(l){return l==null||isNaN(l=+l)?r:t[md(n,l)]}return o.invertExtent=function(l){var u=t.indexOf(l);return u<0?[NaN,NaN]:[u>0?n[u-1]:e[0],u<n.length?n[u]:e[e.length-1]]},o.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let u of l)u!=null&&!isNaN(u=+u)&&e.push(u);return e.sort(xo),a()},o.range=function(l){return arguments.length?(t=Array.from(l),a()):t.slice()},o.unknown=function(l){return arguments.length?(r=l,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return s6().domain(e).range(t).unknown(r)},sa.apply(o,arguments)}function l6(){var e=0,t=1,n=1,r=[.5],a=[0,1],o;function l(f){return f!=null&&f<=f?a[md(r,f,0,n)]:o}function u(){var f=-1;for(r=new Array(n);++f<n;)r[f]=((f+1)*t-(f-n)*e)/(n+1);return l}return l.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,u()):[e,t]},l.range=function(f){return arguments.length?(n=(a=Array.from(f)).length-1,u()):a.slice()},l.invertExtent=function(f){var d=a.indexOf(f);return d<0?[NaN,NaN]:d<1?[e,r[0]]:d>=n?[r[n-1],t]:[r[d-1],r[d]]},l.unknown=function(f){return arguments.length&&(o=f),l},l.thresholds=function(){return r.slice()},l.copy=function(){return l6().domain([e,t]).range(a).unknown(o)},sa.apply(ko(l),arguments)}function u6(){var e=[.5],t=[0,1],n,r=1;function a(o){return o!=null&&o<=o?t[md(e,o,0,r)]:n}return a.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(o){var l=t.indexOf(o);return[e[l-1],e[l]]},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return u6().domain(e).range(t).unknown(n)},sa.apply(a,arguments)}const Hw=new Date,Fw=new Date;function jn(e,t,n,r){function a(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return a.floor=o=>(e(o=new Date(+o)),o),a.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),a.round=o=>{const l=a(o),u=a.ceil(o);return o-l<u-o?l:u},a.offset=(o,l)=>(t(o=new Date(+o),l==null?1:Math.floor(l)),o),a.range=(o,l,u)=>{const f=[];if(o=a.ceil(o),u=u==null?1:Math.floor(u),!(o<l)||!(u>0))return f;let d;do f.push(d=new Date(+o)),t(o,u),e(o);while(d<o&&o<l);return f},a.filter=o=>jn(l=>{if(l>=l)for(;e(l),!o(l);)l.setTime(l-1)},(l,u)=>{if(l>=l)if(u<0)for(;++u<=0;)for(;t(l,-1),!o(l););else for(;--u>=0;)for(;t(l,1),!o(l););}),n&&(a.count=(o,l)=>(Hw.setTime(+o),Fw.setTime(+l),e(Hw),e(Fw),Math.floor(n(Hw,Fw))),a.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?a.filter(r?l=>r(l)%o===0:l=>a.count(0,l)%o===0):a)),a}const sm=jn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);sm.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?jn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):sm);sm.range;const wi=1e3,Jr=wi*60,Si=Jr*60,Ri=Si*24,RO=Ri*7,FD=Ri*30,Vw=Ri*365,ds=jn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*wi)},(e,t)=>(t-e)/wi,e=>e.getUTCSeconds());ds.range;const NO=jn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*wi)},(e,t)=>{e.setTime(+e+t*Jr)},(e,t)=>(t-e)/Jr,e=>e.getMinutes());NO.range;const MO=jn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Jr)},(e,t)=>(t-e)/Jr,e=>e.getUTCMinutes());MO.range;const PO=jn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*wi-e.getMinutes()*Jr)},(e,t)=>{e.setTime(+e+t*Si)},(e,t)=>(t-e)/Si,e=>e.getHours());PO.range;const DO=jn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Si)},(e,t)=>(t-e)/Si,e=>e.getUTCHours());DO.range;const yd=jn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Jr)/Ri,e=>e.getDate()-1);yd.range;const $v=jn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ri,e=>e.getUTCDate()-1);$v.range;const c6=jn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ri,e=>Math.floor(e/Ri));c6.range;function $s(e){return jn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Jr)/RO)}const zv=$s(0),lm=$s(1),_ue=$s(2),Aue=$s(3),eu=$s(4),Oue=$s(5),Eue=$s(6);zv.range;lm.range;_ue.range;Aue.range;eu.range;Oue.range;Eue.range;function zs(e){return jn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/RO)}const Lv=zs(0),um=zs(1),jue=zs(2),Tue=zs(3),tu=zs(4),Cue=zs(5),Rue=zs(6);Lv.range;um.range;jue.range;Tue.range;tu.range;Cue.range;Rue.range;const kO=jn(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());kO.range;const $O=jn(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());$O.range;const Ni=jn(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());Ni.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:jn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Ni.range;const Mi=jn(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());Mi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:jn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Mi.range;function f6(e,t,n,r,a,o){const l=[[ds,1,wi],[ds,5,5*wi],[ds,15,15*wi],[ds,30,30*wi],[o,1,Jr],[o,5,5*Jr],[o,15,15*Jr],[o,30,30*Jr],[a,1,Si],[a,3,3*Si],[a,6,6*Si],[a,12,12*Si],[r,1,Ri],[r,2,2*Ri],[n,1,RO],[t,1,FD],[t,3,3*FD],[e,1,Vw]];function u(d,m,p){const g=m<d;g&&([d,m]=[m,d]);const x=p&&typeof p.range=="function"?p:f(d,m,p),A=x?x.range(d,+m+1):[];return g?A.reverse():A}function f(d,m,p){const g=Math.abs(m-d)/p,x=yO(([,,w])=>w).right(l,g);if(x===l.length)return e.every(kS(d/Vw,m/Vw,p));if(x===0)return sm.every(Math.max(kS(d,m,p),1));const[A,S]=l[g/l[x-1][2]<l[x][2]/g?x-1:x];return A.every(S)}return[u,f]}const[Nue,Mue]=f6(Mi,$O,Lv,c6,DO,MO),[Pue,Due]=f6(Ni,kO,zv,yd,PO,NO);function Gw(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 Ww(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 Pc(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function kue(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,o=e.days,l=e.shortDays,u=e.months,f=e.shortMonths,d=Dc(a),m=kc(a),p=Dc(o),g=kc(o),x=Dc(l),A=kc(l),S=Dc(u),w=kc(u),O=Dc(f),E=kc(f),T={a:F,A:Y,b:Q,B:K,c:null,d:KD,e:KD,f:ace,g:pce,G:vce,H:tce,I:nce,j:rce,L:d6,m:ice,M:oce,p:P,q:U,Q:JD,s:ek,S:sce,u:lce,U:uce,V:cce,w:fce,W:dce,x:null,X:null,y:hce,Y:mce,Z:gce,"%":QD},C={a:ne,A:me,b:Ae,B:ce,c:null,d:XD,e:XD,f:wce,g:Nce,G:Pce,H:yce,I:bce,j:xce,L:p6,m:Sce,M:_ce,p:de,q:Ce,Q:JD,s:ek,S:Ace,u:Oce,U:Ece,V:jce,w:Tce,W:Cce,x:null,X:null,y:Rce,Y:Mce,Z:Dce,"%":QD},j={a:V,A:I,b:L,B:H,c:W,d:ZD,e:ZD,f:Xue,g:WD,G:GD,H:YD,I:YD,j:Wue,L:Kue,m:Gue,M:Zue,p:$,q:Vue,Q:Jue,s:ece,S:Yue,u:Bue,U:Uue,V:que,w:Iue,W:Hue,x:Z,X:z,y:WD,Y:GD,Z:Fue,"%":Que};T.x=R(n,T),T.X=R(r,T),T.c=R(t,T),C.x=R(n,C),C.X=R(r,C),C.c=R(t,C);function R(le,_e){return function(Se){var se=[],Ve=-1,$e=0,Je=le.length,Ke,vt,$t;for(Se instanceof Date||(Se=new Date(+Se));++Ve<Je;)le.charCodeAt(Ve)===37&&(se.push(le.slice($e,Ve)),(vt=VD[Ke=le.charAt(++Ve)])!=null?Ke=le.charAt(++Ve):vt=Ke==="e"?" ":"0",($t=_e[Ke])&&(Ke=$t(Se,vt)),se.push(Ke),$e=Ve+1);return se.push(le.slice($e,Ve)),se.join("")}}function N(le,_e){return function(Se){var se=Pc(1900,void 0,1),Ve=k(se,le,Se+="",0),$e,Je;if(Ve!=Se.length)return null;if("Q"in se)return new Date(se.Q);if("s"in se)return new Date(se.s*1e3+("L"in se?se.L:0));if(_e&&!("Z"in se)&&(se.Z=0),"p"in se&&(se.H=se.H%12+se.p*12),se.m===void 0&&(se.m="q"in se?se.q:0),"V"in se){if(se.V<1||se.V>53)return null;"w"in se||(se.w=1),"Z"in se?($e=Ww(Pc(se.y,0,1)),Je=$e.getUTCDay(),$e=Je>4||Je===0?um.ceil($e):um($e),$e=$v.offset($e,(se.V-1)*7),se.y=$e.getUTCFullYear(),se.m=$e.getUTCMonth(),se.d=$e.getUTCDate()+(se.w+6)%7):($e=Gw(Pc(se.y,0,1)),Je=$e.getDay(),$e=Je>4||Je===0?lm.ceil($e):lm($e),$e=yd.offset($e,(se.V-1)*7),se.y=$e.getFullYear(),se.m=$e.getMonth(),se.d=$e.getDate()+(se.w+6)%7)}else("W"in se||"U"in se)&&("w"in se||(se.w="u"in se?se.u%7:"W"in se?1:0),Je="Z"in se?Ww(Pc(se.y,0,1)).getUTCDay():Gw(Pc(se.y,0,1)).getDay(),se.m=0,se.d="W"in se?(se.w+6)%7+se.W*7-(Je+5)%7:se.w+se.U*7-(Je+6)%7);return"Z"in se?(se.H+=se.Z/100|0,se.M+=se.Z%100,Ww(se)):Gw(se)}}function k(le,_e,Se,se){for(var Ve=0,$e=_e.length,Je=Se.length,Ke,vt;Ve<$e;){if(se>=Je)return-1;if(Ke=_e.charCodeAt(Ve++),Ke===37){if(Ke=_e.charAt(Ve++),vt=j[Ke in VD?_e.charAt(Ve++):Ke],!vt||(se=vt(le,Se,se))<0)return-1}else if(Ke!=Se.charCodeAt(se++))return-1}return se}function $(le,_e,Se){var se=d.exec(_e.slice(Se));return se?(le.p=m.get(se[0].toLowerCase()),Se+se[0].length):-1}function V(le,_e,Se){var se=x.exec(_e.slice(Se));return se?(le.w=A.get(se[0].toLowerCase()),Se+se[0].length):-1}function I(le,_e,Se){var se=p.exec(_e.slice(Se));return se?(le.w=g.get(se[0].toLowerCase()),Se+se[0].length):-1}function L(le,_e,Se){var se=O.exec(_e.slice(Se));return se?(le.m=E.get(se[0].toLowerCase()),Se+se[0].length):-1}function H(le,_e,Se){var se=S.exec(_e.slice(Se));return se?(le.m=w.get(se[0].toLowerCase()),Se+se[0].length):-1}function W(le,_e,Se){return k(le,t,_e,Se)}function Z(le,_e,Se){return k(le,n,_e,Se)}function z(le,_e,Se){return k(le,r,_e,Se)}function F(le){return l[le.getDay()]}function Y(le){return o[le.getDay()]}function Q(le){return f[le.getMonth()]}function K(le){return u[le.getMonth()]}function P(le){return a[+(le.getHours()>=12)]}function U(le){return 1+~~(le.getMonth()/3)}function ne(le){return l[le.getUTCDay()]}function me(le){return o[le.getUTCDay()]}function Ae(le){return f[le.getUTCMonth()]}function ce(le){return u[le.getUTCMonth()]}function de(le){return a[+(le.getUTCHours()>=12)]}function Ce(le){return 1+~~(le.getUTCMonth()/3)}return{format:function(le){var _e=R(le+="",T);return _e.toString=function(){return le},_e},parse:function(le){var _e=N(le+="",!1);return _e.toString=function(){return le},_e},utcFormat:function(le){var _e=R(le+="",C);return _e.toString=function(){return le},_e},utcParse:function(le){var _e=N(le+="",!0);return _e.toString=function(){return le},_e}}}var VD={"-":"",_:" ",0:"0"},Mn=/^\s*\d+/,$ue=/^%/,zue=/[\\^$*+?|[\]().{}]/g;function xt(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",o=a.length;return r+(o<n?new Array(n-o+1).join(t)+a:a)}function Lue(e){return e.replace(zue,"\\$&")}function Dc(e){return new RegExp("^(?:"+e.map(Lue).join("|")+")","i")}function kc(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function Iue(e,t,n){var r=Mn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Bue(e,t,n){var r=Mn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Uue(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function que(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Hue(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function GD(e,t,n){var r=Mn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function WD(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Fue(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Vue(e,t,n){var r=Mn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Gue(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ZD(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Wue(e,t,n){var r=Mn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function YD(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Zue(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Yue(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Kue(e,t,n){var r=Mn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Xue(e,t,n){var r=Mn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Que(e,t,n){var r=$ue.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Jue(e,t,n){var r=Mn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ece(e,t,n){var r=Mn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function KD(e,t){return xt(e.getDate(),t,2)}function tce(e,t){return xt(e.getHours(),t,2)}function nce(e,t){return xt(e.getHours()%12||12,t,2)}function rce(e,t){return xt(1+yd.count(Ni(e),e),t,3)}function d6(e,t){return xt(e.getMilliseconds(),t,3)}function ace(e,t){return d6(e,t)+"000"}function ice(e,t){return xt(e.getMonth()+1,t,2)}function oce(e,t){return xt(e.getMinutes(),t,2)}function sce(e,t){return xt(e.getSeconds(),t,2)}function lce(e){var t=e.getDay();return t===0?7:t}function uce(e,t){return xt(zv.count(Ni(e)-1,e),t,2)}function h6(e){var t=e.getDay();return t>=4||t===0?eu(e):eu.ceil(e)}function cce(e,t){return e=h6(e),xt(eu.count(Ni(e),e)+(Ni(e).getDay()===4),t,2)}function fce(e){return e.getDay()}function dce(e,t){return xt(lm.count(Ni(e)-1,e),t,2)}function hce(e,t){return xt(e.getFullYear()%100,t,2)}function pce(e,t){return e=h6(e),xt(e.getFullYear()%100,t,2)}function mce(e,t){return xt(e.getFullYear()%1e4,t,4)}function vce(e,t){var n=e.getDay();return e=n>=4||n===0?eu(e):eu.ceil(e),xt(e.getFullYear()%1e4,t,4)}function gce(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+xt(t/60|0,"0",2)+xt(t%60,"0",2)}function XD(e,t){return xt(e.getUTCDate(),t,2)}function yce(e,t){return xt(e.getUTCHours(),t,2)}function bce(e,t){return xt(e.getUTCHours()%12||12,t,2)}function xce(e,t){return xt(1+$v.count(Mi(e),e),t,3)}function p6(e,t){return xt(e.getUTCMilliseconds(),t,3)}function wce(e,t){return p6(e,t)+"000"}function Sce(e,t){return xt(e.getUTCMonth()+1,t,2)}function _ce(e,t){return xt(e.getUTCMinutes(),t,2)}function Ace(e,t){return xt(e.getUTCSeconds(),t,2)}function Oce(e){var t=e.getUTCDay();return t===0?7:t}function Ece(e,t){return xt(Lv.count(Mi(e)-1,e),t,2)}function m6(e){var t=e.getUTCDay();return t>=4||t===0?tu(e):tu.ceil(e)}function jce(e,t){return e=m6(e),xt(tu.count(Mi(e),e)+(Mi(e).getUTCDay()===4),t,2)}function Tce(e){return e.getUTCDay()}function Cce(e,t){return xt(um.count(Mi(e)-1,e),t,2)}function Rce(e,t){return xt(e.getUTCFullYear()%100,t,2)}function Nce(e,t){return e=m6(e),xt(e.getUTCFullYear()%100,t,2)}function Mce(e,t){return xt(e.getUTCFullYear()%1e4,t,4)}function Pce(e,t){var n=e.getUTCDay();return e=n>=4||n===0?tu(e):tu.ceil(e),xt(e.getUTCFullYear()%1e4,t,4)}function Dce(){return"+0000"}function QD(){return"%"}function JD(e){return+e}function ek(e){return Math.floor(+e/1e3)}var jl,v6,g6;kce({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 kce(e){return jl=kue(e),v6=jl.format,jl.parse,g6=jl.utcFormat,jl.utcParse,jl}function $ce(e){return new Date(e)}function zce(e){return e instanceof Date?+e:+new Date(+e)}function zO(e,t,n,r,a,o,l,u,f,d){var m=_O(),p=m.invert,g=m.domain,x=d(".%L"),A=d(":%S"),S=d("%I:%M"),w=d("%I %p"),O=d("%a %d"),E=d("%b %d"),T=d("%B"),C=d("%Y");function j(R){return(f(R)<R?x:u(R)<R?A:l(R)<R?S:o(R)<R?w:r(R)<R?a(R)<R?O:E:n(R)<R?T:C)(R)}return m.invert=function(R){return new Date(p(R))},m.domain=function(R){return arguments.length?g(Array.from(R,zce)):g().map($ce)},m.ticks=function(R){var N=g();return e(N[0],N[N.length-1],R??10)},m.tickFormat=function(R,N){return N==null?j:d(N)},m.nice=function(R){var N=g();return(!R||typeof R.range!="function")&&(R=t(N[0],N[N.length-1],R??10)),R?g(r6(N,R)):m},m.copy=function(){return gd(m,zO(e,t,n,r,a,o,l,u,f,d))},m}function Lce(){return sa.apply(zO(Pue,Due,Ni,kO,zv,yd,PO,NO,ds,v6).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Ice(){return sa.apply(zO(Nue,Mue,Mi,$O,Lv,$v,DO,MO,ds,g6).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Iv(){var e=0,t=1,n,r,a,o,l=rr,u=!1,f;function d(p){return p==null||isNaN(p=+p)?f:l(a===0?.5:(p=(o(p)-n)*a,u?Math.max(0,Math.min(1,p)):p))}d.domain=function(p){return arguments.length?([e,t]=p,n=o(e=+e),r=o(t=+t),a=n===r?0:1/(r-n),d):[e,t]},d.clamp=function(p){return arguments.length?(u=!!p,d):u},d.interpolator=function(p){return arguments.length?(l=p,d):l};function m(p){return function(g){var x,A;return arguments.length?([x,A]=g,l=p(x,A),d):[l(0),l(1)]}}return d.range=m(Nu),d.rangeRound=m(SO),d.unknown=function(p){return arguments.length?(f=p,d):f},function(p){return o=p,n=p(e),r=p(t),a=n===r?0:1/(r-n),d}}function $o(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function y6(){var e=ko(Iv()(rr));return e.copy=function(){return $o(e,y6())},zi.apply(e,arguments)}function b6(){var e=EO(Iv()).domain([1,10]);return e.copy=function(){return $o(e,b6()).base(e.base())},zi.apply(e,arguments)}function x6(){var e=jO(Iv());return e.copy=function(){return $o(e,x6()).constant(e.constant())},zi.apply(e,arguments)}function LO(){var e=TO(Iv());return e.copy=function(){return $o(e,LO()).exponent(e.exponent())},zi.apply(e,arguments)}function Bce(){return LO.apply(null,arguments).exponent(.5)}function w6(){var e=[],t=rr;function n(r){if(r!=null&&!isNaN(r=+r))return t((md(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let a of r)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(xo),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,a)=>t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,o)=>Ele(e,o/r))},n.copy=function(){return w6(t).domain(e)},zi.apply(n,arguments)}function Bv(){var e=0,t=.5,n=1,r=1,a,o,l,u,f,d=rr,m,p=!1,g;function x(S){return isNaN(S=+S)?g:(S=.5+((S=+m(S))-o)*(r*S<r*o?u:f),d(p?Math.max(0,Math.min(1,S)):S))}x.domain=function(S){return arguments.length?([e,t,n]=S,a=m(e=+e),o=m(t=+t),l=m(n=+n),u=a===o?0:.5/(o-a),f=o===l?0:.5/(l-o),r=o<a?-1:1,x):[e,t,n]},x.clamp=function(S){return arguments.length?(p=!!S,x):p},x.interpolator=function(S){return arguments.length?(d=S,x):d};function A(S){return function(w){var O,E,T;return arguments.length?([O,E,T]=w,d=Qle(S,[O,E,T]),x):[d(0),d(.5),d(1)]}}return x.range=A(Nu),x.rangeRound=A(SO),x.unknown=function(S){return arguments.length?(g=S,x):g},function(S){return m=S,a=S(e),o=S(t),l=S(n),u=a===o?0:.5/(o-a),f=o===l?0:.5/(l-o),r=o<a?-1:1,x}}function S6(){var e=ko(Bv()(rr));return e.copy=function(){return $o(e,S6())},zi.apply(e,arguments)}function _6(){var e=EO(Bv()).domain([.1,1,10]);return e.copy=function(){return $o(e,_6()).base(e.base())},zi.apply(e,arguments)}function A6(){var e=jO(Bv());return e.copy=function(){return $o(e,A6()).constant(e.constant())},zi.apply(e,arguments)}function IO(){var e=TO(Bv());return e.copy=function(){return $o(e,IO()).exponent(e.exponent())},zi.apply(e,arguments)}function Uce(){return IO.apply(null,arguments).exponent(.5)}const tk=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:gf,scaleDiverging:S6,scaleDivergingLog:_6,scaleDivergingPow:IO,scaleDivergingSqrt:Uce,scaleDivergingSymlog:A6,scaleIdentity:n6,scaleImplicit:$S,scaleLinear:om,scaleLog:a6,scaleOrdinal:bO,scalePoint:Qc,scalePow:CO,scaleQuantile:s6,scaleQuantize:l6,scaleRadial:o6,scaleSequential:y6,scaleSequentialLog:b6,scaleSequentialPow:LO,scaleSequentialQuantile:w6,scaleSequentialSqrt:Bce,scaleSequentialSymlog:x6,scaleSqrt:wue,scaleSymlog:i6,scaleThreshold:u6,scaleTime:Lce,scaleUtc:Ice,tickFormat:t6},Symbol.toStringTag,{value:"Module"}));var Zw,nk;function O6(){if(nk)return Zw;nk=1;var e=Eu();function t(n,r,a){for(var o=-1,l=n.length;++o<l;){var u=n[o],f=r(u);if(f!=null&&(d===void 0?f===f&&!e(f):a(f,d)))var d=f,m=u}return m}return Zw=t,Zw}var Yw,rk;function qce(){if(rk)return Yw;rk=1;function e(t,n){return t>n}return Yw=e,Yw}var Kw,ak;function Hce(){if(ak)return Kw;ak=1;var e=O6(),t=qce(),n=Cu();function r(a){return a&&a.length?e(a,n,t):void 0}return Kw=r,Kw}var Fce=Hce();const vo=kt(Fce);var Xw,ik;function Vce(){if(ik)return Xw;ik=1;function e(t,n){return t<n}return Xw=e,Xw}var Qw,ok;function Gce(){if(ok)return Qw;ok=1;var e=O6(),t=Vce(),n=Cu();function r(a){return a&&a.length?e(a,n,t):void 0}return Qw=r,Qw}var Wce=Gce();const Uv=kt(Wce);var Jw,sk;function Zce(){if(sk)return Jw;sk=1;var e=tO(),t=Do(),n=DB(),r=pr();function a(o,l){var u=r(o)?e:n;return u(o,t(l,3))}return Jw=a,Jw}var e1,lk;function Yce(){if(lk)return e1;lk=1;var e=MB(),t=Zce();function n(r,a){return e(t(r,a),1)}return e1=n,e1}var Kce=Yce();const Xce=kt(Kce);var t1,uk;function Qce(){if(uk)return t1;uk=1;var e=pO();function t(n,r){return e(n,r)}return t1=t,t1}var Jce=Qce();const Sf=kt(Jce);var Mu=1e9,efe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},UO,Kt=!0,ra="[DecimalError] ",vs=ra+"Invalid argument: ",BO=ra+"Exponent out of range: ",Pu=Math.floor,ls=Math.pow,tfe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Rr,Nn=1e7,Zt=7,E6=9007199254740991,cm=Pu(E6/Zt),ze={};ze.absoluteValue=ze.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};ze.comparedTo=ze.cmp=function(e){var t,n,r,a,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,a=e.d.length,t=0,n=r<a?r:a;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===a?0:r>a^o.s<0?1:-1};ze.decimalPlaces=ze.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Zt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};ze.dividedBy=ze.div=function(e){return Ei(this,new this.constructor(e))};ze.dividedToIntegerBy=ze.idiv=function(e){var t=this,n=t.constructor;return Ut(Ei(t,new n(e),0,1),n.precision)};ze.equals=ze.eq=function(e){return!this.cmp(e)};ze.exponent=function(){return bn(this)};ze.greaterThan=ze.gt=function(e){return this.cmp(e)>0};ze.greaterThanOrEqualTo=ze.gte=function(e){return this.cmp(e)>=0};ze.isInteger=ze.isint=function(){return this.e>this.d.length-2};ze.isNegative=ze.isneg=function(){return this.s<0};ze.isPositive=ze.ispos=function(){return this.s>0};ze.isZero=function(){return this.s===0};ze.lessThan=ze.lt=function(e){return this.cmp(e)<0};ze.lessThanOrEqualTo=ze.lte=function(e){return this.cmp(e)<1};ze.logarithm=ze.log=function(e){var t,n=this,r=n.constructor,a=r.precision,o=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Rr))throw Error(ra+"NaN");if(n.s<1)throw Error(ra+(n.s?"NaN":"-Infinity"));return n.eq(Rr)?new r(0):(Kt=!1,t=Ei(_f(n,o),_f(e,o),o),Kt=!0,Ut(t,a))};ze.minus=ze.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?C6(t,e):j6(t,(e.s=-e.s,e))};ze.modulo=ze.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(ra+"NaN");return n.s?(Kt=!1,t=Ei(n,e,0,1).times(e),Kt=!0,n.minus(t)):Ut(new r(n),a)};ze.naturalExponential=ze.exp=function(){return T6(this)};ze.naturalLogarithm=ze.ln=function(){return _f(this)};ze.negated=ze.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ze.plus=ze.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?j6(t,e):C6(t,(e.s=-e.s,e))};ze.precision=ze.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(vs+e);if(t=bn(a)+1,r=a.d.length-1,n=r*Zt+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};ze.squareRoot=ze.sqrt=function(){var e,t,n,r,a,o,l,u=this,f=u.constructor;if(u.s<1){if(!u.s)return new f(0);throw Error(ra+"NaN")}for(e=bn(u),Kt=!1,a=Math.sqrt(+u),a==0||a==1/0?(t=Ua(u.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Pu((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new f(t)):r=new f(a.toString()),n=f.precision,a=l=n+3;;)if(o=r,r=o.plus(Ei(u,o,l+2)).times(.5),Ua(o.d).slice(0,l)===(t=Ua(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),a==l&&t=="4999"){if(Ut(o,n+1,0),o.times(o).eq(u)){r=o;break}}else if(t!="9999")break;l+=4}return Kt=!0,Ut(r,n)};ze.times=ze.mul=function(e){var t,n,r,a,o,l,u,f,d,m=this,p=m.constructor,g=m.d,x=(e=new p(e)).d;if(!m.s||!e.s)return new p(0);for(e.s*=m.s,n=m.e+e.e,f=g.length,d=x.length,f<d&&(o=g,g=x,x=o,l=f,f=d,d=l),o=[],l=f+d,r=l;r--;)o.push(0);for(r=d;--r>=0;){for(t=0,a=f+r;a>r;)u=o[a]+x[r]*g[a-r-1]+t,o[a--]=u%Nn|0,t=u/Nn|0;o[a]=(o[a]+t)%Nn|0}for(;!o[--l];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,Kt?Ut(e,p.precision):e};ze.toDecimalPlaces=ze.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Za(e,0,Mu),t===void 0?t=r.rounding:Za(t,0,8),Ut(n,e+bn(n)+1,t))};ze.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=Ts(r,!0):(Za(e,0,Mu),t===void 0?t=a.rounding:Za(t,0,8),r=Ut(new a(r),e+1,t),n=Ts(r,!0,e+1)),n};ze.toFixed=function(e,t){var n,r,a=this,o=a.constructor;return e===void 0?Ts(a):(Za(e,0,Mu),t===void 0?t=o.rounding:Za(t,0,8),r=Ut(new o(a),e+bn(a)+1,t),n=Ts(r.abs(),!1,e+bn(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};ze.toInteger=ze.toint=function(){var e=this,t=e.constructor;return Ut(new t(e),bn(e)+1,t.rounding)};ze.toNumber=function(){return+this};ze.toPower=ze.pow=function(e){var t,n,r,a,o,l,u=this,f=u.constructor,d=12,m=+(e=new f(e));if(!e.s)return new f(Rr);if(u=new f(u),!u.s){if(e.s<1)throw Error(ra+"Infinity");return u}if(u.eq(Rr))return u;if(r=f.precision,e.eq(Rr))return Ut(u,r);if(t=e.e,n=e.d.length-1,l=t>=n,o=u.s,l){if((n=m<0?-m:m)<=E6){for(a=new f(Rr),t=Math.ceil(r/Zt+4),Kt=!1;n%2&&(a=a.times(u),fk(a.d,t)),n=Pu(n/2),n!==0;)u=u.times(u),fk(u.d,t);return Kt=!0,e.s<0?new f(Rr).div(a):Ut(a,r)}}else if(o<0)throw Error(ra+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,Kt=!1,a=e.times(_f(u,r+d)),Kt=!0,a=T6(a),a.s=o,a};ze.toPrecision=function(e,t){var n,r,a=this,o=a.constructor;return e===void 0?(n=bn(a),r=Ts(a,n<=o.toExpNeg||n>=o.toExpPos)):(Za(e,1,Mu),t===void 0?t=o.rounding:Za(t,0,8),a=Ut(new o(a),e,t),n=bn(a),r=Ts(a,e<=n||n<=o.toExpNeg,e)),r};ze.toSignificantDigits=ze.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Za(e,1,Mu),t===void 0?t=r.rounding:Za(t,0,8)),Ut(new r(n),e,t)};ze.toString=ze.valueOf=ze.val=ze.toJSON=ze[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=bn(e),n=e.constructor;return Ts(e,t<=n.toExpNeg||t>=n.toExpPos)};function j6(e,t){var n,r,a,o,l,u,f,d,m=e.constructor,p=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),Kt?Ut(t,p):t;if(f=e.d,d=t.d,l=e.e,a=t.e,f=f.slice(),o=l-a,o){for(o<0?(r=f,o=-o,u=d.length):(r=d,a=l,u=f.length),l=Math.ceil(p/Zt),u=l>u?l+1:u+1,o>u&&(o=u,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(u=f.length,o=d.length,u-o<0&&(o=u,r=d,d=f,f=r),n=0;o;)n=(f[--o]=f[o]+d[o]+n)/Nn|0,f[o]%=Nn;for(n&&(f.unshift(n),++a),u=f.length;f[--u]==0;)f.pop();return t.d=f,t.e=a,Kt?Ut(t,p):t}function Za(e,t,n){if(e!==~~e||e<t||e>n)throw Error(vs+e)}function Ua(e){var t,n,r,a=e.length-1,o="",l=e[0];if(a>0){for(o+=l,t=1;t<a;t++)r=e[t]+"",n=Zt-r.length,n&&(o+=po(n)),o+=r;l=e[t],r=l+"",n=Zt-r.length,n&&(o+=po(n))}else if(l===0)return"0";for(;l%10===0;)l/=10;return o+l}var Ei=(function(){function e(r,a){var o,l=0,u=r.length;for(r=r.slice();u--;)o=r[u]*a+l,r[u]=o%Nn|0,l=o/Nn|0;return l&&r.unshift(l),r}function t(r,a,o,l){var u,f;if(o!=l)f=o>l?1:-1;else for(u=f=0;u<o;u++)if(r[u]!=a[u]){f=r[u]>a[u]?1:-1;break}return f}function n(r,a,o){for(var l=0;o--;)r[o]-=l,l=r[o]<a[o]?1:0,r[o]=l*Nn+r[o]-a[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,a,o,l){var u,f,d,m,p,g,x,A,S,w,O,E,T,C,j,R,N,k,$=r.constructor,V=r.s==a.s?1:-1,I=r.d,L=a.d;if(!r.s)return new $(r);if(!a.s)throw Error(ra+"Division by zero");for(f=r.e-a.e,N=L.length,j=I.length,x=new $(V),A=x.d=[],d=0;L[d]==(I[d]||0);)++d;if(L[d]>(I[d]||0)&&--f,o==null?E=o=$.precision:l?E=o+(bn(r)-bn(a))+1:E=o,E<0)return new $(0);if(E=E/Zt+2|0,d=0,N==1)for(m=0,L=L[0],E++;(d<j||m)&&E--;d++)T=m*Nn+(I[d]||0),A[d]=T/L|0,m=T%L|0;else{for(m=Nn/(L[0]+1)|0,m>1&&(L=e(L,m),I=e(I,m),N=L.length,j=I.length),C=N,S=I.slice(0,N),w=S.length;w<N;)S[w++]=0;k=L.slice(),k.unshift(0),R=L[0],L[1]>=Nn/2&&++R;do m=0,u=t(L,S,N,w),u<0?(O=S[0],N!=w&&(O=O*Nn+(S[1]||0)),m=O/R|0,m>1?(m>=Nn&&(m=Nn-1),p=e(L,m),g=p.length,w=S.length,u=t(p,S,g,w),u==1&&(m--,n(p,N<g?k:L,g))):(m==0&&(u=m=1),p=L.slice()),g=p.length,g<w&&p.unshift(0),n(S,p,w),u==-1&&(w=S.length,u=t(L,S,N,w),u<1&&(m++,n(S,N<w?k:L,w))),w=S.length):u===0&&(m++,S=[0]),A[d++]=m,u&&S[0]?S[w++]=I[C]||0:(S=[I[C]],w=1);while((C++<j||S[0]!==void 0)&&E--)}return A[0]||A.shift(),x.e=f,Ut(x,l?o+bn(x)+1:o)}})();function T6(e,t){var n,r,a,o,l,u,f=0,d=0,m=e.constructor,p=m.precision;if(bn(e)>16)throw Error(BO+bn(e));if(!e.s)return new m(Rr);for(Kt=!1,u=p,l=new m(.03125);e.abs().gte(.1);)e=e.times(l),d+=5;for(r=Math.log(ls(2,d))/Math.LN10*2+5|0,u+=r,n=a=o=new m(Rr),m.precision=u;;){if(a=Ut(a.times(e),u),n=n.times(++f),l=o.plus(Ei(a,n,u)),Ua(l.d).slice(0,u)===Ua(o.d).slice(0,u)){for(;d--;)o=Ut(o.times(o),u);return m.precision=p,t==null?(Kt=!0,Ut(o,p)):o}o=l}}function bn(e){for(var t=e.e*Zt,n=e.d[0];n>=10;n/=10)t++;return t}function n1(e,t,n){if(t>e.LN10.sd())throw Kt=!0,n&&(e.precision=n),Error(ra+"LN10 precision limit exceeded");return Ut(new e(e.LN10),t)}function po(e){for(var t="";e--;)t+="0";return t}function _f(e,t){var n,r,a,o,l,u,f,d,m,p=1,g=10,x=e,A=x.d,S=x.constructor,w=S.precision;if(x.s<1)throw Error(ra+(x.s?"NaN":"-Infinity"));if(x.eq(Rr))return new S(0);if(t==null?(Kt=!1,d=w):d=t,x.eq(10))return t==null&&(Kt=!0),n1(S,d);if(d+=g,S.precision=d,n=Ua(A),r=n.charAt(0),o=bn(x),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)x=x.times(e),n=Ua(x.d),r=n.charAt(0),p++;o=bn(x),r>1?(x=new S("0."+n),o++):x=new S(r+"."+n.slice(1))}else return f=n1(S,d+2,w).times(o+""),x=_f(new S(r+"."+n.slice(1)),d-g).plus(f),S.precision=w,t==null?(Kt=!0,Ut(x,w)):x;for(u=l=x=Ei(x.minus(Rr),x.plus(Rr),d),m=Ut(x.times(x),d),a=3;;){if(l=Ut(l.times(m),d),f=u.plus(Ei(l,new S(a),d)),Ua(f.d).slice(0,d)===Ua(u.d).slice(0,d))return u=u.times(2),o!==0&&(u=u.plus(n1(S,d+2,w).times(o+""))),u=Ei(u,new S(p),d),S.precision=w,t==null?(Kt=!0,Ut(u,w)):u;u=f,a+=2}}function ck(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=Pu(n/Zt),e.d=[],r=(n+1)%Zt,n<0&&(r+=Zt),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=Zt;r<a;)e.d.push(+t.slice(r,r+=Zt));t=t.slice(r),r=Zt-t.length}else r-=a;for(;r--;)t+="0";if(e.d.push(+t),Kt&&(e.e>cm||e.e<-cm))throw Error(BO+n)}else e.s=0,e.e=0,e.d=[0];return e}function Ut(e,t,n){var r,a,o,l,u,f,d,m,p=e.d;for(l=1,o=p[0];o>=10;o/=10)l++;if(r=t-l,r<0)r+=Zt,a=t,d=p[m=0];else{if(m=Math.ceil((r+1)/Zt),o=p.length,m>=o)return e;for(d=o=p[m],l=1;o>=10;o/=10)l++;r%=Zt,a=r-Zt+l}if(n!==void 0&&(o=ls(10,l-a-1),u=d/o%10|0,f=t<0||p[m+1]!==void 0||d%o,f=n<4?(u||f)&&(n==0||n==(e.s<0?3:2)):u>5||u==5&&(n==4||f||n==6&&(r>0?a>0?d/ls(10,l-a):0:p[m-1])%10&1||n==(e.s<0?8:7))),t<1||!p[0])return f?(o=bn(e),p.length=1,t=t-o-1,p[0]=ls(10,(Zt-t%Zt)%Zt),e.e=Pu(-t/Zt)||0):(p.length=1,p[0]=e.e=e.s=0),e;if(r==0?(p.length=m,o=1,m--):(p.length=m+1,o=ls(10,Zt-r),p[m]=a>0?(d/ls(10,l-a)%ls(10,a)|0)*o:0),f)for(;;)if(m==0){(p[0]+=o)==Nn&&(p[0]=1,++e.e);break}else{if(p[m]+=o,p[m]!=Nn)break;p[m--]=0,o=1}for(r=p.length;p[--r]===0;)p.pop();if(Kt&&(e.e>cm||e.e<-cm))throw Error(BO+bn(e));return e}function C6(e,t){var n,r,a,o,l,u,f,d,m,p,g=e.constructor,x=g.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new g(e),Kt?Ut(t,x):t;if(f=e.d,p=t.d,r=t.e,d=e.e,f=f.slice(),l=d-r,l){for(m=l<0,m?(n=f,l=-l,u=p.length):(n=p,r=d,u=f.length),a=Math.max(Math.ceil(x/Zt),u)+2,l>a&&(l=a,n.length=1),n.reverse(),a=l;a--;)n.push(0);n.reverse()}else{for(a=f.length,u=p.length,m=a<u,m&&(u=a),a=0;a<u;a++)if(f[a]!=p[a]){m=f[a]<p[a];break}l=0}for(m&&(n=f,f=p,p=n,t.s=-t.s),u=f.length,a=p.length-u;a>0;--a)f[u++]=0;for(a=p.length;a>l;){if(f[--a]<p[a]){for(o=a;o&&f[--o]===0;)f[o]=Nn-1;--f[o],f[a]+=Nn}f[a]-=p[a]}for(;f[--u]===0;)f.pop();for(;f[0]===0;f.shift())--r;return f[0]?(t.d=f,t.e=r,Kt?Ut(t,x):t):new g(0)}function Ts(e,t,n){var r,a=bn(e),o=Ua(e.d),l=o.length;return t?(n&&(r=n-l)>0?o=o.charAt(0)+"."+o.slice(1)+po(r):l>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(a<0?"e":"e+")+a):a<0?(o="0."+po(-a-1)+o,n&&(r=n-l)>0&&(o+=po(r))):a>=l?(o+=po(a+1-l),n&&(r=n-a-1)>0&&(o=o+"."+po(r))):((r=a+1)<l&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-l)>0&&(a+1===l&&(o+="."),o+=po(r))),e.s<0?"-"+o:o}function fk(e,t){if(e.length>t)return e.length=t,!0}function R6(e){var t,n,r;function a(o){var l=this;if(!(l instanceof a))return new a(o);if(l.constructor=a,o instanceof a){l.s=o.s,l.e=o.e,l.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(vs+o);if(o>0)l.s=1;else if(o<0)o=-o,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(o===~~o&&o<1e7){l.e=0,l.d=[o];return}return ck(l,o.toString())}else if(typeof o!="string")throw Error(vs+o);if(o.charCodeAt(0)===45?(o=o.slice(1),l.s=-1):l.s=1,tfe.test(o))ck(l,o);else throw Error(vs+o)}if(a.prototype=ze,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=R6,a.config=a.set=nfe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return a.config(e),a}function nfe(e){if(!e||typeof e!="object")throw Error(ra+"Object expected");var t,n,r,a=["precision",1,Mu,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((r=e[n=a[t]])!==void 0)if(Pu(r)===r&&r>=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(vs+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(vs+n+": "+r);return this}var UO=R6(efe);Rr=new UO(1);const Pt=UO;function rfe(e){return sfe(e)||ofe(e)||ife(e)||afe()}function afe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
440
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ife(e,t){if(e){if(typeof e=="string")return BS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return BS(e,t)}}function ofe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function sfe(e){if(Array.isArray(e))return BS(e)}function BS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var lfe=function(t){return t},N6={},M6=function(t){return t===N6},dk=function(t){return function n(){return arguments.length===0||arguments.length===1&&M6(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},ufe=function e(t,n){return t===1?n:dk(function(){for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];var l=a.filter(function(u){return u!==N6}).length;return l>=t?n.apply(void 0,a):e(t-l,dk(function(){for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];var m=a.map(function(p){return M6(p)?f.shift():p});return n.apply(void 0,rfe(m).concat(f))}))})},qv=function(t){return ufe(t.length,t)},US=function(t,n){for(var r=[],a=t;a<n;++a)r[a-t]=a;return r},cfe=qv(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),ffe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return lfe;var a=n.reverse(),o=a[0],l=a.slice(1);return function(){return l.reduce(function(u,f){return f(u)},o.apply(void 0,arguments))}},qS=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},P6=function(t){var n=null,r=null;return function(){for(var a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l];return n&&o.every(function(u,f){return u===n[f]})||(n=o,r=t.apply(void 0,o)),r}};function dfe(e){var t;return e===0?t=1:t=Math.floor(new Pt(e).abs().log(10).toNumber())+1,t}function hfe(e,t,n){for(var r=new Pt(e),a=0,o=[];r.lt(t)&&a<1e5;)o.push(r.toNumber()),r=r.add(n),a++;return o}var pfe=qv(function(e,t,n){var r=+e,a=+t;return r+n*(a-r)}),mfe=qv(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),vfe=qv(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const Hv={rangeStep:hfe,getDigitCount:dfe,interpolateNumber:pfe,uninterpolateNumber:mfe,uninterpolateTruncation:vfe};function HS(e){return bfe(e)||yfe(e)||D6(e)||gfe()}function gfe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
441
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yfe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function bfe(e){if(Array.isArray(e))return FS(e)}function Af(e,t){return Sfe(e)||wfe(e,t)||D6(e,t)||xfe()}function xfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
442
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function D6(e,t){if(e){if(typeof e=="string")return FS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FS(e,t)}}function FS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wfe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,a=!1,o=void 0;try{for(var l=e[Symbol.iterator](),u;!(r=(u=l.next()).done)&&(n.push(u.value),!(t&&n.length===t));r=!0);}catch(f){a=!0,o=f}finally{try{!r&&l.return!=null&&l.return()}finally{if(a)throw o}}return n}}function Sfe(e){if(Array.isArray(e))return e}function k6(e){var t=Af(e,2),n=t[0],r=t[1],a=n,o=r;return n>r&&(a=r,o=n),[a,o]}function $6(e,t,n){if(e.lte(0))return new Pt(0);var r=Hv.getDigitCount(e.toNumber()),a=new Pt(10).pow(r),o=e.div(a),l=r!==1?.05:.1,u=new Pt(Math.ceil(o.div(l).toNumber())).add(n).mul(l),f=u.mul(a);return t?f:new Pt(Math.ceil(f))}function _fe(e,t,n){var r=1,a=new Pt(e);if(!a.isint()&&n){var o=Math.abs(e);o<1?(r=new Pt(10).pow(Hv.getDigitCount(e)-1),a=new Pt(Math.floor(a.div(r).toNumber())).mul(r)):o>1&&(a=new Pt(Math.floor(e)))}else e===0?a=new Pt(Math.floor((t-1)/2)):n||(a=new Pt(Math.floor(e)));var l=Math.floor((t-1)/2),u=ffe(cfe(function(f){return a.add(new Pt(f-l).mul(r)).toNumber()}),US);return u(0,t)}function z6(e,t,n,r){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Pt(0),tickMin:new Pt(0),tickMax:new Pt(0)};var o=$6(new Pt(t).sub(e).div(n-1),r,a),l;e<=0&&t>=0?l=new Pt(0):(l=new Pt(e).add(t).div(2),l=l.sub(new Pt(l).mod(o)));var u=Math.ceil(l.sub(e).div(o).toNumber()),f=Math.ceil(new Pt(t).sub(l).div(o).toNumber()),d=u+f+1;return d>n?z6(e,t,n,r,a+1):(d<n&&(f=t>0?f+(n-d):f,u=t>0?u:u+(n-d)),{step:o,tickMin:l.sub(new Pt(u).mul(o)),tickMax:l.add(new Pt(f).mul(o))})}function Afe(e){var t=Af(e,2),n=t[0],r=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=Math.max(a,2),u=k6([n,r]),f=Af(u,2),d=f[0],m=f[1];if(d===-1/0||m===1/0){var p=m===1/0?[d].concat(HS(US(0,a-1).map(function(){return 1/0}))):[].concat(HS(US(0,a-1).map(function(){return-1/0})),[m]);return n>r?qS(p):p}if(d===m)return _fe(d,a,o);var g=z6(d,m,l,o),x=g.step,A=g.tickMin,S=g.tickMax,w=Hv.rangeStep(A,S.add(new Pt(.1).mul(x)),x);return n>r?qS(w):w}function Ofe(e,t){var n=Af(e,2),r=n[0],a=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=k6([r,a]),u=Af(l,2),f=u[0],d=u[1];if(f===-1/0||d===1/0)return[r,a];if(f===d)return[f];var m=Math.max(t,2),p=$6(new Pt(d).sub(f).div(m-1),o,0),g=[].concat(HS(Hv.rangeStep(new Pt(f),new Pt(d).sub(new Pt(.99).mul(p)),p)),[d]);return r>a?qS(g):g}var Efe=P6(Afe),jfe=P6(Ofe),Tfe="Invariant failed";function Cs(e,t){throw new Error(Tfe)}var Cfe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function nu(e){"@babel/helpers - typeof";return nu=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},nu(e)}function fm(){return fm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fm.apply(this,arguments)}function Rfe(e,t){return Dfe(e)||Pfe(e,t)||Mfe(e,t)||Nfe()}function Nfe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
443
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mfe(e,t){if(e){if(typeof e=="string")return hk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hk(e,t)}}function hk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pfe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return u}}function Dfe(e){if(Array.isArray(e))return e}function kfe(e,t){if(e==null)return{};var n=$fe(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $fe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function zfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lfe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,B6(r.key),r)}}function Ife(e,t,n){return t&&Lfe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bfe(e,t,n){return t=dm(t),Ufe(e,L6()?Reflect.construct(t,n||[],dm(e).constructor):t.apply(e,n))}function Ufe(e,t){if(t&&(nu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qfe(e)}function qfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function L6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(L6=function(){return!!e})()}function dm(e){return dm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dm(e)}function Hfe(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(r,a){return r.__proto__=a,r},VS(e,t)}function I6(e,t,n){return t=B6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B6(e){var t=Ffe(e,"string");return nu(t)=="symbol"?t:t+""}function Ffe(e,t){if(nu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(nu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Fv=(function(e){function t(){return zfe(this,t),Bfe(this,t,arguments)}return Hfe(t,e),Ife(t,[{key:"render",value:function(){var r=this.props,a=r.offset,o=r.layout,l=r.width,u=r.dataKey,f=r.data,d=r.dataPointFormatter,m=r.xAxis,p=r.yAxis,g=kfe(r,Cfe),x=ut(g,!1);this.props.direction==="x"&&m.type!=="number"&&Cs();var A=f.map(function(S){var w=d(S,u),O=w.x,E=w.y,T=w.value,C=w.errorVal;if(!C)return null;var j=[],R,N;if(Array.isArray(C)){var k=Rfe(C,2);R=k[0],N=k[1]}else R=N=C;if(o==="vertical"){var $=m.scale,V=E+a,I=V+l,L=V-l,H=$(T-R),W=$(T+N);j.push({x1:W,y1:I,x2:W,y2:L}),j.push({x1:H,y1:V,x2:W,y2:V}),j.push({x1:H,y1:I,x2:H,y2:L})}else if(o==="horizontal"){var Z=p.scale,z=O+a,F=z-l,Y=z+l,Q=Z(T-R),K=Z(T+N);j.push({x1:F,y1:K,x2:Y,y2:K}),j.push({x1:z,y1:Q,x2:z,y2:K}),j.push({x1:F,y1:Q,x2:Y,y2:Q})}return q.createElement(Jt,fm({className:"recharts-errorBar",key:"bar-".concat(j.map(function(P){return"".concat(P.x1,"-").concat(P.x2,"-").concat(P.y1,"-").concat(P.y2)}))},x),j.map(function(P){return q.createElement("line",fm({},P,{key:"line-".concat(P.x1,"-").concat(P.x2,"-").concat(P.y1,"-").concat(P.y2)}))}))});return q.createElement(Jt,{className:"recharts-errorBars"},A)}}])})(q.Component);I6(Fv,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});I6(Fv,"displayName","ErrorBar");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 pk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function os(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pk(Object(n),!0).forEach(function(r){Vfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vfe(e,t,n){return t=Gfe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gfe(e){var t=Wfe(e,"string");return Of(t)=="symbol"?t:t+""}function Wfe(e,t){if(Of(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Of(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var U6=function(t){var n=t.children,r=t.formattedGraphicalItems,a=t.legendWidth,o=t.legendContent,l=Er(n,Ll);if(!l)return null;var u=Ll.defaultProps,f=u!==void 0?os(os({},u),l.props):{},d;return l.props&&l.props.payload?d=l.props&&l.props.payload:o==="children"?d=(r||[]).reduce(function(m,p){var g=p.item,x=p.props,A=x.sectors||x.data||[];return m.concat(A.map(function(S){return{type:l.props.iconType||g.props.legendType,value:S.name,color:S.fill,payload:S}}))},[]):d=(r||[]).map(function(m){var p=m.item,g=p.type.defaultProps,x=g!==void 0?os(os({},g),p.props):{},A=x.dataKey,S=x.name,w=x.legendType,O=x.hide;return{inactive:O,dataKey:A,type:f.iconType||w||"square",color:qO(p),value:S||A,payload:x}}),os(os(os({},f),Ll.getWithHeight(l,a)),{},{payload:d,item:l})};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 mk(e){return Xfe(e)||Kfe(e)||Yfe(e)||Zfe()}function Zfe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
444
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yfe(e,t){if(e){if(typeof e=="string")return GS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GS(e,t)}}function Kfe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Xfe(e){if(Array.isArray(e))return GS(e)}function GS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function an(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vk(Object(n),!0).forEach(function(r){Bl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bl(e,t,n){return t=Qfe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qfe(e){var t=Jfe(e,"string");return Ef(t)=="symbol"?t:t+""}function Jfe(e,t){if(Ef(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ef(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mr(e,t,n){return ht(e)||ht(t)?n:An(t)?ta(e,t,n):at(t)?t(e):n}function Jc(e,t,n,r){var a=Xce(e,function(u){return Mr(u,t)});if(n==="number"){var o=a.filter(function(u){return je(u)||parseFloat(u)});return o.length?[Uv(o),vo(o)]:[1/0,-1/0]}var l=r?a.filter(function(u){return!ht(u)}):a;return l.map(function(u){return An(u)||u instanceof Date?u:""})}var ede=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,l=-1,u=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(u<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var f=o.range,d=0;d<u;d++){var m=d>0?a[d-1].coordinate:a[u-1].coordinate,p=a[d].coordinate,g=d>=u-1?a[0].coordinate:a[d+1].coordinate,x=void 0;if(wa(p-m)!==wa(g-p)){var A=[];if(wa(g-p)===wa(f[1]-f[0])){x=g;var S=p+f[1]-f[0];A[0]=Math.min(S,(S+m)/2),A[1]=Math.max(S,(S+m)/2)}else{x=m;var w=g+f[1]-f[0];A[0]=Math.min(p,(w+p)/2),A[1]=Math.max(p,(w+p)/2)}var O=[Math.min(p,(x+p)/2),Math.max(p,(x+p)/2)];if(t>O[0]&&t<=O[1]||t>=A[0]&&t<=A[1]){l=a[d].index;break}}else{var E=Math.min(m,g),T=Math.max(m,g);if(t>(E+p)/2&&t<=(T+p)/2){l=a[d].index;break}}}else for(var C=0;C<u;C++)if(C===0&&t<=(r[C].coordinate+r[C+1].coordinate)/2||C>0&&C<u-1&&t>(r[C].coordinate+r[C-1].coordinate)/2&&t<=(r[C].coordinate+r[C+1].coordinate)/2||C===u-1&&t>(r[C].coordinate+r[C-1].coordinate)/2){l=r[C].index;break}return l},qO=function(t){var n,r=t,a=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?an(an({},t.type.defaultProps),t.props):t.props,l=o.stroke,u=o.fill,f;switch(a){case"Line":f=l;break;case"Area":case"Radar":f=l&&l!=="none"?l:u;break;default:f=u;break}return f},tde=function(t){var n=t.barSize,r=t.totalSize,a=t.stackGroups,o=a===void 0?{}:a;if(!o)return{};for(var l={},u=Object.keys(o),f=0,d=u.length;f<d;f++)for(var m=o[u[f]].stackGroups,p=Object.keys(m),g=0,x=p.length;g<x;g++){var A=m[p[g]],S=A.items,w=A.cateAxisId,O=S.filter(function(N){return Ai(N.type).indexOf("Bar")>=0});if(O&&O.length){var E=O[0].type.defaultProps,T=E!==void 0?an(an({},E),O[0].props):O[0].props,C=T.barSize,j=T[w];l[j]||(l[j]=[]);var R=ht(C)?n:C;l[j].push({item:O[0],stackList:O.slice(1),barSize:ht(R)?void 0:js(R,r,0)})}}return l},nde=function(t){var n=t.barGap,r=t.barCategoryGap,a=t.bandSize,o=t.sizeList,l=o===void 0?[]:o,u=t.maxBarSize,f=l.length;if(f<1)return null;var d=js(n,a,0,!0),m,p=[];if(l[0].barSize===+l[0].barSize){var g=!1,x=a/f,A=l.reduce(function(C,j){return C+j.barSize||0},0);A+=(f-1)*d,A>=a&&(A-=(f-1)*d,d=0),A>=a&&x>0&&(g=!0,x*=.9,A=f*x);var S=(a-A)/2>>0,w={offset:S-d,size:0};m=l.reduce(function(C,j){var R={item:j.item,position:{offset:w.offset+w.size+d,size:g?x:j.barSize}},N=[].concat(mk(C),[R]);return w=N[N.length-1].position,j.stackList&&j.stackList.length&&j.stackList.forEach(function(k){N.push({item:k,position:w})}),N},p)}else{var O=js(r,a,0,!0);a-2*O-(f-1)*d<=0&&(d=0);var E=(a-2*O-(f-1)*d)/f;E>1&&(E>>=0);var T=u===+u?Math.min(E,u):E;m=l.reduce(function(C,j,R){var N=[].concat(mk(C),[{item:j.item,position:{offset:O+(E+d)*R+(E-T)/2,size:T}}]);return j.stackList&&j.stackList.length&&j.stackList.forEach(function(k){N.push({item:k,position:N[N.length-1].position})}),N},p)}return m},rde=function(t,n,r,a){var o=r.children,l=r.width,u=r.margin,f=l-(u.left||0)-(u.right||0),d=U6({children:o,legendWidth:f});if(d){var m=a||{},p=m.width,g=m.height,x=d.align,A=d.verticalAlign,S=d.layout;if((S==="vertical"||S==="horizontal"&&A==="middle")&&x!=="center"&&je(t[x]))return an(an({},t),{},Bl({},x,t[x]+(p||0)));if((S==="horizontal"||S==="vertical"&&x==="center")&&A!=="middle"&&je(t[A]))return an(an({},t),{},Bl({},A,t[A]+(g||0)))}return t},ade=function(t,n,r){return ht(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},q6=function(t,n,r,a,o){var l=n.props.children,u=Oa(l,Fv).filter(function(d){return ade(a,o,d.props.direction)});if(u&&u.length){var f=u.map(function(d){return d.props.dataKey});return t.reduce(function(d,m){var p=Mr(m,r);if(ht(p))return d;var g=Array.isArray(p)?[Uv(p),vo(p)]:[p,p],x=f.reduce(function(A,S){var w=Mr(m,S,0),O=g[0]-Math.abs(Array.isArray(w)?w[0]:w),E=g[1]+Math.abs(Array.isArray(w)?w[1]:w);return[Math.min(O,A[0]),Math.max(E,A[1])]},[1/0,-1/0]);return[Math.min(x[0],d[0]),Math.max(x[1],d[1])]},[1/0,-1/0])}return null},ide=function(t,n,r,a,o){var l=n.map(function(u){return q6(t,u,r,o,a)}).filter(function(u){return!ht(u)});return l&&l.length?l.reduce(function(u,f){return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]):null},H6=function(t,n,r,a,o){var l=n.map(function(f){var d=f.props.dataKey;return r==="number"&&d&&q6(t,f,d,a)||Jc(t,d,r,o)});if(r==="number")return l.reduce(function(f,d){return[Math.min(f[0],d[0]),Math.max(f[1],d[1])]},[1/0,-1/0]);var u={};return l.reduce(function(f,d){for(var m=0,p=d.length;m<p;m++)u[d[m]]||(u[d[m]]=!0,f.push(d[m]));return f},[])},F6=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},V6=function(t,n,r,a){if(a)return t.map(function(f){return f.coordinate});var o,l,u=t.map(function(f){return f.coordinate===n&&(o=!0),f.coordinate===r&&(l=!0),f.coordinate});return o||u.push(n),l||u.push(r),u},_i=function(t,n,r){if(!t)return null;var a=t.scale,o=t.duplicateDomain,l=t.type,u=t.range,f=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,d=(n||r)&&l==="category"&&a.bandwidth?a.bandwidth()/f:0;if(d=t.axisType==="angleAxis"&&(u==null?void 0:u.length)>=2?wa(u[0]-u[1])*2*d:d,n&&(t.ticks||t.niceTicks)){var m=(t.ticks||t.niceTicks).map(function(p){var g=o?o.indexOf(p):p;return{coordinate:a(g)+d,value:p,offset:d}});return m.filter(function(p){return!Tu(p.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(p,g){return{coordinate:a(p)+d,value:p,index:g,offset:d}}):a.ticks&&!r?a.ticks(t.tickCount).map(function(p){return{coordinate:a(p)+d,value:p,offset:d}}):a.domain().map(function(p,g){return{coordinate:a(p)+d,value:o?o[p]:p,index:g,offset:d}})},r1=new WeakMap,Xh=function(t,n){if(typeof n!="function")return t;r1.has(t)||r1.set(t,new WeakMap);var r=r1.get(t);if(r.has(n))return r.get(n);var a=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,a),a},ode=function(t,n,r){var a=t.scale,o=t.type,l=t.layout,u=t.axisType;if(a==="auto")return l==="radial"&&u==="radiusAxis"?{scale:gf(),realScaleType:"band"}:l==="radial"&&u==="angleAxis"?{scale:om(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Qc(),realScaleType:"point"}:o==="category"?{scale:gf(),realScaleType:"band"}:{scale:om(),realScaleType:"linear"};if(Es(a)){var f="scale".concat(Tv(a));return{scale:(tk[f]||Qc)(),realScaleType:tk[f]?f:"point"}}return at(a)?{scale:a}:{scale:Qc(),realScaleType:"point"}},gk=1e-4,sde=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,a=t.range(),o=Math.min(a[0],a[1])-gk,l=Math.max(a[0],a[1])+gk,u=t(n[0]),f=t(n[r-1]);(u<o||u>l||f<o||f>l)&&t.domain([n[0],n[r-1]])}},lde=function(t,n){if(!t)return null;for(var r=0,a=t.length;r<a;r++)if(t[r].item===n)return t[r].position;return null},ude=function(t,n){if(!n||n.length!==2||!je(n[0])||!je(n[1]))return t;var r=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]),o=[t[0],t[1]];return(!je(t[0])||t[0]<r)&&(o[0]=r),(!je(t[1])||t[1]>a)&&(o[1]=a),o[0]>a&&(o[0]=a),o[1]<r&&(o[1]=r),o},cde=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r<a;++r)for(var o=0,l=0,u=0;u<n;++u){var f=Tu(t[u][r][1])?t[u][r][0]:t[u][r][1];f>=0?(t[u][r][0]=o,t[u][r][1]=o+f,o=t[u][r][1]):(t[u][r][0]=l,t[u][r][1]=l+f,l=t[u][r][1])}},fde=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r<a;++r)for(var o=0,l=0;l<n;++l){var u=Tu(t[l][r][1])?t[l][r][0]:t[l][r][1];u>=0?(t[l][r][0]=o,t[l][r][1]=o+u,o=t[l][r][1]):(t[l][r][0]=0,t[l][r][1]=0)}},dde={sign:cde,expand:Zae,none:Zl,silhouette:Yae,wiggle:Kae,positive:fde},hde=function(t,n,r){var a=n.map(function(u){return u.props.dataKey}),o=dde[r],l=Wae().keys(a).value(function(u,f){return+Mr(u,f,0)}).order(SS).offset(o);return l(t)},pde=function(t,n,r,a,o,l){if(!t)return null;var u=l?n.reverse():n,f={},d=u.reduce(function(p,g){var x,A=(x=g.type)!==null&&x!==void 0&&x.defaultProps?an(an({},g.type.defaultProps),g.props):g.props,S=A.stackId,w=A.hide;if(w)return p;var O=A[r],E=p[O]||{hasStack:!1,stackGroups:{}};if(An(S)){var T=E.stackGroups[S]||{numericAxisId:r,cateAxisId:a,items:[]};T.items.push(g),E.hasStack=!0,E.stackGroups[S]=T}else E.stackGroups[hd("_stackId_")]={numericAxisId:r,cateAxisId:a,items:[g]};return an(an({},p),{},Bl({},O,E))},f),m={};return Object.keys(d).reduce(function(p,g){var x=d[g];if(x.hasStack){var A={};x.stackGroups=Object.keys(x.stackGroups).reduce(function(S,w){var O=x.stackGroups[w];return an(an({},S),{},Bl({},w,{numericAxisId:r,cateAxisId:a,items:O.items,stackedData:hde(t,O.items,o)}))},A)}return an(an({},p),{},Bl({},g,x))},m)},mde=function(t,n){var r=n.realScaleType,a=n.type,o=n.tickCount,l=n.originalDomain,u=n.allowDecimals,f=r||n.scale;if(f!=="auto"&&f!=="linear")return null;if(o&&a==="number"&&l&&(l[0]==="auto"||l[1]==="auto")){var d=t.domain();if(!d.length)return null;var m=Efe(d,o,u);return t.domain([Uv(m),vo(m)]),{niceTicks:m}}if(o&&a==="number"){var p=t.domain(),g=jfe(p,o,u);return{niceTicks:g}}return null};function yk(e){var t=e.axis,n=e.ticks,r=e.bandSize,a=e.entry,o=e.index,l=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ht(a[t.dataKey])){var u=Ip(n,"value",a[t.dataKey]);if(u)return u.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var f=Mr(a,ht(l)?t.dataKey:l);return ht(f)?null:t.scale(f)}var bk=function(t){var n=t.axis,r=t.ticks,a=t.offset,o=t.bandSize,l=t.entry,u=t.index;if(n.type==="category")return r[u]?r[u].coordinate+a:null;var f=Mr(l,n.dataKey,n.domain[u]);return ht(f)?null:n.scale(f)-o/2+a},vde=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var a=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return a<=0&&o>=0?0:o<0?o:a}return r[0]},gde=function(t,n){var r,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?an(an({},t.type.defaultProps),t.props):t.props,o=a.stackId;if(An(o)){var l=n[o];if(l){var u=l.items.indexOf(t);return u>=0?l.stackedData[u]:null}}return null},yde=function(t){return t.reduce(function(n,r){return[Uv(r.concat([n[0]]).filter(je)),vo(r.concat([n[1]]).filter(je))]},[1/0,-1/0])},G6=function(t,n,r){return Object.keys(t).reduce(function(a,o){var l=t[o],u=l.stackedData,f=u.reduce(function(d,m){var p=yde(m.slice(n,r+1));return[Math.min(d[0],p[0]),Math.max(d[1],p[1])]},[1/0,-1/0]);return[Math.min(f[0],a[0]),Math.max(f[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},xk=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,wk=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,WS=function(t,n,r){if(at(t))return t(n,r);if(!Array.isArray(t))return n;var a=[];if(je(t[0]))a[0]=r?t[0]:Math.min(t[0],n[0]);else if(xk.test(t[0])){var o=+xk.exec(t[0])[1];a[0]=n[0]-o}else at(t[0])?a[0]=t[0](n[0]):a[0]=n[0];if(je(t[1]))a[1]=r?t[1]:Math.max(t[1],n[1]);else if(wk.test(t[1])){var l=+wk.exec(t[1])[1];a[1]=n[1]+l}else at(t[1])?a[1]=t[1](n[1]):a[1]=n[1];return a},hm=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!r||a>0)return a}if(t&&n&&n.length>=2){for(var o=vO(n,function(p){return p.coordinate}),l=1/0,u=1,f=o.length;u<f;u++){var d=o[u],m=o[u-1];l=Math.min((d.coordinate||0)-(m.coordinate||0),l)}return l===1/0?0:l}return r?void 0:0},Sk=function(t,n,r){return!t||!t.length||Sf(t,ta(r,"type.defaultProps.domain"))?n:t},W6=function(t,n){var r=t.type.defaultProps?an(an({},t.type.defaultProps),t.props):t.props,a=r.dataKey,o=r.name,l=r.unit,u=r.formatter,f=r.tooltipType,d=r.chartType,m=r.hide;return an(an({},ut(t,!1)),{},{dataKey:a,unit:l,formatter:u,name:o||a,color:qO(t),value:Mr(n,a),type:f,payload:n,chartType:d,hide:m})};function jf(e){"@babel/helpers - typeof";return jf=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},jf(e)}function _k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ak(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_k(Object(n),!0).forEach(function(r){bde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_k(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bde(e,t,n){return t=xde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xde(e){var t=wde(e,"string");return jf(t)=="symbol"?t:t+""}function wde(e,t){if(jf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pm=Math.PI/180,Sde=function(t){return t*180/Math.PI},Bn=function(t,n,r,a){return{x:t+Math.cos(-pm*a)*r,y:n+Math.sin(-pm*a)*r}},_de=function(t,n){var r=t.x,a=t.y,o=n.x,l=n.y;return Math.sqrt(Math.pow(r-o,2)+Math.pow(a-l,2))},Ade=function(t,n){var r=t.x,a=t.y,o=n.cx,l=n.cy,u=_de({x:r,y:a},{x:o,y:l});if(u<=0)return{radius:u};var f=(r-o)/u,d=Math.acos(f);return a>l&&(d=2*Math.PI-d),{radius:u,angle:Sde(d),angleInRadian:d}},Ode=function(t){var n=t.startAngle,r=t.endAngle,a=Math.floor(n/360),o=Math.floor(r/360),l=Math.min(a,o);return{startAngle:n-l*360,endAngle:r-l*360}},Ede=function(t,n){var r=n.startAngle,a=n.endAngle,o=Math.floor(r/360),l=Math.floor(a/360),u=Math.min(o,l);return t+u*360},Ok=function(t,n){var r=t.x,a=t.y,o=Ade({x:r,y:a},n),l=o.radius,u=o.angle,f=n.innerRadius,d=n.outerRadius;if(l<f||l>d)return!1;if(l===0)return!0;var m=Ode(n),p=m.startAngle,g=m.endAngle,x=u,A;if(p<=g){for(;x>g;)x-=360;for(;x<p;)x+=360;A=x>=p&&x<=g}else{for(;x>p;)x-=360;for(;x<g;)x+=360;A=x>=g&&x<=p}return A?Ak(Ak({},n),{},{radius:l,angle:Ede(x,n)}):null};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 jde=["offset"];function Tde(e){return Mde(e)||Nde(e)||Rde(e)||Cde()}function Cde(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
445
- 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 ZS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZS(e,t)}}function Nde(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Mde(e){if(Array.isArray(e))return ZS(e)}function ZS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pde(e,t){if(e==null)return{};var n=Dde(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Dde(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ek(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function _n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ek(Object(n),!0).forEach(function(r){kde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ek(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kde(e,t,n){return t=$de(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $de(e){var t=zde(e,"string");return Tf(t)=="symbol"?t:t+""}function zde(e,t){if(Tf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cf(){return Cf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cf.apply(this,arguments)}var Lde=function(t){var n=t.value,r=t.formatter,a=ht(t.children)?n:t.children;return at(r)?r(a):a},Ide=function(t,n){var r=wa(n-t),a=Math.min(Math.abs(n-t),360);return r*a},Bde=function(t,n,r){var a=t.position,o=t.viewBox,l=t.offset,u=t.className,f=o,d=f.cx,m=f.cy,p=f.innerRadius,g=f.outerRadius,x=f.startAngle,A=f.endAngle,S=f.clockWise,w=(p+g)/2,O=Ide(x,A),E=O>=0?1:-1,T,C;a==="insideStart"?(T=x+E*l,C=S):a==="insideEnd"?(T=A-E*l,C=!S):a==="end"&&(T=A+E*l,C=S),C=O<=0?C:!C;var j=Bn(d,m,w,T),R=Bn(d,m,w,T+(C?1:-1)*359),N="M".concat(j.x,",").concat(j.y,`
446
- A`).concat(w,",").concat(w,",0,1,").concat(C?0:1,`,
447
- `).concat(R.x,",").concat(R.y),k=ht(t.id)?hd("recharts-radial-line-"):t.id;return q.createElement("text",Cf({},r,{dominantBaseline:"central",className:mt("recharts-radial-bar-label",u)}),q.createElement("defs",null,q.createElement("path",{id:k,d:N})),q.createElement("textPath",{xlinkHref:"#".concat(k)},n))},Ude=function(t){var n=t.viewBox,r=t.offset,a=t.position,o=n,l=o.cx,u=o.cy,f=o.innerRadius,d=o.outerRadius,m=o.startAngle,p=o.endAngle,g=(m+p)/2;if(a==="outside"){var x=Bn(l,u,d+r,g),A=x.x,S=x.y;return{x:A,y:S,textAnchor:A>=l?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:l,y:u,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:l,y:u,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:l,y:u,textAnchor:"middle",verticalAnchor:"end"};var w=(f+d)/2,O=Bn(l,u,w,g),E=O.x,T=O.y;return{x:E,y:T,textAnchor:"middle",verticalAnchor:"middle"}},qde=function(t){var n=t.viewBox,r=t.parentViewBox,a=t.offset,o=t.position,l=n,u=l.x,f=l.y,d=l.width,m=l.height,p=m>=0?1:-1,g=p*a,x=p>0?"end":"start",A=p>0?"start":"end",S=d>=0?1:-1,w=S*a,O=S>0?"end":"start",E=S>0?"start":"end";if(o==="top"){var T={x:u+d/2,y:f-p*a,textAnchor:"middle",verticalAnchor:x};return _n(_n({},T),r?{height:Math.max(f-r.y,0),width:d}:{})}if(o==="bottom"){var C={x:u+d/2,y:f+m+g,textAnchor:"middle",verticalAnchor:A};return _n(_n({},C),r?{height:Math.max(r.y+r.height-(f+m),0),width:d}:{})}if(o==="left"){var j={x:u-w,y:f+m/2,textAnchor:O,verticalAnchor:"middle"};return _n(_n({},j),r?{width:Math.max(j.x-r.x,0),height:m}:{})}if(o==="right"){var R={x:u+d+w,y:f+m/2,textAnchor:E,verticalAnchor:"middle"};return _n(_n({},R),r?{width:Math.max(r.x+r.width-R.x,0),height:m}:{})}var N=r?{width:d,height:m}:{};return o==="insideLeft"?_n({x:u+w,y:f+m/2,textAnchor:E,verticalAnchor:"middle"},N):o==="insideRight"?_n({x:u+d-w,y:f+m/2,textAnchor:O,verticalAnchor:"middle"},N):o==="insideTop"?_n({x:u+d/2,y:f+g,textAnchor:"middle",verticalAnchor:A},N):o==="insideBottom"?_n({x:u+d/2,y:f+m-g,textAnchor:"middle",verticalAnchor:x},N):o==="insideTopLeft"?_n({x:u+w,y:f+g,textAnchor:E,verticalAnchor:A},N):o==="insideTopRight"?_n({x:u+d-w,y:f+g,textAnchor:O,verticalAnchor:A},N):o==="insideBottomLeft"?_n({x:u+w,y:f+m-g,textAnchor:E,verticalAnchor:x},N):o==="insideBottomRight"?_n({x:u+d-w,y:f+m-g,textAnchor:O,verticalAnchor:x},N):ju(o)&&(je(o.x)||cs(o.x))&&(je(o.y)||cs(o.y))?_n({x:u+js(o.x,d),y:f+js(o.y,m),textAnchor:"end",verticalAnchor:"end"},N):_n({x:u+d/2,y:f+m/2,textAnchor:"middle",verticalAnchor:"middle"},N)},Hde=function(t){return"cx"in t&&je(t.cx)};function Yn(e){var t=e.offset,n=t===void 0?5:t,r=Pde(e,jde),a=_n({offset:n},r),o=a.viewBox,l=a.position,u=a.value,f=a.children,d=a.content,m=a.className,p=m===void 0?"":m,g=a.textBreakAll;if(!o||ht(u)&&ht(f)&&!y.isValidElement(d)&&!at(d))return null;if(y.isValidElement(d))return y.cloneElement(d,a);var x;if(at(d)){if(x=y.createElement(d,a),y.isValidElement(x))return x}else x=Lde(a);var A=Hde(o),S=ut(a,!0);if(A&&(l==="insideStart"||l==="insideEnd"||l==="end"))return Bde(a,x,S);var w=A?Ude(a):qde(a);return q.createElement(Qp,Cf({className:mt("recharts-label",p)},S,w,{breakAll:g}),x)}Yn.displayName="Label";var Z6=function(t){var n=t.cx,r=t.cy,a=t.angle,o=t.startAngle,l=t.endAngle,u=t.r,f=t.radius,d=t.innerRadius,m=t.outerRadius,p=t.x,g=t.y,x=t.top,A=t.left,S=t.width,w=t.height,O=t.clockWise,E=t.labelViewBox;if(E)return E;if(je(S)&&je(w)){if(je(p)&&je(g))return{x:p,y:g,width:S,height:w};if(je(x)&&je(A))return{x,y:A,width:S,height:w}}return je(p)&&je(g)?{x:p,y:g,width:0,height:0}:je(n)&&je(r)?{cx:n,cy:r,startAngle:o||a||0,endAngle:l||a||0,innerRadius:d||0,outerRadius:m||f||u||0,clockWise:O}:t.viewBox?t.viewBox:{}},Fde=function(t,n){return t?t===!0?q.createElement(Yn,{key:"label-implicit",viewBox:n}):An(t)?q.createElement(Yn,{key:"label-implicit",viewBox:n,value:t}):y.isValidElement(t)?t.type===Yn?y.cloneElement(t,{key:"label-implicit",viewBox:n}):q.createElement(Yn,{key:"label-implicit",content:t,viewBox:n}):at(t)?q.createElement(Yn,{key:"label-implicit",content:t,viewBox:n}):ju(t)?q.createElement(Yn,Cf({viewBox:n},t,{key:"label-implicit"})):null:null},Vde=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var a=t.children,o=Z6(t),l=Oa(a,Yn).map(function(f,d){return y.cloneElement(f,{viewBox:n||o,key:"label-".concat(d)})});if(!r)return l;var u=Fde(t.label,n||o);return[u].concat(Tde(l))};Yn.parseViewBox=Z6;Yn.renderCallByParent=Vde;var a1,jk;function Gde(){if(jk)return a1;jk=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return a1=e,a1}var Wde=Gde();const Zde=kt(Wde);function Rf(e){"@babel/helpers - typeof";return Rf=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},Rf(e)}var Yde=["valueAccessor"],Kde=["data","dataKey","clockWise","id","textBreakAll"];function Xde(e){return the(e)||ehe(e)||Jde(e)||Qde()}function Qde(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
448
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jde(e,t){if(e){if(typeof e=="string")return YS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return YS(e,t)}}function ehe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function the(e){if(Array.isArray(e))return YS(e)}function YS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mm(){return mm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mm.apply(this,arguments)}function Tk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ck(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Tk(Object(n),!0).forEach(function(r){nhe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nhe(e,t,n){return t=rhe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rhe(e){var t=ahe(e,"string");return Rf(t)=="symbol"?t:t+""}function ahe(e,t){if(Rf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rk(e,t){if(e==null)return{};var n=ihe(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ihe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var ohe=function(t){return Array.isArray(t.value)?Zde(t.value):t.value};function wo(e){var t=e.valueAccessor,n=t===void 0?ohe:t,r=Rk(e,Yde),a=r.data,o=r.dataKey,l=r.clockWise,u=r.id,f=r.textBreakAll,d=Rk(r,Kde);return!a||!a.length?null:q.createElement(Jt,{className:"recharts-label-list"},a.map(function(m,p){var g=ht(o)?n(m,p):Mr(m&&m.payload,o),x=ht(u)?{}:{id:"".concat(u,"-").concat(p)};return q.createElement(Yn,mm({},ut(m,!0),d,x,{parentViewBox:m.parentViewBox,value:g,textBreakAll:f,viewBox:Yn.parseViewBox(ht(l)?m:Ck(Ck({},m),{},{clockWise:l})),key:"label-".concat(p),index:p}))}))}wo.displayName="LabelList";function she(e,t){return e?e===!0?q.createElement(wo,{key:"labelList-implicit",data:t}):q.isValidElement(e)||at(e)?q.createElement(wo,{key:"labelList-implicit",data:t,content:e}):ju(e)?q.createElement(wo,mm({data:t},e,{key:"labelList-implicit"})):null:null}function lhe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,a=Oa(r,wo).map(function(l,u){return y.cloneElement(l,{data:t,key:"labelList-".concat(u)})});if(!n)return a;var o=she(e.label,t);return[o].concat(Xde(a))}wo.renderCallByParent=lhe;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)}function KS(){return KS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},KS.apply(this,arguments)}function Nk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Mk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nk(Object(n),!0).forEach(function(r){uhe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uhe(e,t,n){return t=che(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function che(e){var t=fhe(e,"string");return Nf(t)=="symbol"?t:t+""}function fhe(e,t){if(Nf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dhe=function(t,n){var r=wa(n-t),a=Math.min(Math.abs(n-t),359.999);return r*a},Qh=function(t){var n=t.cx,r=t.cy,a=t.radius,o=t.angle,l=t.sign,u=t.isExternal,f=t.cornerRadius,d=t.cornerIsExternal,m=f*(u?1:-1)+a,p=Math.asin(f/m)/pm,g=d?o:o+l*p,x=Bn(n,r,m,g),A=Bn(n,r,a,g),S=d?o-l*p:o,w=Bn(n,r,m*Math.cos(p*pm),S);return{center:x,circleTangency:A,lineTangency:w,theta:p}},Y6=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,o=t.outerRadius,l=t.startAngle,u=t.endAngle,f=dhe(l,u),d=l+f,m=Bn(n,r,o,l),p=Bn(n,r,o,d),g="M ".concat(m.x,",").concat(m.y,`
449
- A `).concat(o,",").concat(o,`,0,
450
- `).concat(+(Math.abs(f)>180),",").concat(+(l>d),`,
451
- `).concat(p.x,",").concat(p.y,`
452
- `);if(a>0){var x=Bn(n,r,a,l),A=Bn(n,r,a,d);g+="L ".concat(A.x,",").concat(A.y,`
453
- A `).concat(a,",").concat(a,`,0,
454
- `).concat(+(Math.abs(f)>180),",").concat(+(l<=d),`,
455
- `).concat(x.x,",").concat(x.y," Z")}else g+="L ".concat(n,",").concat(r," Z");return g},hhe=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,o=t.outerRadius,l=t.cornerRadius,u=t.forceCornerRadius,f=t.cornerIsExternal,d=t.startAngle,m=t.endAngle,p=wa(m-d),g=Qh({cx:n,cy:r,radius:o,angle:d,sign:p,cornerRadius:l,cornerIsExternal:f}),x=g.circleTangency,A=g.lineTangency,S=g.theta,w=Qh({cx:n,cy:r,radius:o,angle:m,sign:-p,cornerRadius:l,cornerIsExternal:f}),O=w.circleTangency,E=w.lineTangency,T=w.theta,C=f?Math.abs(d-m):Math.abs(d-m)-S-T;if(C<0)return u?"M ".concat(A.x,",").concat(A.y,`
456
- a`).concat(l,",").concat(l,",0,0,1,").concat(l*2,`,0
457
- a`).concat(l,",").concat(l,",0,0,1,").concat(-l*2,`,0
458
- `):Y6({cx:n,cy:r,innerRadius:a,outerRadius:o,startAngle:d,endAngle:m});var j="M ".concat(A.x,",").concat(A.y,`
459
- A`).concat(l,",").concat(l,",0,0,").concat(+(p<0),",").concat(x.x,",").concat(x.y,`
460
- A`).concat(o,",").concat(o,",0,").concat(+(C>180),",").concat(+(p<0),",").concat(O.x,",").concat(O.y,`
461
- A`).concat(l,",").concat(l,",0,0,").concat(+(p<0),",").concat(E.x,",").concat(E.y,`
462
- `);if(a>0){var R=Qh({cx:n,cy:r,radius:a,angle:d,sign:p,isExternal:!0,cornerRadius:l,cornerIsExternal:f}),N=R.circleTangency,k=R.lineTangency,$=R.theta,V=Qh({cx:n,cy:r,radius:a,angle:m,sign:-p,isExternal:!0,cornerRadius:l,cornerIsExternal:f}),I=V.circleTangency,L=V.lineTangency,H=V.theta,W=f?Math.abs(d-m):Math.abs(d-m)-$-H;if(W<0&&l===0)return"".concat(j,"L").concat(n,",").concat(r,"Z");j+="L".concat(L.x,",").concat(L.y,`
463
- A`).concat(l,",").concat(l,",0,0,").concat(+(p<0),",").concat(I.x,",").concat(I.y,`
464
- A`).concat(a,",").concat(a,",0,").concat(+(W>180),",").concat(+(p>0),",").concat(N.x,",").concat(N.y,`
465
- A`).concat(l,",").concat(l,",0,0,").concat(+(p<0),",").concat(k.x,",").concat(k.y,"Z")}else j+="L".concat(n,",").concat(r,"Z");return j},phe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},K6=function(t){var n=Mk(Mk({},phe),t),r=n.cx,a=n.cy,o=n.innerRadius,l=n.outerRadius,u=n.cornerRadius,f=n.forceCornerRadius,d=n.cornerIsExternal,m=n.startAngle,p=n.endAngle,g=n.className;if(l<o||m===p)return null;var x=mt("recharts-sector",g),A=l-o,S=js(u,A,0,!0),w;return S>0&&Math.abs(m-p)<360?w=hhe({cx:r,cy:a,innerRadius:o,outerRadius:l,cornerRadius:Math.min(S,A/2),forceCornerRadius:f,cornerIsExternal:d,startAngle:m,endAngle:p}):w=Y6({cx:r,cy:a,innerRadius:o,outerRadius:l,startAngle:m,endAngle:p}),q.createElement("path",KS({},ut(n,!0),{className:x,d:w,role:"img"}))};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 XS(){return XS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},XS.apply(this,arguments)}function Pk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Dk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Pk(Object(n),!0).forEach(function(r){mhe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mhe(e,t,n){return t=vhe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vhe(e){var t=ghe(e,"string");return Mf(t)=="symbol"?t:t+""}function ghe(e,t){if(Mf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kk={curveBasisClosed:$ae,curveBasisOpen:zae,curveBasis:kae,curveBumpX:wae,curveBumpY:Sae,curveLinearClosed:Lae,curveLinear:Rv,curveMonotoneX:Iae,curveMonotoneY:Bae,curveNatural:Uae,curveStep:qae,curveStepAfter:Fae,curveStepBefore:Hae},Jh=function(t){return t.x===+t.x&&t.y===+t.y},$c=function(t){return t.x},zc=function(t){return t.y},yhe=function(t,n){if(at(t))return t;var r="curve".concat(Tv(t));return(r==="curveMonotone"||r==="curveBump")&&n?kk["".concat(r).concat(n==="vertical"?"Y":"X")]:kk[r]||Rv},bhe=function(t){var n=t.type,r=n===void 0?"linear":n,a=t.points,o=a===void 0?[]:a,l=t.baseLine,u=t.layout,f=t.connectNulls,d=f===void 0?!1:f,m=yhe(r,u),p=d?o.filter(function(S){return Jh(S)}):o,g;if(Array.isArray(l)){var x=d?l.filter(function(S){return Jh(S)}):l,A=p.map(function(S,w){return Dk(Dk({},S),{},{base:x[w]})});return u==="vertical"?g=Fh().y(zc).x1($c).x0(function(S){return S.base.x}):g=Fh().x($c).y1(zc).y0(function(S){return S.base.y}),g.defined(Jh).curve(m),g(A)}return u==="vertical"&&je(l)?g=Fh().y(zc).x1($c).x0(l):je(l)?g=Fh().x($c).y1(zc).y0(l):g=tB().x($c).y(zc),g.defined(Jh).curve(m),g(p)},ef=function(t){var n=t.className,r=t.points,a=t.path,o=t.pathRef;if((!r||!r.length)&&!a)return null;var l=r&&r.length?bhe(t):a;return y.createElement("path",XS({},ut(t,!1),Bp(t),{className:mt("recharts-curve",n),d:l,ref:o}))},i1={exports:{}},o1,$k;function xhe(){if($k)return o1;$k=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return o1=e,o1}var s1,zk;function whe(){if(zk)return s1;zk=1;var e=xhe();function t(){}function n(){}return n.resetWarningCache=t,s1=function(){function r(l,u,f,d,m,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}}r.isRequired=r;function a(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},s1}var Lk;function She(){return Lk||(Lk=1,i1.exports=whe()()),i1.exports}var _he=She();const At=kt(_he),{getOwnPropertyNames:Ahe,getOwnPropertySymbols:Ohe}=Object,{hasOwnProperty:Ehe}=Object.prototype;function l1(e,t){return function(r,a,o){return e(r,a,o)&&t(r,a,o)}}function ep(e){return function(n,r,a){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,a);const{cache:o}=a,l=o.get(n),u=o.get(r);if(l&&u)return l===r&&u===n;o.set(n,r),o.set(r,n);const f=e(n,r,a);return o.delete(n),o.delete(r),f}}function jhe(e){return e!=null?e[Symbol.toStringTag]:void 0}function Ik(e){return Ahe(e).concat(Ohe(e))}const The=Object.hasOwn||((e,t)=>Ehe.call(e,t));function Ls(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const Che="__v",Rhe="__o",Nhe="_owner",{getOwnPropertyDescriptor:Bk,keys:Uk}=Object;function Mhe(e,t){return e.byteLength===t.byteLength&&vm(new Uint8Array(e),new Uint8Array(t))}function Phe(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function Dhe(e,t){return e.byteLength===t.byteLength&&vm(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function khe(e,t){return Ls(e.getTime(),t.getTime())}function $he(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function zhe(e,t){return e===t}function qk(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const a=new Array(r),o=e.entries();let l,u,f=0;for(;(l=o.next())&&!l.done;){const d=t.entries();let m=!1,p=0;for(;(u=d.next())&&!u.done;){if(a[p]){p++;continue}const g=l.value,x=u.value;if(n.equals(g[0],x[0],f,p,e,t,n)&&n.equals(g[1],x[1],g[0],x[0],e,t,n)){m=a[p]=!0;break}p++}if(!m)return!1;f++}return!0}const Lhe=Ls;function Ihe(e,t,n){const r=Uk(e);let a=r.length;if(Uk(t).length!==a)return!1;for(;a-- >0;)if(!X6(e,t,n,r[a]))return!1;return!0}function Lc(e,t,n){const r=Ik(e);let a=r.length;if(Ik(t).length!==a)return!1;let o,l,u;for(;a-- >0;)if(o=r[a],!X6(e,t,n,o)||(l=Bk(e,o),u=Bk(t,o),(l||u)&&(!l||!u||l.configurable!==u.configurable||l.enumerable!==u.enumerable||l.writable!==u.writable)))return!1;return!0}function Bhe(e,t){return Ls(e.valueOf(),t.valueOf())}function Uhe(e,t){return e.source===t.source&&e.flags===t.flags}function Hk(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const a=new Array(r),o=e.values();let l,u;for(;(l=o.next())&&!l.done;){const f=t.values();let d=!1,m=0;for(;(u=f.next())&&!u.done;){if(!a[m]&&n.equals(l.value,u.value,l.value,u.value,e,t,n)){d=a[m]=!0;break}m++}if(!d)return!1}return!0}function vm(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function qhe(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 X6(e,t,n,r){return(r===Nhe||r===Rhe||r===Che)&&(e.$$typeof||t.$$typeof)?!0:The(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const Hhe="[object ArrayBuffer]",Fhe="[object Arguments]",Vhe="[object Boolean]",Ghe="[object DataView]",Whe="[object Date]",Zhe="[object Error]",Yhe="[object Map]",Khe="[object Number]",Xhe="[object Object]",Qhe="[object RegExp]",Jhe="[object Set]",epe="[object String]",tpe={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},npe="[object URL]",rpe=Object.prototype.toString;function ape({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:a,areFunctionsEqual:o,areMapsEqual:l,areNumbersEqual:u,areObjectsEqual:f,arePrimitiveWrappersEqual:d,areRegExpsEqual:m,areSetsEqual:p,areTypedArraysEqual:g,areUrlsEqual:x,unknownTagComparators:A}){return function(w,O,E){if(w===O)return!0;if(w==null||O==null)return!1;const T=typeof w;if(T!==typeof O)return!1;if(T!=="object")return T==="number"?u(w,O,E):T==="function"?o(w,O,E):!1;const C=w.constructor;if(C!==O.constructor)return!1;if(C===Object)return f(w,O,E);if(Array.isArray(w))return t(w,O,E);if(C===Date)return r(w,O,E);if(C===RegExp)return m(w,O,E);if(C===Map)return l(w,O,E);if(C===Set)return p(w,O,E);const j=rpe.call(w);if(j===Whe)return r(w,O,E);if(j===Qhe)return m(w,O,E);if(j===Yhe)return l(w,O,E);if(j===Jhe)return p(w,O,E);if(j===Xhe)return typeof w.then!="function"&&typeof O.then!="function"&&f(w,O,E);if(j===npe)return x(w,O,E);if(j===Zhe)return a(w,O,E);if(j===Fhe)return f(w,O,E);if(tpe[j])return g(w,O,E);if(j===Hhe)return e(w,O,E);if(j===Ghe)return n(w,O,E);if(j===Vhe||j===Khe||j===epe)return d(w,O,E);if(A){let R=A[j];if(!R){const N=jhe(w);N&&(R=A[N])}if(R)return R(w,O,E)}return!1}}function ipe({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:Mhe,areArraysEqual:n?Lc:Phe,areDataViewsEqual:Dhe,areDatesEqual:khe,areErrorsEqual:$he,areFunctionsEqual:zhe,areMapsEqual:n?l1(qk,Lc):qk,areNumbersEqual:Lhe,areObjectsEqual:n?Lc:Ihe,arePrimitiveWrappersEqual:Bhe,areRegExpsEqual:Uhe,areSetsEqual:n?l1(Hk,Lc):Hk,areTypedArraysEqual:n?l1(vm,Lc):vm,areUrlsEqual:qhe,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const a=ep(r.areArraysEqual),o=ep(r.areMapsEqual),l=ep(r.areObjectsEqual),u=ep(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:u})}return r}function ope(e){return function(t,n,r,a,o,l,u){return e(t,n,u)}}function spe({circular:e,comparator:t,createState:n,equals:r,strict:a}){if(n)return function(u,f){const{cache:d=e?new WeakMap:void 0,meta:m}=n();return t(u,f,{cache:d,equals:r,meta:m,strict:a})};if(e)return function(u,f){return t(u,f,{cache:new WeakMap,equals:r,meta:void 0,strict:a})};const o={cache:void 0,equals:r,meta:void 0,strict:a};return function(u,f){return t(u,f,o)}}const lpe=zo();zo({strict:!0});zo({circular:!0});zo({circular:!0,strict:!0});zo({createInternalComparator:()=>Ls});zo({strict:!0,createInternalComparator:()=>Ls});zo({circular:!0,createInternalComparator:()=>Ls});zo({circular:!0,createInternalComparator:()=>Ls,strict:!0});function zo(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:a=!1}=e,o=ipe(e),l=ape(o),u=n?n(l):ope(l);return spe({circular:t,comparator:l,createState:r,equals:u,strict:a})}function upe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function Fk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function a(o){n<0&&(n=o),o-n>t?(e(o),n=-1):upe(a)};requestAnimationFrame(r)}function QS(e){"@babel/helpers - typeof";return QS=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},QS(e)}function cpe(e){return ppe(e)||hpe(e)||dpe(e)||fpe()}function fpe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
466
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dpe(e,t){if(e){if(typeof e=="string")return Vk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vk(e,t)}}function Vk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hpe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ppe(e){if(Array.isArray(e))return e}function mpe(){var e={},t=function(){return null},n=!1,r=function a(o){if(!n){if(Array.isArray(o)){if(!o.length)return;var l=o,u=cpe(l),f=u[0],d=u.slice(1);if(typeof f=="number"){Fk(a.bind(null,d),f);return}a(f),Fk(a.bind(null,d));return}QS(o)==="object"&&(e=o,t(e)),typeof o=="function"&&o()}};return{stop:function(){n=!0},start:function(o){n=!1,r(o)},subscribe:function(o){return t=o,function(){t=function(){return null}}}}}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 Gk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Wk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gk(Object(n),!0).forEach(function(r){Q6(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Q6(e,t,n){return t=vpe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vpe(e){var t=gpe(e,"string");return Pf(t)==="symbol"?t:String(t)}function gpe(e,t){if(Pf(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pf(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ype=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,a){return r.filter(function(o){return a.includes(o)})})},bpe=function(t){return t},xpe=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},tf=function(t,n){return Object.keys(n).reduce(function(r,a){return Wk(Wk({},r),{},Q6({},a,t(a,n[a])))},{})},Zk=function(t,n,r){return t.map(function(a){return"".concat(xpe(a)," ").concat(n,"ms ").concat(r)}).join(",")};function wpe(e,t){return Ape(e)||_pe(e,t)||J6(e,t)||Spe()}function Spe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
467
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _pe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return u}}function Ape(e){if(Array.isArray(e))return e}function Ope(e){return Tpe(e)||jpe(e)||J6(e)||Epe()}function Epe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
468
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J6(e,t){if(e){if(typeof e=="string")return JS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return JS(e,t)}}function jpe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Tpe(e){if(Array.isArray(e))return JS(e)}function JS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var gm=1e-4,eU=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},tU=function(t,n){return t.map(function(r,a){return r*Math.pow(n,a)}).reduce(function(r,a){return r+a})},Yk=function(t,n){return function(r){var a=eU(t,n);return tU(a,r)}},Cpe=function(t,n){return function(r){var a=eU(t,n),o=[].concat(Ope(a.map(function(l,u){return l*u}).slice(1)),[0]);return tU(o,r)}},Kk=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0],o=n[1],l=n[2],u=n[3];if(n.length===1)switch(n[0]){case"linear":a=0,o=0,l=1,u=1;break;case"ease":a=.25,o=.1,l=.25,u=1;break;case"ease-in":a=.42,o=0,l=1,u=1;break;case"ease-out":a=.42,o=0,l=.58,u=1;break;case"ease-in-out":a=0,o=0,l=.58,u=1;break;default:{var f=n[0].split("(");if(f[0]==="cubic-bezier"&&f[1].split(")")[0].split(",").length===4){var d=f[1].split(")")[0].split(",").map(function(w){return parseFloat(w)}),m=wpe(d,4);a=m[0],o=m[1],l=m[2],u=m[3]}}}var p=Yk(a,l),g=Yk(o,u),x=Cpe(a,l),A=function(O){return O>1?1:O<0?0:O},S=function(O){for(var E=O>1?1:O,T=E,C=0;C<8;++C){var j=p(T)-E,R=x(T);if(Math.abs(j-E)<gm||R<gm)return g(T);T=A(T-j/R)}return g(T)};return S.isStepper=!1,S},Rpe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,a=t.damping,o=a===void 0?8:a,l=t.dt,u=l===void 0?17:l,f=function(m,p,g){var x=-(m-p)*r,A=g*o,S=g+(x-A)*u/1e3,w=g*u/1e3+m;return Math.abs(w-p)<gm&&Math.abs(S)<gm?[p,0]:[w,S]};return f.isStepper=!0,f.dt=u,f},Npe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Kk(a);case"spring":return Rpe();default:if(a.split("(")[0]==="cubic-bezier")return Kk(a)}return typeof a=="function"?a:null};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 Xk(e){return Dpe(e)||Ppe(e)||nU(e)||Mpe()}function Mpe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
469
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ppe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Dpe(e){if(Array.isArray(e))return t_(e)}function Qk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ln(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qk(Object(n),!0).forEach(function(r){e_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function e_(e,t,n){return t=kpe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kpe(e){var t=$pe(e,"string");return Df(t)==="symbol"?t:String(t)}function $pe(e,t){if(Df(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Df(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zpe(e,t){return Bpe(e)||Ipe(e,t)||nU(e,t)||Lpe()}function Lpe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
470
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nU(e,t){if(e){if(typeof e=="string")return t_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t_(e,t)}}function t_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ipe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return u}}function Bpe(e){if(Array.isArray(e))return e}var ym=function(t,n,r){return t+(n-t)*r},n_=function(t){var n=t.from,r=t.to;return n!==r},Upe=function e(t,n,r){var a=tf(function(o,l){if(n_(l)){var u=t(l.from,l.to,l.velocity),f=zpe(u,2),d=f[0],m=f[1];return Ln(Ln({},l),{},{from:d,velocity:m})}return l},n);return r<1?tf(function(o,l){return n_(l)?Ln(Ln({},l),{},{velocity:ym(l.velocity,a[o].velocity,r),from:ym(l.from,a[o].from,r)}):l},n):e(t,a,r-1)};const qpe=(function(e,t,n,r,a){var o=ype(e,t),l=o.reduce(function(w,O){return Ln(Ln({},w),{},e_({},O,[e[O],t[O]]))},{}),u=o.reduce(function(w,O){return Ln(Ln({},w),{},e_({},O,{from:e[O],velocity:0,to:t[O]}))},{}),f=-1,d,m,p=function(){return null},g=function(){return tf(function(O,E){return E.from},u)},x=function(){return!Object.values(u).filter(n_).length},A=function(O){d||(d=O);var E=O-d,T=E/n.dt;u=Upe(n,u,T),a(Ln(Ln(Ln({},e),t),g())),d=O,x()||(f=requestAnimationFrame(p))},S=function(O){m||(m=O);var E=(O-m)/r,T=tf(function(j,R){return ym.apply(void 0,Xk(R).concat([n(E)]))},l);if(a(Ln(Ln(Ln({},e),t),T)),E<1)f=requestAnimationFrame(p);else{var C=tf(function(j,R){return ym.apply(void 0,Xk(R).concat([n(1)]))},l);a(Ln(Ln(Ln({},e),t),C))}};return p=n.isStepper?A:S,function(){return requestAnimationFrame(p),function(){cancelAnimationFrame(f)}}});function ru(e){"@babel/helpers - typeof";return ru=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},ru(e)}var Hpe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Fpe(e,t){if(e==null)return{};var n=Vpe(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vpe(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,o;for(o=0;o<r.length;o++)a=r[o],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function u1(e){return Ype(e)||Zpe(e)||Wpe(e)||Gpe()}function Gpe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
471
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wpe(e,t){if(e){if(typeof e=="string")return r_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r_(e,t)}}function Zpe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ype(e){if(Array.isArray(e))return r_(e)}function r_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function pa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jk(Object(n),!0).forEach(function(r){Wc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wc(e,t,n){return t=rU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kpe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xpe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rU(r.key),r)}}function Qpe(e,t,n){return t&&Xpe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function rU(e){var t=Jpe(e,"string");return ru(t)==="symbol"?t:String(t)}function Jpe(e,t){if(ru(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ru(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eme(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&&a_(e,t)}function a_(e,t){return a_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},a_(e,t)}function tme(e){var t=nme();return function(){var r=bm(e),a;if(t){var o=bm(this).constructor;a=Reflect.construct(r,arguments,o)}else a=r.apply(this,arguments);return i_(this,a)}}function i_(e,t){if(t&&(ru(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return o_(e)}function o_(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nme(){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 bm(e){return bm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bm(e)}var Pi=(function(e){eme(n,e);var t=tme(n);function n(r,a){var o;Kpe(this,n),o=t.call(this,r,a);var l=o.props,u=l.isActive,f=l.attributeName,d=l.from,m=l.to,p=l.steps,g=l.children,x=l.duration;if(o.handleStyleChange=o.handleStyleChange.bind(o_(o)),o.changeStyle=o.changeStyle.bind(o_(o)),!u||x<=0)return o.state={style:{}},typeof g=="function"&&(o.state={style:m}),i_(o);if(p&&p.length)o.state={style:p[0].style};else if(d){if(typeof g=="function")return o.state={style:d},i_(o);o.state={style:f?Wc({},f,d):d}}else o.state={style:{}};return o}return Qpe(n,[{key:"componentDidMount",value:function(){var a=this.props,o=a.isActive,l=a.canBegin;this.mounted=!0,!(!o||!l)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var o=this.props,l=o.isActive,u=o.canBegin,f=o.attributeName,d=o.shouldReAnimate,m=o.to,p=o.from,g=this.state.style;if(u){if(!l){var x={style:f?Wc({},f,m):m};this.state&&g&&(f&&g[f]!==m||!f&&g!==m)&&this.setState(x);return}if(!(lpe(a.to,m)&&a.canBegin&&a.isActive)){var A=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var S=A||d?p:a.to;if(this.state&&g){var w={style:f?Wc({},f,S):S};(f&&g[f]!==S||!f&&g!==S)&&this.setState(w)}this.runAnimation(pa(pa({},this.props),{},{from:S,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var o=this,l=a.from,u=a.to,f=a.duration,d=a.easing,m=a.begin,p=a.onAnimationEnd,g=a.onAnimationStart,x=qpe(l,u,Npe(d),f,this.changeStyle),A=function(){o.stopJSAnimation=x()};this.manager.start([g,m,A,f,p])}},{key:"runStepAnimation",value:function(a){var o=this,l=a.steps,u=a.begin,f=a.onAnimationStart,d=l[0],m=d.style,p=d.duration,g=p===void 0?0:p,x=function(S,w,O){if(O===0)return S;var E=w.duration,T=w.easing,C=T===void 0?"ease":T,j=w.style,R=w.properties,N=w.onAnimationEnd,k=O>0?l[O-1]:w,$=R||Object.keys(j);if(typeof C=="function"||C==="spring")return[].concat(u1(S),[o.runJSAnimation.bind(o,{from:k.style,to:j,duration:E,easing:C}),E]);var V=Zk($,E,C),I=pa(pa(pa({},k.style),j),{},{transition:V});return[].concat(u1(S),[I,E,N]).filter(bpe)};return this.manager.start([f].concat(u1(l.reduce(x,[m,Math.max(g,u)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=mpe());var o=a.begin,l=a.duration,u=a.attributeName,f=a.to,d=a.easing,m=a.onAnimationStart,p=a.onAnimationEnd,g=a.steps,x=a.children,A=this.manager;if(this.unSubscribe=A.subscribe(this.handleStyleChange),typeof d=="function"||typeof x=="function"||d==="spring"){this.runJSAnimation(a);return}if(g.length>1){this.runStepAnimation(a);return}var S=u?Wc({},u,f):f,w=Zk(Object.keys(S),l,d);A.start([m,o,pa(pa({},S),{},{transition:w}),l,p])}},{key:"render",value:function(){var a=this.props,o=a.children;a.begin;var l=a.duration;a.attributeName,a.easing;var u=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var f=Fpe(a,Hpe),d=y.Children.count(o),m=this.state.style;if(typeof o=="function")return o(m);if(!u||d===0||l<=0)return o;var p=function(x){var A=x.props,S=A.style,w=S===void 0?{}:S,O=A.className,E=y.cloneElement(x,pa(pa({},f),{},{style:pa(pa({},w),m),className:O}));return E};return d===1?p(y.Children.only(o)):q.createElement("div",null,y.Children.map(o,function(g){return p(g)}))}}]),n})(y.PureComponent);Pi.displayName="Animate";Pi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Pi.propTypes={from:At.oneOfType([At.object,At.string]),to:At.oneOfType([At.object,At.string]),attributeName:At.string,duration:At.number,begin:At.number,easing:At.oneOfType([At.string,At.func]),steps:At.arrayOf(At.shape({duration:At.number.isRequired,style:At.object.isRequired,easing:At.oneOfType([At.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),At.func]),properties:At.arrayOf("string"),onAnimationEnd:At.func})),children:At.oneOfType([At.node,At.func]),isActive:At.bool,canBegin:At.bool,onAnimationEnd:At.func,shouldReAnimate:At.bool,onAnimationStart:At.func,onAnimationReStart:At.func};function kf(e){"@babel/helpers - typeof";return kf=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},kf(e)}function xm(){return xm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xm.apply(this,arguments)}function rme(e,t){return sme(e)||ome(e,t)||ime(e,t)||ame()}function ame(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
472
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ime(e,t){if(e){if(typeof e=="string")return e$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e$(e,t)}}function e$(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ome(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return u}}function sme(e){if(Array.isArray(e))return e}function t$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function n$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?t$(Object(n),!0).forEach(function(r){lme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lme(e,t,n){return t=ume(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ume(e){var t=cme(e,"string");return kf(t)=="symbol"?t:t+""}function cme(e,t){if(kf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(kf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var r$=function(t,n,r,a,o){var l=Math.min(Math.abs(r)/2,Math.abs(a)/2),u=a>=0?1:-1,f=r>=0?1:-1,d=a>=0&&r>=0||a<0&&r<0?1:0,m;if(l>0&&o instanceof Array){for(var p=[0,0,0,0],g=0,x=4;g<x;g++)p[g]=o[g]>l?l:o[g];m="M".concat(t,",").concat(n+u*p[0]),p[0]>0&&(m+="A ".concat(p[0],",").concat(p[0],",0,0,").concat(d,",").concat(t+f*p[0],",").concat(n)),m+="L ".concat(t+r-f*p[1],",").concat(n),p[1]>0&&(m+="A ".concat(p[1],",").concat(p[1],",0,0,").concat(d,`,
473
- `).concat(t+r,",").concat(n+u*p[1])),m+="L ".concat(t+r,",").concat(n+a-u*p[2]),p[2]>0&&(m+="A ".concat(p[2],",").concat(p[2],",0,0,").concat(d,`,
474
- `).concat(t+r-f*p[2],",").concat(n+a)),m+="L ".concat(t+f*p[3],",").concat(n+a),p[3]>0&&(m+="A ".concat(p[3],",").concat(p[3],",0,0,").concat(d,`,
475
- `).concat(t,",").concat(n+a-u*p[3])),m+="Z"}else if(l>0&&o===+o&&o>0){var A=Math.min(l,o);m="M ".concat(t,",").concat(n+u*A,`
476
- A `).concat(A,",").concat(A,",0,0,").concat(d,",").concat(t+f*A,",").concat(n,`
477
- L `).concat(t+r-f*A,",").concat(n,`
478
- A `).concat(A,",").concat(A,",0,0,").concat(d,",").concat(t+r,",").concat(n+u*A,`
479
- L `).concat(t+r,",").concat(n+a-u*A,`
480
- A `).concat(A,",").concat(A,",0,0,").concat(d,",").concat(t+r-f*A,",").concat(n+a,`
481
- L `).concat(t+f*A,",").concat(n+a,`
482
- A `).concat(A,",").concat(A,",0,0,").concat(d,",").concat(t,",").concat(n+a-u*A," Z")}else m="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(a," h ").concat(-r," Z");return m},fme=function(t,n){if(!t||!n)return!1;var r=t.x,a=t.y,o=n.x,l=n.y,u=n.width,f=n.height;if(Math.abs(u)>0&&Math.abs(f)>0){var d=Math.min(o,o+u),m=Math.max(o,o+u),p=Math.min(l,l+f),g=Math.max(l,l+f);return r>=d&&r<=m&&a>=p&&a<=g}return!1},dme={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},HO=function(t){var n=n$(n$({},dme),t),r=y.useRef(),a=y.useState(-1),o=rme(a,2),l=o[0],u=o[1];y.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var C=r.current.getTotalLength();C&&u(C)}catch{}},[]);var f=n.x,d=n.y,m=n.width,p=n.height,g=n.radius,x=n.className,A=n.animationEasing,S=n.animationDuration,w=n.animationBegin,O=n.isAnimationActive,E=n.isUpdateAnimationActive;if(f!==+f||d!==+d||m!==+m||p!==+p||m===0||p===0)return null;var T=mt("recharts-rectangle",x);return E?q.createElement(Pi,{canBegin:l>0,from:{width:m,height:p,x:f,y:d},to:{width:m,height:p,x:f,y:d},duration:S,animationEasing:A,isActive:E},function(C){var j=C.width,R=C.height,N=C.x,k=C.y;return q.createElement(Pi,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:S,isActive:O,easing:A},q.createElement("path",xm({},ut(n,!0),{className:T,d:r$(N,k,j,R,g),ref:r})))}):q.createElement("path",xm({},ut(n,!0),{className:T,d:r$(f,d,m,p,g)}))};function s_(){return s_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s_.apply(this,arguments)}var FO=function(t){var n=t.cx,r=t.cy,a=t.r,o=t.className,l=mt("recharts-dot",o);return n===+n&&r===+r&&a===+a?y.createElement("circle",s_({},ut(t,!1),Bp(t),{className:l,cx:n,cy:r,r:a})):null};function $f(e){"@babel/helpers - typeof";return $f=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},$f(e)}var hme=["x","y","top","left","width","height","className"];function l_(){return l_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l_.apply(this,arguments)}function a$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function pme(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a$(Object(n),!0).forEach(function(r){mme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mme(e,t,n){return t=vme(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vme(e){var t=gme(e,"string");return $f(t)=="symbol"?t:t+""}function gme(e,t){if($f(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($f(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yme(e,t){if(e==null)return{};var n=bme(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bme(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var xme=function(t,n,r,a,o,l){return"M".concat(t,",").concat(o,"v").concat(a,"M").concat(l,",").concat(n,"h").concat(r)},wme=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,o=a===void 0?0:a,l=t.top,u=l===void 0?0:l,f=t.left,d=f===void 0?0:f,m=t.width,p=m===void 0?0:m,g=t.height,x=g===void 0?0:g,A=t.className,S=yme(t,hme),w=pme({x:r,y:o,top:u,left:d,width:p,height:x},S);return!je(r)||!je(o)||!je(p)||!je(x)||!je(u)||!je(d)?null:q.createElement("path",l_({},ut(w,!0),{className:mt("recharts-cross",A),d:xme(r,o,p,x,u,d)}))},c1,i$;function Sme(){if(i$)return c1;i$=1;var e=AB(),t=e(Object.getPrototypeOf,Object);return c1=t,c1}var f1,o$;function _me(){if(o$)return f1;o$=1;var e=ki(),t=Sme(),n=$i(),r="[object Object]",a=Function.prototype,o=Object.prototype,l=a.toString,u=o.hasOwnProperty,f=l.call(Object);function d(m){if(!n(m)||e(m)!=r)return!1;var p=t(m);if(p===null)return!0;var g=u.call(p,"constructor")&&p.constructor;return typeof g=="function"&&g instanceof g&&l.call(g)==f}return f1=d,f1}var Ame=_me();const Ome=kt(Ame);var d1,s$;function Eme(){if(s$)return d1;s$=1;var e=ki(),t=$i(),n="[object Boolean]";function r(a){return a===!0||a===!1||t(a)&&e(a)==n}return d1=r,d1}var jme=Eme();const Tme=kt(jme);function zf(e){"@babel/helpers - typeof";return zf=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},zf(e)}function wm(){return wm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wm.apply(this,arguments)}function Cme(e,t){return Pme(e)||Mme(e,t)||Nme(e,t)||Rme()}function Rme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
483
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nme(e,t){if(e){if(typeof e=="string")return l$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l$(e,t)}}function l$(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mme(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return u}}function Pme(e){if(Array.isArray(e))return e}function u$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function c$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?u$(Object(n),!0).forEach(function(r){Dme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dme(e,t,n){return t=kme(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kme(e){var t=$me(e,"string");return zf(t)=="symbol"?t:t+""}function $me(e,t){if(zf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var f$=function(t,n,r,a,o){var l=r-a,u;return u="M ".concat(t,",").concat(n),u+="L ".concat(t+r,",").concat(n),u+="L ".concat(t+r-l/2,",").concat(n+o),u+="L ".concat(t+r-l/2-a,",").concat(n+o),u+="L ".concat(t,",").concat(n," Z"),u},zme={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Lme=function(t){var n=c$(c$({},zme),t),r=y.useRef(),a=y.useState(-1),o=Cme(a,2),l=o[0],u=o[1];y.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var T=r.current.getTotalLength();T&&u(T)}catch{}},[]);var f=n.x,d=n.y,m=n.upperWidth,p=n.lowerWidth,g=n.height,x=n.className,A=n.animationEasing,S=n.animationDuration,w=n.animationBegin,O=n.isUpdateAnimationActive;if(f!==+f||d!==+d||m!==+m||p!==+p||g!==+g||m===0&&p===0||g===0)return null;var E=mt("recharts-trapezoid",x);return O?q.createElement(Pi,{canBegin:l>0,from:{upperWidth:0,lowerWidth:0,height:g,x:f,y:d},to:{upperWidth:m,lowerWidth:p,height:g,x:f,y:d},duration:S,animationEasing:A,isActive:O},function(T){var C=T.upperWidth,j=T.lowerWidth,R=T.height,N=T.x,k=T.y;return q.createElement(Pi,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:S,easing:A},q.createElement("path",wm({},ut(n,!0),{className:E,d:f$(N,k,C,j,R),ref:r})))}):q.createElement("g",null,q.createElement("path",wm({},ut(n,!0),{className:E,d:f$(f,d,m,p,g)})))},Ime=["option","shapeType","propTransformer","activeClassName","isActive"];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 Bme(e,t){if(e==null)return{};var n=Ume(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ume(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function d$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Sm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d$(Object(n),!0).forEach(function(r){qme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qme(e,t,n){return t=Hme(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hme(e){var t=Fme(e,"string");return Lf(t)=="symbol"?t:t+""}function Fme(e,t){if(Lf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vme(e,t){return Sm(Sm({},t),e)}function Gme(e,t){return e==="symbols"}function h$(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return q.createElement(HO,n);case"trapezoid":return q.createElement(Lme,n);case"sector":return q.createElement(K6,n);case"symbols":if(Gme(t))return q.createElement(lO,n);break;default:return null}}function Wme(e){return y.isValidElement(e)?e.props:e}function Zme(e){var t=e.option,n=e.shapeType,r=e.propTransformer,a=r===void 0?Vme:r,o=e.activeClassName,l=o===void 0?"recharts-active-shape":o,u=e.isActive,f=Bme(e,Ime),d;if(y.isValidElement(t))d=y.cloneElement(t,Sm(Sm({},f),Wme(t)));else if(at(t))d=t(f);else if(Ome(t)&&!Tme(t)){var m=a(t,f);d=q.createElement(h$,{shapeType:n,elementProps:m})}else{var p=f;d=q.createElement(h$,{shapeType:n,elementProps:p})}return u?q.createElement(Jt,{className:l},d):d}function Vv(e,t){return t!=null&&"trapezoids"in e.props}function Gv(e,t){return t!=null&&"sectors"in e.props}function If(e,t){return t!=null&&"points"in e.props}function Yme(e,t){var n,r,a=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,o=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return a&&o}function Kme(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function Xme(e,t){var n=e.x===t.x,r=e.y===t.y,a=e.z===t.z;return n&&r&&a}function Qme(e,t){var n;return Vv(e,t)?n=Yme:Gv(e,t)?n=Kme:If(e,t)&&(n=Xme),n}function Jme(e,t){var n;return Vv(e,t)?n="trapezoids":Gv(e,t)?n="sectors":If(e,t)&&(n="points"),n}function eve(e,t){if(Vv(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}if(Gv(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}return If(e,t)?t.payload:{}}function tve(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,a=Jme(n,t),o=eve(n,t),l=r.filter(function(f,d){var m=Sf(o,f),p=n.props[a].filter(function(A){var S=Qme(n,t);return S(A,t)}),g=n.props[a].indexOf(p[p.length-1]),x=d===g;return m&&x}),u=r.indexOf(l[l.length-1]);return u}var h1,p$;function nve(){if(p$)return h1;p$=1;var e=Math.ceil,t=Math.max;function n(r,a,o,l){for(var u=-1,f=t(e((a-r)/(o||1)),0),d=Array(f);f--;)d[l?f:++u]=r,r+=o;return d}return h1=n,h1}var p1,m$;function aU(){if(m$)return p1;m$=1;var e=BB(),t=1/0,n=17976931348623157e292;function r(a){if(!a)return a===0?a:0;if(a=e(a),a===t||a===-t){var o=a<0?-1:1;return o*n}return a===a?a:0}return p1=r,p1}var m1,v$;function rve(){if(v$)return m1;v$=1;var e=nve(),t=Dv(),n=aU();function r(a){return function(o,l,u){return u&&typeof u!="number"&&t(o,l,u)&&(l=u=void 0),o=n(o),l===void 0?(l=o,o=0):l=n(l),u=u===void 0?o<l?1:-1:n(u),e(o,l,u,a)}}return m1=r,m1}var v1,g$;function ave(){if(g$)return v1;g$=1;var e=rve(),t=e();return v1=t,v1}var ive=ave();const _m=kt(ive);function Bf(e){"@babel/helpers - typeof";return Bf=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},Bf(e)}function y$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function b$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?y$(Object(n),!0).forEach(function(r){iU(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function iU(e,t,n){return t=ove(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ove(e){var t=sve(e,"string");return Bf(t)=="symbol"?t:t+""}function sve(e,t){if(Bf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lve=["Webkit","Moz","O","ms"],uve=function(t,n){var r=t.replace(/(\w)/,function(o){return o.toUpperCase()}),a=lve.reduce(function(o,l){return b$(b$({},o),{},iU({},l+r,n))},{});return a[t]=n,a};function au(e){"@babel/helpers - typeof";return au=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},au(e)}function Am(){return Am=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Am.apply(this,arguments)}function x$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function g1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?x$(Object(n),!0).forEach(function(r){Or(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,sU(r.key),r)}}function fve(e,t,n){return t&&w$(e.prototype,t),n&&w$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function dve(e,t,n){return t=Om(t),hve(e,oU()?Reflect.construct(t,n||[],Om(e).constructor):t.apply(e,n))}function hve(e,t){if(t&&(au(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pve(e)}function pve(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(oU=function(){return!!e})()}function Om(e){return Om=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Om(e)}function mve(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&&u_(e,t)}function u_(e,t){return u_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},u_(e,t)}function Or(e,t,n){return t=sU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sU(e){var t=vve(e,"string");return au(t)=="symbol"?t:t+""}function vve(e,t){if(au(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(au(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var gve=function(t){var n=t.data,r=t.startIndex,a=t.endIndex,o=t.x,l=t.width,u=t.travellerWidth;if(!n||!n.length)return{};var f=n.length,d=Qc().domain(_m(0,f)).range([o,o+l-u]),m=d.domain().map(function(p){return d(p)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:d(r),endX:d(a),scale:d,scaleValues:m}},S$=function(t){return t.changedTouches&&!!t.changedTouches.length},iu=(function(e){function t(n){var r;return cve(this,t),r=dve(this,t,[n]),Or(r,"handleDrag",function(a){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(a):r.state.isSlideMoving&&r.handleSlideDrag(a)}),Or(r,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&r.handleDrag(a.changedTouches[0])}),Or(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=r.props,o=a.endIndex,l=a.onDragEnd,u=a.startIndex;l==null||l({endIndex:o,startIndex:u})}),r.detachDragEndListener()}),Or(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Or(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Or(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Or(r,"handleSlideDragStart",function(a){var o=S$(a)?a.changedTouches[0]:a;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return mve(t,e),fve(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var a=r.startX,o=r.endX,l=this.state.scaleValues,u=this.props,f=u.gap,d=u.data,m=d.length-1,p=Math.min(a,o),g=Math.max(a,o),x=t.getIndexInRange(l,p),A=t.getIndexInRange(l,g);return{startIndex:x-x%f,endIndex:A===m?m:A-A%f}}},{key:"getTextOfTick",value:function(r){var a=this.props,o=a.data,l=a.tickFormatter,u=a.dataKey,f=Mr(o[r],u,r);return at(l)?l(f,r):f}},{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(r){var a=this.state,o=a.slideMoveStartX,l=a.startX,u=a.endX,f=this.props,d=f.x,m=f.width,p=f.travellerWidth,g=f.startIndex,x=f.endIndex,A=f.onChange,S=r.pageX-o;S>0?S=Math.min(S,d+m-p-u,d+m-p-l):S<0&&(S=Math.max(S,d-l,d-u));var w=this.getIndex({startX:l+S,endX:u+S});(w.startIndex!==g||w.endIndex!==x)&&A&&A(w),this.setState({startX:l+S,endX:u+S,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,a){var o=S$(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var a=this.state,o=a.brushMoveStartX,l=a.movingTravellerId,u=a.endX,f=a.startX,d=this.state[l],m=this.props,p=m.x,g=m.width,x=m.travellerWidth,A=m.onChange,S=m.gap,w=m.data,O={startX:this.state.startX,endX:this.state.endX},E=r.pageX-o;E>0?E=Math.min(E,p+g-x-d):E<0&&(E=Math.max(E,p-d)),O[l]=d+E;var T=this.getIndex(O),C=T.startIndex,j=T.endIndex,R=function(){var k=w.length-1;return l==="startX"&&(u>f?C%S===0:j%S===0)||u<f&&j===k||l==="endX"&&(u>f?j%S===0:C%S===0)||u>f&&j===k};this.setState(Or(Or({},l,d+E),"brushMoveStartX",r.pageX),function(){A&&R()&&A(T)})}},{key:"handleTravellerMoveKeyboard",value:function(r,a){var o=this,l=this.state,u=l.scaleValues,f=l.startX,d=l.endX,m=this.state[a],p=u.indexOf(m);if(p!==-1){var g=p+r;if(!(g===-1||g>=u.length)){var x=u[g];a==="startX"&&x>=d||a==="endX"&&x<=f||this.setState(Or({},a,x),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,a=r.x,o=r.y,l=r.width,u=r.height,f=r.fill,d=r.stroke;return q.createElement("rect",{stroke:d,fill:f,x:a,y:o,width:l,height:u})}},{key:"renderPanorama",value:function(){var r=this.props,a=r.x,o=r.y,l=r.width,u=r.height,f=r.data,d=r.children,m=r.padding,p=y.Children.only(d);return p?q.cloneElement(p,{x:a,y:o,width:l,height:u,margin:m,compact:!0,data:f}):null}},{key:"renderTravellerLayer",value:function(r,a){var o,l,u=this,f=this.props,d=f.y,m=f.travellerWidth,p=f.height,g=f.traveller,x=f.ariaLabel,A=f.data,S=f.startIndex,w=f.endIndex,O=Math.max(r,this.props.x),E=g1(g1({},ut(this.props,!1)),{},{x:O,y:d,width:m,height:p}),T=x||"Min value: ".concat((o=A[S])===null||o===void 0?void 0:o.name,", Max value: ").concat((l=A[w])===null||l===void 0?void 0:l.name);return q.createElement(Jt,{tabIndex:0,role:"slider","aria-label":T,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(j){["ArrowLeft","ArrowRight"].includes(j.key)&&(j.preventDefault(),j.stopPropagation(),u.handleTravellerMoveKeyboard(j.key==="ArrowRight"?1:-1,a))},onFocus:function(){u.setState({isTravellerFocused:!0})},onBlur:function(){u.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(g,E))}},{key:"renderSlide",value:function(r,a){var o=this.props,l=o.y,u=o.height,f=o.stroke,d=o.travellerWidth,m=Math.min(r,a)+d,p=Math.max(Math.abs(a-r)-d,0);return q.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:f,fillOpacity:.2,x:m,y:l,width:p,height:u})}},{key:"renderText",value:function(){var r=this.props,a=r.startIndex,o=r.endIndex,l=r.y,u=r.height,f=r.travellerWidth,d=r.stroke,m=this.state,p=m.startX,g=m.endX,x=5,A={pointerEvents:"none",fill:d};return q.createElement(Jt,{className:"recharts-brush-texts"},q.createElement(Qp,Am({textAnchor:"end",verticalAnchor:"middle",x:Math.min(p,g)-x,y:l+u/2},A),this.getTextOfTick(a)),q.createElement(Qp,Am({textAnchor:"start",verticalAnchor:"middle",x:Math.max(p,g)+f+x,y:l+u/2},A),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,a=r.data,o=r.className,l=r.children,u=r.x,f=r.y,d=r.width,m=r.height,p=r.alwaysShowText,g=this.state,x=g.startX,A=g.endX,S=g.isTextActive,w=g.isSlideMoving,O=g.isTravellerMoving,E=g.isTravellerFocused;if(!a||!a.length||!je(u)||!je(f)||!je(d)||!je(m)||d<=0||m<=0)return null;var T=mt("recharts-brush",o),C=q.Children.count(l)===1,j=uve("userSelect","none");return q.createElement(Jt,{className:T,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:j},this.renderBackground(),C&&this.renderPanorama(),this.renderSlide(x,A),this.renderTravellerLayer(x,"startX"),this.renderTravellerLayer(A,"endX"),(S||w||O||E||p)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var a=r.x,o=r.y,l=r.width,u=r.height,f=r.stroke,d=Math.floor(o+u/2)-1;return q.createElement(q.Fragment,null,q.createElement("rect",{x:a,y:o,width:l,height:u,fill:f,stroke:"none"}),q.createElement("line",{x1:a+1,y1:d,x2:a+l-1,y2:d,fill:"none",stroke:"#fff"}),q.createElement("line",{x1:a+1,y1:d+2,x2:a+l-1,y2:d+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,a){var o;return q.isValidElement(r)?o=q.cloneElement(r,a):at(r)?o=r(a):o=t.renderDefaultTraveller(a),o}},{key:"getDerivedStateFromProps",value:function(r,a){var o=r.data,l=r.width,u=r.x,f=r.travellerWidth,d=r.updateId,m=r.startIndex,p=r.endIndex;if(o!==a.prevData||d!==a.prevUpdateId)return g1({prevData:o,prevTravellerWidth:f,prevUpdateId:d,prevX:u,prevWidth:l},o&&o.length?gve({data:o,width:l,x:u,travellerWidth:f,startIndex:m,endIndex:p}):{scale:null,scaleValues:null});if(a.scale&&(l!==a.prevWidth||u!==a.prevX||f!==a.prevTravellerWidth)){a.scale.range([u,u+l-f]);var g=a.scale.domain().map(function(x){return a.scale(x)});return{prevData:o,prevTravellerWidth:f,prevUpdateId:d,prevX:u,prevWidth:l,startX:a.scale(r.startIndex),endX:a.scale(r.endIndex),scaleValues:g}}return null}},{key:"getIndexInRange",value:function(r,a){for(var o=r.length,l=0,u=o-1;u-l>1;){var f=Math.floor((l+u)/2);r[f]>a?u=f:l=f}return a>=r[u]?u:l}}])})(y.PureComponent);Or(iu,"displayName","Brush");Or(iu,"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 y1,_$;function yve(){if(_$)return y1;_$=1;var e=mO();function t(n,r){var a;return e(n,function(o,l,u){return a=r(o,l,u),!a}),!!a}return y1=t,y1}var b1,A$;function bve(){if(A$)return b1;A$=1;var e=gB(),t=Do(),n=yve(),r=pr(),a=Dv();function o(l,u,f){var d=r(l)?e:n;return f&&a(l,u,f)&&(u=void 0),d(l,t(u,3))}return b1=o,b1}var xve=bve();const wve=kt(xve);var Wa=function(t,n){var r=t.alwaysShow,a=t.ifOverflow;return r&&(a="extendDomain"),a===n},x1,O$;function Sve(){if(O$)return x1;O$=1;var e=kB();function t(n,r,a){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:a,writable:!0}):n[r]=a}return x1=t,x1}var w1,E$;function _ve(){if(E$)return w1;E$=1;var e=Sve(),t=PB(),n=Do();function r(a,o){var l={};return o=n(o,3),t(a,function(u,f,d){e(l,f,o(u,f,d))}),l}return w1=r,w1}var Ave=_ve();const Ove=kt(Ave);var S1,j$;function Eve(){if(j$)return S1;j$=1;function e(t,n){for(var r=-1,a=t==null?0:t.length;++r<a;)if(!n(t[r],r,t))return!1;return!0}return S1=e,S1}var _1,T$;function jve(){if(T$)return _1;T$=1;var e=mO();function t(n,r){var a=!0;return e(n,function(o,l,u){return a=!!r(o,l,u),a}),a}return _1=t,_1}var A1,C$;function Tve(){if(C$)return A1;C$=1;var e=Eve(),t=jve(),n=Do(),r=pr(),a=Dv();function o(l,u,f){var d=r(l)?e:t;return f&&a(l,u,f)&&(u=void 0),d(l,n(u,3))}return A1=o,A1}var Cve=Tve();const lU=kt(Cve);var Rve=["x","y"];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)}function c_(){return c_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c_.apply(this,arguments)}function R$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ic(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?R$(Object(n),!0).forEach(function(r){Nve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nve(e,t,n){return t=Mve(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mve(e){var t=Pve(e,"string");return Uf(t)=="symbol"?t:t+""}function Pve(e,t){if(Uf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Uf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dve(e,t){if(e==null)return{};var n=kve(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kve(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function $ve(e,t){var n=e.x,r=e.y,a=Dve(e,Rve),o="".concat(n),l=parseInt(o,10),u="".concat(r),f=parseInt(u,10),d="".concat(t.height||a.height),m=parseInt(d,10),p="".concat(t.width||a.width),g=parseInt(p,10);return Ic(Ic(Ic(Ic(Ic({},t),a),l?{x:l}:{}),f?{y:f}:{}),{},{height:m,width:g,name:t.name,radius:t.radius})}function N$(e){return q.createElement(Zme,c_({shapeType:"rectangle",propTransformer:$ve,activeClassName:"recharts-active-bar"},e))}var zve=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,a){if(typeof t=="number")return t;var o=je(r)||qre(r);return o?t(r,a):(o||Cs(),n)}},Lve=["value","background"],uU;function ou(e){"@babel/helpers - typeof";return ou=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},ou(e)}function Ive(e,t){if(e==null)return{};var n=Bve(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Bve(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Em(){return Em=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Em.apply(this,arguments)}function M$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function yn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?M$(Object(n),!0).forEach(function(r){go(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fU(r.key),r)}}function qve(e,t,n){return t&&P$(e.prototype,t),n&&P$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hve(e,t,n){return t=jm(t),Fve(e,cU()?Reflect.construct(t,n||[],jm(e).constructor):t.apply(e,n))}function Fve(e,t){if(t&&(ou(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vve(e)}function Vve(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cU=function(){return!!e})()}function jm(e){return jm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},jm(e)}function Gve(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&&f_(e,t)}function f_(e,t){return f_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},f_(e,t)}function go(e,t,n){return t=fU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fU(e){var t=Wve(e,"string");return ou(t)=="symbol"?t:t+""}function Wve(e,t){if(ou(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ou(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var bd=(function(e){function t(){var n;Uve(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=Hve(this,t,[].concat(a)),go(n,"state",{isAnimationFinished:!1}),go(n,"id",hd("recharts-bar-")),go(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),l&&l()}),go(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),l&&l()}),n}return Gve(t,e),qve(t,[{key:"renderRectanglesStatically",value:function(r){var a=this,o=this.props,l=o.shape,u=o.dataKey,f=o.activeIndex,d=o.activeBar,m=ut(this.props,!1);return r&&r.map(function(p,g){var x=g===f,A=x?d:l,S=yn(yn(yn({},m),p),{},{isActive:x,option:A,index:g,dataKey:u,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return q.createElement(Jt,Em({className:"recharts-bar-rectangle"},Up(a.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)}),q.createElement(N$,S))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,a=this.props,o=a.data,l=a.layout,u=a.isAnimationActive,f=a.animationBegin,d=a.animationDuration,m=a.animationEasing,p=a.animationId,g=this.state.prevData;return q.createElement(Pi,{begin:f,duration:d,isActive:u,easing:m,from:{t:0},to:{t:1},key:"bar-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(x){var A=x.t,S=o.map(function(w,O){var E=g&&g[O];if(E){var T=Zr(E.x,w.x),C=Zr(E.y,w.y),j=Zr(E.width,w.width),R=Zr(E.height,w.height);return yn(yn({},w),{},{x:T(A),y:C(A),width:j(A),height:R(A)})}if(l==="horizontal"){var N=Zr(0,w.height),k=N(A);return yn(yn({},w),{},{y:w.y+w.height-k,height:k})}var $=Zr(0,w.width),V=$(A);return yn(yn({},w),{},{width:V})});return q.createElement(Jt,null,r.renderRectanglesStatically(S))})}},{key:"renderRectangles",value:function(){var r=this.props,a=r.data,o=r.isAnimationActive,l=this.state.prevData;return o&&a&&a.length&&(!l||!Sf(l,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var r=this,a=this.props,o=a.data,l=a.dataKey,u=a.activeIndex,f=ut(this.props.background,!1);return o.map(function(d,m){d.value;var p=d.background,g=Ive(d,Lve);if(!p)return null;var x=yn(yn(yn(yn(yn({},g),{},{fill:"#eee"},p),f),Up(r.props,d,m)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:l,index:m,className:"recharts-bar-background-rectangle"});return q.createElement(N$,Em({key:"background-bar-".concat(m),option:r.props.background,isActive:m===u},x))})}},{key:"renderErrorBar",value:function(r,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,l=o.data,u=o.xAxis,f=o.yAxis,d=o.layout,m=o.children,p=Oa(m,Fv);if(!p)return null;var g=d==="vertical"?l[0].height/2:l[0].width/2,x=function(w,O){var E=Array.isArray(w.value)?w.value[1]:w.value;return{x:w.x,y:w.y,value:E,errorVal:Mr(w,O)}},A={clipPath:r?"url(#clipPath-".concat(a,")"):null};return q.createElement(Jt,A,p.map(function(S){return q.cloneElement(S,{key:"error-bar-".concat(a,"-").concat(S.props.dataKey),data:l,xAxis:u,yAxis:f,layout:d,offset:g,dataPointFormatter:x})}))}},{key:"render",value:function(){var r=this.props,a=r.hide,o=r.data,l=r.className,u=r.xAxis,f=r.yAxis,d=r.left,m=r.top,p=r.width,g=r.height,x=r.isAnimationActive,A=r.background,S=r.id;if(a||!o||!o.length)return null;var w=this.state.isAnimationFinished,O=mt("recharts-bar",l),E=u&&u.allowDataOverflow,T=f&&f.allowDataOverflow,C=E||T,j=ht(S)?this.id:S;return q.createElement(Jt,{className:O},E||T?q.createElement("defs",null,q.createElement("clipPath",{id:"clipPath-".concat(j)},q.createElement("rect",{x:E?d:d-p/2,y:T?m:m-g/2,width:E?p:p*2,height:T?g:g*2}))):null,q.createElement(Jt,{className:"recharts-bar-rectangles",clipPath:C?"url(#clipPath-".concat(j,")"):null},A?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(C,j),(!x||w)&&wo.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:a.curData}:r.data!==a.curData?{curData:r.data}:null}}])})(y.PureComponent);uU=bd;go(bd,"displayName","Bar");go(bd,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Ru.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});go(bd,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,a=e.bandSize,o=e.xAxis,l=e.yAxis,u=e.xAxisTicks,f=e.yAxisTicks,d=e.stackedData,m=e.dataStartIndex,p=e.displayedData,g=e.offset,x=lde(r,n);if(!x)return null;var A=t.layout,S=n.type.defaultProps,w=S!==void 0?yn(yn({},S),n.props):n.props,O=w.dataKey,E=w.children,T=w.minPointSize,C=A==="horizontal"?l:o,j=d?C.scale.domain():null,R=vde({numericAxis:C}),N=Oa(E,qB),k=p.map(function($,V){var I,L,H,W,Z,z;d?I=ude(d[m+V],j):(I=Mr($,O),Array.isArray(I)||(I=[R,I]));var F=zve(T,uU.defaultProps.minPointSize)(I[1],V);if(A==="horizontal"){var Y,Q=[l.scale(I[0]),l.scale(I[1])],K=Q[0],P=Q[1];L=bk({axis:o,ticks:u,bandSize:a,offset:x.offset,entry:$,index:V}),H=(Y=P??K)!==null&&Y!==void 0?Y:void 0,W=x.size;var U=K-P;if(Z=Number.isNaN(U)?0:U,z={x:L,y:l.y,width:W,height:l.height},Math.abs(F)>0&&Math.abs(Z)<Math.abs(F)){var ne=wa(Z||F)*(Math.abs(F)-Math.abs(Z));H-=ne,Z+=ne}}else{var me=[o.scale(I[0]),o.scale(I[1])],Ae=me[0],ce=me[1];if(L=Ae,H=bk({axis:l,ticks:f,bandSize:a,offset:x.offset,entry:$,index:V}),W=ce-Ae,Z=x.size,z={x:o.x,y:H,width:o.width,height:Z},Math.abs(F)>0&&Math.abs(W)<Math.abs(F)){var de=wa(W||F)*(Math.abs(F)-Math.abs(W));W+=de}}return yn(yn(yn({},$),{},{x:L,y:H,width:W,height:Z,value:d?I:I[1],payload:$,background:z},N&&N[V]&&N[V].props),{},{tooltipPayload:[W6(n,$)],tooltipPosition:{x:L+W/2,y:H+Z/2}})});return yn({data:k,layout:A},g)});function qf(e){"@babel/helpers - typeof";return qf=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},qf(e)}function Zve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dU(r.key),r)}}function Yve(e,t,n){return t&&D$(e.prototype,t),n&&D$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function k$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ga(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k$(Object(n),!0).forEach(function(r){Wv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wv(e,t,n){return t=dU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dU(e){var t=Kve(e,"string");return qf(t)=="symbol"?t:t+""}function Kve(e,t){if(qf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Xve=function(t,n,r,a,o){var l=t.width,u=t.height,f=t.layout,d=t.children,m=Object.keys(n),p={left:r.left,leftMirror:r.left,right:l-r.right,rightMirror:l-r.right,top:r.top,topMirror:r.top,bottom:u-r.bottom,bottomMirror:u-r.bottom},g=!!Er(d,bd);return m.reduce(function(x,A){var S=n[A],w=S.orientation,O=S.domain,E=S.padding,T=E===void 0?{}:E,C=S.mirror,j=S.reversed,R="".concat(w).concat(C?"Mirror":""),N,k,$,V,I;if(S.type==="number"&&(S.padding==="gap"||S.padding==="no-gap")){var L=O[1]-O[0],H=1/0,W=S.categoricalDomain.sort(Vre);if(W.forEach(function(me,Ae){Ae>0&&(H=Math.min((me||0)-(W[Ae-1]||0),H))}),Number.isFinite(H)){var Z=H/L,z=S.layout==="vertical"?r.height:r.width;if(S.padding==="gap"&&(N=Z*z/2),S.padding==="no-gap"){var F=js(t.barCategoryGap,Z*z),Y=Z*z/2;N=Y-F-(Y-F)/z*F}}}a==="xAxis"?k=[r.left+(T.left||0)+(N||0),r.left+r.width-(T.right||0)-(N||0)]:a==="yAxis"?k=f==="horizontal"?[r.top+r.height-(T.bottom||0),r.top+(T.top||0)]:[r.top+(T.top||0)+(N||0),r.top+r.height-(T.bottom||0)-(N||0)]:k=S.range,j&&(k=[k[1],k[0]]);var Q=ode(S,o,g),K=Q.scale,P=Q.realScaleType;K.domain(O).range(k),sde(K);var U=mde(K,ga(ga({},S),{},{realScaleType:P}));a==="xAxis"?(I=w==="top"&&!C||w==="bottom"&&C,$=r.left,V=p[R]-I*S.height):a==="yAxis"&&(I=w==="left"&&!C||w==="right"&&C,$=p[R]-I*S.width,V=r.top);var ne=ga(ga(ga({},S),U),{},{realScaleType:P,x:$,y:V,scale:K,width:a==="xAxis"?r.width:S.width,height:a==="yAxis"?r.height:S.height});return ne.bandSize=hm(ne,U),!S.hide&&a==="xAxis"?p[R]+=(I?-1:1)*ne.height:S.hide||(p[R]+=(I?-1:1)*ne.width),ga(ga({},x),{},Wv({},A,ne))},{})},hU=function(t,n){var r=t.x,a=t.y,o=n.x,l=n.y;return{x:Math.min(r,o),y:Math.min(a,l),width:Math.abs(o-r),height:Math.abs(l-a)}},Qve=function(t){var n=t.x1,r=t.y1,a=t.x2,o=t.y2;return hU({x:n,y:r},{x:a,y:o})},pU=(function(){function e(t){Zve(this,e),this.scale=t}return Yve(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(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}case"end":{var u=this.bandwidth?this.bandwidth():0;return this.scale(n)+u}default:return this.scale(n)}if(a){var f=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+f}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),a=r[0],o=r[r.length-1];return a<=o?n>=a&&n<=o:n>=o&&n<=a}}],[{key:"create",value:function(n){return new e(n)}}])})();Wv(pU,"EPS",1e-4);var VO=function(t){var n=Object.keys(t).reduce(function(r,a){return ga(ga({},r),{},Wv({},a,pU.create(t[a])))},{});return ga(ga({},n),{},{apply:function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.bandAware,u=o.position;return Ove(a,function(f,d){return n[d].apply(f,{bandAware:l,position:u})})},isInRange:function(a){return lU(a,function(o,l){return n[l].isInRange(o)})}})};function Jve(e){return(e%180+180)%180}var ege=function(t){var n=t.width,r=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=Jve(a),l=o*Math.PI/180,u=Math.atan(r/n),f=l>u&&l<Math.PI-u?r/Math.sin(l):n/Math.cos(l);return Math.abs(f)},O1,$$;function tge(){if($$)return O1;$$=1;var e=Do(),t=pd(),n=Mv();function r(a){return function(o,l,u){var f=Object(o);if(!t(o)){var d=e(l,3);o=n(o),l=function(p){return d(f[p],p,f)}}var m=a(o,l,u);return m>-1?f[d?o[m]:m]:void 0}}return O1=r,O1}var E1,z$;function nge(){if(z$)return E1;z$=1;var e=aU();function t(n){var r=e(n),a=r%1;return r===r?a?r-a:r:0}return E1=t,E1}var j1,L$;function rge(){if(L$)return j1;L$=1;var e=TB(),t=Do(),n=nge(),r=Math.max;function a(o,l,u){var f=o==null?0:o.length;if(!f)return-1;var d=u==null?0:n(u);return d<0&&(d=r(f+d,0)),e(o,t(l,3),d)}return j1=a,j1}var T1,I$;function age(){if(I$)return T1;I$=1;var e=tge(),t=rge(),n=e(t);return T1=n,T1}var ige=age();const oge=kt(ige);var sge=F4();const lge=kt(sge);var uge=lge(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("")}),GO=y.createContext(void 0),WO=y.createContext(void 0),mU=y.createContext(void 0),vU=y.createContext({}),gU=y.createContext(void 0),yU=y.createContext(0),bU=y.createContext(0),B$=function(t){var n=t.state,r=n.xAxisMap,a=n.yAxisMap,o=n.offset,l=t.clipPathId,u=t.children,f=t.width,d=t.height,m=uge(o);return q.createElement(GO.Provider,{value:r},q.createElement(WO.Provider,{value:a},q.createElement(vU.Provider,{value:o},q.createElement(mU.Provider,{value:m},q.createElement(gU.Provider,{value:l},q.createElement(yU.Provider,{value:d},q.createElement(bU.Provider,{value:f},u)))))))},cge=function(){return y.useContext(gU)},xU=function(t){var n=y.useContext(GO);n==null&&Cs();var r=n[t];return r==null&&Cs(),r},fge=function(){var t=y.useContext(GO);return mo(t)},dge=function(){var t=y.useContext(WO),n=oge(t,function(r){return lU(r.domain,Number.isFinite)});return n||mo(t)},wU=function(t){var n=y.useContext(WO);n==null&&Cs();var r=n[t];return r==null&&Cs(),r},hge=function(){var t=y.useContext(mU);return t},pge=function(){return y.useContext(vU)},ZO=function(){return y.useContext(bU)},YO=function(){return y.useContext(yU)};function su(e){"@babel/helpers - typeof";return su=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},su(e)}function mge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vge(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_U(r.key),r)}}function gge(e,t,n){return t&&vge(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function yge(e,t,n){return t=Tm(t),bge(e,SU()?Reflect.construct(t,n||[],Tm(e).constructor):t.apply(e,n))}function bge(e,t){if(t&&(su(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xge(e)}function xge(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SU=function(){return!!e})()}function Tm(e){return Tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tm(e)}function wge(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&&d_(e,t)}function d_(e,t){return d_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},d_(e,t)}function U$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function q$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U$(Object(n),!0).forEach(function(r){KO(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KO(e,t,n){return t=_U(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _U(e){var t=Sge(e,"string");return su(t)=="symbol"?t:t+""}function Sge(e,t){if(su(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(su(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function _ge(e,t){return jge(e)||Ege(e,t)||Oge(e,t)||Age()}function Age(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
484
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Oge(e,t){if(e){if(typeof e=="string")return H$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return H$(e,t)}}function H$(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ege(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return u}}function jge(e){if(Array.isArray(e))return e}function h_(){return h_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h_.apply(this,arguments)}var Tge=function(t,n){var r;return q.isValidElement(t)?r=q.cloneElement(t,n):at(t)?r=t(n):r=q.createElement("line",h_({},n,{className:"recharts-reference-line-line"})),r},Cge=function(t,n,r,a,o,l,u,f,d){var m=o.x,p=o.y,g=o.width,x=o.height;if(r){var A=d.y,S=t.y.apply(A,{position:l});if(Wa(d,"discard")&&!t.y.isInRange(S))return null;var w=[{x:m+g,y:S},{x:m,y:S}];return f==="left"?w.reverse():w}if(n){var O=d.x,E=t.x.apply(O,{position:l});if(Wa(d,"discard")&&!t.x.isInRange(E))return null;var T=[{x:E,y:p+x},{x:E,y:p}];return u==="top"?T.reverse():T}if(a){var C=d.segment,j=C.map(function(R){return t.apply(R,{position:l})});return Wa(d,"discard")&&wve(j,function(R){return!t.isInRange(R)})?null:j}return null};function Rge(e){var t=e.x,n=e.y,r=e.segment,a=e.xAxisId,o=e.yAxisId,l=e.shape,u=e.className,f=e.alwaysShow,d=cge(),m=xU(a),p=wU(o),g=hge();if(!d||!g)return null;Oi(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var x=VO({x:m.scale,y:p.scale}),A=An(t),S=An(n),w=r&&r.length===2,O=Cge(x,A,S,w,g,e.position,m.orientation,p.orientation,e);if(!O)return null;var E=_ge(O,2),T=E[0],C=T.x,j=T.y,R=E[1],N=R.x,k=R.y,$=Wa(e,"hidden")?"url(#".concat(d,")"):void 0,V=q$(q$({clipPath:$},ut(e,!0)),{},{x1:C,y1:j,x2:N,y2:k});return q.createElement(Jt,{className:mt("recharts-reference-line",u)},Tge(l,V),Yn.renderCallByParent(e,Qve({x1:C,y1:j,x2:N,y2:k})))}var XO=(function(e){function t(){return mge(this,t),yge(this,t,arguments)}return wge(t,e),gge(t,[{key:"render",value:function(){return q.createElement(Rge,this.props)}}])})(q.Component);KO(XO,"displayName","ReferenceLine");KO(XO,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function p_(){return p_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p_.apply(this,arguments)}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)}function F$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function V$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F$(Object(n),!0).forEach(function(r){Zv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mge(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,OU(r.key),r)}}function Pge(e,t,n){return t&&Mge(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Dge(e,t,n){return t=Cm(t),kge(e,AU()?Reflect.construct(t,n||[],Cm(e).constructor):t.apply(e,n))}function kge(e,t){if(t&&(lu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $ge(e)}function $ge(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function AU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(AU=function(){return!!e})()}function Cm(e){return Cm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cm(e)}function zge(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&&m_(e,t)}function m_(e,t){return m_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},m_(e,t)}function Zv(e,t,n){return t=OU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OU(e){var t=Lge(e,"string");return lu(t)=="symbol"?t:t+""}function Lge(e,t){if(lu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(lu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ige=function(t){var n=t.x,r=t.y,a=t.xAxis,o=t.yAxis,l=VO({x:a.scale,y:o.scale}),u=l.apply({x:n,y:r},{bandAware:!0});return Wa(t,"discard")&&!l.isInRange(u)?null:u},Yv=(function(e){function t(){return Nge(this,t),Dge(this,t,arguments)}return zge(t,e),Pge(t,[{key:"render",value:function(){var r=this.props,a=r.x,o=r.y,l=r.r,u=r.alwaysShow,f=r.clipPathId,d=An(a),m=An(o);if(Oi(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!d||!m)return null;var p=Ige(this.props);if(!p)return null;var g=p.x,x=p.y,A=this.props,S=A.shape,w=A.className,O=Wa(this.props,"hidden")?"url(#".concat(f,")"):void 0,E=V$(V$({clipPath:O},ut(this.props,!0)),{},{cx:g,cy:x});return q.createElement(Jt,{className:mt("recharts-reference-dot",w)},t.renderDot(S,E),Yn.renderCallByParent(this.props,{x:g-l,y:x-l,width:2*l,height:2*l}))}}])})(q.Component);Zv(Yv,"displayName","ReferenceDot");Zv(Yv,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Zv(Yv,"renderDot",function(e,t){var n;return q.isValidElement(e)?n=q.cloneElement(e,t):at(e)?n=e(t):n=q.createElement(FO,p_({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function v_(){return v_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v_.apply(this,arguments)}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 G$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function W$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?G$(Object(n),!0).forEach(function(r){Kv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uge(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,jU(r.key),r)}}function qge(e,t,n){return t&&Uge(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hge(e,t,n){return t=Rm(t),Fge(e,EU()?Reflect.construct(t,n||[],Rm(e).constructor):t.apply(e,n))}function Fge(e,t){if(t&&(uu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vge(e)}function Vge(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(EU=function(){return!!e})()}function Rm(e){return Rm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rm(e)}function Gge(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g_(e,t)}function g_(e,t){return g_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},g_(e,t)}function Kv(e,t,n){return t=jU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jU(e){var t=Wge(e,"string");return uu(t)=="symbol"?t:t+""}function Wge(e,t){if(uu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(uu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Zge=function(t,n,r,a,o){var l=o.x1,u=o.x2,f=o.y1,d=o.y2,m=o.xAxis,p=o.yAxis;if(!m||!p)return null;var g=VO({x:m.scale,y:p.scale}),x={x:t?g.x.apply(l,{position:"start"}):g.x.rangeMin,y:r?g.y.apply(f,{position:"start"}):g.y.rangeMin},A={x:n?g.x.apply(u,{position:"end"}):g.x.rangeMax,y:a?g.y.apply(d,{position:"end"}):g.y.rangeMax};return Wa(o,"discard")&&(!g.isInRange(x)||!g.isInRange(A))?null:hU(x,A)},Xv=(function(e){function t(){return Bge(this,t),Hge(this,t,arguments)}return Gge(t,e),qge(t,[{key:"render",value:function(){var r=this.props,a=r.x1,o=r.x2,l=r.y1,u=r.y2,f=r.className,d=r.alwaysShow,m=r.clipPathId;Oi(d===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=An(a),g=An(o),x=An(l),A=An(u),S=this.props.shape;if(!p&&!g&&!x&&!A&&!S)return null;var w=Zge(p,g,x,A,this.props);if(!w&&!S)return null;var O=Wa(this.props,"hidden")?"url(#".concat(m,")"):void 0;return q.createElement(Jt,{className:mt("recharts-reference-area",f)},t.renderRect(S,W$(W$({clipPath:O},ut(this.props,!0)),w)),Yn.renderCallByParent(this.props,w))}}])})(q.Component);Kv(Xv,"displayName","ReferenceArea");Kv(Xv,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Kv(Xv,"renderRect",function(e,t){var n;return q.isValidElement(e)?n=q.cloneElement(e,t):at(e)?n=e(t):n=q.createElement(HO,v_({},t,{className:"recharts-reference-area-rect"})),n});function TU(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],a=0;a<e.length;a+=t)r.push(e[a]);return r}function Yge(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return ege(r,n)}function Kge(e,t,n){var r=n==="width",a=e.x,o=e.y,l=e.width,u=e.height;return t===1?{start:r?a:o,end:r?a+l:o+u}:{start:r?a+l:o+u,end:r?a:o}}function Nm(e,t,n,r,a){if(e*t<e*r||e*t>e*a)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-a)<=0}function Xge(e,t){return TU(e,t+1)}function Qge(e,t,n,r,a){for(var o=(r||[]).slice(),l=t.start,u=t.end,f=0,d=1,m=l,p=function(){var A=r==null?void 0:r[f];if(A===void 0)return{v:TU(r,d)};var S=f,w,O=function(){return w===void 0&&(w=n(A,S)),w},E=A.coordinate,T=f===0||Nm(e,E,O,m,u);T||(f=0,m=l,d+=1),T&&(m=E+e*(O()/2+a),f+=d)},g;d<=o.length;)if(g=p(),g)return g.v;return[]}function Hf(e){"@babel/helpers - typeof";return Hf=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},Hf(e)}function Z$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Wn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Z$(Object(n),!0).forEach(function(r){Jge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jge(e,t,n){return t=eye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eye(e){var t=tye(e,"string");return Hf(t)=="symbol"?t:t+""}function tye(e,t){if(Hf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nye(e,t,n,r,a){for(var o=(r||[]).slice(),l=o.length,u=t.start,f=t.end,d=function(g){var x=o[g],A,S=function(){return A===void 0&&(A=n(x,g)),A};if(g===l-1){var w=e*(x.coordinate+e*S()/2-f);o[g]=x=Wn(Wn({},x),{},{tickCoord:w>0?x.coordinate-w*e:x.coordinate})}else o[g]=x=Wn(Wn({},x),{},{tickCoord:x.coordinate});var O=Nm(e,x.tickCoord,S,u,f);O&&(f=x.tickCoord-e*(S()/2+a),o[g]=Wn(Wn({},x),{},{isShow:!0}))},m=l-1;m>=0;m--)d(m);return o}function rye(e,t,n,r,a,o){var l=(r||[]).slice(),u=l.length,f=t.start,d=t.end;if(o){var m=r[u-1],p=n(m,u-1),g=e*(m.coordinate+e*p/2-d);l[u-1]=m=Wn(Wn({},m),{},{tickCoord:g>0?m.coordinate-g*e:m.coordinate});var x=Nm(e,m.tickCoord,function(){return p},f,d);x&&(d=m.tickCoord-e*(p/2+a),l[u-1]=Wn(Wn({},m),{},{isShow:!0}))}for(var A=o?u-1:u,S=function(E){var T=l[E],C,j=function(){return C===void 0&&(C=n(T,E)),C};if(E===0){var R=e*(T.coordinate-e*j()/2-f);l[E]=T=Wn(Wn({},T),{},{tickCoord:R<0?T.coordinate-R*e:T.coordinate})}else l[E]=T=Wn(Wn({},T),{},{tickCoord:T.coordinate});var N=Nm(e,T.tickCoord,j,f,d);N&&(f=T.tickCoord+e*(j()/2+a),l[E]=Wn(Wn({},T),{},{isShow:!0}))},w=0;w<A;w++)S(w);return l}function QO(e,t,n){var r=e.tick,a=e.ticks,o=e.viewBox,l=e.minTickGap,u=e.orientation,f=e.interval,d=e.tickFormatter,m=e.unit,p=e.angle;if(!a||!a.length||!r)return[];if(je(f)||Ru.isSsr)return Xge(a,typeof f=="number"&&je(f)?f:0);var g=[],x=u==="top"||u==="bottom"?"width":"height",A=m&&x==="width"?Xc(m,{fontSize:t,letterSpacing:n}):{width:0,height:0},S=function(T,C){var j=at(d)?d(T.value,C):T.value;return x==="width"?Yge(Xc(j,{fontSize:t,letterSpacing:n}),A,p):Xc(j,{fontSize:t,letterSpacing:n})[x]},w=a.length>=2?wa(a[1].coordinate-a[0].coordinate):1,O=Kge(o,w,x);return f==="equidistantPreserveStart"?Qge(w,O,S,a,l):(f==="preserveStart"||f==="preserveStartEnd"?g=rye(w,O,S,a,l,f==="preserveStartEnd"):g=nye(w,O,S,a,l),g.filter(function(E){return E.isShow}))}var aye=["viewBox"],iye=["viewBox"],oye=["ticks"];function cu(e){"@babel/helpers - typeof";return cu=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},cu(e)}function Nl(){return Nl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nl.apply(this,arguments)}function Y$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Sn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Y$(Object(n),!0).forEach(function(r){JO(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function C1(e,t){if(e==null)return{};var n=sye(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sye(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function lye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,RU(r.key),r)}}function uye(e,t,n){return t&&K$(e.prototype,t),n&&K$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function cye(e,t,n){return t=Mm(t),fye(e,CU()?Reflect.construct(t,n||[],Mm(e).constructor):t.apply(e,n))}function fye(e,t){if(t&&(cu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dye(e)}function dye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(CU=function(){return!!e})()}function Mm(e){return Mm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mm(e)}function hye(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&&y_(e,t)}function y_(e,t){return y_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},y_(e,t)}function JO(e,t,n){return t=RU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RU(e){var t=pye(e,"string");return cu(t)=="symbol"?t:t+""}function pye(e,t){if(cu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Du=(function(e){function t(n){var r;return lye(this,t),r=cye(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return hye(t,e),uye(t,[{key:"shouldComponentUpdate",value:function(r,a){var o=r.viewBox,l=C1(r,aye),u=this.props,f=u.viewBox,d=C1(u,iye);return!zl(o,f)||!zl(l,d)||!zl(a,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var a=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var a=this.props,o=a.x,l=a.y,u=a.width,f=a.height,d=a.orientation,m=a.tickSize,p=a.mirror,g=a.tickMargin,x,A,S,w,O,E,T=p?-1:1,C=r.tickSize||m,j=je(r.tickCoord)?r.tickCoord:r.coordinate;switch(d){case"top":x=A=r.coordinate,w=l+ +!p*f,S=w-T*C,E=S-T*g,O=j;break;case"left":S=w=r.coordinate,A=o+ +!p*u,x=A-T*C,O=x-T*g,E=j;break;case"right":S=w=r.coordinate,A=o+ +p*u,x=A+T*C,O=x+T*g,E=j;break;default:x=A=r.coordinate,w=l+ +p*f,S=w+T*C,E=S+T*g,O=j;break}return{line:{x1:x,y1:S,x2:A,y2:w},tick:{x:O,y:E}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,a=r.orientation,o=r.mirror,l;switch(a){case"left":l=o?"start":"end";break;case"right":l=o?"end":"start";break;default:l="middle";break}return l}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,a=r.orientation,o=r.mirror,l="end";switch(a){case"left":case"right":l="middle";break;case"top":l=o?"start":"end";break;default:l=o?"end":"start";break}return l}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.x,o=r.y,l=r.width,u=r.height,f=r.orientation,d=r.mirror,m=r.axisLine,p=Sn(Sn(Sn({},ut(this.props,!1)),ut(m,!1)),{},{fill:"none"});if(f==="top"||f==="bottom"){var g=+(f==="top"&&!d||f==="bottom"&&d);p=Sn(Sn({},p),{},{x1:a,y1:o+g*u,x2:a+l,y2:o+g*u})}else{var x=+(f==="left"&&!d||f==="right"&&d);p=Sn(Sn({},p),{},{x1:a+x*l,y1:o,x2:a+x*l,y2:o+u})}return q.createElement("line",Nl({},p,{className:mt("recharts-cartesian-axis-line",ta(m,"className"))}))}},{key:"renderTicks",value:function(r,a,o){var l=this,u=this.props,f=u.tickLine,d=u.stroke,m=u.tick,p=u.tickFormatter,g=u.unit,x=QO(Sn(Sn({},this.props),{},{ticks:r}),a,o),A=this.getTickTextAnchor(),S=this.getTickVerticalAnchor(),w=ut(this.props,!1),O=ut(m,!1),E=Sn(Sn({},w),{},{fill:"none"},ut(f,!1)),T=x.map(function(C,j){var R=l.getTickLineCoord(C),N=R.line,k=R.tick,$=Sn(Sn(Sn(Sn({textAnchor:A,verticalAnchor:S},w),{},{stroke:"none",fill:d},O),k),{},{index:j,payload:C,visibleTicksCount:x.length,tickFormatter:p});return q.createElement(Jt,Nl({className:"recharts-cartesian-axis-tick",key:"tick-".concat(C.value,"-").concat(C.coordinate,"-").concat(C.tickCoord)},Up(l.props,C,j)),f&&q.createElement("line",Nl({},E,N,{className:mt("recharts-cartesian-axis-tick-line",ta(f,"className"))})),m&&t.renderTickItem(m,$,"".concat(at(p)?p(C.value,j):C.value).concat(g||"")))});return q.createElement("g",{className:"recharts-cartesian-axis-ticks"},T)}},{key:"render",value:function(){var r=this,a=this.props,o=a.axisLine,l=a.width,u=a.height,f=a.ticksGenerator,d=a.className,m=a.hide;if(m)return null;var p=this.props,g=p.ticks,x=C1(p,oye),A=g;return at(f)&&(A=g&&g.length>0?f(this.props):f(x)),l<=0||u<=0||!A||!A.length?null:q.createElement(Jt,{className:mt("recharts-cartesian-axis",d),ref:function(w){r.layerReference=w}},o&&this.renderAxisLine(),this.renderTicks(A,this.state.fontSize,this.state.letterSpacing),Yn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,a,o){var l,u=mt(a.className,"recharts-cartesian-axis-tick-value");return q.isValidElement(r)?l=q.cloneElement(r,Sn(Sn({},a),{},{className:u})):at(r)?l=r(Sn(Sn({},a),{},{className:u})):l=q.createElement(Qp,Nl({},a,{className:"recharts-cartesian-axis-tick-value"}),o),l}}])})(y.Component);JO(Du,"displayName","CartesianAxis");JO(Du,"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 mye=["x1","y1","x2","y2","key"],vye=["offset"];function Rs(e){"@babel/helpers - typeof";return Rs=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},Rs(e)}function X$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Kn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?X$(Object(n),!0).forEach(function(r){gye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gye(e,t,n){return t=yye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yye(e){var t=bye(e,"string");return Rs(t)=="symbol"?t:t+""}function bye(e,t){if(Rs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hs(){return hs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hs.apply(this,arguments)}function Q$(e,t){if(e==null)return{};var n=xye(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xye(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var wye=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,a=t.x,o=t.y,l=t.width,u=t.height,f=t.ry;return q.createElement("rect",{x:a,y:o,ry:f,width:l,height:u,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function NU(e,t){var n;if(q.isValidElement(e))n=q.cloneElement(e,t);else if(at(e))n=e(t);else{var r=t.x1,a=t.y1,o=t.x2,l=t.y2,u=t.key,f=Q$(t,mye),d=ut(f,!1);d.offset;var m=Q$(d,vye);n=q.createElement("line",hs({},m,{x1:r,y1:a,x2:o,y2:l,fill:"none",key:u}))}return n}function Sye(e){var t=e.x,n=e.width,r=e.horizontal,a=r===void 0?!0:r,o=e.horizontalPoints;if(!a||!o||!o.length)return null;var l=o.map(function(u,f){var d=Kn(Kn({},e),{},{x1:t,y1:u,x2:t+n,y2:u,key:"line-".concat(f),index:f});return NU(a,d)});return q.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function _ye(e){var t=e.y,n=e.height,r=e.vertical,a=r===void 0?!0:r,o=e.verticalPoints;if(!a||!o||!o.length)return null;var l=o.map(function(u,f){var d=Kn(Kn({},e),{},{x1:u,y1:t,x2:u,y2:t+n,key:"line-".concat(f),index:f});return NU(a,d)});return q.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function Aye(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,a=e.y,o=e.width,l=e.height,u=e.horizontalPoints,f=e.horizontal,d=f===void 0?!0:f;if(!d||!t||!t.length)return null;var m=u.map(function(g){return Math.round(g+a-a)}).sort(function(g,x){return g-x});a!==m[0]&&m.unshift(0);var p=m.map(function(g,x){var A=!m[x+1],S=A?a+l-g:m[x+1]-g;if(S<=0)return null;var w=x%t.length;return q.createElement("rect",{key:"react-".concat(x),y:g,x:r,height:S,width:o,stroke:"none",fill:t[w],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return q.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function Oye(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,a=e.fillOpacity,o=e.x,l=e.y,u=e.width,f=e.height,d=e.verticalPoints;if(!n||!r||!r.length)return null;var m=d.map(function(g){return Math.round(g+o-o)}).sort(function(g,x){return g-x});o!==m[0]&&m.unshift(0);var p=m.map(function(g,x){var A=!m[x+1],S=A?o+u-g:m[x+1]-g;if(S<=0)return null;var w=x%r.length;return q.createElement("rect",{key:"react-".concat(x),x:g,y:l,width:S,height:f,stroke:"none",fill:r[w],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return q.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var Eye=function(t,n){var r=t.xAxis,a=t.width,o=t.height,l=t.offset;return V6(QO(Kn(Kn(Kn({},Du.defaultProps),r),{},{ticks:_i(r,!0),viewBox:{x:0,y:0,width:a,height:o}})),l.left,l.left+l.width,n)},jye=function(t,n){var r=t.yAxis,a=t.width,o=t.height,l=t.offset;return V6(QO(Kn(Kn(Kn({},Du.defaultProps),r),{},{ticks:_i(r,!0),viewBox:{x:0,y:0,width:a,height:o}})),l.top,l.top+l.height,n)},Tl={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function MU(e){var t,n,r,a,o,l,u=ZO(),f=YO(),d=pge(),m=Kn(Kn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Tl.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Tl.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Tl.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:Tl.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:Tl.vertical,verticalFill:(l=e.verticalFill)!==null&&l!==void 0?l:Tl.verticalFill,x:je(e.x)?e.x:d.left,y:je(e.y)?e.y:d.top,width:je(e.width)?e.width:d.width,height:je(e.height)?e.height:d.height}),p=m.x,g=m.y,x=m.width,A=m.height,S=m.syncWithTicks,w=m.horizontalValues,O=m.verticalValues,E=fge(),T=dge();if(!je(x)||x<=0||!je(A)||A<=0||!je(p)||p!==+p||!je(g)||g!==+g)return null;var C=m.verticalCoordinatesGenerator||Eye,j=m.horizontalCoordinatesGenerator||jye,R=m.horizontalPoints,N=m.verticalPoints;if((!R||!R.length)&&at(j)){var k=w&&w.length,$=j({yAxis:T?Kn(Kn({},T),{},{ticks:k?w:T.ticks}):void 0,width:u,height:f,offset:d},k?!0:S);Oi(Array.isArray($),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Rs($),"]")),Array.isArray($)&&(R=$)}if((!N||!N.length)&&at(C)){var V=O&&O.length,I=C({xAxis:E?Kn(Kn({},E),{},{ticks:V?O:E.ticks}):void 0,width:u,height:f,offset:d},V?!0:S);Oi(Array.isArray(I),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Rs(I),"]")),Array.isArray(I)&&(N=I)}return q.createElement("g",{className:"recharts-cartesian-grid"},q.createElement(wye,{fill:m.fill,fillOpacity:m.fillOpacity,x:m.x,y:m.y,width:m.width,height:m.height,ry:m.ry}),q.createElement(Sye,hs({},m,{offset:d,horizontalPoints:R,xAxis:E,yAxis:T})),q.createElement(_ye,hs({},m,{offset:d,verticalPoints:N,xAxis:E,yAxis:T})),q.createElement(Aye,hs({},m,{horizontalPoints:R})),q.createElement(Oye,hs({},m,{verticalPoints:N})))}MU.displayName="CartesianGrid";var Tye=["layout","type","stroke","connectNulls","isRange","ref"],Cye=["key"],PU;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 DU(e,t){if(e==null)return{};var n=Rye(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Rye(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ps(){return ps=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ps.apply(this,arguments)}function J$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function fo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?J$(Object(n),!0).forEach(function(r){qa(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ez(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$U(r.key),r)}}function Mye(e,t,n){return t&&ez(e.prototype,t),n&&ez(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pye(e,t,n){return t=Pm(t),Dye(e,kU()?Reflect.construct(t,n||[],Pm(e).constructor):t.apply(e,n))}function Dye(e,t){if(t&&(fu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kye(e)}function kye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kU=function(){return!!e})()}function Pm(e){return Pm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pm(e)}function $ye(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&&b_(e,t)}function b_(e,t){return b_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},b_(e,t)}function qa(e,t,n){return t=$U(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $U(e){var t=zye(e,"string");return fu(t)=="symbol"?t:t+""}function zye(e,t){if(fu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Lo=(function(e){function t(){var n;Nye(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=Pye(this,t,[].concat(a)),qa(n,"state",{isAnimationFinished:!0}),qa(n,"id",hd("recharts-area-")),qa(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),at(l)&&l()}),qa(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),at(l)&&l()}),n}return $ye(t,e),Mye(t,[{key:"renderDots",value:function(r,a,o){var l=this.props.isAnimationActive,u=this.state.isAnimationFinished;if(l&&!u)return null;var f=this.props,d=f.dot,m=f.points,p=f.dataKey,g=ut(this.props,!1),x=ut(d,!0),A=m.map(function(w,O){var E=fo(fo(fo({key:"dot-".concat(O),r:3},g),x),{},{index:O,cx:w.x,cy:w.y,dataKey:p,value:w.value,payload:w.payload,points:m});return t.renderDotItem(d,E)}),S={clipPath:r?"url(#clipPath-".concat(a?"":"dots-").concat(o,")"):null};return q.createElement(Jt,ps({className:"recharts-area-dots"},S),A)}},{key:"renderHorizontalRect",value:function(r){var a=this.props,o=a.baseLine,l=a.points,u=a.strokeWidth,f=l[0].x,d=l[l.length-1].x,m=r*Math.abs(f-d),p=vo(l.map(function(g){return g.y||0}));return je(o)&&typeof o=="number"?p=Math.max(o,p):o&&Array.isArray(o)&&o.length&&(p=Math.max(vo(o.map(function(g){return g.y||0})),p)),je(p)?q.createElement("rect",{x:f<d?f:f-m,y:0,width:m,height:Math.floor(p+(u?parseInt("".concat(u),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var a=this.props,o=a.baseLine,l=a.points,u=a.strokeWidth,f=l[0].y,d=l[l.length-1].y,m=r*Math.abs(f-d),p=vo(l.map(function(g){return g.x||0}));return je(o)&&typeof o=="number"?p=Math.max(o,p):o&&Array.isArray(o)&&o.length&&(p=Math.max(vo(o.map(function(g){return g.x||0})),p)),je(p)?q.createElement("rect",{x:0,y:f<d?f:f-m,width:p+(u?parseInt("".concat(u),10):1),height:Math.floor(m)}):null}},{key:"renderClipRect",value:function(r){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,a,o,l){var u=this.props,f=u.layout,d=u.type,m=u.stroke,p=u.connectNulls,g=u.isRange;u.ref;var x=DU(u,Tye);return q.createElement(Jt,{clipPath:o?"url(#clipPath-".concat(l,")"):null},q.createElement(ef,ps({},ut(x,!0),{points:r,connectNulls:p,type:d,baseLine:a,layout:f,stroke:"none",className:"recharts-area-area"})),m!=="none"&&q.createElement(ef,ps({},ut(this.props,!1),{className:"recharts-area-curve",layout:f,type:d,connectNulls:p,fill:"none",points:r})),m!=="none"&&g&&q.createElement(ef,ps({},ut(this.props,!1),{className:"recharts-area-curve",layout:f,type:d,connectNulls:p,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(r,a){var o=this,l=this.props,u=l.points,f=l.baseLine,d=l.isAnimationActive,m=l.animationBegin,p=l.animationDuration,g=l.animationEasing,x=l.animationId,A=this.state,S=A.prevPoints,w=A.prevBaseLine;return q.createElement(Pi,{begin:m,duration:p,isActive:d,easing:g,from:{t:0},to:{t:1},key:"area-".concat(x),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(O){var E=O.t;if(S){var T=S.length/u.length,C=u.map(function(k,$){var V=Math.floor($*T);if(S[V]){var I=S[V],L=Zr(I.x,k.x),H=Zr(I.y,k.y);return fo(fo({},k),{},{x:L(E),y:H(E)})}return k}),j;if(je(f)&&typeof f=="number"){var R=Zr(w,f);j=R(E)}else if(ht(f)||Tu(f)){var N=Zr(w,0);j=N(E)}else j=f.map(function(k,$){var V=Math.floor($*T);if(w[V]){var I=w[V],L=Zr(I.x,k.x),H=Zr(I.y,k.y);return fo(fo({},k),{},{x:L(E),y:H(E)})}return k});return o.renderAreaStatically(C,j,r,a)}return q.createElement(Jt,null,q.createElement("defs",null,q.createElement("clipPath",{id:"animationClipPath-".concat(a)},o.renderClipRect(E))),q.createElement(Jt,{clipPath:"url(#animationClipPath-".concat(a,")")},o.renderAreaStatically(u,f,r,a)))})}},{key:"renderArea",value:function(r,a){var o=this.props,l=o.points,u=o.baseLine,f=o.isAnimationActive,d=this.state,m=d.prevPoints,p=d.prevBaseLine,g=d.totalLength;return f&&l&&l.length&&(!m&&g>0||!Sf(m,l)||!Sf(p,u))?this.renderAreaWithAnimation(r,a):this.renderAreaStatically(l,u,r,a)}},{key:"render",value:function(){var r,a=this.props,o=a.hide,l=a.dot,u=a.points,f=a.className,d=a.top,m=a.left,p=a.xAxis,g=a.yAxis,x=a.width,A=a.height,S=a.isAnimationActive,w=a.id;if(o||!u||!u.length)return null;var O=this.state.isAnimationFinished,E=u.length===1,T=mt("recharts-area",f),C=p&&p.allowDataOverflow,j=g&&g.allowDataOverflow,R=C||j,N=ht(w)?this.id:w,k=(r=ut(l,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},$=k.r,V=$===void 0?3:$,I=k.strokeWidth,L=I===void 0?2:I,H=eae(l)?l:{},W=H.clipDot,Z=W===void 0?!0:W,z=V*2+L;return q.createElement(Jt,{className:T},C||j?q.createElement("defs",null,q.createElement("clipPath",{id:"clipPath-".concat(N)},q.createElement("rect",{x:C?m:m-x/2,y:j?d:d-A/2,width:C?x:x*2,height:j?A:A*2})),!Z&&q.createElement("clipPath",{id:"clipPath-dots-".concat(N)},q.createElement("rect",{x:m-z/2,y:d-z/2,width:x+z,height:A+z}))):null,E?null:this.renderArea(R,N),(l||E)&&this.renderDots(R,Z,N),(!S||O)&&wo.renderCallByParent(this.props,u))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:r.points!==a.curPoints||r.baseLine!==a.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])})(y.PureComponent);PU=Lo;qa(Lo,"displayName","Area");qa(Lo,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ru.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});qa(Lo,"getBaseValue",function(e,t,n,r){var a=e.layout,o=e.baseValue,l=t.props.baseValue,u=l??o;if(je(u)&&typeof u=="number")return u;var f=a==="horizontal"?r:n,d=f.scale.domain();if(f.type==="number"){var m=Math.max(d[0],d[1]),p=Math.min(d[0],d[1]);return u==="dataMin"?p:u==="dataMax"||m<0?m:Math.max(Math.min(d[0],d[1]),0)}return u==="dataMin"?d[0]:u==="dataMax"?d[1]:d[0]});qa(Lo,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,a=e.yAxis,o=e.xAxisTicks,l=e.yAxisTicks,u=e.bandSize,f=e.dataKey,d=e.stackedData,m=e.dataStartIndex,p=e.displayedData,g=e.offset,x=t.layout,A=d&&d.length,S=PU.getBaseValue(t,n,r,a),w=x==="horizontal",O=!1,E=p.map(function(C,j){var R;A?R=d[m+j]:(R=Mr(C,f),Array.isArray(R)?O=!0:R=[S,R]);var N=R[1]==null||A&&Mr(C,f)==null;return w?{x:yk({axis:r,ticks:o,bandSize:u,entry:C,index:j}),y:N?null:a.scale(R[1]),value:R,payload:C}:{x:N?null:r.scale(R[1]),y:yk({axis:a,ticks:l,bandSize:u,entry:C,index:j}),value:R,payload:C}}),T;return A||O?T=E.map(function(C){var j=Array.isArray(C.value)?C.value[0]:null;return w?{x:C.x,y:j!=null&&C.y!=null?a.scale(j):null}:{x:j!=null?r.scale(j):null,y:C.y}}):T=w?a.scale(S):r.scale(S),fo({points:E,baseLine:T,layout:x,isRange:O},g)});qa(Lo,"renderDotItem",function(e,t){var n;if(q.isValidElement(e))n=q.cloneElement(e,t);else if(at(e))n=e(t);else{var r=mt("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,o=DU(t,Cye);n=q.createElement(FO,ps({},o,{key:a,className:r}))}return n});function du(e){"@babel/helpers - typeof";return du=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},du(e)}function Lye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Iye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,IU(r.key),r)}}function Bye(e,t,n){return t&&Iye(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Uye(e,t,n){return t=Dm(t),qye(e,zU()?Reflect.construct(t,n||[],Dm(e).constructor):t.apply(e,n))}function qye(e,t){if(t&&(du(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hye(e)}function Hye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zU=function(){return!!e})()}function Dm(e){return Dm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Dm(e)}function Fye(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&&x_(e,t)}function x_(e,t){return x_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},x_(e,t)}function LU(e,t,n){return t=IU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IU(e){var t=Vye(e,"string");return du(t)=="symbol"?t:t+""}function Vye(e,t){if(du(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(du(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function w_(){return w_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w_.apply(this,arguments)}function Gye(e){var t=e.xAxisId,n=ZO(),r=YO(),a=xU(t);return a==null?null:y.createElement(Du,w_({},a,{className:mt("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(l){return _i(l,!0)}}))}var Qv=(function(e){function t(){return Lye(this,t),Uye(this,t,arguments)}return Fye(t,e),Bye(t,[{key:"render",value:function(){return y.createElement(Gye,this.props)}}])})(y.Component);LU(Qv,"displayName","XAxis");LU(Qv,"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 hu(e){"@babel/helpers - typeof";return hu=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},hu(e)}function Wye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qU(r.key),r)}}function Yye(e,t,n){return t&&Zye(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kye(e,t,n){return t=km(t),Xye(e,BU()?Reflect.construct(t,n||[],km(e).constructor):t.apply(e,n))}function Xye(e,t){if(t&&(hu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qye(e)}function Qye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function BU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(BU=function(){return!!e})()}function km(e){return km=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},km(e)}function Jye(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&&S_(e,t)}function S_(e,t){return S_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},S_(e,t)}function UU(e,t,n){return t=qU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qU(e){var t=ebe(e,"string");return hu(t)=="symbol"?t:t+""}function ebe(e,t){if(hu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function __(){return __=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},__.apply(this,arguments)}var tbe=function(t){var n=t.yAxisId,r=ZO(),a=YO(),o=wU(n);return o==null?null:y.createElement(Du,__({},o,{className:mt("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:r,height:a},ticksGenerator:function(u){return _i(u,!0)}}))},Jv=(function(e){function t(){return Wye(this,t),Kye(this,t,arguments)}return Jye(t,e),Yye(t,[{key:"render",value:function(){return y.createElement(tbe,this.props)}}])})(y.Component);UU(Jv,"displayName","YAxis");UU(Jv,"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 tz(e){return ibe(e)||abe(e)||rbe(e)||nbe()}function nbe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
485
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rbe(e,t){if(e){if(typeof e=="string")return A_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return A_(e,t)}}function abe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ibe(e){if(Array.isArray(e))return A_(e)}function A_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var O_=function(t,n,r,a,o){var l=Oa(t,XO),u=Oa(t,Yv),f=[].concat(tz(l),tz(u)),d=Oa(t,Xv),m="".concat(a,"Id"),p=a[0],g=n;if(f.length&&(g=f.reduce(function(S,w){if(w.props[m]===r&&Wa(w.props,"extendDomain")&&je(w.props[p])){var O=w.props[p];return[Math.min(S[0],O),Math.max(S[1],O)]}return S},g)),d.length){var x="".concat(p,"1"),A="".concat(p,"2");g=d.reduce(function(S,w){if(w.props[m]===r&&Wa(w.props,"extendDomain")&&je(w.props[x])&&je(w.props[A])){var O=w.props[x],E=w.props[A];return[Math.min(S[0],O,E),Math.max(S[1],O,E)]}return S},g)}return o&&o.length&&(g=o.reduce(function(S,w){return je(w)?[Math.min(S[0],w),Math.max(S[1],w)]:S},g)),g},R1={exports:{}},nz;function obe(){return nz||(nz=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function a(f,d,m){this.fn=f,this.context=d,this.once=m||!1}function o(f,d,m,p,g){if(typeof m!="function")throw new TypeError("The listener must be a function");var x=new a(m,p||f,g),A=n?n+d:d;return f._events[A]?f._events[A].fn?f._events[A]=[f._events[A],x]:f._events[A].push(x):(f._events[A]=x,f._eventsCount++),f}function l(f,d){--f._eventsCount===0?f._events=new r:delete f._events[d]}function u(){this._events=new r,this._eventsCount=0}u.prototype.eventNames=function(){var d=[],m,p;if(this._eventsCount===0)return d;for(p in m=this._events)t.call(m,p)&&d.push(n?p.slice(1):p);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(m)):d},u.prototype.listeners=function(d){var m=n?n+d:d,p=this._events[m];if(!p)return[];if(p.fn)return[p.fn];for(var g=0,x=p.length,A=new Array(x);g<x;g++)A[g]=p[g].fn;return A},u.prototype.listenerCount=function(d){var m=n?n+d:d,p=this._events[m];return p?p.fn?1:p.length:0},u.prototype.emit=function(d,m,p,g,x,A){var S=n?n+d:d;if(!this._events[S])return!1;var w=this._events[S],O=arguments.length,E,T;if(w.fn){switch(w.once&&this.removeListener(d,w.fn,void 0,!0),O){case 1:return w.fn.call(w.context),!0;case 2:return w.fn.call(w.context,m),!0;case 3:return w.fn.call(w.context,m,p),!0;case 4:return w.fn.call(w.context,m,p,g),!0;case 5:return w.fn.call(w.context,m,p,g,x),!0;case 6:return w.fn.call(w.context,m,p,g,x,A),!0}for(T=1,E=new Array(O-1);T<O;T++)E[T-1]=arguments[T];w.fn.apply(w.context,E)}else{var C=w.length,j;for(T=0;T<C;T++)switch(w[T].once&&this.removeListener(d,w[T].fn,void 0,!0),O){case 1:w[T].fn.call(w[T].context);break;case 2:w[T].fn.call(w[T].context,m);break;case 3:w[T].fn.call(w[T].context,m,p);break;case 4:w[T].fn.call(w[T].context,m,p,g);break;default:if(!E)for(j=1,E=new Array(O-1);j<O;j++)E[j-1]=arguments[j];w[T].fn.apply(w[T].context,E)}}return!0},u.prototype.on=function(d,m,p){return o(this,d,m,p,!1)},u.prototype.once=function(d,m,p){return o(this,d,m,p,!0)},u.prototype.removeListener=function(d,m,p,g){var x=n?n+d:d;if(!this._events[x])return this;if(!m)return l(this,x),this;var A=this._events[x];if(A.fn)A.fn===m&&(!g||A.once)&&(!p||A.context===p)&&l(this,x);else{for(var S=0,w=[],O=A.length;S<O;S++)(A[S].fn!==m||g&&!A[S].once||p&&A[S].context!==p)&&w.push(A[S]);w.length?this._events[x]=w.length===1?w[0]:w:l(this,x)}return this},u.prototype.removeAllListeners=function(d){var m;return d?(m=n?n+d:d,this._events[m]&&l(this,m)):(this._events=new r,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=n,u.EventEmitter=u,e.exports=u})(R1)),R1.exports}var sbe=obe();const lbe=kt(sbe);var N1=new lbe,M1="recharts.syncMouseEvents";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 ube(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cbe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,HU(r.key),r)}}function fbe(e,t,n){return t&&cbe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function P1(e,t,n){return t=HU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HU(e){var t=dbe(e,"string");return Ff(t)=="symbol"?t:t+""}function dbe(e,t){if(Ff(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ff(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var hbe=(function(){function e(){ube(this,e),P1(this,"activeIndex",0),P1(this,"coordinateList",[]),P1(this,"layout","horizontal")}return fbe(e,[{key:"setDetails",value:function(n){var r,a=n.coordinateList,o=a===void 0?null:a,l=n.container,u=l===void 0?null:l,f=n.layout,d=f===void 0?null:f,m=n.offset,p=m===void 0?null:m,g=n.mouseHandlerCallback,x=g===void 0?null:g;this.coordinateList=(r=o??this.coordinateList)!==null&&r!==void 0?r:[],this.container=u??this.container,this.layout=d??this.layout,this.offset=p??this.offset,this.mouseHandlerCallback=x??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(n){if(this.coordinateList.length!==0)switch(n.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(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),o=a.x,l=a.y,u=a.height,f=this.coordinateList[this.activeIndex].coordinate,d=((n=window)===null||n===void 0?void 0:n.scrollX)||0,m=((r=window)===null||r===void 0?void 0:r.scrollY)||0,p=o+f+d,g=l+this.offset.top+u/2+m;this.mouseHandlerCallback({pageX:p,pageY:g})}}}])})();function pbe(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],a=e==null?void 0:e[1];if(r&&a&&je(r)&&je(a))return!0}return!1}function mbe(e,t,n,r){var a=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-a,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function FU(e){var t=e.cx,n=e.cy,r=e.radius,a=e.startAngle,o=e.endAngle,l=Bn(t,n,r,a),u=Bn(t,n,r,o);return{points:[l,u],cx:t,cy:n,radius:r,startAngle:a,endAngle:o}}function vbe(e,t,n){var r,a,o,l;if(e==="horizontal")r=t.x,o=r,a=n.top,l=n.top+n.height;else if(e==="vertical")a=t.y,l=a,r=n.left,o=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var u=t.cx,f=t.cy,d=t.innerRadius,m=t.outerRadius,p=t.angle,g=Bn(u,f,d,p),x=Bn(u,f,m,p);r=g.x,a=g.y,o=x.x,l=x.y}else return FU(t);return[{x:r,y:a},{x:o,y:l}]}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 rz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function tp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rz(Object(n),!0).forEach(function(r){gbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gbe(e,t,n){return t=ybe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ybe(e){var t=bbe(e,"string");return Vf(t)=="symbol"?t:t+""}function bbe(e,t){if(Vf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xbe(e){var t,n,r=e.element,a=e.tooltipEventType,o=e.isActive,l=e.activeCoordinate,u=e.activePayload,f=e.offset,d=e.activeTooltipIndex,m=e.tooltipAxisBandSize,p=e.layout,g=e.chartName,x=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!x||!o||!l||g!=="ScatterChart"&&a!=="axis")return null;var A,S=ef;if(g==="ScatterChart")A=l,S=wme;else if(g==="BarChart")A=mbe(p,l,f,m),S=HO;else if(p==="radial"){var w=FU(l),O=w.cx,E=w.cy,T=w.radius,C=w.startAngle,j=w.endAngle;A={cx:O,cy:E,startAngle:C,endAngle:j,innerRadius:T,outerRadius:T},S=K6}else A={points:vbe(p,l,f)},S=ef;var R=tp(tp(tp(tp({stroke:"#ccc",pointerEvents:"none"},f),A),ut(x,!1)),{},{payload:u,payloadIndex:d,className:mt("recharts-tooltip-cursor",x.className)});return y.isValidElement(x)?y.cloneElement(x,R):y.createElement(S,R)}var wbe=["item"],Sbe=["children","className","width","height","style","compact","title","desc"];function pu(e){"@babel/helpers - typeof";return pu=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},pu(e)}function Ml(){return Ml=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ml.apply(this,arguments)}function az(e,t){return Obe(e)||Abe(e,t)||GU(e,t)||_be()}function _be(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
486
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Abe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,u=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);f=!0);}catch(m){d=!0,a=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw a}}return u}}function Obe(e){if(Array.isArray(e))return e}function iz(e,t){if(e==null)return{};var n=Ebe(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ebe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function jbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tbe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,WU(r.key),r)}}function Cbe(e,t,n){return t&&Tbe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Rbe(e,t,n){return t=$m(t),Nbe(e,VU()?Reflect.construct(t,n||[],$m(e).constructor):t.apply(e,n))}function Nbe(e,t){if(t&&(pu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mbe(e)}function Mbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function VU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(VU=function(){return!!e})()}function $m(e){return $m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$m(e)}function Pbe(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&&E_(e,t)}function E_(e,t){return E_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},E_(e,t)}function mu(e){return $be(e)||kbe(e)||GU(e)||Dbe()}function Dbe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
487
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GU(e,t){if(e){if(typeof e=="string")return j_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j_(e,t)}}function kbe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $be(e){if(Array.isArray(e))return j_(e)}function j_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function oz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function pe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oz(Object(n),!0).forEach(function(r){We(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function We(e,t,n){return t=WU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WU(e){var t=zbe(e,"string");return pu(t)=="symbol"?t:t+""}function zbe(e,t){if(pu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lbe={xAxis:["bottom","top"],yAxis:["left","right"]},Ibe={width:"100%",height:"100%"},ZU={x:0,y:0};function np(e){return e}var Bbe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},Ube=function(t,n,r,a){var o=n.find(function(m){return m&&m.index===r});if(o){if(t==="horizontal")return{x:o.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:o.coordinate};if(t==="centric"){var l=o.coordinate,u=a.radius;return pe(pe(pe({},a),Bn(a.cx,a.cy,u,l)),{},{angle:l,radius:u})}var f=o.coordinate,d=a.angle;return pe(pe(pe({},a),Bn(a.cx,a.cy,f,d)),{},{angle:d,radius:f})}return ZU},eg=function(t,n){var r=n.graphicalItems,a=n.dataStartIndex,o=n.dataEndIndex,l=(r??[]).reduce(function(u,f){var d=f.props.data;return d&&d.length?[].concat(mu(u),mu(d)):u},[]);return l.length>0?l:t&&t.length&&je(a)&&je(o)?t.slice(a,o+1):[]};function YU(e){return e==="number"?[0,"auto"]:void 0}var T_=function(t,n,r,a){var o=t.graphicalItems,l=t.tooltipAxis,u=eg(n,t);return r<0||!o||!o.length||r>=u.length?null:o.reduce(function(f,d){var m,p=(m=d.props.data)!==null&&m!==void 0?m:n;p&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(p=p.slice(t.dataStartIndex,t.dataEndIndex+1));var g;if(l.dataKey&&!l.allowDuplicatedCategory){var x=p===void 0?u:p;g=Ip(x,l.dataKey,a)}else g=p&&p[r]||u[r];return g?[].concat(mu(f),[W6(d,g)]):f},[])},sz=function(t,n,r,a){var o=a||{x:t.chartX,y:t.chartY},l=Bbe(o,r),u=t.orderedTooltipTicks,f=t.tooltipAxis,d=t.tooltipTicks,m=ede(l,u,d,f);if(m>=0&&d){var p=d[m]&&d[m].value,g=T_(t,n,m,p),x=Ube(r,u,m,o);return{activeTooltipIndex:m,activeLabel:p,activePayload:g,activeCoordinate:x}}return null},qbe=function(t,n){var r=n.axes,a=n.graphicalItems,o=n.axisType,l=n.axisIdKey,u=n.stackGroups,f=n.dataStartIndex,d=n.dataEndIndex,m=t.layout,p=t.children,g=t.stackOffset,x=F6(m,o);return r.reduce(function(A,S){var w,O=S.type.defaultProps!==void 0?pe(pe({},S.type.defaultProps),S.props):S.props,E=O.type,T=O.dataKey,C=O.allowDataOverflow,j=O.allowDuplicatedCategory,R=O.scale,N=O.ticks,k=O.includeHidden,$=O[l];if(A[$])return A;var V=eg(t.data,{graphicalItems:a.filter(function(U){var ne,me=l in U.props?U.props[l]:(ne=U.type.defaultProps)===null||ne===void 0?void 0:ne[l];return me===$}),dataStartIndex:f,dataEndIndex:d}),I=V.length,L,H,W;pbe(O.domain,C,E)&&(L=WS(O.domain,null,C),x&&(E==="number"||R!=="auto")&&(W=Jc(V,T,"category")));var Z=YU(E);if(!L||L.length===0){var z,F=(z=O.domain)!==null&&z!==void 0?z:Z;if(T){if(L=Jc(V,T,E),E==="category"&&x){var Y=Fre(L);j&&Y?(H=L,L=_m(0,I)):j||(L=Sk(F,L,S).reduce(function(U,ne){return U.indexOf(ne)>=0?U:[].concat(mu(U),[ne])},[]))}else if(E==="category")j?L=L.filter(function(U){return U!==""&&!ht(U)}):L=Sk(F,L,S).reduce(function(U,ne){return U.indexOf(ne)>=0||ne===""||ht(ne)?U:[].concat(mu(U),[ne])},[]);else if(E==="number"){var Q=ide(V,a.filter(function(U){var ne,me,Ae=l in U.props?U.props[l]:(ne=U.type.defaultProps)===null||ne===void 0?void 0:ne[l],ce="hide"in U.props?U.props.hide:(me=U.type.defaultProps)===null||me===void 0?void 0:me.hide;return Ae===$&&(k||!ce)}),T,o,m);Q&&(L=Q)}x&&(E==="number"||R!=="auto")&&(W=Jc(V,T,"category"))}else x?L=_m(0,I):u&&u[$]&&u[$].hasStack&&E==="number"?L=g==="expand"?[0,1]:G6(u[$].stackGroups,f,d):L=H6(V,a.filter(function(U){var ne=l in U.props?U.props[l]:U.type.defaultProps[l],me="hide"in U.props?U.props.hide:U.type.defaultProps.hide;return ne===$&&(k||!me)}),E,m,!0);if(E==="number")L=O_(p,L,$,o,N),F&&(L=WS(F,L,C));else if(E==="category"&&F){var K=F,P=L.every(function(U){return K.indexOf(U)>=0});P&&(L=K)}}return pe(pe({},A),{},We({},$,pe(pe({},O),{},{axisType:o,domain:L,categoricalDomain:W,duplicateDomain:H,originalDomain:(w=O.domain)!==null&&w!==void 0?w:Z,isCategorical:x,layout:m})))},{})},Hbe=function(t,n){var r=n.graphicalItems,a=n.Axis,o=n.axisType,l=n.axisIdKey,u=n.stackGroups,f=n.dataStartIndex,d=n.dataEndIndex,m=t.layout,p=t.children,g=eg(t.data,{graphicalItems:r,dataStartIndex:f,dataEndIndex:d}),x=g.length,A=F6(m,o),S=-1;return r.reduce(function(w,O){var E=O.type.defaultProps!==void 0?pe(pe({},O.type.defaultProps),O.props):O.props,T=E[l],C=YU("number");if(!w[T]){S++;var j;return A?j=_m(0,x):u&&u[T]&&u[T].hasStack?(j=G6(u[T].stackGroups,f,d),j=O_(p,j,T,o)):(j=WS(C,H6(g,r.filter(function(R){var N,k,$=l in R.props?R.props[l]:(N=R.type.defaultProps)===null||N===void 0?void 0:N[l],V="hide"in R.props?R.props.hide:(k=R.type.defaultProps)===null||k===void 0?void 0:k.hide;return $===T&&!V}),"number",m),a.defaultProps.allowDataOverflow),j=O_(p,j,T,o)),pe(pe({},w),{},We({},T,pe(pe({axisType:o},a.defaultProps),{},{hide:!0,orientation:ta(Lbe,"".concat(o,".").concat(S%2),null),domain:j,originalDomain:C,isCategorical:A,layout:m})))}return w},{})},Fbe=function(t,n){var r=n.axisType,a=r===void 0?"xAxis":r,o=n.AxisComp,l=n.graphicalItems,u=n.stackGroups,f=n.dataStartIndex,d=n.dataEndIndex,m=t.children,p="".concat(a,"Id"),g=Oa(m,o),x={};return g&&g.length?x=qbe(t,{axes:g,graphicalItems:l,axisType:a,axisIdKey:p,stackGroups:u,dataStartIndex:f,dataEndIndex:d}):l&&l.length&&(x=Hbe(t,{Axis:o,graphicalItems:l,axisType:a,axisIdKey:p,stackGroups:u,dataStartIndex:f,dataEndIndex:d})),x},Vbe=function(t){var n=mo(t),r=_i(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:vO(r,function(a){return a.coordinate}),tooltipAxis:n,tooltipAxisBandSize:hm(n,r)}},lz=function(t){var n=t.children,r=t.defaultShowTooltip,a=Er(n,iu),o=0,l=0;return t.data&&t.data.length!==0&&(l=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(o=a.props.startIndex),a.props.endIndex>=0&&(l=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:l,activeTooltipIndex:-1,isTooltipActive:!!r}},Gbe=function(t){return!t||!t.length?!1:t.some(function(n){var r=Ai(n&&n.type);return r&&r.indexOf("Bar")>=0})},uz=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"}},Wbe=function(t,n){var r=t.props,a=t.graphicalItems,o=t.xAxisMap,l=o===void 0?{}:o,u=t.yAxisMap,f=u===void 0?{}:u,d=r.width,m=r.height,p=r.children,g=r.margin||{},x=Er(p,iu),A=Er(p,Ll),S=Object.keys(f).reduce(function(j,R){var N=f[R],k=N.orientation;return!N.mirror&&!N.hide?pe(pe({},j),{},We({},k,j[k]+N.width)):j},{left:g.left||0,right:g.right||0}),w=Object.keys(l).reduce(function(j,R){var N=l[R],k=N.orientation;return!N.mirror&&!N.hide?pe(pe({},j),{},We({},k,ta(j,"".concat(k))+N.height)):j},{top:g.top||0,bottom:g.bottom||0}),O=pe(pe({},w),S),E=O.bottom;x&&(O.bottom+=x.props.height||iu.defaultProps.height),A&&n&&(O=rde(O,a,r,n));var T=d-O.left-O.right,C=m-O.top-O.bottom;return pe(pe({brushBottom:E},O),{},{width:Math.max(T,0),height:Math.max(C,0)})},Zbe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},Ybe=function(t){var n=t.chartName,r=t.GraphicalChild,a=t.defaultTooltipEventType,o=a===void 0?"axis":a,l=t.validateTooltipEventTypes,u=l===void 0?["axis"]:l,f=t.axisComponents,d=t.legendContent,m=t.formatAxisMap,p=t.defaultProps,g=function(O,E){var T=E.graphicalItems,C=E.stackGroups,j=E.offset,R=E.updateId,N=E.dataStartIndex,k=E.dataEndIndex,$=O.barSize,V=O.layout,I=O.barGap,L=O.barCategoryGap,H=O.maxBarSize,W=uz(V),Z=W.numericAxisName,z=W.cateAxisName,F=Gbe(T),Y=[];return T.forEach(function(Q,K){var P=eg(O.data,{graphicalItems:[Q],dataStartIndex:N,dataEndIndex:k}),U=Q.type.defaultProps!==void 0?pe(pe({},Q.type.defaultProps),Q.props):Q.props,ne=U.dataKey,me=U.maxBarSize,Ae=U["".concat(Z,"Id")],ce=U["".concat(z,"Id")],de={},Ce=f.reduce(function(fn,Pn){var Hn=E["".concat(Pn.axisType,"Map")],B=U["".concat(Pn.axisType,"Id")];Hn&&Hn[B]||Pn.axisType==="zAxis"||Cs();var J=Hn[B];return pe(pe({},fn),{},We(We({},Pn.axisType,J),"".concat(Pn.axisType,"Ticks"),_i(J)))},de),le=Ce[z],_e=Ce["".concat(z,"Ticks")],Se=C&&C[Ae]&&C[Ae].hasStack&&gde(Q,C[Ae].stackGroups),se=Ai(Q.type).indexOf("Bar")>=0,Ve=hm(le,_e),$e=[],Je=F&&tde({barSize:$,stackGroups:C,totalSize:Zbe(Ce,z)});if(se){var Ke,vt,$t=ht(me)?H:me,qt=(Ke=(vt=hm(le,_e,!0))!==null&&vt!==void 0?vt:$t)!==null&&Ke!==void 0?Ke:0;$e=nde({barGap:I,barCategoryGap:L,bandSize:qt!==Ve?qt:Ve,sizeList:Je[ce],maxBarSize:$t}),qt!==Ve&&($e=$e.map(function(fn){return pe(pe({},fn),{},{position:pe(pe({},fn.position),{},{offset:fn.position.offset-qt/2})})}))}var Tn=Q&&Q.type&&Q.type.getComposedData;Tn&&Y.push({props:pe(pe({},Tn(pe(pe({},Ce),{},{displayedData:P,props:O,dataKey:ne,item:Q,bandSize:Ve,barPosition:$e,offset:j,stackedData:Se,layout:V,dataStartIndex:N,dataEndIndex:k}))),{},We(We(We({key:Q.key||"item-".concat(K)},Z,Ce[Z]),z,Ce[z]),"animationId",R)),childIndex:rae(Q,O.children),item:Q})}),Y},x=function(O,E){var T=O.props,C=O.dataStartIndex,j=O.dataEndIndex,R=O.updateId;if(!$N({props:T}))return null;var N=T.children,k=T.layout,$=T.stackOffset,V=T.data,I=T.reverseStackOrder,L=uz(k),H=L.numericAxisName,W=L.cateAxisName,Z=Oa(N,r),z=pde(V,Z,"".concat(H,"Id"),"".concat(W,"Id"),$,I),F=f.reduce(function(U,ne){var me="".concat(ne.axisType,"Map");return pe(pe({},U),{},We({},me,Fbe(T,pe(pe({},ne),{},{graphicalItems:Z,stackGroups:ne.axisType===H&&z,dataStartIndex:C,dataEndIndex:j}))))},{}),Y=Wbe(pe(pe({},F),{},{props:T,graphicalItems:Z}),E==null?void 0:E.legendBBox);Object.keys(F).forEach(function(U){F[U]=m(T,F[U],Y,U.replace("Map",""),n)});var Q=F["".concat(W,"Map")],K=Vbe(Q),P=g(T,pe(pe({},F),{},{dataStartIndex:C,dataEndIndex:j,updateId:R,graphicalItems:Z,stackGroups:z,offset:Y}));return pe(pe({formattedGraphicalItems:P,graphicalItems:Z,offset:Y,stackGroups:z},K),F)},A=(function(w){function O(E){var T,C,j;return jbe(this,O),j=Rbe(this,O,[E]),We(j,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),We(j,"accessibilityManager",new hbe),We(j,"handleLegendBBoxUpdate",function(R){if(R){var N=j.state,k=N.dataStartIndex,$=N.dataEndIndex,V=N.updateId;j.setState(pe({legendBBox:R},x({props:j.props,dataStartIndex:k,dataEndIndex:$,updateId:V},pe(pe({},j.state),{},{legendBBox:R}))))}}),We(j,"handleReceiveSyncEvent",function(R,N,k){if(j.props.syncId===R){if(k===j.eventEmitterSymbol&&typeof j.props.syncMethod!="function")return;j.applySyncEvent(N)}}),We(j,"handleBrushChange",function(R){var N=R.startIndex,k=R.endIndex;if(N!==j.state.dataStartIndex||k!==j.state.dataEndIndex){var $=j.state.updateId;j.setState(function(){return pe({dataStartIndex:N,dataEndIndex:k},x({props:j.props,dataStartIndex:N,dataEndIndex:k,updateId:$},j.state))}),j.triggerSyncEvent({dataStartIndex:N,dataEndIndex:k})}}),We(j,"handleMouseEnter",function(R){var N=j.getMouseInfo(R);if(N){var k=pe(pe({},N),{},{isTooltipActive:!0});j.setState(k),j.triggerSyncEvent(k);var $=j.props.onMouseEnter;at($)&&$(k,R)}}),We(j,"triggeredAfterMouseMove",function(R){var N=j.getMouseInfo(R),k=N?pe(pe({},N),{},{isTooltipActive:!0}):{isTooltipActive:!1};j.setState(k),j.triggerSyncEvent(k);var $=j.props.onMouseMove;at($)&&$(k,R)}),We(j,"handleItemMouseEnter",function(R){j.setState(function(){return{isTooltipActive:!0,activeItem:R,activePayload:R.tooltipPayload,activeCoordinate:R.tooltipPosition||{x:R.cx,y:R.cy}}})}),We(j,"handleItemMouseLeave",function(){j.setState(function(){return{isTooltipActive:!1}})}),We(j,"handleMouseMove",function(R){R.persist(),j.throttleTriggeredAfterMouseMove(R)}),We(j,"handleMouseLeave",function(R){j.throttleTriggeredAfterMouseMove.cancel();var N={isTooltipActive:!1};j.setState(N),j.triggerSyncEvent(N);var k=j.props.onMouseLeave;at(k)&&k(N,R)}),We(j,"handleOuterEvent",function(R){var N=nae(R),k=ta(j.props,"".concat(N));if(N&&at(k)){var $,V;/.*touch.*/i.test(N)?V=j.getMouseInfo(R.changedTouches[0]):V=j.getMouseInfo(R),k(($=V)!==null&&$!==void 0?$:{},R)}}),We(j,"handleClick",function(R){var N=j.getMouseInfo(R);if(N){var k=pe(pe({},N),{},{isTooltipActive:!0});j.setState(k),j.triggerSyncEvent(k);var $=j.props.onClick;at($)&&$(k,R)}}),We(j,"handleMouseDown",function(R){var N=j.props.onMouseDown;if(at(N)){var k=j.getMouseInfo(R);N(k,R)}}),We(j,"handleMouseUp",function(R){var N=j.props.onMouseUp;if(at(N)){var k=j.getMouseInfo(R);N(k,R)}}),We(j,"handleTouchMove",function(R){R.changedTouches!=null&&R.changedTouches.length>0&&j.throttleTriggeredAfterMouseMove(R.changedTouches[0])}),We(j,"handleTouchStart",function(R){R.changedTouches!=null&&R.changedTouches.length>0&&j.handleMouseDown(R.changedTouches[0])}),We(j,"handleTouchEnd",function(R){R.changedTouches!=null&&R.changedTouches.length>0&&j.handleMouseUp(R.changedTouches[0])}),We(j,"handleDoubleClick",function(R){var N=j.props.onDoubleClick;if(at(N)){var k=j.getMouseInfo(R);N(k,R)}}),We(j,"handleContextMenu",function(R){var N=j.props.onContextMenu;if(at(N)){var k=j.getMouseInfo(R);N(k,R)}}),We(j,"triggerSyncEvent",function(R){j.props.syncId!==void 0&&N1.emit(M1,j.props.syncId,R,j.eventEmitterSymbol)}),We(j,"applySyncEvent",function(R){var N=j.props,k=N.layout,$=N.syncMethod,V=j.state.updateId,I=R.dataStartIndex,L=R.dataEndIndex;if(R.dataStartIndex!==void 0||R.dataEndIndex!==void 0)j.setState(pe({dataStartIndex:I,dataEndIndex:L},x({props:j.props,dataStartIndex:I,dataEndIndex:L,updateId:V},j.state)));else if(R.activeTooltipIndex!==void 0){var H=R.chartX,W=R.chartY,Z=R.activeTooltipIndex,z=j.state,F=z.offset,Y=z.tooltipTicks;if(!F)return;if(typeof $=="function")Z=$(Y,R);else if($==="value"){Z=-1;for(var Q=0;Q<Y.length;Q++)if(Y[Q].value===R.activeLabel){Z=Q;break}}var K=pe(pe({},F),{},{x:F.left,y:F.top}),P=Math.min(H,K.x+K.width),U=Math.min(W,K.y+K.height),ne=Y[Z]&&Y[Z].value,me=T_(j.state,j.props.data,Z),Ae=Y[Z]?{x:k==="horizontal"?Y[Z].coordinate:P,y:k==="horizontal"?U:Y[Z].coordinate}:ZU;j.setState(pe(pe({},R),{},{activeLabel:ne,activeCoordinate:Ae,activePayload:me,activeTooltipIndex:Z}))}else j.setState(R)}),We(j,"renderCursor",function(R){var N,k=j.state,$=k.isTooltipActive,V=k.activeCoordinate,I=k.activePayload,L=k.offset,H=k.activeTooltipIndex,W=k.tooltipAxisBandSize,Z=j.getTooltipEventType(),z=(N=R.props.active)!==null&&N!==void 0?N:$,F=j.props.layout,Y=R.key||"_recharts-cursor";return q.createElement(xbe,{key:Y,activeCoordinate:V,activePayload:I,activeTooltipIndex:H,chartName:n,element:R,isActive:z,layout:F,offset:L,tooltipAxisBandSize:W,tooltipEventType:Z})}),We(j,"renderPolarAxis",function(R,N,k){var $=ta(R,"type.axisType"),V=ta(j.state,"".concat($,"Map")),I=R.type.defaultProps,L=I!==void 0?pe(pe({},I),R.props):R.props,H=V&&V[L["".concat($,"Id")]];return y.cloneElement(R,pe(pe({},H),{},{className:mt($,H.className),key:R.key||"".concat(N,"-").concat(k),ticks:_i(H,!0)}))}),We(j,"renderPolarGrid",function(R){var N=R.props,k=N.radialLines,$=N.polarAngles,V=N.polarRadius,I=j.state,L=I.radiusAxisMap,H=I.angleAxisMap,W=mo(L),Z=mo(H),z=Z.cx,F=Z.cy,Y=Z.innerRadius,Q=Z.outerRadius;return y.cloneElement(R,{polarAngles:Array.isArray($)?$:_i(Z,!0).map(function(K){return K.coordinate}),polarRadius:Array.isArray(V)?V:_i(W,!0).map(function(K){return K.coordinate}),cx:z,cy:F,innerRadius:Y,outerRadius:Q,key:R.key||"polar-grid",radialLines:k})}),We(j,"renderLegend",function(){var R=j.state.formattedGraphicalItems,N=j.props,k=N.children,$=N.width,V=N.height,I=j.props.margin||{},L=$-(I.left||0)-(I.right||0),H=U6({children:k,formattedGraphicalItems:R,legendWidth:L,legendContent:d});if(!H)return null;var W=H.item,Z=iz(H,wbe);return y.cloneElement(W,pe(pe({},Z),{},{chartWidth:$,chartHeight:V,margin:I,onBBoxUpdate:j.handleLegendBBoxUpdate}))}),We(j,"renderTooltip",function(){var R,N=j.props,k=N.children,$=N.accessibilityLayer,V=Er(k,za);if(!V)return null;var I=j.state,L=I.isTooltipActive,H=I.activeCoordinate,W=I.activePayload,Z=I.activeLabel,z=I.offset,F=(R=V.props.active)!==null&&R!==void 0?R:L;return y.cloneElement(V,{viewBox:pe(pe({},z),{},{x:z.left,y:z.top}),active:F,label:Z,payload:F?W:[],coordinate:H,accessibilityLayer:$})}),We(j,"renderBrush",function(R){var N=j.props,k=N.margin,$=N.data,V=j.state,I=V.offset,L=V.dataStartIndex,H=V.dataEndIndex,W=V.updateId;return y.cloneElement(R,{key:R.key||"_recharts-brush",onChange:Xh(j.handleBrushChange,R.props.onChange),data:$,x:je(R.props.x)?R.props.x:I.left,y:je(R.props.y)?R.props.y:I.top+I.height+I.brushBottom-(k.bottom||0),width:je(R.props.width)?R.props.width:I.width,startIndex:L,endIndex:H,updateId:"brush-".concat(W)})}),We(j,"renderReferenceElement",function(R,N,k){if(!R)return null;var $=j,V=$.clipPathId,I=j.state,L=I.xAxisMap,H=I.yAxisMap,W=I.offset,Z=R.type.defaultProps||{},z=R.props,F=z.xAxisId,Y=F===void 0?Z.xAxisId:F,Q=z.yAxisId,K=Q===void 0?Z.yAxisId:Q;return y.cloneElement(R,{key:R.key||"".concat(N,"-").concat(k),xAxis:L[Y],yAxis:H[K],viewBox:{x:W.left,y:W.top,width:W.width,height:W.height},clipPathId:V})}),We(j,"renderActivePoints",function(R){var N=R.item,k=R.activePoint,$=R.basePoint,V=R.childIndex,I=R.isRange,L=[],H=N.props.key,W=N.item.type.defaultProps!==void 0?pe(pe({},N.item.type.defaultProps),N.item.props):N.item.props,Z=W.activeDot,z=W.dataKey,F=pe(pe({index:V,dataKey:z,cx:k.x,cy:k.y,r:4,fill:qO(N.item),strokeWidth:2,stroke:"#fff",payload:k.payload,value:k.value},ut(Z,!1)),Bp(Z));return L.push(O.renderActiveDot(Z,F,"".concat(H,"-activePoint-").concat(V))),$?L.push(O.renderActiveDot(Z,pe(pe({},F),{},{cx:$.x,cy:$.y}),"".concat(H,"-basePoint-").concat(V))):I&&L.push(null),L}),We(j,"renderGraphicChild",function(R,N,k){var $=j.filterFormatItem(R,N,k);if(!$)return null;var V=j.getTooltipEventType(),I=j.state,L=I.isTooltipActive,H=I.tooltipAxis,W=I.activeTooltipIndex,Z=I.activeLabel,z=j.props.children,F=Er(z,za),Y=$.props,Q=Y.points,K=Y.isRange,P=Y.baseLine,U=$.item.type.defaultProps!==void 0?pe(pe({},$.item.type.defaultProps),$.item.props):$.item.props,ne=U.activeDot,me=U.hide,Ae=U.activeBar,ce=U.activeShape,de=!!(!me&&L&&F&&(ne||Ae||ce)),Ce={};V!=="axis"&&F&&F.props.trigger==="click"?Ce={onClick:Xh(j.handleItemMouseEnter,R.props.onClick)}:V!=="axis"&&(Ce={onMouseLeave:Xh(j.handleItemMouseLeave,R.props.onMouseLeave),onMouseEnter:Xh(j.handleItemMouseEnter,R.props.onMouseEnter)});var le=y.cloneElement(R,pe(pe({},$.props),Ce));function _e(Pn){return typeof H.dataKey=="function"?H.dataKey(Pn.payload):null}if(de)if(W>=0){var Se,se;if(H.dataKey&&!H.allowDuplicatedCategory){var Ve=typeof H.dataKey=="function"?_e:"payload.".concat(H.dataKey.toString());Se=Ip(Q,Ve,Z),se=K&&P&&Ip(P,Ve,Z)}else Se=Q==null?void 0:Q[W],se=K&&P&&P[W];if(ce||Ae){var $e=R.props.activeIndex!==void 0?R.props.activeIndex:W;return[y.cloneElement(R,pe(pe(pe({},$.props),Ce),{},{activeIndex:$e})),null,null]}if(!ht(Se))return[le].concat(mu(j.renderActivePoints({item:$,activePoint:Se,basePoint:se,childIndex:W,isRange:K})))}else{var Je,Ke=(Je=j.getItemByXY(j.state.activeCoordinate))!==null&&Je!==void 0?Je:{graphicalItem:le},vt=Ke.graphicalItem,$t=vt.item,qt=$t===void 0?R:$t,Tn=vt.childIndex,fn=pe(pe(pe({},$.props),Ce),{},{activeIndex:Tn});return[y.cloneElement(qt,fn),null,null]}return K?[le,null,null]:[le,null]}),We(j,"renderCustomized",function(R,N,k){return y.cloneElement(R,pe(pe({key:"recharts-customized-".concat(k)},j.props),j.state))}),We(j,"renderMap",{CartesianGrid:{handler:np,once:!0},ReferenceArea:{handler:j.renderReferenceElement},ReferenceLine:{handler:np},ReferenceDot:{handler:j.renderReferenceElement},XAxis:{handler:np},YAxis:{handler:np},Brush:{handler:j.renderBrush,once:!0},Bar:{handler:j.renderGraphicChild},Line:{handler:j.renderGraphicChild},Area:{handler:j.renderGraphicChild},Radar:{handler:j.renderGraphicChild},RadialBar:{handler:j.renderGraphicChild},Scatter:{handler:j.renderGraphicChild},Pie:{handler:j.renderGraphicChild},Funnel:{handler:j.renderGraphicChild},Tooltip:{handler:j.renderCursor,once:!0},PolarGrid:{handler:j.renderPolarGrid,once:!0},PolarAngleAxis:{handler:j.renderPolarAxis},PolarRadiusAxis:{handler:j.renderPolarAxis},Customized:{handler:j.renderCustomized}}),j.clipPathId="".concat((T=E.id)!==null&&T!==void 0?T:hd("recharts"),"-clip"),j.throttleTriggeredAfterMouseMove=UB(j.triggeredAfterMouseMove,(C=E.throttleDelay)!==null&&C!==void 0?C:1e3/60),j.state={},j}return Pbe(O,w),Cbe(O,[{key:"componentDidMount",value:function(){var T,C;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(T=this.props.margin.left)!==null&&T!==void 0?T: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 T=this.props,C=T.children,j=T.data,R=T.height,N=T.layout,k=Er(C,za);if(k){var $=k.props.defaultIndex;if(!(typeof $!="number"||$<0||$>this.state.tooltipTicks.length-1)){var V=this.state.tooltipTicks[$]&&this.state.tooltipTicks[$].value,I=T_(this.state,j,$,V),L=this.state.tooltipTicks[$].coordinate,H=(this.state.offset.top+R)/2,W=N==="horizontal",Z=W?{x:L,y:H}:{y:L,x:H},z=this.state.formattedGraphicalItems.find(function(Y){var Q=Y.item;return Q.type.name==="Scatter"});z&&(Z=pe(pe({},Z),z.props.points[$].tooltipPosition),I=z.props.points[$].tooltipPayload);var F={activeTooltipIndex:$,isTooltipActive:!0,activeLabel:V,activePayload:I,activeCoordinate:Z};this.setState(F),this.renderCursor(k),this.accessibilityManager.setIndex($)}}}},{key:"getSnapshotBeforeUpdate",value:function(T,C){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==C.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==T.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==T.margin){var j,R;this.accessibilityManager.setDetails({offset:{left:(j=this.props.margin.left)!==null&&j!==void 0?j:0,top:(R=this.props.margin.top)!==null&&R!==void 0?R:0}})}return null}},{key:"componentDidUpdate",value:function(T){mS([Er(T.children,za)],[Er(this.props.children,za)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var T=Er(this.props.children,za);if(T&&typeof T.props.shared=="boolean"){var C=T.props.shared?"axis":"item";return u.indexOf(C)>=0?C:o}return o}},{key:"getMouseInfo",value:function(T){if(!this.container)return null;var C=this.container,j=C.getBoundingClientRect(),R=Fse(j),N={chartX:Math.round(T.pageX-R.left),chartY:Math.round(T.pageY-R.top)},k=j.width/C.offsetWidth||1,$=this.inRange(N.chartX,N.chartY,k);if(!$)return null;var V=this.state,I=V.xAxisMap,L=V.yAxisMap,H=this.getTooltipEventType(),W=sz(this.state,this.props.data,this.props.layout,$);if(H!=="axis"&&I&&L){var Z=mo(I).scale,z=mo(L).scale,F=Z&&Z.invert?Z.invert(N.chartX):null,Y=z&&z.invert?z.invert(N.chartY):null;return pe(pe({},N),{},{xValue:F,yValue:Y},W)}return W?pe(pe({},N),W):null}},{key:"inRange",value:function(T,C){var j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,R=this.props.layout,N=T/j,k=C/j;if(R==="horizontal"||R==="vertical"){var $=this.state.offset,V=N>=$.left&&N<=$.left+$.width&&k>=$.top&&k<=$.top+$.height;return V?{x:N,y:k}:null}var I=this.state,L=I.angleAxisMap,H=I.radiusAxisMap;if(L&&H){var W=mo(L);return Ok({x:N,y:k},W)}return null}},{key:"parseEventsOfWrapper",value:function(){var T=this.props.children,C=this.getTooltipEventType(),j=Er(T,za),R={};j&&C==="axis"&&(j.props.trigger==="click"?R={onClick:this.handleClick}:R={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 N=Bp(this.props,this.handleOuterEvent);return pe(pe({},N),R)}},{key:"addListener",value:function(){N1.on(M1,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){N1.removeListener(M1,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(T,C,j){for(var R=this.state.formattedGraphicalItems,N=0,k=R.length;N<k;N++){var $=R[N];if($.item===T||$.props.key===T.key||C===Ai($.item.type)&&j===$.childIndex)return $}return null}},{key:"renderClipPath",value:function(){var T=this.clipPathId,C=this.state.offset,j=C.left,R=C.top,N=C.height,k=C.width;return q.createElement("defs",null,q.createElement("clipPath",{id:T},q.createElement("rect",{x:j,y:R,height:N,width:k})))}},{key:"getXScales",value:function(){var T=this.state.xAxisMap;return T?Object.entries(T).reduce(function(C,j){var R=az(j,2),N=R[0],k=R[1];return pe(pe({},C),{},We({},N,k.scale))},{}):null}},{key:"getYScales",value:function(){var T=this.state.yAxisMap;return T?Object.entries(T).reduce(function(C,j){var R=az(j,2),N=R[0],k=R[1];return pe(pe({},C),{},We({},N,k.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(T){var C;return(C=this.state.xAxisMap)===null||C===void 0||(C=C[T])===null||C===void 0?void 0:C.scale}},{key:"getYScaleByAxisId",value:function(T){var C;return(C=this.state.yAxisMap)===null||C===void 0||(C=C[T])===null||C===void 0?void 0:C.scale}},{key:"getItemByXY",value:function(T){var C=this.state,j=C.formattedGraphicalItems,R=C.activeItem;if(j&&j.length)for(var N=0,k=j.length;N<k;N++){var $=j[N],V=$.props,I=$.item,L=I.type.defaultProps!==void 0?pe(pe({},I.type.defaultProps),I.props):I.props,H=Ai(I.type);if(H==="Bar"){var W=(V.data||[]).find(function(Y){return fme(T,Y)});if(W)return{graphicalItem:$,payload:W}}else if(H==="RadialBar"){var Z=(V.data||[]).find(function(Y){return Ok(T,Y)});if(Z)return{graphicalItem:$,payload:Z}}else if(Vv($,R)||Gv($,R)||If($,R)){var z=tve({graphicalItem:$,activeTooltipItem:R,itemData:L.data}),F=L.activeIndex===void 0?z:L.activeIndex;return{graphicalItem:pe(pe({},$),{},{childIndex:F}),payload:If($,R)?L.data[z]:$.props.data[z]}}}return null}},{key:"render",value:function(){var T=this;if(!$N(this))return null;var C=this.props,j=C.children,R=C.className,N=C.width,k=C.height,$=C.style,V=C.compact,I=C.title,L=C.desc,H=iz(C,Sbe),W=ut(H,!1);if(V)return q.createElement(B$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},q.createElement(gS,Ml({},W,{width:N,height:k,title:I,desc:L}),this.renderClipPath(),LN(j,this.renderMap)));if(this.props.accessibilityLayer){var Z,z;W.tabIndex=(Z=this.props.tabIndex)!==null&&Z!==void 0?Z:0,W.role=(z=this.props.role)!==null&&z!==void 0?z:"application",W.onKeyDown=function(Y){T.accessibilityManager.keyboardEvent(Y)},W.onFocus=function(){T.accessibilityManager.focus()}}var F=this.parseEventsOfWrapper();return q.createElement(B$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},q.createElement("div",Ml({className:mt("recharts-wrapper",R),style:pe({position:"relative",cursor:"default",width:N,height:k},$)},F,{ref:function(Q){T.container=Q}}),q.createElement(gS,Ml({},W,{width:N,height:k,title:I,desc:L,style:Ibe}),this.renderClipPath(),LN(j,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(y.Component);We(A,"displayName",n),We(A,"defaultProps",pe({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},p)),We(A,"getDerivedStateFromProps",function(w,O){var E=w.dataKey,T=w.data,C=w.children,j=w.width,R=w.height,N=w.layout,k=w.stackOffset,$=w.margin,V=O.dataStartIndex,I=O.dataEndIndex;if(O.updateId===void 0){var L=lz(w);return pe(pe(pe({},L),{},{updateId:0},x(pe(pe({props:w},L),{},{updateId:0}),O)),{},{prevDataKey:E,prevData:T,prevWidth:j,prevHeight:R,prevLayout:N,prevStackOffset:k,prevMargin:$,prevChildren:C})}if(E!==O.prevDataKey||T!==O.prevData||j!==O.prevWidth||R!==O.prevHeight||N!==O.prevLayout||k!==O.prevStackOffset||!zl($,O.prevMargin)){var H=lz(w),W={chartX:O.chartX,chartY:O.chartY,isTooltipActive:O.isTooltipActive},Z=pe(pe({},sz(O,T,N)),{},{updateId:O.updateId+1}),z=pe(pe(pe({},H),W),Z);return pe(pe(pe({},z),x(pe({props:w},z),O)),{},{prevDataKey:E,prevData:T,prevWidth:j,prevHeight:R,prevLayout:N,prevStackOffset:k,prevMargin:$,prevChildren:C})}if(!mS(C,O.prevChildren)){var F,Y,Q,K,P=Er(C,iu),U=P&&(F=(Y=P.props)===null||Y===void 0?void 0:Y.startIndex)!==null&&F!==void 0?F:V,ne=P&&(Q=(K=P.props)===null||K===void 0?void 0:K.endIndex)!==null&&Q!==void 0?Q:I,me=U!==V||ne!==I,Ae=!ht(T),ce=Ae&&!me?O.updateId:O.updateId+1;return pe(pe({updateId:ce},x(pe(pe({props:w},O),{},{updateId:ce,dataStartIndex:U,dataEndIndex:ne}),O)),{},{prevChildren:C,dataStartIndex:U,dataEndIndex:ne})}return null}),We(A,"renderActiveDot",function(w,O,E){var T;return y.isValidElement(w)?T=y.cloneElement(w,O):at(w)?T=w(O):T=q.createElement(FO,O),q.createElement(Jt,{className:"recharts-active-dot",key:E},T)});var S=y.forwardRef(function(O,E){return q.createElement(A,Ml({},O,{ref:E}))});return S.displayName=A.displayName,S},Kbe=Ybe({chartName:"AreaChart",GraphicalChild:Lo,axisComponents:[{axisType:"xAxis",AxisComp:Qv},{axisType:"yAxis",AxisComp:Jv}],formatAxisMap:Xve});const Xbe={light:"",dark:".dark"},KU=y.createContext(null);function XU(){const e=y.useContext(KU);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const QU=y.forwardRef(({id:e,className:t,children:n,config:r,...a},o)=>{const l=y.useId(),u=`chart-${e||l.replace(/:/g,"")}`;return v.jsx(KU.Provider,{value:{config:r},children:v.jsxs("div",{"data-chart":u,ref:o,className:ye("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...a,children:[v.jsx(Qbe,{id:u,config:r}),v.jsx(zse,{children:n})]})})});QU.displayName="Chart";const Qbe=({id:e,config:t})=>{const n=Object.entries(t).filter(([,r])=>r.theme||r.color);return n.length?v.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(Xbe).map(([r,a])=>`
488
- ${a} [data-chart=${e}] {
489
- ${n.map(([o,l])=>{var f;const u=((f=l.theme)==null?void 0:f[r])||l.color;return u?` --color-${o}: ${u};`:null}).join(`
490
- `)}
491
- }
492
- `).join(`
493
- `)}}):null},Jbe=za,e0e=y.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:a=!1,hideIndicator:o=!1,label:l,labelFormatter:u,labelClassName:f,formatter:d,color:m,nameKey:p,labelKey:g},x)=>{const{config:A}=XU(),S=y.useMemo(()=>{var j;if(a||!(t!=null&&t.length))return null;const[O]=t,E=`${g||(O==null?void 0:O.dataKey)||(O==null?void 0:O.name)||"value"}`,T=C_(A,O,E),C=!g&&typeof l=="string"?((j=A[l])==null?void 0:j.label)||l:T==null?void 0:T.label;return u?v.jsx("div",{className:ye("font-medium",f),children:u(C,t)}):C?v.jsx("div",{className:ye("font-medium",f),children:C}):null},[l,u,t,a,f,A,g]);if(!e||!(t!=null&&t.length))return null;const w=t.length===1&&r!=="dot";return v.jsxs("div",{ref:x,className:ye("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",n),children:[w?null:S,v.jsx("div",{className:"grid gap-1.5",children:t.filter(O=>O.type!=="none").map((O,E)=>{const T=`${p||O.name||O.dataKey||"value"}`,C=C_(A,O,T),j=m||O.payload.fill||O.color;return v.jsx("div",{className:ye("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",r==="dot"&&"items-center"),children:d&&(O==null?void 0:O.value)!==void 0&&O.name?d(O.value,O.name,O,E,O.payload):v.jsxs(v.Fragment,{children:[C!=null&&C.icon?v.jsx(C.icon,{}):!o&&v.jsx("div",{className:ye("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":r==="dot","w-1":r==="line","w-0 border-[1.5px] border-dashed bg-transparent":r==="dashed","my-0.5":w&&r==="dashed"}),style:{"--color-bg":j,"--color-border":j}}),v.jsxs("div",{className:ye("flex flex-1 justify-between leading-none",w?"items-end":"items-center"),children:[v.jsxs("div",{className:"grid gap-1.5",children:[w?S:null,v.jsx("span",{className:"text-muted-foreground",children:(C==null?void 0:C.label)||O.name})]}),O.value&&v.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:O.value.toLocaleString()})]})]})},O.dataKey)})})]})});e0e.displayName="ChartTooltip";const t0e=y.forwardRef(({className:e,hideIcon:t=!1,payload:n,verticalAlign:r="bottom",nameKey:a},o)=>{const{config:l}=XU();return n!=null&&n.length?v.jsx("div",{ref:o,className:ye("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.filter(u=>u.type!=="none").map(u=>{const f=`${a||u.dataKey||"value"}`,d=C_(l,u,f);return v.jsxs("div",{className:ye("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[d!=null&&d.icon&&!t?v.jsx(d.icon,{}):v.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:u.color}}),d==null?void 0:d.label]},u.value)})}):null});t0e.displayName="ChartLegend";function C_(e,t,n){if(typeof t!="object"||t===null)return;const r="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let a=n;return n in t&&typeof t[n]=="string"?a=t[n]:r&&n in r&&typeof r[n]=="string"&&(a=r[n]),a in e?e[a]:e[n]}const cz={cpu:{label:"CPU",color:"#60a5fa"},mem:{label:"RAM",color:"#a78bfa"}},fz={"1h":"1h","6h":"6h","24h":"24h","7d":"7d"};function dz(e,t){const n=new Date(e);return t==="7d"?`${n.getMonth()+1}/${n.getDate()}`:`${String(n.getHours()).padStart(2,"0")}:${String(n.getMinutes()).padStart(2,"0")}`}function n0e(){const[e,t]=y.useState([]),[n,r]=y.useState([]),[a,o]=y.useState(null),[l,u]=y.useState("24h"),[f,d]=y.useState([]),[m,p]=y.useState(!1),{setNode:g}=_A();y.useEffect(()=>(g(v.jsx("span",{className:"text-sm font-medium",children:"Mac Resources"})),()=>g(null)),[g]);const x=y.useCallback(C=>{C.type==="agents:listed"&&t(C.sessions??[])},[]),{send:A,connected:S}=qA(x);y.useEffect(()=>{if(!S)return;A({type:"agents:list"});const C=setInterval(()=>A({type:"agents:list"}),1e4);return()=>clearInterval(C)},[S,A]),y.useEffect(()=>{fetch("/api/v1/agents",{credentials:"include"}).then(C=>C.ok?C.json():[]).then(r)},[]);const w=e.map(C=>C.agentName).filter(Boolean),O=[...new Set([...w,...n])],E=new Set(w);y.useEffect(()=>{!a&&O.length>0&&o(O[0])},[O.join(",")]),y.useEffect(()=>{a&&(p(!0),fetch(`/api/v1/agents/${encodeURIComponent(a)}/resources?range=${l}`,{credentials:"include"}).then(C=>C.ok?C.json():[]).then(d).finally(()=>p(!1)))},[a,l]);const T=f.map(C=>({time:C.recorded_at,cpu:Math.round(C.cpu_percent*10)/10,mem:Math.round(C.mem_percent*10)/10}));return v.jsxs("div",{className:"flex h-full min-h-0",children:[v.jsxs("aside",{className:"w-64 shrink-0 border-r flex flex-col gap-1 p-3 overflow-y-auto",children:[v.jsx("span",{className:"px-2 pb-1 font-mono text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Macs"}),O.length===0?v.jsx("span",{className:"px-2 text-sm text-muted-foreground",children:S?"No agents yet.":"Connecting…"}):O.map(C=>{const j=E.has(C),R=a===C;return v.jsxs("button",{onClick:()=>o(C),className:["flex items-center gap-2 rounded-md px-2 py-2 text-left text-sm hover:bg-accent transition-colors",R?"bg-accent font-medium":""].join(" "),children:[v.jsx("span",{className:`inline-block h-1.5 w-1.5 shrink-0 rounded-full ${j?"bg-emerald-400":"bg-muted-foreground/40"}`}),v.jsx("span",{className:"truncate min-w-0",children:C})]},C)})]}),v.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:a?v.jsxs("div",{className:"flex flex-col gap-6 p-6",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h2",{className:"text-base font-semibold",children:a}),v.jsx(m4,{value:l,onValueChange:C=>u(C),children:v.jsx(VA,{children:Object.keys(fz).map(C=>v.jsx($p,{value:C,children:fz[C]},C))})})]}),m?v.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading…"}):T.length===0?v.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"No data yet for this range. Data is collected every minute while the agent is connected."}):v.jsxs("div",{className:"flex flex-col gap-6",children:[v.jsx(hz,{title:"CPU %",color:"cpu",data:T,dataKey:"cpu",range:l,formatTick:dz}),v.jsx(hz,{title:"RAM %",color:"mem",data:T,dataKey:"mem",range:l,formatTick:dz})]})]}):v.jsxs("div",{className:"flex h-full items-center justify-center gap-2 text-muted-foreground",children:[v.jsx(Uz,{className:"h-8 w-8"}),v.jsx("p",{className:"text-sm",children:"Select a Mac to view resource history."})]})})]})}function hz({title:e,color:t,data:n,dataKey:r,range:a,formatTick:o}){var m;const l=Math.min(n.length,a==="7d"?7:a==="24h"?8:6),u=Math.max(1,Math.floor(n.length/l)),f=n.filter((p,g)=>g%u===0).map(p=>p.time),d=(m=n[n.length-1])==null?void 0:m.time;return d&&!f.includes(d)&&f.push(d),v.jsxs("div",{className:"rounded-lg border p-4 flex flex-col gap-3",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full",style:{background:t==="cpu"?"#60a5fa":"#a78bfa"}}),v.jsx("span",{className:"text-sm font-medium",children:e})]}),v.jsx(QU,{config:cz,className:"h-[220px] w-full",children:v.jsxs(Kbe,{data:n,margin:{top:8,right:24,bottom:24,left:8},children:[v.jsx("defs",{children:v.jsxs("linearGradient",{id:`fill-${r}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[v.jsx("stop",{offset:"5%",stopColor:t==="cpu"?"#60a5fa":"#a78bfa",stopOpacity:.3}),v.jsx("stop",{offset:"95%",stopColor:t==="cpu"?"#60a5fa":"#a78bfa",stopOpacity:0})]})}),v.jsx(MU,{strokeDasharray:"3 3",vertical:!1,className:"stroke-border"}),v.jsx(Qv,{dataKey:"time",ticks:f,tickFormatter:p=>o(p,a),tick:{fontSize:11},tickLine:!1,axisLine:!1,dy:6,padding:{left:16,right:16}}),v.jsx(Jv,{domain:[0,100],ticks:[0,25,50,75,100],tickFormatter:p=>`${p}%`,tick:{fontSize:11},tickLine:!1,axisLine:!1,width:40,dx:-4,padding:{top:16,bottom:0}}),v.jsx(Jbe,{content:({active:p,payload:g})=>{if(!p||!(g!=null&&g.length))return null;const A=new Date(g[0].payload.time).toLocaleString("ko-KR",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}),S=g[0].value;return v.jsxs("div",{className:"rounded-lg border bg-background px-3 py-2 shadow-md text-xs",children:[v.jsxs("p",{className:"mb-1",children:["Date: ",A]}),v.jsxs("p",{children:[cz[r].label,": ",S,"%"]})]})}}),v.jsx(Lo,{type:"monotone",dataKey:r,stroke:t==="cpu"?"#60a5fa":"#a78bfa",strokeWidth:1.5,fill:`url(#fill-${r})`,dot:!1,isAnimationActive:!1})]})})]})}var JU="AlertDialog",[r0e]=aa(JU,[pL]),Li=pL(),e8=e=>{const{__scopeAlertDialog:t,...n}=e,r=Li(t);return v.jsx(K_,{...r,...n,modal:!0})};e8.displayName=JU;var a0e="AlertDialogTrigger",t8=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=Li(n);return v.jsx(RL,{...a,...r,ref:t})});t8.displayName=a0e;var i0e="AlertDialogPortal",n8=e=>{const{__scopeAlertDialog:t,...n}=e,r=Li(t);return v.jsx(X_,{...r,...n})};n8.displayName=i0e;var o0e="AlertDialogOverlay",r8=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=Li(n);return v.jsx(Qf,{...a,...r,ref:t})});r8.displayName=o0e;var Ul="AlertDialogContent",[s0e,l0e]=r0e(Ul),u0e=eL("AlertDialogContent"),a8=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...a}=e,o=Li(n),l=y.useRef(null),u=ot(t,l),f=y.useRef(null);return v.jsx(NG,{contentName:Ul,titleName:i8,docsSlug:"alert-dialog",children:v.jsx(s0e,{scope:n,cancelRef:f,children:v.jsxs(Jf,{role:"alertdialog",...o,...a,ref:u,onOpenAutoFocus:De(a.onOpenAutoFocus,d=>{var m;d.preventDefault(),(m=f.current)==null||m.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[v.jsx(u0e,{children:r}),v.jsx(f0e,{contentRef:l})]})})})});a8.displayName=Ul;var i8="AlertDialogTitle",o8=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=Li(n);return v.jsx(ed,{...a,...r,ref:t})});o8.displayName=i8;var s8="AlertDialogDescription",l8=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=Li(n);return v.jsx(td,{...a,...r,ref:t})});l8.displayName=s8;var c0e="AlertDialogAction",u8=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=Li(n);return v.jsx(Wm,{...a,...r,ref:t})});u8.displayName=c0e;var c8="AlertDialogCancel",f8=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:a}=l0e(c8,n),o=Li(n),l=ot(t,a);return v.jsx(Wm,{...o,...r,ref:l})});f8.displayName=c8;var f0e=({contentRef:e})=>{const t=`\`${Ul}\` requires a description for the component to be accessible for screen reader users.
494
-
495
- You can add a description to the \`${Ul}\` by passing a \`${s8}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
496
-
497
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Ul}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
498
-
499
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return y.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},d0e=e8,h0e=t8,p0e=n8,d8=r8,h8=a8,p8=u8,m8=f8,v8=o8,g8=l8;const m0e=d0e,v0e=h0e,g0e=p0e,y8=y.forwardRef(({className:e,...t},n)=>v.jsx(d8,{className:ye("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));y8.displayName=d8.displayName;const b8=y.forwardRef(({className:e,...t},n)=>v.jsxs(g0e,{children:[v.jsx(y8,{}),v.jsx(h8,{ref:n,className:ye("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));b8.displayName=h8.displayName;const x8=({className:e,...t})=>v.jsx("div",{className:ye("flex flex-col space-y-2 text-center sm:text-left",e),...t});x8.displayName="AlertDialogHeader";const w8=({className:e,...t})=>v.jsx("div",{className:ye("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});w8.displayName="AlertDialogFooter";const S8=y.forwardRef(({className:e,...t},n)=>v.jsx(v8,{ref:n,className:ye("text-lg font-semibold",e),...t}));S8.displayName=v8.displayName;const _8=y.forwardRef(({className:e,...t},n)=>v.jsx(g8,{ref:n,className:ye("text-sm text-muted-foreground",e),...t}));_8.displayName=g8.displayName;const A8=y.forwardRef(({className:e,...t},n)=>v.jsx(p8,{ref:n,className:ye(qm(),e),...t}));A8.displayName=p8.displayName;const O8=y.forwardRef(({className:e,...t},n)=>v.jsx(m8,{ref:n,className:ye(qm({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));O8.displayName=m8.displayName;const y0e=Ro({teamName:Qn().min(1),logo:BA(File).nullable().optional()}),b0e=Ro({displayName:Qn().min(1),avatar:BA(File).nullable().optional()}),x0e=Ro({currentPassword:Qn().min(1),newPassword:Qn().min(8),confirmPassword:Qn()}).refine(e=>e.newPassword===e.confirmPassword,{message:"Passwords do not match",path:["confirmPassword"]});function w0e(){const{resolvedTheme:e}=zm(),t=e==="dark"?"/logo-dark.svg":"/logo.svg",{user:n}=wA(),r=(n==null?void 0:n.role)==="Admin",a=(n==null?void 0:n.role)==="Admin"||(n==null?void 0:n.role)==="Developer",[o,l]=y.useState(null),[u,f]=y.useState(!1),d=y.useRef(null),m=yo({resolver:bo(y0e),mode:"onBlur",defaultValues:{teamName:"",logo:null}});y.useEffect(()=>{r&&fetch("/api/v1/settings",{credentials:"include"}).then(K=>K.ok?K.json():null).then(K=>{K&&(m.reset({teamName:K.team_name,logo:null}),l(K.logo_url))})},[r]);async function p(K){const P=new FormData;P.append("team_name",K.teamName),K.logo&&P.append("logo",K.logo),await fetch("/api/v1/settings",{method:"PATCH",credentials:"include",body:P}),f(!0),setTimeout(()=>f(!1),2e3)}const[g,x]=y.useState(null),[A,S]=y.useState(!1),w=y.useRef(null),O=yo({resolver:bo(b0e),mode:"onBlur",defaultValues:{displayName:"",avatar:null}});y.useEffect(()=>{n&&(O.reset({displayName:n.displayName??"",avatar:null}),x(n.avatarUrl??null))},[n]);async function E(K){const P=new FormData;P.append("display_name",K.displayName),K.avatar&&P.append("avatar",K.avatar),await fetch("/api/v1/profile",{method:"PATCH",credentials:"include",body:P}),S(!0),setTimeout(()=>S(!1),2e3)}const[T,C]=y.useState(!1),j=yo({resolver:bo(x0e),mode:"onBlur"});async function R(K){const P=await fetch("/api/v1/auth/change-password",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:K.currentPassword,newPassword:K.newPassword})});if(!P.ok){const U=await P.json();j.setError("root",{message:U.error??"Failed to change password"});return}j.reset(),C(!0),setTimeout(()=>C(!1),2e3)}const[N,k]=y.useState([]),[$,V]=y.useState({}),[I,L]=y.useState({}),[H,W]=y.useState({}),[Z,z]=y.useState({});y.useEffect(()=>{a&&fetch("/api/v1/apps",{credentials:"include"}).then(K=>K.ok?K.json():null).then(K=>{if(!K)return;k(K.items);const P={};K.items.forEach(U=>{P[U.id]=U.name}),V(P)})},[a]);async function F(K){z(P=>({...P,[K]:!0})),await fetch(`/api/v1/apps/${K}`,{method:"DELETE",credentials:"include"}),k(P=>P.filter(U=>U.id!==K)),z(P=>({...P,[K]:!1}))}async function Y(K){L(P=>({...P,[K]:!0})),await fetch(`/api/v1/apps/${K}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:$[K]})}),L(P=>({...P,[K]:!1})),W(P=>({...P,[K]:!0})),setTimeout(()=>W(P=>({...P,[K]:!1})),2e3)}const Q=CA({control:O.control,name:"displayName"});return v.jsxs("div",{className:"flex flex-col gap-6 max-w-[900px] mx-auto w-full p-6",children:[v.jsx("h1",{className:"text-xl font-semibold tracking-display-sm",children:"Settings"}),r&&v.jsxs(Kr,{children:[v.jsx(Xr,{children:v.jsx(Qr,{children:"Workspace"})}),v.jsx(Ba,{children:v.jsxs("form",{onSubmit:m.handleSubmit(p),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Bt,{htmlFor:"team-name",children:"Team name"}),v.jsx(cn,{id:"team-name",placeholder:"My QA Team",...m.register("teamName")}),m.formState.errors.teamName&&v.jsx("p",{className:"text-sm text-destructive",children:m.formState.errors.teamName.message})]}),v.jsx(So,{}),v.jsxs("div",{className:"grid gap-2",children:[v.jsxs(Bt,{children:["Logo ",v.jsx("span",{className:"text-muted-foreground text-xs",children:"(png · jpg, max 2MB)"})]}),v.jsx(jp,{name:"logo",control:m.control,render:({field:K})=>v.jsxs("div",{className:"relative w-16 h-16",children:[v.jsx("img",{src:o??t,alt:"logo",className:"w-16 h-16 rounded-lg object-contain"}),v.jsx("button",{type:"button",onClick:()=>{var P;return(P=d.current)==null?void 0:P.click()},className:"absolute bottom-0 right-0 w-6 h-6 rounded-full bg-background border border-border shadow-sm flex items-center justify-center hover:bg-accent transition-colors",children:v.jsx(L1,{className:"w-3 h-3"})}),v.jsx("input",{ref:d,type:"file",accept:".png,.jpg,.jpeg",className:"hidden",onChange:P=>{var ne;const U=(ne=P.target.files)==null?void 0:ne[0];if(U&&U.size>2*1024*1024){alert("Max 2MB");return}U&&(K.onChange(U),l(URL.createObjectURL(U)))}})]})})]}),v.jsx("div",{className:"flex justify-end",children:v.jsx(ct,{type:"submit",size:"sm",disabled:m.formState.isSubmitting,children:u?"Saved!":m.formState.isSubmitting?"Saving…":"Save changes"})})]})})]}),v.jsxs(Kr,{children:[v.jsx(Xr,{children:v.jsx(Qr,{children:"Profile"})}),v.jsx(Ba,{children:v.jsxs("form",{onSubmit:O.handleSubmit(E),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Bt,{htmlFor:"display-name",children:"Nickname"}),v.jsx(cn,{id:"display-name",placeholder:"Your name",...O.register("displayName")}),O.formState.errors.displayName&&v.jsx("p",{className:"text-sm text-destructive",children:O.formState.errors.displayName.message})]}),v.jsx(So,{}),v.jsxs("div",{className:"grid gap-2",children:[v.jsxs(Bt,{children:["Avatar ",v.jsx("span",{className:"text-muted-foreground text-xs",children:"(png · jpg, max 2MB)"})]}),v.jsx(jp,{name:"avatar",control:O.control,render:({field:K})=>{var P;return v.jsxs("div",{className:"relative w-14 h-14",children:[g?v.jsx("img",{src:g,alt:"avatar",className:"w-14 h-14 rounded-full object-cover border"}):v.jsx("div",{className:"w-14 h-14 rounded-full flex items-center justify-center text-lg font-medium",style:(()=>{const U=SA(Q||(n==null?void 0:n.email)||"");return{backgroundColor:U.bg,color:U.fg}})(),children:((P=Q==null?void 0:Q[0])==null?void 0:P.toUpperCase())??"?"}),v.jsx("button",{type:"button",onClick:()=>{var U;return(U=w.current)==null?void 0:U.click()},className:"absolute bottom-0 right-0 w-6 h-6 rounded-full bg-background border border-border shadow-sm flex items-center justify-center hover:bg-accent transition-colors",children:v.jsx(L1,{className:"w-3 h-3"})}),v.jsx("input",{ref:w,type:"file",accept:".png,.jpg,.jpeg",className:"hidden",onChange:U=>{var me;const ne=(me=U.target.files)==null?void 0:me[0];if(ne&&ne.size>2*1024*1024){alert("Max 2MB");return}ne&&(K.onChange(ne),x(URL.createObjectURL(ne)))}})]})}})]}),v.jsx("div",{className:"flex justify-end",children:v.jsx(ct,{type:"submit",size:"sm",disabled:O.formState.isSubmitting,children:A?"Saved!":O.formState.isSubmitting?"Saving…":"Save changes"})})]})})]}),v.jsxs(Kr,{children:[v.jsx(Xr,{children:v.jsx(Qr,{children:"Password"})}),v.jsx(Ba,{children:v.jsxs("form",{onSubmit:j.handleSubmit(R),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Bt,{htmlFor:"current-password",children:"Current password"}),v.jsx(cn,{id:"current-password",type:"password",...j.register("currentPassword")}),j.formState.errors.currentPassword&&v.jsx("p",{className:"text-sm text-destructive",children:j.formState.errors.currentPassword.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Bt,{htmlFor:"new-password",children:"New password"}),v.jsx(cn,{id:"new-password",type:"password",...j.register("newPassword")}),j.formState.errors.newPassword&&v.jsx("p",{className:"text-sm text-destructive",children:j.formState.errors.newPassword.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Bt,{htmlFor:"confirm-password",children:"Confirm new password"}),v.jsx(cn,{id:"confirm-password",type:"password",...j.register("confirmPassword")}),j.formState.errors.confirmPassword&&v.jsx("p",{className:"text-sm text-destructive",children:j.formState.errors.confirmPassword.message})]}),j.formState.errors.root&&v.jsx("p",{className:"text-sm text-destructive",children:j.formState.errors.root.message}),v.jsx("div",{className:"flex justify-end",children:v.jsx(ct,{type:"submit",size:"sm",disabled:j.formState.isSubmitting,children:T?"Saved!":j.formState.isSubmitting?"Saving…":"Change password"})})]})})]}),a&&N.length>0&&v.jsxs(Kr,{children:[v.jsx(Xr,{children:v.jsx(Qr,{children:"Apps"})}),v.jsx(Ba,{children:v.jsx("div",{className:"flex flex-col divide-y divide-border",children:N.map(K=>v.jsxs("div",{className:"flex flex-col gap-2 py-4 first:pt-0 last:pb-0",children:[v.jsx(Bt,{htmlFor:`app-${K.id}`,children:"App Name"}),v.jsx(cn,{id:`app-${K.id}`,value:$[K.id]??"",onChange:P=>V(U=>({...U,[K.id]:P.target.value}))}),v.jsxs("div",{className:"flex flex-col gap-1.5 mt-1",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:K.bundle_id_key}),v.jsx(Gl,{tone:K.platform==="ios"?"ios":K.platform==="android"?"android":void 0,variant:K.platform==="both"?"secondary":void 0,className:"capitalize",children:K.platform})]}),v.jsxs("div",{className:"flex items-center justify-end gap-2",children:[v.jsx(ct,{size:"sm",variant:"outline",disabled:I[K.id],onClick:()=>Y(K.id),children:H[K.id]?"Saved!":I[K.id]?"Saving…":"Save"}),v.jsxs(m0e,{children:[v.jsx(v0e,{asChild:!0,children:v.jsx(ct,{size:"sm",variant:"destructive",disabled:Z[K.id],children:Z[K.id]?"Deleting…":"Delete"})}),v.jsxs(b8,{children:[v.jsxs(x8,{children:[v.jsx(S8,{children:"Delete app?"}),v.jsxs(_8,{children:["This will permanently delete ",v.jsx("strong",{children:K.name})," and all its builds. This action cannot be undone."]})]}),v.jsxs(w8,{children:[v.jsx(O8,{className:"w-24",children:"Cancel"}),v.jsx(A8,{className:ye(qm({variant:"destructive"}),"w-24"),onClick:()=>F(K.id),children:"Delete"})]})]})]})]})]})]},K.id))})})]})]})}const eE=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{className:"relative w-full overflow-auto",children:v.jsx("table",{ref:n,className:ye("w-full caption-bottom text-sm",e),...t})}));eE.displayName="Table";const tE=y.forwardRef(({className:e,...t},n)=>v.jsx("thead",{ref:n,className:ye("[&_tr]:border-b",e),...t}));tE.displayName="TableHeader";const nE=y.forwardRef(({className:e,...t},n)=>v.jsx("tbody",{ref:n,className:ye("[&_tr:last-child]:border-0",e),...t}));nE.displayName="TableBody";const S0e=y.forwardRef(({className:e,...t},n)=>v.jsx("tfoot",{ref:n,className:ye("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));S0e.displayName="TableFooter";const ql=y.forwardRef(({className:e,...t},n)=>v.jsx("tr",{ref:n,className:ye("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));ql.displayName="TableRow";const xa=y.forwardRef(({className:e,...t},n)=>v.jsx("th",{ref:n,className:ye("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));xa.displayName="TableHead";const Yr=y.forwardRef(({className:e,...t},n)=>v.jsx("td",{ref:n,className:ye("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Yr.displayName="TableCell";const _0e=y.forwardRef(({className:e,...t},n)=>v.jsx("caption",{ref:n,className:ye("mt-4 text-sm text-muted-foreground",e),...t}));_0e.displayName="TableCaption";const A0e=Ro({email:Qn().email(),role:Qn().min(1)});function O0e(){const[e,t]=y.useState([]),[n,r]=y.useState({}),[a,o]=y.useState(""),[l,u]=y.useState(!1),{register:f,handleSubmit:d,control:m,reset:p,formState:{errors:g,isSubmitting:x}}=yo({resolver:bo(A0e),mode:"onBlur",defaultValues:{email:"",role:"QA"}});function A(){fetch("/api/v1/team/members",{credentials:"include"}).then(C=>C.json()).then(t)}y.useEffect(()=>{A()},[]);async function S(C){const R=await(await fetch("/api/v1/team/invite",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:C.email,role:C.role})})).json(),N=`${location.origin}/invite?token=${R.token}`;o(N),navigator.clipboard.writeText(N).catch(()=>{})}function w(C){u(C),C||(o(""),p())}async function O(C,j){await fetch(`/api/v1/team/members/${C}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({role:j})}),A()}async function E(C){const N=(await(await fetch(`/api/v1/team/members/${C}/send-reset`,{method:"POST",credentials:"include"})).json()).emailSent?"Sent":"No SMTP";r(k=>({...k,[C]:N})),setTimeout(()=>r(k=>{const $={...k};return delete $[C],$}),3e3)}async function T(C){confirm("Remove this member?")&&(await fetch(`/api/v1/team/members/${C}`,{method:"DELETE",credentials:"include"}),A())}return v.jsxs("div",{className:"flex flex-col gap-6 max-w-[900px] mx-auto w-full p-6",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h1",{className:"text-xl font-semibold",children:"Team"}),v.jsxs(gv,{open:l,onOpenChange:w,children:[v.jsx(yv,{asChild:!0,children:v.jsxs(ct,{size:"sm",children:[v.jsx(wV,{className:"mr-2 h-4 w-4"}),"Invite member"]})}),v.jsxs(ud,{className:"sm:max-w-md",children:[v.jsx(cd,{children:v.jsx(fd,{children:"Invite team member"})}),a?v.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[v.jsx("p",{className:"text-sm text-muted-foreground",children:"Invite link copied to clipboard:"}),v.jsx("code",{className:"rounded bg-muted px-3 py-2 text-xs break-all",children:a}),v.jsx(ct,{onClick:()=>u(!1),children:"Done"})]}):v.jsxs("form",{onSubmit:d(S),className:"flex flex-col gap-4 pt-2",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Bt,{htmlFor:"invite-email",children:"Email"}),v.jsx(cn,{id:"invite-email",type:"email",...f("email")}),g.email&&v.jsx("p",{className:"text-sm text-destructive",children:g.email.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Bt,{children:"Role"}),v.jsx(jp,{name:"role",control:m,render:({field:C})=>v.jsxs(As,{value:C.value,onValueChange:C.onChange,children:[v.jsx(Eo,{children:v.jsx(Os,{})}),v.jsxs(jo,{children:[v.jsx(Ct,{value:"Admin",children:"Admin"}),v.jsx(Ct,{value:"Developer",children:"Developer"}),v.jsx(Ct,{value:"QA",children:"QA"}),v.jsx(Ct,{value:"Viewer",children:"Viewer"})]})]})})]}),v.jsx(ct,{type:"submit",disabled:x,children:x?"Creating link…":"Generate invite link"})]})]})]})]}),v.jsxs(Kr,{children:[v.jsx(Xr,{children:v.jsxs(Qr,{children:["Members (",e.length,")"]})}),v.jsx(Ba,{className:"px-4 pt-0 pb-2",children:v.jsxs(eE,{children:[v.jsx(tE,{children:v.jsxs(ql,{children:[v.jsx(xa,{children:"Nickname"}),v.jsx(xa,{children:"Email"}),v.jsx(xa,{children:"Role"}),v.jsx(xa,{children:"Joined"}),v.jsx(xa,{className:"w-10"})]})}),v.jsx(nE,{children:e.map(C=>v.jsxs(ql,{className:"hover:bg-transparent",children:[v.jsx(Yr,{className:"font-medium",children:C.display_name||"—"}),v.jsx(Yr,{className:"text-muted-foreground text-sm",children:C.email}),v.jsx(Yr,{children:v.jsxs(As,{value:C.role,onValueChange:j=>O(C.id,j),children:[v.jsx(Eo,{className:"h-7 w-28",children:v.jsx(Os,{})}),v.jsxs(jo,{children:[v.jsx(Ct,{value:"Admin",children:"Admin"}),v.jsx(Ct,{value:"Developer",children:"Developer"}),v.jsx(Ct,{value:"QA",children:"QA"}),v.jsx(Ct,{value:"Viewer",children:"Viewer"})]})]})}),v.jsx(Yr,{className:"text-muted-foreground text-sm",children:new Date(C.joined_at).toLocaleDateString()}),v.jsx(Yr,{children:v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(ct,{variant:"secondary",size:"nav",onClick:()=>E(C.id),children:n[C.id]??"Reset pwd"}),v.jsx(ct,{variant:"destructive",size:"nav",onClick:()=>T(C.id),children:"Remove"})]})})]},C.id))})]})})]})]})}const E0e=Ro({name:Qn().min(1),expiresDays:Qn().refine(e=>{const t=parseInt(e,10);return!isNaN(t)&&t>=1&&t<=365},{message:"Must be between 1 and 365"})});function j0e(){const[e,t]=y.useState([]),[n,r]=y.useState(!1),[a,o]=y.useState(""),{register:l,handleSubmit:u,reset:f,formState:{errors:d,isSubmitting:m}}=yo({resolver:bo(E0e),mode:"onBlur",defaultValues:{name:"",expiresDays:"30"}});function p(){fetch("/api/v1/tokens",{credentials:"include"}).then(w=>w.json()).then(t)}y.useEffect(()=>{p()},[]);async function g(w){const E=await(await fetch("/api/v1/tokens",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:w.name,expires_in_days:parseInt(w.expiresDays,10)})})).json();o(E.token),p()}function x(w){r(w),w||(o(""),f())}async function A(w){confirm("Revoke this token? Any active API calls using it will immediately fail.")&&(await fetch(`/api/v1/tokens/${w}`,{method:"DELETE",credentials:"include"}),p())}function S(w){return w.expires_at&&new Date(w.expires_at)<new Date}return v.jsxs("div",{className:"flex flex-col gap-6 max-w-[900px] mx-auto w-full p-6",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h1",{className:"text-xl font-semibold",children:"Personal Access Tokens"}),v.jsxs(gv,{open:n,onOpenChange:x,children:[v.jsx(yv,{asChild:!0,children:v.jsxs(ct,{size:"sm",children:[v.jsx(qz,{className:"mr-2 h-4 w-4"}),"New token"]})}),v.jsxs(ud,{className:"sm:max-w-md",children:[v.jsx(cd,{children:v.jsx(fd,{children:"Create token"})}),a?v.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[v.jsx("p",{className:"text-sm text-muted-foreground",children:"Copy this token now — it won't be shown again."}),v.jsx("code",{className:"rounded bg-muted px-3 py-2 text-xs break-all font-mono",children:a}),v.jsx(ct,{onClick:()=>{navigator.clipboard.writeText(a).catch(()=>{}),r(!1)},children:"Copy & close"})]}):v.jsxs("form",{onSubmit:u(g),className:"flex flex-col gap-4 pt-2",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Bt,{htmlFor:"token-name",children:"Name"}),v.jsx(cn,{id:"token-name",placeholder:"e.g. ci-deploy",...l("name")}),d.name&&v.jsx("p",{className:"text-sm text-destructive",children:d.name.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Bt,{htmlFor:"expires",children:"Expires in (days)"}),v.jsx(cn,{id:"expires",type:"number",...l("expiresDays")}),d.expiresDays&&v.jsx("p",{className:"text-sm text-destructive",children:d.expiresDays.message})]}),v.jsxs("p",{className:"text-xs text-muted-foreground",children:["Scope: ",v.jsx(Gl,{variant:"secondary",children:"builds:write"})]}),v.jsx(ct,{type:"submit",disabled:m,children:m?"Creating…":"Create token"})]})]})]})]}),v.jsxs(Kr,{children:[v.jsxs(Xr,{children:[v.jsx(Qr,{children:"Active tokens"}),v.jsxs(ws,{children:["Use these tokens with ",v.jsx("code",{className:"text-xs",children:"Authorization: Bearer <token>"})," for API deployments."]})]}),v.jsx(Ba,{className:"px-4 pt-0 pb-2",children:v.jsxs(eE,{children:[v.jsx(tE,{children:v.jsxs(ql,{children:[v.jsx(xa,{children:"Name"}),v.jsx(xa,{children:"Scope"}),v.jsx(xa,{children:"Last used"}),v.jsx(xa,{children:"Expires"}),v.jsx(xa,{className:"w-10"})]})}),v.jsx(nE,{children:e.length===0?v.jsx(ql,{children:v.jsx(Yr,{colSpan:5,className:"h-20 text-center text-muted-foreground",children:"No tokens yet."})}):e.map(w=>v.jsxs(ql,{className:"hover:bg-transparent",children:[v.jsx(Yr,{className:"font-medium",children:w.name}),v.jsx(Yr,{children:v.jsx(Gl,{variant:"secondary",children:w.scope})}),v.jsx(Yr,{className:"text-muted-foreground text-sm",children:w.last_used_at?new Date(w.last_used_at).toLocaleDateString():"Never"}),v.jsx(Yr,{children:w.expires_at?v.jsx("span",{className:S(w)?"text-destructive text-sm":"text-muted-foreground text-sm",children:S(w)?"Expired":new Date(w.expires_at).toLocaleDateString()}):v.jsx("span",{className:"text-muted-foreground text-sm",children:"Never"})}),v.jsx(Yr,{children:v.jsx(ct,{variant:"destructive",size:"icon",className:"h-7 w-7",onClick:()=>A(w.id),children:v.jsx(bV,{className:"h-4 w-4"})})})]},w.id))})]})})]})]})}function T0e(){return v.jsx(jF,{children:v.jsxs(nF,{children:[v.jsx(Ar,{path:"/login",element:v.jsx(cte,{})}),v.jsx(Ar,{path:"/invite",element:v.jsx(dte,{})}),v.jsx(Ar,{path:"/reset-password",element:v.jsx(pte,{})}),v.jsxs(Ar,{element:v.jsx(gK,{}),children:[v.jsx(Ar,{index:!0,element:v.jsx(k1,{to:"/app-center",replace:!0})}),v.jsx(Ar,{path:"/app-center",element:v.jsx(ine,{})}),v.jsx(Ar,{path:"/app-center/build",element:v.jsx(tre,{})}),v.jsx(Ar,{path:"/mac-resources",element:v.jsx(n0e,{})}),v.jsx(Ar,{path:"/settings/default",element:v.jsx(w0e,{})}),v.jsx(Ar,{path:"/settings/team",element:v.jsx(O0e,{})}),v.jsx(Ar,{path:"/settings/tokens",element:v.jsx(j0e,{})}),v.jsx(Ar,{path:"*",element:v.jsx(k1,{to:"/app-center",replace:!0})})]})]})})}GH.createRoot(document.getElementById("root")).render(v.jsx(y.StrictMode,{children:v.jsx(KH,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,children:v.jsx(T0e,{})})}));