@tapflowio/relay 0.4.1 → 0.5.1
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.
- package/dist/RelayServer.d.ts +3 -0
- package/dist/RelayServer.d.ts.map +1 -1
- package/dist/RelayServer.js +44 -11
- package/dist/RelayServer.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/public/assets/index-Bl8pK0Ta.js +520 -0
- package/public/assets/index-C1nT-u3L.css +1 -0
- package/public/assets/tinyh264.worker-DiJ50Hai.js +1 -0
- package/public/index.html +2 -2
- package/public/assets/index-CFxx7mYM.css +0 -1
- package/public/assets/index-CkmCus0p.js +0 -499
|
@@ -1,499 +0,0 @@
|
|
|
1
|
-
function r9(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 Gh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ht(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ob={exports:{}},Pu={};/**
|
|
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 uC;function a9(){if(uC)return Pu;uC=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 c in a)c!=="key"&&(o[c]=a[c])}else o=a;return a=o.ref,{$$typeof:e,type:r,key:l,ref:a!==void 0?a:null,props:o}}return Pu.Fragment=t,Pu.jsx=n,Pu.jsxs=n,Pu}var fC;function i9(){return fC||(fC=1,Ob.exports=a9()),Ob.exports}var v=i9(),Eb={exports:{}},nt={};/**
|
|
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 dC;function o9(){if(dC)return nt;dC=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"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),g=Symbol.iterator;function x(I){return I===null||typeof I!="object"?null:(I=g&&I[g]||I["@@iterator"],typeof I=="function"?I:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,w={};function O(I,Z,Q){this.props=I,this.context=Z,this.refs=w,this.updater=Q||A}O.prototype.isReactComponent={},O.prototype.setState=function(I,Z){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,Z,"setState")},O.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function E(){}E.prototype=O.prototype;function j(I,Z,Q){this.props=I,this.context=Z,this.refs=w,this.updater=Q||A}var R=j.prototype=new E;R.constructor=j,S(R,O.prototype),R.isPureReactComponent=!0;var T=Array.isArray;function C(){}var N={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function z(I,Z,Q){var fe=Q.ref;return{$$typeof:e,type:I,key:Z,ref:fe!==void 0?fe:null,props:Q}}function V(I,Z){return z(I.type,Z,I.props)}function U(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function P(I){var Z={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(Q){return Z[Q]})}var B=/\/+/g;function q(I,Z){return typeof I=="object"&&I!==null&&I.key!=null?P(""+I.key):Z.toString(36)}function Y(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(C,C):(I.status="pending",I.then(function(Z){I.status==="pending"&&(I.status="fulfilled",I.value=Z)},function(Z){I.status==="pending"&&(I.status="rejected",I.reason=Z)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function $(I,Z,Q,fe,le){var Se=typeof I;(Se==="undefined"||Se==="boolean")&&(I=null);var ve=!1;if(I===null)ve=!0;else switch(Se){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(I.$$typeof){case e:case t:ve=!0;break;case m:return ve=I._init,$(ve(I._payload),Z,Q,fe,le)}}if(ve)return le=le(I),ve=fe===""?"."+q(I,0):fe,T(le)?(Q="",ve!=null&&(Q=ve.replace(B,"$&/")+"/"),$(le,Z,Q,"",function(Ae){return Ae})):le!=null&&(U(le)&&(le=V(le,Q+(le.key==null||I&&I.key===le.key?"":(""+le.key).replace(B,"$&/")+"/")+ve)),Z.push(le)),1;ve=0;var xe=fe===""?".":fe+":";if(T(I))for(var ce=0;ce<I.length;ce++)fe=I[ce],Se=xe+q(fe,ce),ve+=$(fe,Z,Q,Se,le);else if(ce=x(I),typeof ce=="function")for(I=ce.call(I),ce=0;!(fe=I.next()).done;)fe=fe.value,Se=xe+q(fe,ce++),ve+=$(fe,Z,Q,Se,le);else if(Se==="object"){if(typeof I.then=="function")return $(Y(I),Z,Q,fe,le);throw Z=String(I),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return ve}function G(I,Z,Q){if(I==null)return I;var fe=[],le=0;return $(I,fe,"","",function(Se){return Z.call(Q,Se,le++)}),fe}function F(I){if(I._status===-1){var Z=I._result;Z=Z(),Z.then(function(Q){(I._status===0||I._status===-1)&&(I._status=1,I._result=Q)},function(Q){(I._status===0||I._status===-1)&&(I._status=2,I._result=Q)}),I._status===-1&&(I._status=0,I._result=Z)}if(I._status===1)return I._result.default;throw I._result}var K=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=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(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",I);return}console.error(I)},ne={map:G,forEach:function(I,Z,Q){G(I,function(){Z.apply(this,arguments)},Q)},count:function(I){var Z=0;return G(I,function(){Z++}),Z},toArray:function(I){return G(I,function(Z){return Z})||[]},only:function(I){if(!U(I))throw Error("React.Children.only expected to receive a single React element child.");return I}};return nt.Activity=h,nt.Children=ne,nt.Component=O,nt.Fragment=n,nt.Profiler=a,nt.PureComponent=j,nt.StrictMode=r,nt.Suspense=f,nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,nt.__COMPILER_RUNTIME={__proto__:null,c:function(I){return N.H.useMemoCache(I)}},nt.cache=function(I){return function(){return I.apply(null,arguments)}},nt.cacheSignal=function(){return null},nt.cloneElement=function(I,Z,Q){if(I==null)throw Error("The argument must be a React element, but you passed "+I+".");var fe=S({},I.props),le=I.key;if(Z!=null)for(Se in Z.key!==void 0&&(le=""+Z.key),Z)!D.call(Z,Se)||Se==="key"||Se==="__self"||Se==="__source"||Se==="ref"&&Z.ref===void 0||(fe[Se]=Z[Se]);var Se=arguments.length-2;if(Se===1)fe.children=Q;else if(1<Se){for(var ve=Array(Se),xe=0;xe<Se;xe++)ve[xe]=arguments[xe+2];fe.children=ve}return z(I.type,le,fe)},nt.createContext=function(I){return I={$$typeof:l,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:o,_context:I},I},nt.createElement=function(I,Z,Q){var fe,le={},Se=null;if(Z!=null)for(fe in Z.key!==void 0&&(Se=""+Z.key),Z)D.call(Z,fe)&&fe!=="key"&&fe!=="__self"&&fe!=="__source"&&(le[fe]=Z[fe]);var ve=arguments.length-2;if(ve===1)le.children=Q;else if(1<ve){for(var xe=Array(ve),ce=0;ce<ve;ce++)xe[ce]=arguments[ce+2];le.children=xe}if(I&&I.defaultProps)for(fe in ve=I.defaultProps,ve)le[fe]===void 0&&(le[fe]=ve[fe]);return z(I,Se,le)},nt.createRef=function(){return{current:null}},nt.forwardRef=function(I){return{$$typeof:c,render:I}},nt.isValidElement=U,nt.lazy=function(I){return{$$typeof:m,_payload:{_status:-1,_result:I},_init:F}},nt.memo=function(I,Z){return{$$typeof:d,type:I,compare:Z===void 0?null:Z}},nt.startTransition=function(I){var Z=N.T,Q={};N.T=Q;try{var fe=I(),le=N.S;le!==null&&le(Q,fe),typeof fe=="object"&&fe!==null&&typeof fe.then=="function"&&fe.then(C,K)}catch(Se){K(Se)}finally{Z!==null&&Q.types!==null&&(Z.types=Q.types),N.T=Z}},nt.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},nt.use=function(I){return N.H.use(I)},nt.useActionState=function(I,Z,Q){return N.H.useActionState(I,Z,Q)},nt.useCallback=function(I,Z){return N.H.useCallback(I,Z)},nt.useContext=function(I){return N.H.useContext(I)},nt.useDebugValue=function(){},nt.useDeferredValue=function(I,Z){return N.H.useDeferredValue(I,Z)},nt.useEffect=function(I,Z){return N.H.useEffect(I,Z)},nt.useEffectEvent=function(I){return N.H.useEffectEvent(I)},nt.useId=function(){return N.H.useId()},nt.useImperativeHandle=function(I,Z,Q){return N.H.useImperativeHandle(I,Z,Q)},nt.useInsertionEffect=function(I,Z){return N.H.useInsertionEffect(I,Z)},nt.useLayoutEffect=function(I,Z){return N.H.useLayoutEffect(I,Z)},nt.useMemo=function(I,Z){return N.H.useMemo(I,Z)},nt.useOptimistic=function(I,Z){return N.H.useOptimistic(I,Z)},nt.useReducer=function(I,Z,Q){return N.H.useReducer(I,Z,Q)},nt.useRef=function(I){return N.H.useRef(I)},nt.useState=function(I){return N.H.useState(I)},nt.useSyncExternalStore=function(I,Z,Q){return N.H.useSyncExternalStore(I,Z,Q)},nt.useTransition=function(){return N.H.useTransition()},nt.version="19.2.6",nt}var hC;function W_(){return hC||(hC=1,Eb.exports=o9()),Eb.exports}var y=W_();const L=Ht(y),K_=r9({__proto__:null,default:L},[y]);var jb={exports:{}},Du={},Tb={exports:{}},Cb={};/**
|
|
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 pC;function s9(){return pC||(pC=1,(function(e){function t($,G){var F=$.length;$.push(G);e:for(;0<F;){var K=F-1>>>1,ne=$[K];if(0<a(ne,G))$[K]=G,$[F]=ne,F=K;else break e}}function n($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var G=$[0],F=$.pop();if(F!==G){$[0]=F;e:for(var K=0,ne=$.length,I=ne>>>1;K<I;){var Z=2*(K+1)-1,Q=$[Z],fe=Z+1,le=$[fe];if(0>a(Q,F))fe<ne&&0>a(le,Q)?($[K]=le,$[fe]=F,K=fe):($[K]=Q,$[Z]=F,K=Z);else if(fe<ne&&0>a(le,F))$[K]=le,$[fe]=F,K=fe;else break e}}return G}function a($,G){var F=$.sortIndex-G.sortIndex;return F!==0?F:$.id-G.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var f=[],d=[],m=1,h=null,g=3,x=!1,A=!1,S=!1,w=!1,O=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function R($){for(var G=n(d);G!==null;){if(G.callback===null)r(d);else if(G.startTime<=$)r(d),G.sortIndex=G.expirationTime,t(f,G);else break;G=n(d)}}function T($){if(S=!1,R($),!A)if(n(f)!==null)A=!0,C||(C=!0,P());else{var G=n(d);G!==null&&Y(T,G.startTime-$)}}var C=!1,N=-1,D=5,z=-1;function V(){return w?!0:!(e.unstable_now()-z<D)}function U(){if(w=!1,C){var $=e.unstable_now();z=$;var G=!0;try{e:{A=!1,S&&(S=!1,E(N),N=-1),x=!0;var F=g;try{t:{for(R($),h=n(f);h!==null&&!(h.expirationTime>$&&V());){var K=h.callback;if(typeof K=="function"){h.callback=null,g=h.priorityLevel;var ne=K(h.expirationTime<=$);if($=e.unstable_now(),typeof ne=="function"){h.callback=ne,R($),G=!0;break t}h===n(f)&&r(f),R($)}else r(f);h=n(f)}if(h!==null)G=!0;else{var I=n(d);I!==null&&Y(T,I.startTime-$),G=!1}}break e}finally{h=null,g=F,x=!1}G=void 0}}finally{G?P():C=!1}}}var P;if(typeof j=="function")P=function(){j(U)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,q=B.port2;B.port1.onmessage=U,P=function(){q.postMessage(null)}}else P=function(){O(U,0)};function Y($,G){N=O(function(){$(e.unstable_now())},G)}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($){$.callback=null},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function($){switch(g){case 1:case 2:case 3:var G=3;break;default:G=g}var F=g;g=G;try{return $()}finally{g=F}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function($,G){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var F=g;g=$;try{return G()}finally{g=F}},e.unstable_scheduleCallback=function($,G,F){var K=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?K+F:K):F=K,$){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=F+ne,$={id:m++,callback:G,priorityLevel:$,startTime:F,expirationTime:ne,sortIndex:-1},F>K?($.sortIndex=F,t(d,$),n(f)===null&&$===n(d)&&(S?(E(N),N=-1):S=!0,Y(T,F-K))):($.sortIndex=ne,t(f,$),A||x||(A=!0,C||(C=!0,P()))),$},e.unstable_shouldYield=V,e.unstable_wrapCallback=function($){var G=g;return function(){var F=g;g=G;try{return $.apply(this,arguments)}finally{g=F}}}})(Cb)),Cb}var mC;function l9(){return mC||(mC=1,Tb.exports=s9()),Tb.exports}var Rb={exports:{}},Qn={};/**
|
|
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 vC;function c9(){if(vC)return Qn;vC=1;var e=W_();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 h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:h==null?null:""+h,children:f,containerInfo:d,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return Qn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Qn.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)},Qn.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()}},Qn.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))},Qn.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},Qn.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var m=d.as,h=c(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:h,integrity:g,fetchPriority:x}):m==="script"&&r.d.X(f,{crossOrigin:h,integrity:g,fetchPriority:x,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},Qn.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var m=c(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)},Qn.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var m=d.as,h=c(m,d.crossOrigin);r.d.L(f,m,{crossOrigin:h,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})}},Qn.preloadModule=function(f,d){if(typeof f=="string")if(d){var m=c(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)},Qn.requestFormReset=function(f){r.d.r(f)},Qn.unstable_batchedUpdates=function(f,d){return f(d)},Qn.useFormState=function(f,d,m){return l.H.useFormState(f,d,m)},Qn.useFormStatus=function(){return l.H.useHostTransitionStatus()},Qn.version="19.2.6",Qn}var gC;function $z(){if(gC)return Rb.exports;gC=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(),Rb.exports=c9(),Rb.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 yC;function u9(){if(yC)return Du;yC=1;var e=l9(),t=W_(),n=$z();function r(i){var s="https://react.dev/errors/"+i;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u])}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,u=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(u=s.return),i=s.return;while(i)}return s.tag===3?u: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 c(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 u=i,p=s;;){var b=u.return;if(b===null)break;var _=b.alternate;if(_===null){if(p=b.return,p!==null){u=p;continue}break}if(b.child===_.child){for(_=b.child;_;){if(_===u)return f(b),i;if(_===p)return f(b),s;_=_.sibling}throw Error(r(188))}if(u.return!==p.return)u=b,p=_;else{for(var M=!1,k=b.child;k;){if(k===u){M=!0,u=b,p=_;break}if(k===p){M=!0,p=b,u=_;break}k=k.sibling}if(!M){for(k=_.child;k;){if(k===u){M=!0,u=_,p=b;break}if(k===p){M=!0,p=_,u=b;break}k=k.sibling}if(!M)throw Error(r(189))}}if(u.alternate!==p)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?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 h=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"),j=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),V=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function P(i){return i===null||typeof i!="object"?null:(i=U&&i[U]||i["@@iterator"],typeof i=="function"?i:null)}var B=Symbol.for("react.client.reference");function q(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===B?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 T:return"Suspense";case C:return"SuspenseList";case z:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case A:return"Portal";case j:return i.displayName||"Context";case E:return(i._context.displayName||"Context")+".Consumer";case R: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:q(i.type)||"Memo";case D:s=i._payload,i=i._init;try{return q(i(s))}catch{}}return null}var Y=Array.isArray,$=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},K=[],ne=-1;function I(i){return{current:i}}function Z(i){0>ne||(i.current=K[ne],K[ne]=null,ne--)}function Q(i,s){ne++,K[ne]=i.current,i.current=s}var fe=I(null),le=I(null),Se=I(null),ve=I(null);function xe(i,s){switch(Q(Se,s),Q(le,i),Q(fe,null),s.nodeType){case 9:case 11:i=(i=s.documentElement)&&(i=i.namespaceURI)?P2(i):0;break;default:if(i=s.tagName,s=s.namespaceURI)s=P2(s),i=D2(s,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}Z(fe),Q(fe,i)}function ce(){Z(fe),Z(le),Z(Se)}function Ae(i){i.memoizedState!==null&&Q(ve,i);var s=fe.current,u=D2(s,i.type);s!==u&&(Q(le,i),Q(fe,u))}function Oe(i){le.current===i&&(Z(fe),Z(le)),ve.current===i&&(Z(ve),Cu._currentValue=F)}var oe,qe;function De(i){if(oe===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);oe=s&&s[1]||"",qe=-1<u.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+oe+i+qe}var Je=!1;function Ye(i,s){if(!i||Je)return"";Je=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(s){var ye=function(){throw Error()};if(Object.defineProperty(ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ye,[])}catch(ue){var se=ue}Reflect.construct(i,[],ye)}else{try{ye.call()}catch(ue){se=ue}i.call(ye.prototype)}}else{try{throw Error()}catch(ue){se=ue}(ye=i())&&typeof ye.catch=="function"&&ye.catch(function(){})}}catch(ue){if(ue&&se&&typeof ue.stack=="string")return[ue.stack,se.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var b=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");b&&b.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _=p.DetermineComponentFrameRoot(),M=_[0],k=_[1];if(M&&k){var W=M.split(`
|
|
44
|
-
`),ie=k.split(`
|
|
45
|
-
`);for(b=p=0;p<W.length&&!W[p].includes("DetermineComponentFrameRoot");)p++;for(;b<ie.length&&!ie[b].includes("DetermineComponentFrameRoot");)b++;if(p===W.length||b===ie.length)for(p=W.length-1,b=ie.length-1;1<=p&&0<=b&&W[p]!==ie[b];)b--;for(;1<=p&&0<=b;p--,b--)if(W[p]!==ie[b]){if(p!==1||b!==1)do if(p--,b--,0>b||W[p]!==ie[b]){var he=`
|
|
46
|
-
`+W[p].replace(" at new "," at ");return i.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",i.displayName)),he}while(1<=p&&0<=b);break}}}finally{Je=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?De(u):""}function at(i,s){switch(i.tag){case 26:case 27:case 5:return De(i.type);case 16:return De("Lazy");case 13:return i.child!==s&&s!==null?De("Suspense Fallback"):De("Suspense");case 19:return De("SuspenseList");case 0:case 15:return Ye(i.type,!1);case 11:return Ye(i.type.render,!1);case 1:return Ye(i.type,!0);case 31:return De("Activity");default:return""}}function jt(i){try{var s="",u=null;do s+=at(i,u),u=i,i=i.return;while(i);return s}catch(p){return`
|
|
47
|
-
Error generating stack: `+p.message+`
|
|
48
|
-
`+p.stack}}var dt=Object.prototype.hasOwnProperty,gn=e.unstable_scheduleCallback,on=e.unstable_cancelCallback,Tt=e.unstable_shouldYield,Ft=e.unstable_requestPaint,H=e.unstable_now,ee=e.unstable_getCurrentPriorityLevel,ae=e.unstable_ImmediatePriority,Re=e.unstable_UserBlockingPriority,Ce=e.unstable_NormalPriority,je=e.unstable_LowPriority,Ee=e.unstable_IdlePriority,We=e.log,Ge=e.unstable_setDisableYieldValue,Ot=null,Ct=null;function Rt(i){if(typeof We=="function"&&Ge(i),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(Ot,i)}catch{}}var Vt=Math.clz32?Math.clz32:Dn,Hr=Math.log,Fr=Math.LN2;function Dn(i){return i>>>=0,i===0?32:31-(Hr(i)/Fr|0)|0}var Bn=256,Zn=262144,Te=4194304;function Ke(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 me(i,s,u){var p=i.pendingLanes;if(p===0)return 0;var b=0,_=i.suspendedLanes,M=i.pingedLanes;i=i.warmLanes;var k=p&134217727;return k!==0?(p=k&~_,p!==0?b=Ke(p):(M&=k,M!==0?b=Ke(M):u||(u=k&~i,u!==0&&(b=Ke(u))))):(k=p&~_,k!==0?b=Ke(k):M!==0?b=Ke(M):u||(u=p&~i,u!==0&&(b=Ke(u)))),b===0?0:s!==0&&s!==b&&(s&_)===0&&(_=b&-b,u=s&-s,_>=u||_===32&&(u&4194048)!==0)?s:b}function He(i,s){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&s)===0}function tt(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 Be(){var i=Te;return Te<<=1,(Te&62914560)===0&&(Te=4194304),i}function hn(i){for(var s=[],u=0;31>u;u++)s.push(i);return s}function te(i,s){i.pendingLanes|=s,s!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function _e(i,s,u,p,b,_){var M=i.pendingLanes;i.pendingLanes=u,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=u,i.entangledLanes&=u,i.errorRecoveryDisabledLanes&=u,i.shellSuspendCounter=0;var k=i.entanglements,W=i.expirationTimes,ie=i.hiddenUpdates;for(u=M&~u;0<u;){var he=31-Vt(u),ye=1<<he;k[he]=0,W[he]=-1;var se=ie[he];if(se!==null)for(ie[he]=null,he=0;he<se.length;he++){var ue=se[he];ue!==null&&(ue.lane&=-536870913)}u&=~ye}p!==0&&de(i,p,0),_!==0&&b===0&&i.tag!==0&&(i.suspendedLanes|=_&~(M&~s))}function de(i,s,u){i.pendingLanes|=s,i.suspendedLanes&=~s;var p=31-Vt(s);i.entangledLanes|=s,i.entanglements[p]=i.entanglements[p]|1073741824|u&261930}function ze(i,s){var u=i.entangledLanes|=s;for(i=i.entanglements;u;){var p=31-Vt(u),b=1<<p;b&s|i[p]&s&&(i[p]|=s),u&=~b}}function Ie(i,s){var u=s&-s;return u=(u&42)!==0?1:Me(u),(u&(i.suspendedLanes|s))!==0?0:u}function Me(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 Ve(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function ut(){var i=G.p;return i!==0?i:(i=window.event,i===void 0?32:rC(i.type))}function kn(i,s){var u=G.p;try{return G.p=i,s()}finally{G.p=u}}var wr=Math.random().toString(36).slice(2),yn="__reactFiber$"+wr,Xn="__reactProps$"+wr,Gi="__reactContainer$"+wr,Hs="__reactEvents$"+wr,vg="__reactListeners$"+wr,YU="__reactHandles$"+wr,xE="__reactResources$"+wr,Fc="__reactMarker$"+wr;function gg(i){delete i[yn],delete i[Xn],delete i[Hs],delete i[vg],delete i[YU]}function Fs(i){var s=i[yn];if(s)return s;for(var u=i.parentNode;u;){if(s=u[Gi]||u[yn]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(i=U2(i);i!==null;){if(u=i[yn])return u;i=U2(i)}return s}i=u,u=i.parentNode}return null}function Vs(i){if(i=i[yn]||i[Gi]){var s=i.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return i}return null}function Vc(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i.stateNode;throw Error(r(33))}function Gs(i){var s=i[xE];return s||(s=i[xE]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function $n(i){i[Fc]=!0}var wE=new Set,SE={};function Ho(i,s){Ys(i,s),Ys(i+"Capture",s)}function Ys(i,s){for(SE[i]=s,i=0;i<s.length;i++)wE.add(s[i])}var WU=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]*$"),_E={},AE={};function KU(i){return dt.call(AE,i)?!0:dt.call(_E,i)?!1:WU.test(i)?AE[i]=!0:(_E[i]=!0,!1)}function Dd(i,s,u){if(KU(s))if(u===null)i.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":i.removeAttribute(s);return;case"boolean":var p=s.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){i.removeAttribute(s);return}}i.setAttribute(s,""+u)}}function kd(i,s,u){if(u===null)i.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(s);return}i.setAttribute(s,""+u)}}function oi(i,s,u,p){if(p===null)i.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttributeNS(s,u,""+p)}}function Vr(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function OE(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ZU(i,s,u){var p=Object.getOwnPropertyDescriptor(i.constructor.prototype,s);if(!i.hasOwnProperty(s)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var b=p.get,_=p.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return b.call(this)},set:function(M){u=""+M,_.call(this,M)}}),Object.defineProperty(i,s,{enumerable:p.enumerable}),{getValue:function(){return u},setValue:function(M){u=""+M},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function yg(i){if(!i._valueTracker){var s=OE(i)?"checked":"value";i._valueTracker=ZU(i,s,""+i[s])}}function EE(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var u=s.getValue(),p="";return i&&(p=OE(i)?i.checked?"true":"false":i.value),i=p,i!==u?(s.setValue(i),!0):!1}function $d(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 XU=/[\n"\\]/g;function Gr(i){return i.replace(XU,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function bg(i,s,u,p,b,_,M,k){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=""+Vr(s)):i.value!==""+Vr(s)&&(i.value=""+Vr(s)):M!=="submit"&&M!=="reset"||i.removeAttribute("value"),s!=null?xg(i,M,Vr(s)):u!=null?xg(i,M,Vr(u)):p!=null&&i.removeAttribute("value"),b==null&&_!=null&&(i.defaultChecked=!!_),b!=null&&(i.checked=b&&typeof b!="function"&&typeof b!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?i.name=""+Vr(k):i.removeAttribute("name")}function jE(i,s,u,p,b,_,M,k){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(i.type=_),s!=null||u!=null){if(!(_!=="submit"&&_!=="reset"||s!=null)){yg(i);return}u=u!=null?""+Vr(u):"",s=s!=null?""+Vr(s):u,k||s===i.value||(i.value=s),i.defaultValue=s}p=p??b,p=typeof p!="function"&&typeof p!="symbol"&&!!p,i.checked=k?i.checked:!!p,i.defaultChecked=!!p,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(i.name=M),yg(i)}function xg(i,s,u){s==="number"&&$d(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function Ws(i,s,u,p){if(i=i.options,s){s={};for(var b=0;b<u.length;b++)s["$"+u[b]]=!0;for(u=0;u<i.length;u++)b=s.hasOwnProperty("$"+i[u].value),i[u].selected!==b&&(i[u].selected=b),b&&p&&(i[u].defaultSelected=!0)}else{for(u=""+Vr(u),s=null,b=0;b<i.length;b++){if(i[b].value===u){i[b].selected=!0,p&&(i[b].defaultSelected=!0);return}s!==null||i[b].disabled||(s=i[b])}s!==null&&(s.selected=!0)}}function TE(i,s,u){if(s!=null&&(s=""+Vr(s),s!==i.value&&(i.value=s),u==null)){i.defaultValue!==s&&(i.defaultValue=s);return}i.defaultValue=u!=null?""+Vr(u):""}function CE(i,s,u,p){if(s==null){if(p!=null){if(u!=null)throw Error(r(92));if(Y(p)){if(1<p.length)throw Error(r(93));p=p[0]}u=p}u==null&&(u=""),s=u}u=Vr(s),i.defaultValue=u,p=i.textContent,p===u&&p!==""&&p!==null&&(i.value=p),yg(i)}function Ks(i,s){if(s){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=s;return}}i.textContent=s}var QU=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 RE(i,s,u){var p=s.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?p?i.setProperty(s,""):s==="float"?i.cssFloat="":i[s]="":p?i.setProperty(s,u):typeof u!="number"||u===0||QU.has(s)?s==="float"?i.cssFloat=u:i[s]=(""+u).trim():i[s]=u+"px"}function NE(i,s,u){if(s!=null&&typeof s!="object")throw Error(r(62));if(i=i.style,u!=null){for(var p in u)!u.hasOwnProperty(p)||s!=null&&s.hasOwnProperty(p)||(p.indexOf("--")===0?i.setProperty(p,""):p==="float"?i.cssFloat="":i[p]="");for(var b in s)p=s[b],s.hasOwnProperty(b)&&u[b]!==p&&RE(i,b,p)}else for(var _ in s)s.hasOwnProperty(_)&&RE(i,_,s[_])}function wg(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 JU=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"]]),eq=/^[\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 zd(i){return eq.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function si(){}var Sg=null;function _g(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Zs=null,Xs=null;function ME(i){var s=Vs(i);if(s&&(i=s.stateNode)){var u=i[Xn]||null;e:switch(i=s.stateNode,s.type){case"input":if(bg(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),s=u.name,u.type==="radio"&&s!=null){for(u=i;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Gr(""+s)+'"][type="radio"]'),s=0;s<u.length;s++){var p=u[s];if(p!==i&&p.form===i.form){var b=p[Xn]||null;if(!b)throw Error(r(90));bg(p,b.value,b.defaultValue,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name)}}for(s=0;s<u.length;s++)p=u[s],p.form===i.form&&EE(p)}break e;case"textarea":TE(i,u.value,u.defaultValue);break e;case"select":s=u.value,s!=null&&Ws(i,!!u.multiple,s,!1)}}}var Ag=!1;function PE(i,s,u){if(Ag)return i(s,u);Ag=!0;try{var p=i(s);return p}finally{if(Ag=!1,(Zs!==null||Xs!==null)&&(Ah(),Zs&&(s=Zs,i=Xs,Xs=Zs=null,ME(s),i)))for(s=0;s<i.length;s++)ME(i[s])}}function Gc(i,s){var u=i.stateNode;if(u===null)return null;var p=u[Xn]||null;if(p===null)return null;u=p[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":(p=!p.disabled)||(i=i.type,p=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!p;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(r(231,s,typeof u));return u}var li=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Og=!1;if(li)try{var Yc={};Object.defineProperty(Yc,"passive",{get:function(){Og=!0}}),window.addEventListener("test",Yc,Yc),window.removeEventListener("test",Yc,Yc)}catch{Og=!1}var Yi=null,Eg=null,Ld=null;function DE(){if(Ld)return Ld;var i,s=Eg,u=s.length,p,b="value"in Yi?Yi.value:Yi.textContent,_=b.length;for(i=0;i<u&&s[i]===b[i];i++);var M=u-i;for(p=1;p<=M&&s[u-p]===b[_-p];p++);return Ld=b.slice(i,1<p?1-p:void 0)}function Id(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 Bd(){return!0}function kE(){return!1}function fr(i){function s(u,p,b,_,M){this._reactName=u,this._targetInst=b,this.type=p,this.nativeEvent=_,this.target=M,this.currentTarget=null;for(var k in i)i.hasOwnProperty(k)&&(u=i[k],this[k]=u?u(_):_[k]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?Bd:kE,this.isPropagationStopped=kE,this}return h(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Bd)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Bd)},persist:function(){},isPersistent:Bd}),s}var Fo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ud=fr(Fo),Wc=h({},Fo,{view:0,detail:0}),tq=fr(Wc),jg,Tg,Kc,qd=h({},Wc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rg,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!==Kc&&(Kc&&i.type==="mousemove"?(jg=i.screenX-Kc.screenX,Tg=i.screenY-Kc.screenY):Tg=jg=0,Kc=i),jg)},movementY:function(i){return"movementY"in i?i.movementY:Tg}}),$E=fr(qd),nq=h({},qd,{dataTransfer:0}),rq=fr(nq),aq=h({},Wc,{relatedTarget:0}),Cg=fr(aq),iq=h({},Fo,{animationName:0,elapsedTime:0,pseudoElement:0}),oq=fr(iq),sq=h({},Fo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),lq=fr(sq),cq=h({},Fo,{data:0}),zE=fr(cq),uq={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fq={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"},dq={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hq(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=dq[i])?!!s[i]:!1}function Rg(){return hq}var pq=h({},Wc,{key:function(i){if(i.key){var s=uq[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Id(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?fq[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rg,charCode:function(i){return i.type==="keypress"?Id(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Id(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),mq=fr(pq),vq=h({},qd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),LE=fr(vq),gq=h({},Wc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rg}),yq=fr(gq),bq=h({},Fo,{propertyName:0,elapsedTime:0,pseudoElement:0}),xq=fr(bq),wq=h({},qd,{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}),Sq=fr(wq),_q=h({},Fo,{newState:0,oldState:0}),Aq=fr(_q),Oq=[9,13,27,32],Ng=li&&"CompositionEvent"in window,Zc=null;li&&"documentMode"in document&&(Zc=document.documentMode);var Eq=li&&"TextEvent"in window&&!Zc,IE=li&&(!Ng||Zc&&8<Zc&&11>=Zc),BE=" ",UE=!1;function qE(i,s){switch(i){case"keyup":return Oq.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function HE(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Qs=!1;function jq(i,s){switch(i){case"compositionend":return HE(s);case"keypress":return s.which!==32?null:(UE=!0,BE);case"textInput":return i=s.data,i===BE&&UE?null:i;default:return null}}function Tq(i,s){if(Qs)return i==="compositionend"||!Ng&&qE(i,s)?(i=DE(),Ld=Eg=Yi=null,Qs=!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 IE&&s.locale!=="ko"?null:s.data;default:return null}}var Cq={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 FE(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!Cq[i.type]:s==="textarea"}function VE(i,s,u,p){Zs?Xs?Xs.push(p):Xs=[p]:Zs=p,s=Nh(s,"onChange"),0<s.length&&(u=new Ud("onChange","change",null,u,p),i.push({event:u,listeners:s}))}var Xc=null,Qc=null;function Rq(i){j2(i,0)}function Hd(i){var s=Vc(i);if(EE(s))return i}function GE(i,s){if(i==="change")return s}var YE=!1;if(li){var Mg;if(li){var Pg="oninput"in document;if(!Pg){var WE=document.createElement("div");WE.setAttribute("oninput","return;"),Pg=typeof WE.oninput=="function"}Mg=Pg}else Mg=!1;YE=Mg&&(!document.documentMode||9<document.documentMode)}function KE(){Xc&&(Xc.detachEvent("onpropertychange",ZE),Qc=Xc=null)}function ZE(i){if(i.propertyName==="value"&&Hd(Qc)){var s=[];VE(s,Qc,i,_g(i)),PE(Rq,s)}}function Nq(i,s,u){i==="focusin"?(KE(),Xc=s,Qc=u,Xc.attachEvent("onpropertychange",ZE)):i==="focusout"&&KE()}function Mq(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Hd(Qc)}function Pq(i,s){if(i==="click")return Hd(s)}function Dq(i,s){if(i==="input"||i==="change")return Hd(s)}function kq(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Sr=typeof Object.is=="function"?Object.is:kq;function Jc(i,s){if(Sr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var u=Object.keys(i),p=Object.keys(s);if(u.length!==p.length)return!1;for(p=0;p<u.length;p++){var b=u[p];if(!dt.call(s,b)||!Sr(i[b],s[b]))return!1}return!0}function XE(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function QE(i,s){var u=XE(i);i=0;for(var p;u;){if(u.nodeType===3){if(p=i+u.textContent.length,i<=s&&p>=s)return{node:u,offset:s-i};i=p}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=XE(u)}}function JE(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?JE(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function ej(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var s=$d(i.document);s instanceof i.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)i=s.contentWindow;else break;s=$d(i.document)}return s}function Dg(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 $q=li&&"documentMode"in document&&11>=document.documentMode,Js=null,kg=null,eu=null,$g=!1;function tj(i,s,u){var p=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;$g||Js==null||Js!==$d(p)||(p=Js,"selectionStart"in p&&Dg(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),eu&&Jc(eu,p)||(eu=p,p=Nh(kg,"onSelect"),0<p.length&&(s=new Ud("onSelect","select",null,s,u),i.push({event:s,listeners:p}),s.target=Js)))}function Vo(i,s){var u={};return u[i.toLowerCase()]=s.toLowerCase(),u["Webkit"+i]="webkit"+s,u["Moz"+i]="moz"+s,u}var el={animationend:Vo("Animation","AnimationEnd"),animationiteration:Vo("Animation","AnimationIteration"),animationstart:Vo("Animation","AnimationStart"),transitionrun:Vo("Transition","TransitionRun"),transitionstart:Vo("Transition","TransitionStart"),transitioncancel:Vo("Transition","TransitionCancel"),transitionend:Vo("Transition","TransitionEnd")},zg={},nj={};li&&(nj=document.createElement("div").style,"AnimationEvent"in window||(delete el.animationend.animation,delete el.animationiteration.animation,delete el.animationstart.animation),"TransitionEvent"in window||delete el.transitionend.transition);function Go(i){if(zg[i])return zg[i];if(!el[i])return i;var s=el[i],u;for(u in s)if(s.hasOwnProperty(u)&&u in nj)return zg[i]=s[u];return i}var rj=Go("animationend"),aj=Go("animationiteration"),ij=Go("animationstart"),zq=Go("transitionrun"),Lq=Go("transitionstart"),Iq=Go("transitioncancel"),oj=Go("transitionend"),sj=new Map,Lg="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(" ");Lg.push("scrollEnd");function ga(i,s){sj.set(i,s),Ho(s,[i])}var Fd=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)},Yr=[],tl=0,Ig=0;function Vd(){for(var i=tl,s=Ig=tl=0;s<i;){var u=Yr[s];Yr[s++]=null;var p=Yr[s];Yr[s++]=null;var b=Yr[s];Yr[s++]=null;var _=Yr[s];if(Yr[s++]=null,p!==null&&b!==null){var M=p.pending;M===null?b.next=b:(b.next=M.next,M.next=b),p.pending=b}_!==0&&lj(u,b,_)}}function Gd(i,s,u,p){Yr[tl++]=i,Yr[tl++]=s,Yr[tl++]=u,Yr[tl++]=p,Ig|=p,i.lanes|=p,i=i.alternate,i!==null&&(i.lanes|=p)}function Bg(i,s,u,p){return Gd(i,s,u,p),Yd(i)}function Yo(i,s){return Gd(i,null,null,s),Yd(i)}function lj(i,s,u){i.lanes|=u;var p=i.alternate;p!==null&&(p.lanes|=u);for(var b=!1,_=i.return;_!==null;)_.childLanes|=u,p=_.alternate,p!==null&&(p.childLanes|=u),_.tag===22&&(i=_.stateNode,i===null||i._visibility&1||(b=!0)),i=_,_=_.return;return i.tag===3?(_=i.stateNode,b&&s!==null&&(b=31-Vt(u),i=_.hiddenUpdates,p=i[b],p===null?i[b]=[s]:p.push(s),s.lane=u|536870912),_):null}function Yd(i){if(50<Su)throw Su=0,Ky=null,Error(r(185));for(var s=i.return;s!==null;)i=s,s=i.return;return i.tag===3?i.stateNode:null}var nl={};function Bq(i,s,u,p){this.tag=i,this.key=u,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=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _r(i,s,u,p){return new Bq(i,s,u,p)}function Ug(i){return i=i.prototype,!(!i||!i.isReactComponent)}function ci(i,s){var u=i.alternate;return u===null?(u=_r(i.tag,s,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=s,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&65011712,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,s=i.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u.refCleanup=i.refCleanup,u}function cj(i,s){i.flags&=65011714;var u=i.alternate;return u===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=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type,s=u.dependencies,i.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),i}function Wd(i,s,u,p,b,_){var M=0;if(p=i,typeof i=="function")Ug(i)&&(M=1);else if(typeof i=="string")M=VH(i,u,fe.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case z:return i=_r(31,u,s,b),i.elementType=z,i.lanes=_,i;case S:return Wo(u.children,b,_,s);case w:M=8,b|=24;break;case O:return i=_r(12,u,s,b|2),i.elementType=O,i.lanes=_,i;case T:return i=_r(13,u,s,b),i.elementType=T,i.lanes=_,i;case C:return i=_r(19,u,s,b),i.elementType=C,i.lanes=_,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case j:M=10;break e;case E:M=9;break e;case R:M=11;break e;case N:M=14;break e;case D:M=16,p=null;break e}M=29,u=Error(r(130,i===null?"null":typeof i,"")),p=null}return s=_r(M,u,s,b),s.elementType=i,s.type=p,s.lanes=_,s}function Wo(i,s,u,p){return i=_r(7,i,p,s),i.lanes=u,i}function qg(i,s,u){return i=_r(6,i,null,s),i.lanes=u,i}function uj(i){var s=_r(18,null,null,0);return s.stateNode=i,s}function Hg(i,s,u){return s=_r(4,i.children!==null?i.children:[],i.key,s),s.lanes=u,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}var fj=new WeakMap;function Wr(i,s){if(typeof i=="object"&&i!==null){var u=fj.get(i);return u!==void 0?u:(s={value:i,source:s,stack:jt(s)},fj.set(i,s),s)}return{value:i,source:s,stack:jt(s)}}var rl=[],al=0,Kd=null,tu=0,Kr=[],Zr=0,Wi=null,La=1,Ia="";function ui(i,s){rl[al++]=tu,rl[al++]=Kd,Kd=i,tu=s}function dj(i,s,u){Kr[Zr++]=La,Kr[Zr++]=Ia,Kr[Zr++]=Wi,Wi=i;var p=La;i=Ia;var b=32-Vt(p)-1;p&=~(1<<b),u+=1;var _=32-Vt(s)+b;if(30<_){var M=b-b%5;_=(p&(1<<M)-1).toString(32),p>>=M,b-=M,La=1<<32-Vt(s)+b|u<<b|p,Ia=_+i}else La=1<<_|u<<b|p,Ia=i}function Fg(i){i.return!==null&&(ui(i,1),dj(i,1,0))}function Vg(i){for(;i===Kd;)Kd=rl[--al],rl[al]=null,tu=rl[--al],rl[al]=null;for(;i===Wi;)Wi=Kr[--Zr],Kr[Zr]=null,Ia=Kr[--Zr],Kr[Zr]=null,La=Kr[--Zr],Kr[Zr]=null}function hj(i,s){Kr[Zr++]=La,Kr[Zr++]=Ia,Kr[Zr++]=Wi,La=s.id,Ia=s.overflow,Wi=i}var Un=null,Kt=null,bt=!1,Ki=null,Xr=!1,Gg=Error(r(519));function Zi(i){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw nu(Wr(s,i)),Gg}function pj(i){var s=i.stateNode,u=i.type,p=i.memoizedProps;switch(s[yn]=i,s[Xn]=p,u){case"dialog":pt("cancel",s),pt("close",s);break;case"iframe":case"object":case"embed":pt("load",s);break;case"video":case"audio":for(u=0;u<Au.length;u++)pt(Au[u],s);break;case"source":pt("error",s);break;case"img":case"image":case"link":pt("error",s),pt("load",s);break;case"details":pt("toggle",s);break;case"input":pt("invalid",s),jE(s,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":pt("invalid",s);break;case"textarea":pt("invalid",s),CE(s,p.value,p.defaultValue,p.children)}u=p.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||s.textContent===""+u||p.suppressHydrationWarning===!0||N2(s.textContent,u)?(p.popover!=null&&(pt("beforetoggle",s),pt("toggle",s)),p.onScroll!=null&&pt("scroll",s),p.onScrollEnd!=null&&pt("scrollend",s),p.onClick!=null&&(s.onclick=si),s=!0):s=!1,s||Zi(i,!0)}function mj(i){for(Un=i.return;Un;)switch(Un.tag){case 5:case 31:case 13:Xr=!1;return;case 27:case 3:Xr=!0;return;default:Un=Un.return}}function il(i){if(i!==Un)return!1;if(!bt)return mj(i),bt=!0,!1;var s=i.tag,u;if((u=s!==3&&s!==27)&&((u=s===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||ub(i.type,i.memoizedProps)),u=!u),u&&Kt&&Zi(i),mj(i),s===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Kt=B2(i)}else if(s===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Kt=B2(i)}else s===27?(s=Kt,uo(i.type)?(i=mb,mb=null,Kt=i):Kt=s):Kt=Un?Jr(i.stateNode.nextSibling):null;return!0}function Ko(){Kt=Un=null,bt=!1}function Yg(){var i=Ki;return i!==null&&(mr===null?mr=i:mr.push.apply(mr,i),Ki=null),i}function nu(i){Ki===null?Ki=[i]:Ki.push(i)}var Wg=I(null),Zo=null,fi=null;function Xi(i,s,u){Q(Wg,s._currentValue),s._currentValue=u}function di(i){i._currentValue=Wg.current,Z(Wg)}function Kg(i,s,u){for(;i!==null;){var p=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,p!==null&&(p.childLanes|=s)):p!==null&&(p.childLanes&s)!==s&&(p.childLanes|=s),i===u)break;i=i.return}}function Zg(i,s,u,p){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 k=_;_=b;for(var W=0;W<s.length;W++)if(k.context===s[W]){_.lanes|=u,k=_.alternate,k!==null&&(k.lanes|=u),Kg(_.return,u,i),p||(M=null);break e}_=k.next}}else if(b.tag===18){if(M=b.return,M===null)throw Error(r(341));M.lanes|=u,_=M.alternate,_!==null&&(_.lanes|=u),Kg(M,u,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 ol(i,s,u,p){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 k=b.type;Sr(b.pendingProps.value,M.value)||(i!==null?i.push(k):i=[k])}}else if(b===ve.current){if(M=b.alternate,M===null)throw Error(r(387));M.memoizedState.memoizedState!==b.memoizedState.memoizedState&&(i!==null?i.push(Cu):i=[Cu])}b=b.return}i!==null&&Zg(s,i,u,p),s.flags|=262144}function Zd(i){for(i=i.firstContext;i!==null;){if(!Sr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Xo(i){Zo=i,fi=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function qn(i){return vj(Zo,i)}function Xd(i,s){return Zo===null&&Xo(i),vj(i,s)}function vj(i,s){var u=s._currentValue;if(s={context:s,memoizedValue:u,next:null},fi===null){if(i===null)throw Error(r(308));fi=s,i.dependencies={lanes:0,firstContext:s},i.flags|=524288}else fi=fi.next=s;return u}var Uq=typeof AbortController<"u"?AbortController:function(){var i=[],s=this.signal={aborted:!1,addEventListener:function(u,p){i.push(p)}};this.abort=function(){s.aborted=!0,i.forEach(function(u){return u()})}},qq=e.unstable_scheduleCallback,Hq=e.unstable_NormalPriority,bn={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Xg(){return{controller:new Uq,data:new Map,refCount:0}}function ru(i){i.refCount--,i.refCount===0&&qq(Hq,function(){i.controller.abort()})}var au=null,Qg=0,sl=0,ll=null;function Fq(i,s){if(au===null){var u=au=[];Qg=0,sl=tb(),ll={status:"pending",value:void 0,then:function(p){u.push(p)}}}return Qg++,s.then(gj,gj),s}function gj(){if(--Qg===0&&au!==null){ll!==null&&(ll.status="fulfilled");var i=au;au=null,sl=0,ll=null;for(var s=0;s<i.length;s++)(0,i[s])()}}function Vq(i,s){var u=[],p={status:"pending",value:null,reason:null,then:function(b){u.push(b)}};return i.then(function(){p.status="fulfilled",p.value=s;for(var b=0;b<u.length;b++)(0,u[b])(s)},function(b){for(p.status="rejected",p.reason=b,b=0;b<u.length;b++)(0,u[b])(void 0)}),p}var yj=$.S;$.S=function(i,s){t2=H(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&Fq(i,s),yj!==null&&yj(i,s)};var Qo=I(null);function Jg(){var i=Qo.current;return i!==null?i:Gt.pooledCache}function Qd(i,s){s===null?Q(Qo,Qo.current):Q(Qo,s.pool)}function bj(){var i=Jg();return i===null?null:{parent:bn._currentValue,pool:i}}var cl=Error(r(460)),ey=Error(r(474)),Jd=Error(r(542)),eh={then:function(){}};function xj(i){return i=i.status,i==="fulfilled"||i==="rejected"}function wj(i,s,u){switch(u=i[u],u===void 0?i.push(s):u!==s&&(s.then(si,si),s=u),s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,_j(i),i;default:if(typeof s.status=="string")s.then(si,si);else{if(i=Gt,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=s,i.status="pending",i.then(function(p){if(s.status==="pending"){var b=s;b.status="fulfilled",b.value=p}},function(p){if(s.status==="pending"){var b=s;b.status="rejected",b.reason=p}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,_j(i),i}throw es=s,cl}}function Jo(i){try{var s=i._init;return s(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(es=u,cl):u}}var es=null;function Sj(){if(es===null)throw Error(r(459));var i=es;return es=null,i}function _j(i){if(i===cl||i===Jd)throw Error(r(483))}var ul=null,iu=0;function th(i){var s=iu;return iu+=1,ul===null&&(ul=[]),wj(ul,i,s)}function ou(i,s){s=s.props.ref,i.ref=s!==void 0?s:null}function nh(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 Aj(i){function s(J,X){if(i){var re=J.deletions;re===null?(J.deletions=[X],J.flags|=16):re.push(X)}}function u(J,X){if(!i)return null;for(;X!==null;)s(J,X),X=X.sibling;return null}function p(J){for(var X=new Map;J!==null;)J.key!==null?X.set(J.key,J):X.set(J.index,J),J=J.sibling;return X}function b(J,X){return J=ci(J,X),J.index=0,J.sibling=null,J}function _(J,X,re){return J.index=re,i?(re=J.alternate,re!==null?(re=re.index,re<X?(J.flags|=67108866,X):re):(J.flags|=67108866,X)):(J.flags|=1048576,X)}function M(J){return i&&J.alternate===null&&(J.flags|=67108866),J}function k(J,X,re,ge){return X===null||X.tag!==6?(X=qg(re,J.mode,ge),X.return=J,X):(X=b(X,re),X.return=J,X)}function W(J,X,re,ge){var Fe=re.type;return Fe===S?he(J,X,re.props.children,ge,re.key):X!==null&&(X.elementType===Fe||typeof Fe=="object"&&Fe!==null&&Fe.$$typeof===D&&Jo(Fe)===X.type)?(X=b(X,re.props),ou(X,re),X.return=J,X):(X=Wd(re.type,re.key,re.props,null,J.mode,ge),ou(X,re),X.return=J,X)}function ie(J,X,re,ge){return X===null||X.tag!==4||X.stateNode.containerInfo!==re.containerInfo||X.stateNode.implementation!==re.implementation?(X=Hg(re,J.mode,ge),X.return=J,X):(X=b(X,re.children||[]),X.return=J,X)}function he(J,X,re,ge,Fe){return X===null||X.tag!==7?(X=Wo(re,J.mode,ge,Fe),X.return=J,X):(X=b(X,re),X.return=J,X)}function ye(J,X,re){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=qg(""+X,J.mode,re),X.return=J,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case x:return re=Wd(X.type,X.key,X.props,null,J.mode,re),ou(re,X),re.return=J,re;case A:return X=Hg(X,J.mode,re),X.return=J,X;case D:return X=Jo(X),ye(J,X,re)}if(Y(X)||P(X))return X=Wo(X,J.mode,re,null),X.return=J,X;if(typeof X.then=="function")return ye(J,th(X),re);if(X.$$typeof===j)return ye(J,Xd(J,X),re);nh(J,X)}return null}function se(J,X,re,ge){var Fe=X!==null?X.key:null;if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return Fe!==null?null:k(J,X,""+re,ge);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case x:return re.key===Fe?W(J,X,re,ge):null;case A:return re.key===Fe?ie(J,X,re,ge):null;case D:return re=Jo(re),se(J,X,re,ge)}if(Y(re)||P(re))return Fe!==null?null:he(J,X,re,ge,null);if(typeof re.then=="function")return se(J,X,th(re),ge);if(re.$$typeof===j)return se(J,X,Xd(J,re),ge);nh(J,re)}return null}function ue(J,X,re,ge,Fe){if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return J=J.get(re)||null,k(X,J,""+ge,Fe);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case x:return J=J.get(ge.key===null?re:ge.key)||null,W(X,J,ge,Fe);case A:return J=J.get(ge.key===null?re:ge.key)||null,ie(X,J,ge,Fe);case D:return ge=Jo(ge),ue(J,X,re,ge,Fe)}if(Y(ge)||P(ge))return J=J.get(re)||null,he(X,J,ge,Fe,null);if(typeof ge.then=="function")return ue(J,X,re,th(ge),Fe);if(ge.$$typeof===j)return ue(J,X,re,Xd(X,ge),Fe);nh(X,ge)}return null}function Le(J,X,re,ge){for(var Fe=null,wt=null,Ue=X,ot=X=0,gt=null;Ue!==null&&ot<re.length;ot++){Ue.index>ot?(gt=Ue,Ue=null):gt=Ue.sibling;var St=se(J,Ue,re[ot],ge);if(St===null){Ue===null&&(Ue=gt);break}i&&Ue&&St.alternate===null&&s(J,Ue),X=_(St,X,ot),wt===null?Fe=St:wt.sibling=St,wt=St,Ue=gt}if(ot===re.length)return u(J,Ue),bt&&ui(J,ot),Fe;if(Ue===null){for(;ot<re.length;ot++)Ue=ye(J,re[ot],ge),Ue!==null&&(X=_(Ue,X,ot),wt===null?Fe=Ue:wt.sibling=Ue,wt=Ue);return bt&&ui(J,ot),Fe}for(Ue=p(Ue);ot<re.length;ot++)gt=ue(Ue,J,ot,re[ot],ge),gt!==null&&(i&>.alternate!==null&&Ue.delete(gt.key===null?ot:gt.key),X=_(gt,X,ot),wt===null?Fe=gt:wt.sibling=gt,wt=gt);return i&&Ue.forEach(function(vo){return s(J,vo)}),bt&&ui(J,ot),Fe}function Ze(J,X,re,ge){if(re==null)throw Error(r(151));for(var Fe=null,wt=null,Ue=X,ot=X=0,gt=null,St=re.next();Ue!==null&&!St.done;ot++,St=re.next()){Ue.index>ot?(gt=Ue,Ue=null):gt=Ue.sibling;var vo=se(J,Ue,St.value,ge);if(vo===null){Ue===null&&(Ue=gt);break}i&&Ue&&vo.alternate===null&&s(J,Ue),X=_(vo,X,ot),wt===null?Fe=vo:wt.sibling=vo,wt=vo,Ue=gt}if(St.done)return u(J,Ue),bt&&ui(J,ot),Fe;if(Ue===null){for(;!St.done;ot++,St=re.next())St=ye(J,St.value,ge),St!==null&&(X=_(St,X,ot),wt===null?Fe=St:wt.sibling=St,wt=St);return bt&&ui(J,ot),Fe}for(Ue=p(Ue);!St.done;ot++,St=re.next())St=ue(Ue,J,ot,St.value,ge),St!==null&&(i&&St.alternate!==null&&Ue.delete(St.key===null?ot:St.key),X=_(St,X,ot),wt===null?Fe=St:wt.sibling=St,wt=St);return i&&Ue.forEach(function(n9){return s(J,n9)}),bt&&ui(J,ot),Fe}function Bt(J,X,re,ge){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 Fe=re.key;X!==null;){if(X.key===Fe){if(Fe=re.type,Fe===S){if(X.tag===7){u(J,X.sibling),ge=b(X,re.props.children),ge.return=J,J=ge;break e}}else if(X.elementType===Fe||typeof Fe=="object"&&Fe!==null&&Fe.$$typeof===D&&Jo(Fe)===X.type){u(J,X.sibling),ge=b(X,re.props),ou(ge,re),ge.return=J,J=ge;break e}u(J,X);break}else s(J,X);X=X.sibling}re.type===S?(ge=Wo(re.props.children,J.mode,ge,re.key),ge.return=J,J=ge):(ge=Wd(re.type,re.key,re.props,null,J.mode,ge),ou(ge,re),ge.return=J,J=ge)}return M(J);case A:e:{for(Fe=re.key;X!==null;){if(X.key===Fe)if(X.tag===4&&X.stateNode.containerInfo===re.containerInfo&&X.stateNode.implementation===re.implementation){u(J,X.sibling),ge=b(X,re.children||[]),ge.return=J,J=ge;break e}else{u(J,X);break}else s(J,X);X=X.sibling}ge=Hg(re,J.mode,ge),ge.return=J,J=ge}return M(J);case D:return re=Jo(re),Bt(J,X,re,ge)}if(Y(re))return Le(J,X,re,ge);if(P(re)){if(Fe=P(re),typeof Fe!="function")throw Error(r(150));return re=Fe.call(re),Ze(J,X,re,ge)}if(typeof re.then=="function")return Bt(J,X,th(re),ge);if(re.$$typeof===j)return Bt(J,X,Xd(J,re),ge);nh(J,re)}return typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint"?(re=""+re,X!==null&&X.tag===6?(u(J,X.sibling),ge=b(X,re),ge.return=J,J=ge):(u(J,X),ge=qg(re,J.mode,ge),ge.return=J,J=ge),M(J)):u(J,X)}return function(J,X,re,ge){try{iu=0;var Fe=Bt(J,X,re,ge);return ul=null,Fe}catch(Ue){if(Ue===cl||Ue===Jd)throw Ue;var wt=_r(29,Ue,null,J.mode);return wt.lanes=ge,wt.return=J,wt}finally{}}}var ts=Aj(!0),Oj=Aj(!1),Qi=!1;function ty(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ny(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 Ji(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function eo(i,s,u){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(Et&2)!==0){var b=p.pending;return b===null?s.next=s:(s.next=b.next,b.next=s),p.pending=s,s=Yd(i),lj(i,null,u),s}return Gd(i,p,s,u),Yd(i)}function su(i,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194048)!==0)){var p=s.lanes;p&=i.pendingLanes,u|=p,s.lanes=u,ze(i,u)}}function ry(i,s){var u=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,u===p)){var b=null,_=null;if(u=u.firstBaseUpdate,u!==null){do{var M={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};_===null?b=_=M:_=_.next=M,u=u.next}while(u!==null);_===null?b=_=s:_=_.next=s}else b=_=s;u={baseState:p.baseState,firstBaseUpdate:b,lastBaseUpdate:_,shared:p.shared,callbacks:p.callbacks},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=s:i.next=s,u.lastBaseUpdate=s}var ay=!1;function lu(){if(ay){var i=ll;if(i!==null)throw i}}function cu(i,s,u,p){ay=!1;var b=i.updateQueue;Qi=!1;var _=b.firstBaseUpdate,M=b.lastBaseUpdate,k=b.shared.pending;if(k!==null){b.shared.pending=null;var W=k,ie=W.next;W.next=null,M===null?_=ie:M.next=ie,M=W;var he=i.alternate;he!==null&&(he=he.updateQueue,k=he.lastBaseUpdate,k!==M&&(k===null?he.firstBaseUpdate=ie:k.next=ie,he.lastBaseUpdate=W))}if(_!==null){var ye=b.baseState;M=0,he=ie=W=null,k=_;do{var se=k.lane&-536870913,ue=se!==k.lane;if(ue?(vt&se)===se:(p&se)===se){se!==0&&se===sl&&(ay=!0),he!==null&&(he=he.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Le=i,Ze=k;se=s;var Bt=u;switch(Ze.tag){case 1:if(Le=Ze.payload,typeof Le=="function"){ye=Le.call(Bt,ye,se);break e}ye=Le;break e;case 3:Le.flags=Le.flags&-65537|128;case 0:if(Le=Ze.payload,se=typeof Le=="function"?Le.call(Bt,ye,se):Le,se==null)break e;ye=h({},ye,se);break e;case 2:Qi=!0}}se=k.callback,se!==null&&(i.flags|=64,ue&&(i.flags|=8192),ue=b.callbacks,ue===null?b.callbacks=[se]:ue.push(se))}else ue={lane:se,tag:k.tag,payload:k.payload,callback:k.callback,next:null},he===null?(ie=he=ue,W=ye):he=he.next=ue,M|=se;if(k=k.next,k===null){if(k=b.shared.pending,k===null)break;ue=k,k=ue.next,ue.next=null,b.lastBaseUpdate=ue,b.shared.pending=null}}while(!0);he===null&&(W=ye),b.baseState=W,b.firstBaseUpdate=ie,b.lastBaseUpdate=he,_===null&&(b.shared.lanes=0),io|=M,i.lanes=M,i.memoizedState=ye}}function Ej(i,s){if(typeof i!="function")throw Error(r(191,i));i.call(s)}function jj(i,s){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)Ej(u[i],s)}var fl=I(null),rh=I(0);function Tj(i,s){i=wi,Q(rh,i),Q(fl,s),wi=i|s.baseLanes}function iy(){Q(rh,wi),Q(fl,fl.current)}function oy(){wi=rh.current,Z(fl),Z(rh)}var Ar=I(null),Qr=null;function to(i){var s=i.alternate;Q(pn,pn.current&1),Q(Ar,i),Qr===null&&(s===null||fl.current!==null||s.memoizedState!==null)&&(Qr=i)}function sy(i){Q(pn,pn.current),Q(Ar,i),Qr===null&&(Qr=i)}function Cj(i){i.tag===22?(Q(pn,pn.current),Q(Ar,i),Qr===null&&(Qr=i)):no()}function no(){Q(pn,pn.current),Q(Ar,Ar.current)}function Or(i){Z(Ar),Qr===i&&(Qr=null),Z(pn)}var pn=I(0);function ah(i){for(var s=i;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||hb(u)||pb(u)))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 hi=0,it=null,Lt=null,xn=null,ih=!1,dl=!1,ns=!1,oh=0,uu=0,hl=null,Gq=0;function cn(){throw Error(r(321))}function ly(i,s){if(s===null)return!1;for(var u=0;u<s.length&&u<i.length;u++)if(!Sr(i[u],s[u]))return!1;return!0}function cy(i,s,u,p,b,_){return hi=_,it=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,$.H=i===null||i.memoizedState===null?dT:Ay,ns=!1,_=u(p,b),ns=!1,dl&&(_=Nj(s,u,p,b)),Rj(i),_}function Rj(i){$.H=hu;var s=Lt!==null&&Lt.next!==null;if(hi=0,xn=Lt=it=null,ih=!1,uu=0,hl=null,s)throw Error(r(300));i===null||wn||(i=i.dependencies,i!==null&&Zd(i)&&(wn=!0))}function Nj(i,s,u,p){it=i;var b=0;do{if(dl&&(hl=null),uu=0,dl=!1,25<=b)throw Error(r(301));if(b+=1,xn=Lt=null,i.updateQueue!=null){var _=i.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}$.H=hT,_=s(u,p)}while(dl);return _}function Yq(){var i=$.H,s=i.useState()[0];return s=typeof s.then=="function"?fu(s):s,i=i.useState()[0],(Lt!==null?Lt.memoizedState:null)!==i&&(it.flags|=1024),s}function uy(){var i=oh!==0;return oh=0,i}function fy(i,s,u){s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~u}function dy(i){if(ih){for(i=i.memoizedState;i!==null;){var s=i.queue;s!==null&&(s.pending=null),i=i.next}ih=!1}hi=0,xn=Lt=it=null,dl=!1,uu=oh=0,hl=null}function ir(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xn===null?it.memoizedState=xn=i:xn=xn.next=i,xn}function mn(){if(Lt===null){var i=it.alternate;i=i!==null?i.memoizedState:null}else i=Lt.next;var s=xn===null?it.memoizedState:xn.next;if(s!==null)xn=s,Lt=i;else{if(i===null)throw it.alternate===null?Error(r(467)):Error(r(310));Lt=i,i={memoizedState:Lt.memoizedState,baseState:Lt.baseState,baseQueue:Lt.baseQueue,queue:Lt.queue,next:null},xn===null?it.memoizedState=xn=i:xn=xn.next=i}return xn}function sh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function fu(i){var s=uu;return uu+=1,hl===null&&(hl=[]),i=wj(hl,i,s),s=it,(xn===null?s.memoizedState:xn.next)===null&&(s=s.alternate,$.H=s===null||s.memoizedState===null?dT:Ay),i}function lh(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return fu(i);if(i.$$typeof===j)return qn(i)}throw Error(r(438,String(i)))}function hy(i){var s=null,u=it.updateQueue;if(u!==null&&(s=u.memoCache),s==null){var p=it.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(s={data:p.data.map(function(b){return b.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),u===null&&(u=sh(),it.updateQueue=u),u.memoCache=s,u=s.data[s.index],u===void 0)for(u=s.data[s.index]=Array(i),p=0;p<i;p++)u[p]=V;return s.index++,u}function pi(i,s){return typeof s=="function"?s(i):s}function ch(i){var s=mn();return py(s,Lt,i)}function py(i,s,u){var p=i.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=u;var b=i.baseQueue,_=p.pending;if(_!==null){if(b!==null){var M=b.next;b.next=_.next,_.next=M}s.baseQueue=b=_,p.pending=null}if(_=i.baseState,b===null)i.memoizedState=_;else{s=b.next;var k=M=null,W=null,ie=s,he=!1;do{var ye=ie.lane&-536870913;if(ye!==ie.lane?(vt&ye)===ye:(hi&ye)===ye){var se=ie.revertLane;if(se===0)W!==null&&(W=W.next={lane:0,revertLane:0,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),ye===sl&&(he=!0);else if((hi&se)===se){ie=ie.next,se===sl&&(he=!0);continue}else ye={lane:0,revertLane:ie.revertLane,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},W===null?(k=W=ye,M=_):W=W.next=ye,it.lanes|=se,io|=se;ye=ie.action,ns&&u(_,ye),_=ie.hasEagerState?ie.eagerState:u(_,ye)}else se={lane:ye,revertLane:ie.revertLane,gesture:ie.gesture,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},W===null?(k=W=se,M=_):W=W.next=se,it.lanes|=ye,io|=ye;ie=ie.next}while(ie!==null&&ie!==s);if(W===null?M=_:W.next=k,!Sr(_,i.memoizedState)&&(wn=!0,he&&(u=ll,u!==null)))throw u;i.memoizedState=_,i.baseState=M,i.baseQueue=W,p.lastRenderedState=_}return b===null&&(p.lanes=0),[i.memoizedState,p.dispatch]}function my(i){var s=mn(),u=s.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var p=u.dispatch,b=u.pending,_=s.memoizedState;if(b!==null){u.pending=null;var M=b=b.next;do _=i(_,M.action),M=M.next;while(M!==b);Sr(_,s.memoizedState)||(wn=!0),s.memoizedState=_,s.baseQueue===null&&(s.baseState=_),u.lastRenderedState=_}return[_,p]}function Mj(i,s,u){var p=it,b=mn(),_=bt;if(_){if(u===void 0)throw Error(r(407));u=u()}else u=s();var M=!Sr((Lt||b).memoizedState,u);if(M&&(b.memoizedState=u,wn=!0),b=b.queue,yy(kj.bind(null,p,b,i),[i]),b.getSnapshot!==s||M||xn!==null&&xn.memoizedState.tag&1){if(p.flags|=2048,pl(9,{destroy:void 0},Dj.bind(null,p,b,u,s),null),Gt===null)throw Error(r(349));_||(hi&127)!==0||Pj(p,s,u)}return u}function Pj(i,s,u){i.flags|=16384,i={getSnapshot:s,value:u},s=it.updateQueue,s===null?(s=sh(),it.updateQueue=s,s.stores=[i]):(u=s.stores,u===null?s.stores=[i]:u.push(i))}function Dj(i,s,u,p){s.value=u,s.getSnapshot=p,$j(s)&&zj(i)}function kj(i,s,u){return u(function(){$j(s)&&zj(i)})}function $j(i){var s=i.getSnapshot;i=i.value;try{var u=s();return!Sr(i,u)}catch{return!0}}function zj(i){var s=Yo(i,2);s!==null&&vr(s,i,2)}function vy(i){var s=ir();if(typeof i=="function"){var u=i;if(i=u(),ns){Rt(!0);try{u()}finally{Rt(!1)}}}return s.memoizedState=s.baseState=i,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pi,lastRenderedState:i},s}function Lj(i,s,u,p){return i.baseState=u,py(i,Lt,typeof p=="function"?p:pi)}function Wq(i,s,u,p,b){if(dh(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)}};$.T!==null?u(!0):_.isTransition=!1,p(_),u=s.pending,u===null?(_.next=s.pending=_,Ij(s,_)):(_.next=u.next,s.pending=u.next=_)}}function Ij(i,s){var u=s.action,p=s.payload,b=i.state;if(s.isTransition){var _=$.T,M={};$.T=M;try{var k=u(b,p),W=$.S;W!==null&&W(M,k),Bj(i,s,k)}catch(ie){gy(i,s,ie)}finally{_!==null&&M.types!==null&&(_.types=M.types),$.T=_}}else try{_=u(b,p),Bj(i,s,_)}catch(ie){gy(i,s,ie)}}function Bj(i,s,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(p){Uj(i,s,p)},function(p){return gy(i,s,p)}):Uj(i,s,u)}function Uj(i,s,u){s.status="fulfilled",s.value=u,qj(s),i.state=u,s=i.pending,s!==null&&(u=s.next,u===s?i.pending=null:(u=u.next,s.next=u,Ij(i,u)))}function gy(i,s,u){var p=i.pending;if(i.pending=null,p!==null){p=p.next;do s.status="rejected",s.reason=u,qj(s),s=s.next;while(s!==p)}i.action=null}function qj(i){i=i.listeners;for(var s=0;s<i.length;s++)(0,i[s])()}function Hj(i,s){return s}function Fj(i,s){if(bt){var u=Gt.formState;if(u!==null){e:{var p=it;if(bt){if(Kt){t:{for(var b=Kt,_=Xr;b.nodeType!==8;){if(!_){b=null;break t}if(b=Jr(b.nextSibling),b===null){b=null;break t}}_=b.data,b=_==="F!"||_==="F"?b:null}if(b){Kt=Jr(b.nextSibling),p=b.data==="F!";break e}}Zi(p)}p=!1}p&&(s=u[0])}}return u=ir(),u.memoizedState=u.baseState=s,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hj,lastRenderedState:s},u.queue=p,u=cT.bind(null,it,p),p.dispatch=u,p=vy(!1),_=_y.bind(null,it,!1,p.queue),p=ir(),b={state:s,dispatch:null,action:i,pending:null},p.queue=b,u=Wq.bind(null,it,b,_,u),b.dispatch=u,p.memoizedState=i,[s,u,!1]}function Vj(i){var s=mn();return Gj(s,Lt,i)}function Gj(i,s,u){if(s=py(i,s,Hj)[0],i=ch(pi)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var p=fu(s)}catch(M){throw M===cl?Jd:M}else p=s;s=mn();var b=s.queue,_=b.dispatch;return u!==s.memoizedState&&(it.flags|=2048,pl(9,{destroy:void 0},Kq.bind(null,b,u),null)),[p,_,i]}function Kq(i,s){i.action=s}function Yj(i){var s=mn(),u=Lt;if(u!==null)return Gj(s,u,i);mn(),s=s.memoizedState,u=mn();var p=u.queue.dispatch;return u.memoizedState=i,[s,p,!1]}function pl(i,s,u,p){return i={tag:i,create:u,deps:p,inst:s,next:null},s=it.updateQueue,s===null&&(s=sh(),it.updateQueue=s),u=s.lastEffect,u===null?s.lastEffect=i.next=i:(p=u.next,u.next=i,i.next=p,s.lastEffect=i),i}function Wj(){return mn().memoizedState}function uh(i,s,u,p){var b=ir();it.flags|=i,b.memoizedState=pl(1|s,{destroy:void 0},u,p===void 0?null:p)}function fh(i,s,u,p){var b=mn();p=p===void 0?null:p;var _=b.memoizedState.inst;Lt!==null&&p!==null&&ly(p,Lt.memoizedState.deps)?b.memoizedState=pl(s,_,u,p):(it.flags|=i,b.memoizedState=pl(1|s,_,u,p))}function Kj(i,s){uh(8390656,8,i,s)}function yy(i,s){fh(2048,8,i,s)}function Zq(i){it.flags|=4;var s=it.updateQueue;if(s===null)s=sh(),it.updateQueue=s,s.events=[i];else{var u=s.events;u===null?s.events=[i]:u.push(i)}}function Zj(i){var s=mn().memoizedState;return Zq({ref:s,nextImpl:i}),function(){if((Et&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function Xj(i,s){return fh(4,2,i,s)}function Qj(i,s){return fh(4,4,i,s)}function Jj(i,s){if(typeof s=="function"){i=i();var u=s(i);return function(){typeof u=="function"?u():s(null)}}if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function eT(i,s,u){u=u!=null?u.concat([i]):null,fh(4,4,Jj.bind(null,s,i),u)}function by(){}function tT(i,s){var u=mn();s=s===void 0?null:s;var p=u.memoizedState;return s!==null&&ly(s,p[1])?p[0]:(u.memoizedState=[i,s],i)}function nT(i,s){var u=mn();s=s===void 0?null:s;var p=u.memoizedState;if(s!==null&&ly(s,p[1]))return p[0];if(p=i(),ns){Rt(!0);try{i()}finally{Rt(!1)}}return u.memoizedState=[p,s],p}function xy(i,s,u){return u===void 0||(hi&1073741824)!==0&&(vt&261930)===0?i.memoizedState=s:(i.memoizedState=u,i=r2(),it.lanes|=i,io|=i,u)}function rT(i,s,u,p){return Sr(u,s)?u:fl.current!==null?(i=xy(i,u,p),Sr(i,s)||(wn=!0),i):(hi&42)===0||(hi&1073741824)!==0&&(vt&261930)===0?(wn=!0,i.memoizedState=u):(i=r2(),it.lanes|=i,io|=i,s)}function aT(i,s,u,p,b){var _=G.p;G.p=_!==0&&8>_?_:8;var M=$.T,k={};$.T=k,_y(i,!1,s,u);try{var W=b(),ie=$.S;if(ie!==null&&ie(k,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var he=Vq(W,p);du(i,s,he,Tr(i))}else du(i,s,p,Tr(i))}catch(ye){du(i,s,{then:function(){},status:"rejected",reason:ye},Tr())}finally{G.p=_,M!==null&&k.types!==null&&(M.types=k.types),$.T=M}}function Xq(){}function wy(i,s,u,p){if(i.tag!==5)throw Error(r(476));var b=iT(i).queue;aT(i,b,s,F,u===null?Xq:function(){return oT(i),u(p)})}function iT(i){var s=i.memoizedState;if(s!==null)return s;s={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pi,lastRenderedState:F},next:null};var u={};return s.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pi,lastRenderedState:u},next:null},i.memoizedState=s,i=i.alternate,i!==null&&(i.memoizedState=s),s}function oT(i){var s=iT(i);s.next===null&&(s=i.alternate.memoizedState),du(i,s.next.queue,{},Tr())}function Sy(){return qn(Cu)}function sT(){return mn().memoizedState}function lT(){return mn().memoizedState}function Qq(i){for(var s=i.return;s!==null;){switch(s.tag){case 24:case 3:var u=Tr();i=Ji(u);var p=eo(s,i,u);p!==null&&(vr(p,s,u),su(p,s,u)),s={cache:Xg()},i.payload=s;return}s=s.return}}function Jq(i,s,u){var p=Tr();u={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},dh(i)?uT(s,u):(u=Bg(i,s,u,p),u!==null&&(vr(u,i,p),fT(u,s,p)))}function cT(i,s,u){var p=Tr();du(i,s,u,p)}function du(i,s,u,p){var b={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(dh(i))uT(s,b);else{var _=i.alternate;if(i.lanes===0&&(_===null||_.lanes===0)&&(_=s.lastRenderedReducer,_!==null))try{var M=s.lastRenderedState,k=_(M,u);if(b.hasEagerState=!0,b.eagerState=k,Sr(k,M))return Gd(i,s,b,0),Gt===null&&Vd(),!1}catch{}finally{}if(u=Bg(i,s,b,p),u!==null)return vr(u,i,p),fT(u,s,p),!0}return!1}function _y(i,s,u,p){if(p={lane:2,revertLane:tb(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},dh(i)){if(s)throw Error(r(479))}else s=Bg(i,u,p,2),s!==null&&vr(s,i,2)}function dh(i){var s=i.alternate;return i===it||s!==null&&s===it}function uT(i,s){dl=ih=!0;var u=i.pending;u===null?s.next=s:(s.next=u.next,u.next=s),i.pending=s}function fT(i,s,u){if((u&4194048)!==0){var p=s.lanes;p&=i.pendingLanes,u|=p,s.lanes=u,ze(i,u)}}var hu={readContext:qn,use:lh,useCallback:cn,useContext:cn,useEffect:cn,useImperativeHandle:cn,useLayoutEffect:cn,useInsertionEffect:cn,useMemo:cn,useReducer:cn,useRef:cn,useState:cn,useDebugValue:cn,useDeferredValue:cn,useTransition:cn,useSyncExternalStore:cn,useId:cn,useHostTransitionStatus:cn,useFormState:cn,useActionState:cn,useOptimistic:cn,useMemoCache:cn,useCacheRefresh:cn};hu.useEffectEvent=cn;var dT={readContext:qn,use:lh,useCallback:function(i,s){return ir().memoizedState=[i,s===void 0?null:s],i},useContext:qn,useEffect:Kj,useImperativeHandle:function(i,s,u){u=u!=null?u.concat([i]):null,uh(4194308,4,Jj.bind(null,s,i),u)},useLayoutEffect:function(i,s){return uh(4194308,4,i,s)},useInsertionEffect:function(i,s){uh(4,2,i,s)},useMemo:function(i,s){var u=ir();s=s===void 0?null:s;var p=i();if(ns){Rt(!0);try{i()}finally{Rt(!1)}}return u.memoizedState=[p,s],p},useReducer:function(i,s,u){var p=ir();if(u!==void 0){var b=u(s);if(ns){Rt(!0);try{u(s)}finally{Rt(!1)}}}else b=s;return p.memoizedState=p.baseState=b,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:b},p.queue=i,i=i.dispatch=Jq.bind(null,it,i),[p.memoizedState,i]},useRef:function(i){var s=ir();return i={current:i},s.memoizedState=i},useState:function(i){i=vy(i);var s=i.queue,u=cT.bind(null,it,s);return s.dispatch=u,[i.memoizedState,u]},useDebugValue:by,useDeferredValue:function(i,s){var u=ir();return xy(u,i,s)},useTransition:function(){var i=vy(!1);return i=aT.bind(null,it,i.queue,!0,!1),ir().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,s,u){var p=it,b=ir();if(bt){if(u===void 0)throw Error(r(407));u=u()}else{if(u=s(),Gt===null)throw Error(r(349));(vt&127)!==0||Pj(p,s,u)}b.memoizedState=u;var _={value:u,getSnapshot:s};return b.queue=_,Kj(kj.bind(null,p,_,i),[i]),p.flags|=2048,pl(9,{destroy:void 0},Dj.bind(null,p,_,u,s),null),u},useId:function(){var i=ir(),s=Gt.identifierPrefix;if(bt){var u=Ia,p=La;u=(p&~(1<<32-Vt(p)-1)).toString(32)+u,s="_"+s+"R_"+u,u=oh++,0<u&&(s+="H"+u.toString(32)),s+="_"}else u=Gq++,s="_"+s+"r_"+u.toString(32)+"_";return i.memoizedState=s},useHostTransitionStatus:Sy,useFormState:Fj,useActionState:Fj,useOptimistic:function(i){var s=ir();s.memoizedState=s.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=u,s=_y.bind(null,it,!0,u),u.dispatch=s,[i,s]},useMemoCache:hy,useCacheRefresh:function(){return ir().memoizedState=Qq.bind(null,it)},useEffectEvent:function(i){var s=ir(),u={impl:i};return s.memoizedState=u,function(){if((Et&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},Ay={readContext:qn,use:lh,useCallback:tT,useContext:qn,useEffect:yy,useImperativeHandle:eT,useInsertionEffect:Xj,useLayoutEffect:Qj,useMemo:nT,useReducer:ch,useRef:Wj,useState:function(){return ch(pi)},useDebugValue:by,useDeferredValue:function(i,s){var u=mn();return rT(u,Lt.memoizedState,i,s)},useTransition:function(){var i=ch(pi)[0],s=mn().memoizedState;return[typeof i=="boolean"?i:fu(i),s]},useSyncExternalStore:Mj,useId:sT,useHostTransitionStatus:Sy,useFormState:Vj,useActionState:Vj,useOptimistic:function(i,s){var u=mn();return Lj(u,Lt,i,s)},useMemoCache:hy,useCacheRefresh:lT};Ay.useEffectEvent=Zj;var hT={readContext:qn,use:lh,useCallback:tT,useContext:qn,useEffect:yy,useImperativeHandle:eT,useInsertionEffect:Xj,useLayoutEffect:Qj,useMemo:nT,useReducer:my,useRef:Wj,useState:function(){return my(pi)},useDebugValue:by,useDeferredValue:function(i,s){var u=mn();return Lt===null?xy(u,i,s):rT(u,Lt.memoizedState,i,s)},useTransition:function(){var i=my(pi)[0],s=mn().memoizedState;return[typeof i=="boolean"?i:fu(i),s]},useSyncExternalStore:Mj,useId:sT,useHostTransitionStatus:Sy,useFormState:Yj,useActionState:Yj,useOptimistic:function(i,s){var u=mn();return Lt!==null?Lj(u,Lt,i,s):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:hy,useCacheRefresh:lT};hT.useEffectEvent=Zj;function Oy(i,s,u,p){s=i.memoizedState,u=u(p,s),u=u==null?s:h({},s,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var Ey={enqueueSetState:function(i,s,u){i=i._reactInternals;var p=Tr(),b=Ji(p);b.payload=s,u!=null&&(b.callback=u),s=eo(i,b,p),s!==null&&(vr(s,i,p),su(s,i,p))},enqueueReplaceState:function(i,s,u){i=i._reactInternals;var p=Tr(),b=Ji(p);b.tag=1,b.payload=s,u!=null&&(b.callback=u),s=eo(i,b,p),s!==null&&(vr(s,i,p),su(s,i,p))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var u=Tr(),p=Ji(u);p.tag=2,s!=null&&(p.callback=s),s=eo(i,p,u),s!==null&&(vr(s,i,u),su(s,i,u))}};function pT(i,s,u,p,b,_,M){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,_,M):s.prototype&&s.prototype.isPureReactComponent?!Jc(u,p)||!Jc(b,_):!0}function mT(i,s,u,p){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,p),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,p),s.state!==i&&Ey.enqueueReplaceState(s,s.state,null)}function rs(i,s){var u=s;if("ref"in s){u={};for(var p in s)p!=="ref"&&(u[p]=s[p])}if(i=i.defaultProps){u===s&&(u=h({},u));for(var b in i)u[b]===void 0&&(u[b]=i[b])}return u}function vT(i){Fd(i)}function gT(i){console.error(i)}function yT(i){Fd(i)}function hh(i,s){try{var u=i.onUncaughtError;u(s.value,{componentStack:s.stack})}catch(p){setTimeout(function(){throw p})}}function bT(i,s,u){try{var p=i.onCaughtError;p(u.value,{componentStack:u.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(b){setTimeout(function(){throw b})}}function jy(i,s,u){return u=Ji(u),u.tag=3,u.payload={element:null},u.callback=function(){hh(i,s)},u}function xT(i){return i=Ji(i),i.tag=3,i}function wT(i,s,u,p){var b=u.type.getDerivedStateFromError;if(typeof b=="function"){var _=p.value;i.payload=function(){return b(_)},i.callback=function(){bT(s,u,p)}}var M=u.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(i.callback=function(){bT(s,u,p),typeof b!="function"&&(oo===null?oo=new Set([this]):oo.add(this));var k=p.stack;this.componentDidCatch(p.value,{componentStack:k!==null?k:""})})}function eH(i,s,u,p,b){if(u.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(s=u.alternate,s!==null&&ol(s,u,b,!0),u=Ar.current,u!==null){switch(u.tag){case 31:case 13:return Qr===null?Oh():u.alternate===null&&un===0&&(un=3),u.flags&=-257,u.flags|=65536,u.lanes=b,p===eh?u.flags|=16384:(s=u.updateQueue,s===null?u.updateQueue=new Set([p]):s.add(p),Qy(i,p,b)),!1;case 22:return u.flags|=65536,p===eh?u.flags|=16384:(s=u.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([p])},u.updateQueue=s):(u=s.retryQueue,u===null?s.retryQueue=new Set([p]):u.add(p)),Qy(i,p,b)),!1}throw Error(r(435,u.tag))}return Qy(i,p,b),Oh(),!1}if(bt)return s=Ar.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=b,p!==Gg&&(i=Error(r(422),{cause:p}),nu(Wr(i,u)))):(p!==Gg&&(s=Error(r(423),{cause:p}),nu(Wr(s,u))),i=i.current.alternate,i.flags|=65536,b&=-b,i.lanes|=b,p=Wr(p,u),b=jy(i.stateNode,p,b),ry(i,b),un!==4&&(un=2)),!1;var _=Error(r(520),{cause:p});if(_=Wr(_,u),wu===null?wu=[_]:wu.push(_),un!==4&&(un=2),s===null)return!0;p=Wr(p,u),u=s;do{switch(u.tag){case 3:return u.flags|=65536,i=b&-b,u.lanes|=i,i=jy(u.stateNode,p,i),ry(u,i),!1;case 1:if(s=u.type,_=u.stateNode,(u.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(oo===null||!oo.has(_))))return u.flags|=65536,b&=-b,u.lanes|=b,b=xT(b),wT(b,i,u,p),ry(u,b),!1}u=u.return}while(u!==null);return!1}var Ty=Error(r(461)),wn=!1;function Hn(i,s,u,p){s.child=i===null?Oj(s,null,u,p):ts(s,i.child,u,p)}function ST(i,s,u,p,b){u=u.render;var _=s.ref;if("ref"in p){var M={};for(var k in p)k!=="ref"&&(M[k]=p[k])}else M=p;return Xo(s),p=cy(i,s,u,M,_,b),k=uy(),i!==null&&!wn?(fy(i,s,b),mi(i,s,b)):(bt&&k&&Fg(s),s.flags|=1,Hn(i,s,p,b),s.child)}function _T(i,s,u,p,b){if(i===null){var _=u.type;return typeof _=="function"&&!Ug(_)&&_.defaultProps===void 0&&u.compare===null?(s.tag=15,s.type=_,AT(i,s,_,p,b)):(i=Wd(u.type,null,p,s,s.mode,b),i.ref=s.ref,i.return=s,s.child=i)}if(_=i.child,!$y(i,b)){var M=_.memoizedProps;if(u=u.compare,u=u!==null?u:Jc,u(M,p)&&i.ref===s.ref)return mi(i,s,b)}return s.flags|=1,i=ci(_,p),i.ref=s.ref,i.return=s,s.child=i}function AT(i,s,u,p,b){if(i!==null){var _=i.memoizedProps;if(Jc(_,p)&&i.ref===s.ref)if(wn=!1,s.pendingProps=p=_,$y(i,b))(i.flags&131072)!==0&&(wn=!0);else return s.lanes=i.lanes,mi(i,s,b)}return Cy(i,s,u,p,b)}function OT(i,s,u,p){var b=p.children,_=i!==null?i.memoizedState:null;if(i===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((s.flags&128)!==0){if(_=_!==null?_.baseLanes|u:u,i!==null){for(p=s.child=i.child,b=0;p!==null;)b=b|p.lanes|p.childLanes,p=p.sibling;p=b&~_}else p=0,s.child=null;return ET(i,s,_,u,p)}if((u&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},i!==null&&Qd(s,_!==null?_.cachePool:null),_!==null?Tj(s,_):iy(),Cj(s);else return p=s.lanes=536870912,ET(i,s,_!==null?_.baseLanes|u:u,u,p)}else _!==null?(Qd(s,_.cachePool),Tj(s,_),no(),s.memoizedState=null):(i!==null&&Qd(s,null),iy(),no());return Hn(i,s,b,u),s.child}function pu(i,s){return i!==null&&i.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function ET(i,s,u,p,b){var _=Jg();return _=_===null?null:{parent:bn._currentValue,pool:_},s.memoizedState={baseLanes:u,cachePool:_},i!==null&&Qd(s,null),iy(),Cj(s),i!==null&&ol(i,s,p,!0),s.childLanes=b,null}function ph(i,s){return s=vh({mode:s.mode,children:s.children},i.mode),s.ref=i.ref,i.child=s,s.return=i,s}function jT(i,s,u){return ts(s,i.child,null,u),i=ph(s,s.pendingProps),i.flags|=2,Or(s),s.memoizedState=null,i}function tH(i,s,u){var p=s.pendingProps,b=(s.flags&128)!==0;if(s.flags&=-129,i===null){if(bt){if(p.mode==="hidden")return i=ph(s,p),s.lanes=536870912,pu(null,i);if(sy(s),(i=Kt)?(i=I2(i,Xr),i=i!==null&&i.data==="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:Wi!==null?{id:La,overflow:Ia}:null,retryLane:536870912,hydrationErrors:null},u=uj(i),u.return=s,s.child=u,Un=s,Kt=null)):i=null,i===null)throw Zi(s);return s.lanes=536870912,null}return ph(s,p)}var _=i.memoizedState;if(_!==null){var M=_.dehydrated;if(sy(s),b)if(s.flags&256)s.flags&=-257,s=jT(i,s,u);else if(s.memoizedState!==null)s.child=i.child,s.flags|=128,s=null;else throw Error(r(558));else if(wn||ol(i,s,u,!1),b=(u&i.childLanes)!==0,wn||b){if(p=Gt,p!==null&&(M=Ie(p,u),M!==0&&M!==_.retryLane))throw _.retryLane=M,Yo(i,M),vr(p,i,M),Ty;Oh(),s=jT(i,s,u)}else i=_.treeContext,Kt=Jr(M.nextSibling),Un=s,bt=!0,Ki=null,Xr=!1,i!==null&&hj(s,i),s=ph(s,p),s.flags|=4096;return s}return i=ci(i.child,{mode:p.mode,children:p.children}),i.ref=s.ref,s.child=i,i.return=s,i}function mh(i,s){var u=s.ref;if(u===null)i!==null&&i.ref!==null&&(s.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(i===null||i.ref!==u)&&(s.flags|=4194816)}}function Cy(i,s,u,p,b){return Xo(s),u=cy(i,s,u,p,void 0,b),p=uy(),i!==null&&!wn?(fy(i,s,b),mi(i,s,b)):(bt&&p&&Fg(s),s.flags|=1,Hn(i,s,u,b),s.child)}function TT(i,s,u,p,b,_){return Xo(s),s.updateQueue=null,u=Nj(s,p,u,b),Rj(i),p=uy(),i!==null&&!wn?(fy(i,s,_),mi(i,s,_)):(bt&&p&&Fg(s),s.flags|=1,Hn(i,s,u,_),s.child)}function CT(i,s,u,p,b){if(Xo(s),s.stateNode===null){var _=nl,M=u.contextType;typeof M=="object"&&M!==null&&(_=qn(M)),_=new u(p,_),s.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=Ey,s.stateNode=_,_._reactInternals=s,_=s.stateNode,_.props=p,_.state=s.memoizedState,_.refs={},ty(s),M=u.contextType,_.context=typeof M=="object"&&M!==null?qn(M):nl,_.state=s.memoizedState,M=u.getDerivedStateFromProps,typeof M=="function"&&(Oy(s,u,M,p),_.state=s.memoizedState),typeof u.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&&Ey.enqueueReplaceState(_,_.state,null),cu(s,p,_,b),lu(),_.state=s.memoizedState),typeof _.componentDidMount=="function"&&(s.flags|=4194308),p=!0}else if(i===null){_=s.stateNode;var k=s.memoizedProps,W=rs(u,k);_.props=W;var ie=_.context,he=u.contextType;M=nl,typeof he=="object"&&he!==null&&(M=qn(he));var ye=u.getDerivedStateFromProps;he=typeof ye=="function"||typeof _.getSnapshotBeforeUpdate=="function",k=s.pendingProps!==k,he||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(k||ie!==M)&&mT(s,_,p,M),Qi=!1;var se=s.memoizedState;_.state=se,cu(s,p,_,b),lu(),ie=s.memoizedState,k||se!==ie||Qi?(typeof ye=="function"&&(Oy(s,u,ye,p),ie=s.memoizedState),(W=Qi||pT(s,u,W,p,se,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=p,s.memoizedState=ie),_.props=p,_.state=ie,_.context=M,p=W):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),p=!1)}else{_=s.stateNode,ny(i,s),M=s.memoizedProps,he=rs(u,M),_.props=he,ye=s.pendingProps,se=_.context,ie=u.contextType,W=nl,typeof ie=="object"&&ie!==null&&(W=qn(ie)),k=u.getDerivedStateFromProps,(ie=typeof k=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(M!==ye||se!==W)&&mT(s,_,p,W),Qi=!1,se=s.memoizedState,_.state=se,cu(s,p,_,b),lu();var ue=s.memoizedState;M!==ye||se!==ue||Qi||i!==null&&i.dependencies!==null&&Zd(i.dependencies)?(typeof k=="function"&&(Oy(s,u,k,p),ue=s.memoizedState),(he=Qi||pT(s,u,he,p,se,ue,W)||i!==null&&i.dependencies!==null&&Zd(i.dependencies))?(ie||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(p,ue,W),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(p,ue,W)),typeof _.componentDidUpdate=="function"&&(s.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof _.componentDidUpdate!="function"||M===i.memoizedProps&&se===i.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&se===i.memoizedState||(s.flags|=1024),s.memoizedProps=p,s.memoizedState=ue),_.props=p,_.state=ue,_.context=W,p=he):(typeof _.componentDidUpdate!="function"||M===i.memoizedProps&&se===i.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&se===i.memoizedState||(s.flags|=1024),p=!1)}return _=p,mh(i,s),p=(s.flags&128)!==0,_||p?(_=s.stateNode,u=p&&typeof u.getDerivedStateFromError!="function"?null:_.render(),s.flags|=1,i!==null&&p?(s.child=ts(s,i.child,null,b),s.child=ts(s,null,u,b)):Hn(i,s,u,b),s.memoizedState=_.state,i=s.child):i=mi(i,s,b),i}function RT(i,s,u,p){return Ko(),s.flags|=256,Hn(i,s,u,p),s.child}var Ry={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ny(i){return{baseLanes:i,cachePool:bj()}}function My(i,s,u){return i=i!==null?i.childLanes&~u:0,s&&(i|=jr),i}function NT(i,s,u){var p=s.pendingProps,b=!1,_=(s.flags&128)!==0,M;if((M=_)||(M=i!==null&&i.memoizedState===null?!1:(pn.current&2)!==0),M&&(b=!0,s.flags&=-129),M=(s.flags&32)!==0,s.flags&=-33,i===null){if(bt){if(b?to(s):no(),(i=Kt)?(i=I2(i,Xr),i=i!==null&&i.data!=="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:Wi!==null?{id:La,overflow:Ia}:null,retryLane:536870912,hydrationErrors:null},u=uj(i),u.return=s,s.child=u,Un=s,Kt=null)):i=null,i===null)throw Zi(s);return pb(i)?s.lanes=32:s.lanes=536870912,null}var k=p.children;return p=p.fallback,b?(no(),b=s.mode,k=vh({mode:"hidden",children:k},b),p=Wo(p,b,u,null),k.return=s,p.return=s,k.sibling=p,s.child=k,p=s.child,p.memoizedState=Ny(u),p.childLanes=My(i,M,u),s.memoizedState=Ry,pu(null,p)):(to(s),Py(s,k))}var W=i.memoizedState;if(W!==null&&(k=W.dehydrated,k!==null)){if(_)s.flags&256?(to(s),s.flags&=-257,s=Dy(i,s,u)):s.memoizedState!==null?(no(),s.child=i.child,s.flags|=128,s=null):(no(),k=p.fallback,b=s.mode,p=vh({mode:"visible",children:p.children},b),k=Wo(k,b,u,null),k.flags|=2,p.return=s,k.return=s,p.sibling=k,s.child=p,ts(s,i.child,null,u),p=s.child,p.memoizedState=Ny(u),p.childLanes=My(i,M,u),s.memoizedState=Ry,s=pu(null,p));else if(to(s),pb(k)){if(M=k.nextSibling&&k.nextSibling.dataset,M)var ie=M.dgst;M=ie,p=Error(r(419)),p.stack="",p.digest=M,nu({value:p,source:null,stack:null}),s=Dy(i,s,u)}else if(wn||ol(i,s,u,!1),M=(u&i.childLanes)!==0,wn||M){if(M=Gt,M!==null&&(p=Ie(M,u),p!==0&&p!==W.retryLane))throw W.retryLane=p,Yo(i,p),vr(M,i,p),Ty;hb(k)||Oh(),s=Dy(i,s,u)}else hb(k)?(s.flags|=192,s.child=i.child,s=null):(i=W.treeContext,Kt=Jr(k.nextSibling),Un=s,bt=!0,Ki=null,Xr=!1,i!==null&&hj(s,i),s=Py(s,p.children),s.flags|=4096);return s}return b?(no(),k=p.fallback,b=s.mode,W=i.child,ie=W.sibling,p=ci(W,{mode:"hidden",children:p.children}),p.subtreeFlags=W.subtreeFlags&65011712,ie!==null?k=ci(ie,k):(k=Wo(k,b,u,null),k.flags|=2),k.return=s,p.return=s,p.sibling=k,s.child=p,pu(null,p),p=s.child,k=i.child.memoizedState,k===null?k=Ny(u):(b=k.cachePool,b!==null?(W=bn._currentValue,b=b.parent!==W?{parent:W,pool:W}:b):b=bj(),k={baseLanes:k.baseLanes|u,cachePool:b}),p.memoizedState=k,p.childLanes=My(i,M,u),s.memoizedState=Ry,pu(i.child,p)):(to(s),u=i.child,i=u.sibling,u=ci(u,{mode:"visible",children:p.children}),u.return=s,u.sibling=null,i!==null&&(M=s.deletions,M===null?(s.deletions=[i],s.flags|=16):M.push(i)),s.child=u,s.memoizedState=null,u)}function Py(i,s){return s=vh({mode:"visible",children:s},i.mode),s.return=i,i.child=s}function vh(i,s){return i=_r(22,i,null,s),i.lanes=0,i}function Dy(i,s,u){return ts(s,i.child,null,u),i=Py(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function MT(i,s,u){i.lanes|=s;var p=i.alternate;p!==null&&(p.lanes|=s),Kg(i.return,s,u)}function ky(i,s,u,p,b,_){var M=i.memoizedState;M===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:p,tail:u,tailMode:b,treeForkCount:_}:(M.isBackwards=s,M.rendering=null,M.renderingStartTime=0,M.last=p,M.tail=u,M.tailMode=b,M.treeForkCount=_)}function PT(i,s,u){var p=s.pendingProps,b=p.revealOrder,_=p.tail;p=p.children;var M=pn.current,k=(M&2)!==0;if(k?(M=M&1|2,s.flags|=128):M&=1,Q(pn,M),Hn(i,s,p,u),p=bt?tu:0,!k&&i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&MT(i,u,s);else if(i.tag===19)MT(i,u,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(u=s.child,b=null;u!==null;)i=u.alternate,i!==null&&ah(i)===null&&(b=u),u=u.sibling;u=b,u===null?(b=s.child,s.child=null):(b=u.sibling,u.sibling=null),ky(s,!1,b,u,_,p);break;case"backwards":case"unstable_legacy-backwards":for(u=null,b=s.child,s.child=null;b!==null;){if(i=b.alternate,i!==null&&ah(i)===null){s.child=b;break}i=b.sibling,b.sibling=u,u=b,b=i}ky(s,!0,u,null,_,p);break;case"together":ky(s,!1,null,null,void 0,p);break;default:s.memoizedState=null}return s.child}function mi(i,s,u){if(i!==null&&(s.dependencies=i.dependencies),io|=s.lanes,(u&s.childLanes)===0)if(i!==null){if(ol(i,s,u,!1),(u&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,u=ci(i,i.pendingProps),s.child=u,u.return=s;i.sibling!==null;)i=i.sibling,u=u.sibling=ci(i,i.pendingProps),u.return=s;u.sibling=null}return s.child}function $y(i,s){return(i.lanes&s)!==0?!0:(i=i.dependencies,!!(i!==null&&Zd(i)))}function nH(i,s,u){switch(s.tag){case 3:xe(s,s.stateNode.containerInfo),Xi(s,bn,i.memoizedState.cache),Ko();break;case 27:case 5:Ae(s);break;case 4:xe(s,s.stateNode.containerInfo);break;case 10:Xi(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,sy(s),null;break;case 13:var p=s.memoizedState;if(p!==null)return p.dehydrated!==null?(to(s),s.flags|=128,null):(u&s.child.childLanes)!==0?NT(i,s,u):(to(s),i=mi(i,s,u),i!==null?i.sibling:null);to(s);break;case 19:var b=(i.flags&128)!==0;if(p=(u&s.childLanes)!==0,p||(ol(i,s,u,!1),p=(u&s.childLanes)!==0),b){if(p)return PT(i,s,u);s.flags|=128}if(b=s.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),Q(pn,pn.current),p)break;return null;case 22:return s.lanes=0,OT(i,s,u,s.pendingProps);case 24:Xi(s,bn,i.memoizedState.cache)}return mi(i,s,u)}function DT(i,s,u){if(i!==null)if(i.memoizedProps!==s.pendingProps)wn=!0;else{if(!$y(i,u)&&(s.flags&128)===0)return wn=!1,nH(i,s,u);wn=(i.flags&131072)!==0}else wn=!1,bt&&(s.flags&1048576)!==0&&dj(s,tu,s.index);switch(s.lanes=0,s.tag){case 16:e:{var p=s.pendingProps;if(i=Jo(s.elementType),s.type=i,typeof i=="function")Ug(i)?(p=rs(i,p),s.tag=1,s=CT(null,s,i,p,u)):(s.tag=0,s=Cy(null,s,i,p,u));else{if(i!=null){var b=i.$$typeof;if(b===R){s.tag=11,s=ST(null,s,i,p,u);break e}else if(b===N){s.tag=14,s=_T(null,s,i,p,u);break e}}throw s=q(i)||i,Error(r(306,s,""))}}return s;case 0:return Cy(i,s,s.type,s.pendingProps,u);case 1:return p=s.type,b=rs(p,s.pendingProps),CT(i,s,p,b,u);case 3:e:{if(xe(s,s.stateNode.containerInfo),i===null)throw Error(r(387));p=s.pendingProps;var _=s.memoizedState;b=_.element,ny(i,s),cu(s,p,null,u);var M=s.memoizedState;if(p=M.cache,Xi(s,bn,p),p!==_.cache&&Zg(s,[bn],u,!0),lu(),p=M.element,_.isDehydrated)if(_={element:p,isDehydrated:!1,cache:M.cache},s.updateQueue.baseState=_,s.memoizedState=_,s.flags&256){s=RT(i,s,p,u);break e}else if(p!==b){b=Wr(Error(r(424)),s),nu(b),s=RT(i,s,p,u);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(Kt=Jr(i.firstChild),Un=s,bt=!0,Ki=null,Xr=!0,u=Oj(s,null,p,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(Ko(),p===b){s=mi(i,s,u);break e}Hn(i,s,p,u)}s=s.child}return s;case 26:return mh(i,s),i===null?(u=V2(s.type,null,s.pendingProps,null))?s.memoizedState=u:bt||(u=s.type,i=s.pendingProps,p=Mh(Se.current).createElement(u),p[yn]=s,p[Xn]=i,Fn(p,u,i),$n(p),s.stateNode=p):s.memoizedState=V2(s.type,i.memoizedProps,s.pendingProps,i.memoizedState),null;case 27:return Ae(s),i===null&&bt&&(p=s.stateNode=q2(s.type,s.pendingProps,Se.current),Un=s,Xr=!0,b=Kt,uo(s.type)?(mb=b,Kt=Jr(p.firstChild)):Kt=b),Hn(i,s,s.pendingProps.children,u),mh(i,s),i===null&&(s.flags|=4194304),s.child;case 5:return i===null&&bt&&((b=p=Kt)&&(p=MH(p,s.type,s.pendingProps,Xr),p!==null?(s.stateNode=p,Un=s,Kt=Jr(p.firstChild),Xr=!1,b=!0):b=!1),b||Zi(s)),Ae(s),b=s.type,_=s.pendingProps,M=i!==null?i.memoizedProps:null,p=_.children,ub(b,_)?p=null:M!==null&&ub(b,M)&&(s.flags|=32),s.memoizedState!==null&&(b=cy(i,s,Yq,null,null,u),Cu._currentValue=b),mh(i,s),Hn(i,s,p,u),s.child;case 6:return i===null&&bt&&((i=u=Kt)&&(u=PH(u,s.pendingProps,Xr),u!==null?(s.stateNode=u,Un=s,Kt=null,i=!0):i=!1),i||Zi(s)),null;case 13:return NT(i,s,u);case 4:return xe(s,s.stateNode.containerInfo),p=s.pendingProps,i===null?s.child=ts(s,null,p,u):Hn(i,s,p,u),s.child;case 11:return ST(i,s,s.type,s.pendingProps,u);case 7:return Hn(i,s,s.pendingProps,u),s.child;case 8:return Hn(i,s,s.pendingProps.children,u),s.child;case 12:return Hn(i,s,s.pendingProps.children,u),s.child;case 10:return p=s.pendingProps,Xi(s,s.type,p.value),Hn(i,s,p.children,u),s.child;case 9:return b=s.type._context,p=s.pendingProps.children,Xo(s),b=qn(b),p=p(b),s.flags|=1,Hn(i,s,p,u),s.child;case 14:return _T(i,s,s.type,s.pendingProps,u);case 15:return AT(i,s,s.type,s.pendingProps,u);case 19:return PT(i,s,u);case 31:return tH(i,s,u);case 22:return OT(i,s,u,s.pendingProps);case 24:return Xo(s),p=qn(bn),i===null?(b=Jg(),b===null&&(b=Gt,_=Xg(),b.pooledCache=_,_.refCount++,_!==null&&(b.pooledCacheLanes|=u),b=_),s.memoizedState={parent:p,cache:b},ty(s),Xi(s,bn,b)):((i.lanes&u)!==0&&(ny(i,s),cu(s,null,null,u),lu()),b=i.memoizedState,_=s.memoizedState,b.parent!==p?(b={parent:p,cache:p},s.memoizedState=b,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=b),Xi(s,bn,p)):(p=_.cache,Xi(s,bn,p),p!==b.cache&&Zg(s,[bn],u,!0))),Hn(i,s,s.pendingProps.children,u),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function vi(i){i.flags|=4}function zy(i,s,u,p,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(s2())i.flags|=8192;else throw es=eh,ey}else i.flags&=-16777217}function kT(i,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!Z2(s))if(s2())i.flags|=8192;else throw es=eh,ey}function gh(i,s){s!==null&&(i.flags|=4),i.flags&16384&&(s=i.tag!==22?Be():536870912,i.lanes|=s,yl|=s)}function mu(i,s){if(!bt)switch(i.tailMode){case"hidden":s=i.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function Zt(i){var s=i.alternate!==null&&i.alternate.child===i.child,u=0,p=0;if(s)for(var b=i.child;b!==null;)u|=b.lanes|b.childLanes,p|=b.subtreeFlags&65011712,p|=b.flags&65011712,b.return=i,b=b.sibling;else for(b=i.child;b!==null;)u|=b.lanes|b.childLanes,p|=b.subtreeFlags,p|=b.flags,b.return=i,b=b.sibling;return i.subtreeFlags|=p,i.childLanes=u,s}function rH(i,s,u){var p=s.pendingProps;switch(Vg(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zt(s),null;case 1:return Zt(s),null;case 3:return u=s.stateNode,p=null,i!==null&&(p=i.memoizedState.cache),s.memoizedState.cache!==p&&(s.flags|=2048),di(bn),ce(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(il(s)?vi(s):i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Yg())),Zt(s),null;case 26:var b=s.type,_=s.memoizedState;return i===null?(vi(s),_!==null?(Zt(s),kT(s,_)):(Zt(s),zy(s,b,null,p,u))):_?_!==i.memoizedState?(vi(s),Zt(s),kT(s,_)):(Zt(s),s.flags&=-16777217):(i=i.memoizedProps,i!==p&&vi(s),Zt(s),zy(s,b,i,p,u)),null;case 27:if(Oe(s),u=Se.current,b=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==p&&vi(s);else{if(!p){if(s.stateNode===null)throw Error(r(166));return Zt(s),null}i=fe.current,il(s)?pj(s):(i=q2(b,p,u),s.stateNode=i,vi(s))}return Zt(s),null;case 5:if(Oe(s),b=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==p&&vi(s);else{if(!p){if(s.stateNode===null)throw Error(r(166));return Zt(s),null}if(_=fe.current,il(s))pj(s);else{var M=Mh(Se.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 p.is=="string"?M.createElement("select",{is:p.is}):M.createElement("select"),p.multiple?_.multiple=!0:p.size&&(_.size=p.size);break;default:_=typeof p.is=="string"?M.createElement(b,{is:p.is}):M.createElement(b)}}_[yn]=s,_[Xn]=p;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(Fn(_,b,p),b){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&vi(s)}}return Zt(s),zy(s,s.type,i===null?null:i.memoizedProps,s.pendingProps,u),null;case 6:if(i&&s.stateNode!=null)i.memoizedProps!==p&&vi(s);else{if(typeof p!="string"&&s.stateNode===null)throw Error(r(166));if(i=Se.current,il(s)){if(i=s.stateNode,u=s.memoizedProps,p=null,b=Un,b!==null)switch(b.tag){case 27:case 5:p=b.memoizedProps}i[yn]=s,i=!!(i.nodeValue===u||p!==null&&p.suppressHydrationWarning===!0||N2(i.nodeValue,u)),i||Zi(s,!0)}else i=Mh(i).createTextNode(p),i[yn]=s,s.stateNode=i}return Zt(s),null;case 31:if(u=s.memoizedState,i===null||i.memoizedState!==null){if(p=il(s),u!==null){if(i===null){if(!p)throw Error(r(318));if(i=s.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[yn]=s}else Ko(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Zt(s),i=!1}else u=Yg(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return s.flags&256?(Or(s),s):(Or(s),null);if((s.flags&128)!==0)throw Error(r(558))}return Zt(s),null;case 13:if(p=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(b=il(s),p!==null&&p.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[yn]=s}else Ko(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Zt(s),b=!1}else b=Yg(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=b),b=!0;if(!b)return s.flags&256?(Or(s),s):(Or(s),null)}return Or(s),(s.flags&128)!==0?(s.lanes=u,s):(u=p!==null,i=i!==null&&i.memoizedState!==null,u&&(p=s.child,b=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(b=p.alternate.memoizedState.cachePool.pool),_=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(_=p.memoizedState.cachePool.pool),_!==b&&(p.flags|=2048)),u!==i&&u&&(s.child.flags|=8192),gh(s,s.updateQueue),Zt(s),null);case 4:return ce(),i===null&&ib(s.stateNode.containerInfo),Zt(s),null;case 10:return di(s.type),Zt(s),null;case 19:if(Z(pn),p=s.memoizedState,p===null)return Zt(s),null;if(b=(s.flags&128)!==0,_=p.rendering,_===null)if(b)mu(p,!1);else{if(un!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(_=ah(i),_!==null){for(s.flags|=128,mu(p,!1),i=_.updateQueue,s.updateQueue=i,gh(s,i),s.subtreeFlags=0,i=u,u=s.child;u!==null;)cj(u,i),u=u.sibling;return Q(pn,pn.current&1|2),bt&&ui(s,p.treeForkCount),s.child}i=i.sibling}p.tail!==null&&H()>Sh&&(s.flags|=128,b=!0,mu(p,!1),s.lanes=4194304)}else{if(!b)if(i=ah(_),i!==null){if(s.flags|=128,b=!0,i=i.updateQueue,s.updateQueue=i,gh(s,i),mu(p,!0),p.tail===null&&p.tailMode==="hidden"&&!_.alternate&&!bt)return Zt(s),null}else 2*H()-p.renderingStartTime>Sh&&u!==536870912&&(s.flags|=128,b=!0,mu(p,!1),s.lanes=4194304);p.isBackwards?(_.sibling=s.child,s.child=_):(i=p.last,i!==null?i.sibling=_:s.child=_,p.last=_)}return p.tail!==null?(i=p.tail,p.rendering=i,p.tail=i.sibling,p.renderingStartTime=H(),i.sibling=null,u=pn.current,Q(pn,b?u&1|2:u&1),bt&&ui(s,p.treeForkCount),i):(Zt(s),null);case 22:case 23:return Or(s),oy(),p=s.memoizedState!==null,i!==null?i.memoizedState!==null!==p&&(s.flags|=8192):p&&(s.flags|=8192),p?(u&536870912)!==0&&(s.flags&128)===0&&(Zt(s),s.subtreeFlags&6&&(s.flags|=8192)):Zt(s),u=s.updateQueue,u!==null&&gh(s,u.retryQueue),u=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),p=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),p!==u&&(s.flags|=2048),i!==null&&Z(Qo),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),s.memoizedState.cache!==u&&(s.flags|=2048),di(bn),Zt(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function aH(i,s){switch(Vg(s),s.tag){case 1:return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return di(bn),ce(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 26:case 27:case 5:return Oe(s),null;case 31:if(s.memoizedState!==null){if(Or(s),s.alternate===null)throw Error(r(340));Ko()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 13:if(Or(s),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Ko()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return Z(pn),null;case 4:return ce(),null;case 10:return di(s.type),null;case 22:case 23:return Or(s),oy(),i!==null&&Z(Qo),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 24:return di(bn),null;case 25:return null;default:return null}}function $T(i,s){switch(Vg(s),s.tag){case 3:di(bn),ce();break;case 26:case 27:case 5:Oe(s);break;case 4:ce();break;case 31:s.memoizedState!==null&&Or(s);break;case 13:Or(s);break;case 19:Z(pn);break;case 10:di(s.type);break;case 22:case 23:Or(s),oy(),i!==null&&Z(Qo);break;case 24:di(bn)}}function vu(i,s){try{var u=s.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var b=p.next;u=b;do{if((u.tag&i)===i){p=void 0;var _=u.create,M=u.inst;p=_(),M.destroy=p}u=u.next}while(u!==b)}}catch(k){kt(s,s.return,k)}}function ro(i,s,u){try{var p=s.updateQueue,b=p!==null?p.lastEffect:null;if(b!==null){var _=b.next;p=_;do{if((p.tag&i)===i){var M=p.inst,k=M.destroy;if(k!==void 0){M.destroy=void 0,b=s;var W=u,ie=k;try{ie()}catch(he){kt(b,W,he)}}}p=p.next}while(p!==_)}}catch(he){kt(s,s.return,he)}}function zT(i){var s=i.updateQueue;if(s!==null){var u=i.stateNode;try{jj(s,u)}catch(p){kt(i,i.return,p)}}}function LT(i,s,u){u.props=rs(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(p){kt(i,s,p)}}function gu(i,s){try{var u=i.ref;if(u!==null){switch(i.tag){case 26:case 27:case 5:var p=i.stateNode;break;case 30:p=i.stateNode;break;default:p=i.stateNode}typeof u=="function"?i.refCleanup=u(p):u.current=p}}catch(b){kt(i,s,b)}}function Ba(i,s){var u=i.ref,p=i.refCleanup;if(u!==null)if(typeof p=="function")try{p()}catch(b){kt(i,s,b)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(b){kt(i,s,b)}else u.current=null}function IT(i){var s=i.type,u=i.memoizedProps,p=i.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":u.autoFocus&&p.focus();break e;case"img":u.src?p.src=u.src:u.srcSet&&(p.srcset=u.srcSet)}}catch(b){kt(i,i.return,b)}}function Ly(i,s,u){try{var p=i.stateNode;EH(p,i.type,u,s),p[Xn]=s}catch(b){kt(i,i.return,b)}}function BT(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&uo(i.type)||i.tag===4}function Iy(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||BT(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&&uo(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 By(i,s,u){var p=i.tag;if(p===5||p===6)i=i.stateNode,s?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(i,s):(s=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,s.appendChild(i),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=si));else if(p!==4&&(p===27&&uo(i.type)&&(u=i.stateNode,s=null),i=i.child,i!==null))for(By(i,s,u),i=i.sibling;i!==null;)By(i,s,u),i=i.sibling}function yh(i,s,u){var p=i.tag;if(p===5||p===6)i=i.stateNode,s?u.insertBefore(i,s):u.appendChild(i);else if(p!==4&&(p===27&&uo(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(yh(i,s,u),i=i.sibling;i!==null;)yh(i,s,u),i=i.sibling}function UT(i){var s=i.stateNode,u=i.memoizedProps;try{for(var p=i.type,b=s.attributes;b.length;)s.removeAttributeNode(b[0]);Fn(s,p,u),s[yn]=i,s[Xn]=u}catch(_){kt(i,i.return,_)}}var gi=!1,Sn=!1,Uy=!1,qT=typeof WeakSet=="function"?WeakSet:Set,zn=null;function iH(i,s){if(i=i.containerInfo,lb=Ih,i=ej(i),Dg(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var p=u.getSelection&&u.getSelection();if(p&&p.rangeCount!==0){u=p.anchorNode;var b=p.anchorOffset,_=p.focusNode;p=p.focusOffset;try{u.nodeType,_.nodeType}catch{u=null;break e}var M=0,k=-1,W=-1,ie=0,he=0,ye=i,se=null;t:for(;;){for(var ue;ye!==u||b!==0&&ye.nodeType!==3||(k=M+b),ye!==_||p!==0&&ye.nodeType!==3||(W=M+p),ye.nodeType===3&&(M+=ye.nodeValue.length),(ue=ye.firstChild)!==null;)se=ye,ye=ue;for(;;){if(ye===i)break t;if(se===u&&++ie===b&&(k=M),se===_&&++he===p&&(W=M),(ue=ye.nextSibling)!==null)break;ye=se,se=ye.parentNode}ye=ue}u=k===-1||W===-1?null:{start:k,end:W}}else u=null}u=u||{start:0,end:0}}else u=null;for(cb={focusedElem:i,selectionRange:u},Ih=!1,zn=s;zn!==null;)if(s=zn,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,zn=i;else for(;zn!==null;){switch(s=zn,_=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(u=0;u<i.length;u++)b=i[u],b.ref.impl=b.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&_!==null){i=void 0,u=s,b=_.memoizedProps,_=_.memoizedState,p=u.stateNode;try{var Le=rs(u.type,b);i=p.getSnapshotBeforeUpdate(Le,_),p.__reactInternalSnapshotBeforeUpdate=i}catch(Ze){kt(u,u.return,Ze)}}break;case 3:if((i&1024)!==0){if(i=s.stateNode.containerInfo,u=i.nodeType,u===9)db(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":db(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,zn=i;break}zn=s.return}}function HT(i,s,u){var p=u.flags;switch(u.tag){case 0:case 11:case 15:bi(i,u),p&4&&vu(5,u);break;case 1:if(bi(i,u),p&4)if(i=u.stateNode,s===null)try{i.componentDidMount()}catch(M){kt(u,u.return,M)}else{var b=rs(u.type,s.memoizedProps);s=s.memoizedState;try{i.componentDidUpdate(b,s,i.__reactInternalSnapshotBeforeUpdate)}catch(M){kt(u,u.return,M)}}p&64&&zT(u),p&512&&gu(u,u.return);break;case 3:if(bi(i,u),p&64&&(i=u.updateQueue,i!==null)){if(s=null,u.child!==null)switch(u.child.tag){case 27:case 5:s=u.child.stateNode;break;case 1:s=u.child.stateNode}try{jj(i,s)}catch(M){kt(u,u.return,M)}}break;case 27:s===null&&p&4&&UT(u);case 26:case 5:bi(i,u),s===null&&p&4&&IT(u),p&512&&gu(u,u.return);break;case 12:bi(i,u);break;case 31:bi(i,u),p&4&>(i,u);break;case 13:bi(i,u),p&4&&YT(i,u),p&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=pH.bind(null,u),DH(i,u))));break;case 22:if(p=u.memoizedState!==null||gi,!p){s=s!==null&&s.memoizedState!==null||Sn,b=gi;var _=Sn;gi=p,(Sn=s)&&!_?xi(i,u,(u.subtreeFlags&8772)!==0):bi(i,u),gi=b,Sn=_}break;case 30:break;default:bi(i,u)}}function FT(i){var s=i.alternate;s!==null&&(i.alternate=null,FT(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&gg(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 en=null,dr=!1;function yi(i,s,u){for(u=u.child;u!==null;)VT(i,s,u),u=u.sibling}function VT(i,s,u){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(Ot,u)}catch{}switch(u.tag){case 26:Sn||Ba(u,s),yi(i,s,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Sn||Ba(u,s);var p=en,b=dr;uo(u.type)&&(en=u.stateNode,dr=!1),yi(i,s,u),Eu(u.stateNode),en=p,dr=b;break;case 5:Sn||Ba(u,s);case 6:if(p=en,b=dr,en=null,yi(i,s,u),en=p,dr=b,en!==null)if(dr)try{(en.nodeType===9?en.body:en.nodeName==="HTML"?en.ownerDocument.body:en).removeChild(u.stateNode)}catch(_){kt(u,s,_)}else try{en.removeChild(u.stateNode)}catch(_){kt(u,s,_)}break;case 18:en!==null&&(dr?(i=en,z2(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),El(i)):z2(en,u.stateNode));break;case 4:p=en,b=dr,en=u.stateNode.containerInfo,dr=!0,yi(i,s,u),en=p,dr=b;break;case 0:case 11:case 14:case 15:ro(2,u,s),Sn||ro(4,u,s),yi(i,s,u);break;case 1:Sn||(Ba(u,s),p=u.stateNode,typeof p.componentWillUnmount=="function"&<(u,s,p)),yi(i,s,u);break;case 21:yi(i,s,u);break;case 22:Sn=(p=Sn)||u.memoizedState!==null,yi(i,s,u),Sn=p;break;default:yi(i,s,u)}}function GT(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{El(i)}catch(u){kt(s,s.return,u)}}}function YT(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{El(i)}catch(u){kt(s,s.return,u)}}function oH(i){switch(i.tag){case 31:case 13:case 19:var s=i.stateNode;return s===null&&(s=i.stateNode=new qT),s;case 22:return i=i.stateNode,s=i._retryCache,s===null&&(s=i._retryCache=new qT),s;default:throw Error(r(435,i.tag))}}function bh(i,s){var u=oH(i);s.forEach(function(p){if(!u.has(p)){u.add(p);var b=mH.bind(null,i,p);p.then(b,b)}})}function hr(i,s){var u=s.deletions;if(u!==null)for(var p=0;p<u.length;p++){var b=u[p],_=i,M=s,k=M;e:for(;k!==null;){switch(k.tag){case 27:if(uo(k.type)){en=k.stateNode,dr=!1;break e}break;case 5:en=k.stateNode,dr=!1;break e;case 3:case 4:en=k.stateNode.containerInfo,dr=!0;break e}k=k.return}if(en===null)throw Error(r(160));VT(_,M,b),en=null,dr=!1,_=b.alternate,_!==null&&(_.return=null),b.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)WT(s,i),s=s.sibling}var ya=null;function WT(i,s){var u=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:hr(s,i),pr(i),p&4&&(ro(3,i,i.return),vu(3,i),ro(5,i,i.return));break;case 1:hr(s,i),pr(i),p&512&&(Sn||u===null||Ba(u,u.return)),p&64&&gi&&(i=i.updateQueue,i!==null&&(p=i.callbacks,p!==null&&(u=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=u===null?p:u.concat(p))));break;case 26:var b=ya;if(hr(s,i),pr(i),p&512&&(Sn||u===null||Ba(u,u.return)),p&4){var _=u!==null?u.memoizedState:null;if(p=i.memoizedState,u===null)if(p===null)if(i.stateNode===null){e:{p=i.type,u=i.memoizedProps,b=b.ownerDocument||b;t:switch(p){case"title":_=b.getElementsByTagName("title")[0],(!_||_[Fc]||_[yn]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=b.createElement(p),b.head.insertBefore(_,b.querySelector("head > title"))),Fn(_,p,u),_[yn]=i,$n(_),p=_;break e;case"link":var M=W2("link","href",b).get(p+(u.href||""));if(M){for(var k=0;k<M.length;k++)if(_=M[k],_.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&_.getAttribute("rel")===(u.rel==null?null:u.rel)&&_.getAttribute("title")===(u.title==null?null:u.title)&&_.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){M.splice(k,1);break t}}_=b.createElement(p),Fn(_,p,u),b.head.appendChild(_);break;case"meta":if(M=W2("meta","content",b).get(p+(u.content||""))){for(k=0;k<M.length;k++)if(_=M[k],_.getAttribute("content")===(u.content==null?null:""+u.content)&&_.getAttribute("name")===(u.name==null?null:u.name)&&_.getAttribute("property")===(u.property==null?null:u.property)&&_.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&_.getAttribute("charset")===(u.charSet==null?null:u.charSet)){M.splice(k,1);break t}}_=b.createElement(p),Fn(_,p,u),b.head.appendChild(_);break;default:throw Error(r(468,p))}_[yn]=i,$n(_),p=_}i.stateNode=p}else K2(b,i.type,i.stateNode);else i.stateNode=Y2(b,p,i.memoizedProps);else _!==p?(_===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):_.count--,p===null?K2(b,i.type,i.stateNode):Y2(b,p,i.memoizedProps)):p===null&&i.stateNode!==null&&Ly(i,i.memoizedProps,u.memoizedProps)}break;case 27:hr(s,i),pr(i),p&512&&(Sn||u===null||Ba(u,u.return)),u!==null&&p&4&&Ly(i,i.memoizedProps,u.memoizedProps);break;case 5:if(hr(s,i),pr(i),p&512&&(Sn||u===null||Ba(u,u.return)),i.flags&32){b=i.stateNode;try{Ks(b,"")}catch(Le){kt(i,i.return,Le)}}p&4&&i.stateNode!=null&&(b=i.memoizedProps,Ly(i,b,u!==null?u.memoizedProps:b)),p&1024&&(Uy=!0);break;case 6:if(hr(s,i),pr(i),p&4){if(i.stateNode===null)throw Error(r(162));p=i.memoizedProps,u=i.stateNode;try{u.nodeValue=p}catch(Le){kt(i,i.return,Le)}}break;case 3:if(kh=null,b=ya,ya=Ph(s.containerInfo),hr(s,i),ya=b,pr(i),p&4&&u!==null&&u.memoizedState.isDehydrated)try{El(s.containerInfo)}catch(Le){kt(i,i.return,Le)}Uy&&(Uy=!1,KT(i));break;case 4:p=ya,ya=Ph(i.stateNode.containerInfo),hr(s,i),pr(i),ya=p;break;case 12:hr(s,i),pr(i);break;case 31:hr(s,i),pr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,bh(i,p)));break;case 13:hr(s,i),pr(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(wh=H()),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,bh(i,p)));break;case 22:b=i.memoizedState!==null;var W=u!==null&&u.memoizedState!==null,ie=gi,he=Sn;if(gi=ie||b,Sn=he||W,hr(s,i),Sn=he,gi=ie,pr(i),p&8192)e:for(s=i.stateNode,s._visibility=b?s._visibility&-2:s._visibility|1,b&&(u===null||W||gi||Sn||as(i)),u=null,s=i;;){if(s.tag===5||s.tag===26){if(u===null){W=u=s;try{if(_=W.stateNode,b)M=_.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{k=W.stateNode;var ye=W.memoizedProps.style,se=ye!=null&&ye.hasOwnProperty("display")?ye.display:null;k.style.display=se==null||typeof se=="boolean"?"":(""+se).trim()}}catch(Le){kt(W,W.return,Le)}}}else if(s.tag===6){if(u===null){W=s;try{W.stateNode.nodeValue=b?"":W.memoizedProps}catch(Le){kt(W,W.return,Le)}}}else if(s.tag===18){if(u===null){W=s;try{var ue=W.stateNode;b?L2(ue,!0):L2(W.stateNode,!1)}catch(Le){kt(W,W.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;u===s&&(u=null),s=s.return}u===s&&(u=null),s.sibling.return=s.return,s=s.sibling}p&4&&(p=i.updateQueue,p!==null&&(u=p.retryQueue,u!==null&&(p.retryQueue=null,bh(i,u))));break;case 19:hr(s,i),pr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,bh(i,p)));break;case 30:break;case 21:break;default:hr(s,i),pr(i)}}function pr(i){var s=i.flags;if(s&2){try{for(var u,p=i.return;p!==null;){if(BT(p)){u=p;break}p=p.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var b=u.stateNode,_=Iy(i);yh(i,_,b);break;case 5:var M=u.stateNode;u.flags&32&&(Ks(M,""),u.flags&=-33);var k=Iy(i);yh(i,k,M);break;case 3:case 4:var W=u.stateNode.containerInfo,ie=Iy(i);By(i,ie,W);break;default:throw Error(r(161))}}catch(he){kt(i,i.return,he)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function KT(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var s=i;KT(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),i=i.sibling}}function bi(i,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)HT(i,s.alternate,s),s=s.sibling}function as(i){for(i=i.child;i!==null;){var s=i;switch(s.tag){case 0:case 11:case 14:case 15:ro(4,s,s.return),as(s);break;case 1:Ba(s,s.return);var u=s.stateNode;typeof u.componentWillUnmount=="function"&<(s,s.return,u),as(s);break;case 27:Eu(s.stateNode);case 26:case 5:Ba(s,s.return),as(s);break;case 22:s.memoizedState===null&&as(s);break;case 30:as(s);break;default:as(s)}i=i.sibling}}function xi(i,s,u){for(u=u&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var p=s.alternate,b=i,_=s,M=_.flags;switch(_.tag){case 0:case 11:case 15:xi(b,_,u),vu(4,_);break;case 1:if(xi(b,_,u),p=_,b=p.stateNode,typeof b.componentDidMount=="function")try{b.componentDidMount()}catch(ie){kt(p,p.return,ie)}if(p=_,b=p.updateQueue,b!==null){var k=p.stateNode;try{var W=b.shared.hiddenCallbacks;if(W!==null)for(b.shared.hiddenCallbacks=null,b=0;b<W.length;b++)Ej(W[b],k)}catch(ie){kt(p,p.return,ie)}}u&&M&64&&zT(_),gu(_,_.return);break;case 27:UT(_);case 26:case 5:xi(b,_,u),u&&p===null&&M&4&&IT(_),gu(_,_.return);break;case 12:xi(b,_,u);break;case 31:xi(b,_,u),u&&M&4&>(b,_);break;case 13:xi(b,_,u),u&&M&4&&YT(b,_);break;case 22:_.memoizedState===null&&xi(b,_,u),gu(_,_.return);break;case 30:break;default:xi(b,_,u)}s=s.sibling}}function qy(i,s){var u=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),i=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(i=s.memoizedState.cachePool.pool),i!==u&&(i!=null&&i.refCount++,u!=null&&ru(u))}function Hy(i,s){i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&ru(i))}function ba(i,s,u,p){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)ZT(i,s,u,p),s=s.sibling}function ZT(i,s,u,p){var b=s.flags;switch(s.tag){case 0:case 11:case 15:ba(i,s,u,p),b&2048&&vu(9,s);break;case 1:ba(i,s,u,p);break;case 3:ba(i,s,u,p),b&2048&&(i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&ru(i)));break;case 12:if(b&2048){ba(i,s,u,p),i=s.stateNode;try{var _=s.memoizedProps,M=_.id,k=_.onPostCommit;typeof k=="function"&&k(M,s.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(W){kt(s,s.return,W)}}else ba(i,s,u,p);break;case 31:ba(i,s,u,p);break;case 13:ba(i,s,u,p);break;case 23:break;case 22:_=s.stateNode,M=s.alternate,s.memoizedState!==null?_._visibility&2?ba(i,s,u,p):yu(i,s):_._visibility&2?ba(i,s,u,p):(_._visibility|=2,ml(i,s,u,p,(s.subtreeFlags&10256)!==0||!1)),b&2048&&qy(M,s);break;case 24:ba(i,s,u,p),b&2048&&Hy(s.alternate,s);break;default:ba(i,s,u,p)}}function ml(i,s,u,p,b){for(b=b&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var _=i,M=s,k=u,W=p,ie=M.flags;switch(M.tag){case 0:case 11:case 15:ml(_,M,k,W,b),vu(8,M);break;case 23:break;case 22:var he=M.stateNode;M.memoizedState!==null?he._visibility&2?ml(_,M,k,W,b):yu(_,M):(he._visibility|=2,ml(_,M,k,W,b)),b&&ie&2048&&qy(M.alternate,M);break;case 24:ml(_,M,k,W,b),b&&ie&2048&&Hy(M.alternate,M);break;default:ml(_,M,k,W,b)}s=s.sibling}}function yu(i,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var u=i,p=s,b=p.flags;switch(p.tag){case 22:yu(u,p),b&2048&&qy(p.alternate,p);break;case 24:yu(u,p),b&2048&&Hy(p.alternate,p);break;default:yu(u,p)}s=s.sibling}}var bu=8192;function vl(i,s,u){if(i.subtreeFlags&bu)for(i=i.child;i!==null;)XT(i,s,u),i=i.sibling}function XT(i,s,u){switch(i.tag){case 26:vl(i,s,u),i.flags&bu&&i.memoizedState!==null&&GH(u,ya,i.memoizedState,i.memoizedProps);break;case 5:vl(i,s,u);break;case 3:case 4:var p=ya;ya=Ph(i.stateNode.containerInfo),vl(i,s,u),ya=p;break;case 22:i.memoizedState===null&&(p=i.alternate,p!==null&&p.memoizedState!==null?(p=bu,bu=16777216,vl(i,s,u),bu=p):vl(i,s,u));break;default:vl(i,s,u)}}function QT(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 xu(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var p=s[u];zn=p,e2(p,i)}QT(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)JT(i),i=i.sibling}function JT(i){switch(i.tag){case 0:case 11:case 15:xu(i),i.flags&2048&&ro(9,i,i.return);break;case 3:xu(i);break;case 12:xu(i);break;case 22:var s=i.stateNode;i.memoizedState!==null&&s._visibility&2&&(i.return===null||i.return.tag!==13)?(s._visibility&=-3,xh(i)):xu(i);break;default:xu(i)}}function xh(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var p=s[u];zn=p,e2(p,i)}QT(i)}for(i=i.child;i!==null;){switch(s=i,s.tag){case 0:case 11:case 15:ro(8,s,s.return),xh(s);break;case 22:u=s.stateNode,u._visibility&2&&(u._visibility&=-3,xh(s));break;default:xh(s)}i=i.sibling}}function e2(i,s){for(;zn!==null;){var u=zn;switch(u.tag){case 0:case 11:case 15:ro(8,u,s);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var p=u.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:ru(u.memoizedState.cache)}if(p=u.child,p!==null)p.return=u,zn=p;else e:for(u=i;zn!==null;){p=zn;var b=p.sibling,_=p.return;if(FT(p),p===u){zn=null;break e}if(b!==null){b.return=_,zn=b;break e}zn=_}}}var sH={getCacheForType:function(i){var s=qn(bn),u=s.data.get(i);return u===void 0&&(u=i(),s.data.set(i,u)),u},cacheSignal:function(){return qn(bn).controller.signal}},lH=typeof WeakMap=="function"?WeakMap:Map,Et=0,Gt=null,ht=null,vt=0,Dt=0,Er=null,ao=!1,gl=!1,Fy=!1,wi=0,un=0,io=0,is=0,Vy=0,jr=0,yl=0,wu=null,mr=null,Gy=!1,wh=0,t2=0,Sh=1/0,_h=null,oo=null,Cn=0,so=null,bl=null,Si=0,Yy=0,Wy=null,n2=null,Su=0,Ky=null;function Tr(){return(Et&2)!==0&&vt!==0?vt&-vt:$.T!==null?tb():ut()}function r2(){if(jr===0)if((vt&536870912)===0||bt){var i=Zn;Zn<<=1,(Zn&3932160)===0&&(Zn=262144),jr=i}else jr=536870912;return i=Ar.current,i!==null&&(i.flags|=32),jr}function vr(i,s,u){(i===Gt&&(Dt===2||Dt===9)||i.cancelPendingCommit!==null)&&(xl(i,0),lo(i,vt,jr,!1)),te(i,u),((Et&2)===0||i!==Gt)&&(i===Gt&&((Et&2)===0&&(is|=u),un===4&&lo(i,vt,jr,!1)),Ua(i))}function a2(i,s,u){if((Et&6)!==0)throw Error(r(327));var p=!u&&(s&127)===0&&(s&i.expiredLanes)===0||He(i,s),b=p?fH(i,s):Xy(i,s,!0),_=p;do{if(b===0){gl&&!p&&lo(i,s,0,!1);break}else{if(u=i.current.alternate,_&&!cH(u)){b=Xy(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 k=i;b=wu;var W=k.current.memoizedState.isDehydrated;if(W&&(xl(k,M).flags|=256),M=Xy(k,M,!1),M!==2){if(Fy&&!W){k.errorRecoveryDisabledLanes|=_,is|=_,b=4;break e}_=mr,mr=b,_!==null&&(mr===null?mr=_:mr.push.apply(mr,_))}b=M}if(_=!1,b!==2)continue}}if(b===1){xl(i,0),lo(i,s,0,!0);break}e:{switch(p=i,_=b,_){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:lo(p,s,jr,!ao);break e;case 2:mr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(b=wh+300-H(),10<b)){if(lo(p,s,jr,!ao),me(p,0,!0)!==0)break e;Si=s,p.timeoutHandle=k2(i2.bind(null,p,u,mr,_h,Gy,s,jr,is,yl,ao,_,"Throttled",-0,0),b);break e}i2(p,u,mr,_h,Gy,s,jr,is,yl,ao,_,null,-0,0)}}break}while(!0);Ua(i)}function i2(i,s,u,p,b,_,M,k,W,ie,he,ye,se,ue){if(i.timeoutHandle=-1,ye=s.subtreeFlags,ye&8192||(ye&16785408)===16785408){ye={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:si},XT(s,_,ye);var Le=(_&62914560)===_?wh-H():(_&4194048)===_?t2-H():0;if(Le=YH(ye,Le),Le!==null){Si=_,i.cancelPendingCommit=Le(h2.bind(null,i,s,_,u,p,b,M,k,W,he,ye,null,se,ue)),lo(i,_,M,!ie);return}}h2(i,s,_,u,p,b,M,k,W)}function cH(i){for(var s=i;;){var u=s.tag;if((u===0||u===11||u===15)&&s.flags&16384&&(u=s.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var p=0;p<u.length;p++){var b=u[p],_=b.getSnapshot;b=b.value;try{if(!Sr(_(),b))return!1}catch{return!1}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;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 lo(i,s,u,p){s&=~Vy,s&=~is,i.suspendedLanes|=s,i.pingedLanes&=~s,p&&(i.warmLanes|=s),p=i.expirationTimes;for(var b=s;0<b;){var _=31-Vt(b),M=1<<_;p[_]=-1,b&=~M}u!==0&&de(i,u,s)}function Ah(){return(Et&6)===0?(_u(0),!1):!0}function Zy(){if(ht!==null){if(Dt===0)var i=ht.return;else i=ht,fi=Zo=null,dy(i),ul=null,iu=0,i=ht;for(;i!==null;)$T(i.alternate,i),i=i.return;ht=null}}function xl(i,s){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,CH(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),Si=0,Zy(),Gt=i,ht=u=ci(i.current,null),vt=s,Dt=0,Er=null,ao=!1,gl=He(i,s),Fy=!1,yl=jr=Vy=is=io=un=0,mr=wu=null,Gy=!1,(s&8)!==0&&(s|=s&32);var p=i.entangledLanes;if(p!==0)for(i=i.entanglements,p&=s;0<p;){var b=31-Vt(p),_=1<<b;s|=i[b],p&=~_}return wi=s,Vd(),u}function o2(i,s){it=null,$.H=hu,s===cl||s===Jd?(s=Sj(),Dt=3):s===ey?(s=Sj(),Dt=4):Dt=s===Ty?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Er=s,ht===null&&(un=1,hh(i,Wr(s,i.current)))}function s2(){var i=Ar.current;return i===null?!0:(vt&4194048)===vt?Qr===null:(vt&62914560)===vt||(vt&536870912)!==0?i===Qr:!1}function l2(){var i=$.H;return $.H=hu,i===null?hu:i}function c2(){var i=$.A;return $.A=sH,i}function Oh(){un=4,ao||(vt&4194048)!==vt&&Ar.current!==null||(gl=!0),(io&134217727)===0&&(is&134217727)===0||Gt===null||lo(Gt,vt,jr,!1)}function Xy(i,s,u){var p=Et;Et|=2;var b=l2(),_=c2();(Gt!==i||vt!==s)&&(_h=null,xl(i,s)),s=!1;var M=un;e:do try{if(Dt!==0&&ht!==null){var k=ht,W=Er;switch(Dt){case 8:Zy(),M=6;break e;case 3:case 2:case 9:case 6:Ar.current===null&&(s=!0);var ie=Dt;if(Dt=0,Er=null,wl(i,k,W,ie),u&&gl){M=0;break e}break;default:ie=Dt,Dt=0,Er=null,wl(i,k,W,ie)}}uH(),M=un;break}catch(he){o2(i,he)}while(!0);return s&&i.shellSuspendCounter++,fi=Zo=null,Et=p,$.H=b,$.A=_,ht===null&&(Gt=null,vt=0,Vd()),M}function uH(){for(;ht!==null;)u2(ht)}function fH(i,s){var u=Et;Et|=2;var p=l2(),b=c2();Gt!==i||vt!==s?(_h=null,Sh=H()+500,xl(i,s)):gl=He(i,s);e:do try{if(Dt!==0&&ht!==null){s=ht;var _=Er;t:switch(Dt){case 1:Dt=0,Er=null,wl(i,s,_,1);break;case 2:case 9:if(xj(_)){Dt=0,Er=null,f2(s);break}s=function(){Dt!==2&&Dt!==9||Gt!==i||(Dt=7),Ua(i)},_.then(s,s);break e;case 3:Dt=7;break e;case 4:Dt=5;break e;case 7:xj(_)?(Dt=0,Er=null,f2(s)):(Dt=0,Er=null,wl(i,s,_,7));break;case 5:var M=null;switch(ht.tag){case 26:M=ht.memoizedState;case 5:case 27:var k=ht;if(M?Z2(M):k.stateNode.complete){Dt=0,Er=null;var W=k.sibling;if(W!==null)ht=W;else{var ie=k.return;ie!==null?(ht=ie,Eh(ie)):ht=null}break t}}Dt=0,Er=null,wl(i,s,_,5);break;case 6:Dt=0,Er=null,wl(i,s,_,6);break;case 8:Zy(),un=6;break e;default:throw Error(r(462))}}dH();break}catch(he){o2(i,he)}while(!0);return fi=Zo=null,$.H=p,$.A=b,Et=u,ht!==null?0:(Gt=null,vt=0,Vd(),un)}function dH(){for(;ht!==null&&!Tt();)u2(ht)}function u2(i){var s=DT(i.alternate,i,wi);i.memoizedProps=i.pendingProps,s===null?Eh(i):ht=s}function f2(i){var s=i,u=s.alternate;switch(s.tag){case 15:case 0:s=TT(u,s,s.pendingProps,s.type,void 0,vt);break;case 11:s=TT(u,s,s.pendingProps,s.type.render,s.ref,vt);break;case 5:dy(s);default:$T(u,s),s=ht=cj(s,wi),s=DT(u,s,wi)}i.memoizedProps=i.pendingProps,s===null?Eh(i):ht=s}function wl(i,s,u,p){fi=Zo=null,dy(s),ul=null,iu=0;var b=s.return;try{if(eH(i,b,s,u,vt)){un=1,hh(i,Wr(u,i.current)),ht=null;return}}catch(_){if(b!==null)throw ht=b,_;un=1,hh(i,Wr(u,i.current)),ht=null;return}s.flags&32768?(bt||p===1?i=!0:gl||(vt&536870912)!==0?i=!1:(ao=i=!0,(p===2||p===9||p===3||p===6)&&(p=Ar.current,p!==null&&p.tag===13&&(p.flags|=16384))),d2(s,i)):Eh(s)}function Eh(i){var s=i;do{if((s.flags&32768)!==0){d2(s,ao);return}i=s.return;var u=rH(s.alternate,s,wi);if(u!==null){ht=u;return}if(s=s.sibling,s!==null){ht=s;return}ht=s=i}while(s!==null);un===0&&(un=5)}function d2(i,s){do{var u=aH(i.alternate,i);if(u!==null){u.flags&=32767,ht=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!s&&(i=i.sibling,i!==null)){ht=i;return}ht=i=u}while(i!==null);un=6,ht=null}function h2(i,s,u,p,b,_,M,k,W){i.cancelPendingCommit=null;do jh();while(Cn!==0);if((Et&6)!==0)throw Error(r(327));if(s!==null){if(s===i.current)throw Error(r(177));if(_=s.lanes|s.childLanes,_|=Ig,_e(i,u,_,M,k,W),i===Gt&&(ht=Gt=null,vt=0),bl=s,so=i,Si=u,Yy=_,Wy=b,n2=p,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,vH(Ce,function(){return y2(),null})):(i.callbackNode=null,i.callbackPriority=0),p=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||p){p=$.T,$.T=null,b=G.p,G.p=2,M=Et,Et|=4;try{iH(i,s,u)}finally{Et=M,G.p=b,$.T=p}}Cn=1,p2(),m2(),v2()}}function p2(){if(Cn===1){Cn=0;var i=so,s=bl,u=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||u){u=$.T,$.T=null;var p=G.p;G.p=2;var b=Et;Et|=4;try{WT(s,i);var _=cb,M=ej(i.containerInfo),k=_.focusedElem,W=_.selectionRange;if(M!==k&&k&&k.ownerDocument&&JE(k.ownerDocument.documentElement,k)){if(W!==null&&Dg(k)){var ie=W.start,he=W.end;if(he===void 0&&(he=ie),"selectionStart"in k)k.selectionStart=ie,k.selectionEnd=Math.min(he,k.value.length);else{var ye=k.ownerDocument||document,se=ye&&ye.defaultView||window;if(se.getSelection){var ue=se.getSelection(),Le=k.textContent.length,Ze=Math.min(W.start,Le),Bt=W.end===void 0?Ze:Math.min(W.end,Le);!ue.extend&&Ze>Bt&&(M=Bt,Bt=Ze,Ze=M);var J=QE(k,Ze),X=QE(k,Bt);if(J&&X&&(ue.rangeCount!==1||ue.anchorNode!==J.node||ue.anchorOffset!==J.offset||ue.focusNode!==X.node||ue.focusOffset!==X.offset)){var re=ye.createRange();re.setStart(J.node,J.offset),ue.removeAllRanges(),Ze>Bt?(ue.addRange(re),ue.extend(X.node,X.offset)):(re.setEnd(X.node,X.offset),ue.addRange(re))}}}}for(ye=[],ue=k;ue=ue.parentNode;)ue.nodeType===1&&ye.push({element:ue,left:ue.scrollLeft,top:ue.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<ye.length;k++){var ge=ye[k];ge.element.scrollLeft=ge.left,ge.element.scrollTop=ge.top}}Ih=!!lb,cb=lb=null}finally{Et=b,G.p=p,$.T=u}}i.current=s,Cn=2}}function m2(){if(Cn===2){Cn=0;var i=so,s=bl,u=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||u){u=$.T,$.T=null;var p=G.p;G.p=2;var b=Et;Et|=4;try{HT(i,s.alternate,s)}finally{Et=b,G.p=p,$.T=u}}Cn=3}}function v2(){if(Cn===4||Cn===3){Cn=0,Ft();var i=so,s=bl,u=Si,p=n2;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Cn=5:(Cn=0,bl=so=null,g2(i,i.pendingLanes));var b=i.pendingLanes;if(b===0&&(oo=null),Ve(u),s=s.stateNode,Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(Ot,s,void 0,(s.current.flags&128)===128)}catch{}if(p!==null){s=$.T,b=G.p,G.p=2,$.T=null;try{for(var _=i.onRecoverableError,M=0;M<p.length;M++){var k=p[M];_(k.value,{componentStack:k.stack})}}finally{$.T=s,G.p=b}}(Si&3)!==0&&jh(),Ua(i),b=i.pendingLanes,(u&261930)!==0&&(b&42)!==0?i===Ky?Su++:(Su=0,Ky=i):Su=0,_u(0)}}function g2(i,s){(i.pooledCacheLanes&=s)===0&&(s=i.pooledCache,s!=null&&(i.pooledCache=null,ru(s)))}function jh(){return p2(),m2(),v2(),y2()}function y2(){if(Cn!==5)return!1;var i=so,s=Yy;Yy=0;var u=Ve(Si),p=$.T,b=G.p;try{G.p=32>u?32:u,$.T=null,u=Wy,Wy=null;var _=so,M=Si;if(Cn=0,bl=so=null,Si=0,(Et&6)!==0)throw Error(r(331));var k=Et;if(Et|=4,JT(_.current),ZT(_,_.current,M,u),Et=k,_u(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(Ot,_)}catch{}return!0}finally{G.p=b,$.T=p,g2(i,s)}}function b2(i,s,u){s=Wr(u,s),s=jy(i.stateNode,s,2),i=eo(i,s,2),i!==null&&(te(i,2),Ua(i))}function kt(i,s,u){if(i.tag===3)b2(i,i,u);else for(;s!==null;){if(s.tag===3){b2(s,i,u);break}else if(s.tag===1){var p=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(oo===null||!oo.has(p))){i=Wr(u,i),u=xT(2),p=eo(s,u,2),p!==null&&(wT(u,p,s,i),te(p,2),Ua(p));break}}s=s.return}}function Qy(i,s,u){var p=i.pingCache;if(p===null){p=i.pingCache=new lH;var b=new Set;p.set(s,b)}else b=p.get(s),b===void 0&&(b=new Set,p.set(s,b));b.has(u)||(Fy=!0,b.add(u),i=hH.bind(null,i,s,u),s.then(i,i))}function hH(i,s,u){var p=i.pingCache;p!==null&&p.delete(s),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,Gt===i&&(vt&u)===u&&(un===4||un===3&&(vt&62914560)===vt&&300>H()-wh?(Et&2)===0&&xl(i,0):Vy|=u,yl===vt&&(yl=0)),Ua(i)}function x2(i,s){s===0&&(s=Be()),i=Yo(i,s),i!==null&&(te(i,s),Ua(i))}function pH(i){var s=i.memoizedState,u=0;s!==null&&(u=s.retryLane),x2(i,u)}function mH(i,s){var u=0;switch(i.tag){case 31:case 13:var p=i.stateNode,b=i.memoizedState;b!==null&&(u=b.retryLane);break;case 19:p=i.stateNode;break;case 22:p=i.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(s),x2(i,u)}function vH(i,s){return gn(i,s)}var Th=null,Sl=null,Jy=!1,Ch=!1,eb=!1,co=0;function Ua(i){i!==Sl&&i.next===null&&(Sl===null?Th=Sl=i:Sl=Sl.next=i),Ch=!0,Jy||(Jy=!0,yH())}function _u(i,s){if(!eb&&Ch){eb=!0;do for(var u=!1,p=Th;p!==null;){if(i!==0){var b=p.pendingLanes;if(b===0)var _=0;else{var M=p.suspendedLanes,k=p.pingedLanes;_=(1<<31-Vt(42|i)+1)-1,_&=b&~(M&~k),_=_&201326741?_&201326741|1:_?_|2:0}_!==0&&(u=!0,A2(p,_))}else _=vt,_=me(p,p===Gt?_:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(_&3)===0||He(p,_)||(u=!0,A2(p,_));p=p.next}while(u);eb=!1}}function gH(){w2()}function w2(){Ch=Jy=!1;var i=0;co!==0&&TH()&&(i=co);for(var s=H(),u=null,p=Th;p!==null;){var b=p.next,_=S2(p,s);_===0?(p.next=null,u===null?Th=b:u.next=b,b===null&&(Sl=u)):(u=p,(i!==0||(_&3)!==0)&&(Ch=!0)),p=b}Cn!==0&&Cn!==5||_u(i),co!==0&&(co=0)}function S2(i,s){for(var u=i.suspendedLanes,p=i.pingedLanes,b=i.expirationTimes,_=i.pendingLanes&-62914561;0<_;){var M=31-Vt(_),k=1<<M,W=b[M];W===-1?((k&u)===0||(k&p)!==0)&&(b[M]=tt(k,s)):W<=s&&(i.expiredLanes|=k),_&=~k}if(s=Gt,u=vt,u=me(i,i===s?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p=i.callbackNode,u===0||i===s&&(Dt===2||Dt===9)||i.cancelPendingCommit!==null)return p!==null&&p!==null&&on(p),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||He(i,u)){if(s=u&-u,s===i.callbackPriority)return s;switch(p!==null&&on(p),Ve(u)){case 2:case 8:u=Re;break;case 32:u=Ce;break;case 268435456:u=Ee;break;default:u=Ce}return p=_2.bind(null,i),u=gn(u,p),i.callbackPriority=s,i.callbackNode=u,s}return p!==null&&p!==null&&on(p),i.callbackPriority=2,i.callbackNode=null,2}function _2(i,s){if(Cn!==0&&Cn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(jh()&&i.callbackNode!==u)return null;var p=vt;return p=me(i,i===Gt?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p===0?null:(a2(i,p,s),S2(i,H()),i.callbackNode!=null&&i.callbackNode===u?_2.bind(null,i):null)}function A2(i,s){if(jh())return null;a2(i,s,!0)}function yH(){RH(function(){(Et&6)!==0?gn(ae,gH):w2()})}function tb(){if(co===0){var i=sl;i===0&&(i=Bn,Bn<<=1,(Bn&261888)===0&&(Bn=256)),co=i}return co}function O2(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:zd(""+i)}function E2(i,s){var u=s.ownerDocument.createElement("input");return u.name=s.name,u.value=s.value,i.id&&u.setAttribute("form",i.id),s.parentNode.insertBefore(u,s),i=new FormData(i),u.parentNode.removeChild(u),i}function bH(i,s,u,p,b){if(s==="submit"&&u&&u.stateNode===b){var _=O2((b[Xn]||null).action),M=p.submitter;M&&(s=(s=M[Xn]||null)?O2(s.formAction):M.getAttribute("formAction"),s!==null&&(_=s,M=null));var k=new Ud("action","action",null,p,b);i.push({event:k,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(co!==0){var W=M?E2(b,M):new FormData(b);wy(u,{pending:!0,data:W,method:b.method,action:_},null,W)}}else typeof _=="function"&&(k.preventDefault(),W=M?E2(b,M):new FormData(b),wy(u,{pending:!0,data:W,method:b.method,action:_},_,W))},currentTarget:b}]})}}for(var nb=0;nb<Lg.length;nb++){var rb=Lg[nb],xH=rb.toLowerCase(),wH=rb[0].toUpperCase()+rb.slice(1);ga(xH,"on"+wH)}ga(rj,"onAnimationEnd"),ga(aj,"onAnimationIteration"),ga(ij,"onAnimationStart"),ga("dblclick","onDoubleClick"),ga("focusin","onFocus"),ga("focusout","onBlur"),ga(zq,"onTransitionRun"),ga(Lq,"onTransitionStart"),ga(Iq,"onTransitionCancel"),ga(oj,"onTransitionEnd"),Ys("onMouseEnter",["mouseout","mouseover"]),Ys("onMouseLeave",["mouseout","mouseover"]),Ys("onPointerEnter",["pointerout","pointerover"]),Ys("onPointerLeave",["pointerout","pointerover"]),Ho("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ho("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ho("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ho("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ho("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ho("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Au="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(" "),SH=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Au));function j2(i,s){s=(s&4)!==0;for(var u=0;u<i.length;u++){var p=i[u],b=p.event;p=p.listeners;e:{var _=void 0;if(s)for(var M=p.length-1;0<=M;M--){var k=p[M],W=k.instance,ie=k.currentTarget;if(k=k.listener,W!==_&&b.isPropagationStopped())break e;_=k,b.currentTarget=ie;try{_(b)}catch(he){Fd(he)}b.currentTarget=null,_=W}else for(M=0;M<p.length;M++){if(k=p[M],W=k.instance,ie=k.currentTarget,k=k.listener,W!==_&&b.isPropagationStopped())break e;_=k,b.currentTarget=ie;try{_(b)}catch(he){Fd(he)}b.currentTarget=null,_=W}}}}function pt(i,s){var u=s[Hs];u===void 0&&(u=s[Hs]=new Set);var p=i+"__bubble";u.has(p)||(T2(s,i,2,!1),u.add(p))}function ab(i,s,u){var p=0;s&&(p|=4),T2(u,i,p,s)}var Rh="_reactListening"+Math.random().toString(36).slice(2);function ib(i){if(!i[Rh]){i[Rh]=!0,wE.forEach(function(u){u!=="selectionchange"&&(SH.has(u)||ab(u,!1,i),ab(u,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Rh]||(s[Rh]=!0,ab("selectionchange",!1,s))}}function T2(i,s,u,p){switch(rC(s)){case 2:var b=ZH;break;case 8:b=XH;break;default:b=xb}u=b.bind(null,s,u,i),b=void 0,!Og||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(b=!0),p?b!==void 0?i.addEventListener(s,u,{capture:!0,passive:b}):i.addEventListener(s,u,!0):b!==void 0?i.addEventListener(s,u,{passive:b}):i.addEventListener(s,u,!1)}function ob(i,s,u,p,b){var _=p;if((s&1)===0&&(s&2)===0&&p!==null)e:for(;;){if(p===null)return;var M=p.tag;if(M===3||M===4){var k=p.stateNode.containerInfo;if(k===b)break;if(M===4)for(M=p.return;M!==null;){var W=M.tag;if((W===3||W===4)&&M.stateNode.containerInfo===b)return;M=M.return}for(;k!==null;){if(M=Fs(k),M===null)return;if(W=M.tag,W===5||W===6||W===26||W===27){p=_=M;continue e}k=k.parentNode}}p=p.return}PE(function(){var ie=_,he=_g(u),ye=[];e:{var se=sj.get(i);if(se!==void 0){var ue=Ud,Le=i;switch(i){case"keypress":if(Id(u)===0)break e;case"keydown":case"keyup":ue=mq;break;case"focusin":Le="focus",ue=Cg;break;case"focusout":Le="blur",ue=Cg;break;case"beforeblur":case"afterblur":ue=Cg;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ue=$E;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ue=rq;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ue=yq;break;case rj:case aj:case ij:ue=oq;break;case oj:ue=xq;break;case"scroll":case"scrollend":ue=tq;break;case"wheel":ue=Sq;break;case"copy":case"cut":case"paste":ue=lq;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ue=LE;break;case"toggle":case"beforetoggle":ue=Aq}var Ze=(s&4)!==0,Bt=!Ze&&(i==="scroll"||i==="scrollend"),J=Ze?se!==null?se+"Capture":null:se;Ze=[];for(var X=ie,re;X!==null;){var ge=X;if(re=ge.stateNode,ge=ge.tag,ge!==5&&ge!==26&&ge!==27||re===null||J===null||(ge=Gc(X,J),ge!=null&&Ze.push(Ou(X,ge,re))),Bt)break;X=X.return}0<Ze.length&&(se=new ue(se,Le,null,u,he),ye.push({event:se,listeners:Ze}))}}if((s&7)===0){e:{if(se=i==="mouseover"||i==="pointerover",ue=i==="mouseout"||i==="pointerout",se&&u!==Sg&&(Le=u.relatedTarget||u.fromElement)&&(Fs(Le)||Le[Gi]))break e;if((ue||se)&&(se=he.window===he?he:(se=he.ownerDocument)?se.defaultView||se.parentWindow:window,ue?(Le=u.relatedTarget||u.toElement,ue=ie,Le=Le?Fs(Le):null,Le!==null&&(Bt=o(Le),Ze=Le.tag,Le!==Bt||Ze!==5&&Ze!==27&&Ze!==6)&&(Le=null)):(ue=null,Le=ie),ue!==Le)){if(Ze=$E,ge="onMouseLeave",J="onMouseEnter",X="mouse",(i==="pointerout"||i==="pointerover")&&(Ze=LE,ge="onPointerLeave",J="onPointerEnter",X="pointer"),Bt=ue==null?se:Vc(ue),re=Le==null?se:Vc(Le),se=new Ze(ge,X+"leave",ue,u,he),se.target=Bt,se.relatedTarget=re,ge=null,Fs(he)===ie&&(Ze=new Ze(J,X+"enter",Le,u,he),Ze.target=re,Ze.relatedTarget=Bt,ge=Ze),Bt=ge,ue&&Le)t:{for(Ze=_H,J=ue,X=Le,re=0,ge=J;ge;ge=Ze(ge))re++;ge=0;for(var Fe=X;Fe;Fe=Ze(Fe))ge++;for(;0<re-ge;)J=Ze(J),re--;for(;0<ge-re;)X=Ze(X),ge--;for(;re--;){if(J===X||X!==null&&J===X.alternate){Ze=J;break t}J=Ze(J),X=Ze(X)}Ze=null}else Ze=null;ue!==null&&C2(ye,se,ue,Ze,!1),Le!==null&&Bt!==null&&C2(ye,Bt,Le,Ze,!0)}}e:{if(se=ie?Vc(ie):window,ue=se.nodeName&&se.nodeName.toLowerCase(),ue==="select"||ue==="input"&&se.type==="file")var wt=GE;else if(FE(se))if(YE)wt=Dq;else{wt=Mq;var Ue=Nq}else ue=se.nodeName,!ue||ue.toLowerCase()!=="input"||se.type!=="checkbox"&&se.type!=="radio"?ie&&wg(ie.elementType)&&(wt=GE):wt=Pq;if(wt&&(wt=wt(i,ie))){VE(ye,wt,u,he);break e}Ue&&Ue(i,se,ie),i==="focusout"&&ie&&se.type==="number"&&ie.memoizedProps.value!=null&&xg(se,"number",se.value)}switch(Ue=ie?Vc(ie):window,i){case"focusin":(FE(Ue)||Ue.contentEditable==="true")&&(Js=Ue,kg=ie,eu=null);break;case"focusout":eu=kg=Js=null;break;case"mousedown":$g=!0;break;case"contextmenu":case"mouseup":case"dragend":$g=!1,tj(ye,u,he);break;case"selectionchange":if($q)break;case"keydown":case"keyup":tj(ye,u,he)}var ot;if(Ng)e:{switch(i){case"compositionstart":var gt="onCompositionStart";break e;case"compositionend":gt="onCompositionEnd";break e;case"compositionupdate":gt="onCompositionUpdate";break e}gt=void 0}else Qs?qE(i,u)&&(gt="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(gt="onCompositionStart");gt&&(IE&&u.locale!=="ko"&&(Qs||gt!=="onCompositionStart"?gt==="onCompositionEnd"&&Qs&&(ot=DE()):(Yi=he,Eg="value"in Yi?Yi.value:Yi.textContent,Qs=!0)),Ue=Nh(ie,gt),0<Ue.length&&(gt=new zE(gt,i,null,u,he),ye.push({event:gt,listeners:Ue}),ot?gt.data=ot:(ot=HE(u),ot!==null&&(gt.data=ot)))),(ot=Eq?jq(i,u):Tq(i,u))&&(gt=Nh(ie,"onBeforeInput"),0<gt.length&&(Ue=new zE("onBeforeInput","beforeinput",null,u,he),ye.push({event:Ue,listeners:gt}),Ue.data=ot)),bH(ye,i,ie,u,he)}j2(ye,s)})}function Ou(i,s,u){return{instance:i,listener:s,currentTarget:u}}function Nh(i,s){for(var u=s+"Capture",p=[];i!==null;){var b=i,_=b.stateNode;if(b=b.tag,b!==5&&b!==26&&b!==27||_===null||(b=Gc(i,u),b!=null&&p.unshift(Ou(i,b,_)),b=Gc(i,s),b!=null&&p.push(Ou(i,b,_))),i.tag===3)return p;i=i.return}return[]}function _H(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function C2(i,s,u,p,b){for(var _=s._reactName,M=[];u!==null&&u!==p;){var k=u,W=k.alternate,ie=k.stateNode;if(k=k.tag,W!==null&&W===p)break;k!==5&&k!==26&&k!==27||ie===null||(W=ie,b?(ie=Gc(u,_),ie!=null&&M.unshift(Ou(u,ie,W))):b||(ie=Gc(u,_),ie!=null&&M.push(Ou(u,ie,W)))),u=u.return}M.length!==0&&i.push({event:s,listeners:M})}var AH=/\r\n?/g,OH=/\u0000|\uFFFD/g;function R2(i){return(typeof i=="string"?i:""+i).replace(AH,`
|
|
49
|
-
`).replace(OH,"")}function N2(i,s){return s=R2(s),R2(i)===s}function It(i,s,u,p,b,_){switch(u){case"children":typeof p=="string"?s==="body"||s==="textarea"&&p===""||Ks(i,p):(typeof p=="number"||typeof p=="bigint")&&s!=="body"&&Ks(i,""+p);break;case"className":kd(i,"class",p);break;case"tabIndex":kd(i,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":kd(i,u,p);break;case"style":NE(i,p,_);break;case"data":if(s!=="object"){kd(i,"data",p);break}case"src":case"href":if(p===""&&(s!=="a"||u!=="href")){i.removeAttribute(u);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(u);break}p=zd(""+p),i.setAttribute(u,p);break;case"action":case"formAction":if(typeof p=="function"){i.setAttribute(u,"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"&&(u==="formAction"?(s!=="input"&&It(i,s,"name",b.name,b,null),It(i,s,"formEncType",b.formEncType,b,null),It(i,s,"formMethod",b.formMethod,b,null),It(i,s,"formTarget",b.formTarget,b,null)):(It(i,s,"encType",b.encType,b,null),It(i,s,"method",b.method,b,null),It(i,s,"target",b.target,b,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(u);break}p=zd(""+p),i.setAttribute(u,p);break;case"onClick":p!=null&&(i.onclick=si);break;case"onScroll":p!=null&&pt("scroll",i);break;case"onScrollEnd":p!=null&&pt("scrollend",i);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(u=p.__html,u!=null){if(b.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"multiple":i.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":i.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){i.removeAttribute("xlink:href");break}u=zd(""+p),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,""+p):i.removeAttribute(u);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":p&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":p===!0?i.setAttribute(u,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,p):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?i.setAttribute(u,p):i.removeAttribute(u);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?i.removeAttribute(u):i.setAttribute(u,p);break;case"popover":pt("beforetoggle",i),pt("toggle",i),Dd(i,"popover",p);break;case"xlinkActuate":oi(i,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":oi(i,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":oi(i,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":oi(i,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":oi(i,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":oi(i,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":oi(i,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":oi(i,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":oi(i,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":Dd(i,"is",p);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=JU.get(u)||u,Dd(i,u,p))}}function sb(i,s,u,p,b,_){switch(u){case"style":NE(i,p,_);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(u=p.__html,u!=null){if(b.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"children":typeof p=="string"?Ks(i,p):(typeof p=="number"||typeof p=="bigint")&&Ks(i,""+p);break;case"onScroll":p!=null&&pt("scroll",i);break;case"onScrollEnd":p!=null&&pt("scrollend",i);break;case"onClick":p!=null&&(i.onclick=si);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!SE.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(b=u.endsWith("Capture"),s=u.slice(2,b?u.length-7:void 0),_=i[Xn]||null,_=_!=null?_[u]:null,typeof _=="function"&&i.removeEventListener(s,_,b),typeof p=="function")){typeof _!="function"&&_!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(s,p,b);break e}u in i?i[u]=p:p===!0?i.setAttribute(u,""):Dd(i,u,p)}}}function Fn(i,s,u){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":pt("error",i),pt("load",i);var p=!1,b=!1,_;for(_ in u)if(u.hasOwnProperty(_)){var M=u[_];if(M!=null)switch(_){case"src":p=!0;break;case"srcSet":b=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:It(i,s,_,M,u,null)}}b&&It(i,s,"srcSet",u.srcSet,u,null),p&&It(i,s,"src",u.src,u,null);return;case"input":pt("invalid",i);var k=_=M=b=null,W=null,ie=null;for(p in u)if(u.hasOwnProperty(p)){var he=u[p];if(he!=null)switch(p){case"name":b=he;break;case"type":M=he;break;case"checked":W=he;break;case"defaultChecked":ie=he;break;case"value":_=he;break;case"defaultValue":k=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,s));break;default:It(i,s,p,he,u,null)}}jE(i,_,k,W,ie,M,b,!1);return;case"select":pt("invalid",i),p=M=_=null;for(b in u)if(u.hasOwnProperty(b)&&(k=u[b],k!=null))switch(b){case"value":_=k;break;case"defaultValue":M=k;break;case"multiple":p=k;default:It(i,s,b,k,u,null)}s=_,u=M,i.multiple=!!p,s!=null?Ws(i,!!p,s,!1):u!=null&&Ws(i,!!p,u,!0);return;case"textarea":pt("invalid",i),_=b=p=null;for(M in u)if(u.hasOwnProperty(M)&&(k=u[M],k!=null))switch(M){case"value":p=k;break;case"defaultValue":b=k;break;case"children":_=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(91));break;default:It(i,s,M,k,u,null)}CE(i,p,b,_);return;case"option":for(W in u)if(u.hasOwnProperty(W)&&(p=u[W],p!=null))switch(W){case"selected":i.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:It(i,s,W,p,u,null)}return;case"dialog":pt("beforetoggle",i),pt("toggle",i),pt("cancel",i),pt("close",i);break;case"iframe":case"object":pt("load",i);break;case"video":case"audio":for(p=0;p<Au.length;p++)pt(Au[p],i);break;case"image":pt("error",i),pt("load",i);break;case"details":pt("toggle",i);break;case"embed":case"source":case"link":pt("error",i),pt("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 u)if(u.hasOwnProperty(ie)&&(p=u[ie],p!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:It(i,s,ie,p,u,null)}return;default:if(wg(s)){for(he in u)u.hasOwnProperty(he)&&(p=u[he],p!==void 0&&sb(i,s,he,p,u,void 0));return}}for(k in u)u.hasOwnProperty(k)&&(p=u[k],p!=null&&It(i,s,k,p,u,null))}function EH(i,s,u,p){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,k=null,W=null,ie=null,he=null;for(ue in u){var ye=u[ue];if(u.hasOwnProperty(ue)&&ye!=null)switch(ue){case"checked":break;case"value":break;case"defaultValue":W=ye;default:p.hasOwnProperty(ue)||It(i,s,ue,null,p,ye)}}for(var se in p){var ue=p[se];if(ye=u[se],p.hasOwnProperty(se)&&(ue!=null||ye!=null))switch(se){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":k=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(r(137,s));break;default:ue!==ye&&It(i,s,se,ue,p,ye)}}bg(i,M,k,W,ie,he,_,b);return;case"select":ue=M=k=se=null;for(_ in u)if(W=u[_],u.hasOwnProperty(_)&&W!=null)switch(_){case"value":break;case"multiple":ue=W;default:p.hasOwnProperty(_)||It(i,s,_,null,p,W)}for(b in p)if(_=p[b],W=u[b],p.hasOwnProperty(b)&&(_!=null||W!=null))switch(b){case"value":se=_;break;case"defaultValue":k=_;break;case"multiple":M=_;default:_!==W&&It(i,s,b,_,p,W)}s=k,u=M,p=ue,se!=null?Ws(i,!!u,se,!1):!!p!=!!u&&(s!=null?Ws(i,!!u,s,!0):Ws(i,!!u,u?[]:"",!1));return;case"textarea":ue=se=null;for(k in u)if(b=u[k],u.hasOwnProperty(k)&&b!=null&&!p.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:It(i,s,k,null,p,b)}for(M in p)if(b=p[M],_=u[M],p.hasOwnProperty(M)&&(b!=null||_!=null))switch(M){case"value":se=b;break;case"defaultValue":ue=b;break;case"children":break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(r(91));break;default:b!==_&&It(i,s,M,b,p,_)}TE(i,se,ue);return;case"option":for(var Le in u)if(se=u[Le],u.hasOwnProperty(Le)&&se!=null&&!p.hasOwnProperty(Le))switch(Le){case"selected":i.selected=!1;break;default:It(i,s,Le,null,p,se)}for(W in p)if(se=p[W],ue=u[W],p.hasOwnProperty(W)&&se!==ue&&(se!=null||ue!=null))switch(W){case"selected":i.selected=se&&typeof se!="function"&&typeof se!="symbol";break;default:It(i,s,W,se,p,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 Ze in u)se=u[Ze],u.hasOwnProperty(Ze)&&se!=null&&!p.hasOwnProperty(Ze)&&It(i,s,Ze,null,p,se);for(ie in p)if(se=p[ie],ue=u[ie],p.hasOwnProperty(ie)&&se!==ue&&(se!=null||ue!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,s));break;default:It(i,s,ie,se,p,ue)}return;default:if(wg(s)){for(var Bt in u)se=u[Bt],u.hasOwnProperty(Bt)&&se!==void 0&&!p.hasOwnProperty(Bt)&&sb(i,s,Bt,void 0,p,se);for(he in p)se=p[he],ue=u[he],!p.hasOwnProperty(he)||se===ue||se===void 0&&ue===void 0||sb(i,s,he,se,p,ue);return}}for(var J in u)se=u[J],u.hasOwnProperty(J)&&se!=null&&!p.hasOwnProperty(J)&&It(i,s,J,null,p,se);for(ye in p)se=p[ye],ue=u[ye],!p.hasOwnProperty(ye)||se===ue||se==null&&ue==null||It(i,s,ye,se,p,ue)}function M2(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function jH(){if(typeof performance.getEntriesByType=="function"){for(var i=0,s=0,u=performance.getEntriesByType("resource"),p=0;p<u.length;p++){var b=u[p],_=b.transferSize,M=b.initiatorType,k=b.duration;if(_&&k&&M2(M)){for(M=0,k=b.responseEnd,p+=1;p<u.length;p++){var W=u[p],ie=W.startTime;if(ie>k)break;var he=W.transferSize,ye=W.initiatorType;he&&M2(ye)&&(W=W.responseEnd,M+=he*(W<k?1:(k-ie)/(W-ie)))}if(--p,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 lb=null,cb=null;function Mh(i){return i.nodeType===9?i:i.ownerDocument}function P2(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 D2(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 ub(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 fb=null;function TH(){var i=window.event;return i&&i.type==="popstate"?i===fb?!1:(fb=i,!0):(fb=null,!1)}var k2=typeof setTimeout=="function"?setTimeout:void 0,CH=typeof clearTimeout=="function"?clearTimeout:void 0,$2=typeof Promise=="function"?Promise:void 0,RH=typeof queueMicrotask=="function"?queueMicrotask:typeof $2<"u"?function(i){return $2.resolve(null).then(i).catch(NH)}:k2;function NH(i){setTimeout(function(){throw i})}function uo(i){return i==="head"}function z2(i,s){var u=s,p=0;do{var b=u.nextSibling;if(i.removeChild(u),b&&b.nodeType===8)if(u=b.data,u==="/$"||u==="/&"){if(p===0){i.removeChild(b),El(s);return}p--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")p++;else if(u==="html")Eu(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,Eu(u);for(var _=u.firstChild;_;){var M=_.nextSibling,k=_.nodeName;_[Fc]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&_.rel.toLowerCase()==="stylesheet"||u.removeChild(_),_=M}}else u==="body"&&Eu(i.ownerDocument.body);u=b}while(u);El(s)}function L2(i,s){var u=i;i=0;do{var p=u.nextSibling;if(u.nodeType===1?s?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(s?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),p&&p.nodeType===8)if(u=p.data,u==="/$"){if(i===0)break;i--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||i++;u=p}while(u)}function db(i){var s=i.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var u=s;switch(s=s.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":db(u),gg(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function MH(i,s,u,p){for(;i.nodeType===1;){var b=u;if(i.nodeName.toLowerCase()!==s.toLowerCase()){if(!p&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(p){if(!i[Fc])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=Jr(i.nextSibling),i===null)break}return null}function PH(i,s,u){if(s==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=Jr(i.nextSibling),i===null))return null;return i}function I2(i,s){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!s||(i=Jr(i.nextSibling),i===null))return null;return i}function hb(i){return i.data==="$?"||i.data==="$~"}function pb(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function DH(i,s){var u=i.ownerDocument;if(i.data==="$~")i._reactRetry=s;else if(i.data!=="$?"||u.readyState!=="loading")s();else{var p=function(){s(),u.removeEventListener("DOMContentLoaded",p)};u.addEventListener("DOMContentLoaded",p),i._reactRetry=p}}function Jr(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 mb=null;function B2(i){i=i.nextSibling;for(var s=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(s===0)return Jr(i.nextSibling);s--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||s++}i=i.nextSibling}return null}function U2(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(s===0)return i;s--}else u!=="/$"&&u!=="/&"||s++}i=i.previousSibling}return null}function q2(i,s,u){switch(s=Mh(u),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 Eu(i){for(var s=i.attributes;s.length;)i.removeAttributeNode(s[0]);gg(i)}var ea=new Map,H2=new Set;function Ph(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var _i=G.d;G.d={f:kH,r:$H,D:zH,C:LH,L:IH,m:BH,X:qH,S:UH,M:HH};function kH(){var i=_i.f(),s=Ah();return i||s}function $H(i){var s=Vs(i);s!==null&&s.tag===5&&s.type==="form"?oT(s):_i.r(i)}var _l=typeof document>"u"?null:document;function F2(i,s,u){var p=_l;if(p&&typeof s=="string"&&s){var b=Gr(s);b='link[rel="'+i+'"][href="'+b+'"]',typeof u=="string"&&(b+='[crossorigin="'+u+'"]'),H2.has(b)||(H2.add(b),i={rel:i,crossOrigin:u,href:s},p.querySelector(b)===null&&(s=p.createElement("link"),Fn(s,"link",i),$n(s),p.head.appendChild(s)))}}function zH(i){_i.D(i),F2("dns-prefetch",i,null)}function LH(i,s){_i.C(i,s),F2("preconnect",i,s)}function IH(i,s,u){_i.L(i,s,u);var p=_l;if(p&&i&&s){var b='link[rel="preload"][as="'+Gr(s)+'"]';s==="image"&&u&&u.imageSrcSet?(b+='[imagesrcset="'+Gr(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(b+='[imagesizes="'+Gr(u.imageSizes)+'"]')):b+='[href="'+Gr(i)+'"]';var _=b;switch(s){case"style":_=Al(i);break;case"script":_=Ol(i)}ea.has(_)||(i=h({rel:"preload",href:s==="image"&&u&&u.imageSrcSet?void 0:i,as:s},u),ea.set(_,i),p.querySelector(b)!==null||s==="style"&&p.querySelector(ju(_))||s==="script"&&p.querySelector(Tu(_))||(s=p.createElement("link"),Fn(s,"link",i),$n(s),p.head.appendChild(s)))}}function BH(i,s){_i.m(i,s);var u=_l;if(u&&i){var p=s&&typeof s.as=="string"?s.as:"script",b='link[rel="modulepreload"][as="'+Gr(p)+'"][href="'+Gr(i)+'"]',_=b;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=Ol(i)}if(!ea.has(_)&&(i=h({rel:"modulepreload",href:i},s),ea.set(_,i),u.querySelector(b)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Tu(_)))return}p=u.createElement("link"),Fn(p,"link",i),$n(p),u.head.appendChild(p)}}}function UH(i,s,u){_i.S(i,s,u);var p=_l;if(p&&i){var b=Gs(p).hoistableStyles,_=Al(i);s=s||"default";var M=b.get(_);if(!M){var k={loading:0,preload:null};if(M=p.querySelector(ju(_)))k.loading=5;else{i=h({rel:"stylesheet",href:i,"data-precedence":s},u),(u=ea.get(_))&&vb(i,u);var W=M=p.createElement("link");$n(W),Fn(W,"link",i),W._p=new Promise(function(ie,he){W.onload=ie,W.onerror=he}),W.addEventListener("load",function(){k.loading|=1}),W.addEventListener("error",function(){k.loading|=2}),k.loading|=4,Dh(M,s,p)}M={type:"stylesheet",instance:M,count:1,state:k},b.set(_,M)}}}function qH(i,s){_i.X(i,s);var u=_l;if(u&&i){var p=Gs(u).hoistableScripts,b=Ol(i),_=p.get(b);_||(_=u.querySelector(Tu(b)),_||(i=h({src:i,async:!0},s),(s=ea.get(b))&&gb(i,s),_=u.createElement("script"),$n(_),Fn(_,"link",i),u.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},p.set(b,_))}}function HH(i,s){_i.M(i,s);var u=_l;if(u&&i){var p=Gs(u).hoistableScripts,b=Ol(i),_=p.get(b);_||(_=u.querySelector(Tu(b)),_||(i=h({src:i,async:!0,type:"module"},s),(s=ea.get(b))&&gb(i,s),_=u.createElement("script"),$n(_),Fn(_,"link",i),u.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},p.set(b,_))}}function V2(i,s,u,p){var b=(b=Se.current)?Ph(b):null;if(!b)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(s=Al(u.href),u=Gs(b).hoistableStyles,p=u.get(s),p||(p={type:"style",instance:null,count:0,state:null},u.set(s,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=Al(u.href);var _=Gs(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(ju(i)))&&!_._p&&(M.instance=_,M.state.loading=5),ea.has(i)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},ea.set(i,u),_||FH(b,i,u,M.state))),s&&p===null)throw Error(r(528,""));return M}if(s&&p!==null)throw Error(r(529,""));return null;case"script":return s=u.async,u=u.src,typeof u=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Ol(u),u=Gs(b).hoistableScripts,p=u.get(s),p||(p={type:"script",instance:null,count:0,state:null},u.set(s,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function Al(i){return'href="'+Gr(i)+'"'}function ju(i){return'link[rel="stylesheet"]['+i+"]"}function G2(i){return h({},i,{"data-precedence":i.precedence,precedence:null})}function FH(i,s,u,p){i.querySelector('link[rel="preload"][as="style"]['+s+"]")?p.loading=1:(s=i.createElement("link"),p.preload=s,s.addEventListener("load",function(){return p.loading|=1}),s.addEventListener("error",function(){return p.loading|=2}),Fn(s,"link",u),$n(s),i.head.appendChild(s))}function Ol(i){return'[src="'+Gr(i)+'"]'}function Tu(i){return"script[async]"+i}function Y2(i,s,u){if(s.count++,s.instance===null)switch(s.type){case"style":var p=i.querySelector('style[data-href~="'+Gr(u.href)+'"]');if(p)return s.instance=p,$n(p),p;var b=h({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return p=(i.ownerDocument||i).createElement("style"),$n(p),Fn(p,"style",b),Dh(p,u.precedence,i),s.instance=p;case"stylesheet":b=Al(u.href);var _=i.querySelector(ju(b));if(_)return s.state.loading|=4,s.instance=_,$n(_),_;p=G2(u),(b=ea.get(b))&&vb(p,b),_=(i.ownerDocument||i).createElement("link"),$n(_);var M=_;return M._p=new Promise(function(k,W){M.onload=k,M.onerror=W}),Fn(_,"link",p),s.state.loading|=4,Dh(_,u.precedence,i),s.instance=_;case"script":return _=Ol(u.src),(b=i.querySelector(Tu(_)))?(s.instance=b,$n(b),b):(p=u,(b=ea.get(_))&&(p=h({},u),gb(p,b)),i=i.ownerDocument||i,b=i.createElement("script"),$n(b),Fn(b,"link",p),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&&(p=s.instance,s.state.loading|=4,Dh(p,u.precedence,i));return s.instance}function Dh(i,s,u){for(var p=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=p.length?p[p.length-1]:null,_=b,M=0;M<p.length;M++){var k=p[M];if(k.dataset.precedence===s)_=k;else if(_!==b)break}_?_.parentNode.insertBefore(i,_.nextSibling):(s=u.nodeType===9?u.head:u,s.insertBefore(i,s.firstChild))}function vb(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.title==null&&(i.title=s.title)}function gb(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.integrity==null&&(i.integrity=s.integrity)}var kh=null;function W2(i,s,u){if(kh===null){var p=new Map,b=kh=new Map;b.set(u,p)}else b=kh,p=b.get(u),p||(p=new Map,b.set(u,p));if(p.has(i))return p;for(p.set(i,null),u=u.getElementsByTagName(i),b=0;b<u.length;b++){var _=u[b];if(!(_[Fc]||_[yn]||i==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var M=_.getAttribute(s)||"";M=i+M;var k=p.get(M);k?k.push(_):p.set(M,[_])}}return p}function K2(i,s,u){i=i.ownerDocument||i,i.head.insertBefore(u,s==="title"?i.querySelector("head > title"):null)}function VH(i,s,u){if(u===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 Z2(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function GH(i,s,u,p){if(u.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var b=Al(p.href),_=s.querySelector(ju(b));if(_){s=_._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(i.count++,i=$h.bind(i),s.then(i,i)),u.state.loading|=4,u.instance=_,$n(_);return}_=s.ownerDocument||s,p=G2(p),(b=ea.get(b))&&vb(p,b),_=_.createElement("link"),$n(_);var M=_;M._p=new Promise(function(k,W){M.onload=k,M.onerror=W}),Fn(_,"link",p),u.instance=_}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,s),(s=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=$h.bind(i),s.addEventListener("load",u),s.addEventListener("error",u))}}var yb=0;function YH(i,s){return i.stylesheets&&i.count===0&&Lh(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var p=setTimeout(function(){if(i.stylesheets&&Lh(i,i.stylesheets),i.unsuspend){var _=i.unsuspend;i.unsuspend=null,_()}},6e4+s);0<i.imgBytes&&yb===0&&(yb=62500*jH());var b=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Lh(i,i.stylesheets),i.unsuspend)){var _=i.unsuspend;i.unsuspend=null,_()}},(i.imgBytes>yb?50:800)+s);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(p),clearTimeout(b)}}:null}function $h(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Lh(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var zh=null;function Lh(i,s){i.stylesheets=null,i.unsuspend!==null&&(i.count++,zh=new Map,s.forEach(WH,i),zh=null,$h.call(i))}function WH(i,s){if(!(s.state.loading&4)){var u=zh.get(i);if(u)var p=u.get(null);else{u=new Map,zh.set(i,u);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")&&(u.set(M.dataset.precedence,M),p=M)}p&&u.set(null,p)}b=s.instance,M=b.getAttribute("data-precedence"),_=u.get(M)||p,_===p&&u.set(null,b),u.set(M,b),this.count++,p=$h.bind(this),b.addEventListener("load",p),b.addEventListener("error",p),_?_.parentNode.insertBefore(b,_.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(b,i.firstChild)),s.state.loading|=4}}var Cu={$$typeof:j,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function KH(i,s,u,p,b,_,M,k,W){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=hn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hn(0),this.hiddenUpdates=hn(null),this.identifierPrefix=p,this.onUncaughtError=b,this.onCaughtError=_,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=W,this.incompleteTransitions=new Map}function X2(i,s,u,p,b,_,M,k,W,ie,he,ye){return i=new KH(i,s,u,M,W,ie,he,ye,k),s=1,_===!0&&(s|=24),_=_r(3,null,null,s),i.current=_,_.stateNode=i,s=Xg(),s.refCount++,i.pooledCache=s,s.refCount++,_.memoizedState={element:p,isDehydrated:u,cache:s},ty(_),i}function Q2(i){return i?(i=nl,i):nl}function J2(i,s,u,p,b,_){b=Q2(b),p.context===null?p.context=b:p.pendingContext=b,p=Ji(s),p.payload={element:u},_=_===void 0?null:_,_!==null&&(p.callback=_),u=eo(i,p,s),u!==null&&(vr(u,i,s),su(u,i,s))}function eC(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<s?u:s}}function bb(i,s){eC(i,s),(i=i.alternate)&&eC(i,s)}function tC(i){if(i.tag===13||i.tag===31){var s=Yo(i,67108864);s!==null&&vr(s,i,67108864),bb(i,67108864)}}function nC(i){if(i.tag===13||i.tag===31){var s=Tr();s=Me(s);var u=Yo(i,s);u!==null&&vr(u,i,s),bb(i,s)}}var Ih=!0;function ZH(i,s,u,p){var b=$.T;$.T=null;var _=G.p;try{G.p=2,xb(i,s,u,p)}finally{G.p=_,$.T=b}}function XH(i,s,u,p){var b=$.T;$.T=null;var _=G.p;try{G.p=8,xb(i,s,u,p)}finally{G.p=_,$.T=b}}function xb(i,s,u,p){if(Ih){var b=wb(p);if(b===null)ob(i,s,p,Bh,u),aC(i,p);else if(JH(b,i,s,u,p))p.stopPropagation();else if(aC(i,p),s&4&&-1<QH.indexOf(i)){for(;b!==null;){var _=Vs(b);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var M=Ke(_.pendingLanes);if(M!==0){var k=_;for(k.pendingLanes|=2,k.entangledLanes|=2;M;){var W=1<<31-Vt(M);k.entanglements[1]|=W,M&=~W}Ua(_),(Et&6)===0&&(Sh=H()+500,_u(0))}}break;case 31:case 13:k=Yo(_,2),k!==null&&vr(k,_,2),Ah(),bb(_,2)}if(_=wb(p),_===null&&ob(i,s,p,Bh,u),_===b)break;b=_}b!==null&&p.stopPropagation()}else ob(i,s,p,null,u)}}function wb(i){return i=_g(i),Sb(i)}var Bh=null;function Sb(i){if(Bh=null,i=Fs(i),i!==null){var s=o(i);if(s===null)i=null;else{var u=s.tag;if(u===13){if(i=l(s),i!==null)return i;i=null}else if(u===31){if(i=c(s),i!==null)return i;i=null}else if(u===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null)}}return Bh=i,null}function rC(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(ee()){case ae:return 2;case Re:return 8;case Ce:case je:return 32;case Ee:return 268435456;default:return 32}default:return 32}}var _b=!1,fo=null,ho=null,po=null,Ru=new Map,Nu=new Map,mo=[],QH="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 aC(i,s){switch(i){case"focusin":case"focusout":fo=null;break;case"dragenter":case"dragleave":ho=null;break;case"mouseover":case"mouseout":po=null;break;case"pointerover":case"pointerout":Ru.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nu.delete(s.pointerId)}}function Mu(i,s,u,p,b,_){return i===null||i.nativeEvent!==_?(i={blockedOn:s,domEventName:u,eventSystemFlags:p,nativeEvent:_,targetContainers:[b]},s!==null&&(s=Vs(s),s!==null&&tC(s)),i):(i.eventSystemFlags|=p,s=i.targetContainers,b!==null&&s.indexOf(b)===-1&&s.push(b),i)}function JH(i,s,u,p,b){switch(s){case"focusin":return fo=Mu(fo,i,s,u,p,b),!0;case"dragenter":return ho=Mu(ho,i,s,u,p,b),!0;case"mouseover":return po=Mu(po,i,s,u,p,b),!0;case"pointerover":var _=b.pointerId;return Ru.set(_,Mu(Ru.get(_)||null,i,s,u,p,b)),!0;case"gotpointercapture":return _=b.pointerId,Nu.set(_,Mu(Nu.get(_)||null,i,s,u,p,b)),!0}return!1}function iC(i){var s=Fs(i.target);if(s!==null){var u=o(s);if(u!==null){if(s=u.tag,s===13){if(s=l(u),s!==null){i.blockedOn=s,kn(i.priority,function(){nC(u)});return}}else if(s===31){if(s=c(u),s!==null){i.blockedOn=s,kn(i.priority,function(){nC(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Uh(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var u=wb(i.nativeEvent);if(u===null){u=i.nativeEvent;var p=new u.constructor(u.type,u);Sg=p,u.target.dispatchEvent(p),Sg=null}else return s=Vs(u),s!==null&&tC(s),i.blockedOn=u,!1;s.shift()}return!0}function oC(i,s,u){Uh(i)&&u.delete(s)}function e9(){_b=!1,fo!==null&&Uh(fo)&&(fo=null),ho!==null&&Uh(ho)&&(ho=null),po!==null&&Uh(po)&&(po=null),Ru.forEach(oC),Nu.forEach(oC)}function qh(i,s){i.blockedOn===s&&(i.blockedOn=null,_b||(_b=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,e9)))}var Hh=null;function sC(i){Hh!==i&&(Hh=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Hh===i&&(Hh=null);for(var s=0;s<i.length;s+=3){var u=i[s],p=i[s+1],b=i[s+2];if(typeof p!="function"){if(Sb(p||u)===null)continue;break}var _=Vs(u);_!==null&&(i.splice(s,3),s-=3,wy(_,{pending:!0,data:b,method:u.method,action:p},p,b))}}))}function El(i){function s(W){return qh(W,i)}fo!==null&&qh(fo,i),ho!==null&&qh(ho,i),po!==null&&qh(po,i),Ru.forEach(s),Nu.forEach(s);for(var u=0;u<mo.length;u++){var p=mo[u];p.blockedOn===i&&(p.blockedOn=null)}for(;0<mo.length&&(u=mo[0],u.blockedOn===null);)iC(u),u.blockedOn===null&&mo.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(p=0;p<u.length;p+=3){var b=u[p],_=u[p+1],M=b[Xn]||null;if(typeof _=="function")M||sC(u);else if(M){var k=null;if(_&&_.hasAttribute("formAction")){if(b=_,M=_[Xn]||null)k=M.formAction;else if(Sb(b)!==null)continue}else k=M.action;typeof k=="function"?u[p+1]=k:(u.splice(p,3),p-=3),sC(u)}}}function lC(){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),p||setTimeout(u,20)}function u(){if(!p&&!navigation.transition){var _=navigation.currentEntry;_&&_.url!=null&&navigation.navigate(_.url,{state:_.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,b=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(u,100),function(){p=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),b!==null&&(b(),b=null)}}}function Ab(i){this._internalRoot=i}Fh.prototype.render=Ab.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(r(409));var u=s.current,p=Tr();J2(u,p,i,s,null,null)},Fh.prototype.unmount=Ab.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;J2(i.current,2,null,i,null,null),Ah(),s[Gi]=null}};function Fh(i){this._internalRoot=i}Fh.prototype.unstable_scheduleHydration=function(i){if(i){var s=ut();i={blockedOn:null,target:i,priority:s};for(var u=0;u<mo.length&&s!==0&&s<mo[u].priority;u++);mo.splice(u,0,i),u===0&&iC(i)}};var cC=t.version;if(cC!=="19.2.6")throw Error(r(527,cC,"19.2.6"));G.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 t9={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vh.isDisabled&&Vh.supportsFiber)try{Ot=Vh.inject(t9),Ct=Vh}catch{}}return Du.createRoot=function(i,s){if(!a(i))throw Error(r(299));var u=!1,p="",b=vT,_=gT,M=yT;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(b=s.onUncaughtError),s.onCaughtError!==void 0&&(_=s.onCaughtError),s.onRecoverableError!==void 0&&(M=s.onRecoverableError)),s=X2(i,1,!1,null,null,u,p,null,b,_,M,lC),i[Gi]=s.current,ib(i),new Ab(s)},Du.hydrateRoot=function(i,s,u){if(!a(i))throw Error(r(299));var p=!1,b="",_=vT,M=gT,k=yT,W=null;return u!=null&&(u.unstable_strictMode===!0&&(p=!0),u.identifierPrefix!==void 0&&(b=u.identifierPrefix),u.onUncaughtError!==void 0&&(_=u.onUncaughtError),u.onCaughtError!==void 0&&(M=u.onCaughtError),u.onRecoverableError!==void 0&&(k=u.onRecoverableError),u.formState!==void 0&&(W=u.formState)),s=X2(i,1,!0,s,u??null,p,b,W,_,M,k,lC),s.context=Q2(null),u=s.current,p=Tr(),p=Me(p),b=Ji(p),b.callback=null,eo(u,b,p),u=p,s.current.lanes=u,te(s,u),Ua(s),i[Gi]=s.current,ib(i),new Fh(s)},Du.version="19.2.6",Du}var bC;function f9(){if(bC)return jb.exports;bC=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(),jb.exports=u9(),jb.exports}var d9=f9(),h9=(e,t,n,r,a,o,l,c)=>{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)}),h(x)}function h(x){c&&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{}},xC=["light","dark"],zz="(prefers-color-scheme: dark)",p9=typeof window>"u",Z_=y.createContext(void 0),m9={setTheme:e=>{},themes:[]},Sc=()=>{var e;return(e=y.useContext(Z_))!=null?e:m9},v9=e=>y.useContext(Z_)?y.createElement(y.Fragment,null,e.children):y.createElement(y9,{...e}),g9=["light","dark"],y9=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:a="theme",themes:o=g9,defaultTheme:l=n?"system":"light",attribute:c="data-theme",value:f,children:d,nonce:m,scriptProps:h})=>{let[g,x]=y.useState(()=>x9(a,l)),[A,S]=y.useState(()=>g==="system"?Nb():g),w=f?Object.values(f):o,O=y.useCallback(T=>{let C=T;if(!C)return;T==="system"&&n&&(C=Nb());let N=f?f[C]:C,D=t?w9(m):null,z=document.documentElement,V=U=>{U==="class"?(z.classList.remove(...w),N&&z.classList.add(N)):U.startsWith("data-")&&(N?z.setAttribute(U,N):z.removeAttribute(U))};if(Array.isArray(c)?c.forEach(V):V(c),r){let U=xC.includes(l)?l:null,P=xC.includes(C)?C:U;z.style.colorScheme=P}D==null||D()},[m]),E=y.useCallback(T=>{let C=typeof T=="function"?T(g):T;x(C);try{localStorage.setItem(a,C)}catch{}},[g]),j=y.useCallback(T=>{let C=Nb(T);S(C),g==="system"&&n&&!e&&O("system")},[g,e]);y.useEffect(()=>{let T=window.matchMedia(zz);return T.addListener(j),j(T),()=>T.removeListener(j)},[j]),y.useEffect(()=>{let T=C=>{C.key===a&&(C.newValue?x(C.newValue):E(l))};return window.addEventListener("storage",T),()=>window.removeEventListener("storage",T)},[E]),y.useEffect(()=>{O(e??g)},[e,g]);let R=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(Z_.Provider,{value:R},y.createElement(b9,{forcedTheme:e,storageKey:a,attribute:c,enableSystem:n,enableColorScheme:r,defaultTheme:l,value:f,themes:o,nonce:m,scriptProps:h}),d)},b9=y.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultTheme:o,value:l,themes:c,nonce:f,scriptProps:d})=>{let m=JSON.stringify([n,t,o,e,c,l,r,a]).slice(1,-1);return y.createElement("script",{...d,suppressHydrationWarning:!0,nonce:typeof window>"u"?f:"",dangerouslySetInnerHTML:{__html:`(${h9.toString()})(${m})`}})}),x9=(e,t)=>{if(p9)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},w9=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)}},Nb=e=>(e||(e=window.matchMedia(zz)),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 wC="popstate";function SC(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function S9(e={}){function t(r,a){var d;let o=(d=a.state)==null?void 0:d.masked,{pathname:l,search:c,hash:f}=o||r.location;return Z1("",{pathname:l,search:c,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:ff(a)}return A9(t,n,null,e)}function rn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function fa(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function _9(){return Math.random().toString(36).substring(2,10)}function _C(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 Z1(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?_c(t):t,state:n,key:t&&t.key||r||_9(),mask:a}}function ff({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 _c(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,c="POP",f=null,d=m();d==null&&(d=0,l.replaceState({...l.state,idx:d},""));function m(){return(l.state||{idx:null}).idx}function h(){c="POP";let w=m(),O=w==null?null:w-d;d=w,f&&f({action:c,location:S.location,delta:O})}function g(w,O){c="PUSH";let E=SC(w)?w:Z1(S.location,w,O);d=m()+1;let j=_C(E,d),R=S.createHref(E.mask||E);try{l.pushState(j,"",R)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;a.location.assign(R)}o&&f&&f({action:c,location:S.location,delta:1})}function x(w,O){c="REPLACE";let E=SC(w)?w:Z1(S.location,w,O);d=m();let j=_C(E,d),R=S.createHref(E.mask||E);l.replaceState(j,"",R),o&&f&&f({action:c,location:S.location,delta:0})}function A(w){return O9(w)}let S={get action(){return c},get location(){return e(a,l)},listen(w){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(wC,h),f=w,()=>{a.removeEventListener(wC,h),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 O9(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),rn(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:ff(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function Lz(e,t,n="/"){return E9(e,t,n,!1)}function E9(e,t,n,r,a){let o=typeof t=="string"?_c(t):t,l=Di(o.pathname||"/",n);if(l==null)return null;let c=j9(e),f=null,d=I9(l);for(let m=0;f==null&&m<c.length;++m)f=z9(c[m],d,r);return f}function j9(e){let t=Iz(e);return T9(t),t}function Iz(e,t=[],n=[],r="",a=!1){let o=(l,c,f=a,d)=>{let m={relativePath:d===void 0?l.path||"":d,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(r)&&f)return;rn(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 h=Ca([r,m.relativePath]),g=n.concat(m);l.children&&l.children.length>0&&(rn(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),Iz(l.children,t,g,h,f)),!(l.path==null&&!l.index)&&t.push({path:h,score:k9(h,l.index),routesMeta:g})};return e.forEach((l,c)=>{var f;if(l.path===""||!((f=l.path)!=null&&f.includes("?")))o(l,c);else for(let d of Bz(l.path))o(l,c,!0,d)}),t}function Bz(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=Bz(r.join("/")),c=[];return c.push(...l.map(f=>f===""?o:[o,f].join("/"))),a&&c.push(...l),c.map(f=>e.startsWith("/")&&f===""?"/":f)}function T9(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:$9(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var C9=/^:[\w-]+$/,R9=3,N9=2,M9=1,P9=10,D9=-2,AC=e=>e==="*";function k9(e,t){let n=e.split("/"),r=n.length;return n.some(AC)&&(r+=D9),t&&(r+=N9),n.filter(a=>!AC(a)).reduce((a,o)=>a+(C9.test(o)?R9:o===""?M9:P9),r)}function $9(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 z9(e,t,n=!1){let{routesMeta:r}=e,a={},o="/",l=[];for(let c=0;c<r.length;++c){let f=r[c],d=c===r.length-1,m=o==="/"?t:t.slice(o.length)||"/",h=Np({path:f.relativePath,caseSensitive:f.caseSensitive,end:d},m),g=f.route;if(!h&&d&&n&&!r[r.length-1].route.index&&(h=Np({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},m)),!h)return null;Object.assign(a,h.params),l.push({params:a,pathname:Ca([o,h.pathname]),pathnameBase:H9(Ca([o,h.pathnameBase])),route:g}),h.pathnameBase!=="/"&&(o=Ca([o,h.pathnameBase]))}return l}function Np(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=L9(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let o=a[0],l=o.replace(/(.)\/+$/,"$1"),c=a.slice(1);return{params:r.reduce((d,{paramName:m,isOptional:h},g)=>{if(m==="*"){let A=c[g]||"";l=o.slice(0,o.length-A.length).replace(/(.)\/+$/,"$1")}const x=c[g];return h&&!x?d[m]=void 0:d[m]=(x||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:l,pattern:e}}function L9(e,t=!1,n=!0){fa(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,c,f,d,m)=>{if(r.push({paramName:c,isOptional:f!=null}),f){let h=m.charAt(d+l.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}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 I9(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return fa(!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 Di(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 B9=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function U9(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?_c(e):e,o;return n?(n=Uz(n),n.startsWith("/")?o=OC(n.substring(1),"/"):o=OC(n,t)):o=t,{pathname:o,search:F9(r),hash:V9(a)}}function OC(e,t){let n=Mp(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Mb(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 q9(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function X_(e){let t=q9(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Jm(e,t,n,r=!1){let a;typeof e=="string"?a=_c(e):(a={...e},rn(!a.pathname||!a.pathname.includes("?"),Mb("?","pathname","search",a)),rn(!a.pathname||!a.pathname.includes("#"),Mb("#","pathname","hash",a)),rn(!a.search||!a.search.includes("#"),Mb("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,c;if(l==null)c=n;else{let h=t.length-1;if(!r&&l.startsWith("..")){let g=l.split("/");for(;g[0]==="..";)g.shift(),h-=1;a.pathname=g.join("/")}c=h>=0?t[h]:"/"}let f=U9(a,c),d=l&&l!=="/"&&l.endsWith("/"),m=(o||l===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(d||m)&&(f.pathname+="/"),f}var Uz=e=>e.replace(/\/\/+/g,"/"),Ca=e=>Uz(e.join("/")),Mp=e=>e.replace(/\/+$/,""),H9=e=>Mp(e).replace(/^\/*/,"/"),F9=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,V9=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,G9=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 Y9(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function W9(e){let t=e.map(n=>n.route.path).filter(Boolean);return Ca(t)||"/"}var qz=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Hz(e,t){let n=e;if(typeof n!="string"||!B9.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(qz)try{let o=new URL(window.location.href),l=n.startsWith("//")?new URL(o.protocol+n):new URL(n),c=Di(l.pathname,t);l.origin===o.origin&&c!=null?n=c+l.search+l.hash:a=!0}catch{fa(!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 Fz=["POST","PUT","PATCH","DELETE"];new Set(Fz);var K9=["GET",...Fz];new Set(K9);var Ac=y.createContext(null);Ac.displayName="DataRouter";var ev=y.createContext(null);ev.displayName="DataRouterState";var Vz=y.createContext(!1);function Z9(){return y.useContext(Vz)}var Gz=y.createContext({isTransitioning:!1});Gz.displayName="ViewTransition";var X9=y.createContext(new Map);X9.displayName="Fetchers";var Q9=y.createContext(null);Q9.displayName="Await";var Ur=y.createContext(null);Ur.displayName="Navigation";var ed=y.createContext(null);ed.displayName="Location";var Da=y.createContext({outlet:null,matches:[],isDataRoute:!1});Da.displayName="Route";var Q_=y.createContext(null);Q_.displayName="RouteError";var Yz="REACT_ROUTER_ERROR",J9="REDIRECT",e7="ROUTE_ERROR_RESPONSE";function t7(e){if(e.startsWith(`${Yz}:${J9}:{`))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 n7(e){if(e.startsWith(`${Yz}:${e7}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new G9(t.status,t.statusText,t.data)}catch{}}function r7(e,{relative:t}={}){rn(Oc(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=y.useContext(Ur),{hash:a,pathname:o,search:l}=td(e,{relative:t}),c=o;return n!=="/"&&(c=o==="/"?n:Ca([n,o])),r.createHref({pathname:c,search:l,hash:a})}function Oc(){return y.useContext(ed)!=null}function qr(){return rn(Oc(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(ed).location}var Wz="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Kz(e){y.useContext(Ur).static||y.useLayoutEffect(e)}function ka(){let{isDataRoute:e}=y.useContext(Da);return e?y7():a7()}function a7(){rn(Oc(),"useNavigate() may be used only in the context of a <Router> component.");let e=y.useContext(Ac),{basename:t,navigator:n}=y.useContext(Ur),{matches:r}=y.useContext(Da),{pathname:a}=qr(),o=JSON.stringify(X_(r)),l=y.useRef(!1);return Kz(()=>{l.current=!0}),y.useCallback((f,d={})=>{if(fa(l.current,Wz),!l.current)return;if(typeof f=="number"){n.go(f);return}let m=Jm(f,JSON.parse(o),a,d.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Ca([t,m.pathname])),(d.replace?n.replace:n.push)(m,d.state,d)},[t,n,o,a,e])}var i7=y.createContext(null);function o7(e){let t=y.useContext(Da).outlet;return y.useMemo(()=>t&&y.createElement(i7.Provider,{value:e},t),[t,e])}function td(e,{relative:t}={}){let{matches:n}=y.useContext(Da),{pathname:r}=qr(),a=JSON.stringify(X_(n));return y.useMemo(()=>Jm(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function s7(e,t){return Zz(e,t)}function Zz(e,t,n){var w;rn(Oc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=y.useContext(Ur),{matches:a}=y.useContext(Da),o=a[a.length-1],l=o?o.params:{},c=o?o.pathname:"/",f=o?o.pathnameBase:"/",d=o&&o.route;{let O=d&&d.path||"";Qz(c,!d||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (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=qr(),h;if(t){let O=typeof t=="string"?_c(t):t;rn(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.`),h=O}else h=m;let g=h.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})):Lz(e,{pathname:x});fa(d||A!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),fa(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 "${h.pathname}${h.search}${h.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=d7(A&&A.map(O=>Object.assign({},O,{params:Object.assign({},l,O.params),pathname:Ca([f,r.encodeLocation?r.encodeLocation(O.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?f:Ca([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(ed.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...h},navigationType:"POP"}},S):S}function l7(){let e=g7(),t=Y9(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 c7=y.createElement(l7,null),Xz=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=n7(e.digest);n&&(e=n)}let t=e!==void 0?y.createElement(Da.Provider,{value:this.props.routeContext},y.createElement(Q_.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?y.createElement(u7,{error:e},t):t}};Xz.contextType=Vz;var Pb=new WeakMap;function u7({children:e,error:t}){let{basename:n}=y.useContext(Ur);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=t7(t.digest);if(r){let a=Pb.get(t);if(a)throw a;let o=Hz(r.location,n);if(qz&&!Pb.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 Pb.set(t,l),l}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function f7({routeContext:e,match:t,children:n}){let r=y.useContext(Ac);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(Da.Provider,{value:e},n)}function d7(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(h=>h.route.id&&(o==null?void 0:o[h.route.id])!==void 0);rn(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,c=-1;if(n&&r){l=r.renderFallback;for(let m=0;m<a.length;m++){let h=a[m];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(c=m),h.route.id){let{loaderData:g,errors:x}=r,A=h.route.loader&&!g.hasOwnProperty(h.route.id)&&(!x||x[h.route.id]===void 0);if(h.route.lazy||A){n.isStatic&&(l=!0),c>=0?a=a.slice(0,c+1):a=[a[0]];break}}}}let f=n==null?void 0:n.onError,d=r&&f?(m,h)=>{var g,x;f(m,{location:r.location,params:((x=(g=r.matches)==null?void 0:g[0])==null?void 0:x.params)??{},pattern:W9(r.matches),errorInfo:h})}:void 0;return a.reduceRight((m,h,g)=>{let x,A=!1,S=null,w=null;r&&(x=o&&h.route.id?o[h.route.id]:void 0,S=h.route.errorElement||c7,l&&(c<0&&g===0?(Qz("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),A=!0,w=null):c===g&&(A=!0,w=h.route.hydrateFallbackElement||null)));let O=t.concat(a.slice(0,g+1)),E=()=>{let j;return x?j=S:A?j=w:h.route.Component?j=y.createElement(h.route.Component,null):h.route.element?j=h.route.element:j=m,y.createElement(f7,{match:h,routeContext:{outlet:m,matches:O,isDataRoute:r!=null},children:j})};return r&&(h.route.ErrorBoundary||h.route.errorElement||g===0)?y.createElement(Xz,{location:r.location,revalidation:r.revalidation,component:S,error:x,children:E(),routeContext:{outlet:null,matches:O,isDataRoute:!0},onError:d}):E()},null)}function J_(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function h7(e){let t=y.useContext(Ac);return rn(t,J_(e)),t}function p7(e){let t=y.useContext(ev);return rn(t,J_(e)),t}function m7(e){let t=y.useContext(Da);return rn(t,J_(e)),t}function eA(e){let t=m7(e),n=t.matches[t.matches.length-1];return rn(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function v7(){return eA("useRouteId")}function g7(){var r;let e=y.useContext(Q_),t=p7("useRouteError"),n=eA("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function y7(){let{router:e}=h7("useNavigate"),t=eA("useNavigate"),n=y.useRef(!1);return Kz(()=>{n.current=!0}),y.useCallback(async(a,o={})=>{fa(n.current,Wz),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var EC={};function Qz(e,t,n){!t&&!EC[e]&&(EC[e]=!0,fa(!1,n))}y.memo(b7);function b7({routes:e,manifest:t,future:n,state:r,isStatic:a,onError:o}){return Zz(e,void 0,{manifest:t,state:r,isStatic:a,onError:o})}function X1({to:e,replace:t,state:n,relative:r}){rn(Oc(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=y.useContext(Ur);fa(!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(Da),{pathname:l}=qr(),c=ka(),f=Jm(e,X_(o),l,r==="path"),d=JSON.stringify(f);return y.useEffect(()=>{c(JSON.parse(d),{replace:t,state:n,relative:r})},[c,d,r,t,n]),null}function x7(e){return o7(e.context)}function gr(e){rn(!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 w7({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:o=!1,useTransitions:l}){rn(!Oc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),f=y.useMemo(()=>({basename:c,navigator:a,static:o,useTransitions:l,future:{}}),[c,a,o,l]);typeof n=="string"&&(n=_c(n));let{pathname:d="/",search:m="",hash:h="",state:g=null,key:x="default",mask:A}=n,S=y.useMemo(()=>{let w=Di(d,c);return w==null?null:{location:{pathname:w,search:m,hash:h,state:g,key:x,mask:A},navigationType:r}},[c,d,m,h,g,x,r,A]);return fa(S!=null,`<Router basename="${c}"> is not able to match the URL "${d}${m}${h}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:y.createElement(Ur.Provider,{value:f},y.createElement(ed.Provider,{children:t,value:S}))}function S7({children:e,location:t}){return s7(Q1(e),t)}function Q1(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,Q1(r.props.children,o));return}rn(r.type===gr,`[${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>`),rn(!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=Q1(r.props.children,o)),n.push(l)}),n}var yp="get",bp="application/x-www-form-urlencoded";function tv(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function _7(e){return tv(e)&&e.tagName.toLowerCase()==="button"}function A7(e){return tv(e)&&e.tagName.toLowerCase()==="form"}function O7(e){return tv(e)&&e.tagName.toLowerCase()==="input"}function E7(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function j7(e,t){return e.button===0&&(!t||t==="_self")&&!E7(e)}function J1(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 T7(e,t){let n=J1(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(o=>{n.append(a,o)})}),n}var Yh=null;function C7(){if(Yh===null)try{new FormData(document.createElement("form"),0),Yh=!1}catch{Yh=!0}return Yh}var R7=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Db(e){return e!=null&&!R7.has(e)?(fa(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${bp}"`),null):e}function N7(e,t){let n,r,a,o,l;if(A7(e)){let c=e.getAttribute("action");r=c?Di(c,t):null,n=e.getAttribute("method")||yp,a=Db(e.getAttribute("enctype"))||bp,o=new FormData(e)}else if(_7(e)||O7(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||c.getAttribute("action");if(r=f?Di(f,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||yp,a=Db(e.getAttribute("formenctype"))||Db(c.getAttribute("enctype"))||bp,o=new FormData(c,e),!C7()){let{name:d,type:m,value:h}=e;if(m==="image"){let g=d?`${d}.`:"";o.append(`${g}x`,"0"),o.append(`${g}y`,"0")}else d&&o.append(d,h)}}else{if(tv(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=yp,r=null,a=bp,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 tA(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Jz(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&&Di(a.pathname,t)==="/"?a.pathname=`${Mp(t)}/_root.${r}`:a.pathname=`${Mp(a.pathname)}.${r}`,a}async function M7(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 P7(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 D7(e,t,n){let r=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let l=await M7(o,n);return l.links?l.links():[]}return[]}));return L7(r.flat(1).filter(P7).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function jC(e,t,n,r,a,o){let l=(f,d)=>n[d]?f.route.id!==n[d].route.id:!0,c=(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)||c(f,d)):o==="data"?t.filter((f,d)=>{var h;let m=r.routes[f.route.id];if(!m||!m.hasLoader)return!1;if(l(f,d)||c(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:((h=n[0])==null?void 0:h.params)||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function k7(e,t,{includeHydrateFallback:n}={}){return $7(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 $7(e){return[...new Set(e)]}function z7(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function L7(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let o=JSON.stringify(z7(a));return n.has(o)||(n.add(o),r.push({key:o,link:a})),r},[])}function nA(){let e=y.useContext(Ac);return tA(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function I7(){let e=y.useContext(ev);return tA(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var rA=y.createContext(void 0);rA.displayName="FrameworkContext";function aA(){let e=y.useContext(rA);return tA(e,"You must render this element inside a <HydratedRouter> element"),e}function B7(e,t){let n=y.useContext(rA),[r,a]=y.useState(!1),[o,l]=y.useState(!1),{onFocus:c,onBlur:f,onMouseEnter:d,onMouseLeave:m,onTouchStart:h}=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:ku(c,x),onBlur:ku(f,A),onMouseEnter:ku(d,x),onMouseLeave:ku(m,A),onTouchStart:ku(h,x)}]:[!1,g,{}]}function ku(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function U7({page:e,...t}){let n=Z9(),{router:r}=nA(),a=y.useMemo(()=>Lz(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?n?y.createElement(H7,{page:e,matches:a,...t}):y.createElement(F7,{page:e,matches:a,...t}):null}function q7(e){let{manifest:t,routeModules:n}=aA(),[r,a]=y.useState([]);return y.useEffect(()=>{let o=!1;return D7(e,t,n).then(l=>{o||a(l)}),()=>{o=!0}},[e,t,n]),r}function H7({page:e,matches:t,...n}){let r=qr(),{future:a}=aA(),{basename:o}=nA(),l=y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let c=Jz(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&&c.searchParams.set("_routes",d.join(",")),[c.pathname+c.search]},[o,a.unstable_trailingSlashAwareDataRequests,e,r,t]);return y.createElement(y.Fragment,null,l.map(c=>y.createElement("link",{key:c,rel:"prefetch",as:"fetch",href:c,...n})))}function F7({page:e,matches:t,...n}){let r=qr(),{future:a,manifest:o,routeModules:l}=aA(),{basename:c}=nA(),{loaderData:f,matches:d}=I7(),m=y.useMemo(()=>jC(e,t,d,o,r,"data"),[e,t,d,o,r]),h=y.useMemo(()=>jC(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 R;let j=o.routes[E.route.id];!j||!j.hasLoader||(!m.some(T=>T.route.id===E.route.id)&&E.route.id in f&&((R=l[E.route.id])!=null&&R.shouldRevalidate)||j.hasClientLoader?w=!0:S.add(E.route.id))}),S.size===0)return[];let O=Jz(e,c,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]},[c,a.unstable_trailingSlashAwareDataRequests,f,r,o,m,t,e,l]),x=y.useMemo(()=>k7(h,o),[h,o]),A=q7(h);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 V7(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var G7=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{G7&&(window.__reactRouterVersion="7.15.1")}catch{}function Y7({basename:e,children:t,useTransitions:n,window:r}){let a=y.useRef();a.current==null&&(a.current=S9({window:r,v5Compat:!0}));let o=a.current,[l,c]=y.useState({action:o.action,location:o.location}),f=y.useCallback(d=>{n===!1?c(d):y.startTransition(()=>c(d))},[n]);return y.useLayoutEffect(()=>o.listen(f),[o,f]),y.createElement(w7,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,useTransitions:n})}var e5=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dl=y.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:o,replace:l,mask:c,state:f,target:d,to:m,preventScrollReset:h,viewTransition:g,defaultShouldRevalidate:x,...A},S){let{basename:w,navigator:O,useTransitions:E}=y.useContext(Ur),j=typeof m=="string"&&e5.test(m),R=Hz(m,w);m=R.to;let T=r7(m,{relative:a}),C=qr(),N=null;if(c){let Y=Jm(c,[],C.mask?C.mask.pathname:"/",!0);w!=="/"&&(Y.pathname=Y.pathname==="/"?w:Ca([w,Y.pathname])),N=O.createHref(Y)}let[D,z,V]=B7(r,A),U=X7(m,{replace:l,mask:c,state:f,target:d,preventScrollReset:h,relative:a,viewTransition:g,defaultShouldRevalidate:x,useTransitions:E});function P(Y){t&&t(Y),Y.defaultPrevented||U(Y)}let B=!(R.isExternal||o),q=y.createElement("a",{...A,...V,href:(B?N:void 0)||R.absoluteURL||T,onClick:B?P:t,ref:V7(S,z),target:d,"data-discover":!j&&n==="render"?"true":void 0});return D&&!j?y.createElement(y.Fragment,null,q,y.createElement(U7,{page:T})):q});Dl.displayName="Link";var W7=y.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:o,to:l,viewTransition:c,children:f,...d},m){let h=td(l,{relative:d.relative}),g=qr(),x=y.useContext(ev),{navigator:A,basename:S}=y.useContext(Ur),w=x!=null&&nF(h)&&c===!0,O=A.encodeLocation?A.encodeLocation(h).pathname:h.pathname,E=g.pathname,j=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;n||(E=E.toLowerCase(),j=j?j.toLowerCase():null,O=O.toLowerCase()),j&&S&&(j=Di(j,S)||j);const R=O!=="/"&&O.endsWith("/")?O.length-1:O.length;let T=E===O||!a&&E.startsWith(O)&&E.charAt(R)==="/",C=j!=null&&(j===O||!a&&j.startsWith(O)&&j.charAt(O.length)==="/"),N={isActive:T,isPending:C,isTransitioning:w},D=T?t:void 0,z;typeof r=="function"?z=r(N):z=[r,T?"active":null,C?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let V=typeof o=="function"?o(N):o;return y.createElement(Dl,{...d,"aria-current":D,className:z,ref:m,style:V,to:l,viewTransition:c},typeof f=="function"?f(N):f)});W7.displayName="NavLink";var K7=y.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:o,method:l=yp,action:c,onSubmit:f,relative:d,preventScrollReset:m,viewTransition:h,defaultShouldRevalidate:g,...x},A)=>{let{useTransitions:S}=y.useContext(Ur),w=eF(),O=tF(c,{relative:d}),E=l.toLowerCase()==="get"?"get":"post",j=typeof c=="string"&&e5.test(c),R=T=>{if(f&&f(T),T.defaultPrevented)return;T.preventDefault();let C=T.nativeEvent.submitter,N=(C==null?void 0:C.getAttribute("formmethod"))||l,D=()=>w(C||T.currentTarget,{fetcherKey:t,method:N,navigate:n,replace:a,state:o,relative:d,preventScrollReset:m,viewTransition:h,defaultShouldRevalidate:g});S&&n!==!1?y.startTransition(()=>D()):D()};return y.createElement("form",{ref:A,method:E,action:O,onSubmit:r?f:R,...x,"data-discover":!j&&e==="render"?"true":void 0})});K7.displayName="Form";function Z7(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function t5(e){let t=y.useContext(Ac);return rn(t,Z7(e)),t}function X7(e,{target:t,replace:n,mask:r,state:a,preventScrollReset:o,relative:l,viewTransition:c,defaultShouldRevalidate:f,useTransitions:d}={}){let m=ka(),h=qr(),g=td(e,{relative:l});return y.useCallback(x=>{if(j7(x,t)){x.preventDefault();let A=n!==void 0?n:ff(h)===ff(g),S=()=>m(e,{replace:A,mask:r,state:a,preventScrollReset:o,relative:l,viewTransition:c,defaultShouldRevalidate:f});d?y.startTransition(()=>S()):S()}},[h,m,g,n,r,a,t,e,o,l,c,f,d])}function nd(e){fa(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(J1(e)),n=y.useRef(!1),r=qr(),a=y.useMemo(()=>T7(r.search,n.current?null:t.current),[r.search]),o=ka(),l=y.useCallback((c,f)=>{const d=J1(typeof c=="function"?c(new URLSearchParams(a)):c);n.current=!0,o("?"+d,f)},[o,a]);return[a,l]}var Q7=0,J7=()=>`__${String(++Q7)}__`;function eF(){let{router:e}=t5("useSubmit"),{basename:t}=y.useContext(Ur),n=v7(),r=e.fetch,a=e.navigate;return y.useCallback(async(o,l={})=>{let{action:c,method:f,encType:d,formData:m,body:h}=N7(o,t);if(l.navigate===!1){let g=l.fetcherKey||J7();await r(g,n,l.action||c,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:h,formMethod:l.method||f,formEncType:l.encType||d,flushSync:l.flushSync})}else await a(l.action||c,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:h,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 tF(e,{relative:t}={}){let{basename:n}=y.useContext(Ur),r=y.useContext(Da);rn(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),o={...td(e||".",{relative:t})},l=qr();if(e==null){o.search=l.search;let c=new URLSearchParams(o.search),f=c.getAll("index");if(f.some(m=>m==="")){c.delete("index"),f.filter(h=>h).forEach(h=>c.append("index",h));let m=c.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:Ca([n,o.pathname])),ff(o)}function nF(e,{relative:t}={}){let n=y.useContext(Gz);rn(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=t5("useViewTransitionState"),a=td(e,{relative:t});if(!n.isTransitioning)return!1;let o=Di(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=Di(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Np(a.pathname,l)!=null||Np(a.pathname,o)!=null}var rd=$z();const n5=Ht(rd);function rF(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const aF=e=>{switch(e){case"success":return sF;case"info":return cF;case"warning":return lF;case"error":return uF;default:return null}},iF=Array(12).fill(0),oF=({visible:e,className:t})=>L.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},L.createElement("div",{className:"sonner-spinner"},iF.map((n,r)=>L.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),sF=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),lF=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},L.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),cF=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),uF=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),fF=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},L.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),L.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),dF=()=>{const[e,t]=L.useState(document.hidden);return L.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let eS=1;class hF{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...a}=t,o=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:eS++,l=this.toasts.find(f=>f.id===o),c=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),l?this.toasts=this.toasts.map(f=>f.id===o?(this.publish({...f,...t,id:o,title:r}),{...f,...t,id:o,dismissible:c,title:r}):f):this.addToast({title:r,...a,dismissible:c,id:o}),o},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const a=Promise.resolve(t instanceof Function?t():t);let o=r!==void 0,l;const c=a.then(async d=>{if(l=["resolve",d],L.isValidElement(d))o=!1,this.create({id:r,type:"default",message:d});else if(mF(d)&&!d.ok){o=!1;const h=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,g=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,A=typeof h=="object"&&!L.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:g,...A})}else if(d instanceof Error){o=!1;const h=typeof n.error=="function"?await n.error(d):n.error,g=typeof n.description=="function"?await n.description(d):n.description,A=typeof h=="object"&&!L.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:g,...A})}else if(n.success!==void 0){o=!1;const h=typeof n.success=="function"?await n.success(d):n.success,g=typeof n.description=="function"?await n.description(d):n.description,A=typeof h=="object"&&!L.isValidElement(h)?h:{message:h};this.create({id:r,type:"success",description:g,...A})}}).catch(async d=>{if(l=["reject",d],n.error!==void 0){o=!1;const m=typeof n.error=="function"?await n.error(d):n.error,h=typeof n.description=="function"?await n.description(d):n.description,x=typeof m=="object"&&!L.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:h,...x})}}).finally(()=>{o&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),f=()=>new Promise((d,m)=>c.then(()=>l[0]==="reject"?m(l[1]):d(l[1])).catch(m));return typeof r!="string"&&typeof r!="number"?{unwrap:f}:Object.assign(r,{unwrap:f})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||eS++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const yr=new hF,pF=(e,t)=>{const n=(t==null?void 0:t.id)||eS++;return yr.addToast({title:e,...t,id:n}),n},mF=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",vF=pF,gF=()=>yr.toasts,yF=()=>yr.getActiveToasts(),_t=Object.assign(vF,{success:yr.success,info:yr.info,warning:yr.warning,error:yr.error,custom:yr.custom,message:yr.message,promise:yr.promise,dismiss:yr.dismiss,loading:yr.loading},{getHistory:gF,getToasts:yF});rF("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Wh(e){return e.label!==void 0}const bF=3,xF="24px",wF="16px",TC=4e3,SF=356,_F=14,AF=45,OF=200;function qa(...e){return e.filter(Boolean).join(" ")}function EF(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const jF=e=>{var t,n,r,a,o,l,c,f,d;const{invert:m,toast:h,unstyled:g,interacting:x,setHeights:A,visibleToasts:S,heights:w,index:O,toasts:E,expanded:j,removeToast:R,defaultRichColors:T,closeButton:C,style:N,cancelButtonStyle:D,actionButtonStyle:z,className:V="",descriptionClassName:U="",duration:P,position:B,gap:q,expandByDefault:Y,classNames:$,icons:G,closeButtonAriaLabel:F="Close toast"}=e,[K,ne]=L.useState(null),[I,Z]=L.useState(null),[Q,fe]=L.useState(!1),[le,Se]=L.useState(!1),[ve,xe]=L.useState(!1),[ce,Ae]=L.useState(!1),[Oe,oe]=L.useState(!1),[qe,De]=L.useState(0),[Je,Ye]=L.useState(0),at=L.useRef(h.duration||P||TC),jt=L.useRef(null),dt=L.useRef(null),gn=O===0,on=O+1<=S,Tt=h.type,Ft=h.dismissible!==!1,H=h.className||"",ee=h.descriptionClassName||"",ae=L.useMemo(()=>w.findIndex(me=>me.toastId===h.id)||0,[w,h.id]),Re=L.useMemo(()=>{var me;return(me=h.closeButton)!=null?me:C},[h.closeButton,C]),Ce=L.useMemo(()=>h.duration||P||TC,[h.duration,P]),je=L.useRef(0),Ee=L.useRef(0),We=L.useRef(0),Ge=L.useRef(null),[Ot,Ct]=B.split("-"),Rt=L.useMemo(()=>w.reduce((me,He,tt)=>tt>=ae?me:me+He.height,0),[w,ae]),Vt=dF(),Hr=h.invert||m,Fr=Tt==="loading";Ee.current=L.useMemo(()=>ae*q+Rt,[ae,Rt]),L.useEffect(()=>{at.current=Ce},[Ce]),L.useEffect(()=>{fe(!0)},[]),L.useEffect(()=>{const me=dt.current;if(me){const He=me.getBoundingClientRect().height;return Ye(He),A(tt=>[{toastId:h.id,height:He,position:h.position},...tt]),()=>A(tt=>tt.filter(Be=>Be.toastId!==h.id))}},[A,h.id]),L.useLayoutEffect(()=>{if(!Q)return;const me=dt.current,He=me.style.height;me.style.height="auto";const tt=me.getBoundingClientRect().height;me.style.height=He,Ye(tt),A(Be=>Be.find(te=>te.toastId===h.id)?Be.map(te=>te.toastId===h.id?{...te,height:tt}:te):[{toastId:h.id,height:tt,position:h.position},...Be])},[Q,h.title,h.description,A,h.id,h.jsx,h.action,h.cancel]);const Dn=L.useCallback(()=>{Se(!0),De(Ee.current),A(me=>me.filter(He=>He.toastId!==h.id)),setTimeout(()=>{R(h)},OF)},[h,R,A,Ee]);L.useEffect(()=>{if(h.promise&&Tt==="loading"||h.duration===1/0||h.type==="loading")return;let me;return j||x||Vt?(()=>{if(We.current<je.current){const Be=new Date().getTime()-je.current;at.current=at.current-Be}We.current=new Date().getTime()})():(()=>{at.current!==1/0&&(je.current=new Date().getTime(),me=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),Dn()},at.current))})(),()=>clearTimeout(me)},[j,x,h,Tt,Vt,Dn]),L.useEffect(()=>{h.delete&&(Dn(),h.onDismiss==null||h.onDismiss.call(h,h))},[Dn,h.delete]);function Bn(){var me;if(G!=null&&G.loading){var He;return L.createElement("div",{className:qa($==null?void 0:$.loader,h==null||(He=h.classNames)==null?void 0:He.loader,"sonner-loader"),"data-visible":Tt==="loading"},G.loading)}return L.createElement(oF,{className:qa($==null?void 0:$.loader,h==null||(me=h.classNames)==null?void 0:me.loader),visible:Tt==="loading"})}const Zn=h.icon||(G==null?void 0:G[Tt])||aF(Tt);var Te,Ke;return L.createElement("li",{tabIndex:0,ref:dt,className:qa(V,H,$==null?void 0:$.toast,h==null||(t=h.classNames)==null?void 0:t.toast,$==null?void 0:$.default,$==null?void 0:$[Tt],h==null||(n=h.classNames)==null?void 0:n[Tt]),"data-sonner-toast":"","data-rich-colors":(Te=h.richColors)!=null?Te:T,"data-styled":!(h.jsx||h.unstyled||g),"data-mounted":Q,"data-promise":!!h.promise,"data-swiped":Oe,"data-removed":le,"data-visible":on,"data-y-position":Ot,"data-x-position":Ct,"data-index":O,"data-front":gn,"data-swiping":ve,"data-dismissible":Ft,"data-type":Tt,"data-invert":Hr,"data-swipe-out":ce,"data-swipe-direction":I,"data-expanded":!!(j||Y&&Q),"data-testid":h.testId,style:{"--index":O,"--toasts-before":O,"--z-index":E.length-O,"--offset":`${le?qe:Ee.current}px`,"--initial-height":Y?"auto":`${Je}px`,...N,...h.style},onDragEnd:()=>{xe(!1),ne(null),Ge.current=null},onPointerDown:me=>{me.button!==2&&(Fr||!Ft||(jt.current=new Date,De(Ee.current),me.target.setPointerCapture(me.pointerId),me.target.tagName!=="BUTTON"&&(xe(!0),Ge.current={x:me.clientX,y:me.clientY})))},onPointerUp:()=>{var me,He,tt;if(ce||!Ft)return;Ge.current=null;const Be=Number(((me=dt.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),hn=Number(((He=dt.current)==null?void 0:He.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),te=new Date().getTime()-((tt=jt.current)==null?void 0:tt.getTime()),_e=K==="x"?Be:hn,de=Math.abs(_e)/te;if(Math.abs(_e)>=AF||de>.11){De(Ee.current),h.onDismiss==null||h.onDismiss.call(h,h),Z(K==="x"?Be>0?"right":"left":hn>0?"down":"up"),Dn(),Ae(!0);return}else{var ze,Ie;(ze=dt.current)==null||ze.style.setProperty("--swipe-amount-x","0px"),(Ie=dt.current)==null||Ie.style.setProperty("--swipe-amount-y","0px")}oe(!1),xe(!1),ne(null)},onPointerMove:me=>{var He,tt,Be;if(!Ge.current||!Ft||((He=window.getSelection())==null?void 0:He.toString().length)>0)return;const te=me.clientY-Ge.current.y,_e=me.clientX-Ge.current.x;var de;const ze=(de=e.swipeDirections)!=null?de:EF(B);!K&&(Math.abs(_e)>1||Math.abs(te)>1)&&ne(Math.abs(_e)>Math.abs(te)?"x":"y");let Ie={x:0,y:0};const Me=Ve=>1/(1.5+Math.abs(Ve)/20);if(K==="y"){if(ze.includes("top")||ze.includes("bottom"))if(ze.includes("top")&&te<0||ze.includes("bottom")&&te>0)Ie.y=te;else{const Ve=te*Me(te);Ie.y=Math.abs(Ve)<Math.abs(te)?Ve:te}}else if(K==="x"&&(ze.includes("left")||ze.includes("right")))if(ze.includes("left")&&_e<0||ze.includes("right")&&_e>0)Ie.x=_e;else{const Ve=_e*Me(_e);Ie.x=Math.abs(Ve)<Math.abs(_e)?Ve:_e}(Math.abs(Ie.x)>0||Math.abs(Ie.y)>0)&&oe(!0),(tt=dt.current)==null||tt.style.setProperty("--swipe-amount-x",`${Ie.x}px`),(Be=dt.current)==null||Be.style.setProperty("--swipe-amount-y",`${Ie.y}px`)}},Re&&!h.jsx&&Tt!=="loading"?L.createElement("button",{"aria-label":F,"data-disabled":Fr,"data-close-button":!0,onClick:Fr||!Ft?()=>{}:()=>{Dn(),h.onDismiss==null||h.onDismiss.call(h,h)},className:qa($==null?void 0:$.closeButton,h==null||(r=h.classNames)==null?void 0:r.closeButton)},(Ke=G==null?void 0:G.close)!=null?Ke:fF):null,(Tt||h.icon||h.promise)&&h.icon!==null&&((G==null?void 0:G[Tt])!==null||h.icon)?L.createElement("div",{"data-icon":"",className:qa($==null?void 0:$.icon,h==null||(a=h.classNames)==null?void 0:a.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Bn():null,h.type!=="loading"?Zn:null):null,L.createElement("div",{"data-content":"",className:qa($==null?void 0:$.content,h==null||(o=h.classNames)==null?void 0:o.content)},L.createElement("div",{"data-title":"",className:qa($==null?void 0:$.title,h==null||(l=h.classNames)==null?void 0:l.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?L.createElement("div",{"data-description":"",className:qa(U,ee,$==null?void 0:$.description,h==null||(c=h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),L.isValidElement(h.cancel)?h.cancel:h.cancel&&Wh(h.cancel)?L.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||D,onClick:me=>{Wh(h.cancel)&&Ft&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,me),Dn())},className:qa($==null?void 0:$.cancelButton,h==null||(f=h.classNames)==null?void 0:f.cancelButton)},h.cancel.label):null,L.isValidElement(h.action)?h.action:h.action&&Wh(h.action)?L.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||z,onClick:me=>{Wh(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,me),!me.defaultPrevented&&Dn())},className:qa($==null?void 0:$.actionButton,h==null||(d=h.classNames)==null?void 0:d.actionButton)},h.action.label):null)};function CC(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function TF(e,t){const n={};return[e,t].forEach((r,a)=>{const o=a===1,l=o?"--mobile-offset":"--offset",c=o?wF:xF;function f(d){["top","right","bottom","left"].forEach(m=>{n[`${l}-${m}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?f(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${l}-${d}`]=c:n[`${l}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):f(c)}),n}const CF=L.forwardRef(function(t,n){const{id:r,invert:a,position:o="bottom-right",hotkey:l=["altKey","KeyT"],expand:c,closeButton:f,className:d,offset:m,mobileOffset:h,theme:g="light",richColors:x,duration:A,style:S,visibleToasts:w=bF,toastOptions:O,dir:E=CC(),gap:j=_F,icons:R,containerAriaLabel:T="Notifications"}=t,[C,N]=L.useState([]),D=L.useMemo(()=>r?C.filter(Q=>Q.toasterId===r):C.filter(Q=>!Q.toasterId),[C,r]),z=L.useMemo(()=>Array.from(new Set([o].concat(D.filter(Q=>Q.position).map(Q=>Q.position)))),[D,o]),[V,U]=L.useState([]),[P,B]=L.useState(!1),[q,Y]=L.useState(!1),[$,G]=L.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),F=L.useRef(null),K=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),ne=L.useRef(null),I=L.useRef(!1),Z=L.useCallback(Q=>{N(fe=>{var le;return(le=fe.find(Se=>Se.id===Q.id))!=null&&le.delete||yr.dismiss(Q.id),fe.filter(({id:Se})=>Se!==Q.id)})},[]);return L.useEffect(()=>yr.subscribe(Q=>{if(Q.dismiss){requestAnimationFrame(()=>{N(fe=>fe.map(le=>le.id===Q.id?{...le,delete:!0}:le))});return}setTimeout(()=>{n5.flushSync(()=>{N(fe=>{const le=fe.findIndex(Se=>Se.id===Q.id);return le!==-1?[...fe.slice(0,le),{...fe[le],...Q},...fe.slice(le+1)]:[Q,...fe]})})})}),[C]),L.useEffect(()=>{if(g!=="system"){G(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?G("dark"):G("light")),typeof window>"u")return;const Q=window.matchMedia("(prefers-color-scheme: dark)");try{Q.addEventListener("change",({matches:fe})=>{G(fe?"dark":"light")})}catch{Q.addListener(({matches:le})=>{try{G(le?"dark":"light")}catch(Se){console.error(Se)}})}},[g]),L.useEffect(()=>{C.length<=1&&B(!1)},[C]),L.useEffect(()=>{const Q=fe=>{var le;if(l.every(xe=>fe[xe]||fe.code===xe)){var ve;B(!0),(ve=F.current)==null||ve.focus()}fe.code==="Escape"&&(document.activeElement===F.current||(le=F.current)!=null&&le.contains(document.activeElement))&&B(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[l]),L.useEffect(()=>{if(F.current)return()=>{ne.current&&(ne.current.focus({preventScroll:!0}),ne.current=null,I.current=!1)}},[F.current]),L.createElement("section",{ref:n,"aria-label":`${T} ${K}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},z.map((Q,fe)=>{var le;const[Se,ve]=Q.split("-");return D.length?L.createElement("ol",{key:Q,dir:E==="auto"?CC():E,tabIndex:-1,ref:F,className:d,"data-sonner-toaster":!0,"data-sonner-theme":$,"data-y-position":Se,"data-x-position":ve,style:{"--front-toast-height":`${((le=V[0])==null?void 0:le.height)||0}px`,"--width":`${SF}px`,"--gap":`${j}px`,...S,...TF(m,h)},onBlur:xe=>{I.current&&!xe.currentTarget.contains(xe.relatedTarget)&&(I.current=!1,ne.current&&(ne.current.focus({preventScroll:!0}),ne.current=null))},onFocus:xe=>{xe.target instanceof HTMLElement&&xe.target.dataset.dismissible==="false"||I.current||(I.current=!0,ne.current=xe.relatedTarget)},onMouseEnter:()=>B(!0),onMouseMove:()=>B(!0),onMouseLeave:()=>{q||B(!1)},onDragEnd:()=>B(!1),onPointerDown:xe=>{xe.target instanceof HTMLElement&&xe.target.dataset.dismissible==="false"||Y(!0)},onPointerUp:()=>Y(!1)},D.filter(xe=>!xe.position&&fe===0||xe.position===Q).map((xe,ce)=>{var Ae,Oe;return L.createElement(jF,{key:xe.id,icons:R,index:ce,toast:xe,defaultRichColors:x,duration:(Ae=O==null?void 0:O.duration)!=null?Ae:A,className:O==null?void 0:O.className,descriptionClassName:O==null?void 0:O.descriptionClassName,invert:a,visibleToasts:w,closeButton:(Oe=O==null?void 0:O.closeButton)!=null?Oe:f,interacting:q,position:Q,style:O==null?void 0:O.style,unstyled:O==null?void 0:O.unstyled,classNames:O==null?void 0:O.classNames,cancelButtonStyle:O==null?void 0:O.cancelButtonStyle,actionButtonStyle:O==null?void 0:O.actionButtonStyle,closeButtonAriaLabel:O==null?void 0:O.closeButtonAriaLabel,removeToast:Z,toasts:D.filter(oe=>oe.position==xe.position),heights:V.filter(oe=>oe.position==xe.position),setHeights:U,expandByDefault:c,gap:j,expanded:P,swipeDirections:t.swipeDirections})})):null}))});function RC(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ad(...e){return t=>{let n=!1;const r=e.map(a=>{const o=RC(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():RC(e[a],null)}}}}function ft(...e){return y.useCallback(ad(...e),e)}var RF=Symbol.for("react.lazy"),Pp=K_[" use ".trim().toString()];function NF(e){return typeof e=="object"&&e!==null&&"then"in e}function r5(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===RF&&"_payload"in e&&NF(e._payload)}function a5(e){const t=MF(e),n=y.forwardRef((r,a)=>{let{children:o,...l}=r;r5(o)&&typeof Pp=="function"&&(o=Pp(o._payload));const c=y.Children.toArray(o),f=c.find(DF);if(f){const d=f.props.children,m=c.map(h=>h===f?y.Children.count(d)>1?y.Children.only(null):y.isValidElement(d)?d.props.children:null:h);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 ks=a5("Slot");function MF(e){const t=y.forwardRef((n,r)=>{let{children:a,...o}=n;if(r5(a)&&typeof Pp=="function"&&(a=Pp(a._payload)),y.isValidElement(a)){const l=$F(a),c=kF(o,a.props);return a.type!==y.Fragment&&(c.ref=r?ad(r,l):l),y.cloneElement(a,c)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var PF=Symbol("radix.slottable");function DF(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===PF}function kF(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]=(...c)=>{const f=o(...c);return a(...c),f}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function $F(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 i5(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=i5(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function xt(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=i5(e))&&(r&&(r+=" "),r+=t);return r}const NC=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,MC=xt,Ec=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return MC(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],h=o==null?void 0:o[d];if(m===null)return null;const g=NC(m)||NC(h);return a[d][g]}),c=n&&Object.entries(n).reduce((d,m)=>{let[h,g]=m;return g===void 0||(d[h]=g),d},{}),f=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,m)=>{let{class:h,className:g,...x}=m;return Object.entries(x).every(A=>{let[S,w]=A;return Array.isArray(w)?w.includes({...o,...c}[S]):{...o,...c}[S]===w})?[...d,h,g]:d},[]);return MC(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 zF=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o5=(...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 LF={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 IF=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:o,iconNode:l,...c},f)=>y.createElement("svg",{ref:f,...LF,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:o5("lucide",a),...c},[...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 rt=(e,t)=>{const n=y.forwardRef(({className:r,...a},o)=>y.createElement(IF,{ref:o,iconNode:t,className:o5(`lucide-${zF(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 BF=rt("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 UF=rt("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 qF=rt("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 HF=rt("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 s5=rt("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 iA=rt("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 oA=rt("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 FF=rt("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 VF=rt("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 GF=rt("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 YF=rt("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 l5=rt("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 WF=rt("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 KF=rt("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 ZF=rt("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 XF=rt("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 QF=rt("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 c5=rt("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 u5=rt("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 Dp=rt("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 JF=rt("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 eV=rt("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 f5=rt("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 tV=rt("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 nV=rt("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 rV=rt("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 tS=rt("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 sA=rt("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 d5=rt("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 aV=rt("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 iV=rt("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 oV=rt("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 h5=rt("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 p5=rt("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 sV=rt("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 lV=rt("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 cV=rt("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 uV=rt("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 fV=rt("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 dV=rt("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 hV=rt("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 pV=rt("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 mV=rt("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 m5=rt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),kb=768;function vV(){const[e,t]=y.useState(void 0);return y.useEffect(()=>{const n=window.matchMedia(`(max-width: ${kb-1}px)`),r=()=>{t(window.innerWidth<kb)};return n.addEventListener("change",r),t(window.innerWidth<kb),()=>n.removeEventListener("change",r)},[]),!!e}const lA="-",gV=e=>{const t=bV(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const c=l.split(lA);return c[0]===""&&c.length!==1&&c.shift(),v5(c,t)||yV(l)},getConflictingClassGroupIds:(l,c)=>{const f=n[l]||[];return c&&r[l]?[...f,...r[l]]:f}}},v5=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?v5(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;const o=e.join(lA);return(l=t.validators.find(({validator:c})=>c(o)))==null?void 0:l.classGroupId},PC=/^\[(.+)\]$/,yV=e=>{if(PC.test(e)){const t=PC.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},bV=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return wV(Object.entries(e.classGroups),n).forEach(([o,l])=>{nS(l,r,o,t)}),r},nS=(e,t,n,r)=>{e.forEach(a=>{if(typeof a=="string"){const o=a===""?t:DC(t,a);o.classGroupId=n;return}if(typeof a=="function"){if(xV(a)){nS(a(r),t,n,r);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([o,l])=>{nS(l,DC(t,o),n,r)})})},DC=(e,t)=>{let n=e;return t.split(lA).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},xV=e=>e.isThemeGetter,wV=(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,c])=>[t+l,c])):o);return[n,a]}):e,SV=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)}}},g5="!",_V=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,a=t[0],o=t.length,l=c=>{const f=[];let d=0,m=0,h;for(let w=0;w<c.length;w++){let O=c[w];if(d===0){if(O===a&&(r||c.slice(w,w+o)===t)){f.push(c.slice(m,w)),m=w+o;continue}if(O==="/"){h=w;continue}}O==="["?d++:O==="]"&&d--}const g=f.length===0?c:c.substring(m),x=g.startsWith(g5),A=x?g.substring(1):g,S=h&&h>m?h-m:void 0;return{modifiers:f,hasImportantModifier:x,baseClassName:A,maybePostfixModifierPosition:S}};return n?c=>n({className:c,parseClassName:l}):l},AV=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},OV=e=>({cache:SV(e.cacheSize),parseClassName:_V(e),...gV(e)}),EV=/\s+/,jV=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a}=t,o=[],l=e.trim().split(EV);let c="";for(let f=l.length-1;f>=0;f-=1){const d=l[f],{modifiers:m,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:x}=n(d);let A=!!x,S=r(A?g.substring(0,x):g);if(!S){if(!A){c=d+(c.length>0?" "+c:c);continue}if(S=r(g),!S){c=d+(c.length>0?" "+c:c);continue}A=!1}const w=AV(m).join(":"),O=h?w+g5:w,E=O+S;if(o.includes(E))continue;o.push(E);const j=a(S,A);for(let R=0;R<j.length;++R){const T=j[R];o.push(O+T)}c=d+(c.length>0?" "+c:c)}return c};function TV(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=y5(t))&&(r&&(r+=" "),r+=n);return r}const y5=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=y5(e[r]))&&(n&&(n+=" "),n+=t);return n};function CV(e,...t){let n,r,a,o=l;function l(f){const d=t.reduce((m,h)=>h(m),e());return n=OV(d),r=n.cache.get,a=n.cache.set,o=c,c(f)}function c(f){const d=r(f);if(d)return d;const m=jV(f,n);return a(f,m),m}return function(){return o(TV.apply(null,arguments))}}const Xt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},b5=/^\[(?:([a-z-]+):)?(.+)\]$/i,RV=/^\d+\/\d+$/,NV=new Set(["px","full","screen"]),MV=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,PV=/\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$/,DV=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kV=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$V=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ai=e=>Il(e)||NV.has(e)||RV.test(e),go=e=>jc(e,"length",FV),Il=e=>!!e&&!Number.isNaN(Number(e)),$b=e=>jc(e,"number",Il),$u=e=>!!e&&Number.isInteger(Number(e)),zV=e=>e.endsWith("%")&&Il(e.slice(0,-1)),st=e=>b5.test(e),yo=e=>MV.test(e),LV=new Set(["length","size","percentage"]),IV=e=>jc(e,LV,x5),BV=e=>jc(e,"position",x5),UV=new Set(["image","url"]),qV=e=>jc(e,UV,GV),HV=e=>jc(e,"",VV),zu=()=>!0,jc=(e,t,n)=>{const r=b5.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},FV=e=>PV.test(e)&&!DV.test(e),x5=()=>!1,VV=e=>kV.test(e),GV=e=>$V.test(e),YV=()=>{const e=Xt("colors"),t=Xt("spacing"),n=Xt("blur"),r=Xt("brightness"),a=Xt("borderColor"),o=Xt("borderRadius"),l=Xt("borderSpacing"),c=Xt("borderWidth"),f=Xt("contrast"),d=Xt("grayscale"),m=Xt("hueRotate"),h=Xt("invert"),g=Xt("gap"),x=Xt("gradientColorStops"),A=Xt("gradientColorStopPositions"),S=Xt("inset"),w=Xt("margin"),O=Xt("opacity"),E=Xt("padding"),j=Xt("saturate"),R=Xt("scale"),T=Xt("sepia"),C=Xt("skew"),N=Xt("space"),D=Xt("translate"),z=()=>["auto","contain","none"],V=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",st,t],P=()=>[st,t],B=()=>["",Ai,go],q=()=>["auto",Il,st],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",st],ne=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>[Il,st];return{cacheSize:500,separator:":",theme:{colors:[zu],spacing:[Ai,go],blur:["none","",yo,st],brightness:I(),borderColor:[e],borderRadius:["none","","full",yo,st],borderSpacing:P(),borderWidth:B(),contrast:I(),grayscale:K(),hueRotate:I(),invert:K(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[zV,go],inset:U(),margin:U(),opacity:I(),padding:P(),saturate:I(),scale:I(),sepia:K(),skew:I(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",st]}],container:["container"],columns:[{columns:[yo]}],"break-after":[{"break-after":ne()}],"break-before":[{"break-before":ne()}],"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:[...Y(),st]}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],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",$u,st]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",st]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",$u,st]}],"grid-cols":[{"grid-cols":[zu]}],"col-start-end":[{col:["auto",{span:["full",$u,st]},st]}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":[zu]}],"row-start-end":[{row:["auto",{span:[$u,st]},st]}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",st]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",st]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"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",st,t]}],"min-w":[{"min-w":[st,t,"min","max","fit"]}],"max-w":[{"max-w":[st,t,"none","full","min","max","fit","prose",{screen:[yo]},yo]}],h:[{h:[st,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[st,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[st,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[st,t,"auto","min","max","fit"]}],"font-size":[{text:["base",yo,go]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",$b]}],"font-family":[{font:[zu]}],"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",st]}],"line-clamp":[{"line-clamp":["none",Il,$b]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ai,st]}],"list-image":[{"list-image":["none",st]}],"list-style-type":[{list:["none","disc","decimal",st]}],"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:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ai,go]}],"underline-offset":[{"underline-offset":["auto",Ai,st]}],"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:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",st]}],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",st]}],"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:[...Y(),BV]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",IV]}],"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:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[O]}],"border-style":[{border:[...$(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[O]}],"divide-style":[{divide:$()}],"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:["",...$()]}],"outline-offset":[{"outline-offset":[Ai,st]}],"outline-w":[{outline:[Ai,go]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[O]}],"ring-offset-w":[{"ring-offset":[Ai,go]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",yo,HV]}],"shadow-color":[{shadow:[zu]}],opacity:[{opacity:[O]}],"mix-blend":[{"mix-blend":[...G(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",yo,st]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[h]}],saturate:[{saturate:[j]}],sepia:[{sepia:[T]}],"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":[h]}],"backdrop-opacity":[{"backdrop-opacity":[O]}],"backdrop-saturate":[{"backdrop-saturate":[j]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"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",st]}],duration:[{duration:I()}],ease:[{ease:["linear","in","out","in-out",st]}],delay:[{delay:I()}],animate:[{animate:["none","spin","ping","pulse","bounce",st]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[$u,st]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",st]}],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",st]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",st]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ai,go,$b]}],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"]}}},WV=CV(YV);function be(...e){return WV(xt(e))}const nv=Ec("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?ks:"button";return v.jsx(l,{className:be(nv({variant:t,size:n,className:e})),ref:o,...a})});ct.displayName="Button";const tn=y.forwardRef(({className:e,type:t,...n},r)=>v.jsx("input",{type:t,className:be("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}));tn.displayName="Input";var KV=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],w5=KV.reduce((e,t)=>{const n=a5(`Primitive.${t}`),r=y.forwardRef((a,o)=>{const{asChild:l,...c}=a,f=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(f,{...c,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),ZV="Separator",kC="horizontal",XV=["horizontal","vertical"],S5=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=kC,...a}=e,o=QV(r)?r:kC,c=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return v.jsx(w5.div,{"data-orientation":o,...c,...a,ref:t})});S5.displayName=ZV;function QV(e){return XV.includes(e)}var _5=S5;const Ja=y.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},a)=>v.jsx(_5,{ref:a,decorative:n,orientation:t,className:be("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Ja.displayName=_5.displayName;function ke(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 JV(e,t){const n=y.createContext(t),r=o=>{const{children:l,...c}=o,f=y.useMemo(()=>c,Object.values(c));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 ha(e,t=[]){let n=[];function r(o,l){const c=y.createContext(l),f=n.length;n=[...n,l];const d=h=>{var O;const{scope:g,children:x,...A}=h,S=((O=g==null?void 0:g[e])==null?void 0:O[f])||c,w=y.useMemo(()=>A,Object.values(A));return v.jsx(S.Provider,{value:w,children:x})};d.displayName=o+"Provider";function m(h,g){var S;const x=((S=g==null?void 0:g[e])==null?void 0:S[f])||c,A=y.useContext(x);if(A)return A;if(l!==void 0)return l;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[d,m]}const a=()=>{const o=n.map(l=>y.createContext(l));return function(c){const f=(c==null?void 0:c[e])||o;return y.useMemo(()=>({[`__scope${e}`]:{...c,[e]:f}}),[c,f])}};return a.scopeName=e,[r,eG(a,...t)]}function eG(...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((c,{useScope:f,scopeName:d})=>{const h=f(o)[`__scope${d}`];return{...c,...h}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var Wn=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},tG=K_[" useId ".trim().toString()]||(()=>{}),nG=0;function Ra(e){const[t,n]=y.useState(tG());return Wn(()=>{n(r=>r??String(nG++))},[e]),e||(t?`radix-${t}`:"")}var rG=K_[" useInsertionEffect ".trim().toString()]||Wn;function To({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,o,l]=aG({defaultProp:t,onChange:n}),c=e!==void 0,f=c?e:a;{const m=y.useRef(e!==void 0);y.useEffect(()=>{const h=m.current;h!==c&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${c?"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=c},[c,r])}const d=y.useCallback(m=>{var h;if(c){const g=iG(m)?m(e):m;g!==e&&((h=l.current)==null||h.call(l,g))}else o(m)},[c,e,o,l]);return[f,d]}function aG({defaultProp:e,onChange:t}){const[n,r]=y.useState(e),a=y.useRef(n),o=y.useRef(t);return rG(()=>{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 iG(e){return typeof e=="function"}function Kl(e){const t=oG(e),n=y.forwardRef((r,a)=>{const{children:o,...l}=r,c=y.Children.toArray(o),f=c.find(sG);if(f){const d=f.props.children,m=c.map(h=>h===f?y.Children.count(d)>1?y.Children.only(null):y.isValidElement(d)?d.props.children:null:h);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 oG(e){const t=y.forwardRef((n,r)=>{const{children:a,...o}=n;if(y.isValidElement(a)){const l=cG(a),c=lG(o,a.props);return a.type!==y.Fragment&&(c.ref=r?ad(r,l):l),y.cloneElement(a,c)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var A5=Symbol("radix.slottable");function O5(e){const t=({children:n})=>v.jsx(v.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=A5,t}function sG(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===A5}function lG(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]=(...c)=>{const f=o(...c);return a(...c),f}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function cG(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 uG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],et=uG.reduce((e,t)=>{const n=Kl(`Primitive.${t}`),r=y.forwardRef((a,o)=>{const{asChild:l,...c}=a,f=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(f,{...c,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function E5(e,t){e&&rd.flushSync(()=>e.dispatchEvent(t))}function Gn(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 fG(e,t=globalThis==null?void 0:globalThis.document){const n=Gn(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 dG="DismissableLayer",rS="dismissableLayer.update",hG="dismissableLayer.pointerDownOutside",pG="dismissableLayer.focusOutside",$C,j5=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),id=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:l,onDismiss:c,...f}=e,d=y.useContext(j5),[m,h]=y.useState(null),g=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=y.useState({}),A=ft(t,N=>h(N)),S=Array.from(d.layers),[w]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),O=S.indexOf(w),E=m?S.indexOf(m):-1,j=d.layersWithOutsidePointerEventsDisabled.size>0,R=E>=O,T=gG(N=>{const D=N.target,z=[...d.branches].some(V=>V.contains(D));!R||z||(a==null||a(N),l==null||l(N),N.defaultPrevented||c==null||c())},g),C=yG(N=>{const D=N.target;[...d.branches].some(V=>V.contains(D))||(o==null||o(N),l==null||l(N),N.defaultPrevented||c==null||c())},g);return fG(N=>{E===d.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&c&&(N.preventDefault(),c()))},g),y.useEffect(()=>{if(m)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&($C=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(m)),d.layers.add(m),zC(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=$C)}},[m,g,n,d]),y.useEffect(()=>()=>{m&&(d.layers.delete(m),d.layersWithOutsidePointerEventsDisabled.delete(m),zC())},[m,d]),y.useEffect(()=>{const N=()=>x({});return document.addEventListener(rS,N),()=>document.removeEventListener(rS,N)},[]),v.jsx(et.div,{...f,ref:A,style:{pointerEvents:j?R?"auto":"none":void 0,...e.style},onFocusCapture:ke(e.onFocusCapture,C.onFocusCapture),onBlurCapture:ke(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:ke(e.onPointerDownCapture,T.onPointerDownCapture)})});id.displayName=dG;var mG="DismissableLayerBranch",vG=y.forwardRef((e,t)=>{const n=y.useContext(j5),r=y.useRef(null),a=ft(t,r);return y.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),v.jsx(et.div,{...e,ref:a})});vG.displayName=mG;function gG(e,t=globalThis==null?void 0:globalThis.document){const n=Gn(e),r=y.useRef(!1),a=y.useRef(()=>{});return y.useEffect(()=>{const o=c=>{if(c.target&&!r.current){let f=function(){T5(hG,n,d,{discrete:!0})};const d={originalEvent:c};c.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 yG(e,t=globalThis==null?void 0:globalThis.document){const n=Gn(e),r=y.useRef(!1);return y.useEffect(()=>{const a=o=>{o.target&&!r.current&&T5(pG,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 zC(){const e=new CustomEvent(rS);document.dispatchEvent(e)}function T5(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?E5(a,o):a.dispatchEvent(o)}var zb="focusScope.autoFocusOnMount",Lb="focusScope.autoFocusOnUnmount",LC={bubbles:!1,cancelable:!0},bG="FocusScope",rv=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...l}=e,[c,f]=y.useState(null),d=Gn(a),m=Gn(o),h=y.useRef(null),g=ft(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(j){if(x.paused||!c)return;const R=j.target;c.contains(R)?h.current=R:bo(h.current,{select:!0})},w=function(j){if(x.paused||!c)return;const R=j.relatedTarget;R!==null&&(c.contains(R)||bo(h.current,{select:!0}))},O=function(j){if(document.activeElement===document.body)for(const T of j)T.removedNodes.length>0&&bo(c)};document.addEventListener("focusin",S),document.addEventListener("focusout",w);const E=new MutationObserver(O);return c&&E.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",w),E.disconnect()}}},[r,c,x.paused]),y.useEffect(()=>{if(c){BC.add(x);const S=document.activeElement;if(!c.contains(S)){const O=new CustomEvent(zb,LC);c.addEventListener(zb,d),c.dispatchEvent(O),O.defaultPrevented||(xG(OG(C5(c)),{select:!0}),document.activeElement===S&&bo(c))}return()=>{c.removeEventListener(zb,d),setTimeout(()=>{const O=new CustomEvent(Lb,LC);c.addEventListener(Lb,m),c.dispatchEvent(O),O.defaultPrevented||bo(S??document.body,{select:!0}),c.removeEventListener(Lb,m),BC.remove(x)},0)}}},[c,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,[j,R]=wG(E);j&&R?!S.shiftKey&&O===R?(S.preventDefault(),n&&bo(j,{select:!0})):S.shiftKey&&O===j&&(S.preventDefault(),n&&bo(R,{select:!0})):O===E&&S.preventDefault()}},[n,r,x.paused]);return v.jsx(et.div,{tabIndex:-1,...l,ref:g,onKeyDown:A})});rv.displayName=bG;function xG(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(bo(r,{select:t}),document.activeElement!==n)return}function wG(e){const t=C5(e),n=IC(t,e),r=IC(t.reverse(),e);return[n,r]}function C5(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 IC(e,t){for(const n of e)if(!SG(n,{upTo:t}))return n}function SG(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 _G(e){return e instanceof HTMLInputElement&&"select"in e}function bo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&_G(e)&&t&&e.select()}}var BC=AG();function AG(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=UC(e,t),e.unshift(t)},remove(t){var n;e=UC(e,t),(n=e[0])==null||n.resume()}}}function UC(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function OG(e){return e.filter(t=>t.tagName!=="A")}var EG="Portal",od=y.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[a,o]=y.useState(!1);Wn(()=>o(!0),[]);const l=n||a&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return l?n5.createPortal(v.jsx(et.div,{...r,ref:t}),l):null});od.displayName=EG;function jG(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var cr=e=>{const{present:t,children:n}=e,r=TG(t),a=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=ft(r.ref,CG(a));return typeof n=="function"||r.isPresent?y.cloneElement(a,{ref:o}):null};cr.displayName="Presence";function TG(e){const[t,n]=y.useState(),r=y.useRef(null),a=y.useRef(e),o=y.useRef("none"),l=e?"mounted":"unmounted",[c,f]=jG(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const d=Kh(r.current);o.current=c==="mounted"?d:"none"},[c]),Wn(()=>{const d=r.current,m=a.current;if(m!==e){const g=o.current,x=Kh(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]),Wn(()=>{if(t){let d;const m=t.ownerDocument.defaultView??window,h=x=>{const S=Kh(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=Kh(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{m.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:y.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function Kh(e){return(e==null?void 0:e.animationName)||"none"}function CG(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 Ib=0;function cA(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??qC()),document.body.insertAdjacentElement("beforeend",e[1]??qC()),Ib++,()=>{Ib===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ib--}},[])}function qC(){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 Ga=function(){return Ga=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},Ga.apply(this,arguments)};function R5(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 RG(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 xp="right-scroll-bar-position",wp="width-before-scroll-bar",NG="with-scroll-bars-hidden",MG="--removed-body-scroll-bar-size";function Bb(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function PG(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 DG=typeof window<"u"?y.useLayoutEffect:y.useEffect,HC=new WeakMap;function kG(e,t){var n=PG(null,function(r){return e.forEach(function(a){return Bb(a,r)})});return DG(function(){var r=HC.get(n);if(r){var a=new Set(r),o=new Set(e),l=n.current;a.forEach(function(c){o.has(c)||Bb(c,null)}),o.forEach(function(c){a.has(c)||Bb(c,l)})}HC.set(n,e)},[e]),n}function $G(e){return e}function zG(e,t){t===void 0&&(t=$G);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(c){return c!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(c){return o(c)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var c=n;n=[],c.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 LG(e){e===void 0&&(e={});var t=zG(null);return t.options=Ga({async:!0,ssr:!1},e),t}var N5=function(e){var t=e.sideCar,n=R5(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,Ga({},n))};N5.isSideCarExport=!0;function IG(e,t){return e.useMedium(t),N5}var M5=LG(),Ub=function(){},av=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:Ub,onWheelCapture:Ub,onTouchMoveCapture:Ub}),a=r[0],o=r[1],l=e.forwardProps,c=e.children,f=e.className,d=e.removeScrollBar,m=e.enabled,h=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,j=e.gapMode,R=R5(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=g,C=kG([n,t]),N=Ga(Ga({},R),a);return y.createElement(y.Fragment,null,m&&y.createElement(T,{sideCar:M5,removeScrollBar:d,shards:h,noRelative:x,noIsolation:A,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n,gapMode:j}),l?y.cloneElement(y.Children.only(c),Ga(Ga({},N),{ref:C})):y.createElement(E,Ga({},N,{className:f,ref:C}),c))});av.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};av.classNames={fullWidth:wp,zeroRight:xp};var BG=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function UG(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=BG();return t&&e.setAttribute("nonce",t),e}function qG(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function HG(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var FG=function(){var e=0,t=null;return{add:function(n){e==0&&(t=UG())&&(qG(t,n),HG(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},VG=function(){var e=FG();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},P5=function(){var e=VG(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},GG={left:0,top:0,right:0,gap:0},qb=function(e){return parseInt(e||"",10)||0},YG=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[qb(n),qb(r),qb(a)]},WG=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return GG;var t=YG(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])}},KG=P5(),Bl="data-scroll-locked",ZG=function(e,t,n,r){var a=e.left,o=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
301
|
-
.`.concat(NG,` {
|
|
302
|
-
overflow: hidden `).concat(r,`;
|
|
303
|
-
padding-right: `).concat(c,"px ").concat(r,`;
|
|
304
|
-
}
|
|
305
|
-
body[`).concat(Bl,`] {
|
|
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(c,"px ").concat(r,`;
|
|
315
|
-
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
.`).concat(xp,` {
|
|
319
|
-
right: `).concat(c,"px ").concat(r,`;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
.`).concat(wp,` {
|
|
323
|
-
margin-right: `).concat(c,"px ").concat(r,`;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
.`).concat(xp," .").concat(xp,` {
|
|
327
|
-
right: 0 `).concat(r,`;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
.`).concat(wp," .").concat(wp,` {
|
|
331
|
-
margin-right: 0 `).concat(r,`;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
body[`).concat(Bl,`] {
|
|
335
|
-
`).concat(MG,": ").concat(c,`px;
|
|
336
|
-
}
|
|
337
|
-
`)},FC=function(){var e=parseInt(document.body.getAttribute(Bl)||"0",10);return isFinite(e)?e:0},XG=function(){y.useEffect(function(){return document.body.setAttribute(Bl,(FC()+1).toString()),function(){var e=FC()-1;e<=0?document.body.removeAttribute(Bl):document.body.setAttribute(Bl,e.toString())}},[])},QG=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;XG();var o=y.useMemo(function(){return WG(a)},[a]);return y.createElement(KG,{styles:ZG(o,!t,a,n?"":"!important")})},aS=!1;if(typeof window<"u")try{var Zh=Object.defineProperty({},"passive",{get:function(){return aS=!0,!0}});window.addEventListener("test",Zh,Zh),window.removeEventListener("test",Zh,Zh)}catch{aS=!1}var jl=aS?{passive:!1}:!1,JG=function(e){return e.tagName==="TEXTAREA"},D5=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!JG(e)&&n[t]==="visible")},eY=function(e){return D5(e,"overflowY")},tY=function(e){return D5(e,"overflowX")},VC=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=k5(e,r);if(a){var o=$5(e,r),l=o[1],c=o[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},nY=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},rY=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},k5=function(e,t){return e==="v"?eY(t):tY(t)},$5=function(e,t){return e==="v"?nY(t):rY(t)},aY=function(e,t){return e==="h"&&t==="rtl"?-1:1},iY=function(e,t,n,r,a){var o=aY(e,window.getComputedStyle(t).direction),l=o*r,c=n.target,f=t.contains(c),d=!1,m=l>0,h=0,g=0;do{if(!c)break;var x=$5(e,c),A=x[0],S=x[1],w=x[2],O=S-w-o*A;(A||O)&&k5(e,c)&&(h+=O,g+=A);var E=c.parentNode;c=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(m&&Math.abs(h)<1||!m&&Math.abs(g)<1)&&(d=!0),d},Xh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},GC=function(e){return[e.deltaX,e.deltaY]},YC=function(e){return e&&"current"in e?e.current:e},oY=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sY=function(e){return`
|
|
338
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
339
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
340
|
-
`)},lY=0,Tl=[];function cY(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),a=y.useState(lY++)[0],o=y.useState(P5)[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=RG([e.lockRef.current],(e.shards||[]).map(YC),!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 c=y.useCallback(function(S,w){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!l.current.allowPinchZoom;var O=Xh(S),E=n.current,j="deltaX"in S?S.deltaX:E[0]-O[0],R="deltaY"in S?S.deltaY:E[1]-O[1],T,C=S.target,N=Math.abs(j)>Math.abs(R)?"h":"v";if("touches"in S&&N==="h"&&C.type==="range")return!1;var D=window.getSelection(),z=D&&D.anchorNode,V=z?z===C||z.contains(C):!1;if(V)return!1;var U=VC(N,C);if(!U)return!0;if(U?T=N:(T=N==="v"?"h":"v",U=VC(N,C)),!U)return!1;if(!r.current&&"changedTouches"in S&&(j||R)&&(r.current=T),!T)return!0;var P=r.current||T;return iY(P,w,S,P==="h"?j:R)},[]),f=y.useCallback(function(S){var w=S;if(!(!Tl.length||Tl[Tl.length-1]!==o)){var O="deltaY"in w?GC(w):Xh(w),E=t.current.filter(function(T){return T.name===w.type&&(T.target===w.target||w.target===T.shadowParent)&&oY(T.delta,O)})[0];if(E&&E.should){w.cancelable&&w.preventDefault();return}if(!E){var j=(l.current.shards||[]).map(YC).filter(Boolean).filter(function(T){return T.contains(w.target)}),R=j.length>0?c(w,j[0]):!l.current.noIsolation;R&&w.cancelable&&w.preventDefault()}}},[]),d=y.useCallback(function(S,w,O,E){var j={name:S,delta:w,target:O,should:E,shadowParent:uY(O)};t.current.push(j),setTimeout(function(){t.current=t.current.filter(function(R){return R!==j})},1)},[]),m=y.useCallback(function(S){n.current=Xh(S),r.current=void 0},[]),h=y.useCallback(function(S){d(S.type,GC(S),S.target,c(S,e.lockRef.current))},[]),g=y.useCallback(function(S){d(S.type,Xh(S),S.target,c(S,e.lockRef.current))},[]);y.useEffect(function(){return Tl.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:g}),document.addEventListener("wheel",f,jl),document.addEventListener("touchmove",f,jl),document.addEventListener("touchstart",m,jl),function(){Tl=Tl.filter(function(S){return S!==o}),document.removeEventListener("wheel",f,jl),document.removeEventListener("touchmove",f,jl),document.removeEventListener("touchstart",m,jl)}},[]);var x=e.removeScrollBar,A=e.inert;return y.createElement(y.Fragment,null,A?y.createElement(o,{styles:sY(a)}):null,x?y.createElement(QG,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function uY(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const fY=IG(M5,cY);var iv=y.forwardRef(function(e,t){return y.createElement(av,Ga({},e,{ref:t,sideCar:fY}))});iv.classNames=av.classNames;var dY=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Cl=new WeakMap,Qh=new WeakMap,Jh={},Hb=0,z5=function(e){return e&&(e.host||z5(e.parentNode))},hY=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=z5(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})},pY=function(e,t,n,r){var a=hY(t,Array.isArray(e)?e:[e]);Jh[n]||(Jh[n]=new WeakMap);var o=Jh[n],l=[],c=new Set,f=new Set(a),d=function(h){!h||c.has(h)||(c.add(h),d(h.parentNode))};a.forEach(d);var m=function(h){!h||f.has(h)||Array.prototype.forEach.call(h.children,function(g){if(c.has(g))m(g);else try{var x=g.getAttribute(r),A=x!==null&&x!=="false",S=(Cl.get(g)||0)+1,w=(o.get(g)||0)+1;Cl.set(g,S),o.set(g,w),l.push(g),S===1&&A&&Qh.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),c.clear(),Hb++,function(){l.forEach(function(h){var g=Cl.get(h)-1,x=o.get(h)-1;Cl.set(h,g),o.set(h,x),g||(Qh.has(h)||h.removeAttribute(r),Qh.delete(h)),x||h.removeAttribute(n)}),Hb--,Hb||(Cl=new WeakMap,Cl=new WeakMap,Qh=new WeakMap,Jh={})}},uA=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=dY(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),pY(r,a,n,"aria-hidden")):function(){return null}},ov="Dialog",[L5,I5]=ha(ov),[mY,$a]=L5(ov),B5=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:l=!0}=e,c=y.useRef(null),f=y.useRef(null),[d,m]=To({prop:r,defaultProp:a??!1,onChange:o,caller:ov});return v.jsx(mY,{scope:t,triggerRef:c,contentRef:f,contentId:Ra(),titleId:Ra(),descriptionId:Ra(),open:d,onOpenChange:m,onOpenToggle:y.useCallback(()=>m(h=>!h),[m]),modal:l,children:n})};B5.displayName=ov;var U5="DialogTrigger",q5=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=$a(U5,n),o=ft(t,a.triggerRef);return v.jsx(et.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":hA(a.open),...r,ref:o,onClick:ke(e.onClick,a.onOpenToggle)})});q5.displayName=U5;var fA="DialogPortal",[vY,H5]=L5(fA,{forceMount:void 0}),F5=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=$a(fA,t);return v.jsx(vY,{scope:t,forceMount:n,children:y.Children.map(r,l=>v.jsx(cr,{present:n||o.open,children:v.jsx(od,{asChild:!0,container:a,children:l})}))})};F5.displayName=fA;var kp="DialogOverlay",V5=y.forwardRef((e,t)=>{const n=H5(kp,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=$a(kp,e.__scopeDialog);return o.modal?v.jsx(cr,{present:r||o.open,children:v.jsx(yY,{...a,ref:t})}):null});V5.displayName=kp;var gY=Kl("DialogOverlay.RemoveScroll"),yY=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=$a(kp,n);return v.jsx(iv,{as:gY,allowPinchZoom:!0,shards:[a.contentRef],children:v.jsx(et.div,{"data-state":hA(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ws="DialogContent",G5=y.forwardRef((e,t)=>{const n=H5(ws,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=$a(ws,e.__scopeDialog);return v.jsx(cr,{present:r||o.open,children:o.modal?v.jsx(bY,{...a,ref:t}):v.jsx(xY,{...a,ref:t})})});G5.displayName=ws;var bY=y.forwardRef((e,t)=>{const n=$a(ws,e.__scopeDialog),r=y.useRef(null),a=ft(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return uA(o)},[]),v.jsx(Y5,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ke(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:ke(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&o.preventDefault()}),onFocusOutside:ke(e.onFocusOutside,o=>o.preventDefault())})}),xY=y.forwardRef((e,t)=>{const n=$a(ws,e.__scopeDialog),r=y.useRef(!1),a=y.useRef(!1);return v.jsx(Y5,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,c;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(r.current||(c=n.triggerRef.current)==null||c.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()}})}),Y5=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...l}=e,c=$a(ws,n),f=y.useRef(null),d=ft(t,f);return cA(),v.jsxs(v.Fragment,{children:[v.jsx(rv,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:v.jsx(id,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":hA(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),v.jsxs(v.Fragment,{children:[v.jsx(SY,{titleId:c.titleId}),v.jsx(AY,{contentRef:f,descriptionId:c.descriptionId})]})]})}),dA="DialogTitle",W5=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=$a(dA,n);return v.jsx(et.h2,{id:a.titleId,...r,ref:t})});W5.displayName=dA;var K5="DialogDescription",Z5=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=$a(K5,n);return v.jsx(et.p,{id:a.descriptionId,...r,ref:t})});Z5.displayName=K5;var X5="DialogClose",Q5=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=$a(X5,n);return v.jsx(et.button,{type:"button",...r,ref:t,onClick:ke(e.onClick,()=>a.onOpenChange(!1))})});Q5.displayName=X5;function hA(e){return e?"open":"closed"}var J5="DialogTitleWarning",[wY,eL]=JV(J5,{contentName:ws,titleName:dA,docsSlug:"dialog"}),SY=({titleId:e})=>{const t=eL(J5),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},_Y="DialogDescriptionWarning",AY=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${eL(_Y).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},pA=B5,tL=q5,mA=F5,sd=V5,ld=G5,cd=W5,ud=Z5,sv=Q5;const OY=pA,EY=mA,nL=y.forwardRef(({className:e,...t},n)=>v.jsx(sd,{className:be("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=sd.displayName;const jY=Ec("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"}}),rL=y.forwardRef(({side:e="right",className:t,children:n,...r},a)=>v.jsxs(EY,{children:[v.jsx(nL,{}),v.jsxs(ld,{ref:a,className:be(jY({side:e}),t),...r,children:[n,v.jsxs(sv,{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(m5,{className:"h-4 w-4"}),v.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));rL.displayName=ld.displayName;const aL=({className:e,...t})=>v.jsx("div",{className:be("flex flex-col space-y-2 text-center sm:text-left",e),...t});aL.displayName="SheetHeader";const iL=y.forwardRef(({className:e,...t},n)=>v.jsx(cd,{ref:n,className:be("text-lg font-semibold text-foreground",e),...t}));iL.displayName=cd.displayName;const oL=y.forwardRef(({className:e,...t},n)=>v.jsx(ud,{ref:n,className:be("text-sm text-muted-foreground",e),...t}));oL.displayName=ud.displayName;function WC({className:e,...t}){return v.jsx("div",{className:be("animate-pulse rounded-md bg-muted",e),...t})}const TY=["top","right","bottom","left"],Co=Math.min,Pr=Math.max,$p=Math.round,ep=Math.floor,Za=e=>({x:e,y:e}),CY={left:"right",right:"left",bottom:"top",top:"bottom"};function iS(e,t,n){return Pr(e,Co(t,n))}function ki(e,t){return typeof e=="function"?e(t):e}function $i(e){return e.split("-")[0]}function Tc(e){return e.split("-")[1]}function vA(e){return e==="x"?"y":"x"}function gA(e){return e==="y"?"height":"width"}function Ya(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function yA(e){return vA(Ya(e))}function RY(e,t,n){n===void 0&&(n=!1);const r=Tc(e),a=yA(e),o=gA(a);let l=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=zp(l)),[l,zp(l)]}function NY(e){const t=zp(e);return[oS(e),t,oS(t)]}function oS(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const KC=["left","right"],ZC=["right","left"],MY=["top","bottom"],PY=["bottom","top"];function DY(e,t,n){switch(e){case"top":case"bottom":return n?t?ZC:KC:t?KC:ZC;case"left":case"right":return t?MY:PY;default:return[]}}function kY(e,t,n,r){const a=Tc(e);let o=DY($i(e),n==="start",r);return a&&(o=o.map(l=>l+"-"+a),t&&(o=o.concat(o.map(oS)))),o}function zp(e){const t=$i(e);return CY[t]+e.slice(t.length)}function $Y(e){return{top:0,right:0,bottom:0,left:0,...e}}function sL(e){return typeof e!="number"?$Y(e):{top:e,right:e,bottom:e,left:e}}function Lp(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 XC(e,t,n){let{reference:r,floating:a}=e;const o=Ya(t),l=yA(t),c=gA(l),f=$i(t),d=o==="y",m=r.x+r.width/2-a.width/2,h=r.y+r.height/2-a.height/2,g=r[c]/2-a[c]/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:h};break;case"left":x={x:r.x-a.width,y:h};break;default:x={x:r.x,y:r.y}}switch(Tc(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 zY(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:o,rects:l,elements:c,strategy:f}=e,{boundary:d="clippingAncestors",rootBoundary:m="viewport",elementContext:h="floating",altBoundary:g=!1,padding:x=0}=ki(t,e),A=sL(x),w=c[g?h==="floating"?"reference":"floating":h],O=Lp(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(c.floating)),boundary:d,rootBoundary:m,strategy:f})),E=h==="floating"?{x:r,y:a,width:l.floating.width,height:l.floating.height}:l.reference,j=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),R=await(o.isElement==null?void 0:o.isElement(j))?await(o.getScale==null?void 0:o.getScale(j))||{x:1,y:1}:{x:1,y:1},T=Lp(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:E,offsetParent:j,strategy:f}):E);return{top:(O.top-T.top+A.top)/R.y,bottom:(T.bottom-O.bottom+A.bottom)/R.y,left:(O.left-T.left+A.left)/R.x,right:(T.right-O.right+A.right)/R.x}}const LY=50,IY=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:zY},f=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:h}=XC(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:j,y:R,data:T,reset:C}=await E({x:m,y:h,initialPlacement:r,placement:g,strategy:a,middlewareData:A,rects:d,platform:c,elements:{reference:e,floating:t}});m=j??m,h=R??h,A[O]={...A[O],...T},C&&x<LY&&(x++,typeof C=="object"&&(C.placement&&(g=C.placement),C.rects&&(d=C.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):C.rects),{x:m,y:h}=XC(d,g,f)),S=-1)}return{x:m,y:h,placement:g,strategy:a,middlewareData:A}},BY=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:l,elements:c,middlewareData:f}=t,{element:d,padding:m=0}=ki(e,t)||{};if(d==null)return{};const h=sL(m),g={x:n,y:r},x=yA(a),A=gA(x),S=await l.getDimensions(d),w=x==="y",O=w?"top":"left",E=w?"bottom":"right",j=w?"clientHeight":"clientWidth",R=o.reference[A]+o.reference[x]-g[x]-o.floating[A],T=g[x]-o.reference[x],C=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d));let N=C?C[j]:0;(!N||!await(l.isElement==null?void 0:l.isElement(C)))&&(N=c.floating[j]||o.floating[A]);const D=R/2-T/2,z=N/2-S[A]/2-1,V=Co(h[O],z),U=Co(h[E],z),P=V,B=N-S[A]-U,q=N/2-S[A]/2+D,Y=iS(P,q,B),$=!f.arrow&&Tc(a)!=null&&q!==Y&&o.reference[A]/2-(q<P?V:U)-S[A]/2<0,G=$?q<P?q-P:q-B:0;return{[x]:g[x]+G,data:{[x]:Y,centerOffset:q-Y-G,...$&&{alignmentOffset:G}},reset:$}}}),UY=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:c,platform:f,elements:d}=t,{mainAxis:m=!0,crossAxis:h=!0,fallbackPlacements:g,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:S=!0,...w}=ki(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const O=$i(a),E=Ya(c),j=$i(c)===c,R=await(f.isRTL==null?void 0:f.isRTL(d.floating)),T=g||(j||!S?[zp(c)]:NY(c)),C=A!=="none";!g&&C&&T.push(...kY(c,S,A,R));const N=[c,...T],D=await f.detectOverflow(t,w),z=[];let V=((r=o.flip)==null?void 0:r.overflows)||[];if(m&&z.push(D[O]),h){const q=RY(a,l,R);z.push(D[q[0]],D[q[1]])}if(V=[...V,{placement:a,overflows:z}],!z.every(q=>q<=0)){var U,P;const q=(((U=o.flip)==null?void 0:U.index)||0)+1,Y=N[q];if(Y&&(!(h==="alignment"?E!==Ya(Y):!1)||V.every(F=>Ya(F.placement)===E?F.overflows[0]>0:!0)))return{data:{index:q,overflows:V},reset:{placement:Y}};let $=(P=V.filter(G=>G.overflows[0]<=0).sort((G,F)=>G.overflows[1]-F.overflows[1])[0])==null?void 0:P.placement;if(!$)switch(x){case"bestFit":{var B;const G=(B=V.filter(F=>{if(C){const K=Ya(F.placement);return K===E||K==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(K=>K>0).reduce((K,ne)=>K+ne,0)]).sort((F,K)=>F[1]-K[1])[0])==null?void 0:B[0];G&&($=G);break}case"initialPlacement":$=c;break}if(a!==$)return{reset:{placement:$}}}return{}}}};function QC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function JC(e){return TY.some(t=>e[t]>=0)}const qY=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...o}=ki(e,t);switch(a){case"referenceHidden":{const l=await r.detectOverflow(t,{...o,elementContext:"reference"}),c=QC(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:JC(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...o,altBoundary:!0}),c=QC(l,n.floating);return{data:{escapedOffsets:c,escaped:JC(c)}}}default:return{}}}}},lL=new Set(["left","top"]);async function HY(e,t){const{placement:n,platform:r,elements:a}=e,o=await(r.isRTL==null?void 0:r.isRTL(a.floating)),l=$i(n),c=Tc(n),f=Ya(n)==="y",d=lL.has(l)?-1:1,m=o&&f?-1:1,h=ki(t,e);let{mainAxis:g,crossAxis:x,alignmentAxis:A}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof A=="number"&&(x=c==="end"?A*-1:A),f?{x:x*m,y:g*d}:{x:g*d,y:x*m}}const FY=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:c}=t,f=await HY(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:a+f.x,y:o+f.y,data:{...f,placement:l}}}}},VY=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:c=!1,limiter:f={fn:O=>{let{x:E,y:j}=O;return{x:E,y:j}}},...d}=ki(e,t),m={x:n,y:r},h=await o.detectOverflow(t,d),g=Ya($i(a)),x=vA(g);let A=m[x],S=m[g];if(l){const O=x==="y"?"top":"left",E=x==="y"?"bottom":"right",j=A+h[O],R=A-h[E];A=iS(j,A,R)}if(c){const O=g==="y"?"top":"left",E=g==="y"?"bottom":"right",j=S+h[O],R=S-h[E];S=iS(j,S,R)}const w=f.fn({...t,[x]:A,[g]:S});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[x]:l,[g]:c}}}}}},GY=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:l}=t,{offset:c=0,mainAxis:f=!0,crossAxis:d=!0}=ki(e,t),m={x:n,y:r},h=Ya(a),g=vA(h);let x=m[g],A=m[h];const S=ki(c,t),w=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(f){const j=g==="y"?"height":"width",R=o.reference[g]-o.floating[j]+w.mainAxis,T=o.reference[g]+o.reference[j]-w.mainAxis;x<R?x=R:x>T&&(x=T)}if(d){var O,E;const j=g==="y"?"width":"height",R=lL.has($i(a)),T=o.reference[h]-o.floating[j]+(R&&((O=l.offset)==null?void 0:O[h])||0)+(R?0:w.crossAxis),C=o.reference[h]+o.reference[j]+(R?0:((E=l.offset)==null?void 0:E[h])||0)-(R?w.crossAxis:0);A<T?A=T:A>C&&(A=C)}return{[g]:x,[h]:A}}}},YY=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:c}=t,{apply:f=()=>{},...d}=ki(e,t),m=await l.detectOverflow(t,d),h=$i(a),g=Tc(a),x=Ya(a)==="y",{width:A,height:S}=o.floating;let w,O;h==="top"||h==="bottom"?(w=h,O=g===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(O=h,w=g==="end"?"top":"bottom");const E=S-m.top-m.bottom,j=A-m.left-m.right,R=Co(S-m[w],E),T=Co(A-m[O],j),C=!t.middlewareData.shift;let N=R,D=T;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=j),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=E),C&&!g){const V=Pr(m.left,0),U=Pr(m.right,0),P=Pr(m.top,0),B=Pr(m.bottom,0);x?D=A-2*(V!==0||U!==0?V+U:Pr(m.left,m.right)):N=S-2*(P!==0||B!==0?P+B:Pr(m.top,m.bottom))}await f({...t,availableWidth:D,availableHeight:N});const z=await l.getDimensions(c.floating);return A!==z.width||S!==z.height?{reset:{rects:!0}}:{}}}};function lv(){return typeof window<"u"}function Cc(e){return cL(e)?(e.nodeName||"").toLowerCase():"#document"}function Ir(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ti(e){var t;return(t=(cL(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function cL(e){return lv()?e instanceof Node||e instanceof Ir(e).Node:!1}function Ma(e){return lv()?e instanceof Element||e instanceof Ir(e).Element:!1}function Ui(e){return lv()?e instanceof HTMLElement||e instanceof Ir(e).HTMLElement:!1}function eR(e){return!lv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ir(e).ShadowRoot}function fd(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Pa(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&a!=="inline"&&a!=="contents"}function WY(e){return/^(table|td|th)$/.test(Cc(e))}function cv(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const KY=/transform|translate|scale|rotate|perspective|filter/,ZY=/paint|layout|strict|content/,os=e=>!!e&&e!=="none";let Fb;function bA(e){const t=Ma(e)?Pa(e):e;return os(t.transform)||os(t.translate)||os(t.scale)||os(t.rotate)||os(t.perspective)||!xA()&&(os(t.backdropFilter)||os(t.filter))||KY.test(t.willChange||"")||ZY.test(t.contain||"")}function XY(e){let t=Ro(e);for(;Ui(t)&&!Zl(t);){if(bA(t))return t;if(cv(t))return null;t=Ro(t)}return null}function xA(){return Fb==null&&(Fb=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Fb}function Zl(e){return/^(html|body|#document)$/.test(Cc(e))}function Pa(e){return Ir(e).getComputedStyle(e)}function uv(e){return Ma(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ro(e){if(Cc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||eR(e)&&e.host||ti(e);return eR(t)?t.host:t}function uL(e){const t=Ro(e);return Zl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ui(t)&&fd(t)?t:uL(t)}function df(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=uL(e),o=a===((r=e.ownerDocument)==null?void 0:r.body),l=Ir(a);if(o){const c=sS(l);return t.concat(l,l.visualViewport||[],fd(a)?a:[],c&&n?df(c):[])}else return t.concat(a,df(a,[],n))}function sS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function fL(e){const t=Pa(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Ui(e),o=a?e.offsetWidth:n,l=a?e.offsetHeight:r,c=$p(n)!==o||$p(r)!==l;return c&&(n=o,r=l),{width:n,height:r,$:c}}function wA(e){return Ma(e)?e:e.contextElement}function Ul(e){const t=wA(e);if(!Ui(t))return Za(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=fL(t);let l=(o?$p(n.width):n.width)/r,c=(o?$p(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const QY=Za(0);function dL(e){const t=Ir(e);return!xA()||!t.visualViewport?QY:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function JY(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ir(e)?!1:t}function Ss(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=wA(e);let l=Za(1);t&&(r?Ma(r)&&(l=Ul(r)):l=Ul(e));const c=JY(o,n,r)?dL(o):Za(0);let f=(a.left+c.x)/l.x,d=(a.top+c.y)/l.y,m=a.width/l.x,h=a.height/l.y;if(o){const g=Ir(o),x=r&&Ma(r)?Ir(r):r;let A=g,S=sS(A);for(;S&&r&&x!==A;){const w=Ul(S),O=S.getBoundingClientRect(),E=Pa(S),j=O.left+(S.clientLeft+parseFloat(E.paddingLeft))*w.x,R=O.top+(S.clientTop+parseFloat(E.paddingTop))*w.y;f*=w.x,d*=w.y,m*=w.x,h*=w.y,f+=j,d+=R,A=Ir(S),S=sS(A)}}return Lp({width:m,height:h,x:f,y:d})}function fv(e,t){const n=uv(e).scrollLeft;return t?t.left+n:Ss(ti(e)).left+n}function hL(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-fv(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function eW(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o=a==="fixed",l=ti(r),c=t?cv(t.floating):!1;if(r===l||c&&o)return n;let f={scrollLeft:0,scrollTop:0},d=Za(1);const m=Za(0),h=Ui(r);if((h||!h&&!o)&&((Cc(r)!=="body"||fd(l))&&(f=uv(r)),h)){const x=Ss(r);d=Ul(r),m.x=x.x+r.clientLeft,m.y=x.y+r.clientTop}const g=l&&!h&&!o?hL(l,f):Za(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 tW(e){return Array.from(e.getClientRects())}function nW(e){const t=ti(e),n=uv(e),r=e.ownerDocument.body,a=Pr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Pr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+fv(e);const c=-n.scrollTop;return Pa(r).direction==="rtl"&&(l+=Pr(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:l,y:c}}const tR=25;function rW(e,t){const n=Ir(e),r=ti(e),a=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,c=0,f=0;if(a){o=a.width,l=a.height;const m=xA();(!m||m&&t==="fixed")&&(c=a.offsetLeft,f=a.offsetTop)}const d=fv(r);if(d<=0){const m=r.ownerDocument,h=m.body,g=getComputedStyle(h),x=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,A=Math.abs(r.clientWidth-h.clientWidth-x);A<=tR&&(o-=A)}else d<=tR&&(o+=d);return{width:o,height:l,x:c,y:f}}function aW(e,t){const n=Ss(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=Ui(e)?Ul(e):Za(1),l=e.clientWidth*o.x,c=e.clientHeight*o.y,f=a*o.x,d=r*o.y;return{width:l,height:c,x:f,y:d}}function nR(e,t,n){let r;if(t==="viewport")r=rW(e,n);else if(t==="document")r=nW(ti(e));else if(Ma(t))r=aW(t,n);else{const a=dL(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Lp(r)}function pL(e,t){const n=Ro(e);return n===t||!Ma(n)||Zl(n)?!1:Pa(n).position==="fixed"||pL(n,t)}function iW(e,t){const n=t.get(e);if(n)return n;let r=df(e,[],!1).filter(c=>Ma(c)&&Cc(c)!=="body"),a=null;const o=Pa(e).position==="fixed";let l=o?Ro(e):e;for(;Ma(l)&&!Zl(l);){const c=Pa(l),f=bA(l);!f&&c.position==="fixed"&&(a=null),(o?!f&&!a:!f&&c.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||fd(l)&&!f&&pL(e,l))?r=r.filter(m=>m!==l):a=c,l=Ro(l)}return t.set(e,r),r}function oW(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const l=[...n==="clippingAncestors"?cv(t)?[]:iW(t,this._c):[].concat(n),r],c=nR(t,l[0],a);let f=c.top,d=c.right,m=c.bottom,h=c.left;for(let g=1;g<l.length;g++){const x=nR(t,l[g],a);f=Pr(x.top,f),d=Co(x.right,d),m=Co(x.bottom,m),h=Pr(x.left,h)}return{width:d-h,height:m-f,x:h,y:f}}function sW(e){const{width:t,height:n}=fL(e);return{width:t,height:n}}function lW(e,t,n){const r=Ui(t),a=ti(t),o=n==="fixed",l=Ss(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const f=Za(0);function d(){f.x=fv(a)}if(r||!r&&!o)if((Cc(t)!=="body"||fd(a))&&(c=uv(t)),r){const x=Ss(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?hL(a,c):Za(0),h=l.left+c.scrollLeft-f.x-m.x,g=l.top+c.scrollTop-f.y-m.y;return{x:h,y:g,width:l.width,height:l.height}}function Vb(e){return Pa(e).position==="static"}function rR(e,t){if(!Ui(e)||Pa(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ti(e)===n&&(n=n.ownerDocument.body),n}function mL(e,t){const n=Ir(e);if(cv(e))return n;if(!Ui(e)){let a=Ro(e);for(;a&&!Zl(a);){if(Ma(a)&&!Vb(a))return a;a=Ro(a)}return n}let r=rR(e,t);for(;r&&WY(r)&&Vb(r);)r=rR(r,t);return r&&Zl(r)&&Vb(r)&&!bA(r)?n:r||XY(e)||n}const cW=async function(e){const t=this.getOffsetParent||mL,n=this.getDimensions,r=await n(e.floating);return{reference:lW(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function uW(e){return Pa(e).direction==="rtl"}const fW={convertOffsetParentRelativeRectToViewportRelativeRect:eW,getDocumentElement:ti,getClippingRect:oW,getOffsetParent:mL,getElementRects:cW,getClientRects:tW,getDimensions:sW,getScale:Ul,isElement:Ma,isRTL:uW};function vL(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function dW(e,t){let n=null,r;const a=ti(e);function o(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),o();const d=e.getBoundingClientRect(),{left:m,top:h,width:g,height:x}=d;if(c||t(),!g||!x)return;const A=ep(h),S=ep(a.clientWidth-(m+g)),w=ep(a.clientHeight-(h+x)),O=ep(m),j={rootMargin:-A+"px "+-S+"px "+-w+"px "+-O+"px",threshold:Pr(0,Co(1,f))||1};let R=!0;function T(C){const N=C[0].intersectionRatio;if(N!==f){if(!R)return l();N?l(!1,N):r=setTimeout(()=>{l(!1,1e-7)},1e3)}N===1&&!vL(d,e.getBoundingClientRect())&&l(),R=!1}try{n=new IntersectionObserver(T,{...j,root:a.ownerDocument})}catch{n=new IntersectionObserver(T,j)}n.observe(e)}return l(!0),o}function hW(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,d=wA(e),m=a||o?[...d?df(d):[],...t?df(t):[]]:[];m.forEach(O=>{a&&O.addEventListener("scroll",n,{passive:!0}),o&&O.addEventListener("resize",n)});const h=d&&c?dW(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 j;(j=x)==null||j.observe(t)})),n()}),d&&!f&&x.observe(d),t&&x.observe(t));let A,S=f?Ss(e):null;f&&w();function w(){const O=Ss(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)}),h==null||h(),(O=x)==null||O.disconnect(),x=null,f&&cancelAnimationFrame(A)}}const pW=FY,mW=VY,vW=UY,gW=YY,yW=qY,aR=BY,bW=GY,xW=(e,t,n)=>{const r=new Map,a={platform:fW,...n},o={...a.platform,_c:r};return IY(e,t,{...a,platform:o})};var wW=typeof document<"u",SW=function(){},Sp=wW?y.useLayoutEffect:SW;function Ip(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(!Ip(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)&&!Ip(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 iR(e,t){const n=gL(e);return Math.round(t*n)/n}function Gb(e){const t=y.useRef(e);return Sp(()=>{t.current=e}),t}function _W(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:l}={},transform:c=!0,whileElementsMounted:f,open:d}=e,[m,h]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,x]=y.useState(r);Ip(g,r)||x(r);const[A,S]=y.useState(null),[w,O]=y.useState(null),E=y.useCallback(F=>{F!==C.current&&(C.current=F,S(F))},[]),j=y.useCallback(F=>{F!==N.current&&(N.current=F,O(F))},[]),R=o||A,T=l||w,C=y.useRef(null),N=y.useRef(null),D=y.useRef(m),z=f!=null,V=Gb(f),U=Gb(a),P=Gb(d),B=y.useCallback(()=>{if(!C.current||!N.current)return;const F={placement:t,strategy:n,middleware:g};U.current&&(F.platform=U.current),xW(C.current,N.current,F).then(K=>{const ne={...K,isPositioned:P.current!==!1};q.current&&!Ip(D.current,ne)&&(D.current=ne,rd.flushSync(()=>{h(ne)}))})},[g,t,n,U,P]);Sp(()=>{d===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,h(F=>({...F,isPositioned:!1})))},[d]);const q=y.useRef(!1);Sp(()=>(q.current=!0,()=>{q.current=!1}),[]),Sp(()=>{if(R&&(C.current=R),T&&(N.current=T),R&&T){if(V.current)return V.current(R,T,B);B()}},[R,T,B,V,z]);const Y=y.useMemo(()=>({reference:C,floating:N,setReference:E,setFloating:j}),[E,j]),$=y.useMemo(()=>({reference:R,floating:T}),[R,T]),G=y.useMemo(()=>{const F={position:n,left:0,top:0};if(!$.floating)return F;const K=iR($.floating,m.x),ne=iR($.floating,m.y);return c?{...F,transform:"translate("+K+"px, "+ne+"px)",...gL($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:ne}},[n,c,$.floating,m.x,m.y]);return y.useMemo(()=>({...m,update:B,refs:Y,elements:$,floatingStyles:G}),[m,B,Y,$,G])}const AW=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?aR({element:r.current,padding:a}).fn(n):{}:r?aR({element:r,padding:a}).fn(n):{}}}},OW=(e,t)=>{const n=pW(e);return{name:n.name,fn:n.fn,options:[e,t]}},EW=(e,t)=>{const n=mW(e);return{name:n.name,fn:n.fn,options:[e,t]}},jW=(e,t)=>({fn:bW(e).fn,options:[e,t]}),TW=(e,t)=>{const n=vW(e);return{name:n.name,fn:n.fn,options:[e,t]}},CW=(e,t)=>{const n=gW(e);return{name:n.name,fn:n.fn,options:[e,t]}},RW=(e,t)=>{const n=yW(e);return{name:n.name,fn:n.fn,options:[e,t]}},NW=(e,t)=>{const n=AW(e);return{name:n.name,fn:n.fn,options:[e,t]}};var MW="Arrow",yL=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return v.jsx(et.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"})})});yL.displayName=MW;var PW=yL;function bL(e){const[t,n]=y.useState(void 0);return Wn(()=>{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,c;if("borderBoxSize"in o){const f=o.borderBoxSize,d=Array.isArray(f)?f[0]:f;l=d.inlineSize,c=d.blockSize}else l=e.offsetWidth,c=e.offsetHeight;n({width:l,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var SA="Popper",[xL,Rc]=ha(SA),[DW,wL]=xL(SA),SL=e=>{const{__scopePopper:t,children:n}=e,[r,a]=y.useState(null);return v.jsx(DW,{scope:t,anchor:r,onAnchorChange:a,children:n})};SL.displayName=SA;var _L="PopperAnchor",AL=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=wL(_L,n),l=y.useRef(null),c=ft(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(et.div,{...a,ref:c})});AL.displayName=_L;var _A="PopperContent",[kW,$W]=xL(_A),OL=y.forwardRef((e,t)=>{var ve,xe,ce,Ae,Oe,oe;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:o="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:f=!0,collisionBoundary:d=[],collisionPadding:m=0,sticky:h="partial",hideWhenDetached:g=!1,updatePositionStrategy:x="optimized",onPlaced:A,...S}=e,w=wL(_A,n),[O,E]=y.useState(null),j=ft(t,qe=>E(qe)),[R,T]=y.useState(null),C=bL(R),N=(C==null?void 0:C.width)??0,D=(C==null?void 0:C.height)??0,z=r+(o!=="center"?"-"+o:""),V=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},U=Array.isArray(d)?d:[d],P=U.length>0,B={padding:V,boundary:U.filter(LW),altBoundary:P},{refs:q,floatingStyles:Y,placement:$,isPositioned:G,middlewareData:F}=_W({strategy:"fixed",placement:z,whileElementsMounted:(...qe)=>hW(...qe,{animationFrame:x==="always"}),elements:{reference:w.anchor},middleware:[OW({mainAxis:a+D,alignmentAxis:l}),f&&EW({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?jW():void 0,...B}),f&&TW({...B}),CW({...B,apply:({elements:qe,rects:De,availableWidth:Je,availableHeight:Ye})=>{const{width:at,height:jt}=De.reference,dt=qe.floating.style;dt.setProperty("--radix-popper-available-width",`${Je}px`),dt.setProperty("--radix-popper-available-height",`${Ye}px`),dt.setProperty("--radix-popper-anchor-width",`${at}px`),dt.setProperty("--radix-popper-anchor-height",`${jt}px`)}}),R&&NW({element:R,padding:c}),IW({arrowWidth:N,arrowHeight:D}),g&&RW({strategy:"referenceHidden",...B})]}),[K,ne]=TL($),I=Gn(A);Wn(()=>{G&&(I==null||I())},[G,I]);const Z=(ve=F.arrow)==null?void 0:ve.x,Q=(xe=F.arrow)==null?void 0:xe.y,fe=((ce=F.arrow)==null?void 0:ce.centerOffset)!==0,[le,Se]=y.useState();return Wn(()=>{O&&Se(window.getComputedStyle(O).zIndex)},[O]),v.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:G?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:le,"--radix-popper-transform-origin":[(Ae=F.transformOrigin)==null?void 0:Ae.x,(Oe=F.transformOrigin)==null?void 0:Oe.y].join(" "),...((oe=F.hide)==null?void 0:oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(kW,{scope:n,placedSide:K,onArrowChange:T,arrowX:Z,arrowY:Q,shouldHideArrow:fe,children:v.jsx(et.div,{"data-side":K,"data-align":ne,...S,ref:j,style:{...S.style,animation:G?void 0:"none"}})})})});OL.displayName=_A;var EL="PopperArrow",zW={top:"bottom",right:"left",bottom:"top",left:"right"},jL=y.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,o=$W(EL,r),l=zW[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(PW,{...a,ref:n,style:{...a.style,display:"block"}})})});jL.displayName=EL;function LW(e){return e!==null}var IW=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,c=l?0:e.arrowWidth,f=l?0:e.arrowHeight,[d,m]=TL(n),h={start:"0%",center:"50%",end:"100%"}[m],g=(((O=a.arrow)==null?void 0:O.x)??0)+c/2,x=(((E=a.arrow)==null?void 0:E.y)??0)+f/2;let A="",S="";return d==="bottom"?(A=l?h:`${g}px`,S=`${-f}px`):d==="top"?(A=l?h:`${g}px`,S=`${r.floating.height+f}px`):d==="right"?(A=`${-f}px`,S=l?h:`${x}px`):d==="left"&&(A=`${r.floating.width+f}px`,S=l?h:`${x}px`),{data:{x:A,y:S}}}});function TL(e){const[t,n="center"]=e.split("-");return[t,n]}var AA=SL,OA=AL,EA=OL,jA=jL,CL=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"}),BW="VisuallyHidden",RL=y.forwardRef((e,t)=>v.jsx(et.span,{...e,ref:t,style:{...CL,...e.style}}));RL.displayName=BW;var UW=RL,[dv]=ha("Tooltip",[Rc]),hv=Rc(),NL="TooltipProvider",qW=700,lS="tooltip.open",[HW,TA]=dv(NL),ML=e=>{const{__scopeTooltip:t,delayDuration:n=qW,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:o}=e,l=y.useRef(!0),c=y.useRef(!1),f=y.useRef(0);return y.useEffect(()=>{const d=f.current;return()=>window.clearTimeout(d)},[]),v.jsx(HW,{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:c,onPointerInTransitChange:y.useCallback(d=>{c.current=d},[]),disableHoverableContent:a,children:o})};ML.displayName=NL;var hf="Tooltip",[FW,dd]=dv(hf),PL=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a,onOpenChange:o,disableHoverableContent:l,delayDuration:c}=e,f=TA(hf,e.__scopeTooltip),d=hv(t),[m,h]=y.useState(null),g=Ra(),x=y.useRef(0),A=l??f.disableHoverableContent,S=c??f.delayDuration,w=y.useRef(!1),[O,E]=To({prop:r,defaultProp:a??!1,onChange:N=>{N?(f.onOpen(),document.dispatchEvent(new CustomEvent(lS))):f.onClose(),o==null||o(N)},caller:hf}),j=y.useMemo(()=>O?w.current?"delayed-open":"instant-open":"closed",[O]),R=y.useCallback(()=>{window.clearTimeout(x.current),x.current=0,w.current=!1,E(!0)},[E]),T=y.useCallback(()=>{window.clearTimeout(x.current),x.current=0,E(!1)},[E]),C=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(AA,{...d,children:v.jsx(FW,{scope:t,contentId:g,open:O,stateAttribute:j,trigger:m,onTriggerChange:h,onTriggerEnter:y.useCallback(()=>{f.isOpenDelayedRef.current?C():R()},[f.isOpenDelayedRef,C,R]),onTriggerLeave:y.useCallback(()=>{A?T():(window.clearTimeout(x.current),x.current=0)},[T,A]),onOpen:R,onClose:T,disableHoverableContent:A,children:n})})};PL.displayName=hf;var cS="TooltipTrigger",DL=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=dd(cS,n),o=TA(cS,n),l=hv(n),c=y.useRef(null),f=ft(t,c,a.onTriggerChange),d=y.useRef(!1),m=y.useRef(!1),h=y.useCallback(()=>d.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),v.jsx(OA,{asChild:!0,...l,children:v.jsx(et.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:f,onPointerMove:ke(e.onPointerMove,g=>{g.pointerType!=="touch"&&!m.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),m.current=!0)}),onPointerLeave:ke(e.onPointerLeave,()=>{a.onTriggerLeave(),m.current=!1}),onPointerDown:ke(e.onPointerDown,()=>{a.open&&a.onClose(),d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:ke(e.onFocus,()=>{d.current||a.onOpen()}),onBlur:ke(e.onBlur,a.onClose),onClick:ke(e.onClick,a.onClose)})})});DL.displayName=cS;var CA="TooltipPortal",[VW,GW]=dv(CA,{forceMount:void 0}),kL=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:a}=e,o=dd(CA,t);return v.jsx(VW,{scope:t,forceMount:n,children:v.jsx(cr,{present:n||o.open,children:v.jsx(od,{asChild:!0,container:a,children:r})})})};kL.displayName=CA;var Xl="TooltipContent",$L=y.forwardRef((e,t)=>{const n=GW(Xl,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...o}=e,l=dd(Xl,e.__scopeTooltip);return v.jsx(cr,{present:r||l.open,children:l.disableHoverableContent?v.jsx(zL,{side:a,...o,ref:t}):v.jsx(YW,{side:a,...o,ref:t})})}),YW=y.forwardRef((e,t)=>{const n=dd(Xl,e.__scopeTooltip),r=TA(Xl,e.__scopeTooltip),a=y.useRef(null),o=ft(t,a),[l,c]=y.useState(null),{trigger:f,onClose:d}=n,m=a.current,{onPointerInTransitChange:h}=r,g=y.useCallback(()=>{c(null),h(!1)},[h]),x=y.useCallback((A,S)=>{const w=A.currentTarget,O={x:A.clientX,y:A.clientY},E=QW(O,w.getBoundingClientRect()),j=JW(O,E),R=eK(S.getBoundingClientRect()),T=nK([...j,...R]);c(T),h(!0)},[h]);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)),j=!tK(O,l);E?g():j&&(g(),d())};return document.addEventListener("pointermove",A),()=>document.removeEventListener("pointermove",A)}},[f,m,l,d,g]),v.jsx(zL,{...e,ref:o})}),[WW,KW]=dv(hf,{isInside:!1}),ZW=O5("TooltipContent"),zL=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:l,...c}=e,f=dd(Xl,n),d=hv(n),{onClose:m}=f;return y.useEffect(()=>(document.addEventListener(lS,m),()=>document.removeEventListener(lS,m)),[m]),y.useEffect(()=>{if(f.trigger){const h=g=>{const x=g.target;x!=null&&x.contains(f.trigger)&&m()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[f.trigger,m]),v.jsx(id,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:h=>h.preventDefault(),onDismiss:m,children:v.jsxs(EA,{"data-state":f.stateAttribute,...d,...c,ref:t,style:{...c.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(ZW,{children:r}),v.jsx(WW,{scope:n,isInside:!0,children:v.jsx(UW,{id:f.contentId,role:"tooltip",children:a||r})})]})})});$L.displayName=Xl;var LL="TooltipArrow",XW=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=hv(n);return KW(LL,n).isInside?null:v.jsx(jA,{...a,...r,ref:t})});XW.displayName=LL;function QW(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 JW(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 eK(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 tK(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 c=t[o],f=t[l],d=c.x,m=c.y,h=f.x,g=f.y;m>r!=g>r&&n<(h-d)*(r-m)/(g-m)+d&&(a=!a)}return a}function nK(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),rK(t)}function rK(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 aK=ML,iK=PL,oK=DL,sK=kL,IL=$L;const Bp=aK,oa=iK,sa=oK,kr=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>v.jsx(sK,{children:v.jsx(IL,{ref:r,sideOffset:t,"data-slot":"tooltip-content",className:be("z-[50] overflow-hidden rounded-lg bg-foreground/85 px-[7px] py-1.5 text-[11px] text-background 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})}));kr.displayName=IL.displayName;const lK="sidebar_state",cK=3600*24*7,uK="16rem",fK="18rem",dK="3rem",hK="b",BL=y.createContext(null);function pv(){const e=y.useContext(BL);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const UL=y.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:a,children:o,...l},c)=>{const f=vV(),[d,m]=y.useState(!1),[h,g]=y.useState(e),x=t??h,A=y.useCallback(E=>{const j=typeof E=="function"?E(x):E;n?n(j):g(j),document.cookie=`${lK}=${j}; path=/; max-age=${cK}`},[n,x]),S=y.useCallback(()=>f?m(E=>!E):A(E=>!E),[f,A,m]);y.useEffect(()=>{const E=j=>{j.key===hK&&(j.metaKey||j.ctrlKey)&&(j.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(BL.Provider,{value:O,children:v.jsx(Bp,{delayDuration:0,children:v.jsx("div",{style:{"--sidebar-width":uK,"--sidebar-width-icon":dK,...a},className:be("group/sidebar-wrapper flex h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:c,...l,children:o})})})});UL.displayName="SidebarProvider";const qL=y.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:a,...o},l)=>{const{isMobile:c,state:f,openMobile:d,setOpenMobile:m}=pv();return n==="none"?v.jsx("div",{className:be("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:l,...o,children:a}):c?v.jsx(OY,{open:d,onOpenChange:m,...o,children:v.jsxs(rL,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":fK},side:e,children:[v.jsxs(aL,{className:"sr-only",children:[v.jsx(iL,{children:"Sidebar"}),v.jsx(oL,{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:be("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:be("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})})]})});qL.displayName="Sidebar";const HL=y.forwardRef(({className:e,onClick:t,...n},r)=>{const{toggleSidebar:a}=pv();return v.jsxs(ct,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:be("h-7 w-7",e),onClick:o=>{t==null||t(o),a()},...n,children:[v.jsx(rV,{}),v.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});HL.displayName="SidebarTrigger";const pK=y.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=pv();return v.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:be("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})});pK.displayName="SidebarRail";const FL=y.forwardRef(({className:e,...t},n)=>v.jsx("main",{ref:n,className:be("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}));FL.displayName="SidebarInset";const mK=y.forwardRef(({className:e,...t},n)=>v.jsx(tn,{ref:n,"data-sidebar":"input",className:be("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));mK.displayName="SidebarInput";const VL=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"header",className:be("flex flex-col gap-2 p-2",e),...t}));VL.displayName="SidebarHeader";const GL=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"footer",className:be("flex flex-col gap-2 p-2",e),...t}));GL.displayName="SidebarFooter";const vK=y.forwardRef(({className:e,...t},n)=>v.jsx(Ja,{ref:n,"data-sidebar":"separator",className:be("mx-2 w-auto bg-sidebar-border",e),...t}));vK.displayName="SidebarSeparator";const YL=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"content",className:be("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));YL.displayName="SidebarContent";const _p=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"group",className:be("relative flex w-full min-w-0 flex-col p-2",e),...t}));_p.displayName="SidebarGroup";const uS=y.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const a=t?ks:"div";return v.jsx(a,{ref:r,"data-sidebar":"group-label",className:be("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})});uS.displayName="SidebarGroupLabel";const gK=y.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const a=t?ks:"button";return v.jsx(a,{ref:r,"data-sidebar":"group-action",className:be("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})});gK.displayName="SidebarGroupAction";const Ap=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"group-content",className:be("w-full text-sm",e),...t}));Ap.displayName="SidebarGroupContent";const Op=y.forwardRef(({className:e,...t},n)=>v.jsx("ul",{ref:n,"data-sidebar":"menu",className:be("flex w-full min-w-0 flex-col gap-1",e),...t}));Op.displayName="SidebarMenu";const Ep=y.forwardRef(({className:e,...t},n)=>v.jsx("li",{ref:n,"data-sidebar":"menu-item",className:be("group/menu-item relative",e),...t}));Ep.displayName="SidebarMenuItem";const yK=Ec("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"}}),jp=y.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:a,className:o,...l},c)=>{const f=e?ks:"button",{isMobile:d,state:m}=pv(),h=v.jsx(f,{ref:c,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:be(yK({variant:n,size:r}),o),...l});return a?(typeof a=="string"&&(a={children:a}),v.jsxs(oa,{children:[v.jsx(sa,{asChild:!0,children:h}),v.jsx(kr,{side:"right",align:"center",hidden:m!=="collapsed"||d,...a})]})):h});jp.displayName="SidebarMenuButton";const bK=y.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},a)=>{const o=t?ks:"button";return v.jsx(o,{ref:a,"data-sidebar":"menu-action",className:be("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})});bK.displayName="SidebarMenuAction";const xK=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:be("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}));xK.displayName="SidebarMenuBadge";const wK=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:be("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&v.jsx(WC,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),v.jsx(WC,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":a}})]})});wK.displayName="SidebarMenuSkeleton";const SK=y.forwardRef(({className:e,...t},n)=>v.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:be("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}));SK.displayName="SidebarMenuSub";const _K=y.forwardRef(({...e},t)=>v.jsx("li",{ref:t,...e}));_K.displayName="SidebarMenuSubItem";const AK=y.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...a},o)=>{const l=e?ks:"a";return v.jsx(l,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:be("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})});AK.displayName="SidebarMenuSubButton";function RA(e){const t=e+"CollectionProvider",[n,r]=ha(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=S=>{const{scope:w,children:O}=S,E=L.useRef(null),j=L.useRef(new Map).current;return v.jsx(a,{scope:w,itemMap:j,collectionRef:E,children:O})};l.displayName=t;const c=e+"CollectionSlot",f=Kl(c),d=L.forwardRef((S,w)=>{const{scope:O,children:E}=S,j=o(c,O),R=ft(w,j.collectionRef);return v.jsx(f,{ref:R,children:E})});d.displayName=c;const m=e+"CollectionItemSlot",h="data-radix-collection-item",g=Kl(m),x=L.forwardRef((S,w)=>{const{scope:O,children:E,...j}=S,R=L.useRef(null),T=ft(w,R),C=o(m,O);return L.useEffect(()=>(C.itemMap.set(R,{ref:R,...j}),()=>void C.itemMap.delete(R))),v.jsx(g,{[h]:"",ref:T,children:E})});x.displayName=m;function A(S){const w=o(e+"CollectionConsumer",S);return L.useCallback(()=>{const E=w.collectionRef.current;if(!E)return[];const j=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(w.itemMap.values()).sort((C,N)=>j.indexOf(C.ref.current)-j.indexOf(N.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:l,Slot:d,ItemSlot:x},A,r]}var OK=y.createContext(void 0);function hd(e){const t=y.useContext(OK);return e||t||"ltr"}var Yb="rovingFocusGroup.onEntryFocus",EK={bubbles:!1,cancelable:!0},pd="RovingFocusGroup",[fS,WL,jK]=RA(pd),[TK,mv]=ha(pd,[jK]),[CK,RK]=TK(pd),KL=y.forwardRef((e,t)=>v.jsx(fS.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(fS.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx(NK,{...e,ref:t})})}));KL.displayName=pd;var NK=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:f,onEntryFocus:d,preventScrollOnEntryFocus:m=!1,...h}=e,g=y.useRef(null),x=ft(t,g),A=hd(o),[S,w]=To({prop:l,defaultProp:c??null,onChange:f,caller:pd}),[O,E]=y.useState(!1),j=Gn(d),R=WL(n),T=y.useRef(!1),[C,N]=y.useState(0);return y.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(Yb,j),()=>D.removeEventListener(Yb,j)},[j]),v.jsx(CK,{scope:n,orientation:r,dir:A,loop:a,currentTabStopId:S,onItemFocus:y.useCallback(D=>w(D),[w]),onItemShiftTab:y.useCallback(()=>E(!0),[]),onFocusableItemAdd:y.useCallback(()=>N(D=>D+1),[]),onFocusableItemRemove:y.useCallback(()=>N(D=>D-1),[]),children:v.jsx(et.div,{tabIndex:O||C===0?-1:0,"data-orientation":r,...h,ref:x,style:{outline:"none",...e.style},onMouseDown:ke(e.onMouseDown,()=>{T.current=!0}),onFocus:ke(e.onFocus,D=>{const z=!T.current;if(D.target===D.currentTarget&&z&&!O){const V=new CustomEvent(Yb,EK);if(D.currentTarget.dispatchEvent(V),!V.defaultPrevented){const U=R().filter($=>$.focusable),P=U.find($=>$.active),B=U.find($=>$.id===S),Y=[P,B,...U].filter(Boolean).map($=>$.ref.current);QL(Y,m)}}T.current=!1}),onBlur:ke(e.onBlur,()=>E(!1))})})}),ZL="RovingFocusGroupItem",XL=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:o,children:l,...c}=e,f=Ra(),d=o||f,m=RK(ZL,n),h=m.currentTabStopId===d,g=WL(n),{onFocusableItemAdd:x,onFocusableItemRemove:A,currentTabStopId:S}=m;return y.useEffect(()=>{if(r)return x(),()=>A()},[r,x,A]),v.jsx(fS.ItemSlot,{scope:n,id:d,focusable:r,active:a,children:v.jsx(et.span,{tabIndex:h?0:-1,"data-orientation":m.orientation,...c,ref:t,onMouseDown:ke(e.onMouseDown,w=>{r?m.onItemFocus(d):w.preventDefault()}),onFocus:ke(e.onFocus,()=>m.onItemFocus(d)),onKeyDown:ke(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){m.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const O=DK(w,m.orientation,m.dir);if(O!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let j=g().filter(R=>R.focusable).map(R=>R.ref.current);if(O==="last")j.reverse();else if(O==="prev"||O==="next"){O==="prev"&&j.reverse();const R=j.indexOf(w.currentTarget);j=m.loop?kK(j,R+1):j.slice(R+1)}setTimeout(()=>QL(j))}}),children:typeof l=="function"?l({isCurrentTabStop:h,hasTabStop:S!=null}):l})})});XL.displayName=ZL;var MK={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function PK(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function DK(e,t,n){const r=PK(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return MK[r]}function QL(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function kK(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var JL=KL,eI=XL,dS=["Enter"," "],$K=["ArrowDown","PageUp","Home"],tI=["ArrowUp","PageDown","End"],zK=[...$K,...tI],LK={ltr:[...dS,"ArrowRight"],rtl:[...dS,"ArrowLeft"]},IK={ltr:["ArrowLeft"],rtl:["ArrowRight"]},md="Menu",[pf,BK,UK]=RA(md),[$s,nI]=ha(md,[UK,Rc,mv]),vv=Rc(),rI=mv(),[qK,zs]=$s(md),[HK,vd]=$s(md),aI=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:o,modal:l=!0}=e,c=vv(t),[f,d]=y.useState(null),m=y.useRef(!1),h=Gn(o),g=hd(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(AA,{...c,children:v.jsx(qK,{scope:t,open:n,onOpenChange:h,content:f,onContentChange:d,children:v.jsx(HK,{scope:t,onClose:y.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:m,dir:g,modal:l,children:r})})})};aI.displayName=md;var FK="MenuAnchor",NA=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=vv(n);return v.jsx(OA,{...a,...r,ref:t})});NA.displayName=FK;var MA="MenuPortal",[VK,iI]=$s(MA,{forceMount:void 0}),oI=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,o=zs(MA,t);return v.jsx(VK,{scope:t,forceMount:n,children:v.jsx(cr,{present:n||o.open,children:v.jsx(od,{asChild:!0,container:a,children:r})})})};oI.displayName=MA;var ca="MenuContent",[GK,PA]=$s(ca),sI=y.forwardRef((e,t)=>{const n=iI(ca,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=zs(ca,e.__scopeMenu),l=vd(ca,e.__scopeMenu);return v.jsx(pf.Provider,{scope:e.__scopeMenu,children:v.jsx(cr,{present:r||o.open,children:v.jsx(pf.Slot,{scope:e.__scopeMenu,children:l.modal?v.jsx(YK,{...a,ref:t}):v.jsx(WK,{...a,ref:t})})})})}),YK=y.forwardRef((e,t)=>{const n=zs(ca,e.__scopeMenu),r=y.useRef(null),a=ft(t,r);return y.useEffect(()=>{const o=r.current;if(o)return uA(o)},[]),v.jsx(DA,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ke(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),WK=y.forwardRef((e,t)=>{const n=zs(ca,e.__scopeMenu);return v.jsx(DA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),KK=Kl("MenuContent.ScrollLock"),DA=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:f,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:g,onDismiss:x,disableOutsideScroll:A,...S}=e,w=zs(ca,n),O=vd(ca,n),E=vv(n),j=rI(n),R=BK(n),[T,C]=y.useState(null),N=y.useRef(null),D=ft(t,N,w.onContentChange),z=y.useRef(0),V=y.useRef(""),U=y.useRef(0),P=y.useRef(null),B=y.useRef("right"),q=y.useRef(0),Y=A?iv:y.Fragment,$=A?{as:KK,allowPinchZoom:!0}:void 0,G=K=>{var ve,xe;const ne=V.current+K,I=R().filter(ce=>!ce.disabled),Z=document.activeElement,Q=(ve=I.find(ce=>ce.ref.current===Z))==null?void 0:ve.textValue,fe=I.map(ce=>ce.textValue),le=sZ(fe,ne,Q),Se=(xe=I.find(ce=>ce.textValue===le))==null?void 0:xe.ref.current;(function ce(Ae){V.current=Ae,window.clearTimeout(z.current),Ae!==""&&(z.current=window.setTimeout(()=>ce(""),1e3))})(ne),Se&&setTimeout(()=>Se.focus())};y.useEffect(()=>()=>window.clearTimeout(z.current),[]),cA();const F=y.useCallback(K=>{var I,Z;return B.current===((I=P.current)==null?void 0:I.side)&&cZ(K,(Z=P.current)==null?void 0:Z.area)},[]);return v.jsx(GK,{scope:n,searchRef:V,onItemEnter:y.useCallback(K=>{F(K)&&K.preventDefault()},[F]),onItemLeave:y.useCallback(K=>{var ne;F(K)||((ne=N.current)==null||ne.focus(),C(null))},[F]),onTriggerLeave:y.useCallback(K=>{F(K)&&K.preventDefault()},[F]),pointerGraceTimerRef:U,onPointerGraceIntentChange:y.useCallback(K=>{P.current=K},[]),children:v.jsx(Y,{...$,children:v.jsx(rv,{asChild:!0,trapped:a,onMountAutoFocus:ke(o,K=>{var ne;K.preventDefault(),(ne=N.current)==null||ne.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:v.jsx(id,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:g,onDismiss:x,children:v.jsx(JL,{asChild:!0,...j,dir:O.dir,orientation:"vertical",loop:r,currentTabStopId:T,onCurrentTabStopIdChange:C,onEntryFocus:ke(f,K=>{O.isUsingKeyboardRef.current||K.preventDefault()}),preventScrollOnEntryFocus:!0,children:v.jsx(EA,{role:"menu","aria-orientation":"vertical","data-state":_I(w.open),"data-radix-menu-content":"",dir:O.dir,...E,...S,ref:D,style:{outline:"none",...S.style},onKeyDown:ke(S.onKeyDown,K=>{const I=K.target.closest("[data-radix-menu-content]")===K.currentTarget,Z=K.ctrlKey||K.altKey||K.metaKey,Q=K.key.length===1;I&&(K.key==="Tab"&&K.preventDefault(),!Z&&Q&&G(K.key));const fe=N.current;if(K.target!==fe||!zK.includes(K.key))return;K.preventDefault();const Se=R().filter(ve=>!ve.disabled).map(ve=>ve.ref.current);tI.includes(K.key)&&Se.reverse(),iZ(Se)}),onBlur:ke(e.onBlur,K=>{K.currentTarget.contains(K.target)||(window.clearTimeout(z.current),V.current="")}),onPointerMove:ke(e.onPointerMove,mf(K=>{const ne=K.target,I=q.current!==K.clientX;if(K.currentTarget.contains(ne)&&I){const Z=K.clientX>q.current?"right":"left";B.current=Z,q.current=K.clientX}}))})})})})})})});sI.displayName=ca;var ZK="MenuGroup",kA=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(et.div,{role:"group",...r,ref:t})});kA.displayName=ZK;var XK="MenuLabel",lI=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(et.div,{...r,ref:t})});lI.displayName=XK;var Up="MenuItem",oR="menu.itemSelect",gv=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,o=y.useRef(null),l=vd(Up,e.__scopeMenu),c=PA(Up,e.__scopeMenu),f=ft(t,o),d=y.useRef(!1),m=()=>{const h=o.current;if(!n&&h){const g=new CustomEvent(oR,{bubbles:!0,cancelable:!0});h.addEventListener(oR,x=>r==null?void 0:r(x),{once:!0}),E5(h,g),g.defaultPrevented?d.current=!1:l.onClose()}};return v.jsx(cI,{...a,ref:f,disabled:n,onClick:ke(e.onClick,m),onPointerDown:h=>{var g;(g=e.onPointerDown)==null||g.call(e,h),d.current=!0},onPointerUp:ke(e.onPointerUp,h=>{var g;d.current||(g=h.currentTarget)==null||g.click()}),onKeyDown:ke(e.onKeyDown,h=>{const g=c.searchRef.current!=="";n||g&&h.key===" "||dS.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});gv.displayName=Up;var cI=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...o}=e,l=PA(Up,n),c=rI(n),f=y.useRef(null),d=ft(t,f),[m,h]=y.useState(!1),[g,x]=y.useState("");return y.useEffect(()=>{const A=f.current;A&&x((A.textContent??"").trim())},[o.children]),v.jsx(pf.ItemSlot,{scope:n,disabled:r,textValue:a??g,children:v.jsx(eI,{asChild:!0,...c,focusable:!r,children:v.jsx(et.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:d,onPointerMove:ke(e.onPointerMove,mf(A=>{r?l.onItemLeave(A):(l.onItemEnter(A),A.defaultPrevented||A.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ke(e.onPointerLeave,mf(A=>l.onItemLeave(A))),onFocus:ke(e.onFocus,()=>h(!0)),onBlur:ke(e.onBlur,()=>h(!1))})})})}),QK="MenuCheckboxItem",uI=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return v.jsx(mI,{scope:e.__scopeMenu,checked:n,children:v.jsx(gv,{role:"menuitemcheckbox","aria-checked":qp(n)?"mixed":n,...a,ref:t,"data-state":zA(n),onSelect:ke(a.onSelect,()=>r==null?void 0:r(qp(n)?!0:!n),{checkForDefaultPrevented:!1})})})});uI.displayName=QK;var fI="MenuRadioGroup",[JK,eZ]=$s(fI,{value:void 0,onValueChange:()=>{}}),dI=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,o=Gn(r);return v.jsx(JK,{scope:e.__scopeMenu,value:n,onValueChange:o,children:v.jsx(kA,{...a,ref:t})})});dI.displayName=fI;var hI="MenuRadioItem",pI=y.forwardRef((e,t)=>{const{value:n,...r}=e,a=eZ(hI,e.__scopeMenu),o=n===a.value;return v.jsx(mI,{scope:e.__scopeMenu,checked:o,children:v.jsx(gv,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":zA(o),onSelect:ke(r.onSelect,()=>{var l;return(l=a.onValueChange)==null?void 0:l.call(a,n)},{checkForDefaultPrevented:!1})})})});pI.displayName=hI;var $A="MenuItemIndicator",[mI,tZ]=$s($A,{checked:!1}),vI=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,o=tZ($A,n);return v.jsx(cr,{present:r||qp(o.checked)||o.checked===!0,children:v.jsx(et.span,{...a,ref:t,"data-state":zA(o.checked)})})});vI.displayName=$A;var nZ="MenuSeparator",gI=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(et.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});gI.displayName=nZ;var rZ="MenuArrow",yI=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=vv(n);return v.jsx(jA,{...a,...r,ref:t})});yI.displayName=rZ;var aZ="MenuSub",[Lxe,bI]=$s(aZ),Ku="MenuSubTrigger",xI=y.forwardRef((e,t)=>{const n=zs(Ku,e.__scopeMenu),r=vd(Ku,e.__scopeMenu),a=bI(Ku,e.__scopeMenu),o=PA(Ku,e.__scopeMenu),l=y.useRef(null),{pointerGraceTimerRef:c,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 h=c.current;return()=>{window.clearTimeout(h),f(null)}},[c,f]),v.jsx(NA,{asChild:!0,...d,children:v.jsx(cI,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":_I(n.open),...e,ref:ad(t,a.onTriggerChange),onClick:h=>{var g;(g=e.onClick)==null||g.call(e,h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ke(e.onPointerMove,mf(h=>{o.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(o.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:ke(e.onPointerLeave,mf(h=>{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"],j=g[w?"right":"left"];o.onPointerGraceIntentChange({area:[{x:h.clientX+O,y:h.clientY},{x:E,y:g.top},{x:j,y:g.top},{x:j,y:g.bottom},{x:E,y:g.bottom}],side:S}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(h),h.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:ke(e.onKeyDown,h=>{var x;const g=o.searchRef.current!=="";e.disabled||g&&h.key===" "||LK[r.dir].includes(h.key)&&(n.onOpenChange(!0),(x=n.content)==null||x.focus(),h.preventDefault())})})})});xI.displayName=Ku;var wI="MenuSubContent",SI=y.forwardRef((e,t)=>{const n=iI(ca,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=zs(ca,e.__scopeMenu),l=vd(ca,e.__scopeMenu),c=bI(wI,e.__scopeMenu),f=y.useRef(null),d=ft(t,f);return v.jsx(pf.Provider,{scope:e.__scopeMenu,children:v.jsx(cr,{present:r||o.open,children:v.jsx(pf.Slot,{scope:e.__scopeMenu,children:v.jsx(DA,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:d,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{var h;l.isUsingKeyboardRef.current&&((h=f.current)==null||h.focus()),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:ke(e.onFocusOutside,m=>{m.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ke(e.onEscapeKeyDown,m=>{l.onClose(),m.preventDefault()}),onKeyDown:ke(e.onKeyDown,m=>{var x;const h=m.currentTarget.contains(m.target),g=IK[l.dir].includes(m.key);h&&g&&(o.onOpenChange(!1),(x=c.trigger)==null||x.focus(),m.preventDefault())})})})})})});SI.displayName=wI;function _I(e){return e?"open":"closed"}function qp(e){return e==="indeterminate"}function zA(e){return qp(e)?"indeterminate":e?"checked":"unchecked"}function iZ(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function oZ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function sZ(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=oZ(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 lZ(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 c=t[o],f=t[l],d=c.x,m=c.y,h=f.x,g=f.y;m>r!=g>r&&n<(h-d)*(r-m)/(g-m)+d&&(a=!a)}return a}function cZ(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return lZ(n,t)}function mf(e){return t=>t.pointerType==="mouse"?e(t):void 0}var uZ=aI,fZ=NA,dZ=oI,hZ=sI,pZ=kA,mZ=lI,vZ=gv,gZ=uI,yZ=dI,bZ=pI,xZ=vI,wZ=gI,SZ=yI,_Z=xI,AZ=SI,yv="DropdownMenu",[OZ]=ha(yv,[nI]),ur=nI(),[EZ,AI]=OZ(yv),OI=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:o,onOpenChange:l,modal:c=!0}=e,f=ur(t),d=y.useRef(null),[m,h]=To({prop:a,defaultProp:o??!1,onChange:l,caller:yv});return v.jsx(EZ,{scope:t,triggerId:Ra(),triggerRef:d,contentId:Ra(),open:m,onOpenChange:h,onOpenToggle:y.useCallback(()=>h(g=>!g),[h]),modal:c,children:v.jsx(uZ,{...f,open:m,onOpenChange:h,dir:r,modal:c,children:n})})};OI.displayName=yv;var EI="DropdownMenuTrigger",jI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,o=AI(EI,n),l=ur(n);return v.jsx(fZ,{asChild:!0,...l,children:v.jsx(et.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:ad(t,o.triggerRef),onPointerDown:ke(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(o.onOpenToggle(),o.open||c.preventDefault())}),onKeyDown:ke(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&o.onOpenToggle(),c.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});jI.displayName=EI;var jZ="DropdownMenuPortal",TI=e=>{const{__scopeDropdownMenu:t,...n}=e,r=ur(t);return v.jsx(dZ,{...r,...n})};TI.displayName=jZ;var CI="DropdownMenuContent",RI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=AI(CI,n),o=ur(n),l=y.useRef(!1);return v.jsx(hZ,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...r,ref:t,onCloseAutoFocus:ke(e.onCloseAutoFocus,c=>{var f;l.current||(f=a.triggerRef.current)==null||f.focus(),l.current=!1,c.preventDefault()}),onInteractOutside:ke(e.onInteractOutside,c=>{const f=c.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)"}})});RI.displayName=CI;var TZ="DropdownMenuGroup",CZ=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ur(n);return v.jsx(pZ,{...a,...r,ref:t})});CZ.displayName=TZ;var RZ="DropdownMenuLabel",NI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ur(n);return v.jsx(mZ,{...a,...r,ref:t})});NI.displayName=RZ;var NZ="DropdownMenuItem",MI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ur(n);return v.jsx(vZ,{...a,...r,ref:t})});MI.displayName=NZ;var MZ="DropdownMenuCheckboxItem",PI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ur(n);return v.jsx(gZ,{...a,...r,ref:t})});PI.displayName=MZ;var PZ="DropdownMenuRadioGroup",DZ=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ur(n);return v.jsx(yZ,{...a,...r,ref:t})});DZ.displayName=PZ;var kZ="DropdownMenuRadioItem",DI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ur(n);return v.jsx(bZ,{...a,...r,ref:t})});DI.displayName=kZ;var $Z="DropdownMenuItemIndicator",kI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ur(n);return v.jsx(xZ,{...a,...r,ref:t})});kI.displayName=$Z;var zZ="DropdownMenuSeparator",$I=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ur(n);return v.jsx(wZ,{...a,...r,ref:t})});$I.displayName=zZ;var LZ="DropdownMenuArrow",IZ=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ur(n);return v.jsx(SZ,{...a,...r,ref:t})});IZ.displayName=LZ;var BZ="DropdownMenuSubTrigger",zI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ur(n);return v.jsx(_Z,{...a,...r,ref:t})});zI.displayName=BZ;var UZ="DropdownMenuSubContent",LI=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=ur(n);return v.jsx(AZ,{...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)"}})});LI.displayName=UZ;var qZ=OI,HZ=jI,FZ=TI,II=RI,BI=NI,UI=MI,qI=PI,HI=DI,FI=kI,VI=$I,GI=zI,YI=LI;const VZ=qZ,GZ=HZ,YZ=y.forwardRef(({className:e,inset:t,children:n,...r},a)=>v.jsxs(GI,{ref:a,className:be("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(oA,{className:"ml-auto"})]}));YZ.displayName=GI.displayName;const WZ=y.forwardRef(({className:e,...t},n)=>v.jsx(YI,{ref:n,className:be("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}));WZ.displayName=YI.displayName;const WI=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>v.jsx(FZ,{children:v.jsx(II,{ref:r,sideOffset:t,className:be("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})}));WI.displayName=II.displayName;const hS=y.forwardRef(({className:e,inset:t,...n},r)=>v.jsx(UI,{ref:r,className:be("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}));hS.displayName=UI.displayName;const KZ=y.forwardRef(({className:e,children:t,checked:n,...r},a)=>v.jsxs(qI,{ref:a,className:be("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(FI,{children:v.jsx(s5,{className:"h-4 w-4"})})}),t]}));KZ.displayName=qI.displayName;const ZZ=y.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(HI,{ref:r,className:be("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(FI,{children:v.jsx(VF,{className:"h-2 w-2 fill-current"})})}),t]}));ZZ.displayName=HI.displayName;const XZ=y.forwardRef(({className:e,inset:t,...n},r)=>v.jsx(BI,{ref:r,className:be("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));XZ.displayName=BI.displayName;const KI=y.forwardRef(({className:e,...t},n)=>v.jsx(VI,{ref:n,className:be("-mx-1 my-1 h-px bg-muted",e),...t}));KI.displayName=VI.displayName;const pS="";async function tp(e,t,n,r){const a=await fetch(`${pS}${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 ZI={get:e=>tp("GET",e),post:(e,t)=>tp("POST",e,t),patch:(e,t)=>tp("PATCH",e,t),delete:e=>tp("DELETE",e),upload:async(e,t)=>{const n=await fetch(`${pS}${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(`${pS}${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 LA(){const[e,t]=y.useState({user:null,loading:!0}),n=ka();return y.useEffect(()=>{let r=!1;return ZI.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 QZ=6;function JZ(e){let t=0;for(const n of e)t=t*31+n.charCodeAt(0)&4294967295;return Math.abs(t)}function IA(e){const t=JZ(e)%QZ+1;return{bg:`hsl(var(--avatar-${t}-bg))`,fg:`hsl(var(--avatar-${t}-fg))`}}function XI({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}=IA(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 eX=[{label:"App Center",href:"/app-center",icon:c5},{label:"Mac Resources",href:"/mac-resources",icon:f5}],tX=[{label:"Default",href:"/settings/default",icon:p5,adminOnly:!1},{label:"Team",href:"/settings/team",icon:dV,adminOnly:!0},{label:"Tokens",href:"/settings/tokens",icon:ZF,adminOnly:!0}],nX=[{label:"Docs",href:"https://www.tapflow.dev",icon:qF}];function rX(){const{pathname:e}=qr(),t=ka(),{user:n}=LA(),r=(n==null?void 0:n.role)==="Admin",{resolvedTheme:a}=Sc(),o=a==="dark"?"/logo-dark.svg":"/logo.svg",[l,c]=y.useState(null),[f,d]=y.useState("tapflow");y.useEffect(()=>{fetch("/api/v1/settings",{credentials:"include"}).then(h=>h.ok?h.json():null).then(h=>{h!=null&&h.logo_url&&c(h.logo_url),h!=null&&h.team_name&&d(h.team_name)})},[]);async function m(){await fetch("/api/v1/auth/logout",{method:"POST",credentials:"include"}),t("/login",{replace:!0})}return v.jsxs(qL,{collapsible:"icon",children:[v.jsx(VL,{className:"p-2",children:v.jsxs(Dl,{to:"/app-center",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(YL,{children:[v.jsx(_p,{children:v.jsx(Ap,{children:v.jsx(Op,{children:eX.map(h=>v.jsx(Ep,{children:v.jsx(jp,{asChild:!0,isActive:e.startsWith(h.href),tooltip:h.label,children:v.jsxs(Dl,{to:h.href,children:[v.jsx(h.icon,{}),v.jsx("span",{children:h.label})]})})},h.href))})})}),v.jsxs(_p,{children:[v.jsx(uS,{children:"Settings"}),v.jsx(Ap,{children:v.jsx(Op,{children:tX.filter(h=>!h.adminOnly||r).map(h=>v.jsx(Ep,{children:v.jsx(jp,{asChild:!0,isActive:e===h.href,tooltip:h.label,children:v.jsxs(Dl,{to:h.href,children:[v.jsx(h.icon,{}),v.jsx("span",{children:h.label})]})})},h.href))})})]}),v.jsxs(_p,{children:[v.jsx(uS,{children:"Reference"}),v.jsx(Ap,{children:v.jsx(Op,{children:nX.map(h=>v.jsx(Ep,{children:v.jsx(jp,{asChild:!0,tooltip:h.label,children:v.jsxs("a",{href:h.href,target:"_blank",rel:"noopener noreferrer",children:[v.jsx(h.icon,{}),v.jsx("span",{children:h.label})]})})},h.href))})})]})]}),n&&v.jsx(GL,{className:"px-3 py-3",children:v.jsxs(VZ,{children:[v.jsx(GZ,{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(XI,{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(WI,{side:"top",align:"start",className:"w-56",children:[v.jsx(hS,{asChild:!0,children:v.jsxs(Dl,{to:"/settings/default",children:[v.jsx(p5,{className:"mr-2 h-4 w-4"}),"Settings"]})}),v.jsx(KI,{}),v.jsxs(hS,{onClick:m,className:"text-destructive focus:text-destructive",children:[v.jsx(JF,{className:"mr-2 h-4 w-4"}),"Log out"]})]})]})})]})}function aX(){const{theme:e,setTheme:t}=Sc();return v.jsxs(ct,{variant:"ghost",size:"icon",onClick:()=>t(e==="dark"?"light":"dark"),"aria-label":"Toggle theme",children:[v.jsx(lV,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),v.jsx(tV,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"})]})}const QI=y.createContext({node:null,setNode:()=>{}});function iX({children:e}){const[t,n]=y.useState(null),r=y.useMemo(()=>({node:t,setNode:n}),[t]);return v.jsx(QI.Provider,{value:r,children:e})}function BA(){return y.useContext(QI)}function oX(){const{node:e}=BA();return v.jsxs("header",{className:"flex h-16 items-center gap-2 border-b px-4",children:[v.jsx(HL,{className:"-ml-1"}),v.jsx(Ja,{orientation:"vertical",className:"h-4"}),e,v.jsx("div",{className:"flex-1"}),v.jsx(aX,{}),v.jsx(Ja,{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 sX(){const{user:e,loading:t}=LA(),n=qr();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(iX,{children:v.jsxs(UL,{children:[v.jsx(rX,{}),v.jsxs(FL,{children:[v.jsx(oX,{}),v.jsx("main",{className:"flex-1 min-h-0 overflow-auto",children:v.jsx(x7,{})})]})]})}):v.jsx(X1,{to:"/login",replace:!0})}var gd=e=>e.type==="checkbox",hs=e=>e instanceof Date,sr=e=>e==null;const JI=e=>typeof e=="object";var dn=e=>!sr(e)&&!Array.isArray(e)&&JI(e)&&!hs(e),e3=e=>dn(e)&&e.target?gd(e.target)?e.target.checked:e.target.value:e,t3=(e,t)=>t.split(".").some((n,r,a)=>!isNaN(Number(n))&&e.has(a.slice(0,r).join("."))),lX=e=>{const t=e.constructor&&e.constructor.prototype;return dn(t)&&t.hasOwnProperty("isPrototypeOf")},UA=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function vn(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(UA&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(dn(e)&&lX(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=vn(e[a]));return r}var bv=e=>/^\w*$/.test(e),Qt=e=>e===void 0,qA=e=>Array.isArray(e)?e.filter(Boolean):[],HA=e=>qA(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Pe=(e,t,n)=>{if(!t||!dn(e))return n;const a=(bv(t)?[t]:HA(t)).reduce((o,l)=>sr(o)?void 0:o[l],e);return Qt(a)||a===e?Qt(e[t])?n:e[t]:a},Nr=e=>typeof e=="boolean",tr=e=>typeof e=="function",$t=(e,t,n)=>{let r=-1;const a=bv(t)?[t]:HA(t),o=a.length,l=o-1;for(;++r<o;){const c=a[r];let f=n;if(r!==l){const d=e[c];f=dn(d)||Array.isArray(d)?d:isNaN(+a[r+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=f,e=e[c]}};const wo={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},Aa={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},wa={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Wb="form",n3="root",r3=L.createContext(null);r3.displayName="HookFormControlContext";const FA=()=>L.useContext(r3);var a3=(e,t,n,r=!0)=>{const a={};for(const o in e)Object.defineProperty(a,o,{get:()=>{const l=o;return t._proxyFormState[l]!==Aa.all&&(t._proxyFormState[l]=!r||Aa.all),n&&(n[l]=!0),e[l]}});return a};const VA=typeof window<"u"?L.useLayoutEffect:L.useEffect;function cX(e){const t=FA(),{control:n=t,disabled:r,name:a,exact:o}=e||{},[l,c]=L.useState(()=>({...n._formState,defaultValues:n._defaultValues})),f=L.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return VA(()=>n._subscribe({name:a,formState:f.current,exact:o,callback:d=>{!r&&c({...n._formState,...d,defaultValues:n._defaultValues})}}),[a,r,o]),L.useEffect(()=>{f.current.isValid&&n._setValid(!0)},[n]),L.useMemo(()=>a3(l,n,f.current,!1),[l,n])}var ar=e=>typeof e=="string",mS=(e,t,n,r,a)=>ar(e)?(r&&t.watch.add(e),Pe(n,e,a)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),Pe(n,o))):(r&&(t.watchAll=!0),n),vS=e=>sr(e)||!JI(e);function Mr(e,t,n=new WeakSet){if(e===t)return!0;if(vS(e)||vS(t))return Object.is(e,t);if(hs(e)&&hs(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 c=t[o];if(hs(l)&&hs(c)||(dn(l)||Array.isArray(l))&&(dn(c)||Array.isArray(c))?!Mr(l,c,n):!Object.is(l,c))return!1}}return!0}function GA(e){const t=FA(),{control:n=t,name:r,defaultValue:a,disabled:o,exact:l,compute:c}=e||{},f=L.useRef(a),d=L.useRef(c),m=L.useRef(void 0),h=L.useRef(n),g=L.useRef(r);d.current=c;const[x,A]=L.useState(()=>{const R=n._getWatch(r,f.current);return d.current?d.current(R):R}),S=L.useCallback(R=>{const T=mS(r,n._names,R||n._formValues,!1,f.current);return d.current?d.current(T):T},[n._formValues,n._names,r]),w=L.useCallback(R=>{if(!o){const T=mS(r,n._names,R||n._formValues,!1,f.current);if(d.current){const C=d.current(T);Mr(C,m.current)||(A(C),m.current=C)}else A(T)}},[n._formValues,n._names,o,r]);VA(()=>((h.current!==n||!Mr(g.current,r))&&(h.current=n,g.current=r,w()),n._subscribe({name:r,formState:{values:!0},exact:l,callback:R=>{w(R.values)}})),[n,l,r,w]),L.useEffect(()=>n._removeUnmounted());const O=h.current!==n,E=g.current,j=L.useMemo(()=>{if(o)return null;const R=!O&&!Mr(E,r);return O||R?S():null},[o,O,r,E,S]);return j!==null?j:x}function uX(e){const t=FA(),{name:n,disabled:r,control:a=t,shouldUnregister:o,defaultValue:l,exact:c=!0}=e,f=t3(a._names.array,n),d=L.useMemo(()=>Pe(a._formValues,n,Pe(a._defaultValues,n,l)),[a,n,l]),m=GA({control:a,name:n,defaultValue:d,exact:c}),h=cX({control:a,name:n,exact:c}),g=L.useRef(e),x=L.useRef(a.register(n,{...e.rules,value:m,...Nr(e.disabled)?{disabled:e.disabled}:{}}));g.current=e;const A=L.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Pe(h.errors,n)},isDirty:{enumerable:!0,get:()=>!!Pe(h.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Pe(h.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Pe(h.validatingFields,n)},error:{enumerable:!0,get:()=>Pe(h.errors,n)}}),[h,n]),S=L.useCallback(j=>x.current.onChange({target:{value:e3(j),name:n},type:wo.CHANGE}),[n]),w=L.useCallback(()=>x.current.onBlur({target:{value:Pe(a._formValues,n),name:n},type:wo.BLUR}),[n,a._formValues]),O=L.useCallback(j=>{const R=Pe(a._fields,n);R&&R._f&&j&&(R._f.ref={focus:()=>tr(j.focus)&&j.focus(),select:()=>tr(j.select)&&j.select(),setCustomValidity:T=>tr(j.setCustomValidity)&&j.setCustomValidity(T),reportValidity:()=>tr(j.reportValidity)&&j.reportValidity()})},[a._fields,n]),E=L.useMemo(()=>({name:n,value:m,...Nr(r)||h.disabled?{disabled:h.disabled||r}:{},onChange:S,onBlur:w,ref:O}),[n,r,h.disabled,S,w,O,m]);return L.useEffect(()=>{const j=a._options.shouldUnregister||o;a.register(n,{...g.current.rules,...Nr(g.current.disabled)?{disabled:g.current.disabled}:{}});const R=(T,C)=>{const N=Pe(a._fields,T);N&&N._f&&(N._f.mount=C)};if(R(n,!0),j){const T=vn(Pe(a._options.defaultValues,n,g.current.defaultValue));$t(a._defaultValues,n,T),Qt(Pe(a._formValues,n))&&$t(a._formValues,n,T)}return!f&&a.register(n),()=>{(f?j&&!a._state.action:j)?a.unregister(n):R(n,!1)}},[n,a,f,o]),L.useEffect(()=>{a._setDisabledField({disabled:r,name:n})},[r,n,a]),L.useMemo(()=>({field:E,formState:h,fieldState:A}),[E,h,A])}const Hp=e=>e.render(uX(e)),fX=L.createContext(null);fX.displayName="HookFormContext";var YA=(e,t,n,r,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:a||!0}}:{},rf=e=>Array.isArray(e)?e:[e],sR=()=>{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 i3(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const a=e[r],o=t[r];if(a&&dn(a)&&o){const l=i3(a,o);dn(l)&&(n[r]=l)}else e[r]&&(n[r]=o)}return n}var Jn=e=>dn(e)&&!Object.keys(e).length,WA=e=>e.type==="file",Fp=e=>{if(!UA)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},o3=e=>e.type==="select-multiple",KA=e=>e.type==="radio",dX=e=>KA(e)||gd(e),Kb=e=>Fp(e)&&e.isConnected;function hX(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;){if(sr(e)){e=void 0;break}e=e[t[r]],r++}return e}function pX(e){for(const t in e)if(e.hasOwnProperty(t)&&!Qt(e[t]))return!1;return!0}function _n(e,t){if(ar(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const n=Array.isArray(t)?t:bv(t)?[t]:HA(t),r=n.length===1?e:hX(e,n),a=n.length-1,o=n[a];return r&&delete r[o],a!==0&&(dn(r)&&Jn(r)||Array.isArray(r)&&pX(r))&&_n(e,n.slice(0,-1)),e}var mX=e=>{for(const t in e)if(tr(e[t]))return!0;return!1};function s3(e){return Array.isArray(e)||dn(e)&&!mX(e)}function gS(e,t={}){for(const n in e){const r=e[n];s3(r)?(t[n]=Array.isArray(r)?[]:{},gS(r,t[n])):Qt(r)||(t[n]=!0)}return t}function yS(e){if(e!==!1){if(e===!0)return!0;if(Array.isArray(e)){const t=e.map(n=>yS(n));return t.some(n=>n!==void 0)?t:void 0}if(dn(e)){const t={};for(const n in e){const r=yS(e[n]);Qt(r)||(t[n]=r)}return Object.keys(t).length?t:void 0}}}function Zu(e,t,n){n||(n=gS(t));for(const r in e){const a=e[r];if(s3(a))Qt(t)||vS(n[r])?n[r]=gS(a,Array.isArray(a)?[]:{}):Zu(a,sr(t)?{}:t[r],n[r]);else{const o=t[r];n[r]=!Mr(a,o)}}return yS(n)||{}}const lR={value:!1,isValid:!1},cR={value:!0,isValid:!0};var l3=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&&!Qt(e[0].attributes.value)?Qt(e[0].value)||e[0].value===""?cR:{value:e[0].value,isValid:!0}:cR:lR}return lR},c3=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Qt(e)?e:t?e===""?NaN:e&&+e:n&&ar(e)?new Date(e):r?r(e):e;const uR={isValid:!1,value:null};var u3=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,uR):uR;function fR(e){const t=e.ref;return WA(t)?t.files:KA(t)?u3(e.refs).value:o3(t)?[...t.selectedOptions].map(({value:n})=>n):gd(t)?l3(e.refs).value:c3(Qt(t.value)?e.ref.value:t.value,e)}var vX=(e,t,n,r)=>{const a={};for(const o of e){const l=Pe(t,o);l&&$t(a,o,l._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:r}},Vp=e=>e instanceof RegExp,Lu=e=>Qt(e)?e:Vp(e)?e.source:dn(e)?Vp(e.value)?e.value.source:e.value:e,dR=e=>({isOnSubmit:!e||e===Aa.onSubmit,isOnBlur:e===Aa.onBlur,isOnChange:e===Aa.onChange,isOnAll:e===Aa.all,isOnTouch:e===Aa.onTouched});const hR="AsyncFunction";var gX=e=>!!e&&!!e.validate&&!!(tr(e.validate)&&e.validate.constructor.name===hR||dn(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===hR)),yX=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),pR=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const af=(e,t,n,r)=>{for(const a of n||Object.keys(e)){const o=Pe(e,a);if(o){const{_f:l,...c}=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(af(c,t))break}else if(dn(c)&&af(c,t))break}}};function mR(e,t,n){const r=Pe(e,n);if(r||bv(n))return{error:r,name:n};const a=n.split(".");for(;a.length;){const o=a.join("."),l=Pe(t,o),c=Pe(e,o);if(l&&!Array.isArray(l)&&n!==o)return{name:n};if(c&&c.type)return{name:o,error:c};if(c&&c.root&&c.root.type)return{name:`${o}.root`,error:c.root};a.pop()}return{name:n}}var bX=(e,t,n,r)=>{n(e);const{name:a,...o}=e;return Jn(o)||r&&Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(l=>t[l]===(!r||Aa.all))},xX=(e,t,n)=>!e||!t||e===t||rf(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),wX=(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,SX=(e,t)=>!qA(Pe(e,t)).length&&_n(e,t),_X=(e,t,n)=>{const r=rf(Pe(e,n));return $t(r,n3,t[n]),$t(e,n,r),e};function vR(e,t,n="validate"){if(ar(e)||Array.isArray(e)&&e.every(ar)||Nr(e)&&!e)return{type:n,message:ar(e)?e:"",ref:t}}var Rl=e=>dn(e)&&!Vp(e)?e:{value:e,message:""},gR=async(e,t,n,r,a,o)=>{const{ref:l,refs:c,required:f,maxLength:d,minLength:m,min:h,max:g,pattern:x,validate:A,name:S,valueAsNumber:w,mount:O}=e._f,E=Pe(n,S);if(!O||t.has(S))return{};const j=c?c[0]:l,R=P=>{a&&j.reportValidity&&(j.setCustomValidity(Nr(P)?"":P||""),j.reportValidity())},T={},C=KA(l),N=gd(l),D=C||N,z=(w||WA(l))&&Qt(l.value)&&Qt(E)||Fp(l)&&l.value===""||E===""||Array.isArray(E)&&!E.length||w&&typeof E=="number"&&isNaN(E),V=YA.bind(null,S,r,T),U=(P,B,q,Y=wa.maxLength,$=wa.minLength)=>{const G=P?B:q;T[S]={type:P?Y:$,message:G,ref:l,...V(P?Y:$,G)}};if(o?!Array.isArray(E)||!E.length:f&&(!D&&(z||sr(E))||Nr(E)&&!E||N&&!l3(c).isValid||C&&!u3(c).isValid)){const{value:P,message:B}=ar(f)?{value:!!f,message:f}:Rl(f);if(P&&(T[S]={type:wa.required,message:B,ref:j,...V(wa.required,B)},!r))return R(B),T}if(!z&&(!sr(h)||!sr(g))){let P,B;const q=Rl(g),Y=Rl(h);if(!sr(E)&&!isNaN(E)){const $=l.valueAsNumber||E&&+E;sr(q.value)||(P=$>q.value),sr(Y.value)||(B=$<Y.value)}else{const $=l.valueAsDate||new Date(E),G=ne=>new Date(new Date().toDateString()+" "+ne),F=l.type=="time",K=l.type=="week";ar(q.value)&&E&&(P=F?G(E)>G(q.value):K?E>q.value:$>new Date(q.value)),ar(Y.value)&&E&&(B=F?G(E)<G(Y.value):K?E<Y.value:$<new Date(Y.value))}if((P||B)&&(U(!!P,q.message,Y.message,wa.max,wa.min),!r))return R(T[S].message),T}if((d||m)&&!z&&(ar(E)||o&&Array.isArray(E))){const P=Rl(d),B=Rl(m),q=!sr(P.value)&&E.length>+P.value,Y=!sr(B.value)&&E.length<+B.value;if((q||Y)&&(U(q,P.message,B.message),!r))return R(T[S].message),T}if(x&&!z&&ar(E)){const{value:P,message:B}=Rl(x);if(Vp(P)&&!E.match(P)&&(T[S]={type:wa.pattern,message:B,ref:l,...V(wa.pattern,B)},!r))return R(B),T}if(A){if(tr(A)){const P=await A(E,n),B=vR(P,j);if(B&&(T[S]={...B,...V(wa.validate,B.message)},!r))return R(B.message),T}else if(dn(A)){let P={};for(const B in A){if(!Jn(P)&&!r)break;const q=vR(await A[B](E,n),j,B);q&&(P={...q,...V(B,q.message)},R(q.message),r&&(T[S]=P))}if(!Jn(P)&&(T[S]={ref:j,...P},!r))return T}}return R(!0),T};const AX={mode:Aa.onSubmit,reValidateMode:Aa.onChange,shouldFocusError:!0},f3={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function OX(e={}){let t={...AX,...e},n={...vn(f3),isLoading:tr(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},r={},a=dn(t.defaultValues)||dn(t.values)?vn(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:vn(a),l={action:!1,mount:!1,watch:!1,keepIsValid:!1},c={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},h={...m};let g={...h};const x={array:sR(),state:sR()},A=t.criteriaMode===Aa.all,S=H=>ee=>{clearTimeout(d),d=setTimeout(H,ee)},w=async H=>{if(!l.keepIsValid&&!t.disabled&&(h.isValid||g.isValid||H)){let ee;t.resolver?(ee=Jn((await z()).errors),O()):ee=await P({fields:r,onlyCheckValid:!0,eventType:wo.VALID}),ee!==n.isValid&&x.state.next({isValid:ee})}},O=(H,ee)=>{!t.disabled&&(h.isValidating||h.validatingFields||g.isValidating||g.validatingFields)&&((H||Array.from(c.mount)).forEach(ae=>{ae&&(ee?$t(n.validatingFields,ae,ee):_n(n.validatingFields,ae))}),x.state.next({validatingFields:n.validatingFields,isValidating:!Jn(n.validatingFields)}))},E=()=>{n.dirtyFields=Zu(a,o)},j=(H,ee=[],ae,Re,Ce=!0,je=!0)=>{if(Re&&ae&&!t.disabled){if(l.action=!0,je&&Array.isArray(Pe(r,H))){const Ee=ae(Pe(r,H),Re.argA,Re.argB);Ce&&$t(r,H,Ee)}if(je&&Array.isArray(Pe(n.errors,H))){const Ee=ae(Pe(n.errors,H),Re.argA,Re.argB);Ce&&$t(n.errors,H,Ee),SX(n.errors,H)}if((h.touchedFields||g.touchedFields)&&je&&Array.isArray(Pe(n.touchedFields,H))){const Ee=ae(Pe(n.touchedFields,H),Re.argA,Re.argB);Ce&&$t(n.touchedFields,H,Ee)}(h.dirtyFields||g.dirtyFields)&&E(),x.state.next({name:H,isDirty:q(H,ee),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else $t(o,H,ee)},R=(H,ee)=>{$t(n.errors,H,ee),x.state.next({errors:n.errors})},T=H=>{n.errors=H,x.state.next({errors:n.errors,isValid:!1})},C=(H,ee,ae,Re)=>{const Ce=Pe(r,H);if(Ce){const je=Qt(Pe(o,H)),Ee=Pe(o,H,Qt(ae)?Pe(a,H):ae);Qt(Ee)||Re&&Re.defaultChecked||ee?$t(o,H,ee?Ee:fR(Ce._f)):G(H,Ee),l.mount&&!l.action&&(w(),je&&n.isDirty&&(h.isDirty||g.isDirty)&&(q()||(n.isDirty=!1,x.state.next({...n}))))}},N=(H,ee,ae,Re,Ce)=>{let je=!1,Ee=!1;const We={name:H};if(!t.disabled){if(!ae||Re){(h.isDirty||g.isDirty)&&(Ee=n.isDirty,n.isDirty=We.isDirty=q(),je=Ee!==We.isDirty);const Ge=Mr(Pe(a,H),ee);Ee=!!Pe(n.dirtyFields,H),Ge?_n(n.dirtyFields,H):$t(n.dirtyFields,H,!0),We.dirtyFields=n.dirtyFields,je=je||(h.dirtyFields||g.dirtyFields)&&Ee!==!Ge}if(ae){const Ge=Pe(n.touchedFields,H);Ge||($t(n.touchedFields,H,ae),We.touchedFields=n.touchedFields,je=je||(h.touchedFields||g.touchedFields)&&Ge!==ae)}je&&Ce&&x.state.next(We)}return je?We:{}},D=(H,ee,ae,Re)=>{const Ce=Pe(n.errors,H),je=(h.isValid||g.isValid)&&Nr(ee)&&n.isValid!==ee;if(t.delayError&&ae?(f=S(()=>R(H,ae)),f(t.delayError)):(clearTimeout(d),f=null,ae?$t(n.errors,H,ae):_n(n.errors,H)),(ae?!Mr(Ce,ae):Ce)||!Jn(Re)||je){const Ee={...Re,...je&&Nr(ee)?{isValid:ee}:{},errors:n.errors,name:H};n={...n,...Ee},x.state.next(Ee)}},z=async H=>(O(H,!0),await t.resolver(o,t.context,vX(H||c.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),V=async H=>{const{errors:ee}=await z(H);if(O(H),H)for(const ae of H){const Re=Pe(ee,ae);Re?$t(n.errors,ae,Re):_n(n.errors,ae)}else n.errors=ee;return ee},U=async({name:H,eventType:ee})=>{if(e.validate){const ae=await e.validate({formValues:o,formState:n,name:H,eventType:ee});if(dn(ae))for(const Re in ae)ae[Re]&&ve(`${Wb}.${Re}`,{message:ar(ae.message)?ae.message:"",type:wa.validate});else ar(ae)||!ae?ve(Wb,{message:ae||"",type:wa.validate}):Se(Wb);return ae}return!0},P=async({fields:H,onlyCheckValid:ee,name:ae,eventType:Re,context:Ce={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(Ce.runRootValidation=!0,!await U({name:ae,eventType:Re})&&(Ce.valid=!1,ee)))return Ce.valid;for(const je in H){const Ee=H[je];if(Ee){const{_f:We,...Ge}=Ee;if(We){const Ot=c.array.has(We.name),Ct=Ee._f&&gX(Ee._f);Ct&&h.validatingFields&&O([We.name],!0);const Rt=await gR(Ee,c.disabled,o,A,t.shouldUseNativeValidation&&!ee,Ot);if(Ct&&h.validatingFields&&O([We.name]),Rt[We.name]&&(Ce.valid=!1,ee)||(!ee&&(Pe(Rt,We.name)?Ot?_X(n.errors,Rt,We.name):$t(n.errors,We.name,Rt[We.name]):_n(n.errors,We.name)),e.shouldUseNativeValidation&&Rt[We.name]))break}!Jn(Ge)&&await P({context:Ce,onlyCheckValid:ee,fields:Ge,name:je,eventType:Re})}}return Ce.valid},B=()=>{for(const H of c.unMount){const ee=Pe(r,H);ee&&(ee._f.refs?ee._f.refs.every(ae=>!Kb(ae)):!Kb(ee._f.ref))&&Oe(H)}c.unMount=new Set},q=(H,ee)=>!t.disabled&&(H&&ee&&$t(o,H,ee),!Mr(fe(),a)),Y=(H,ee,ae)=>mS(H,c,{...l.mount?o:Qt(ee)?a:ar(H)?{[H]:ee}:ee},ae,ee),$=H=>qA(Pe(l.mount?o:a,H,t.shouldUnregister?Pe(a,H,[]):[])),G=(H,ee,ae={})=>{const Re=Pe(r,H);let Ce=ee;if(Re){const je=Re._f;je&&(!je.disabled&&$t(o,H,c3(ee,je)),Ce=Fp(je.ref)&&sr(ee)?"":ee,o3(je.ref)?[...je.ref.options].forEach(Ee=>Ee.selected=Ce.includes(Ee.value)):je.refs?gd(je.ref)?je.refs.forEach(Ee=>{(!Ee.defaultChecked||!Ee.disabled)&&(Array.isArray(Ce)?Ee.checked=!!Ce.find(We=>We===Ee.value):Ee.checked=Ce===Ee.value||!!Ce)}):je.refs.forEach(Ee=>Ee.checked=Ee.value===Ce):WA(je.ref)?je.ref.value="":(je.ref.value=Ce,je.ref.type||x.state.next({name:H,values:vn(o)})))}(ae.shouldDirty||ae.shouldTouch)&&N(H,Ce,ae.shouldTouch,ae.shouldDirty,!0),ae.shouldValidate&&Q(H)},F=(H,ee,ae)=>{for(const Re in ee){if(!ee.hasOwnProperty(Re))return;const Ce=ee[Re],je=H+"."+Re,Ee=Pe(r,je);(c.array.has(H)||dn(Ce)||Ee&&!Ee._f)&&!hs(Ce)?F(je,Ce,ae):G(je,Ce,ae)}},K=(H,ee,ae={})=>{const Re=Pe(r,H),Ce=c.array.has(H),je=vn(ee),Ee=Pe(o,H),We=Mr(Ee,je);if($t(o,H,je),Ce)x.array.next({name:H,values:vn(o)}),(h.isDirty||h.dirtyFields||g.isDirty||g.dirtyFields)&&ae.shouldDirty&&(E(),x.state.next({name:H,dirtyFields:n.dirtyFields,isDirty:q(H,je)}));else{const Ge=Array.isArray(je)&&!je.length||Jn(je);!Re||Re._f||sr(je)||Ge?G(H,je,ae):F(H,je,ae)}if(!We){const Ge=pR(H,c);x.state.next({...Ge&&n,name:l.mount||Ge?H:void 0,values:vn(o)})}},ne=H=>{const ee=tr(H)?H(o):H;Mr(o,ee)||(o={...o,...ee},x.state.next({...n,values:o}))},I=async H=>{l.mount=!0;const ee=H.target;let ae=ee.name,Re=!0;const Ce=Pe(r,ae),je=Ge=>{Re=Number.isNaN(Ge)||hs(Ge)&&isNaN(Ge.getTime())||Mr(Ge,Pe(o,ae,Ge))},Ee=dR(t.mode),We=dR(t.reValidateMode);if(Ce){let Ge,Ot;const Ct=ee.type?fR(Ce._f):e3(H),Rt=H.type===wo.BLUR||H.type===wo.FOCUS_OUT,Vt=!yX(Ce._f)&&!e.validate&&!t.resolver&&!Pe(n.errors,ae)&&!Ce._f.deps||wX(Rt,Pe(n.touchedFields,ae),n.isSubmitted,We,Ee),Hr=pR(ae,c,Rt);$t(o,ae,Ct),Rt?(!ee||!ee.readOnly)&&(Ce._f.onBlur&&Ce._f.onBlur(H),f&&f(0)):Ce._f.onChange&&Ce._f.onChange(H);const Fr=N(ae,Ct,Rt),Dn=!Jn(Fr)||Hr;if(!Rt&&x.state.next({name:ae,type:H.type,values:vn(o)}),Vt)return(h.isValid||g.isValid)&&(t.mode==="onBlur"?Rt&&w():Rt||w()),Dn&&x.state.next({name:ae,...Hr?{}:Fr});if(!t.resolver&&e.validate&&await U({name:ae,eventType:H.type}),!Rt&&Hr&&x.state.next({...n}),t.resolver){const{errors:Bn}=await z([ae]);if(O([ae]),je(Ct),Re){const Zn=mR(n.errors,r,ae),Te=mR(Bn,r,Zn.name||ae);Ge=Te.error,ae=Te.name,Ot=Jn(Bn)}}else O([ae],!0),Ge=(await gR(Ce,c.disabled,o,A,t.shouldUseNativeValidation))[ae],O([ae]),je(Ct),Re&&(Ge?Ot=!1:(h.isValid||g.isValid)&&(Ot=await P({fields:r,onlyCheckValid:!0,name:ae,eventType:H.type})));Re&&(Ce._f.deps&&(!Array.isArray(Ce._f.deps)||Ce._f.deps.length>0)&&Q(Ce._f.deps),D(ae,Ot,Ge,Fr))}},Z=(H,ee)=>{if(Pe(n.errors,ee)&&H.focus)return H.focus(),1},Q=async(H,ee={})=>{let ae,Re;const Ce=rf(H);if(t.resolver){const je=await V(Qt(H)?H:Ce);ae=Jn(je),Re=H?!Ce.some(Ee=>Pe(je,Ee)):ae}else H?(Re=(await Promise.all(Ce.map(async je=>{const Ee=Pe(r,je);return await P({fields:Ee&&Ee._f?{[je]:Ee}:Ee,eventType:wo.TRIGGER})}))).every(Boolean),!(!Re&&!n.isValid)&&w()):Re=ae=await P({fields:r,name:H,eventType:wo.TRIGGER});return x.state.next({...!ar(H)||(h.isValid||g.isValid)&&ae!==n.isValid?{}:{name:H},...t.resolver||!H?{isValid:ae}:{},errors:n.errors}),ee.shouldFocus&&!Re&&af(r,Z,H?Ce:c.mount),Re},fe=(H,ee)=>{let ae={...l.mount?o:a};return ee&&(ae=i3(ee.dirtyFields?n.dirtyFields:n.touchedFields,ae)),Qt(H)?ae:ar(H)?Pe(ae,H):H.map(Re=>Pe(ae,Re))},le=(H,ee)=>({invalid:!!Pe((ee||n).errors,H),isDirty:!!Pe((ee||n).dirtyFields,H),error:Pe((ee||n).errors,H),isValidating:!!Pe(n.validatingFields,H),isTouched:!!Pe((ee||n).touchedFields,H)}),Se=H=>{const ee=H?rf(H):void 0;ee==null||ee.forEach(ae=>_n(n.errors,ae)),ee?ee.forEach(ae=>{x.state.next({name:ae,errors:n.errors})}):x.state.next({errors:{}})},ve=(H,ee,ae)=>{const Re=(Pe(r,H,{_f:{}})._f||{}).ref,Ce=Pe(n.errors,H)||{},{ref:je,message:Ee,type:We,...Ge}=Ce;$t(n.errors,H,{...Ge,...ee,ref:Re}),x.state.next({name:H,errors:n.errors,isValid:!1}),ae&&ae.shouldFocus&&Re&&Re.focus&&Re.focus()},xe=(H,ee)=>tr(H)?x.state.subscribe({next:ae=>"values"in ae&&H(ae.values||Y(void 0,ee),ae)}):Y(H,ee,!0),ce=H=>x.state.subscribe({next:ee=>{if(xX(H.name,ee.name,H.exact)&&bX(ee,H.formState||h,on,H.reRenderRoot)){const ae={...o};H.callback({values:ae,...n,...ee,defaultValues:a})}}}).unsubscribe,Ae=H=>(l.mount=!0,g={...g,...H.formState},ce({...H,formState:{...m,...H.formState}})),Oe=(H,ee={})=>{for(const ae of H?rf(H):c.mount)c.mount.delete(ae),c.array.delete(ae),ee.keepValue||(_n(r,ae),_n(o,ae)),!ee.keepError&&_n(n.errors,ae),!ee.keepDirty&&_n(n.dirtyFields,ae),!ee.keepTouched&&_n(n.touchedFields,ae),!ee.keepIsValidating&&_n(n.validatingFields,ae),!t.shouldUnregister&&!ee.keepDefaultValue&&_n(a,ae);x.state.next({values:vn(o)}),x.state.next({...n,...ee.keepDirty?{isDirty:q()}:{}}),!ee.keepIsValid&&w()},oe=({disabled:H,name:ee})=>{if(Nr(H)&&l.mount||H||c.disabled.has(ee)){const Ce=c.disabled.has(ee)!==!!H;H?c.disabled.add(ee):c.disabled.delete(ee),Ce&&l.mount&&!l.action&&w()}},qe=(H,ee={})=>{let ae=Pe(r,H);const Re=Nr(ee.disabled)||Nr(t.disabled),Ce=!c.registerName.has(H)&&ae&&ae._f&&!ae._f.mount;return $t(r,H,{...ae||{},_f:{...ae&&ae._f?ae._f:{ref:{name:H}},name:H,mount:!0,...ee}}),c.mount.add(H),ae&&!Ce?oe({disabled:Nr(ee.disabled)?ee.disabled:t.disabled,name:H}):C(H,!0,ee.value),{...Re?{disabled:ee.disabled||t.disabled}:{},...t.progressive?{required:!!ee.required,min:Lu(ee.min),max:Lu(ee.max),minLength:Lu(ee.minLength),maxLength:Lu(ee.maxLength),pattern:Lu(ee.pattern)}:{},name:H,onChange:I,onBlur:I,ref:je=>{if(je){c.registerName.add(H),qe(H,ee),c.registerName.delete(H),ae=Pe(r,H);const Ee=Qt(je.value)&&je.querySelectorAll&&je.querySelectorAll("input,select,textarea")[0]||je,We=dX(Ee),Ge=ae._f.refs||[];if(We?Ge.find(Ot=>Ot===Ee):Ee===ae._f.ref)return;$t(r,H,{_f:{...ae._f,...We?{refs:[...Ge.filter(Kb),Ee,...Array.isArray(Pe(a,H))?[{}]:[]],ref:{type:Ee.type,name:H}}:{ref:Ee}}}),C(H,!1,void 0,Ee)}else ae=Pe(r,H,{}),ae._f&&(ae._f.mount=!1),(t.shouldUnregister||ee.shouldUnregister)&&!(t3(c.array,H)&&l.action)&&c.unMount.add(H)}}},De=()=>t.shouldFocusError&&af(r,Z,c.mount),Je=H=>{Nr(H)&&(x.state.next({disabled:H}),af(r,(ee,ae)=>{const Re=Pe(r,ae);Re&&(ee.disabled=Re._f.disabled||H,Array.isArray(Re._f.refs)&&Re._f.refs.forEach(Ce=>{Ce.disabled=Re._f.disabled||H}))},0,!1))},Ye=(H,ee)=>async ae=>{let Re;ae&&(ae.preventDefault&&ae.preventDefault(),ae.persist&&ae.persist());let Ce=vn(o);if(x.state.next({isSubmitting:!0}),t.resolver){const{errors:je,values:Ee}=await z();O(),n.errors=je,Ce=vn(Ee)}else await P({fields:r,eventType:wo.SUBMIT});if(c.disabled.size)for(const je of c.disabled)_n(Ce,je);if(_n(n.errors,n3),Jn(n.errors)){x.state.next({errors:{}});try{await H(Ce,ae)}catch(je){Re=je}}else ee&&await ee({...n.errors},ae),De(),setTimeout(De);if(x.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Jn(n.errors)&&!Re,submitCount:n.submitCount+1,errors:n.errors}),Re)throw Re},at=(H,ee={})=>{Pe(r,H)&&(Qt(ee.defaultValue)?K(H,vn(Pe(a,H))):(K(H,ee.defaultValue),$t(a,H,vn(ee.defaultValue))),ee.keepTouched||_n(n.touchedFields,H),ee.keepDirty||(_n(n.dirtyFields,H),n.isDirty=ee.defaultValue?q(H,vn(Pe(a,H))):q()),ee.keepError||(_n(n.errors,H),h.isValid&&w()),x.state.next({...n}))},jt=(H,ee={})=>{const ae=H?vn(H):a,Re=vn(ae),Ce=Jn(H),je=Ce?a:Re;if(ee.keepDefaultValues||(a=ae),!ee.keepValues){if(ee.keepDirtyValues){const Ee=new Set([...c.mount,...Object.keys(Zu(a,o))]);for(const We of Array.from(Ee)){const Ge=Pe(n.dirtyFields,We),Ot=Pe(o,We),Ct=Pe(je,We);Ge&&!Qt(Ot)?$t(je,We,Ot):!Ge&&!Qt(Ct)&&K(We,Ct)}}else{if(UA&&Qt(H))for(const Ee of c.mount){const We=Pe(r,Ee);if(We&&We._f){const Ge=Array.isArray(We._f.refs)?We._f.refs[0]:We._f.ref;if(Fp(Ge)){const Ot=Ge.closest("form");if(Ot){Ot.reset();break}}}}if(ee.keepFieldsRef)for(const Ee of c.mount)K(Ee,Pe(je,Ee));else r={}}o=t.shouldUnregister?ee.keepDefaultValues?vn(a):{}:vn(je),x.array.next({values:{...je}}),x.state.next({values:{...je}})}c={mount:ee.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!h.isValid||!!ee.keepIsValid||!!ee.keepDirtyValues||!t.shouldUnregister&&!Jn(je),l.watch=!!t.shouldUnregister,l.keepIsValid=!!ee.keepIsValid,l.action=!1,ee.keepErrors||(n.errors={}),x.state.next({submitCount:ee.keepSubmitCount?n.submitCount:0,isDirty:Ce?!1:ee.keepDirty?n.isDirty:!!(ee.keepDefaultValues&&!Mr(H,a)),isSubmitted:ee.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Ce?{}:ee.keepDirtyValues?ee.keepDefaultValues&&o?Zu(a,o):n.dirtyFields:ee.keepDefaultValues&&H?Zu(a,H):ee.keepDirty?n.dirtyFields:{},touchedFields:ee.keepTouched?n.touchedFields:{},errors:ee.keepErrors?n.errors:{},isSubmitSuccessful:ee.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:a})},dt=(H,ee)=>jt(tr(H)?H(o):H,{...t.resetOptions,...ee}),gn=(H,ee={})=>{const ae=Pe(r,H),Re=ae&&ae._f;if(Re){const Ce=Re.refs?Re.refs[0]:Re.ref;Ce.focus&&setTimeout(()=>{Ce.focus(),ee.shouldSelect&&tr(Ce.select)&&Ce.select()})}},on=H=>{n={...n,...H}},Ft={control:{register:qe,unregister:Oe,getFieldState:le,handleSubmit:Ye,setError:ve,_subscribe:ce,_runSchema:z,_updateIsValidating:O,_focusError:De,_getWatch:Y,_getDirty:q,_setValid:w,_setFieldArray:j,_setDisabledField:oe,_setErrors:T,_getFieldArray:$,_reset:jt,_resetDefaultValues:()=>tr(t.defaultValues)&&t.defaultValues().then(H=>{dt(H,t.resetOptions),x.state.next({isLoading:!1})}),_removeUnmounted:B,_disableForm:Je,_subjects:x,_proxyFormState:h,get _fields(){return r},get _formValues(){return o},get _state(){return l},set _state(H){l=H},get _defaultValues(){return a},get _names(){return c},set _names(H){c=H},get _formState(){return n},get _options(){return t},set _options(H){t={...t,...H}}},subscribe:Ae,trigger:Q,register:qe,handleSubmit:Ye,watch:xe,setValue:K,setValues:ne,getValues:fe,reset:dt,resetField:at,clearErrors:Se,unregister:Oe,setError:ve,setFocus:gn,getFieldState:le};return{...Ft,formControl:Ft}}function Ci(e={}){const t=L.useRef(void 0),n=L.useRef(void 0),[r,a]=L.useState(()=>({...vn(f3),isLoading:tr(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:tr(e.defaultValues)?void 0:e.defaultValues}));if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!tr(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...c}=OX(e);t.current={...c,formState:r}}const o=t.current.control;return o._options=e,VA(()=>{const l=o._subscribe({formState:o._proxyFormState,callback:()=>a({...o._formState}),reRenderRoot:!0});return a(c=>({...c,isReady:!0})),o._formState.isReady=!0,l},[o]),L.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),L.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),L.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),L.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),L.useEffect(()=>{if(o._proxyFormState.isDirty){const l=o._getDirty();l!==r.isDirty&&o._subjects.state.next({isDirty:l})}},[o,r.isDirty]),L.useEffect(()=>{var l;e.values&&!Mr(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(c=>({...c}))):o._resetDefaultValues()},[o,e.values]),L.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=L.useMemo(()=>a3(r,o),[o,r]),t.current}const yR=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Pe(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},bS=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?yR(r.ref,n,e):r&&r.refs&&r.refs.forEach(a=>yR(a,n,e))}},bR=(e,t)=>{t.shouldUseNativeValidation&&bS(e,t);const n={};for(const r in e){const a=Pe(t.fields,r),o=Object.assign(e[r]||{},{ref:a&&a.ref});if(EX(t.names||Object.keys(e),r)){const l=Object.assign({},Pe(n,r));$t(l,"root",o),$t(n,r,l)}else $t(n,r,o)}return n},EX=(e,t)=>{const n=xR(t);return e.some(r=>xR(r).match(`^${n}\\.\\d+`))};function xR(e){return e.replace(/\]|\[/g,"")}var wR;function we(e,t,n){function r(c,f){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:f,constr:l,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,f);const d=l.prototype,m=Object.keys(d);for(let h=0;h<m.length;h++){const g=m[h];g in c||(c[g]=d[g].bind(c))}}const a=(n==null?void 0:n.Parent)??Object;class o extends a{}Object.defineProperty(o,"name",{value:e});function l(c){var f;const d=n!=null&&n.Parent?new o:this;r(d,c),(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:c=>{var f,d;return n!=null&&n.Parent&&c instanceof n.Parent?!0:(d=(f=c==null?void 0:c._zod)==null?void 0:f.traits)==null?void 0:d.has(e)}}),Object.defineProperty(l,"name",{value:e}),l}class ql extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class d3 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(wR=globalThis).__zod_globalConfig??(wR.__zod_globalConfig={});const ZA=globalThis.__zod_globalConfig;function _s(e){return ZA}function h3(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 xS(e,t){return typeof t=="bigint"?t.toString():t}function XA(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function QA(e){return e==null}function JA(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const SR=Symbol("evaluating");function qt(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==SR)return r===void 0&&(r=SR,r=n()),r},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function Ls(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Po(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function _R(e){return JSON.stringify(e)}function jX(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const p3="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Gp(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const TX=XA(()=>{var e;if(ZA.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 vf(e){if(Gp(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Gp(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function m3(e){return vf(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const CX=new Set(["string","number","symbol"]);function xv(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Do(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 Qe(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 RX(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function NX(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=Po(e._zod.def,{get shape(){const l={};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(l[c]=n.shape[c])}return Ls(this,"shape",l),l},checks:[]});return Do(e,o)}function MX(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=Po(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete l[c]}return Ls(this,"shape",l),l},checks:[]});return Do(e,o)}function PX(e,t){if(!vf(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=Po(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Ls(this,"shape",o),o}});return Do(e,a)}function DX(e,t){if(!vf(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Po(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Ls(this,"shape",r),r}});return Do(e,n)}function kX(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=Po(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t._zod.def.shape};return Ls(this,"shape",a),a},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Do(e,n)}function $X(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=Po(t._zod.def,{get shape(){const c=t._zod.def.shape,f={...c};if(n)for(const d in n){if(!(d in c))throw new Error(`Unrecognized key: "${d}"`);n[d]&&(f[d]=e?new e({type:"optional",innerType:c[d]}):c[d])}else for(const d in c)f[d]=e?new e({type:"optional",innerType:c[d]}):c[d];return Ls(this,"shape",f),f},checks:[]});return Do(t,l)}function zX(e,t,n){const r=Po(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 Ls(this,"shape",o),o}});return Do(t,r)}function kl(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 LX(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 v3(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function np(e){return typeof e=="string"?e:e==null?void 0:e.message}function As(e,t,n){var f,d,m,h,g,x;const r=e.message?e.message:np((m=(d=(f=e.inst)==null?void 0:f._zod.def)==null?void 0:d.error)==null?void 0:m.call(d,e))??np((h=t==null?void 0:t.error)==null?void 0:h.call(t,e))??np((g=n.customError)==null?void 0:g.call(n,e))??np((x=n.localeError)==null?void 0:x.call(n,e))??"Invalid input",{inst:a,continue:o,input:l,...c}=e;return c.path??(c.path=[]),c.message=r,t!=null&&t.reportInput&&(c.input=l),c}function eO(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function gf(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const g3=(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,xS,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},tO=we("$ZodError",g3),wv=we("$ZodError",g3,{Parent:Error});function IX(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 BX(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(c=>r({issues:c},[...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 c=[...o,...l.path];if(c.length===0)n._errors.push(t(l));else{let f=n,d=0;for(;d<c.length;){const m=c[d];d===c.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 Sv=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 ql;if(l.issues.length){const c=new((a==null?void 0:a.Err)??e)(l.issues.map(f=>As(f,o,_s())));throw p3(c,a==null?void 0:a.callee),c}return l.value},UX=Sv(wv),_v=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 c=new((a==null?void 0:a.Err)??e)(l.issues.map(f=>As(f,o,_s())));throw p3(c,a==null?void 0:a.callee),c}return l.value},qX=_v(wv),Av=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 ql;return o.issues.length?{success:!1,error:new(e??tO)(o.issues.map(l=>As(l,a,_s())))}:{success:!0,data:o.value}},HX=Av(wv),Ov=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=>As(l,a,_s())))}:{success:!0,data:o.value}},FX=Ov(wv),VX=e=>(t,n,r)=>{const a=r?{...r,direction:"backward"}:{direction:"backward"};return Sv(e)(t,n,a)},GX=e=>(t,n,r)=>Sv(e)(t,n,r),YX=e=>async(t,n,r)=>{const a=r?{...r,direction:"backward"}:{direction:"backward"};return _v(e)(t,n,a)},WX=e=>async(t,n,r)=>_v(e)(t,n,r),KX=e=>(t,n,r)=>{const a=r?{...r,direction:"backward"}:{direction:"backward"};return Av(e)(t,n,a)},ZX=e=>(t,n,r)=>Av(e)(t,n,r),XX=e=>async(t,n,r)=>{const a=r?{...r,direction:"backward"}:{direction:"backward"};return Ov(e)(t,n,a)},QX=e=>async(t,n,r)=>Ov(e)(t,n,r),JX=/^[cC][0-9a-z]{6,}$/,eQ=/^[0-9a-z]+$/,tQ=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,nQ=/^[0-9a-vA-V]{20}$/,rQ=/^[A-Za-z0-9]{27}$/,aQ=/^[a-zA-Z0-9_-]{21}$/,iQ=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,oQ=/^([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})$/,AR=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)$/,sQ=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,lQ="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function cQ(){return new RegExp(lQ,"u")}const uQ=/^(?:(?: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])$/,fQ=/^(([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}|:))$/,dQ=/^((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])$/,hQ=/^(([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])$/,pQ=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,y3=/^[A-Za-z0-9_-]*$/,mQ=/^https?$/,vQ=/^\+[1-9]\d{6,14}$/,b3="(?:(?:\\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])))",gQ=new RegExp(`^${b3}$`);function x3(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 yQ(e){return new RegExp(`^${x3(e)}$`)}function bQ(e){const t=x3({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(`^${b3}T(?:${r})$`)}const xQ=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}$`)},wQ=/^(?:true|false)$/i,SQ=/^[^A-Z]*$/,_Q=/^[^a-z]*$/,ni=we("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),AQ=we("$ZodCheckMaxLength",(e,t)=>{var n;ni.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!QA(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=eO(a);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),OQ=we("$ZodCheckMinLength",(e,t)=>{var n;ni.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!QA(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=eO(a);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),EQ=we("$ZodCheckLengthEquals",(e,t)=>{var n;ni.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!QA(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=eO(a),c=o>t.length;r.issues.push({origin:l,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Ev=we("$ZodCheckStringFormat",(e,t)=>{var n,r;ni.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=()=>{})}),jQ=we("$ZodCheckRegex",(e,t)=>{Ev.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})}}),TQ=we("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=SQ),Ev.init(e,t)}),CQ=we("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=_Q),Ev.init(e,t)}),RQ=we("$ZodCheckIncludes",(e,t)=>{ni.init(e,t);const n=xv(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})}}),NQ=we("$ZodCheckStartsWith",(e,t)=>{ni.init(e,t);const n=new RegExp(`^${xv(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})}}),MQ=we("$ZodCheckEndsWith",(e,t)=>{ni.init(e,t);const n=new RegExp(`.*${xv(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})}}),PQ=we("$ZodCheckOverwrite",(e,t)=>{ni.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class DQ{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 kQ={major:4,minor:4,patch:3},jn=we("$ZodType",(e,t)=>{var a;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=kQ;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=(c,f,d)=>{let m=kl(c),h;for(const g of f){if(g._zod.def.when){if(LX(c)||!g._zod.def.when(c))continue}else if(m)continue;const x=c.issues.length,A=g._zod.check(c);if(A instanceof Promise&&(d==null?void 0:d.async)===!1)throw new ql;if(h||A instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await A,c.issues.length!==x&&(m||(m=kl(c,x)))});else{if(c.issues.length===x)continue;m||(m=kl(c,x))}}return h?h.then(()=>c):c},l=(c,f,d)=>{if(kl(c))return c.aborted=!0,c;const m=o(f,r,d);if(m instanceof Promise){if(d.async===!1)throw new ql;return m.then(h=>e._zod.parse(h,d))}return e._zod.parse(m,d)};e._zod.run=(c,f)=>{if(f.skipChecks)return e._zod.parse(c,f);if(f.direction==="backward"){const m=e._zod.parse({value:c.value,issues:[]},{...f,skipChecks:!0});return m instanceof Promise?m.then(h=>l(h,c,f)):l(m,c,f)}const d=e._zod.parse(c,f);if(d instanceof Promise){if(f.async===!1)throw new ql;return d.then(m=>o(m,r,f))}return o(d,r,f)}}qt(e,"~standard",()=>({validate:o=>{var l;try{const c=HX(e,o);return c.success?{value:c.data}:{issues:(l=c.error)==null?void 0:l.issues}}catch{return FX(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}))}),nO=we("$ZodString",(e,t)=>{var n;jn.init(e,t),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??xQ(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}}),an=we("$ZodStringFormat",(e,t)=>{Ev.init(e,t),nO.init(e,t)}),$Q=we("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=oQ),an.init(e,t)}),zQ=we("$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=AR(r))}else t.pattern??(t.pattern=AR());an.init(e,t)}),LQ=we("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=sQ),an.init(e,t)}),IQ=we("$ZodURL",(e,t)=>{an.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)===mQ.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})}}}),BQ=we("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=cQ()),an.init(e,t)}),UQ=we("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=aQ),an.init(e,t)}),qQ=we("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=JX),an.init(e,t)}),HQ=we("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=eQ),an.init(e,t)}),FQ=we("$ZodULID",(e,t)=>{t.pattern??(t.pattern=tQ),an.init(e,t)}),VQ=we("$ZodXID",(e,t)=>{t.pattern??(t.pattern=nQ),an.init(e,t)}),GQ=we("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=rQ),an.init(e,t)}),YQ=we("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=bQ(t)),an.init(e,t)}),WQ=we("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=gQ),an.init(e,t)}),KQ=we("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=yQ(t)),an.init(e,t)}),ZQ=we("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=iQ),an.init(e,t)}),XQ=we("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=uQ),an.init(e,t),e._zod.bag.format="ipv4"}),QQ=we("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=fQ),an.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})}}}),JQ=we("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=dQ),an.init(e,t)}),eJ=we("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=hQ),an.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 w3(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const tJ=we("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=pQ),an.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{w3(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function nJ(e){if(!y3.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return w3(n)}const rJ=we("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=y3),an.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{nJ(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),aJ=we("$ZodE164",(e,t)=>{t.pattern??(t.pattern=vQ),an.init(e,t)});function iJ(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 oJ=we("$ZodJWT",(e,t)=>{an.init(e,t),e._zod.check=n=>{iJ(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),sJ=we("$ZodBoolean",(e,t)=>{jn.init(e,t),e._zod.pattern=wQ,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const a=n.value;return typeof a=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:a,inst:e}),n}}),lJ=we("$ZodUnknown",(e,t)=>{jn.init(e,t),e._zod.parse=n=>n}),cJ=we("$ZodNever",(e,t)=>{jn.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(...v3(n,e.issues)),t.value[n]=e.value}const uJ=we("$ZodArray",(e,t)=>{jn.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 c=a[l],f=t.element._zod.run({value:c,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 Yp(e,t,n,r,a,o){const l=n in r;if(e.issues.length){if(a&&o&&!l)return;t.issues.push(...v3(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 S3(e){var r,a,o,l;const t=Object.keys(e.shape);for(const c of t)if(!((l=(o=(a=(r=e.shape)==null?void 0:r[c])==null?void 0:a._zod)==null?void 0:o.traits)!=null&&l.has("$ZodType")))throw new Error(`Invalid element at key "${c}": expected a Zod schema`);const n=RX(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function _3(e,t,n,r,a,o){const l=[],c=a.keySet,f=a.catchall._zod,d=f.def.type,m=f.optin==="optional",h=f.optout==="optional";for(const g in t){if(g==="__proto__"||c.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=>Yp(A,n,g,t,m,h))):Yp(x,n,g,t,m,h)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const fJ=we("$ZodObject",(e,t)=>{jn.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!(n!=null&&n.get)){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const f={...c};return Object.defineProperty(t,"shape",{value:f}),f}})}const r=XA(()=>S3(t));qt(e._zod,"propValues",()=>{const c=t.shape,f={};for(const d in c){const m=c[d]._zod;if(m.values){f[d]??(f[d]=new Set);for(const h of m.values)f[d].add(h)}}return f});const a=Gp,o=t.catchall;let l;e._zod.parse=(c,f)=>{l??(l=r.value);const d=c.value;if(!a(d))return c.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),c;c.value={};const m=[],h=l.shape;for(const g of l.keys){const x=h[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=>Yp(O,c,g,d,A,S))):Yp(w,c,g,d,A,S)}return o?_3(m,d,c,f,r.value,e):m.length?Promise.all(m).then(()=>c):c}}),dJ=we("$ZodObjectJIT",(e,t)=>{fJ.init(e,t);const n=e._zod.parse,r=XA(()=>S3(t)),a=g=>{var j,R;const x=new DQ(["shape","payload","ctx"]),A=r.value,S=T=>{const C=_R(T);return`shape[${C}]._zod.run({ value: input[${C}], issues: [] }, ctx)`};x.write("const input = payload.value;");const w=Object.create(null);let O=0;for(const T of A.keys)w[T]=`key_${O++}`;x.write("const newResult = {};");for(const T of A.keys){const C=w[T],N=_R(T),D=g[T],z=((j=D==null?void 0:D._zod)==null?void 0:j.optin)==="optional",V=((R=D==null?void 0:D._zod)==null?void 0:R.optout)==="optional";x.write(`const ${C} = ${S(T)};`),z&&V?x.write(`
|
|
347
|
-
if (${C}.issues.length) {
|
|
348
|
-
if (${N} in input) {
|
|
349
|
-
payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
|
|
350
|
-
...iss,
|
|
351
|
-
path: iss.path ? [${N}, ...iss.path] : [${N}]
|
|
352
|
-
})));
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
if (${C}.value === undefined) {
|
|
357
|
-
if (${N} in input) {
|
|
358
|
-
newResult[${N}] = undefined;
|
|
359
|
-
}
|
|
360
|
-
} else {
|
|
361
|
-
newResult[${N}] = ${C}.value;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
`):z?x.write(`
|
|
365
|
-
if (${C}.issues.length) {
|
|
366
|
-
payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
|
|
367
|
-
...iss,
|
|
368
|
-
path: iss.path ? [${N}, ...iss.path] : [${N}]
|
|
369
|
-
})));
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
if (${C}.value === undefined) {
|
|
373
|
-
if (${N} in input) {
|
|
374
|
-
newResult[${N}] = undefined;
|
|
375
|
-
}
|
|
376
|
-
} else {
|
|
377
|
-
newResult[${N}] = ${C}.value;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
`):x.write(`
|
|
381
|
-
const ${C}_present = ${N} in input;
|
|
382
|
-
if (${C}.issues.length) {
|
|
383
|
-
payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
|
|
384
|
-
...iss,
|
|
385
|
-
path: iss.path ? [${N}, ...iss.path] : [${N}]
|
|
386
|
-
})));
|
|
387
|
-
}
|
|
388
|
-
if (!${C}_present && !${C}.issues.length) {
|
|
389
|
-
payload.issues.push({
|
|
390
|
-
code: "invalid_type",
|
|
391
|
-
expected: "nonoptional",
|
|
392
|
-
input: undefined,
|
|
393
|
-
path: [${N}]
|
|
394
|
-
});
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
if (${C}_present) {
|
|
398
|
-
if (${C}.value === undefined) {
|
|
399
|
-
newResult[${N}] = undefined;
|
|
400
|
-
} else {
|
|
401
|
-
newResult[${N}] = ${C}.value;
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
`)}x.write("payload.value = newResult;"),x.write("return payload;");const E=x.compile();return(T,C)=>E(g,T,C)};let o;const l=Gp,c=!ZA.jitless,d=c&&TX.value,m=t.catchall;let h;e._zod.parse=(g,x)=>{h??(h=r.value);const A=g.value;return l(A)?c&&d&&(x==null?void 0:x.async)===!1&&x.jitless!==!0?(o||(o=a(t.shape)),g=o(g,x),m?_3([],A,g,x,h,e):g):n(g,x):(g.issues.push({expected:"object",code:"invalid_type",input:A,inst:e}),g)}});function ER(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=>!kl(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=>As(l,r,_s())))}),t)}const hJ=we("$ZodUnion",(e,t)=>{jn.init(e,t),qt(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),qt(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),qt(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),qt(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=>JA(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 c of t.options){const f=c._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(c=>ER(c,r,e,a)):ER(l,r,e,a)}}),pJ=we("$ZodIntersection",(e,t)=>{jn.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])=>jR(n,f,d)):jR(n,o,l)}});function wS(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(vf(e)&&vf(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=wS(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=wS(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 jR(e,t,n){const r=new Map;let a;for(const c of t.issues)if(c.code==="unrecognized_keys"){a??(a=c);for(const f of c.keys)r.has(f)||r.set(f,{}),r.get(f).l=!0}else e.issues.push(c);for(const c of n.issues)if(c.code==="unrecognized_keys")for(const f of c.keys)r.has(f)||r.set(f,{}),r.get(f).r=!0;else e.issues.push(c);const o=[...r].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(o.length&&a&&e.issues.push({...a,keys:o}),kl(e))return e;const l=wS(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 mJ=we("$ZodEnum",(e,t)=>{jn.init(e,t);const n=h3(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(a=>CX.has(typeof a)).map(a=>typeof a=="string"?xv(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}}),vJ=we("$ZodTransform",(e,t)=>{jn.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new d3(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 ql;return n.value=a,n.fallback=!0,n}});function TR(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const A3=we("$ZodOptional",(e,t)=>{jn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",qt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),qt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${JA(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=>TR(l,a)):TR(o,a)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),gJ=we("$ZodExactOptional",(e,t)=>{A3.init(e,t),qt(e._zod,"values",()=>t.innerType._zod.values),qt(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),yJ=we("$ZodNullable",(e,t)=>{jn.init(e,t),qt(e._zod,"optin",()=>t.innerType._zod.optin),qt(e._zod,"optout",()=>t.innerType._zod.optout),qt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${JA(n.source)}|null)$`):void 0}),qt(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)}),bJ=we("$ZodDefault",(e,t)=>{jn.init(e,t),e._zod.optin="optional",qt(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 xJ=we("$ZodPrefault",(e,t)=>{jn.init(e,t),e._zod.optin="optional",qt(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))}),wJ=we("$ZodNonOptional",(e,t)=>{jn.init(e,t),qt(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=>RR(o,e)):RR(a,e)}});function RR(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 SJ=we("$ZodCatch",(e,t)=>{jn.init(e,t),e._zod.optin="optional",qt(e._zod,"optout",()=>t.innerType._zod.optout),qt(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=>As(l,r,_s()))},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=>As(o,r,_s()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),_J=we("$ZodPipe",(e,t)=>{jn.init(e,t),qt(e._zod,"values",()=>t.in._zod.values),qt(e._zod,"optin",()=>t.in._zod.optin),qt(e._zod,"optout",()=>t.out._zod.optout),qt(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=>rp(l,t.in,r)):rp(o,t.in,r)}const a=t.in._zod.run(n,r);return a instanceof Promise?a.then(o=>rp(o,t.out,r)):rp(a,t.out,r)}});function rp(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 AJ=we("$ZodReadonly",(e,t)=>{jn.init(e,t),qt(e._zod,"propValues",()=>t.innerType._zod.propValues),qt(e._zod,"values",()=>t.innerType._zod.values),qt(e._zod,"optin",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),qt(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(NR):NR(a)}});function NR(e){return e.value=Object.freeze(e.value),e}const OJ=we("$ZodCustom",(e,t)=>{ni.init(e,t),jn.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=>MR(o,n,r,e));MR(a,n,r,e)}});function MR(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(gf(a))}}var PR;class EJ{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 jJ(){return new EJ}(PR=globalThis).__zod_globalRegistry??(PR.__zod_globalRegistry=jJ());const Xu=globalThis.__zod_globalRegistry;function TJ(e,t){return new e({type:"string",...Qe(t)})}function CJ(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Qe(t)})}function DR(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Qe(t)})}function RJ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Qe(t)})}function NJ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Qe(t)})}function MJ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Qe(t)})}function PJ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Qe(t)})}function DJ(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Qe(t)})}function kJ(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Qe(t)})}function $J(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Qe(t)})}function zJ(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Qe(t)})}function LJ(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Qe(t)})}function IJ(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Qe(t)})}function BJ(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Qe(t)})}function UJ(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Qe(t)})}function qJ(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Qe(t)})}function HJ(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Qe(t)})}function FJ(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Qe(t)})}function VJ(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Qe(t)})}function GJ(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Qe(t)})}function YJ(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Qe(t)})}function WJ(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Qe(t)})}function KJ(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Qe(t)})}function ZJ(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Qe(t)})}function XJ(e,t){return new e({type:"string",format:"date",check:"string_format",...Qe(t)})}function QJ(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Qe(t)})}function JJ(e,t){return new e({type:"string",format:"duration",check:"string_format",...Qe(t)})}function eee(e,t){return new e({type:"boolean",...Qe(t)})}function tee(e){return new e({type:"unknown"})}function nee(e,t){return new e({type:"never",...Qe(t)})}function O3(e,t){return new AQ({check:"max_length",...Qe(t),maximum:e})}function Wp(e,t){return new OQ({check:"min_length",...Qe(t),minimum:e})}function E3(e,t){return new EQ({check:"length_equals",...Qe(t),length:e})}function ree(e,t){return new jQ({check:"string_format",format:"regex",...Qe(t),pattern:e})}function aee(e){return new TQ({check:"string_format",format:"lowercase",...Qe(e)})}function iee(e){return new CQ({check:"string_format",format:"uppercase",...Qe(e)})}function oee(e,t){return new RQ({check:"string_format",format:"includes",...Qe(t),includes:e})}function see(e,t){return new NQ({check:"string_format",format:"starts_with",...Qe(t),prefix:e})}function lee(e,t){return new MQ({check:"string_format",format:"ends_with",...Qe(t),suffix:e})}function Nc(e){return new PQ({check:"overwrite",tx:e})}function cee(e){return Nc(t=>t.normalize(e))}function uee(){return Nc(e=>e.trim())}function fee(){return Nc(e=>e.toLowerCase())}function dee(){return Nc(e=>e.toUpperCase())}function hee(){return Nc(e=>jX(e))}function pee(e,t,n){return new e({type:"array",element:t,...Qe(n)})}function mee(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Qe(n)})}function vee(e,t){const n=gee(r=>(r.addIssue=a=>{if(typeof a=="string")r.issues.push(gf(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(gf(o))}},e(r.value,r)),t);return n}function gee(e,t){const n=new ni({check:"custom",...Qe(t)});return n._zod.check=e,n}function j3(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)??Xu,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 Kn(e,t,n={path:[],schemaPath:[]}){var m,h;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 c=(h=(m=e._zod).toJSONSchema)==null?void 0:h.call(m);if(c)l.schema=c;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),Kn(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"&&or(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 T3(e,t){var l,c,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 h=(l=e.metadataRegistry.get(m[0]))==null?void 0:l.id;if(h){const g=r.get(h);if(g&&g!==m[0])throw new Error(`Duplicate schema id "${h}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(h,m[0])}}const a=m=>{var S;const h=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??(j=>j);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")}#/${h}/${E}`}}if(m[1]===n)return{ref:"#"};const x=`#/${h}/`,A=m[1].schema.id??`__schema${e.counter++}`;return{defId:A,ref:x+A}},o=m=>{if(m[1].schema.$ref)return;const h=m[1],{ref:g,defId:x}=a(m);h.def={...h.schema},x&&(h.defId=x);const A=h.schema;for(const S in A)delete A[S];A.$ref=g};if(e.cycles==="throw")for(const m of e.seen.entries()){const h=m[1];if(h.cycle)throw new Error(`Cycle detected: #/${(c=h.cycle)==null?void 0:c.join("/")}/<root>
|
|
406
|
-
|
|
407
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const m of e.seen.entries()){const h=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(h.cycle){o(m);continue}if(h.count>1&&e.reused==="ref"){o(m);continue}}}function C3(e,t){var c,f,d,m;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=h=>{const g=e.seen.get(h);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),h._zod.parent===S)for(const R in x)R==="$ref"||R==="allOf"||R in A||delete x[R];if(E.$ref&&O.def)for(const R in x)R==="$ref"||R==="allOf"||R in O.def&&JSON.stringify(x[R])===JSON.stringify(O.def[R])&&delete x[R]}const w=h._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:h,jsonSchema:x,path:g.path??[]})};for(const h of[...e.seen.entries()].reverse())r(h[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,(c=e.external)!=null&&c.uri){const h=(f=e.external.registry.get(t))==null?void 0:f.id;if(!h)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(h)}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 h of e.seen.entries()){const g=h[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 h=JSON.parse(JSON.stringify(a));return Object.defineProperty(h,"~standard",{value:{...t["~standard"],jsonSchema:{input:Kp(t,"input",e.processors),output:Kp(t,"output",e.processors)}},enumerable:!1,writable:!1}),h}catch{throw new Error("Error converting schema to JSON.")}}function or(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 or(r.element,n);if(r.type==="set")return or(r.valueType,n);if(r.type==="lazy")return or(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 or(r.innerType,n);if(r.type==="intersection")return or(r.left,n)||or(r.right,n);if(r.type==="record"||r.type==="map")return or(r.keyType,n)||or(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:or(r.in,n)||or(r.out,n);if(r.type==="object"){for(const a in r.shape)if(or(r.shape[a],n))return!0;return!1}if(r.type==="union"){for(const a of r.options)if(or(a,n))return!0;return!1}if(r.type==="tuple"){for(const a of r.items)if(or(a,n))return!0;return!!(r.rest&&or(r.rest,n))}return!1}const yee=(e,t={})=>n=>{const r=j3({...n,processors:t});return Kn(e,r),T3(r,e),C3(r,e)},Kp=(e,t,n={})=>r=>{const{libraryOptions:a,target:o}=r??{},l=j3({...a??{},target:o,io:t,processors:n});return Kn(e,l),T3(l,e),C3(l,e)},bee={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},xee=(e,t,n,r)=>{const a=n;a.type="string";const{minimum:o,maximum:l,format:c,patterns:f,contentEncoding:d}=e._zod.bag;if(typeof o=="number"&&(a.minLength=o),typeof l=="number"&&(a.maxLength=l),c&&(a.format=bee[c]??c,a.format===""&&delete a.format,c==="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(h=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:h.source}))])}},wee=(e,t,n,r)=>{n.type="boolean"},See=(e,t,n,r)=>{n.not={}},_ee=(e,t,n,r)=>{},Aee=(e,t,n,r)=>{const a=e._zod.def,o=h3(a.entries);o.every(l=>typeof l=="number")&&(n.type="number"),o.every(l=>typeof l=="string")&&(n.type="string"),n.enum=o},Oee=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Eee=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},jee=(e,t,n,r)=>{const a=n,o=e._zod.def,{minimum:l,maximum:c}=e._zod.bag;typeof l=="number"&&(a.minItems=l),typeof c=="number"&&(a.maxItems=c),a.type="array",a.items=Kn(o.element,t,{...r,path:[...r.path,"items"]})},Tee=(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]=Kn(l[m],t,{...r,path:[...r.path,"properties",m]});const c=new Set(Object.keys(l)),f=new Set([...c].filter(m=>{const h=o.shape[m]._zod;return t.io==="input"?h.optin===void 0:h.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=Kn(o.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},Cee=(e,t,n,r)=>{const a=e._zod.def,o=a.inclusive===!1,l=a.options.map((c,f)=>Kn(c,t,{...r,path:[...r.path,o?"oneOf":"anyOf",f]}));o?n.oneOf=l:n.anyOf=l},Ree=(e,t,n,r)=>{const a=e._zod.def,o=Kn(a.left,t,{...r,path:[...r.path,"allOf",0]}),l=Kn(a.right,t,{...r,path:[...r.path,"allOf",1]}),c=d=>"allOf"in d&&Object.keys(d).length===1,f=[...c(o)?o.allOf:[o],...c(l)?l.allOf:[l]];n.allOf=f},Nee=(e,t,n,r)=>{const a=e._zod.def,o=Kn(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"}]},Mee=(e,t,n,r)=>{const a=e._zod.def;Kn(a.innerType,t,r);const o=t.seen.get(e);o.ref=a.innerType},Pee=(e,t,n,r)=>{const a=e._zod.def;Kn(a.innerType,t,r);const o=t.seen.get(e);o.ref=a.innerType,n.default=JSON.parse(JSON.stringify(a.defaultValue))},Dee=(e,t,n,r)=>{const a=e._zod.def;Kn(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)))},kee=(e,t,n,r)=>{const a=e._zod.def;Kn(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},$ee=(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;Kn(l,t,r);const c=t.seen.get(e);c.ref=l},zee=(e,t,n,r)=>{const a=e._zod.def;Kn(a.innerType,t,r);const o=t.seen.get(e);o.ref=a.innerType,n.readOnly=!0},R3=(e,t,n,r)=>{const a=e._zod.def;Kn(a.innerType,t,r);const o=t.seen.get(e);o.ref=a.innerType};function kR(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function Lee(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 c=r.unionErrors[0].errors[0];n[l]={message:c.message,type:c.code}}else n[l]={message:o,type:a};if("unionErrors"in r&&r.unionErrors.forEach(function(m){return m.errors.forEach(function(h){return e.push(h)})}),t){var f=n[l].types,d=f&&f[r.code];n[l]=YA(l,t,n,a,d?[].concat(d,r.message):r.message)}e.shift()}return n}function Iee(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 c=r.errors[0][0];n[l]={message:c.message,type:c.code}}else n[l]={message:o,type:a};if(r.code==="invalid_union"&&r.errors.forEach(function(m){return m.forEach(function(h){return e.push(h)})}),t){var f=n[l].types,d=f&&f[r.code];n[l]=YA(l,t,n,a,d?[].concat(d,r.message):r.message)}e.shift()}return n}function Ri(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(kR(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return o.shouldUseNativeValidation&&bS({},o),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(c){return Array.isArray(c==null?void 0:c.issues)})(l))return{values:{},errors:bR(Lee(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(kR(function(){return Promise.resolve((n.mode==="sync"?UX:qX)(e,r,t)).then(function(l){return o.shouldUseNativeValidation&&bS({},o),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(c){return c instanceof tO})(l))return{values:{},errors:bR(Iee(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 Bee=we("ZodISODateTime",(e,t)=>{YQ.init(e,t),ln.init(e,t)});function Uee(e){return ZJ(Bee,e)}const qee=we("ZodISODate",(e,t)=>{WQ.init(e,t),ln.init(e,t)});function Hee(e){return XJ(qee,e)}const Fee=we("ZodISOTime",(e,t)=>{KQ.init(e,t),ln.init(e,t)});function Vee(e){return QJ(Fee,e)}const Gee=we("ZodISODuration",(e,t)=>{ZQ.init(e,t),ln.init(e,t)});function Yee(e){return JJ(Gee,e)}const Wee=(e,t)=>{tO.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>BX(e,n)},flatten:{value:n=>IX(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,xS,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,xS,2)}},isEmpty:{get(){return e.issues.length===0}}})},pa=we("ZodError",Wee,{Parent:Error}),Kee=Sv(pa),Zee=_v(pa),Xee=Av(pa),Qee=Ov(pa),Jee=VX(pa),ete=GX(pa),tte=YX(pa),nte=WX(pa),rte=KX(pa),ate=ZX(pa),ite=XX(pa),ote=QX(pa),$R=new WeakMap;function jv(e,t,n){const r=Object.getPrototypeOf(e);let a=$R.get(r);if(a||(a=new Set,$R.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 c=l.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:c}),c},set(c){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:c})}})}}}const Tn=we("ZodType",(e,t)=>(jn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Kp(e,"input"),output:Kp(e,"output")}}),e.toJSONSchema=yee(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>Kee(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>Xee(e,n,r),e.parseAsync=async(n,r)=>Zee(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Qee(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Jee(e,n,r),e.decode=(n,r)=>ete(e,n,r),e.encodeAsync=async(n,r)=>tte(e,n,r),e.decodeAsync=async(n,r)=>nte(e,n,r),e.safeEncode=(n,r)=>rte(e,n,r),e.safeDecode=(n,r)=>ate(e,n,r),e.safeEncodeAsync=async(n,r)=>ite(e,n,r),e.safeDecodeAsync=async(n,r)=>ote(e,n,r),jv(e,"ZodType",{check(...n){const r=this.def;return this.clone(Po(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 Do(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(Jte(n,r))},superRefine(n,r){return this.check(ene(n,r))},overwrite(n){return this.check(Nc(n))},optional(){return IR(this)},exactOptional(){return Ute(this)},nullable(){return BR(this)},nullish(){return IR(BR(this))},nonoptional(n){return Yte(this,n)},array(){return Nte(this)},or(n){return Dte([this,n])},and(n){return $te(this,n)},transform(n){return UR(this,Ite(n))},default(n){return Fte(this,n)},prefault(n){return Gte(this,n)},catch(n){return Kte(this,n)},pipe(n){return UR(this,n)},readonly(){return Qte(this)},describe(n){const r=this.clone();return Xu.add(r,{description:n}),r},meta(...n){if(n.length===0)return Xu.get(this);const r=this.clone();return Xu.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=Xu.get(e))==null?void 0:n.description},configurable:!0}),e)),N3=we("_ZodString",(e,t)=>{nO.init(e,t),Tn.init(e,t),e._zod.processJSONSchema=(r,a,o)=>xee(e,r,a);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,jv(e,"_ZodString",{regex(...r){return this.check(ree(...r))},includes(...r){return this.check(oee(...r))},startsWith(...r){return this.check(see(...r))},endsWith(...r){return this.check(lee(...r))},min(...r){return this.check(Wp(...r))},max(...r){return this.check(O3(...r))},length(...r){return this.check(E3(...r))},nonempty(...r){return this.check(Wp(1,...r))},lowercase(r){return this.check(aee(r))},uppercase(r){return this.check(iee(r))},trim(){return this.check(uee())},normalize(...r){return this.check(cee(...r))},toLowerCase(){return this.check(fee())},toUpperCase(){return this.check(dee())},slugify(){return this.check(hee())}})}),ste=we("ZodString",(e,t)=>{nO.init(e,t),N3.init(e,t),e.email=n=>e.check(CJ(lte,n)),e.url=n=>e.check(DJ(cte,n)),e.jwt=n=>e.check(KJ(Ate,n)),e.emoji=n=>e.check(kJ(ute,n)),e.guid=n=>e.check(DR(zR,n)),e.uuid=n=>e.check(RJ(ap,n)),e.uuidv4=n=>e.check(NJ(ap,n)),e.uuidv6=n=>e.check(MJ(ap,n)),e.uuidv7=n=>e.check(PJ(ap,n)),e.nanoid=n=>e.check($J(fte,n)),e.guid=n=>e.check(DR(zR,n)),e.cuid=n=>e.check(zJ(dte,n)),e.cuid2=n=>e.check(LJ(hte,n)),e.ulid=n=>e.check(IJ(pte,n)),e.base64=n=>e.check(GJ(wte,n)),e.base64url=n=>e.check(YJ(Ste,n)),e.xid=n=>e.check(BJ(mte,n)),e.ksuid=n=>e.check(UJ(vte,n)),e.ipv4=n=>e.check(qJ(gte,n)),e.ipv6=n=>e.check(HJ(yte,n)),e.cidrv4=n=>e.check(FJ(bte,n)),e.cidrv6=n=>e.check(VJ(xte,n)),e.e164=n=>e.check(WJ(_te,n)),e.datetime=n=>e.check(Uee(n)),e.date=n=>e.check(Hee(n)),e.time=n=>e.check(Vee(n)),e.duration=n=>e.check(Yee(n))});function On(e){return TJ(ste,e)}const ln=we("ZodStringFormat",(e,t)=>{an.init(e,t),N3.init(e,t)}),lte=we("ZodEmail",(e,t)=>{LQ.init(e,t),ln.init(e,t)}),zR=we("ZodGUID",(e,t)=>{$Q.init(e,t),ln.init(e,t)}),ap=we("ZodUUID",(e,t)=>{zQ.init(e,t),ln.init(e,t)}),cte=we("ZodURL",(e,t)=>{IQ.init(e,t),ln.init(e,t)}),ute=we("ZodEmoji",(e,t)=>{BQ.init(e,t),ln.init(e,t)}),fte=we("ZodNanoID",(e,t)=>{UQ.init(e,t),ln.init(e,t)}),dte=we("ZodCUID",(e,t)=>{qQ.init(e,t),ln.init(e,t)}),hte=we("ZodCUID2",(e,t)=>{HQ.init(e,t),ln.init(e,t)}),pte=we("ZodULID",(e,t)=>{FQ.init(e,t),ln.init(e,t)}),mte=we("ZodXID",(e,t)=>{VQ.init(e,t),ln.init(e,t)}),vte=we("ZodKSUID",(e,t)=>{GQ.init(e,t),ln.init(e,t)}),gte=we("ZodIPv4",(e,t)=>{XQ.init(e,t),ln.init(e,t)}),yte=we("ZodIPv6",(e,t)=>{QQ.init(e,t),ln.init(e,t)}),bte=we("ZodCIDRv4",(e,t)=>{JQ.init(e,t),ln.init(e,t)}),xte=we("ZodCIDRv6",(e,t)=>{eJ.init(e,t),ln.init(e,t)}),wte=we("ZodBase64",(e,t)=>{tJ.init(e,t),ln.init(e,t)}),Ste=we("ZodBase64URL",(e,t)=>{rJ.init(e,t),ln.init(e,t)}),_te=we("ZodE164",(e,t)=>{aJ.init(e,t),ln.init(e,t)}),Ate=we("ZodJWT",(e,t)=>{oJ.init(e,t),ln.init(e,t)}),Ote=we("ZodBoolean",(e,t)=>{sJ.init(e,t),Tn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>wee(e,n,r)});function Ete(e){return eee(Ote,e)}const jte=we("ZodUnknown",(e,t)=>{lJ.init(e,t),Tn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>_ee()});function LR(){return tee(jte)}const Tte=we("ZodNever",(e,t)=>{cJ.init(e,t),Tn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>See(e,n,r)});function Cte(e){return nee(Tte,e)}const Rte=we("ZodArray",(e,t)=>{uJ.init(e,t),Tn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>jee(e,n,r,a),e.element=t.element,jv(e,"ZodArray",{min(n,r){return this.check(Wp(n,r))},nonempty(n){return this.check(Wp(1,n))},max(n,r){return this.check(O3(n,r))},length(n,r){return this.check(E3(n,r))},unwrap(){return this.element}})});function Nte(e,t){return pee(Rte,e,t)}const Mte=we("ZodObject",(e,t)=>{dJ.init(e,t),Tn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Tee(e,n,r,a),qt(e,"shape",()=>t.shape),jv(e,"ZodObject",{keyof(){return zte(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:LR()})},loose(){return this.clone({...this._zod.def,catchall:LR()})},strict(){return this.clone({...this._zod.def,catchall:Cte()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return PX(this,n)},safeExtend(n){return DX(this,n)},merge(n){return kX(this,n)},pick(n){return NX(this,n)},omit(n){return MX(this,n)},partial(...n){return $X(M3,this,n[0])},required(...n){return zX(P3,this,n[0])}})});function ri(e,t){const n={type:"object",shape:e??{},...Qe(t)};return new Mte(n)}const Pte=we("ZodUnion",(e,t)=>{hJ.init(e,t),Tn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Cee(e,n,r,a),e.options=t.options});function Dte(e,t){return new Pte({type:"union",options:e,...Qe(t)})}const kte=we("ZodIntersection",(e,t)=>{pJ.init(e,t),Tn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Ree(e,n,r,a)});function $te(e,t){return new kte({type:"intersection",left:e,right:t})}const SS=we("ZodEnum",(e,t)=>{mJ.init(e,t),Tn.init(e,t),e._zod.processJSONSchema=(r,a,o)=>Aee(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 SS({...t,checks:[],...Qe(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 SS({...t,checks:[],...Qe(a),entries:o})}});function zte(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new SS({type:"enum",entries:n,...Qe(t)})}const Lte=we("ZodTransform",(e,t)=>{vJ.init(e,t),Tn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Eee(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new d3(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(gf(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(gf(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 Ite(e){return new Lte({type:"transform",transform:e})}const M3=we("ZodOptional",(e,t)=>{A3.init(e,t),Tn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>R3(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function IR(e){return new M3({type:"optional",innerType:e})}const Bte=we("ZodExactOptional",(e,t)=>{gJ.init(e,t),Tn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>R3(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function Ute(e){return new Bte({type:"optional",innerType:e})}const qte=we("ZodNullable",(e,t)=>{yJ.init(e,t),Tn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Nee(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function BR(e){return new qte({type:"nullable",innerType:e})}const Hte=we("ZodDefault",(e,t)=>{bJ.init(e,t),Tn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Pee(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Fte(e,t){return new Hte({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():m3(t)}})}const Vte=we("ZodPrefault",(e,t)=>{xJ.init(e,t),Tn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Dee(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function Gte(e,t){return new Vte({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():m3(t)}})}const P3=we("ZodNonOptional",(e,t)=>{wJ.init(e,t),Tn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Mee(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function Yte(e,t){return new P3({type:"nonoptional",innerType:e,...Qe(t)})}const Wte=we("ZodCatch",(e,t)=>{SJ.init(e,t),Tn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>kee(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Kte(e,t){return new Wte({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Zte=we("ZodPipe",(e,t)=>{_J.init(e,t),Tn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>$ee(e,n,r,a),e.in=t.in,e.out=t.out});function UR(e,t){return new Zte({type:"pipe",in:e,out:t})}const Xte=we("ZodReadonly",(e,t)=>{AJ.init(e,t),Tn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>zee(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function Qte(e){return new Xte({type:"readonly",innerType:e})}const D3=we("ZodCustom",(e,t)=>{OJ.init(e,t),Tn.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Oee(e,n)});function Jte(e,t={}){return mee(D3,e,t)}function ene(e,t){return vee(e,t)}function rO(e,t={}){const n=new D3({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Qe(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 tne="Label",k3=y.forwardRef((e,t)=>v.jsx(w5.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())}}));k3.displayName=tne;var $3=k3;const nne=Ec("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Pt=y.forwardRef(({className:e,...t},n)=>v.jsx($3,{ref:n,className:be(nne(),e),...t}));Pt.displayName=$3.displayName;const rne=Ec("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}}),$r=y.forwardRef(({className:e,level:t,...n},r)=>v.jsx("div",{ref:r,className:be(rne({level:t}),e),...n}));$r.displayName="Card";const zr=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:be("flex flex-col space-y-1.5 p-6",e),...t}));zr.displayName="CardHeader";const Lr=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:be("text-2xl font-semibold leading-none tracking-tight",e),...t}));Lr.displayName="CardTitle";const Os=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:be("text-sm text-muted-foreground",e),...t}));Os.displayName="CardDescription";const ja=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:be("p-6 pt-0",e),...t}));ja.displayName="CardContent";const ane=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{ref:n,className:be("flex items-center p-6 pt-0",e),...t}));ane.displayName="CardFooter";const ine=ri({email:On().email(),password:On().min(8)});function one(){const e=ka(),{resolvedTheme:t}=Sc(),n=t==="dark"?"/logo-dark.svg":"/logo.svg";y.useEffect(()=>{fetch("/api/v1/auth/status").then(d=>d.json()).then(({initialized:d})=>{d||e("/setup",{replace:!0})}).catch(()=>{})},[e]);const{register:r,handleSubmit:a,setError:o,formState:{errors:l,isSubmitting:c}}=Ci({resolver:Ri(ine),mode:"onBlur"});async function f(d){try{const{status:m}=await ZI.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($r,{level:4,className:"w-full",children:[v.jsxs(zr,{className:"text-center",children:[v.jsx(Lr,{className:"text-2xl tracking-display-md",children:"Welcome back"}),v.jsx(Os,{children:"Sign in to your team workspace"})]}),v.jsx(ja,{children:v.jsxs("form",{onSubmit:a(f),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Pt,{htmlFor:"email",children:"Email"}),v.jsx(tn,{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(Pt,{htmlFor:"password",children:"Password"}),v.jsx(tn,{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:c,className:"w-full mt-1",children:c?"Signing in…":"Sign in"})]})})]})]})})}const sne=ri({email:On().email("Enter a valid email"),password:On().min(8,"Password must be at least 8 characters"),confirm:On()}).refine(e=>e.password===e.confirm,{message:"Passwords do not match",path:["confirm"]});function lne(){const e=ka(),{resolvedTheme:t}=Sc(),n=t==="dark"?"/logo-dark.svg":"/logo.svg",{register:r,handleSubmit:a,setError:o,formState:{errors:l,isSubmitting:c}}=Ci({resolver:Ri(sne),mode:"onBlur"});y.useEffect(()=>{fetch("/api/v1/auth/status").then(d=>d.json()).then(({initialized:d})=>{d&&e("/login",{replace:!0})}).catch(()=>{})},[e]);async function f(d){try{const m=await fetch("/api/v1/auth/init",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:d.email,password:d.password})});if(!m.ok){const h=await m.json();o("root",{message:h.error??"Failed to create account"});return}e("/login",{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($r,{level:4,className:"w-full",children:[v.jsx(zr,{className:"text-center",children:v.jsx(Lr,{className:"text-2xl tracking-display-md",children:"Set up tapflow"})}),v.jsx(ja,{children:v.jsxs("form",{onSubmit:a(f),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Pt,{htmlFor:"email",children:"Admin email"}),v.jsx(tn,{id:"email",type:"email",placeholder:"admin@yourteam.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(Pt,{htmlFor:"password",children:"Password"}),v.jsx(tn,{id:"password",type:"password",autoComplete:"new-password",...r("password")}),l.password&&v.jsx("p",{className:"text-sm text-destructive",children:l.password.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Pt,{htmlFor:"confirm",children:"Confirm password"}),v.jsx(tn,{id:"confirm",type:"password",autoComplete:"new-password",...r("confirm")}),l.confirm&&v.jsx("p",{className:"text-sm text-destructive",children:l.confirm.message})]}),l.root&&v.jsx("p",{className:"text-sm text-destructive",children:l.root.message}),v.jsx(ct,{type:"submit",size:"pill",disabled:c,className:"w-full mt-1",children:c?"Creating account…":"Create admin account"})]})})]})]})})}const cne=ri({displayName:On().optional(),avatar:rO(File).nullable().optional(),password:On().min(8),confirm:On()}).refine(e=>e.password===e.confirm,{message:"Passwords do not match",path:["confirm"]});function une(){const e=ka(),[t]=nd(),n=t.get("token")??"",[r,a]=y.useState("loading"),[o,l]=y.useState(""),[c,f]=y.useState(null),d=y.useRef(null),{register:m,handleSubmit:h,control:g,setError:x,formState:{errors:A,isSubmitting:S}}=Ci({resolver:Ri(cne),mode:"onBlur",defaultValues:{displayName:"",avatar:null}}),w=GA({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 j;try{const R=new FormData;if(R.append("token",n),R.append("password",E.password),(j=E.displayName)!=null&&j.trim()&&R.append("display_name",E.displayName.trim()),E.avatar&&R.append("avatar",E.avatar),!(await fetch("/api/v1/invitations/accept",{method:"POST",body:R})).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($r,{level:4,className:"w-full max-w-sm text-center",children:v.jsxs(zr,{children:[v.jsx(Lr,{children:"Invitation expired"}),v.jsx(Os,{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($r,{level:4,className:"w-full max-w-sm",children:[v.jsxs(zr,{className:"text-center",children:[v.jsx(Lr,{children:"Set up your account"}),v.jsxs(Os,{children:["You're joining as ",v.jsx("strong",{children:o})]})]}),v.jsx(ja,{children:v.jsxs("form",{onSubmit:h(O),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsxs(Pt,{htmlFor:"display-name",children:["Nickname ",v.jsx("span",{className:"text-muted-foreground text-xs",children:"(optional)"})]}),v.jsx(tn,{id:"display-name",placeholder:"Your name",...m("displayName")})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsxs(Pt,{children:["Avatar ",v.jsx("span",{className:"text-muted-foreground text-xs",children:"(optional, png · jpg, max 2MB)"})]}),v.jsx(Hp,{name:"avatar",control:g,render:({field:E})=>{var j;return v.jsxs("div",{className:"relative w-14 h-14",children:[c?v.jsx("img",{src:c,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 R=IA(w);return{backgroundColor:R.bg,color:R.fg}})(),children:((j=w==null?void 0:w[0])==null?void 0:j.toUpperCase())??"?"}),v.jsx("button",{type:"button",onClick:()=>{var R;return(R=d.current)==null?void 0:R.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(tS,{className:"w-3 h-3"})}),v.jsx("input",{ref:d,type:"file",accept:"image/png,image/jpeg",className:"hidden",onChange:R=>{var C;const T=(C=R.target.files)==null?void 0:C[0];if(T){if(T.size>2*1024*1024){x("avatar",{message:"Max 2MB for avatar"});return}E.onChange(T),f(URL.createObjectURL(T))}}})]})}}),A.avatar&&v.jsx("p",{className:"text-sm text-destructive",children:A.avatar.message})]}),v.jsx(Ja,{}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Pt,{htmlFor:"password",children:"Password"}),v.jsx(tn,{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(Pt,{htmlFor:"confirm",children:"Confirm password"}),v.jsx(tn,{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 fne=ri({password:On().min(8),confirm:On()}).refine(e=>e.password===e.confirm,{message:"Passwords do not match",path:["confirm"]});function dne(){const e=ka(),[t]=nd(),n=t.get("token")??"",[r,a]=y.useState("loading"),{register:o,handleSubmit:l,setError:c,formState:{errors:f,isSubmitting:d}}=Ci({resolver:Ri(fne),mode:"onBlur"});y.useEffect(()=>{if(!n){a("invalid");return}fetch(`/api/v1/auth/reset-password/verify?token=${n}`).then(h=>h.ok?a("valid"):Promise.reject()).catch(()=>a("invalid"))},[n]);async function m(h){try{const g=await fetch("/api/v1/auth/reset-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:n,password:h.password})});if(!g.ok){const x=await g.json();c("root",{message:x.error??"Failed to reset password"});return}e("/login",{replace:!0})}catch{c("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($r,{level:4,className:"w-full max-w-sm text-center",children:v.jsxs(zr,{children:[v.jsx(Lr,{children:"Link expired"}),v.jsx(Os,{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($r,{level:4,className:"w-full max-w-sm",children:[v.jsxs(zr,{className:"text-center",children:[v.jsx(Lr,{children:"Reset password"}),v.jsx(Os,{children:"Enter your new password below."})]}),v.jsx(ja,{children:v.jsxs("form",{onSubmit:l(m),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Pt,{htmlFor:"password",children:"New password"}),v.jsx(tn,{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(Pt,{htmlFor:"confirm",children:"Confirm password"}),v.jsx(tn,{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 z3({value:e,onChange:t,placeholder:n,className:r}){return v.jsxs("div",{className:"relative",children:[v.jsx(h5,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"}),v.jsx(tn,{placeholder:n,value:e,onChange:a=>t(a.target.value),className:`h-8 pl-8 ${r??"w-48"}`})]})}function _S(e,[t,n]){return Math.min(n,Math.max(t,e))}function L3(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 hne=[" ","Enter","ArrowUp","ArrowDown"],pne=[" ","Enter"],Es="Select",[Tv,Cv,mne]=RA(Es),[Mc]=ha(Es,[mne,Rc]),Rv=Rc(),[vne,ko]=Mc(Es),[gne,yne]=Mc(Es),I3=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:l,defaultValue:c,onValueChange:f,dir:d,name:m,autoComplete:h,disabled:g,required:x,form:A}=e,S=Rv(t),[w,O]=y.useState(null),[E,j]=y.useState(null),[R,T]=y.useState(!1),C=hd(d),[N,D]=To({prop:r,defaultProp:a??!1,onChange:o,caller:Es}),[z,V]=To({prop:l,defaultProp:c,onChange:f,caller:Es}),U=y.useRef(null),P=w?A||!!w.closest("form"):!0,[B,q]=y.useState(new Set),Y=Array.from(B).map($=>$.props.value).join(";");return v.jsx(AA,{...S,children:v.jsxs(vne,{required:x,scope:t,trigger:w,onTriggerChange:O,valueNode:E,onValueNodeChange:j,valueNodeHasChildren:R,onValueNodeHasChildrenChange:T,contentId:Ra(),value:z,onValueChange:V,open:N,onOpenChange:D,dir:C,triggerPointerDownPosRef:U,disabled:g,children:[v.jsx(Tv.Provider,{scope:t,children:v.jsx(gne,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback($=>{q(G=>new Set(G).add($))},[]),onNativeOptionRemove:y.useCallback($=>{q(G=>{const F=new Set(G);return F.delete($),F})},[]),children:n})}),P?v.jsxs(c4,{"aria-hidden":!0,required:x,tabIndex:-1,name:m,autoComplete:h,value:z,onChange:$=>V($.target.value),disabled:g,form:A,children:[z===void 0?v.jsx("option",{value:""}):null,Array.from(B)]},Y):null]})})};I3.displayName=Es;var B3="SelectTrigger",U3=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,o=Rv(n),l=ko(B3,n),c=l.disabled||r,f=ft(t,l.onTriggerChange),d=Cv(n),m=y.useRef("touch"),[h,g,x]=f4(S=>{const w=d().filter(j=>!j.disabled),O=w.find(j=>j.value===l.value),E=d4(w,S,O);E!==void 0&&l.onValueChange(E.value)}),A=S=>{c||(l.onOpenChange(!0),x()),S&&(l.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return v.jsx(OA,{asChild:!0,...o,children:v.jsx(et.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:c,"data-disabled":c?"":void 0,"data-placeholder":u4(l.value)?"":void 0,...a,ref:f,onClick:ke(a.onClick,S=>{S.currentTarget.focus(),m.current!=="mouse"&&A(S)}),onPointerDown:ke(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:ke(a.onKeyDown,S=>{const w=h.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&g(S.key),!(w&&S.key===" ")&&hne.includes(S.key)&&(A(),S.preventDefault())})})})});U3.displayName=B3;var q3="SelectValue",H3=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:o,placeholder:l="",...c}=e,f=ko(q3,n),{onValueNodeHasChildrenChange:d}=f,m=o!==void 0,h=ft(t,f.onValueNodeChange);return Wn(()=>{d(m)},[d,m]),v.jsx(et.span,{...c,ref:h,style:{pointerEvents:"none"},children:u4(f.value)?v.jsx(v.Fragment,{children:l}):o})});H3.displayName=q3;var bne="SelectIcon",F3=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return v.jsx(et.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});F3.displayName=bne;var xne="SelectPortal",V3=e=>v.jsx(od,{asChild:!0,...e});V3.displayName=xne;var js="SelectContent",G3=y.forwardRef((e,t)=>{const n=ko(js,e.__scopeSelect),[r,a]=y.useState();if(Wn(()=>{a(new DocumentFragment)},[]),!n.open){const o=r;return o?rd.createPortal(v.jsx(Y3,{scope:e.__scopeSelect,children:v.jsx(Tv.Slot,{scope:e.__scopeSelect,children:v.jsx("div",{children:e.children})})}),o):null}return v.jsx(W3,{...e,ref:t})});G3.displayName=js;var Sa=10,[Y3,$o]=Mc(js),wne="SelectContentImpl",Sne=Kl("SelectContent.RemoveScroll"),W3=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:l,side:c,sideOffset:f,align:d,alignOffset:m,arrowPadding:h,collisionBoundary:g,collisionPadding:x,sticky:A,hideWhenDetached:S,avoidCollisions:w,...O}=e,E=ko(js,n),[j,R]=y.useState(null),[T,C]=y.useState(null),N=ft(t,ve=>R(ve)),[D,z]=y.useState(null),[V,U]=y.useState(null),P=Cv(n),[B,q]=y.useState(!1),Y=y.useRef(!1);y.useEffect(()=>{if(j)return uA(j)},[j]),cA();const $=y.useCallback(ve=>{const[xe,...ce]=P().map(oe=>oe.ref.current),[Ae]=ce.slice(-1),Oe=document.activeElement;for(const oe of ve)if(oe===Oe||(oe==null||oe.scrollIntoView({block:"nearest"}),oe===xe&&T&&(T.scrollTop=0),oe===Ae&&T&&(T.scrollTop=T.scrollHeight),oe==null||oe.focus(),document.activeElement!==Oe))return},[P,T]),G=y.useCallback(()=>$([D,j]),[$,D,j]);y.useEffect(()=>{B&&G()},[B,G]);const{onOpenChange:F,triggerPointerDownPosRef:K}=E;y.useEffect(()=>{if(j){let ve={x:0,y:0};const xe=Ae=>{var Oe,oe;ve={x:Math.abs(Math.round(Ae.pageX)-(((Oe=K.current)==null?void 0:Oe.x)??0)),y:Math.abs(Math.round(Ae.pageY)-(((oe=K.current)==null?void 0:oe.y)??0))}},ce=Ae=>{ve.x<=10&&ve.y<=10?Ae.preventDefault():j.contains(Ae.target)||F(!1),document.removeEventListener("pointermove",xe),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",xe),document.addEventListener("pointerup",ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",xe),document.removeEventListener("pointerup",ce,{capture:!0})}}},[j,F,K]),y.useEffect(()=>{const ve=()=>F(!1);return window.addEventListener("blur",ve),window.addEventListener("resize",ve),()=>{window.removeEventListener("blur",ve),window.removeEventListener("resize",ve)}},[F]);const[ne,I]=f4(ve=>{const xe=P().filter(Oe=>!Oe.disabled),ce=xe.find(Oe=>Oe.ref.current===document.activeElement),Ae=d4(xe,ve,ce);Ae&&setTimeout(()=>Ae.ref.current.focus())}),Z=y.useCallback((ve,xe,ce)=>{const Ae=!Y.current&&!ce;(E.value!==void 0&&E.value===xe||Ae)&&(z(ve),Ae&&(Y.current=!0))},[E.value]),Q=y.useCallback(()=>j==null?void 0:j.focus(),[j]),fe=y.useCallback((ve,xe,ce)=>{const Ae=!Y.current&&!ce;(E.value!==void 0&&E.value===xe||Ae)&&U(ve)},[E.value]),le=r==="popper"?AS:K3,Se=le===AS?{side:c,sideOffset:f,align:d,alignOffset:m,arrowPadding:h,collisionBoundary:g,collisionPadding:x,sticky:A,hideWhenDetached:S,avoidCollisions:w}:{};return v.jsx(Y3,{scope:n,content:j,viewport:T,onViewportChange:C,itemRefCallback:Z,selectedItem:D,onItemLeave:Q,itemTextRefCallback:fe,focusSelectedItem:G,selectedItemText:V,position:r,isPositioned:B,searchRef:ne,children:v.jsx(iv,{as:Sne,allowPinchZoom:!0,children:v.jsx(rv,{asChild:!0,trapped:E.open,onMountAutoFocus:ve=>{ve.preventDefault()},onUnmountAutoFocus:ke(a,ve=>{var xe;(xe=E.trigger)==null||xe.focus({preventScroll:!0}),ve.preventDefault()}),children:v.jsx(id,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:ve=>ve.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:v.jsx(le,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:ve=>ve.preventDefault(),...O,...Se,onPlaced:()=>q(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...O.style},onKeyDown:ke(O.onKeyDown,ve=>{const xe=ve.ctrlKey||ve.altKey||ve.metaKey;if(ve.key==="Tab"&&ve.preventDefault(),!xe&&ve.key.length===1&&I(ve.key),["ArrowUp","ArrowDown","Home","End"].includes(ve.key)){let Ae=P().filter(Oe=>!Oe.disabled).map(Oe=>Oe.ref.current);if(["ArrowUp","End"].includes(ve.key)&&(Ae=Ae.slice().reverse()),["ArrowUp","ArrowDown"].includes(ve.key)){const Oe=ve.target,oe=Ae.indexOf(Oe);Ae=Ae.slice(oe+1)}setTimeout(()=>$(Ae)),ve.preventDefault()}})})})})})})});W3.displayName=wne;var _ne="SelectItemAlignedPosition",K3=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,o=ko(js,n),l=$o(js,n),[c,f]=y.useState(null),[d,m]=y.useState(null),h=ft(t,N=>m(N)),g=Cv(n),x=y.useRef(!1),A=y.useRef(!0),{viewport:S,selectedItem:w,selectedItemText:O,focusSelectedItem:E}=l,j=y.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&d&&S&&w&&O){const N=o.trigger.getBoundingClientRect(),D=d.getBoundingClientRect(),z=o.valueNode.getBoundingClientRect(),V=O.getBoundingClientRect();if(o.dir!=="rtl"){const Oe=V.left-D.left,oe=z.left-Oe,qe=N.left-oe,De=N.width+qe,Je=Math.max(De,D.width),Ye=window.innerWidth-Sa,at=_S(oe,[Sa,Math.max(Sa,Ye-Je)]);c.style.minWidth=De+"px",c.style.left=at+"px"}else{const Oe=D.right-V.right,oe=window.innerWidth-z.right-Oe,qe=window.innerWidth-N.right-oe,De=N.width+qe,Je=Math.max(De,D.width),Ye=window.innerWidth-Sa,at=_S(oe,[Sa,Math.max(Sa,Ye-Je)]);c.style.minWidth=De+"px",c.style.right=at+"px"}const U=g(),P=window.innerHeight-Sa*2,B=S.scrollHeight,q=window.getComputedStyle(d),Y=parseInt(q.borderTopWidth,10),$=parseInt(q.paddingTop,10),G=parseInt(q.borderBottomWidth,10),F=parseInt(q.paddingBottom,10),K=Y+$+B+F+G,ne=Math.min(w.offsetHeight*5,K),I=window.getComputedStyle(S),Z=parseInt(I.paddingTop,10),Q=parseInt(I.paddingBottom,10),fe=N.top+N.height/2-Sa,le=P-fe,Se=w.offsetHeight/2,ve=w.offsetTop+Se,xe=Y+$+ve,ce=K-xe;if(xe<=fe){const Oe=U.length>0&&w===U[U.length-1].ref.current;c.style.bottom="0px";const oe=d.clientHeight-S.offsetTop-S.offsetHeight,qe=Math.max(le,Se+(Oe?Q:0)+oe+G),De=xe+qe;c.style.height=De+"px"}else{const Oe=U.length>0&&w===U[0].ref.current;c.style.top="0px";const qe=Math.max(fe,Y+S.offsetTop+(Oe?Z:0)+Se)+ce;c.style.height=qe+"px",S.scrollTop=xe-fe+S.offsetTop}c.style.margin=`${Sa}px 0`,c.style.minHeight=ne+"px",c.style.maxHeight=P+"px",r==null||r(),requestAnimationFrame(()=>x.current=!0)}},[g,o.trigger,o.valueNode,c,d,S,w,O,o.dir,r]);Wn(()=>j(),[j]);const[R,T]=y.useState();Wn(()=>{d&&T(window.getComputedStyle(d).zIndex)},[d]);const C=y.useCallback(N=>{N&&A.current===!0&&(j(),E==null||E(),A.current=!1)},[j,E]);return v.jsx(One,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:x,onScrollButtonChange:C,children:v.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:v.jsx(et.div,{...a,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});K3.displayName=_ne;var Ane="SelectPopperPosition",AS=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=Sa,...o}=e,l=Rv(n);return v.jsx(EA,{...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)"}})});AS.displayName=Ane;var[One,aO]=Mc(js,{}),OS="SelectViewport",Z3=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,o=$o(OS,n),l=aO(OS,n),c=ft(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(Tv.Slot,{scope:n,children:v.jsx(et.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:ke(a.onScroll,d=>{const m=d.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:g}=l;if(g!=null&&g.current&&h){const x=Math.abs(f.current-m.scrollTop);if(x>0){const A=window.innerHeight-Sa*2,S=parseFloat(h.style.minHeight),w=parseFloat(h.style.height),O=Math.max(S,w);if(O<A){const E=O+x,j=Math.min(A,E),R=E-j;h.style.height=j+"px",h.style.bottom==="0px"&&(m.scrollTop=R>0?R:0,h.style.justifyContent="flex-end")}}}f.current=m.scrollTop})})})]})});Z3.displayName=OS;var X3="SelectGroup",[Ene,jne]=Mc(X3),Tne=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Ra();return v.jsx(Ene,{scope:n,id:a,children:v.jsx(et.div,{role:"group","aria-labelledby":a,...r,ref:t})})});Tne.displayName=X3;var Q3="SelectLabel",J3=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=jne(Q3,n);return v.jsx(et.div,{id:a.id,...r,ref:t})});J3.displayName=Q3;var Zp="SelectItem",[Cne,e4]=Mc(Zp),t4=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...l}=e,c=ko(Zp,n),f=$o(Zp,n),d=c.value===r,[m,h]=y.useState(o??""),[g,x]=y.useState(!1),A=ft(t,E=>{var j;return(j=f.itemRefCallback)==null?void 0:j.call(f,E,r,a)}),S=Ra(),w=y.useRef("touch"),O=()=>{a||(c.onValueChange(r),c.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(Cne,{scope:n,value:r,disabled:a,textId:S,isSelected:d,onItemTextChange:y.useCallback(E=>{h(j=>j||((E==null?void 0:E.textContent)??"").trim())},[]),children:v.jsx(Tv.ItemSlot,{scope:n,value:r,disabled:a,textValue:m,children:v.jsx(et.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:ke(l.onFocus,()=>x(!0)),onBlur:ke(l.onBlur,()=>x(!1)),onClick:ke(l.onClick,()=>{w.current!=="mouse"&&O()}),onPointerUp:ke(l.onPointerUp,()=>{w.current==="mouse"&&O()}),onPointerDown:ke(l.onPointerDown,E=>{w.current=E.pointerType}),onPointerMove:ke(l.onPointerMove,E=>{var j;w.current=E.pointerType,a?(j=f.onItemLeave)==null||j.call(f):w.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ke(l.onPointerLeave,E=>{var j;E.currentTarget===document.activeElement&&((j=f.onItemLeave)==null||j.call(f))}),onKeyDown:ke(l.onKeyDown,E=>{var R;((R=f.searchRef)==null?void 0:R.current)!==""&&E.key===" "||(pne.includes(E.key)&&O(),E.key===" "&&E.preventDefault())})})})})});t4.displayName=Zp;var Qu="SelectItemText",n4=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...o}=e,l=ko(Qu,n),c=$o(Qu,n),f=e4(Qu,n),d=yne(Qu,n),[m,h]=y.useState(null),g=ft(t,O=>h(O),f.onItemTextChange,O=>{var E;return(E=c.itemTextRefCallback)==null?void 0:E.call(c,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 Wn(()=>(S(A),()=>w(A)),[S,w,A]),v.jsxs(v.Fragment,{children:[v.jsx(et.span,{id:f.textId,...o,ref:g}),f.isSelected&&l.valueNode&&!l.valueNodeHasChildren?rd.createPortal(o.children,l.valueNode):null]})});n4.displayName=Qu;var r4="SelectItemIndicator",a4=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return e4(r4,n).isSelected?v.jsx(et.span,{"aria-hidden":!0,...r,ref:t}):null});a4.displayName=r4;var ES="SelectScrollUpButton",i4=y.forwardRef((e,t)=>{const n=$o(ES,e.__scopeSelect),r=aO(ES,e.__scopeSelect),[a,o]=y.useState(!1),l=ft(t,r.onScrollButtonChange);return Wn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=f.scrollTop>0;o(d)};const f=n.viewport;return c(),f.addEventListener("scroll",c),()=>f.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),a?v.jsx(s4,{...e,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:f}=n;c&&f&&(c.scrollTop=c.scrollTop-f.offsetHeight)}}):null});i4.displayName=ES;var jS="SelectScrollDownButton",o4=y.forwardRef((e,t)=>{const n=$o(jS,e.__scopeSelect),r=aO(jS,e.__scopeSelect),[a,o]=y.useState(!1),l=ft(t,r.onScrollButtonChange);return Wn(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=f.scrollHeight-f.clientHeight,m=Math.ceil(f.scrollTop)<d;o(m)};const f=n.viewport;return c(),f.addEventListener("scroll",c),()=>f.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),a?v.jsx(s4,{...e,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:f}=n;c&&f&&(c.scrollTop=c.scrollTop+f.offsetHeight)}}):null});o4.displayName=jS;var s4=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,o=$o("SelectScrollButton",n),l=y.useRef(null),c=Cv(n),f=y.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return y.useEffect(()=>()=>f(),[f]),Wn(()=>{var m;const d=c().find(h=>h.ref.current===document.activeElement);(m=d==null?void 0:d.ref.current)==null||m.scrollIntoView({block:"nearest"})},[c]),v.jsx(et.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:ke(a.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:ke(a.onPointerMove,()=>{var d;(d=o.onItemLeave)==null||d.call(o),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:ke(a.onPointerLeave,()=>{f()})})}),Rne="SelectSeparator",l4=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return v.jsx(et.div,{"aria-hidden":!0,...r,ref:t})});l4.displayName=Rne;var TS="SelectArrow",Nne=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Rv(n),o=ko(TS,n),l=$o(TS,n);return o.open&&l.position==="popper"?v.jsx(jA,{...a,...r,ref:t}):null});Nne.displayName=TS;var Mne="SelectBubbleInput",c4=y.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const a=y.useRef(null),o=ft(r,a),l=L3(t);return y.useEffect(()=>{const c=a.current;if(!c)return;const f=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(f,"value").set;if(l!==t&&m){const h=new Event("change",{bubbles:!0});m.call(c,t),c.dispatchEvent(h)}},[l,t]),v.jsx(et.select,{...n,style:{...CL,...n.style},ref:o,defaultValue:t})});c4.displayName=Mne;function u4(e){return e===""||e===void 0}function f4(e){const t=Gn(e),n=y.useRef(""),r=y.useRef(0),a=y.useCallback(l=>{const c=n.current+l;t(c),(function f(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>f(""),1e3))})(c)},[t]),o=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,o]}function d4(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=Pne(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 Pne(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Dne=I3,h4=U3,kne=H3,$ne=F3,zne=V3,p4=G3,Lne=Z3,m4=J3,v4=t4,Ine=n4,Bne=a4,g4=i4,y4=o4,b4=l4;const Ts=Dne,Cs=kne,No=y.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(h4,{ref:r,className:be("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($ne,{asChild:!0,children:v.jsx(iA,{className:"h-4 w-4 opacity-50"})})]}));No.displayName=h4.displayName;const x4=y.forwardRef(({className:e,...t},n)=>v.jsx(g4,{ref:n,className:be("flex cursor-default items-center justify-center py-1",e),...t,children:v.jsx(FF,{className:"h-4 w-4"})}));x4.displayName=g4.displayName;const w4=y.forwardRef(({className:e,...t},n)=>v.jsx(y4,{ref:n,className:be("flex cursor-default items-center justify-center py-1",e),...t,children:v.jsx(iA,{className:"h-4 w-4"})}));w4.displayName=y4.displayName;const Mo=y.forwardRef(({className:e,children:t,position:n="popper",...r},a)=>v.jsx(zne,{children:v.jsxs(p4,{ref:a,className:be("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(x4,{}),v.jsx(Lne,{className:be("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),v.jsx(w4,{})]})}));Mo.displayName=p4.displayName;const Une=y.forwardRef(({className:e,...t},n)=>v.jsx(m4,{ref:n,className:be("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Une.displayName=m4.displayName;const zt=y.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(v4,{ref:r,className:be("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(Bne,{children:v.jsx(s5,{className:"h-4 w-4"})})}),v.jsx(Ine,{children:t})]}));zt.displayName=v4.displayName;const qne=y.forwardRef(({className:e,...t},n)=>v.jsx(b4,{ref:n,className:be("-mx-1 my-1 h-px bg-muted",e),...t}));qne.displayName=b4.displayName;const yd=pA,Nv=tL,Hne=mA,S4=y.forwardRef(({className:e,...t},n)=>v.jsx(sd,{ref:n,className:be("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}));S4.displayName=sd.displayName;const Pc=y.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(Hne,{children:[v.jsx(S4,{}),v.jsxs(ld,{ref:r,className:be("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(sv,{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(m5,{className:"h-4 w-4"}),v.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Pc.displayName=ld.displayName;const bd=({className:e,...t})=>v.jsx("div",{className:be("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});bd.displayName="DialogHeader";const Dc=y.forwardRef(({className:e,...t},n)=>v.jsx(cd,{ref:n,className:be("text-lg font-semibold leading-none tracking-tight",e),...t}));Dc.displayName=cd.displayName;const Fne=y.forwardRef(({className:e,...t},n)=>v.jsx(ud,{ref:n,className:be("text-sm text-muted-foreground",e),...t}));Fne.displayName=ud.displayName;function Vne({onSuccess:e,appId:t}){const[n,r]=y.useState(!1),[a,o]=y.useState(null),[l,c]=y.useState("none"),f=y.useRef(null);function d(h){if(h.preventDefault(),!a)return;const g=new FormData;g.append("file",a),l!=="none"&&g.append("status",l),t&&g.append("app_id",String(t));const x=fetch("/api/v1/builds",{method:"POST",credentials:"include",body:g}).then(async A=>{if(!A.ok){const S=await A.json().catch(()=>({}));throw new Error(S.error??"Upload failed. Check the file format.")}e()});_t.promise(x,{loading:"Uploading build…",success:"Build uploaded",error:A=>A instanceof Error?A.message:"Failed to upload build"}),r(!1),o(null),c("none")}function m(h){r(h),h||(o(null),c("none"))}return v.jsxs(yd,{open:n,onOpenChange:m,children:[v.jsx(Nv,{asChild:!0,children:v.jsxs(ct,{size:"sm",children:[v.jsx(uV,{className:"mr-2 h-4 w-4"}),"Upload build"]})}),v.jsxs(Pc,{className:"sm:max-w-md",children:[v.jsx(bd,{children:v.jsx(Dc,{children:"Upload build"})}),v.jsxs("form",{onSubmit:d,className:"flex flex-col gap-4 pt-2",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Pt,{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 h;return(h=f.current)==null?void 0:h.click()},onDragOver:h=>h.preventDefault(),onDrop:h=>{h.preventDefault();const g=h.dataTransfer.files[0];g&&o(g)},children:a?a.name:"Click or drag to upload"}),v.jsx("input",{ref:f,type:"file",accept:".zip,.apk",className:"hidden",onChange:h=>{var g;return o(((g=h.target.files)==null?void 0:g[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(Pt,{children:["Status ",v.jsx("span",{className:"text-muted-foreground",children:"(optional)"})]}),v.jsxs(Ts,{value:l,onValueChange:c,children:[v.jsx(No,{children:v.jsx(Cs,{})}),v.jsxs(Mo,{children:[v.jsx(zt,{value:"none",children:"None"}),v.jsx(zt,{value:"Backlog",children:"Backlog"}),v.jsx(zt,{value:"In Progress",children:"In Progress"}),v.jsx(zt,{value:"Done",children:"Done"}),v.jsx(zt,{value:"Rejected",children:"Rejected"})]})]})]}),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,children:"Upload"})]})]})]})]})}function Xp({className:e,...t}){return v.jsx("span",{className:be("font-mono text-xs tabular-nums tracking-tight",e),...t})}async function Gne(){const e=await fetch("/api/v1/apps",{credentials:"include"});return e.ok?(await e.json()).items:[]}async function Yne({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 Wne(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 Kne(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 Zne(e){const t=await fetch(`/api/v1/builds/${e}`,{credentials:"include"});return t.ok?t.json():null}function Xne(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 Qne({onSuccess:e}){const[t,n]=y.useState(!1),[r,a]=y.useState(""),[o,l]=y.useState(""),[c,f]=y.useState("ios"),[d,m]=y.useState(""),[h,g]=y.useState(!1);async function x(A){A.preventDefault(),m(""),g(!0);try{const S=await Wne({name:r.trim(),bundle_id_key:o.trim(),platform:c});if(!S){m("Failed to create app");return}if("error"in S){m(S.error);return}n(!1),a(""),l(""),f("ios"),_t.success("App created"),e()}catch{_t.error("Failed to create app — check your network")}finally{g(!1)}}return v.jsxs(yd,{open:t,onOpenChange:n,children:[v.jsx(Nv,{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(d5,{className:"size-3.5 shrink-0"}),v.jsx("span",{children:"Add App"})]})}),v.jsxs(Pc,{className:"sm:max-w-sm",children:[v.jsx(bd,{children:v.jsx(Dc,{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(Pt,{htmlFor:"app-name",children:"Name"}),v.jsx(tn,{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(Pt,{htmlFor:"bundle-id",children:"Bundle ID"}),v.jsx(tn,{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(Pt,{htmlFor:"platform",children:"Platform"}),v.jsxs(Ts,{value:c,onValueChange:A=>f(A),children:[v.jsx(No,{id:"platform",children:v.jsx(Cs,{})}),v.jsxs(Mo,{children:[v.jsx(zt,{value:"ios",children:"iOS"}),v.jsx(zt,{value:"android",children:"Android"}),v.jsx(zt,{value:"both",children:"Both"})]})]})]}),d&&v.jsx("p",{className:"text-sm text-destructive",children:d}),v.jsx(ct,{type:"submit",disabled:h,className:"w-full",children:h?"Creating…":"Create App"})]})]})]})}function Jne({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(Xp,{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(Qne,{onSuccess:r})})]})}const ere=Ec("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 Ql({className:e,variant:t,tone:n,...r}){return v.jsx("div",{className:be(ere({variant:t,tone:n}),e),...r})}var _4="AlertDialog",[tre]=ha(_4,[I5]),qi=I5(),A4=e=>{const{__scopeAlertDialog:t,...n}=e,r=qi(t);return v.jsx(pA,{...r,...n,modal:!0})};A4.displayName=_4;var nre="AlertDialogTrigger",O4=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=qi(n);return v.jsx(tL,{...a,...r,ref:t})});O4.displayName=nre;var rre="AlertDialogPortal",E4=e=>{const{__scopeAlertDialog:t,...n}=e,r=qi(t);return v.jsx(mA,{...r,...n})};E4.displayName=rre;var are="AlertDialogOverlay",j4=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=qi(n);return v.jsx(sd,{...a,...r,ref:t})});j4.displayName=are;var Hl="AlertDialogContent",[ire,ore]=tre(Hl),sre=O5("AlertDialogContent"),T4=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...a}=e,o=qi(n),l=y.useRef(null),c=ft(t,l),f=y.useRef(null);return v.jsx(wY,{contentName:Hl,titleName:C4,docsSlug:"alert-dialog",children:v.jsx(ire,{scope:n,cancelRef:f,children:v.jsxs(ld,{role:"alertdialog",...o,...a,ref:c,onOpenAutoFocus:ke(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(sre,{children:r}),v.jsx(cre,{contentRef:l})]})})})});T4.displayName=Hl;var C4="AlertDialogTitle",R4=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=qi(n);return v.jsx(cd,{...a,...r,ref:t})});R4.displayName=C4;var N4="AlertDialogDescription",M4=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=qi(n);return v.jsx(ud,{...a,...r,ref:t})});M4.displayName=N4;var lre="AlertDialogAction",P4=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=qi(n);return v.jsx(sv,{...a,...r,ref:t})});P4.displayName=lre;var D4="AlertDialogCancel",k4=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:a}=ore(D4,n),o=qi(n),l=ft(t,a);return v.jsx(sv,{...o,...r,ref:l})});k4.displayName=D4;var cre=({contentRef:e})=>{const t=`\`${Hl}\` requires a description for the component to be accessible for screen reader users.
|
|
408
|
-
|
|
409
|
-
You can add a description to the \`${Hl}\` by passing a \`${N4}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
410
|
-
|
|
411
|
-
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 \`${Hl}\`. 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.
|
|
412
|
-
|
|
413
|
-
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},ure=A4,fre=O4,dre=E4,$4=j4,z4=T4,L4=P4,I4=k4,B4=R4,U4=M4;const Mv=ure,hre=fre,pre=dre,q4=y.forwardRef(({className:e,...t},n)=>v.jsx($4,{className:be("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}));q4.displayName=$4.displayName;const xd=y.forwardRef(({className:e,...t},n)=>v.jsxs(pre,{children:[v.jsx(q4,{}),v.jsx(z4,{ref:n,className:be("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})]}));xd.displayName=z4.displayName;const wd=({className:e,...t})=>v.jsx("div",{className:be("flex flex-col space-y-2 text-center sm:text-left",e),...t});wd.displayName="AlertDialogHeader";const Sd=({className:e,...t})=>v.jsx("div",{className:be("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Sd.displayName="AlertDialogFooter";const _d=y.forwardRef(({className:e,...t},n)=>v.jsx(B4,{ref:n,className:be("text-lg font-semibold",e),...t}));_d.displayName=B4.displayName;const Ad=y.forwardRef(({className:e,...t},n)=>v.jsx(U4,{ref:n,className:be("text-sm text-muted-foreground",e),...t}));Ad.displayName=U4.displayName;const Pv=y.forwardRef(({className:e,...t},n)=>v.jsx(L4,{ref:n,className:be(nv(),e),...t}));Pv.displayName=L4.displayName;const Od=y.forwardRef(({className:e,...t},n)=>v.jsx(I4,{ref:n,className:be(nv({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Od.displayName=I4.displayName;const H4={Backlog:"backlog","In Progress":"progress",Done:"done",Rejected:"rejected"};function qR(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 mre(e){const r=new Date(e).getTime()+6048e5-Date.now();if(r<=0)return{label:"Expired",urgent:!0};const a=Math.floor(r/36e5);return a<1?{label:"< 1 hour left",urgent:!0}:a<24?{label:`Expires in ${a}h`,urgent:a<6}:{label:`Expires in ${Math.floor(a/24)}d`,urgent:!1}}function vre({build:e,isLast:t,onNavigate:n,onStatusChange:r}){const[a,o]=y.useState(!1),l=e.status_label==="Done",c=l&&e.completed_at?mre(e.completed_at):null;function f(d){if(d==="Done"){o(!0);return}r(e.id,d==="none"?null:d)}return v.jsxs(v.Fragment,{children:[v.jsx(Mv,{open:a,onOpenChange:o,children:v.jsxs(xd,{children:[v.jsxs(wd,{children:[v.jsx(_d,{children:"Mark as Done?"}),v.jsx(Ad,{children:"Build files will be automatically deleted after 7 days. Reverting the status will cancel the scheduled deletion."})]}),v.jsxs(Sd,{children:[v.jsx(Od,{children:"Cancel"}),v.jsx(Pv,{onClick:()=>{r(e.id,"Done"),o(!1)},children:"Confirm"})]})]})}),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(Xp,{children:e.build_number??"—"})]}),v.jsx(Ql,{tone:e.platform==="ios"?"ios":"android",className:"text-xs capitalize",children:e.platform}),e.status_label&&v.jsx(Ql,{tone:H4[e.status_label],className:"text-xs",children:e.status_label})]}),v.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:"14px",marginTop:"0.7rem",alignItems:"center"},className:"text-xs text-muted-foreground",children:[e.uploader&&v.jsxs(v.Fragment,{children:[v.jsx("span",{children:e.uploader}),v.jsx(Ja,{orientation:"vertical",className:"h-3"})]}),v.jsx(Xp,{children:new Date(e.uploaded_at).toLocaleDateString()}),c&&v.jsxs(v.Fragment,{children:[v.jsx(Ja,{orientation:"vertical",className:"h-3"}),v.jsx("span",{className:c.urgent?"text-destructive":"",children:c.label})]})]})]}),v.jsxs(Ts,{value:e.status_label??"none",onValueChange:f,children:[v.jsx(No,{className:"h-9 w-32 text-xs",children:v.jsx(Cs,{})}),v.jsxs(Mo,{children:[v.jsx(zt,{value:"none",children:v.jsx("span",{className:"text-muted-foreground",children:"—"})}),v.jsx(zt,{value:"Backlog",children:"Backlog"}),v.jsx(zt,{value:"In Progress",children:"In Progress"}),v.jsx(zt,{value:"Done",children:"Done"}),v.jsx(zt,{value:"Rejected",children:"Rejected"})]})]}),v.jsxs(ct,{size:"sm",onClick:()=>n(e.id),disabled:l,children:[v.jsx(sA,{className:"mr-1.5 h-3.5 w-3.5"}),"Start QA"]})]})]})}function gre({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(iA,{className:"h-4 w-4 shrink-0 text-muted-foreground"}):v.jsx(oA,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),v.jsx(Xp,{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,c)=>v.jsx(vre,{build:l,isLast:c===t.length-1,onNavigate:a,onStatusChange:o},l.id))})]})}function yre(){const e=ka(),[t,n]=nd(),[r,a]=y.useState([]),[o,l]=y.useState([]),[c,f]=y.useState(""),[d,m]=y.useState("all"),[h,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 Gne();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 Yne({appId:S,search:c,statusFilter:d});l(N),N.length>0&&x.size===0&&A(new Set([N[0].version_name??"Unversioned"]))}finally{g(!1)}},[S,c,d]);y.useEffect(()=>{O()},[]),y.useEffect(()=>{E()},[E]);function j(N){N!==S&&(l([]),A(new Set)),n({appId:String(N)})}function R(N){A(D=>{const z=new Set(D);return z.has(N)?z.delete(N):z.add(N),z})}async function T(N,D){await Kne(N,D),l(z=>z.map(V=>V.id===N?{...V,status_label:D}:V))}const C=Xne(o);return v.jsxs("div",{className:"flex h-full gap-0",children:[v.jsx(Jne,{apps:r,selectedAppId:S,onSelect:j,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(Vne,{onSuccess:()=>{O(),E()},appId:S})]}),S?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"flex flex-wrap gap-2",children:[v.jsx(z3,{placeholder:"Search version…",value:c,onChange:f}),v.jsxs(Ts,{value:d,onValueChange:m,children:[v.jsx(No,{className:"h-8 w-36",children:v.jsx(Cs,{placeholder:"Status"})}),v.jsxs(Mo,{children:[v.jsx(zt,{value:"all",children:"All statuses"}),v.jsx(zt,{value:"Backlog",children:"Backlog"}),v.jsx(zt,{value:"In Progress",children:"In Progress"}),v.jsx(zt,{value:"Done",children:"Done"}),v.jsx(zt,{value:"Rejected",children:"Rejected"})]})]})]}),h?v.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading…"}):C.length===0?v.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center",children:[v.jsx(nV,{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:C.map(({versionName:N,builds:D})=>v.jsx(gre,{versionName:N,builds:D,isOpen:x.has(N),onToggle:()=>R(N),onNavigate:z=>e(`/app-center/build?id=${z}`),onStatusChange:T},N))})]}):v.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center",children:[v.jsx(QF,{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."})]})]})]})}function bre(e){const[t,n]=y.useState(null);return y.useEffect(()=>{e&&Zne(e).then(n)},[e]),{build:t}}const xre=location.protocol==="https:"?"wss:":"ws:",wre=`${xre}//${location.host}`,Sre=2e3;function iO(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(wre);m.binaryType="arraybuffer",n.current=m,m.onopen=()=>a(!0),m.onclose=()=>{a(!1),f||setTimeout(d,Sre)},m.onmessage=h=>{var g;if(h.data instanceof ArrayBuffer){(g=l.current)==null||g.call(l,h.data);return}try{o.current(JSON.parse(h.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 _re(e){const[t,n]=y.useState([]),[r,a]=y.useState(null),[o,l]=y.useState(null),[c,f]=y.useState(""),[d,m]=y.useState(!1),[h,g]=y.useState(""),x=y.useCallback(C=>{C.type==="agents:listed"&&n(C.sessions),C.type==="session:joined"&&(m(!1),g("Connected")),C.type==="error"&&(m(!1),g(`Error: ${C.message}`))},[]),{send:A,connected:S}=iO(x);y.useEffect(()=>{if(!S)return;A({type:"agents:list"});const C=setInterval(()=>A({type:"agents:list"}),5e3);return()=>clearInterval(C)},[S,A]);const w=y.useRef({sessionId:o,deviceId:c});y.useEffect(()=>{w.current={sessionId:o,deviceId:c}},[o,c]),y.useEffect(()=>()=>{const{sessionId:C,deviceId:N}=w.current;C&&N&&A({type:"device:shutdown",sessionId:C,payload:{deviceId:N}})},[A]);const O=t.filter(C=>C.devices.some(N=>N.platform===e)),E=y.useCallback(C=>{f(C.id),m(!0),g("Booting…"),l(C.sessionId)},[]),j=y.useCallback(()=>f(""),[]),R=y.useCallback(()=>{const{sessionId:C,deviceId:N}=w.current;C&&N&&A({type:"device:shutdown",sessionId:C,payload:{deviceId:N}}),l(null),m(!1),g("")},[A]),T=y.useCallback(()=>{const{sessionId:C,deviceId:N}=w.current;C&&N&&A({type:"device:shutdown",sessionId:C,payload:{deviceId:N}}),l(null),a(null),m(!1),g("")},[A]);return{sessions:t,selectedAgent:r,setSelectedAgent:a,activeSessionId:o,deviceId:c,booting:d,status:h,send:A,connected:S,agentGroups:O,startDevice:E,resetDevice:j,handleBack:R,handleBackToMacs:T}}function Are(e,t){const[n,r]=y.useState(""),[a,o]=y.useState(""),[l,c]=y.useState("app-only"),f=(e==null?void 0:e.devices.filter(h=>h.platform===t))??[],d=[...new Set(f.map(h=>h.osVersion).filter(Boolean))].sort((h,g)=>{const x=w=>w.replace(/^[^\d]*/,"").split(".").map(Number),[A,S]=[x(h),x(g)];for(let w=0;w<Math.max(A.length,S.length);w++){const O=(S[w]??0)-(A[w]??0);if(O!==0)return O}return 0}),m=(n?f.filter(h=>h.osVersion===n):f).filter(h=>!a||h.name.toLowerCase().includes(a.toLowerCase()));return{filteredDevices:f,osVersions:d,osVersion:n,setOsVersion:r,deviceSearch:a,setDeviceSearch:o,versionedDevices:m,resetMode:l,setResetMode:c}}function Ore(){const[e]=nd(),t=e.get("perf")==="1",[n,r]=y.useState(t);return y.useEffect(()=>{if(!t){r(!1);return}r(!0);const a=o=>{o.ctrlKey&&o.shiftKey&&o.key==="P"&&r(l=>!l)};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[t]),{perfMode:t,visible:n}}const Ere=["video/mp4;codecs=avc1","video/webm;codecs=vp9","video/webm;codecs=vp8","video/webm"];function F4({sessionId:e,buildId:t,onRecordingUploaded:n}){const[r,a]=y.useState("idle"),o=y.useRef(null),l=y.useRef(n);y.useEffect(()=>{l.current=n},[n]);const c=y.useRef(!1),f=y.useRef(null),d=y.useRef([]),m=y.useRef(""),h=y.useRef(0),g=y.useRef(null),x=y.useCallback(()=>{var w;c.current&&((w=g.current)==null||w.call(g),h.current=requestAnimationFrame(x))},[]),A=y.useCallback(w=>{const O=o.current;if(!O)return;const E=O.getContext("2d");E&&(E.fillStyle="#000",E.fillRect(0,0,O.width,O.height));const j=Ere.find(T=>MediaRecorder.isTypeSupported(T))??"";if(!j)return;m.current=j,d.current=[];const R=new MediaRecorder(O.captureStream(30),{mimeType:j});R.ondataavailable=T=>{T.data.size>0&&d.current.push(T.data)},f.current=R,R.start(1e3),g.current=w,c.current=!0,h.current=requestAnimationFrame(x),a("recording")},[x]),S=y.useCallback(async()=>{var T;a("uploading"),c.current=!1,cancelAnimationFrame(h.current);const w=f.current;if(!w){a("idle");return}await new Promise(C=>{const N=setTimeout(C,5e3);w.onstop=()=>{clearTimeout(N),C()};try{w.stop()}catch{clearTimeout(N),C()}}),f.current=null;const O=m.current,E=O.includes("mp4")?".mp4":".webm",j=new Blob(d.current,{type:O});d.current=[];const R=new FormData;R.append("file",j,`tapflow-${Date.now()}${E}`);try{const C=new URLSearchParams({sessionId:e});t&&C.set("buildId",String(t));const N=await fetch(`/api/v1/recordings/upload?${C}`,{method:"POST",credentials:"include",body:R}),D=await N.json();if(N.ok&&D.url){const z=document.createElement("a");z.href=D.url,z.download="",z.click(),(T=l.current)==null||T.call(l),a("done"),setTimeout(()=>a("idle"),2e3)}else a("idle")}catch{a("idle")}},[e,t]);return y.useEffect(()=>{if(r!=="recording")return;const w=()=>{document.visibilityState==="hidden"&&S()};return document.addEventListener("visibilitychange",w),()=>{var O;document.removeEventListener("visibilitychange",w),c.current&&(c.current=!1,cancelAnimationFrame(h.current),(O=f.current)==null||O.stop(),f.current=null)}},[r,S]),{recordState:r,recordCanvasRef:o,startClientRecording:A,stopClientRecording:S}}function V4(){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 us({className:e,...t}){return v.jsx("kbd",{"data-slot":"kbd",className:be("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium","[&_svg:not([class*='size-'])]:size-3","[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",e),...t})}function CS({className:e,...t}){return v.jsx("kbd",{"data-slot":"kbd-group",className:be("inline-flex items-center gap-1",e),...t})}function Iu({label:e,keys:t}){return v.jsxs("span",{className:"flex items-center gap-3",children:[e,v.jsx(CS,{children:t.map(n=>v.jsx(us,{children:n},n))})]})}function G4({joined:e,onScreenshot:t,onRecordToggle:n,recordState:r,onRotate:a,onDeepLink:o,platformSlot:l,launchSlot:c}){return e?v.jsx(Bp,{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:[c,l,v.jsxs(oa,{children:[v.jsx(sa,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:o,children:v.jsx(u5,{className:"h-4 w-4"})})}),v.jsx(kr,{side:"left",children:v.jsx(Iu,{label:"Deeplink",keys:["⌘","K"]})})]}),v.jsx("div",{className:"w-4 h-px bg-border my-1"}),v.jsxs(oa,{children:[v.jsx(sa,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:t,children:v.jsx(HF,{className:"h-4 w-4"})})}),v.jsx(kr,{side:"left",children:v.jsx(Iu,{label:"Screenshot",keys:["⌘","S"]})})]}),v.jsxs(oa,{children:[v.jsx(sa,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:be("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(Dp,{className:"h-4 w-4 animate-spin"}):r==="recording"?v.jsx(sV,{className:"h-4 w-4 fill-current"}):v.jsx(hV,{className:"h-4 w-4"})})}),v.jsx(kr,{side:"left",children:r==="idle"?v.jsx(Iu,{label:"Start recording",keys:["⌘","⇧","Y"]}):r==="recording"?v.jsx(Iu,{label:"Stop recording",keys:["⌘","⇧","Y"]}):"Processing…"})]}),v.jsx("div",{className:"w-4 h-px bg-border my-1"}),v.jsxs(oa,{children:[v.jsx(sa,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:a,children:v.jsx(iV,{className:"h-4 w-4"})})}),v.jsx(kr,{side:"left",children:v.jsx(Iu,{label:"Rotate",keys:["⌘","⇧","O"]})})]})]})}):null}function jre(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 oO(e){const{joined:t,fps:n,keyboardActive:r}=e,a=jre(e),o=n>15,l=n>0&&n<=15,c=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:be("flex items-center",r?"text-emerald-500":"text-muted-foreground"),style:{gap:6},children:[v.jsx(oV,{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:c}}),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:be("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 Y4({open:e,onOpenChange:t,sessionId:n,send:r}){const[a,o]=y.useState(""),l=y.useRef(null);y.useEffect(()=>{e?setTimeout(()=>{var f;return(f=l.current)==null?void 0:f.focus()},0):o("")},[e]);const c=()=>{a.trim()&&(r({type:"open-url",sessionId:n,payload:{url:a.trim()}}),t(!1))};return v.jsx(yd,{open:e,onOpenChange:t,children:v.jsxs(Pc,{className:"w-[500px] max-w-[500px] h-[52px] !rounded-[18px] p-[10px] border border-border bg-background shadow-lg overflow-hidden [&>button]:hidden","aria-describedby":void 0,children:[v.jsx(Dc,{className:"sr-only",children:"Open Deeplink"}),v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsxs("div",{className:"flex-1 h-[32px] flex items-center gap-2 pl-[4px] pb-[1px]",children:[v.jsx(h5,{className:"h-4 w-4 text-muted-foreground shrink-0"}),v.jsx("input",{ref:l,className:"flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground min-w-0",placeholder:"myapp://home...",value:a,onChange:f=>o(f.target.value),onKeyDown:f=>{f.key==="Enter"&&c()}})]}),v.jsx(ct,{size:"sm",disabled:!a.trim(),onClick:c,className:"shrink-0 rounded-xl h-8 px-4",children:"Open"})]})]})})}function Tre(e,t,n,r,a,o){const{x:l,y:c,width:f,height:d}=a;let m,h;if(o){const g=(e.x-t.left)/t.width;m=(1-(e.y-t.top)/t.height)*n,h=g*r}else m=(e.x-t.left)*(n/t.width),h=(e.y-t.top)*(r/t.height);return m<l||m>l+f||h<c||h>c+d?null:{x:(m-l)/f,y:(h-c)/d}}function Cre(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 W4(e){return{f0:{x:1-e.x,y:1-e.y},f1:e}}function Rre(e,t){return e>0?Math.min(1,t/e):1}const Ha=13,ss=8,HR=16,Nre=.02,Mre=100;function Pre({sessionId:e,buildId:t,send:n,connected:r,joined:a,deviceReady:o,installing:l,installed:c,installError:f,bootError:d,launching:m,setLaunching:h,chrome:g,binaryFrameHandlerRef:x,onRecordingUploaded:A,swKeyboardVisible:S,swKeyboardPending:w,onKbdToggle:O,perfHookRef:E}){const j=y.useRef(null),R=y.useRef(null),T=y.useRef(null),{fps:C,frameCount:N}=V4(),D=y.useRef(0),{recordState:z,recordCanvasRef:V,startClientRecording:U,stopClientRecording:P}=F4({sessionId:e,buildId:t,onRecordingUploaded:A}),B=y.useRef(0),[q,Y]=y.useState(!1),[$,G]=y.useState(!1),[F,K]=y.useState(!1),[ne,I]=y.useState(!1),[Z,Q]=y.useState(null),[fe,le]=y.useState(null),[Se,ve]=y.useState(!1),[xe,ce]=y.useState(null),Ae=y.useRef(xe);y.useEffect(()=>{Ae.current=xe},[xe]);const Oe=y.useRef(null),oe=y.useRef(null),qe=y.useRef(!1),De=y.useRef(!1),Je=y.useRef(0),Ye=y.useRef(null),at=y.useRef(null),jt=y.useRef("idle"),dt=y.useRef(null),gn=y.useRef(null),on=y.useRef(null);y.useEffect(()=>{on.current=g},[g]),y.useEffect(()=>{const te=new Image;te.onload=()=>{gn.current=te},te.src=`data:image/png;base64,${g.framePng}`},[g.framePng]),y.useEffect(()=>(x.current=te=>{const _e=performance.now();D.current&&_e-D.current,D.current=_e;const de=B.current;createImageBitmap(new Blob([te],{type:"image/jpeg"})).then(ze=>{if(performance.now()-_e,B.current!==de){ze.close();return}const Ie=j.current,Me=Ie==null?void 0:Ie.getContext("2d");if(!Ie||!Me){ze.close();return}if((Ie.width!==ze.width||Ie.height!==ze.height)&&(Ie.width=ze.width,Ie.height=ze.height,!on.current)){const ut=V.current;ut&&(ut.width=ze.width,ut.height=ze.height)}const Ve=performance.now();Me.drawImage(ze,0,0),performance.now()-Ve,ze.close(),G(!0),N.current+=1}).catch(()=>{})},()=>{x.current=void 0}),[x,N,E]),y.useEffect(()=>{const te=V.current,_e=R.current;te&&_e&&(te.width=_e.clientWidth,te.height=_e.clientHeight)},[g]);const Tt=y.useCallback(()=>{const te=V.current,_e=j.current;if(!te||!_e)return;const de=te.getContext("2d");if(!de)return;const ze=on.current;if(de.clearRect(0,0,te.width,te.height),ze){gn.current&&de.drawImage(gn.current,0,0,te.width,te.height);const Ve=Math.round(ze.screenCornerRadius/2*(te.height/(ze.compositeHeight/2)));de.save(),de.beginPath(),Ve>0?de.roundRect(_e.offsetLeft,_e.offsetTop,_e.clientWidth,_e.clientHeight,Ve):de.rect(_e.offsetLeft,_e.offsetTop,_e.clientWidth,_e.clientHeight),de.clip(),de.drawImage(_e,_e.offsetLeft,_e.offsetTop,_e.clientWidth,_e.clientHeight),de.restore()}else de.drawImage(_e,0,0,te.width,te.height);const Ie=Ae.current;if(Ie)for(const Ve of[Ie.f0,Ie.f1]){const ut=ze?_e.offsetLeft+Ve.x*_e.clientWidth:Ve.x*te.width,kn=ze?_e.offsetTop+Ve.y*_e.clientHeight:Ve.y*te.height;qe.current?(de.beginPath(),de.arc(ut,kn,ss,0,Math.PI*2),de.fillStyle="rgba(255,255,255,0.92)",de.fill(),de.strokeStyle="rgba(0,0,0,0.2)",de.lineWidth=1,de.stroke()):(de.beginPath(),de.arc(ut,kn,Ha,0,Math.PI*2),de.strokeStyle="rgba(0,0,0,0.3)",de.lineWidth=3,de.stroke(),de.beginPath(),de.arc(ut,kn,Ha,0,Math.PI*2),de.strokeStyle="rgba(255,255,255,0.65)",de.lineWidth=1.5,de.stroke())}const Me=at.current;if(Me){const Ve=jt.current,ut=dt.current;if(de.save(),Ve==="down")de.beginPath(),de.arc(Me.x,Me.y,ss,0,Math.PI*2),de.fillStyle="rgba(255,255,255,0.92)",de.fill(),de.strokeStyle="rgba(0,0,0,0.2)",de.lineWidth=1,de.stroke();else if(Ve==="release"&&ut){const kn=Math.min((performance.now()-ut.startTime)/350,1);de.beginPath(),de.arc(Me.x,Me.y,ss+26*kn,0,Math.PI*2),de.strokeStyle=`rgba(255,255,255,${(1-kn)*.55})`,de.lineWidth=1.5,de.stroke(),kn>=1&&(jt.current="idle",dt.current=null)}else de.beginPath(),de.arc(Me.x,Me.y,Ha,0,Math.PI*2),de.strokeStyle="rgba(0,0,0,0.3)",de.lineWidth=3,de.stroke(),de.beginPath(),de.arc(Me.x,Me.y,Ha,0,Math.PI*2),de.strokeStyle="rgba(255,255,255,0.65)",de.lineWidth=1.5,de.stroke();de.restore()}},[]),Ft=y.useCallback(()=>{const te=j.current;if(!te)return;const _e=document.createElement("canvas"),de=_e.getContext("2d");de&&(_e.width=te.width,_e.height=te.height,de.drawImage(te,0,0),_e.toBlob(ze=>{if(!ze)return;const Ie=URL.createObjectURL(ze),Me=document.createElement("a");Me.href=Ie,Me.download=`tapflow-${Date.now()}.png`,Me.click(),URL.revokeObjectURL(Ie)},"image/png"))},[]),H=y.useCallback(()=>{if(z==="idle"){const te=V.current;if(!te)return;const _e=R.current;if(_e&&_e.clientWidth>0)te.width=_e.clientWidth,te.height=_e.clientHeight;else{const de=j.current;if(de&&de.width>0)te.width=de.width,te.height=de.height;else return}U(Tt)}else z==="recording"&&P()},[z,U,P,Tt]),ee=y.useCallback(()=>{n({type:"input:rotate",sessionId:e}),K(te=>!te)},[n,e]),ae=y.useRef(F);y.useEffect(()=>{ae.current=F},[F]),y.useEffect(()=>()=>{ae.current&&n({type:"input:rotate",sessionId:e})},[]),y.useEffect(()=>{const te=new Set(["ShiftLeft","ShiftRight","ControlLeft","ControlRight","MetaLeft","MetaRight"]),_e=Me=>{if(Me.code==="AltLeft"||Me.code==="AltRight"){De.current=!0;return}if(Me.metaKey){const ut=document.activeElement;if(!ut||ut.tagName!=="INPUT"&&ut.tagName!=="TEXTAREA"){if(!Me.shiftKey&&Me.code==="KeyK"){Me.preventDefault(),Y(!0);return}if(!Me.shiftKey&&Me.code==="KeyS"){Me.preventDefault(),Ft();return}if(Me.shiftKey&&Me.code==="KeyY"){Me.preventDefault(),H();return}if(Me.shiftKey&&Me.code==="KeyO"){Me.preventDefault(),ee();return}if(Me.shiftKey&&Me.code==="KeyU"){Me.preventDefault(),n({type:"input:button",sessionId:e,payload:{name:"home"}});return}if(Me.shiftKey&&Me.code==="KeyK"){Me.preventDefault(),w||O();return}}}if(!ne||te.has(Me.code))return;Me.preventDefault();const Ve=(Me.shiftKey?2:0)|(Me.ctrlKey?1:0)|(Me.metaKey?8:0);n({type:"input:key",sessionId:e,payload:{code:Me.code,modifiers:Ve}})},de=()=>{qe.current&&(qe.current=!1,ve(!1),n({type:"input:pinch:end",sessionId:e})),De.current=!1,ce(null)},ze=Me=>{(Me.code==="AltLeft"||Me.code==="AltRight")&&de()},Ie=()=>{De.current&&de()};return window.addEventListener("keydown",_e),window.addEventListener("keyup",ze),window.addEventListener("blur",Ie),()=>{window.removeEventListener("keydown",_e),window.removeEventListener("keyup",ze),window.removeEventListener("blur",Ie)}},[ne,n,e,Ft,H,ee,O,w]),y.useEffect(()=>{if(!ne)return;const te=_e=>{const de=R.current??j.current;de&&!de.contains(_e.target)&&I(!1)};return document.addEventListener("pointerdown",te),()=>document.removeEventListener("pointerdown",te)},[ne]);const Re=y.useCallback(te=>{const _e=(F?T.current:null)??R.current;if(!_e)return null;const de=_e.getBoundingClientRect(),ze=g.compositeWidth/2,Ie=g.compositeHeight/2,Me=g.screenRect.x/2,Ve=g.screenRect.y/2,ut=g.screenRect.width/2,kn=g.screenRect.height/2;return Tre({x:te.clientX,y:te.clientY},de,ze,Ie,{x:Me,y:Ve,width:ut,height:kn},F)},[g,F]),Ce=y.useCallback(te=>{const _e=Re(te);return _e?W4(_e):null},[Re]),je=y.useCallback(te=>{const _e=F?T.current:R.current;if(!_e)return null;const de=_e.getBoundingClientRect();let ze,Ie;if(F){const Me=de.height-(te.clientY-de.top),Ve=te.clientX-de.left;ze=Me*(g.compositeWidth/de.height),Ie=Ve*(g.compositeHeight/de.width)}else ze=(te.clientX-de.left)*(g.compositeWidth/de.width),Ie=(te.clientY-de.top)*(g.compositeHeight/de.height);for(const Me of g.buttons){const Ve=ze-Me.normalOffset.x,ut=Ie-Me.normalOffset.y;if(Ve*Ve+ut*ut<Mre**2)return Me.name}return null},[g,F]),Ee=y.useCallback(te=>{const _e=j.current,de=V.current;return _e&&_e.clientWidth>0?{x:_e.offsetLeft+te.x*_e.clientWidth,y:_e.offsetTop+te.y*_e.clientHeight}:{x:te.x*((de==null?void 0:de.width)??1),y:te.y*((de==null?void 0:de.height)??1)}},[]),We=y.useCallback(te=>{if(I(!0),De.current){const Me=Ce(te);if(!Me)return;qe.current=!0,ve(!0),te.target.setPointerCapture(te.pointerId),ce(Me),n({type:"input:pinch:start",sessionId:e,payload:Me});return}const _e=je(te);if(_e){Oe.current=_e,Q(_e);return}const de=Re(te);if(!de)return;oe.current=de,te.target.setPointerCapture(te.pointerId),at.current=Ee(de),jt.current="down",dt.current=null;const ze=te.currentTarget.getBoundingClientRect(),Ie=Ye.current;Ie&&(Ie.style.display="block",Ie.style.left=`${te.clientX-ze.left}px`,Ie.style.top=`${te.clientY-ze.top}px`,Ie.style.width=`${ss*2}px`,Ie.style.height=`${ss*2}px`,Ie.style.background="rgba(255,255,255,0.92)",Ie.style.border="1.5px solid rgba(0,0,0,0.2)",Ie.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:de})},[je,Re,Ce,Ee,n,e]),Ge=y.useCallback(te=>{if(te.buttons===0){if(le(je(te)),De.current){ce(Ce(te)),at.current=null;const Ve=Ye.current;Ve&&(Ve.style.display="none")}else{ce(null);const Ve=Re(te);at.current=Ve?Ee(Ve):null,jt.current!=="down"&&(jt.current="idle");const ut=Ye.current;if(ut)if(Ve){const kn=te.currentTarget.getBoundingClientRect();ut.style.display="block",ut.style.left=`${te.clientX-kn.left}px`,ut.style.top=`${te.clientY-kn.top}px`,ut.style.width=`${Ha*2}px`,ut.style.height=`${Ha*2}px`,ut.style.background="transparent",ut.style.border="1.5px solid rgba(255,255,255,0.6)",ut.style.boxShadow="0 0 0 1px rgba(0,0,0,0.3)"}else ut.style.display="none"}return}if(qe.current){const Ve=Ce(te);if(!Ve)return;const ut=performance.now();if(ut-Je.current<HR)return;Je.current=ut,ce(Ve),n({type:"input:pinch:move",sessionId:e,payload:Ve});return}if(Oe.current||!oe.current)return;const _e=Re(te);if(!_e)return;const de=_e.x-oe.current.x,ze=_e.y-oe.current.y;if(Math.sqrt(de*de+ze*ze)<Nre)return;const Ie=performance.now();if(Ie-Je.current<HR)return;Je.current=Ie,at.current=Ee(_e);const Me=Ye.current;if(Me&&Me.style.display!=="none"){const Ve=te.currentTarget.getBoundingClientRect();Me.style.left=`${te.clientX-Ve.left}px`,Me.style.top=`${te.clientY-Ve.top}px`}n({type:"input:touch:move",sessionId:e,payload:_e})},[je,Re,Ce,Ee,n,e]),Ot=y.useCallback(()=>{if(qe.current){qe.current=!1,ve(!1),ce(null),n({type:"input:pinch:end",sessionId:e});return}if(oe.current=null,Oe.current){n({type:"input:button",sessionId:e,payload:{name:Oe.current}}),Oe.current=null,setTimeout(()=>Q(null),100);return}jt.current="release",dt.current={startTime:performance.now()};const te=Ye.current;te&&(te.style.width=`${Ha*2}px`,te.style.height=`${Ha*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]),Ct=y.useCallback(()=>{if(qe.current){qe.current=!1,ve(!1),ce(null),n({type:"input:pinch:end",sessionId:e});return}if(oe.current=null,Oe.current){Oe.current=null,Q(null);return}jt.current="release",dt.current={startTime:performance.now()},n({type:"input:touch:end",sessionId:e})},[n,e]),Rt=y.useCallback(()=>{le(null),ce(null),at.current=null;const te=Ye.current;te&&(te.style.display="none")},[]),Vt=g.compositeWidth/2,Hr=g.compositeHeight/2,Dn=Rre(Hr,750),Bn=Math.round(Vt*Dn),Zn=Math.round(Hr*Dn),Te=g.screenRect.x/g.compositeWidth*100,Ke=g.screenRect.y/g.compositeHeight*100,me=g.screenRect.width/g.compositeWidth*100,He=g.screenRect.height/g.compositeHeight*100,tt=Math.round(g.screenCornerRadius/2*Dn),Be=v.jsxs(v.Fragment,{children:[v.jsxs(oa,{children:[v.jsx(sa,{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(l5,{className:"h-4 w-4"})})}),v.jsx(kr,{side:"left",children:v.jsxs("span",{className:"flex items-center gap-3",children:["Home ",v.jsxs(CS,{children:[v.jsx(us,{children:"⌘"}),v.jsx(us,{children:"⇧"}),v.jsx(us,{children:"U"})]})]})})]}),v.jsxs(oa,{children:[v.jsx(sa,{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(Dp,{className:"h-4 w-4 animate-spin"}):v.jsx(XF,{className:"h-4 w-4"})})}),v.jsx(kr,{side:"left",children:v.jsxs("span",{className:"flex items-center gap-3",children:["Software keyboard ",v.jsxs(CS,{children:[v.jsx(us,{children:"⌘"}),v.jsx(us,{children:"⇧"}),v.jsx(us,{children:"K"})]})]})})]})]}),hn=c&&t?v.jsxs(oa,{children:[v.jsx(sa,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",disabled:m,onClick:()=>{h(!0),n({type:"app:launch",sessionId:e,buildId:t})},children:m?v.jsx(Dp,{className:"h-4 w-4 animate-spin"}):v.jsx(sA,{className:"h-4 w-4"})})}),v.jsx(kr,{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:V,style:{display:"none"}}),v.jsx(Y4,{open:q,onOpenChange:Y,sessionId:e,send:n}),v.jsx(G4,{joined:a,onDeepLink:()=>Y(!0),onScreenshot:Ft,onRecordToggle:H,recordState:z,onRotate:ee,platformSlot:Be,launchSlot:hn}),v.jsxs("div",{className:"flex items-start gap-8",children:[v.jsxs("div",{ref:T,style:{width:F?Zn:Bn,height:F?Bn:Zn,position:"relative",flexShrink:0},children:[v.jsxs("div",{ref:R,className:`relative ${fe?"cursor-pointer":"cursor-default"}`,style:{width:Bn,height:Zn,...F?{position:"absolute",top:(Bn-Zn)/2,left:(Zn-Bn)/2,transform:"rotate(-90deg)",transformOrigin:"center center"}:{}},onPointerDown:We,onPointerMove:Ge,onPointerUp:Ot,onPointerCancel:Ct,onPointerLeave:Rt,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:j,style:{position:"absolute",zIndex:3,left:`${Te}%`,top:`${Ke}%`,width:`${me}%`,height:`${He}%`,borderRadius:tt>0?`${tt}px`:void 0,backgroundColor:"#010101",cursor:"none",visibility:$?"visible":"hidden"}}),!$&&v.jsx("div",{className:"absolute animate-pulse bg-zinc-700",style:{zIndex:3,left:`${Te}%`,top:`${Ke}%`,width:`${me}%`,height:`${He}%`,borderRadius:tt>0?`${tt}px`:void 0}}),xe&&(()=>{const te=Te/100,_e=Ke/100,de=me/100,ze=He/100,Ie=(Me,Ve)=>({left:`${(te+Me*de)*100}%`,top:`${(_e+Ve*ze)*100}%`});return v.jsx(v.Fragment,{children:[xe.f0,xe.f1].map((Me,Ve)=>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",...Se?{width:ss*2,height:ss*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:Ha*2,height:Ha*2,background:"transparent",border:"1.5px solid rgba(255,255,255,0.6)",boxShadow:"0 0 0 1px rgba(0,0,0,0.3)"},...Ie(Me.x,Me.y)}},Ve))})})(),a&&C===0&&v.jsx("div",{style:{position:"absolute",zIndex:8,left:`${Te}%`,top:`${Ke}%`,width:`${me}%`,height:`${He}%`,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 _e=Z===te.name,de=fe===te.name,ze=te.anchor==="bottom",Ie=te.anchor==="top",Me=ze?(te.normalOffset.y-te.buttonH/2)/g.compositeHeight*100:Ie?te.rolloverOffset.y/g.compositeHeight*100:(te.normalOffset.y-te.buttonH/2)/g.compositeHeight*100,Ve=te.buttonH/g.compositeHeight*100,ut=te.buttonW/g.compositeWidth*100,kn=te.buttonW/2,wr=(te.rolloverOffset.x-kn)/g.compositeWidth*100,yn=(2*te.rolloverOffset.x-te.normalOffset.x-kn)/g.compositeWidth*100,Xn=te.rolloverOffset.x/g.compositeWidth*100,Gi=ze?(te.normalOffset.y-te.buttonH/2)/g.compositeHeight*100:Ie?te.rolloverOffset.y/g.compositeHeight*100:(te.normalOffset.y-te.buttonH/2)/g.compositeHeight*100,Hs=Ie?(2*te.rolloverOffset.y-te.normalOffset.y)/g.compositeHeight*100:0,vg=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:vg,top:`${Ie&&de?Hs:Me}%`,left:`${Ie?wr:de?yn:wr}%`,width:`${ut}%`,height:`${Ve}%`,transition:Ie?"top 0.15s ease":"left 0.15s ease",pointerEvents:"none",userSelect:"none"},draggable:!1,alt:""}),_e&&te.pressedPng&&te.pressedRect&&v.jsx("img",{src:`data:image/png;base64,${te.pressedPng}`,style:{position:"absolute",zIndex:te.onTop?3:1,left:`${Ie?wr:de?yn:wr}%`,top:`${Ie?de?Hs:Me: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:""}),de&&v.jsx("div",{className:"bg-foreground/85 text-background text-[11px] px-[7px] py-1.5 rounded-lg whitespace-nowrap pointer-events-none",style:{position:"absolute",zIndex:5,left:`${Xn}%`,top:`${Gi}%`,transform:"translate(-50%, calc(-100% - 8px))"},children:te.accessibilityTitle})]},te.name)})]}),v.jsx("div",{ref:Ye,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(oO,{joined:a,fps:C,connected:r,deviceReady:o,bootError:d,installing:l,installError:f,keyboardActive:ne})]})]})}class Dre{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 c=!this.sps||n.length!==this.sps.length||n.some((f,d)=>f!==this.sps[d]);this.sps=n,c&&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 kre=`#version 300 es
|
|
414
|
-
in vec2 a_pos;
|
|
415
|
-
out vec2 v_uv;
|
|
416
|
-
void main() {
|
|
417
|
-
v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);
|
|
418
|
-
gl_Position = vec4(a_pos, 0.0, 1.0);
|
|
419
|
-
}`,$re=`#version 300 es
|
|
420
|
-
precision mediump float;
|
|
421
|
-
in vec2 v_uv;
|
|
422
|
-
uniform sampler2D u_tex;
|
|
423
|
-
out vec4 out_color;
|
|
424
|
-
void main() {
|
|
425
|
-
out_color = texture(u_tex, v_uv);
|
|
426
|
-
}`;function zre(e){const t=e.getContext("webgl2",{alpha:!1,antialias:!1,powerPreference:"high-performance",preserveDrawingBuffer:!0});if(!t)return null;const n=(m,h)=>{const g=t.createShader(m);return t.shaderSource(g,h),t.compileShader(g),g},r=t.createProgram(),a=n(t.VERTEX_SHADER,kre),o=n(t.FRAGMENT_SHADER,$re);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 c=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,c),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 Lre(e){const t=y.useRef(null),n=y.useCallback(()=>{const o=e.current;if(!o)return!1;const l=zre(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,c=t.current;if(!l||!c)return o.close(),null;const f=o.displayWidth,d=o.displayHeight;return(l.width!==f||l.height!==d)&&(l.width=f,l.height=d,c.gl.viewport(0,0,f,d)),c.gl.activeTexture(c.gl.TEXTURE0),c.gl.bindTexture(c.gl.TEXTURE_2D,c.tex),c.gl.texImage2D(c.gl.TEXTURE_2D,0,c.gl.RGBA,c.gl.RGBA,c.gl.UNSIGNED_BYTE,o),o.close(),c.gl.bindVertexArray(c.vao),c.gl.drawArrays(c.gl.TRIANGLES,0,6),c.gl.bindVertexArray(null),c.gl.bindTexture(c.gl.TEXTURE_2D,null),{width:f,height:d}},[e]);return{init:n,dispose:r,drawFrame:a}}const Fa=13,ls=8,FR=16,Ire=.02,Bre=720;function Ure({sessionId:e,buildId:t,send:n,connected:r,joined:a,deviceReady:o,installing:l,installed:c,installError:f,bootError:d,launching:m,setLaunching:h,androidButtons:g,binaryFrameHandlerRef:x,onRecordingUploaded:A,screenWidth:S,screenHeight:w,deviceRotation:O=0,perfHookRef:E}){const j=y.useRef(null),R=y.useRef(null),{init:T,dispose:C,drawFrame:N}=Lre(j),{fps:D,frameCount:z}=V4();y.useRef(0);const{recordState:V,recordCanvasRef:U,startClientRecording:P,stopClientRecording:B}=F4({sessionId:e,buildId:t,onRecordingUploaded:A}),[q,Y]=y.useState(!1),[$,G]=y.useState(!1),[F,K]=y.useState(!1),ne=y.useRef(null),[I,Z]=y.useState(null),[Q,fe]=y.useState(!1),[le,Se]=y.useState(!1),[ve,xe]=y.useState(null),ce=y.useRef(ve);y.useEffect(()=>{ce.current=ve},[ve]);const Ae=y.useRef(!1),Oe=y.useRef(!1),oe=y.useRef(null),qe=y.useRef(0),De=y.useRef(null),Je=y.useRef(null),Ye=y.useRef("idle"),at=y.useRef(null);y.useEffect(()=>{if(!T()){K(!0);return}const Ke=new Dre(me=>{const He=performance.now(),tt=N(me);if(performance.now()-He,!tt)return;z.current+=1,G(!0);const Be=ne.current;(!Be||Be.width!==tt.width||Be.height!==tt.height)&&(ne.current=tt,Z(tt))});return x.current=me=>{Ke.decode(me)},()=>{x.current=void 0,Ke.close(),C()}},[T,C,N,z,x,E]);const jt=y.useCallback(()=>{const Te=U.current,Ke=j.current;if(!Te||!Ke)return;const me=Te.getContext("2d");if(!me)return;me.drawImage(Ke,0,0,Te.width,Te.height);const He=window.devicePixelRatio||1,tt=Te.width/He,Be=Te.height/He;me.save(),me.scale(He,He);const hn=ce.current;if(hn)for(const _e of[hn.f0,hn.f1]){const de=_e.x*tt,ze=_e.y*Be;Ae.current?(me.beginPath(),me.arc(de,ze,ls,0,Math.PI*2),me.fillStyle="rgba(255,255,255,0.92)",me.fill(),me.strokeStyle="rgba(0,0,0,0.2)",me.lineWidth=1,me.stroke()):(me.beginPath(),me.arc(de,ze,Fa,0,Math.PI*2),me.strokeStyle="rgba(0,0,0,0.3)",me.lineWidth=3,me.stroke(),me.beginPath(),me.arc(de,ze,Fa,0,Math.PI*2),me.strokeStyle="rgba(255,255,255,0.65)",me.lineWidth=1.5,me.stroke())}const te=Je.current;if(te){const _e=Ye.current,de=at.current;if(_e==="down")me.beginPath(),me.arc(te.x,te.y,ls,0,Math.PI*2),me.fillStyle="rgba(255,255,255,0.92)",me.fill(),me.strokeStyle="rgba(0,0,0,0.2)",me.lineWidth=1,me.stroke();else if(_e==="release"&&de){const ze=Math.min((performance.now()-de.startTime)/350,1);me.beginPath(),me.arc(te.x,te.y,ls+26*ze,0,Math.PI*2),me.strokeStyle=`rgba(255,255,255,${(1-ze)*.55})`,me.lineWidth=1.5,me.stroke(),ze>=1&&(Ye.current="idle",at.current=null)}else me.beginPath(),me.arc(te.x,te.y,Fa,0,Math.PI*2),me.strokeStyle="rgba(0,0,0,0.3)",me.lineWidth=3,me.stroke(),me.beginPath(),me.arc(te.x,te.y,Fa,0,Math.PI*2),me.strokeStyle="rgba(255,255,255,0.65)",me.lineWidth=1.5,me.stroke()}me.restore()},[]),dt=y.useCallback(()=>{const Te=j.current;if(!Te)return;const Ke=document.createElement("canvas"),me=Ke.getContext("2d");me&&(Ke.width=Te.width,Ke.height=Te.height,me.drawImage(Te,0,0),Ke.toBlob(He=>{if(!He)return;const tt=URL.createObjectURL(He),Be=document.createElement("a");Be.href=tt,Be.download=`tapflow-${Date.now()}.png`,Be.click(),URL.revokeObjectURL(tt)},"image/png"))},[]),gn=y.useCallback(()=>{if(V==="idle"){const Te=U.current;if(!Te)return;const Ke=window.devicePixelRatio||1,me=R.current;if(me&&me.clientWidth>0)Te.width=me.clientWidth*Ke,Te.height=me.clientHeight*Ke;else{const He=j.current;if(He&&He.width>0)Te.width=He.width,Te.height=He.height;else return}P(jt)}else V==="recording"&&B()},[V,P,B,jt]),on=y.useCallback(()=>{n({type:"input:rotate",sessionId:e})},[n,e]);y.useEffect(()=>{const Te=new Set(["ShiftLeft","ShiftRight","ControlLeft","ControlRight","MetaLeft","MetaRight"]),Ke=Be=>{if(Be.code==="AltLeft"||Be.code==="AltRight"){Oe.current=!0;return}if(Be.metaKey){const te=document.activeElement;if(!te||te.tagName!=="INPUT"&&te.tagName!=="TEXTAREA"){if(!Be.shiftKey&&Be.code==="KeyK"){Be.preventDefault(),Y(!0);return}if(!Be.shiftKey&&Be.code==="KeyS"){Be.preventDefault(),dt();return}if(Be.shiftKey&&Be.code==="KeyY"){Be.preventDefault(),gn();return}if(Be.shiftKey&&Be.code==="KeyO"){Be.preventDefault(),on();return}}}if(!Q||Te.has(Be.code))return;Be.preventDefault();const hn=(Be.shiftKey?2:0)|(Be.ctrlKey?1:0)|(Be.metaKey?8:0);n({type:"input:key",sessionId:e,payload:{code:Be.code,modifiers:hn}})},me=()=>{Ae.current&&(Ae.current=!1,Se(!1),n({type:"input:pinch:end",sessionId:e})),Oe.current=!1,xe(null)},He=Be=>{(Be.code==="AltLeft"||Be.code==="AltRight")&&me()},tt=()=>{Oe.current&&me()};return window.addEventListener("keydown",Ke),window.addEventListener("keyup",He),window.addEventListener("blur",tt),()=>{window.removeEventListener("keydown",Ke),window.removeEventListener("keyup",He),window.removeEventListener("blur",tt)}},[Q,n,e,dt,gn,on]),y.useEffect(()=>{if(!Q)return;const Te=Ke=>{const me=R.current??j.current;me&&!me.contains(Ke.target)&&fe(!1)};return document.addEventListener("pointerdown",Te),()=>document.removeEventListener("pointerdown",Te)},[Q]);const Tt=y.useRef(!1),Ft=y.useCallback(Te=>{const Ke=j.current;if(!Ke)return null;const me=Ke.getBoundingClientRect();return Cre({x:Te.clientX,y:Te.clientY},me,Tt.current)},[]),H=y.useCallback(Te=>{const Ke=Ft(Te);return Ke?W4(Ke):null},[Ft]),ee=y.useCallback(Te=>{if(Oe.current){const tt=H(Te);if(!tt)return;Ae.current=!0,Se(!0),Te.target.setPointerCapture(Te.pointerId);const Be=De.current;Be&&(Be.style.display="none"),xe(tt),n({type:"input:pinch:start",sessionId:e,payload:tt});return}const Ke=Ft(Te);if(!Ke)return;fe(!0),oe.current=Ke,Te.target.setPointerCapture(Te.pointerId);const me=Te.currentTarget.getBoundingClientRect();Je.current={x:Te.clientX-me.left,y:Te.clientY-me.top},Ye.current="down",at.current=null;const He=De.current;He&&(He.style.display="block",He.style.left=`${Te.clientX-me.left}px`,He.style.top=`${Te.clientY-me.top}px`,He.style.width=`${ls*2}px`,He.style.height=`${ls*2}px`,He.style.background="rgba(255,255,255,0.92)",He.style.border="1.5px solid rgba(0,0,0,0.2)",He.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:Ke})},[Ft,H,n,e]),ae=y.useCallback(Te=>{if(Te.buttons===0){if(Oe.current){xe(H(Te)),Je.current=null;const ze=De.current;ze&&(ze.style.display="none");return}const te=Ft(Te),_e=Te.currentTarget.getBoundingClientRect(),de=De.current;te?(Je.current={x:Te.clientX-_e.left,y:Te.clientY-_e.top},Ye.current!=="down"&&(Ye.current="idle"),de&&(de.style.display="block",de.style.left=`${Te.clientX-_e.left}px`,de.style.top=`${Te.clientY-_e.top}px`,de.style.width=`${Fa*2}px`,de.style.height=`${Fa*2}px`,de.style.background="transparent",de.style.border="1.5px solid rgba(255,255,255,0.6)",de.style.boxShadow="0 0 0 1px rgba(0,0,0,0.3)")):(Je.current=null,de&&(de.style.display="none"));return}if(Ae.current){const te=H(Te);if(!te)return;const _e=performance.now();if(_e-qe.current<FR)return;qe.current=_e,xe(te),n({type:"input:pinch:move",sessionId:e,payload:te});return}if(!oe.current)return;const Ke=Ft(Te);if(!Ke)return;const me=Ke.x-oe.current.x,He=Ke.y-oe.current.y;if(Math.sqrt(me*me+He*He)<Ire)return;const tt=performance.now();if(tt-qe.current<FR)return;qe.current=tt;const Be=Te.currentTarget.getBoundingClientRect();Je.current={x:Te.clientX-Be.left,y:Te.clientY-Be.top};const hn=De.current;hn&&hn.style.display!=="none"&&(hn.style.left=`${Te.clientX-Be.left}px`,hn.style.top=`${Te.clientY-Be.top}px`),n({type:"input:touch:move",sessionId:e,payload:Ke})},[Ft,H,n,e]),Re=y.useCallback(()=>{if(Ae.current){Ae.current=!1,Se(!1),xe(null),n({type:"input:pinch:end",sessionId:e});return}oe.current=null,Ye.current="release",at.current={startTime:performance.now()};const Te=De.current;Te&&(Te.style.width=`${Fa*2}px`,Te.style.height=`${Fa*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]),Ce=y.useCallback(()=>{if(Ae.current){Ae.current=!1,Se(!1),xe(null),n({type:"input:pinch:end",sessionId:e});return}oe.current=null,Ye.current="release",at.current={startTime:performance.now()},n({type:"input:touch:end",sessionId:e})},[n,e]),je=y.useCallback(()=>{xe(null),Je.current=null;const Te=De.current;Te&&(Te.style.display="none")},[]),Ee=I??(S&&w?{width:S,height:w}:null),We=Ee?Math.min(1,Bre/Math.max(Ee.width,Ee.height)):.3,Ge=Ee?Math.round(Ee.width*We):324,Ot=Ee?Math.round(Ee.height*We):720,Ct=O===1||O===3,Rt=Ee?Ee.width>Ee.height:!1,Vt=Ct&&!Rt;y.useLayoutEffect(()=>{Tt.current=Vt},[Vt]);const Hr=Vt?Ot:Ge,Fr=Vt?Ge:Ot,Dn=Vt?{position:"absolute",width:Ge,height:Ot,top:(Ge-Ot)/2,left:(Ot-Ge)/2,transform:"rotate(90deg)",transformOrigin:"center center",visibility:$?"visible":"hidden",cursor:"none"}:{visibility:$?"visible":"hidden",cursor:"none"},Bn=v.jsx(v.Fragment,{children:g==null?void 0:g.map(Te=>v.jsxs(oa,{children:[v.jsx(sa,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>n({type:"input:button",sessionId:e,payload:{name:Te.name}}),children:Te.name==="back"?v.jsx(BF,{className:"h-4 w-4"}):Te.name==="recent_apps"?v.jsx(c5,{className:"h-4 w-4"}):Te.name==="volume_up"?v.jsx(mV,{className:"h-4 w-4"}):Te.name==="volume_down"?v.jsx(pV,{className:"h-4 w-4"}):Te.name==="power"?v.jsx(aV,{className:"h-4 w-4"}):v.jsx(l5,{className:"h-4 w-4"})})}),v.jsx(kr,{side:"left",children:Te.accessibilityTitle})]},Te.name))}),Zn=c&&t?v.jsxs(oa,{children:[v.jsx(sa,{asChild:!0,children:v.jsx(ct,{variant:"ghost",size:"icon",className:"h-8 w-8",disabled:m||l,onClick:()=>{h(!0),n({type:"app:launch",sessionId:e,buildId:t})},children:m?v.jsx(Dp,{className:"h-4 w-4 animate-spin"}):v.jsx(sA,{className:"h-4 w-4"})})}),v.jsx(kr,{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:U,style:{display:"none"}}),v.jsx(Y4,{open:q,onOpenChange:Y,sessionId:e,send:n}),v.jsx(G4,{joined:a,onDeepLink:()=>Y(!0),onScreenshot:dt,onRecordToggle:gn,recordState:V,onRotate:on,platformSlot:Bn,launchSlot:Zn}),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:R,className:"relative",style:{width:Hr,height:Fr,backgroundColor:"#010101",borderRadius:"22px",overflow:"hidden"},children:F?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:j,className:Vt?void 0:"block w-full h-full",style:Dn,onPointerDown:ee,onPointerMove:ae,onPointerUp:Re,onPointerCancel:Ce,onPointerLeave:je}),!$&&v.jsx("div",{className:"absolute inset-0 animate-pulse bg-zinc-700"}),!$&&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"}}),ve&&v.jsx(v.Fragment,{children:[ve.f0,ve.f1].map((Te,Ke)=>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:`${Te.x*100}%`,top:`${Te.y*100}%`,...le?{width:ls*2,height:ls*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:Fa*2,height:Fa*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))})]})})}),v.jsx(oO,{joined:a,fps:D,connected:r,deviceReady:o,bootError:d,installing:l,installError:f,keyboardActive:Q})]})]})}const K4=22,VR=[84,70,70,69],qre=1;function Hre(e){if(e.byteLength<K4)return null;const t=new DataView(e);for(let n=0;n<VR.length;n++)if(t.getUint8(n)!==VR[n])return null;return t.getUint8(4)!==qre?null:{capturedAt:Number(t.getBigUint64(6)),relayedAt:Number(t.getBigUint64(14))}}function Fre({sessionId:e,deviceId:t,buildId:n,resetMode:r,onRecordingUploaded:a}){const o=y.useRef(()=>{});Ore();const l=y.useRef(null),c=y.useRef(null),f=y.useRef([]);y.useRef({onFrameBegin:()=>{var le;return(le=l.current)==null?void 0:le.onFrameBegin()},onFrameEnd:le=>{var xe,ce;const Se=f.current.shift()??null,ve=Se?{...le,capturedAt:Se.capturedAt,relayedAt:Se.relayedAt}:le;(xe=l.current)==null||xe.onFrameEnd(ve),(ce=c.current)==null||ce.call(c,ve)}});const[d,m]=y.useState(!1),[h,g]=y.useState(!1),[x,A]=y.useState(null),[S,w]=y.useState(!1),[O,E]=y.useState(!1),[j,R]=y.useState(null),[T,C]=y.useState(null),[N,D]=y.useState(!1),[z,V]=y.useState(0),[U,P]=y.useState(!1),[B,q]=y.useState(!1),Y=y.useRef(void 0),$=y.useCallback(le=>{if(le.type==="session:joined"&&(m(!0),o.current({type:"device:boot",sessionId:e,payload:{deviceId:t,resetMode:r}})),le.type==="device:boot-error"&&C(le.message),le.type==="device:booting"&&(g(!1),w(!1),E(!1),R(null),C(null),A(null),V(0)),le.type==="device:rotate"&&V(le.payload.rotation),le.type==="device:ready"&&(g(!0),n&&(w(!0),o.current({type:"app:install",sessionId:e,buildId:n}))),le.type==="app:install-done"&&(w(!1),E(!0)),le.type==="app:install-error"&&(w(!1),R(le.message)),le.type==="app:launch-done"&&D(!1),le.type==="app:launch-error"&&D(!1),le.type==="session:chrome"&&A(le.payload),le.type==="keyboard:toggled"){const{visible:Se}=le.payload;P(Se),q(!1)}le.type==="open-url:done"&&_t.success("Deeplink opened"),le.type==="open-url:error"&&_t.error(le.message),le.type==="error"&&le.message==="Agent resources exhausted"&&_t.error("Could not start session — this Mac is currently overloaded.",{description:"Go back and select a different Mac."})},[e,t,n]),G=y.useCallback(le=>{var xe;const Se=Hre(le);f.current.push(Se);const ve=Se?le.slice(K4):le;(xe=Y.current)==null||xe.call(Y,ve)},[]),{send:F,connected:K}=iO($,G);y.useLayoutEffect(()=>{o.current=F}),y.useEffect(()=>{K&&F({type:"session:start",sessionId:e})},[K,F,e]);const ne=x!==null&&"framePng"in x?x:null,I=x!==null&&!("framePng"in x)?x:null,Q={sessionId:e,buildId:n,send:F,connected:K,joined:d,deviceReady:h,installing:S,installed:O,installError:j,bootError:T,launching:N,setLaunching:D,binaryFrameHandlerRef:Y,onRecordingUploaded:a,swKeyboardVisible:U,swKeyboardPending:B,onKbdToggle:()=>{q(!0),F({type:"input:keyboard:toggle",sessionId:e})}};if(!ne&&!I)return 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((le,Se)=>v.jsx("div",{className:"h-8 w-8 rounded-md bg-muted animate-pulse"},Se))}),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-700",style:{width:324,height:720,borderRadius:"22px"}})}),v.jsx(oO,{joined:d,fps:0,connected:K,deviceReady:h,bootError:T,installing:S,installError:j,keyboardActive:!1})]})]});const fe=void 0;return v.jsxs(v.Fragment,{children:[ne&&v.jsx(Pre,{...Q,chrome:ne,perfHookRef:fe}),I&&v.jsx(Ure,{...Q,androidButtons:I.buttons,screenWidth:I.screenWidth,screenHeight:I.screenHeight,deviceRotation:z,perfHookRef:fe}),!1]})}var Dv="Tabs",[Vre]=ha(Dv,[mv]),Z4=mv(),[Gre,sO]=Vre(Dv),X4=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:a,defaultValue:o,orientation:l="horizontal",dir:c,activationMode:f="automatic",...d}=e,m=hd(c),[h,g]=To({prop:r,onChange:a,defaultProp:o??"",caller:Dv});return v.jsx(Gre,{scope:n,baseId:Ra(),value:h,onValueChange:g,orientation:l,dir:m,activationMode:f,children:v.jsx(et.div,{dir:m,"data-orientation":l,...d,ref:t})})});X4.displayName=Dv;var Q4="TabsList",J4=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...a}=e,o=sO(Q4,n),l=Z4(n);return v.jsx(JL,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:r,children:v.jsx(et.div,{role:"tablist","aria-orientation":o.orientation,...a,ref:t})})});J4.displayName=Q4;var eB="TabsTrigger",tB=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:a=!1,...o}=e,l=sO(eB,n),c=Z4(n),f=aB(l.baseId,r),d=iB(l.baseId,r),m=r===l.value;return v.jsx(eI,{asChild:!0,...c,focusable:!a,active:m,children:v.jsx(et.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:ke(e.onMouseDown,h=>{!a&&h.button===0&&h.ctrlKey===!1?l.onValueChange(r):h.preventDefault()}),onKeyDown:ke(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&l.onValueChange(r)}),onFocus:ke(e.onFocus,()=>{const h=l.activationMode!=="manual";!m&&!a&&h&&l.onValueChange(r)})})})});tB.displayName=eB;var nB="TabsContent",rB=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:a,children:o,...l}=e,c=sO(nB,n),f=aB(c.baseId,r),d=iB(c.baseId,r),m=r===c.value,h=y.useRef(m);return y.useEffect(()=>{const g=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(g)},[]),v.jsx(cr,{present:a||m,children:({present:g})=>v.jsx(et.div,{"data-state":m?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":f,hidden:!g,id:d,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:g&&o})})});rB.displayName=nB;function aB(e,t){return`${e}-trigger-${t}`}function iB(e,t){return`${e}-content-${t}`}var Yre=X4,oB=J4,sB=tB,lB=rB;const cB=Yre,lO=y.forwardRef(({className:e,...t},n)=>v.jsx(oB,{ref:n,className:be("inline-flex h-9 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));lO.displayName=oB.displayName;const Qp=y.forwardRef(({className:e,...t},n)=>v.jsx(sB,{ref:n,className:be("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}));Qp.displayName=sB.displayName;const RS=y.forwardRef(({className:e,...t},n)=>v.jsx(lB,{ref:n,className:be("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));RS.displayName=lB.displayName;const uB=y.forwardRef(({className:e,...t},n)=>v.jsx("textarea",{className:be("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}));uB.displayName="Textarea";function Wre(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var cO="ScrollArea",[fB]=ha(cO),[Kre,ma]=fB(cO),dB=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:o=600,...l}=e,[c,f]=y.useState(null),[d,m]=y.useState(null),[h,g]=y.useState(null),[x,A]=y.useState(null),[S,w]=y.useState(null),[O,E]=y.useState(0),[j,R]=y.useState(0),[T,C]=y.useState(!1),[N,D]=y.useState(!1),z=ft(t,U=>f(U)),V=hd(a);return v.jsx(Kre,{scope:n,type:r,dir:V,scrollHideDelay:o,scrollArea:c,viewport:d,onViewportChange:m,content:h,onContentChange:g,scrollbarX:x,onScrollbarXChange:A,scrollbarXEnabled:T,onScrollbarXEnabledChange:C,scrollbarY:S,onScrollbarYChange:w,scrollbarYEnabled:N,onScrollbarYEnabledChange:D,onCornerWidthChange:E,onCornerHeightChange:R,children:v.jsx(et.div,{dir:V,...l,ref:z,style:{position:"relative","--radix-scroll-area-corner-width":O+"px","--radix-scroll-area-corner-height":j+"px",...e.style}})})});dB.displayName=cO;var hB="ScrollAreaViewport",pB=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...o}=e,l=ma(hB,n),c=y.useRef(null),f=ft(t,c,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(et.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})})]})});pB.displayName=hB;var ai="ScrollAreaScrollbar",uO=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=ma(ai,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:l}=a,c=e.orientation==="horizontal";return y.useEffect(()=>(c?o(!0):l(!0),()=>{c?o(!1):l(!1)}),[c,o,l]),a.type==="hover"?v.jsx(Zre,{...r,ref:t,forceMount:n}):a.type==="scroll"?v.jsx(Xre,{...r,ref:t,forceMount:n}):a.type==="auto"?v.jsx(mB,{...r,ref:t,forceMount:n}):a.type==="always"?v.jsx(fO,{...r,ref:t}):null});uO.displayName=ai;var Zre=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=ma(ai,e.__scopeScrollArea),[o,l]=y.useState(!1);return y.useEffect(()=>{const c=a.scrollArea;let f=0;if(c){const d=()=>{window.clearTimeout(f),l(!0)},m=()=>{f=window.setTimeout(()=>l(!1),a.scrollHideDelay)};return c.addEventListener("pointerenter",d),c.addEventListener("pointerleave",m),()=>{window.clearTimeout(f),c.removeEventListener("pointerenter",d),c.removeEventListener("pointerleave",m)}}},[a.scrollArea,a.scrollHideDelay]),v.jsx(cr,{present:n||o,children:v.jsx(mB,{"data-state":o?"visible":"hidden",...r,ref:t})})}),Xre=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=ma(ai,e.__scopeScrollArea),o=e.orientation==="horizontal",l=$v(()=>f("SCROLL_END"),100),[c,f]=Wre("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(c==="idle"){const d=window.setTimeout(()=>f("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(d)}},[c,a.scrollHideDelay,f]),y.useEffect(()=>{const d=a.viewport,m=o?"scrollLeft":"scrollTop";if(d){let h=d[m];const g=()=>{const x=d[m];h!==x&&(f("SCROLL"),l()),h=x};return d.addEventListener("scroll",g),()=>d.removeEventListener("scroll",g)}},[a.viewport,o,f,l]),v.jsx(cr,{present:n||c!=="hidden",children:v.jsx(fO,{"data-state":c==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ke(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:ke(e.onPointerLeave,()=>f("POINTER_LEAVE"))})})}),mB=y.forwardRef((e,t)=>{const n=ma(ai,e.__scopeScrollArea),{forceMount:r,...a}=e,[o,l]=y.useState(!1),c=e.orientation==="horizontal",f=$v(()=>{if(n.viewport){const d=n.viewport.offsetWidth<n.viewport.scrollWidth,m=n.viewport.offsetHeight<n.viewport.scrollHeight;l(c?d:m)}},10);return Jl(n.viewport,f),Jl(n.content,f),v.jsx(cr,{present:r||o,children:v.jsx(fO,{"data-state":o?"visible":"hidden",...a,ref:t})})}),fO=y.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,a=ma(ai,e.__scopeScrollArea),o=y.useRef(null),l=y.useRef(0),[c,f]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=xB(c.viewport,c.content),m={...r,sizes:c,onSizesChange:f,hasThumb:d>0&&d<1,onThumbChange:g=>o.current=g,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:g=>l.current=g};function h(g,x){return rae(g,l.current,c,x)}return n==="horizontal"?v.jsx(Qre,{...m,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const g=a.viewport.scrollLeft,x=GR(g,c,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=h(g,a.dir))}}):n==="vertical"?v.jsx(Jre,{...m,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const g=a.viewport.scrollTop,x=GR(g,c);o.current.style.transform=`translate3d(0, ${x}px, 0)`}},onWheelScroll:g=>{a.viewport&&(a.viewport.scrollTop=g)},onDragScroll:g=>{a.viewport&&(a.viewport.scrollTop=h(g))}}):null}),Qre=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=ma(ai,e.__scopeScrollArea),[l,c]=y.useState(),f=y.useRef(null),d=ft(t,f,o.onScrollbarXChange);return y.useEffect(()=>{f.current&&c(getComputedStyle(f.current))},[f]),v.jsx(gB,{"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":kv(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.x),onDragScroll:m=>e.onDragScroll(m.x),onWheelScroll:(m,h)=>{if(o.viewport){const g=o.viewport.scrollLeft+m.deltaX;e.onWheelScroll(g),SB(g,h)&&m.preventDefault()}},onResize:()=>{f.current&&o.viewport&&l&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:em(l.paddingLeft),paddingEnd:em(l.paddingRight)}})}})}),Jre=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=ma(ai,e.__scopeScrollArea),[l,c]=y.useState(),f=y.useRef(null),d=ft(t,f,o.onScrollbarYChange);return y.useEffect(()=>{f.current&&c(getComputedStyle(f.current))},[f]),v.jsx(gB,{"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":kv(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.y),onDragScroll:m=>e.onDragScroll(m.y),onWheelScroll:(m,h)=>{if(o.viewport){const g=o.viewport.scrollTop+m.deltaY;e.onWheelScroll(g),SB(g,h)&&m.preventDefault()}},onResize:()=>{f.current&&o.viewport&&l&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:em(l.paddingTop),paddingEnd:em(l.paddingBottom)}})}})}),[eae,vB]=fB(ai),gB=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:o,onThumbPointerUp:l,onThumbPointerDown:c,onThumbPositionChange:f,onDragScroll:d,onWheelScroll:m,onResize:h,...g}=e,x=ma(ai,n),[A,S]=y.useState(null),w=ft(t,z=>S(z)),O=y.useRef(null),E=y.useRef(""),j=x.viewport,R=r.content-r.viewport,T=Gn(m),C=Gn(f),N=$v(h,10);function D(z){if(O.current){const V=z.clientX-O.current.left,U=z.clientY-O.current.top;d({x:V,y:U})}}return y.useEffect(()=>{const z=V=>{const U=V.target;(A==null?void 0:A.contains(U))&&T(V,R)};return document.addEventListener("wheel",z,{passive:!1}),()=>document.removeEventListener("wheel",z,{passive:!1})},[j,A,R,T]),y.useEffect(C,[r,C]),Jl(A,N),Jl(x.content,N),v.jsx(eae,{scope:n,scrollbar:A,hasThumb:a,onThumbChange:Gn(o),onThumbPointerUp:Gn(l),onThumbPositionChange:C,onThumbPointerDown:Gn(c),children:v.jsx(et.div,{...g,ref:w,style:{position:"absolute",...g.style},onPointerDown:ke(e.onPointerDown,z=>{z.button===0&&(z.target.setPointerCapture(z.pointerId),O.current=A.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",x.viewport&&(x.viewport.style.scrollBehavior="auto"),D(z))}),onPointerMove:ke(e.onPointerMove,D),onPointerUp:ke(e.onPointerUp,z=>{const V=z.target;V.hasPointerCapture(z.pointerId)&&V.releasePointerCapture(z.pointerId),document.body.style.webkitUserSelect=E.current,x.viewport&&(x.viewport.style.scrollBehavior=""),O.current=null})})})}),Jp="ScrollAreaThumb",yB=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=vB(Jp,e.__scopeScrollArea);return v.jsx(cr,{present:n||a.hasThumb,children:v.jsx(tae,{ref:t,...r})})}),tae=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,o=ma(Jp,n),l=vB(Jp,n),{onThumbPositionChange:c}=l,f=ft(t,h=>l.onThumbChange(h)),d=y.useRef(void 0),m=$v(()=>{d.current&&(d.current(),d.current=void 0)},100);return y.useEffect(()=>{const h=o.viewport;if(h){const g=()=>{if(m(),!d.current){const x=aae(h,c);d.current=x,c()}};return c(),h.addEventListener("scroll",g),()=>h.removeEventListener("scroll",g)}},[o.viewport,m,c]),v.jsx(et.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:ke(e.onPointerDownCapture,h=>{const x=h.target.getBoundingClientRect(),A=h.clientX-x.left,S=h.clientY-x.top;l.onThumbPointerDown({x:A,y:S})}),onPointerUp:ke(e.onPointerUp,l.onThumbPointerUp)})});yB.displayName=Jp;var dO="ScrollAreaCorner",bB=y.forwardRef((e,t)=>{const n=ma(dO,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?v.jsx(nae,{...e,ref:t}):null});bB.displayName=dO;var nae=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=ma(dO,n),[o,l]=y.useState(0),[c,f]=y.useState(0),d=!!(o&&c);return Jl(a.scrollbarX,()=>{var h;const m=((h=a.scrollbarX)==null?void 0:h.offsetHeight)||0;a.onCornerHeightChange(m),f(m)}),Jl(a.scrollbarY,()=>{var h;const m=((h=a.scrollbarY)==null?void 0:h.offsetWidth)||0;a.onCornerWidthChange(m),l(m)}),d?v.jsx(et.div,{...r,ref:t,style:{width:o,height:c,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function em(e){return e?parseInt(e,10):0}function xB(e,t){const n=e/t;return isNaN(n)?0:n}function kv(e){const t=xB(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function rae(e,t,n,r="ltr"){const a=kv(n),o=a/2,l=t||o,c=a-l,f=n.scrollbar.paddingStart+l,d=n.scrollbar.size-n.scrollbar.paddingEnd-c,m=n.content-n.viewport,h=r==="ltr"?[0,m]:[m*-1,0];return wB([f,d],h)(e)}function GR(e,t,n="ltr"){const r=kv(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-a,l=t.content-t.viewport,c=o-r,f=n==="ltr"?[0,l]:[l*-1,0],d=_S(e,f);return wB([0,l],[0,c])(d)}function wB(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 SB(e,t){return e>0&&e<t}var aae=(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,c=n.top!==o.top;(l||c)&&t(),n=o,r=window.requestAnimationFrame(a)})(),()=>window.cancelAnimationFrame(r)};function $v(e,t){const n=Gn(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 Jl(e,t){const n=Gn(t);Wn(()=>{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 _B=dB,iae=pB,oae=bB;const AB=y.forwardRef(({className:e,children:t,...n},r)=>v.jsxs(_B,{ref:r,className:be("relative overflow-hidden",e),...n,children:[v.jsx(iae,{className:"h-full w-full rounded-[inherit]",children:t}),v.jsx(OB,{}),v.jsx(oae,{})]}));AB.displayName=_B.displayName;const OB=y.forwardRef(({className:e,orientation:t="vertical",...n},r)=>v.jsx(uO,{ref:r,orientation:t,className:be("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(yB,{className:"relative flex-1 rounded-full bg-border"})}));OB.displayName=uO.displayName;function EB(e){return/[Zz]|[+-]\d{2}/.test(e)?new Date(e):new Date(e.replace(" ","T")+"Z")}function sae(e){const t=new Map;for(const a of e){const o=EB(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 c=new Date(a);l=c.toLocaleDateString(void 0,{month:"short",day:"numeric",...c.getFullYear()!==new Date().getFullYear()?{year:"numeric"}:{}})}return{label:l,items:o}})}function lae(e){return EB(e).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}const cae=5*1024*1024,uae=["image/png","image/jpeg","image/webp"];function fae({buildId:e}){const[t,n]=y.useState([]),[r,a]=y.useState(""),[o,l]=y.useState(null),[c,f]=y.useState(!1),[d,m]=y.useState(""),h=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 j=Number(E.replace("#comment-","")),R=g.current[j];if(!R)return;R.scrollIntoView({behavior:"smooth"});const T=document.documentElement.classList.contains("dark");R.style.backgroundColor=T?"rgb(0 112 243 / 0.18)":"#d3e5ff",setTimeout(()=>{R.style.backgroundColor=""},2e3)},[t]);function A(E){const j=`${location.origin}${location.pathname}${location.search}#comment-${E}`;navigator.clipboard.writeText(j).catch(()=>{})}function S(E){if(m(""),!uae.includes(E.type)){m("Only png, jpg, webp allowed");return}if(E.size>cae){m("Max 5MB");return}l(E)}async function w(E){if(E.preventDefault(),!r.trim()&&!o)return;f(!0);const j=new FormData;j.append("build_id",String(e)),j.append("body",r),o&&j.append("attachment",o),(await fetch("/api/v1/comments",{method:"POST",credentials:"include",body:j})).ok&&(a(""),l(null),x()),f(!1)}const O=sae(t);return v.jsxs("div",{className:"flex h-full flex-col gap-3",children:[v.jsx(AB,{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:j})=>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:j.map(R=>v.jsxs("div",{id:`comment-${R.id}`,ref:T=>{g.current[R.id]=T},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(XI,{name:R.author,avatarUrl:R.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:R.author}),v.jsx("span",{className:"text-[11px] text-muted-foreground leading-none",children:lae(R.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(R.id),children:v.jsx(u5,{className:"h-3 w-3"})})]}),v.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap mt-1",children:R.body}),R.attachments.map(T=>v.jsx("a",{href:T.file_path,target:"_blank",rel:"noreferrer",className:"mt-1.5 block",children:v.jsx("img",{src:T.file_path,alt:"attachment",className:"max-h-48 rounded border object-contain"})},T.id))]})]},R.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(uB,{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=h.current)==null?void 0:E.click()},children:v.jsx(WF,{className:"h-4 w-4"})}),v.jsx("input",{ref:h,type:"file",accept:"image/png,image/jpeg,image/webp",className:"hidden",onChange:E=>{var R;const j=(R=E.target.files)==null?void 0:R[0];j&&S(j)}}),v.jsx("div",{className:"flex-1"}),v.jsx(ct,{type:"submit",size:"icon",className:"h-7 w-7 rounded-full",disabled:c||!r.trim()&&!o,children:v.jsx(UF,{className:"h-3.5 w-3.5"})})]})]})})})]})}function dae(e){return e<1024*1024?`${(e/1024).toFixed(0)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function hae(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function pae(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 mae({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 c=pae(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:hae(l.createdAt)}),v.jsxs("span",{className:`text-xs ${c.urgent?"text-destructive":"text-muted-foreground"}`,children:[c.label," · ",dae(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(GF,{className:"h-3.5 w-3.5"})})]},l.id)})})}function vae({buildId:e,recordingsRefreshKey:t=0}){return v.jsxs(cB,{defaultValue:"comments",className:"flex h-full flex-col",children:[v.jsxs(lO,{className:"w-full shrink-0",children:[v.jsxs(Qp,{value:"comments",className:"flex-1 gap-1.5",children:[v.jsx(eV,{className:"h-3.5 w-3.5"}),"Comments"]}),v.jsxs(Qp,{value:"recordings",className:"flex-1 gap-1.5",children:[v.jsx(YF,{className:"h-3.5 w-3.5"}),"Recordings"]})]}),v.jsx(RS,{value:"comments",className:"mt-3 min-h-0 flex-1 overflow-hidden",children:v.jsx(fae,{buildId:e})}),v.jsx(RS,{value:"recordings",className:"mt-3 min-h-0 flex-1 overflow-y-auto",children:v.jsx(mae,{buildId:e,refreshKey:t})})]})}const jB=y.forwardRef(({...e},t)=>v.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));jB.displayName="Breadcrumb";const TB=y.forwardRef(({className:e,...t},n)=>v.jsx("ol",{ref:n,className:be("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));TB.displayName="BreadcrumbList";const Ju=y.forwardRef(({className:e,...t},n)=>v.jsx("li",{ref:n,className:be("inline-flex items-center gap-1.5",e),...t}));Ju.displayName="BreadcrumbItem";const Tp=y.forwardRef(({asChild:e,className:t,...n},r)=>{const a=e?ks:"a";return v.jsx(a,{ref:r,className:be("transition-colors hover:text-foreground cursor-pointer",t),...n})});Tp.displayName="BreadcrumbLink";const Cp=y.forwardRef(({className:e,...t},n)=>v.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:be("font-medium text-foreground",e),...t}));Cp.displayName="BreadcrumbPage";const Rp=({children:e,className:t,...n})=>v.jsx("li",{role:"presentation","aria-hidden":"true",className:be("[&>svg]:h-3.5 [&>svg]:w-3.5",t),...n,children:e??v.jsx(oA,{})});Rp.displayName="BreadcrumbSeparator";var zv="Switch",[gae]=ha(zv),[yae,bae]=gae(zv),CB=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:a,defaultChecked:o,required:l,disabled:c,value:f="on",onCheckedChange:d,form:m,...h}=e,[g,x]=y.useState(null),A=ft(t,j=>x(j)),S=y.useRef(!1),w=g?m||!!g.closest("form"):!0,[O,E]=To({prop:a,defaultProp:o??!1,onChange:d,caller:zv});return v.jsxs(yae,{scope:n,checked:O,disabled:c,children:[v.jsx(et.button,{type:"button",role:"switch","aria-checked":O,"aria-required":l,"data-state":PB(O),"data-disabled":c?"":void 0,disabled:c,value:f,...h,ref:A,onClick:ke(e.onClick,j=>{E(R=>!R),w&&(S.current=j.isPropagationStopped(),S.current||j.stopPropagation())})}),w&&v.jsx(MB,{control:g,bubbles:!S.current,name:r,value:f,checked:O,required:l,disabled:c,form:m,style:{transform:"translateX(-100%)"}})]})});CB.displayName=zv;var RB="SwitchThumb",NB=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,a=bae(RB,n);return v.jsx(et.span,{"data-state":PB(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})});NB.displayName=RB;var xae="SwitchBubbleInput",MB=y.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...a},o)=>{const l=y.useRef(null),c=ft(l,o),f=L3(n),d=bL(t);return y.useEffect(()=>{const m=l.current;if(!m)return;const h=window.HTMLInputElement.prototype,x=Object.getOwnPropertyDescriptor(h,"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:c,style:{...a.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});MB.displayName=xae;function PB(e){return e?"checked":"unchecked"}var DB=CB,wae=NB;const kB=y.forwardRef(({className:e,...t},n)=>v.jsx(DB,{className:be("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(wae,{className:be("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")})}));kB.displayName=DB.displayName;const YR=70,WR=80;function Sae(e,t){if(!e||t)return"unknown";const n=e.memUsedMB/e.memTotalMB*100;return e.cpuPercent>WR||n>WR?"overloaded":e.cpuPercent>=YR||n>=YR?"warning":"healthy"}function _ae(){const[e]=nd(),t=ka(),n=e.get("id"),{build:r}=bre(n),[a,o]=y.useState(0),l=(r==null?void 0:r.platform)??"ios",{sessions:c,selectedAgent:f,setSelectedAgent:d,activeSessionId:m,deviceId:h,booting:g,status:x,connected:A,agentGroups:S,startDevice:w,resetDevice:O,handleBack:E,handleBackToMacs:j}=_re(l),R=S.find(F=>F.agentName===f),{osVersions:T,osVersion:C,setOsVersion:N,deviceSearch:D,setDeviceSearch:z,versionedDevices:V,resetMode:U,setResetMode:P}=Are(R,l),q=c.flatMap(F=>F.devices).find(F=>F.id===h),Y=q?`${q.name}${q.osVersion?` · ${q.osVersion}`:""}`:"",$=y.useCallback(()=>o(F=>F+1),[]),{setNode:G}=BA();return y.useEffect(()=>{if(r)return G(v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx(jB,{children:v.jsxs(TB,{children:[v.jsx(Ju,{children:v.jsx(Tp,{asChild:!0,children:v.jsx("button",{onClick:()=>t(`/app-center?appId=${r.app_id}`),children:r.name})})}),v.jsx(Rp,{}),v.jsx(Ju,{children:f?v.jsx(Tp,{asChild:!0,children:v.jsx("button",{onClick:j,children:qR(r)})}):v.jsx(Cp,{children:qR(r)})}),f&&v.jsxs(v.Fragment,{children:[v.jsx(Rp,{}),v.jsx(Ju,{children:m?v.jsx(Tp,{asChild:!0,children:v.jsx("button",{onClick:E,children:f})}):v.jsx(Cp,{children:f})})]}),m&&v.jsxs(v.Fragment,{children:[v.jsx(Rp,{}),v.jsx(Ju,{children:v.jsx(Cp,{children:Y})})]})]})}),!f&&r.status_label&&v.jsx(Ql,{tone:H4[r.status_label],children:r.status_label})]})),()=>G(null)},[r,f,m,Y,t,E,j,G]),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:m?v.jsx("div",{className:"min-h-full flex items-center justify-center py-6 px-8 min-w-max",children:v.jsx(Fre,{sessionId:m,deviceId:h,buildId:r==null?void 0:r.id,resetMode:U,onRecordingUploaded:$})}):f?v.jsxs("div",{className:"flex flex-col gap-5",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("button",{onClick:j,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(z3,{placeholder:"Search device…",value:D,onChange:z}),T.length>0&&v.jsxs(Ts,{value:C||"__all__",onValueChange:F=>{N(F==="__all__"?"":F),O()},children:[v.jsx(No,{className:"h-8 w-36 shrink-0",children:v.jsx(Cs,{})}),v.jsxs(Mo,{children:[v.jsx(zt,{value:"__all__",children:"Any version"}),T.map(F=>v.jsx(zt,{value:F,children:F},F))]})]}),v.jsx(Bp,{children:v.jsxs(oa,{children:[v.jsxs("div",{className:"ml-auto flex items-center gap-2 shrink-0",children:[v.jsx(sa,{asChild:!0,children:v.jsxs(Pt,{htmlFor:"reset-mode",className:"flex items-center gap-1 text-sm cursor-pointer whitespace-nowrap",children:[v.jsx(KF,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Full reset"]})}),v.jsx(kB,{id:"reset-mode",checked:U==="full-erase",onCheckedChange:F=>P(F?"full-erase":"app-only")})]}),v.jsx(kr,{children:U==="full-erase"?"Erase all data before booting":"Keep existing data"})]})})]}),V.length===0?v.jsx("p",{className:"text-sm text-muted-foreground",children:A?"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:V.map(F=>{const K=F.status==="booted",ne=F.busy,I=ne?"In use":K?"Booted":"Available",Z=ne?"bg-amber-400":K?"bg-emerald-400":"bg-muted-foreground/40";return v.jsxs("button",{disabled:ne||g||!A,onClick:()=>w(F),className:be("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:F.name}),F.osVersion&&v.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:F.osVersion}),v.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[v.jsx("span",{className:be("inline-block h-1.5 w-1.5 rounded-full",Z)}),I]})]},F.id)})}),x&&v.jsx("p",{className:"text-sm text-muted-foreground",children:x})]}):v.jsxs("div",{className:"flex flex-col gap-5",children:[v.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Select Mac"}),S.length===0?v.jsx("p",{className:"text-sm text-muted-foreground",children:A?`No agents available for ${l}.`:"Connecting to relay…"}):v.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 gap-2",children:S.map(F=>{const K=F.resources,ne=K?Date.now()-K.reportedAt>3e4:!1,I=F.devices.filter(Se=>Se.platform===l).length,Z=(K==null?void 0:K.cpuPercent)??0,Q=K?K.memUsedMB/K.memTotalMB*100:0,fe=Sae(K,ne),le=fe==="overloaded";return v.jsx(Bp,{children:v.jsxs(oa,{children:[v.jsx(sa,{asChild:!0,children:v.jsx("span",{tabIndex:le?0:void 0,className:le?"cursor-not-allowed":void 0,children:v.jsxs("button",{disabled:le,"aria-disabled":le,onClick:()=>d(F.agentName??null),className:be("flex flex-col gap-3 rounded-lg border p-3 text-left transition-colors min-h-[100px] w-full",le?"pointer-events-none":"hover:bg-accent"),children:[v.jsxs("div",{className:"flex items-start justify-between gap-2",children:[v.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[v.jsx(Aae,{health:fe}),v.jsx("span",{className:"text-sm font-medium leading-tight truncate",children:F.agentName??"Unknown"})]}),ne&&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:[I," device",I!==1?"s":""]}),K&&v.jsxs(v.Fragment,{children:[v.jsx("span",{children:"·"}),v.jsxs("span",{children:[K.slotsAvailable,"/",K.slotsTotal," slots"]})]})]}),K&&!ne&&v.jsxs("div",{className:"flex flex-col gap-1.5 w-full",children:[v.jsx(KR,{label:"CPU",percent:Z,colorClass:"bg-blue-400"}),v.jsx(KR,{label:"RAM",percent:Q,colorClass:"bg-violet-400"})]})]})})}),le&&v.jsx(kr,{children:"This Mac is currently overloaded. Try again later."})]})},F.agentName)})})]})})}),n&&v.jsxs(v.Fragment,{children:[v.jsx(Ja,{orientation:"vertical",className:"h-auto"}),v.jsx("div",{className:"w-80 shrink-0 h-full",children:v.jsx(vae,{buildId:Number(n),recordingsRefreshKey:a})})]})]})}function Aae({health:e}){const t={unknown:"bg-muted-foreground/40",healthy:"bg-emerald-400",warning:"bg-amber-400",overloaded:"bg-red-500"}[e];return v.jsx("span",{"data-testid":"resource-health-dot",className:be("inline-block h-2 w-2 shrink-0 rounded-full",t)})}function KR({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:be("h-full rounded-full transition-all",n),style:{width:`${Math.min(100,t)}%`}})})]})}var Zb,ZR;function xr(){if(ZR)return Zb;ZR=1;var e=Array.isArray;return Zb=e,Zb}var Xb,XR;function $B(){if(XR)return Xb;XR=1;var e=typeof Gh=="object"&&Gh&&Gh.Object===Object&&Gh;return Xb=e,Xb}var Qb,QR;function ii(){if(QR)return Qb;QR=1;var e=$B(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Qb=n,Qb}var Jb,JR;function Ed(){if(JR)return Jb;JR=1;var e=ii(),t=e.Symbol;return Jb=t,Jb}var e0,eN;function Oae(){if(eN)return e0;eN=1;var e=Ed(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,a=e?e.toStringTag:void 0;function o(l){var c=n.call(l,a),f=l[a];try{l[a]=void 0;var d=!0}catch{}var m=r.call(l);return d&&(c?l[a]=f:delete l[a]),m}return e0=o,e0}var t0,tN;function Eae(){if(tN)return t0;tN=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return t0=n,t0}var n0,nN;function Hi(){if(nN)return n0;nN=1;var e=Ed(),t=Oae(),n=Eae(),r="[object Null]",a="[object Undefined]",o=e?e.toStringTag:void 0;function l(c){return c==null?c===void 0?a:r:o&&o in Object(c)?t(c):n(c)}return n0=l,n0}var r0,rN;function Fi(){if(rN)return r0;rN=1;function e(t){return t!=null&&typeof t=="object"}return r0=e,r0}var a0,aN;function kc(){if(aN)return a0;aN=1;var e=Hi(),t=Fi(),n="[object Symbol]";function r(a){return typeof a=="symbol"||t(a)&&e(a)==n}return a0=r,a0}var i0,iN;function hO(){if(iN)return i0;iN=1;var e=xr(),t=kc(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function a(o,l){if(e(o))return!1;var c=typeof o;return c=="number"||c=="symbol"||c=="boolean"||o==null||t(o)?!0:r.test(o)||!n.test(o)||l!=null&&o in Object(l)}return i0=a,i0}var o0,oN;function zo(){if(oN)return o0;oN=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return o0=e,o0}var s0,sN;function pO(){if(sN)return s0;sN=1;var e=Hi(),t=zo(),n="[object AsyncFunction]",r="[object Function]",a="[object GeneratorFunction]",o="[object Proxy]";function l(c){if(!t(c))return!1;var f=e(c);return f==r||f==a||f==n||f==o}return s0=l,s0}var l0,lN;function jae(){if(lN)return l0;lN=1;var e=ii(),t=e["__core-js_shared__"];return l0=t,l0}var c0,cN;function Tae(){if(cN)return c0;cN=1;var e=jae(),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 c0=n,c0}var u0,uN;function zB(){if(uN)return u0;uN=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 u0=n,u0}var f0,fN;function Cae(){if(fN)return f0;fN=1;var e=pO(),t=Tae(),n=zo(),r=zB(),a=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,f=l.toString,d=c.hasOwnProperty,m=RegExp("^"+f.call(d).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(g){if(!n(g)||t(g))return!1;var x=e(g)?m:o;return x.test(r(g))}return f0=h,f0}var d0,dN;function Rae(){if(dN)return d0;dN=1;function e(t,n){return t==null?void 0:t[n]}return d0=e,d0}var h0,hN;function Is(){if(hN)return h0;hN=1;var e=Cae(),t=Rae();function n(r,a){var o=t(r,a);return e(o)?o:void 0}return h0=n,h0}var p0,pN;function Lv(){if(pN)return p0;pN=1;var e=Is(),t=e(Object,"create");return p0=t,p0}var m0,mN;function Nae(){if(mN)return m0;mN=1;var e=Lv();function t(){this.__data__=e?e(null):{},this.size=0}return m0=t,m0}var v0,vN;function Mae(){if(vN)return v0;vN=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return v0=e,v0}var g0,gN;function Pae(){if(gN)return g0;gN=1;var e=Lv(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function a(o){var l=this.__data__;if(e){var c=l[o];return c===t?void 0:c}return r.call(l,o)?l[o]:void 0}return g0=a,g0}var y0,yN;function Dae(){if(yN)return y0;yN=1;var e=Lv(),t=Object.prototype,n=t.hasOwnProperty;function r(a){var o=this.__data__;return e?o[a]!==void 0:n.call(o,a)}return y0=r,y0}var b0,bN;function kae(){if(bN)return b0;bN=1;var e=Lv(),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 b0=n,b0}var x0,xN;function $ae(){if(xN)return x0;xN=1;var e=Nae(),t=Mae(),n=Pae(),r=Dae(),a=kae();function o(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c<f;){var d=l[c];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,x0=o,x0}var w0,wN;function zae(){if(wN)return w0;wN=1;function e(){this.__data__=[],this.size=0}return w0=e,w0}var S0,SN;function mO(){if(SN)return S0;SN=1;function e(t,n){return t===n||t!==t&&n!==n}return S0=e,S0}var _0,_N;function Iv(){if(_N)return _0;_N=1;var e=mO();function t(n,r){for(var a=n.length;a--;)if(e(n[a][0],r))return a;return-1}return _0=t,_0}var A0,AN;function Lae(){if(AN)return A0;AN=1;var e=Iv(),t=Array.prototype,n=t.splice;function r(a){var o=this.__data__,l=e(o,a);if(l<0)return!1;var c=o.length-1;return l==c?o.pop():n.call(o,l,1),--this.size,!0}return A0=r,A0}var O0,ON;function Iae(){if(ON)return O0;ON=1;var e=Iv();function t(n){var r=this.__data__,a=e(r,n);return a<0?void 0:r[a][1]}return O0=t,O0}var E0,EN;function Bae(){if(EN)return E0;EN=1;var e=Iv();function t(n){return e(this.__data__,n)>-1}return E0=t,E0}var j0,jN;function Uae(){if(jN)return j0;jN=1;var e=Iv();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 j0=t,j0}var T0,TN;function Bv(){if(TN)return T0;TN=1;var e=zae(),t=Lae(),n=Iae(),r=Bae(),a=Uae();function o(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c<f;){var d=l[c];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,T0=o,T0}var C0,CN;function vO(){if(CN)return C0;CN=1;var e=Is(),t=ii(),n=e(t,"Map");return C0=n,C0}var R0,RN;function qae(){if(RN)return R0;RN=1;var e=$ae(),t=Bv(),n=vO();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return R0=r,R0}var N0,NN;function Hae(){if(NN)return N0;NN=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return N0=e,N0}var M0,MN;function Uv(){if(MN)return M0;MN=1;var e=Hae();function t(n,r){var a=n.__data__;return e(r)?a[typeof r=="string"?"string":"hash"]:a.map}return M0=t,M0}var P0,PN;function Fae(){if(PN)return P0;PN=1;var e=Uv();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return P0=t,P0}var D0,DN;function Vae(){if(DN)return D0;DN=1;var e=Uv();function t(n){return e(this,n).get(n)}return D0=t,D0}var k0,kN;function Gae(){if(kN)return k0;kN=1;var e=Uv();function t(n){return e(this,n).has(n)}return k0=t,k0}var $0,$N;function Yae(){if($N)return $0;$N=1;var e=Uv();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 $0=t,$0}var z0,zN;function gO(){if(zN)return z0;zN=1;var e=qae(),t=Fae(),n=Vae(),r=Gae(),a=Yae();function o(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c<f;){var d=l[c];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,z0=o,z0}var L0,LN;function LB(){if(LN)return L0;LN=1;var e=gO(),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,c=a?a.apply(this,l):l[0],f=o.cache;if(f.has(c))return f.get(c);var d=r.apply(this,l);return o.cache=f.set(c,d)||f,d};return o.cache=new(n.Cache||e),o}return n.Cache=e,L0=n,L0}var I0,IN;function Wae(){if(IN)return I0;IN=1;var e=LB(),t=500;function n(r){var a=e(r,function(l){return o.size===t&&o.clear(),l}),o=a.cache;return a}return I0=n,I0}var B0,BN;function Kae(){if(BN)return B0;BN=1;var e=Wae(),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,c,f,d){o.push(f?d.replace(n,"$1"):c||l)}),o});return B0=r,B0}var U0,UN;function yO(){if(UN)return U0;UN=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 U0=e,U0}var q0,qN;function Zae(){if(qN)return q0;qN=1;var e=Ed(),t=yO(),n=xr(),r=kc(),a=e?e.prototype:void 0,o=a?a.toString:void 0;function l(c){if(typeof c=="string")return c;if(n(c))return t(c,l)+"";if(r(c))return o?o.call(c):"";var f=c+"";return f=="0"&&1/c==-1/0?"-0":f}return q0=l,q0}var H0,HN;function IB(){if(HN)return H0;HN=1;var e=Zae();function t(n){return n==null?"":e(n)}return H0=t,H0}var F0,FN;function BB(){if(FN)return F0;FN=1;var e=xr(),t=hO(),n=Kae(),r=IB();function a(o,l){return e(o)?o:t(o,l)?[o]:n(r(o))}return F0=a,F0}var V0,VN;function qv(){if(VN)return V0;VN=1;var e=kc();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return V0=t,V0}var G0,GN;function bO(){if(GN)return G0;GN=1;var e=BB(),t=qv();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 G0=n,G0}var Y0,YN;function UB(){if(YN)return Y0;YN=1;var e=bO();function t(n,r,a){var o=n==null?void 0:e(n,r);return o===void 0?a:o}return Y0=t,Y0}var Xae=UB();const ua=Ht(Xae);var W0,WN;function Qae(){if(WN)return W0;WN=1;function e(t){return t==null}return W0=e,W0}var Jae=Qae();const yt=Ht(Jae);var K0,KN;function eie(){if(KN)return K0;KN=1;var e=Hi(),t=xr(),n=Fi(),r="[object String]";function a(o){return typeof o=="string"||!t(o)&&n(o)&&e(o)==r}return K0=a,K0}var tie=eie();const Rs=Ht(tie);var nie=pO();const lt=Ht(nie);var rie=zo();const $c=Ht(rie);var Z0={exports:{}},Nt={};/**
|
|
427
|
-
* @license React
|
|
428
|
-
* react-is.production.min.js
|
|
429
|
-
*
|
|
430
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
431
|
-
*
|
|
432
|
-
* This source code is licensed under the MIT license found in the
|
|
433
|
-
* LICENSE file in the root directory of this source tree.
|
|
434
|
-
*/var ZN;function aie(){if(ZN)return Nt;ZN=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"),c=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),h=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 c:case l:case f:case g:case h:case o:return w;default:return O}}case t:return O}}}return Nt.ContextConsumer=l,Nt.ContextProvider=o,Nt.Element=e,Nt.ForwardRef=f,Nt.Fragment=n,Nt.Lazy=g,Nt.Memo=h,Nt.Portal=t,Nt.Profiler=a,Nt.StrictMode=r,Nt.Suspense=d,Nt.SuspenseList=m,Nt.isAsyncMode=function(){return!1},Nt.isConcurrentMode=function(){return!1},Nt.isContextConsumer=function(w){return S(w)===l},Nt.isContextProvider=function(w){return S(w)===o},Nt.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},Nt.isForwardRef=function(w){return S(w)===f},Nt.isFragment=function(w){return S(w)===n},Nt.isLazy=function(w){return S(w)===g},Nt.isMemo=function(w){return S(w)===h},Nt.isPortal=function(w){return S(w)===t},Nt.isProfiler=function(w){return S(w)===a},Nt.isStrictMode=function(w){return S(w)===r},Nt.isSuspense=function(w){return S(w)===d},Nt.isSuspenseList=function(w){return S(w)===m},Nt.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===h||w.$$typeof===o||w.$$typeof===l||w.$$typeof===f||w.$$typeof===A||w.getModuleId!==void 0)},Nt.typeOf=S,Nt}var XN;function iie(){return XN||(XN=1,Z0.exports=aie()),Z0.exports}var oie=iie(),X0,QN;function qB(){if(QN)return X0;QN=1;var e=Hi(),t=Fi(),n="[object Number]";function r(a){return typeof a=="number"||t(a)&&e(a)==n}return X0=r,X0}var Q0,JN;function sie(){if(JN)return Q0;JN=1;var e=qB();function t(n){return e(n)&&n!=+n}return Q0=t,Q0}var lie=sie();const zc=Ht(lie);var cie=qB();const uie=Ht(cie);var Ta=function(t){return t===0?0:t>0?1:-1},ps=function(t){return Rs(t)&&t.indexOf("%")===t.length-1},Ne=function(t){return uie(t)&&!zc(t)},fie=function(t){return yt(t)},Mn=function(t){return Ne(t)||Rs(t)},die=0,jd=function(t){var n=++die;return"".concat(t||"").concat(n)},Ns=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(!Ne(t)&&!Rs(t))return r;var o;if(ps(t)){var l=t.indexOf("%");o=n*parseFloat(t.slice(0,l))/100}else o=+t;return zc(o)&&(o=r),a&&o>n&&(o=n),o},_o=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},hie=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},aa=function(t,n){return Ne(t)&&Ne(n)?function(r){return t+r*(n-t)}:function(){return n}};function tm(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):ua(r,t))===n})}var pie=function(t,n){return Ne(t)&&Ne(n)?t-n:Rs(t)&&Rs(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Fl(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 NS(e){"@babel/helpers - typeof";return NS=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},NS(e)}var mie=["viewBox","children"],vie=["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"],eM=["points","pathLength"],J0={svg:mie,polygon:eM,polyline:eM},xO=["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"],nm=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(y.isValidElement(t)&&(r=t.props),!$c(r))return null;var a={};return Object.keys(r).forEach(function(o){xO.includes(o)&&(a[o]=n||function(l){return r[o](r,l)})}),a},gie=function(t,n,r){return function(a){return t(n,r,a),null}},rm=function(t,n,r){if(!$c(t)||NS(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(o){var l=t[o];xO.includes(o)&&typeof l=="function"&&(a||(a={}),a[o]=gie(l,n,r))}),a},yie=["children"],bie=["children"];function tM(e,t){if(e==null)return{};var n=xie(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 xie(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 MS(e){"@babel/helpers - typeof";return MS=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},MS(e)}var nM={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"},Ni=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},rM=null,ex=null,wO=function e(t){if(t===rM&&Array.isArray(ex))return ex;var n=[];return y.Children.forEach(t,function(r){yt(r)||(oie.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),ex=n,rM=t,n};function Na(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(a){return Ni(a)}):r=[Ni(t)],wO(e).forEach(function(a){var o=ua(a,"type.displayName")||ua(a,"type.name");r.indexOf(o)!==-1&&n.push(a)}),n}function Rr(e,t){var n=Na(e,t);return n&&n[0]}var aM=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,a=n.height;return!(!Ne(r)||r<=0||!Ne(a)||a<=0)},wie=["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"],Sie=function(t){return t&&t.type&&Rs(t.type)&&wie.indexOf(t.type)>=0},_ie=function(t){return t&&MS(t)==="object"&&"clipDot"in t},Aie=function(t,n,r,a){var o,l=(o=J0==null?void 0:J0[a])!==null&&o!==void 0?o:[];return n.startsWith("data-")||!lt(t)&&(a&&l.includes(n)||vie.includes(n))||r&&xO.includes(n)},mt=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(y.isValidElement(t)&&(a=t.props),!$c(a))return null;var o={};return Object.keys(a).forEach(function(l){var c;Aie((c=a)===null||c===void 0?void 0:c[l],l,n,r)&&(o[l]=a[l])}),o},PS=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 iM(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(!iM(o,l))return!1}return!0},iM=function(t,n){if(yt(t)&&yt(n))return!0;if(!yt(t)&&!yt(n)){var r=t.props||{},a=r.children,o=tM(r,yie),l=n.props||{},c=l.children,f=tM(l,bie);return a&&c?Fl(o,f)&&PS(a,c):!a&&!c?Fl(o,f):!1}return!1},oM=function(t,n){var r=[],a={};return wO(t).forEach(function(o,l){if(Sie(o))r.push(o);else if(o){var c=Ni(o.type),f=n[c]||{},d=f.handler,m=f.once;if(d&&(!m||!a[c])){var h=d(o,c,l);r.push(h),a[c]=!0}}}),r},Oie=function(t){var n=t&&t.type;return n&&nM[n]?nM[n]:null},Eie=function(t,n){return wO(n).indexOf(t)},jie=["children","width","height","viewBox","className","style","title","desc"];function DS(){return DS=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},DS.apply(this,arguments)}function Tie(e,t){if(e==null)return{};var n=Cie(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 Cie(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 kS(e){var t=e.children,n=e.width,r=e.height,a=e.viewBox,o=e.className,l=e.style,c=e.title,f=e.desc,d=Tie(e,jie),m=a||{width:n,height:r,x:0,y:0},h=xt("recharts-surface",o);return L.createElement("svg",DS({},mt(d,!0,"svg"),{className:h,width:n,height:r,style:l,viewBox:"".concat(m.x," ").concat(m.y," ").concat(m.width," ").concat(m.height)}),L.createElement("title",null,c),L.createElement("desc",null,f),t)}var Rie=["children","className"];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 Nie(e,t){if(e==null)return{};var n=Mie(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 Mie(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 sn=L.forwardRef(function(e,t){var n=e.children,r=e.className,a=Nie(e,Rie),o=xt("recharts-layer",r);return L.createElement("g",$S({className:o},mt(a,!0),{ref:t}),n)}),Mi=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]},tx,sM;function Pie(){if(sM)return tx;sM=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 tx=e,tx}var nx,lM;function Die(){if(lM)return nx;lM=1;var e=Pie();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 nx=t,nx}var rx,cM;function HB(){if(cM)return rx;cM=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",a=t+n+r,o="\\ufe0e\\ufe0f",l="\\u200d",c=RegExp("["+l+e+a+o+"]");function f(d){return c.test(d)}return rx=f,rx}var ax,uM;function kie(){if(uM)return ax;uM=1;function e(t){return t.split("")}return ax=e,ax}var ix,fM;function $ie(){if(fM)return ix;fM=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",a=t+n+r,o="\\ufe0e\\ufe0f",l="["+e+"]",c="["+a+"]",f="\\ud83c[\\udffb-\\udfff]",d="(?:"+c+"|"+f+")",m="[^"+e+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",x="\\u200d",A=d+"?",S="["+o+"]?",w="(?:"+x+"(?:"+[m,h,g].join("|")+")"+S+A+")*",O=S+A+w,E="(?:"+[m+c+"?",c,h,g,l].join("|")+")",j=RegExp(f+"(?="+f+")|"+E+O,"g");function R(T){return T.match(j)||[]}return ix=R,ix}var ox,dM;function zie(){if(dM)return ox;dM=1;var e=kie(),t=HB(),n=$ie();function r(a){return t(a)?n(a):e(a)}return ox=r,ox}var sx,hM;function Lie(){if(hM)return sx;hM=1;var e=Die(),t=HB(),n=zie(),r=IB();function a(o){return function(l){l=r(l);var c=t(l)?n(l):void 0,f=c?c[0]:l.charAt(0),d=c?e(c,1).join(""):l.slice(1);return f[o]()+d}}return sx=a,sx}var lx,pM;function Iie(){if(pM)return lx;pM=1;var e=Lie(),t=e("toUpperCase");return lx=t,lx}var Bie=Iie();const Hv=Ht(Bie);function Wt(e){return function(){return e}}const FB=Math.cos,am=Math.sin,za=Math.sqrt,im=Math.PI,Fv=2*im,zS=Math.PI,LS=2*zS,fs=1e-6,Uie=LS-fs;function VB(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function qie(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return VB;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 Hie{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?VB:qie(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,c=this._y1,f=r-t,d=a-n,m=l-t,h=c-n,g=m*m+h*h;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(g>fs)if(!(Math.abs(h*f-d*m)>fs)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let x=r-l,A=a-c,S=f*f+d*d,w=x*x+A*A,O=Math.sqrt(S),E=Math.sqrt(g),j=o*Math.tan((zS-Math.acos((S+g-w)/(2*O*E)))/2),R=j/E,T=j/O;Math.abs(R-1)>fs&&this._append`L${t+R*m},${n+R*h}`,this._append`A${o},${o},0,0,${+(h*x>m*A)},${this._x1=t+T*f},${this._y1=n+T*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 c=r*Math.cos(a),f=r*Math.sin(a),d=t+c,m=n+f,h=1^l,g=l?a-o:o-a;this._x1===null?this._append`M${d},${m}`:(Math.abs(this._x1-d)>fs||Math.abs(this._y1-m)>fs)&&this._append`L${d},${m}`,r&&(g<0&&(g=g%LS+LS),g>Uie?this._append`A${r},${r},0,1,${h},${t-c},${n-f}A${r},${r},0,1,${h},${this._x1=d},${this._y1=m}`:g>fs&&this._append`A${r},${r},0,${+(g>=zS)},${h},${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 SO(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 Hie(t)}function _O(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function GB(e){this._context=e}GB.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 Vv(e){return new GB(e)}function YB(e){return e[0]}function WB(e){return e[1]}function KB(e,t){var n=Wt(!0),r=null,a=Vv,o=null,l=SO(c);e=typeof e=="function"?e:e===void 0?YB:Wt(e),t=typeof t=="function"?t:t===void 0?WB:Wt(t);function c(f){var d,m=(f=_O(f)).length,h,g=!1,x;for(r==null&&(o=a(x=l())),d=0;d<=m;++d)!(d<m&&n(h=f[d],d,f))===g&&((g=!g)?o.lineStart():o.lineEnd()),g&&o.point(+e(h,d,f),+t(h,d,f));if(x)return o=null,x+""||null}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:Wt(+f),c):e},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:Wt(+f),c):t},c.defined=function(f){return arguments.length?(n=typeof f=="function"?f:Wt(!!f),c):n},c.curve=function(f){return arguments.length?(a=f,r!=null&&(o=a(r)),c):a},c.context=function(f){return arguments.length?(f==null?r=o=null:o=a(r=f),c):r},c}function ip(e,t,n){var r=null,a=Wt(!0),o=null,l=Vv,c=null,f=SO(d);e=typeof e=="function"?e:e===void 0?YB:Wt(+e),t=typeof t=="function"?t:Wt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?WB:Wt(+n);function d(h){var g,x,A,S=(h=_O(h)).length,w,O=!1,E,j=new Array(S),R=new Array(S);for(o==null&&(c=l(E=f())),g=0;g<=S;++g){if(!(g<S&&a(w=h[g],g,h))===O)if(O=!O)x=g,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),A=g-1;A>=x;--A)c.point(j[A],R[A]);c.lineEnd(),c.areaEnd()}O&&(j[g]=+e(w,g,h),R[g]=+t(w,g,h),c.point(r?+r(w,g,h):j[g],n?+n(w,g,h):R[g]))}if(E)return c=null,E+""||null}function m(){return KB().defined(a).curve(l).context(o)}return d.x=function(h){return arguments.length?(e=typeof h=="function"?h:Wt(+h),r=null,d):e},d.x0=function(h){return arguments.length?(e=typeof h=="function"?h:Wt(+h),d):e},d.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:Wt(+h),d):r},d.y=function(h){return arguments.length?(t=typeof h=="function"?h:Wt(+h),n=null,d):t},d.y0=function(h){return arguments.length?(t=typeof h=="function"?h:Wt(+h),d):t},d.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:Wt(+h),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(h){return arguments.length?(a=typeof h=="function"?h:Wt(!!h),d):a},d.curve=function(h){return arguments.length?(l=h,o!=null&&(c=l(o)),d):l},d.context=function(h){return arguments.length?(h==null?o=c=null:c=l(o=h),d):o},d}class ZB{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 Fie(e){return new ZB(e,!0)}function Vie(e){return new ZB(e,!1)}const AO={draw(e,t){const n=za(t/im);e.moveTo(n,0),e.arc(0,0,n,0,Fv)}},Gie={draw(e,t){const n=za(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()}},XB=za(1/3),Yie=XB*2,Wie={draw(e,t){const n=za(t/Yie),r=n*XB;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Kie={draw(e,t){const n=za(t),r=-n/2;e.rect(r,r,n,n)}},Zie=.8908130915292852,QB=am(im/10)/am(7*im/10),Xie=am(Fv/10)*QB,Qie=-FB(Fv/10)*QB,Jie={draw(e,t){const n=za(t*Zie),r=Xie*n,a=Qie*n;e.moveTo(0,-n),e.lineTo(r,a);for(let o=1;o<5;++o){const l=Fv*o/5,c=FB(l),f=am(l);e.lineTo(f*n,-c*n),e.lineTo(c*r-f*a,f*r+c*a)}e.closePath()}},cx=za(3),eoe={draw(e,t){const n=-za(t/(cx*3));e.moveTo(0,n*2),e.lineTo(-cx*n,-n),e.lineTo(cx*n,-n),e.closePath()}},ta=-.5,na=za(3)/2,IS=1/za(12),toe=(IS/2+1)*3,noe={draw(e,t){const n=za(t/toe),r=n/2,a=n*IS,o=r,l=n*IS+n,c=-o,f=l;e.moveTo(r,a),e.lineTo(o,l),e.lineTo(c,f),e.lineTo(ta*r-na*a,na*r+ta*a),e.lineTo(ta*o-na*l,na*o+ta*l),e.lineTo(ta*c-na*f,na*c+ta*f),e.lineTo(ta*r+na*a,ta*a-na*r),e.lineTo(ta*o+na*l,ta*l-na*o),e.lineTo(ta*c+na*f,ta*f-na*c),e.closePath()}};function roe(e,t){let n=null,r=SO(a);e=typeof e=="function"?e:Wt(e||AO),t=typeof t=="function"?t:Wt(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:Wt(o),a):e},a.size=function(o){return arguments.length?(t=typeof o=="function"?o:Wt(+o),a):t},a.context=function(o){return arguments.length?(n=o??null,a):n},a}function om(){}function sm(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 JB(e){this._context=e}JB.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:sm(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:sm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function aoe(e){return new JB(e)}function e6(e){this._context=e}e6.prototype={areaStart:om,areaEnd:om,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:sm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ioe(e){return new e6(e)}function t6(e){this._context=e}t6.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:sm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ooe(e){return new t6(e)}function n6(e){this._context=e}n6.prototype={areaStart:om,areaEnd:om,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 soe(e){return new n6(e)}function mM(e){return e<0?-1:1}function vM(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),c=(o*a+l*r)/(r+a);return(mM(o)+mM(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(c))||0}function gM(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ux(e,t,n){var r=e._x0,a=e._y0,o=e._x1,l=e._y1,c=(o-r)/3;e._context.bezierCurveTo(r+c,a+c*t,o-c,l-c*n,o,l)}function lm(e){this._context=e}lm.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:ux(this,this._t0,gM(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,ux(this,gM(this,n=vM(this,e,t)),n);break;default:ux(this,this._t0,n=vM(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function r6(e){this._context=new a6(e)}(r6.prototype=Object.create(lm.prototype)).point=function(e,t){lm.prototype.point.call(this,t,e)};function a6(e){this._context=e}a6.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 loe(e){return new lm(e)}function coe(e){return new r6(e)}function i6(e){this._context=e}i6.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=yM(e),a=yM(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 yM(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 uoe(e){return new i6(e)}function Gv(e,t){this._context=e,this._t=t}Gv.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 foe(e){return new Gv(e,.5)}function doe(e){return new Gv(e,0)}function hoe(e){return new Gv(e,1)}function ec(e,t){if((l=e.length)>1)for(var n=1,r,a,o=e[t[0]],l,c=o.length;n<l;++n)for(a=o,o=e[t[n]],r=0;r<c;++r)o[r][1]+=o[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function BS(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function poe(e,t){return e[t]}function moe(e){const t=[];return t.key=e,t}function voe(){var e=Wt([]),t=BS,n=ec,r=poe;function a(o){var l=Array.from(e.apply(this,arguments),moe),c,f=l.length,d=-1,m;for(const h of o)for(c=0,++d;c<f;++c)(l[c][d]=[0,+r(h,l[c].key,d,o)]).data=h;for(c=0,m=_O(t(l));c<f;++c)l[m[c]].index=c;return n(l,m),l}return a.keys=function(o){return arguments.length?(e=typeof o=="function"?o:Wt(Array.from(o)),a):e},a.value=function(o){return arguments.length?(r=typeof o=="function"?o:Wt(+o),a):r},a.order=function(o){return arguments.length?(t=o==null?BS:typeof o=="function"?o:Wt(Array.from(o)),a):t},a.offset=function(o){return arguments.length?(n=o??ec,a):n},a}function goe(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}ec(e,t)}}function yoe(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,c=0;l<a;++l)c+=e[l][n][1]||0;r[n][1]+=r[n][0]=-c/2}ec(e,t)}}function boe(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 c=0,f=0,d=0;c<l;++c){for(var m=e[t[c]],h=m[r][1]||0,g=m[r-1][1]||0,x=(h-g)/2,A=0;A<c;++A){var S=e[t[A]],w=S[r][1]||0,O=S[r-1][1]||0;x+=w-O}f+=h,d+=x*h}a[r-1][1]+=a[r-1][0]=n,f&&(n-=d/f)}a[r-1][1]+=a[r-1][0]=n,ec(e,t)}}function yf(e){"@babel/helpers - typeof";return yf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yf(e)}var xoe=["type","size","sizeType"];function US(){return US=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},US.apply(this,arguments)}function bM(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 xM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bM(Object(n),!0).forEach(function(r){woe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function woe(e,t,n){return t=Soe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Soe(e){var t=_oe(e,"string");return yf(t)=="symbol"?t:t+""}function _oe(e,t){if(yf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Aoe(e,t){if(e==null)return{};var n=Ooe(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 Ooe(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 o6={symbolCircle:AO,symbolCross:Gie,symbolDiamond:Wie,symbolSquare:Kie,symbolStar:Jie,symbolTriangle:eoe,symbolWye:noe},Eoe=Math.PI/180,joe=function(t){var n="symbol".concat(Hv(t));return o6[n]||AO},Toe=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*Eoe;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}},Coe=function(t,n){o6["symbol".concat(Hv(t))]=n},OO=function(t){var n=t.type,r=n===void 0?"circle":n,a=t.size,o=a===void 0?64:a,l=t.sizeType,c=l===void 0?"area":l,f=Aoe(t,xoe),d=xM(xM({},f),{},{type:r,size:o,sizeType:c}),m=function(){var w=joe(r),O=roe().type(w).size(Toe(o,c,r));return O()},h=d.className,g=d.cx,x=d.cy,A=mt(d,!0);return g===+g&&x===+x&&o===+o?L.createElement("path",US({},A,{className:xt("recharts-symbols",h),transform:"translate(".concat(g,", ").concat(x,")"),d:m()})):null};OO.registerSymbol=Coe;function tc(e){"@babel/helpers - typeof";return tc=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},tc(e)}function qS(){return qS=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},qS.apply(this,arguments)}function wM(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 Roe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wM(Object(n),!0).forEach(function(r){bf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Noe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Moe(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,l6(r.key),r)}}function Poe(e,t,n){return t&&Moe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Doe(e,t,n){return t=cm(t),koe(e,s6()?Reflect.construct(t,n||[],cm(e).constructor):t.apply(e,n))}function koe(e,t){if(t&&(tc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $oe(e)}function $oe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(s6=function(){return!!e})()}function cm(e){return cm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cm(e)}function zoe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&HS(e,t)}function HS(e,t){return HS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},HS(e,t)}function bf(e,t,n){return t=l6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l6(e){var t=Loe(e,"string");return tc(t)=="symbol"?t:t+""}function Loe(e,t){if(tc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(tc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ra=32,EO=(function(e){function t(){return Noe(this,t),Doe(this,t,arguments)}return zoe(t,e),Poe(t,[{key:"renderIcon",value:function(r){var a=this.props.inactiveColor,o=ra/2,l=ra/6,c=ra/3,f=r.inactive?a:r.color;if(r.type==="plainline")return L.createElement("line",{strokeWidth:4,fill:"none",stroke:f,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:o,x2:ra,y2:o,className:"recharts-legend-icon"});if(r.type==="line")return L.createElement("path",{strokeWidth:4,fill:"none",stroke:f,d:"M0,".concat(o,"h").concat(c,`
|
|
435
|
-
A`).concat(l,",").concat(l,",0,1,1,").concat(2*c,",").concat(o,`
|
|
436
|
-
H`).concat(ra,"M").concat(2*c,",").concat(o,`
|
|
437
|
-
A`).concat(l,",").concat(l,",0,1,1,").concat(c,",").concat(o),className:"recharts-legend-icon"});if(r.type==="rect")return L.createElement("path",{stroke:"none",fill:f,d:"M0,".concat(ra/8,"h").concat(ra,"v").concat(ra*3/4,"h").concat(-ra,"z"),className:"recharts-legend-icon"});if(L.isValidElement(r.legendIcon)){var d=Roe({},r);return delete d.legendIcon,L.cloneElement(r.legendIcon,d)}return L.createElement(OO,{fill:f,cx:o,cy:o,size:ra,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,a=this.props,o=a.payload,l=a.iconSize,c=a.layout,f=a.formatter,d=a.inactiveColor,m={x:0,y:0,width:ra,height:ra},h={display:c==="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=xt(bf(bf({"recharts-legend-item":!0},"legend-item-".concat(A),!0),"inactive",x.inactive));if(x.type==="none")return null;var O=lt(x.value)?null:x.value;Mi(!lt(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 L.createElement("li",qS({className:w,style:h,key:"legend-item-".concat(A)},rm(r.props,x,A)),L.createElement(kS,{width:l,height:l,viewBox:m,style:g},r.renderIcon(x)),L.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 c={padding:0,margin:0,textAlign:o==="horizontal"?l:"left"};return L.createElement("ul",{className:"recharts-default-legend",style:c},this.renderItems())}}])})(y.PureComponent);bf(EO,"displayName","Legend");bf(EO,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var fx,SM;function Ioe(){if(SM)return fx;SM=1;var e=Bv();function t(){this.__data__=new e,this.size=0}return fx=t,fx}var dx,_M;function Boe(){if(_M)return dx;_M=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return dx=e,dx}var hx,AM;function Uoe(){if(AM)return hx;AM=1;function e(t){return this.__data__.get(t)}return hx=e,hx}var px,OM;function qoe(){if(OM)return px;OM=1;function e(t){return this.__data__.has(t)}return px=e,px}var mx,EM;function Hoe(){if(EM)return mx;EM=1;var e=Bv(),t=vO(),n=gO(),r=200;function a(o,l){var c=this.__data__;if(c instanceof e){var f=c.__data__;if(!t||f.length<r-1)return f.push([o,l]),this.size=++c.size,this;c=this.__data__=new n(f)}return c.set(o,l),this.size=c.size,this}return mx=a,mx}var vx,jM;function c6(){if(jM)return vx;jM=1;var e=Bv(),t=Ioe(),n=Boe(),r=Uoe(),a=qoe(),o=Hoe();function l(c){var f=this.__data__=new e(c);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,vx=l,vx}var gx,TM;function Foe(){if(TM)return gx;TM=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return gx=t,gx}var yx,CM;function Voe(){if(CM)return yx;CM=1;function e(t){return this.__data__.has(t)}return yx=e,yx}var bx,RM;function u6(){if(RM)return bx;RM=1;var e=gO(),t=Foe(),n=Voe();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,bx=r,bx}var xx,NM;function f6(){if(NM)return xx;NM=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 xx=e,xx}var wx,MM;function d6(){if(MM)return wx;MM=1;function e(t,n){return t.has(n)}return wx=e,wx}var Sx,PM;function h6(){if(PM)return Sx;PM=1;var e=u6(),t=f6(),n=d6(),r=1,a=2;function o(l,c,f,d,m,h){var g=f&r,x=l.length,A=c.length;if(x!=A&&!(g&&A>x))return!1;var S=h.get(l),w=h.get(c);if(S&&w)return S==c&&w==l;var O=-1,E=!0,j=f&a?new e:void 0;for(h.set(l,c),h.set(c,l);++O<x;){var R=l[O],T=c[O];if(d)var C=g?d(T,R,O,c,l,h):d(R,T,O,l,c,h);if(C!==void 0){if(C)continue;E=!1;break}if(j){if(!t(c,function(N,D){if(!n(j,D)&&(R===N||m(R,N,f,d,h)))return j.push(D)})){E=!1;break}}else if(!(R===T||m(R,T,f,d,h))){E=!1;break}}return h.delete(l),h.delete(c),E}return Sx=o,Sx}var _x,DM;function Goe(){if(DM)return _x;DM=1;var e=ii(),t=e.Uint8Array;return _x=t,_x}var Ax,kM;function Yoe(){if(kM)return Ax;kM=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(a,o){r[++n]=[o,a]}),r}return Ax=e,Ax}var Ox,$M;function jO(){if($M)return Ox;$M=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(a){r[++n]=a}),r}return Ox=e,Ox}var Ex,zM;function Woe(){if(zM)return Ex;zM=1;var e=Ed(),t=Goe(),n=mO(),r=h6(),a=Yoe(),o=jO(),l=1,c=2,f="[object Boolean]",d="[object Date]",m="[object Error]",h="[object Map]",g="[object Number]",x="[object RegExp]",A="[object Set]",S="[object String]",w="[object Symbol]",O="[object ArrayBuffer]",E="[object DataView]",j=e?e.prototype:void 0,R=j?j.valueOf:void 0;function T(C,N,D,z,V,U,P){switch(D){case E:if(C.byteLength!=N.byteLength||C.byteOffset!=N.byteOffset)return!1;C=C.buffer,N=N.buffer;case O:return!(C.byteLength!=N.byteLength||!U(new t(C),new t(N)));case f:case d:case g:return n(+C,+N);case m:return C.name==N.name&&C.message==N.message;case x:case S:return C==N+"";case h:var B=a;case A:var q=z&l;if(B||(B=o),C.size!=N.size&&!q)return!1;var Y=P.get(C);if(Y)return Y==N;z|=c,P.set(C,N);var $=r(B(C),B(N),z,V,U,P);return P.delete(C),$;case w:if(R)return R.call(C)==R.call(N)}return!1}return Ex=T,Ex}var jx,LM;function p6(){if(LM)return jx;LM=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 jx=e,jx}var Tx,IM;function Koe(){if(IM)return Tx;IM=1;var e=p6(),t=xr();function n(r,a,o){var l=a(r);return t(r)?l:e(l,o(r))}return Tx=n,Tx}var Cx,BM;function Zoe(){if(BM)return Cx;BM=1;function e(t,n){for(var r=-1,a=t==null?0:t.length,o=0,l=[];++r<a;){var c=t[r];n(c,r,t)&&(l[o++]=c)}return l}return Cx=e,Cx}var Rx,UM;function Xoe(){if(UM)return Rx;UM=1;function e(){return[]}return Rx=e,Rx}var Nx,qM;function Qoe(){if(qM)return Nx;qM=1;var e=Zoe(),t=Xoe(),n=Object.prototype,r=n.propertyIsEnumerable,a=Object.getOwnPropertySymbols,o=a?function(l){return l==null?[]:(l=Object(l),e(a(l),function(c){return r.call(l,c)}))}:t;return Nx=o,Nx}var Mx,HM;function Joe(){if(HM)return Mx;HM=1;function e(t,n){for(var r=-1,a=Array(t);++r<t;)a[r]=n(r);return a}return Mx=e,Mx}var Px,FM;function ese(){if(FM)return Px;FM=1;var e=Hi(),t=Fi(),n="[object Arguments]";function r(a){return t(a)&&e(a)==n}return Px=r,Px}var Dx,VM;function TO(){if(VM)return Dx;VM=1;var e=ese(),t=Fi(),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 Dx=o,Dx}var ef={exports:{}},kx,GM;function tse(){if(GM)return kx;GM=1;function e(){return!1}return kx=e,kx}ef.exports;var YM;function m6(){return YM||(YM=1,(function(e,t){var n=ii(),r=tse(),a=t&&!t.nodeType&&t,o=a&&!0&&e&&!e.nodeType&&e,l=o&&o.exports===a,c=l?n.Buffer:void 0,f=c?c.isBuffer:void 0,d=f||r;e.exports=d})(ef,ef.exports)),ef.exports}var $x,WM;function CO(){if(WM)return $x;WM=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 $x=n,$x}var zx,KM;function RO(){if(KM)return zx;KM=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return zx=t,zx}var Lx,ZM;function nse(){if(ZM)return Lx;ZM=1;var e=Hi(),t=RO(),n=Fi(),r="[object Arguments]",a="[object Array]",o="[object Boolean]",l="[object Date]",c="[object Error]",f="[object Function]",d="[object Map]",m="[object Number]",h="[object Object]",g="[object RegExp]",x="[object Set]",A="[object String]",S="[object WeakMap]",w="[object ArrayBuffer]",O="[object DataView]",E="[object Float32Array]",j="[object Float64Array]",R="[object Int8Array]",T="[object Int16Array]",C="[object Int32Array]",N="[object Uint8Array]",D="[object Uint8ClampedArray]",z="[object Uint16Array]",V="[object Uint32Array]",U={};U[E]=U[j]=U[R]=U[T]=U[C]=U[N]=U[D]=U[z]=U[V]=!0,U[r]=U[a]=U[w]=U[o]=U[O]=U[l]=U[c]=U[f]=U[d]=U[m]=U[h]=U[g]=U[x]=U[A]=U[S]=!1;function P(B){return n(B)&&t(B.length)&&!!U[e(B)]}return Lx=P,Lx}var Ix,XM;function v6(){if(XM)return Ix;XM=1;function e(t){return function(n){return t(n)}}return Ix=e,Ix}var tf={exports:{}};tf.exports;var QM;function rse(){return QM||(QM=1,(function(e,t){var n=$B(),r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===r,l=o&&n.process,c=(function(){try{var f=a&&a.require&&a.require("util").types;return f||l&&l.binding&&l.binding("util")}catch{}})();e.exports=c})(tf,tf.exports)),tf.exports}var Bx,JM;function g6(){if(JM)return Bx;JM=1;var e=nse(),t=v6(),n=rse(),r=n&&n.isTypedArray,a=r?t(r):e;return Bx=a,Bx}var Ux,eP;function ase(){if(eP)return Ux;eP=1;var e=Joe(),t=TO(),n=xr(),r=m6(),a=CO(),o=g6(),l=Object.prototype,c=l.hasOwnProperty;function f(d,m){var h=n(d),g=!h&&t(d),x=!h&&!g&&r(d),A=!h&&!g&&!x&&o(d),S=h||g||x||A,w=S?e(d.length,String):[],O=w.length;for(var E in d)(m||c.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 Ux=f,Ux}var qx,tP;function ise(){if(tP)return qx;tP=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,a=typeof r=="function"&&r.prototype||e;return n===a}return qx=t,qx}var Hx,nP;function y6(){if(nP)return Hx;nP=1;function e(t,n){return function(r){return t(n(r))}}return Hx=e,Hx}var Fx,rP;function ose(){if(rP)return Fx;rP=1;var e=y6(),t=e(Object.keys,Object);return Fx=t,Fx}var Vx,aP;function sse(){if(aP)return Vx;aP=1;var e=ise(),t=ose(),n=Object.prototype,r=n.hasOwnProperty;function a(o){if(!e(o))return t(o);var l=[];for(var c in Object(o))r.call(o,c)&&c!="constructor"&&l.push(c);return l}return Vx=a,Vx}var Gx,iP;function Td(){if(iP)return Gx;iP=1;var e=pO(),t=RO();function n(r){return r!=null&&t(r.length)&&!e(r)}return Gx=n,Gx}var Yx,oP;function Yv(){if(oP)return Yx;oP=1;var e=ase(),t=sse(),n=Td();function r(a){return n(a)?e(a):t(a)}return Yx=r,Yx}var Wx,sP;function lse(){if(sP)return Wx;sP=1;var e=Koe(),t=Qoe(),n=Yv();function r(a){return e(a,n,t)}return Wx=r,Wx}var Kx,lP;function cse(){if(lP)return Kx;lP=1;var e=lse(),t=1,n=Object.prototype,r=n.hasOwnProperty;function a(o,l,c,f,d,m){var h=c&t,g=e(o),x=g.length,A=e(l),S=A.length;if(x!=S&&!h)return!1;for(var w=x;w--;){var O=g[w];if(!(h?O in l:r.call(l,O)))return!1}var E=m.get(o),j=m.get(l);if(E&&j)return E==l&&j==o;var R=!0;m.set(o,l),m.set(l,o);for(var T=h;++w<x;){O=g[w];var C=o[O],N=l[O];if(f)var D=h?f(N,C,O,l,o,m):f(C,N,O,o,l,m);if(!(D===void 0?C===N||d(C,N,c,f,m):D)){R=!1;break}T||(T=O=="constructor")}if(R&&!T){var z=o.constructor,V=l.constructor;z!=V&&"constructor"in o&&"constructor"in l&&!(typeof z=="function"&&z instanceof z&&typeof V=="function"&&V instanceof V)&&(R=!1)}return m.delete(o),m.delete(l),R}return Kx=a,Kx}var Zx,cP;function use(){if(cP)return Zx;cP=1;var e=Is(),t=ii(),n=e(t,"DataView");return Zx=n,Zx}var Xx,uP;function fse(){if(uP)return Xx;uP=1;var e=Is(),t=ii(),n=e(t,"Promise");return Xx=n,Xx}var Qx,fP;function b6(){if(fP)return Qx;fP=1;var e=Is(),t=ii(),n=e(t,"Set");return Qx=n,Qx}var Jx,dP;function dse(){if(dP)return Jx;dP=1;var e=Is(),t=ii(),n=e(t,"WeakMap");return Jx=n,Jx}var ew,hP;function hse(){if(hP)return ew;hP=1;var e=use(),t=vO(),n=fse(),r=b6(),a=dse(),o=Hi(),l=zB(),c="[object Map]",f="[object Object]",d="[object Promise]",m="[object Set]",h="[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)!=c||n&&E(n.resolve())!=d||r&&E(new r)!=m||a&&E(new a)!=h)&&(E=function(j){var R=o(j),T=R==f?j.constructor:void 0,C=T?l(T):"";if(C)switch(C){case x:return g;case A:return c;case S:return d;case w:return m;case O:return h}return R}),ew=E,ew}var tw,pP;function pse(){if(pP)return tw;pP=1;var e=c6(),t=h6(),n=Woe(),r=cse(),a=hse(),o=xr(),l=m6(),c=g6(),f=1,d="[object Arguments]",m="[object Array]",h="[object Object]",g=Object.prototype,x=g.hasOwnProperty;function A(S,w,O,E,j,R){var T=o(S),C=o(w),N=T?m:a(S),D=C?m:a(w);N=N==d?h:N,D=D==d?h:D;var z=N==h,V=D==h,U=N==D;if(U&&l(S)){if(!l(w))return!1;T=!0,z=!1}if(U&&!z)return R||(R=new e),T||c(S)?t(S,w,O,E,j,R):n(S,w,N,O,E,j,R);if(!(O&f)){var P=z&&x.call(S,"__wrapped__"),B=V&&x.call(w,"__wrapped__");if(P||B){var q=P?S.value():S,Y=B?w.value():w;return R||(R=new e),j(q,Y,O,E,R)}}return U?(R||(R=new e),r(S,w,O,E,j,R)):!1}return tw=A,tw}var nw,mP;function NO(){if(mP)return nw;mP=1;var e=pse(),t=Fi();function n(r,a,o,l,c){return r===a?!0:r==null||a==null||!t(r)&&!t(a)?r!==r&&a!==a:e(r,a,o,l,n,c)}return nw=n,nw}var rw,vP;function mse(){if(vP)return rw;vP=1;var e=c6(),t=NO(),n=1,r=2;function a(o,l,c,f){var d=c.length,m=d,h=!f;if(o==null)return!m;for(o=Object(o);d--;){var g=c[d];if(h&&g[2]?g[1]!==o[g[0]]:!(g[0]in o))return!1}for(;++d<m;){g=c[d];var x=g[0],A=o[x],S=g[1];if(h&&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 rw=a,rw}var aw,gP;function x6(){if(gP)return aw;gP=1;var e=zo();function t(n){return n===n&&!e(n)}return aw=t,aw}var iw,yP;function vse(){if(yP)return iw;yP=1;var e=x6(),t=Yv();function n(r){for(var a=t(r),o=a.length;o--;){var l=a[o],c=r[l];a[o]=[l,c,e(c)]}return a}return iw=n,iw}var ow,bP;function w6(){if(bP)return ow;bP=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return ow=e,ow}var sw,xP;function gse(){if(xP)return sw;xP=1;var e=mse(),t=vse(),n=w6();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 sw=r,sw}var lw,wP;function yse(){if(wP)return lw;wP=1;function e(t,n){return t!=null&&n in Object(t)}return lw=e,lw}var cw,SP;function bse(){if(SP)return cw;SP=1;var e=BB(),t=TO(),n=xr(),r=CO(),a=RO(),o=qv();function l(c,f,d){f=e(f,c);for(var m=-1,h=f.length,g=!1;++m<h;){var x=o(f[m]);if(!(g=c!=null&&d(c,x)))break;c=c[x]}return g||++m!=h?g:(h=c==null?0:c.length,!!h&&a(h)&&r(x,h)&&(n(c)||t(c)))}return cw=l,cw}var uw,_P;function xse(){if(_P)return uw;_P=1;var e=yse(),t=bse();function n(r,a){return r!=null&&t(r,a,e)}return uw=n,uw}var fw,AP;function wse(){if(AP)return fw;AP=1;var e=NO(),t=UB(),n=xse(),r=hO(),a=x6(),o=w6(),l=qv(),c=1,f=2;function d(m,h){return r(m)&&a(h)?o(l(m),h):function(g){var x=t(g,m);return x===void 0&&x===h?n(g,m):e(h,x,c|f)}}return fw=d,fw}var dw,OP;function Lc(){if(OP)return dw;OP=1;function e(t){return t}return dw=e,dw}var hw,EP;function Sse(){if(EP)return hw;EP=1;function e(t){return function(n){return n==null?void 0:n[t]}}return hw=e,hw}var pw,jP;function _se(){if(jP)return pw;jP=1;var e=bO();function t(n){return function(r){return e(r,n)}}return pw=t,pw}var mw,TP;function Ase(){if(TP)return mw;TP=1;var e=Sse(),t=_se(),n=hO(),r=qv();function a(o){return n(o)?e(r(o)):t(o)}return mw=a,mw}var vw,CP;function Lo(){if(CP)return vw;CP=1;var e=gse(),t=wse(),n=Lc(),r=xr(),a=Ase();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 vw=o,vw}var gw,RP;function S6(){if(RP)return gw;RP=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 gw=e,gw}var yw,NP;function Ose(){if(NP)return yw;NP=1;function e(t){return t!==t}return yw=e,yw}var bw,MP;function Ese(){if(MP)return bw;MP=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 bw=e,bw}var xw,PP;function jse(){if(PP)return xw;PP=1;var e=S6(),t=Ose(),n=Ese();function r(a,o,l){return o===o?n(a,o,l):e(a,t,l)}return xw=r,xw}var ww,DP;function Tse(){if(DP)return ww;DP=1;var e=jse();function t(n,r){var a=n==null?0:n.length;return!!a&&e(n,r,0)>-1}return ww=t,ww}var Sw,kP;function Cse(){if(kP)return Sw;kP=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 Sw=e,Sw}var _w,$P;function Rse(){if($P)return _w;$P=1;function e(){}return _w=e,_w}var Aw,zP;function Nse(){if(zP)return Aw;zP=1;var e=b6(),t=Rse(),n=jO(),r=1/0,a=e&&1/n(new e([,-0]))[1]==r?function(o){return new e(o)}:t;return Aw=a,Aw}var Ow,LP;function Mse(){if(LP)return Ow;LP=1;var e=u6(),t=Tse(),n=Cse(),r=d6(),a=Nse(),o=jO(),l=200;function c(f,d,m){var h=-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(;++h<x;){var E=f[h],j=d?d(E):E;if(E=m||E!==0?E:0,A&&j===j){for(var R=w.length;R--;)if(w[R]===j)continue e;d&&w.push(j),S.push(E)}else g(w,j,m)||(w!==S&&w.push(j),S.push(E))}return S}return Ow=c,Ow}var Ew,IP;function Pse(){if(IP)return Ew;IP=1;var e=Lo(),t=Mse();function n(r,a){return r&&r.length?t(r,e(a,2)):[]}return Ew=n,Ew}var Dse=Pse();const BP=Ht(Dse);function _6(e,t,n){return t===!0?BP(e,n):lt(t)?BP(e,t):e}function nc(e){"@babel/helpers - typeof";return nc=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},nc(e)}var kse=["ref"];function UP(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 Oi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UP(Object(n),!0).forEach(function(r){Wv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $se(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qP(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,O6(r.key),r)}}function zse(e,t,n){return t&&qP(e.prototype,t),n&&qP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lse(e,t,n){return t=um(t),Ise(e,A6()?Reflect.construct(t,n||[],um(e).constructor):t.apply(e,n))}function Ise(e,t){if(t&&(nc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bse(e)}function Bse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(A6=function(){return!!e})()}function um(e){return um=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},um(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&&FS(e,t)}function FS(e,t){return FS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},FS(e,t)}function Wv(e,t,n){return t=O6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O6(e){var t=qse(e,"string");return nc(t)=="symbol"?t:t+""}function qse(e,t){if(nc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(nc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Hse(e,t){if(e==null)return{};var n=Fse(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 Fse(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 Vse(e){return e.value}function Gse(e,t){if(L.isValidElement(e))return L.cloneElement(e,t);if(typeof e=="function")return L.createElement(e,t);t.ref;var n=Hse(t,kse);return L.createElement(EO,n)}var HP=1,Vl=(function(e){function t(){var n;$se(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=Lse(this,t,[].concat(a)),Wv(n,"lastBoundingBox",{width:-1,height:-1}),n}return Use(t,e),zse(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)>HP||Math.abs(a.height-this.lastBoundingBox.height)>HP)&&(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?Oi({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var a=this.props,o=a.layout,l=a.align,c=a.verticalAlign,f=a.margin,d=a.chartWidth,m=a.chartHeight,h,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();h={left:((d||0)-x.width)/2}}else h=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(c==="middle"){var A=this.getBBoxSnapshot();g={top:((m||0)-A.height)/2}}else g=c==="bottom"?{bottom:f&&f.bottom||0}:{top:f&&f.top||0};return Oi(Oi({},h),g)}},{key:"render",value:function(){var r=this,a=this.props,o=a.content,l=a.width,c=a.height,f=a.wrapperStyle,d=a.payloadUniqBy,m=a.payload,h=Oi(Oi({position:"absolute",width:l||"auto",height:c||"auto"},this.getDefaultPosition(f)),f);return L.createElement("div",{className:"recharts-legend-wrapper",style:h,ref:function(x){r.wrapperNode=x}},Gse(o,Oi(Oi({},this.props),{},{payload:_6(m,d,Vse)})))}}],[{key:"getWithHeight",value:function(r,a){var o=Oi(Oi({},this.defaultProps),r.props),l=o.layout;return l==="vertical"&&Ne(r.props.height)?{height:r.props.height}:l==="horizontal"?{width:r.props.width||a}:null}}])})(y.PureComponent);Wv(Vl,"displayName","Legend");Wv(Vl,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var jw,FP;function Yse(){if(FP)return jw;FP=1;var e=Ed(),t=TO(),n=xr(),r=e?e.isConcatSpreadable:void 0;function a(o){return n(o)||t(o)||!!(r&&o&&o[r])}return jw=a,jw}var Tw,VP;function E6(){if(VP)return Tw;VP=1;var e=p6(),t=Yse();function n(r,a,o,l,c){var f=-1,d=r.length;for(o||(o=t),c||(c=[]);++f<d;){var m=r[f];a>0&&o(m)?a>1?n(m,a-1,o,l,c):e(c,m):l||(c[c.length]=m)}return c}return Tw=n,Tw}var Cw,GP;function Wse(){if(GP)return Cw;GP=1;function e(t){return function(n,r,a){for(var o=-1,l=Object(n),c=a(n),f=c.length;f--;){var d=c[t?f:++o];if(r(l[d],d,l)===!1)break}return n}}return Cw=e,Cw}var Rw,YP;function Kse(){if(YP)return Rw;YP=1;var e=Wse(),t=e();return Rw=t,Rw}var Nw,WP;function j6(){if(WP)return Nw;WP=1;var e=Kse(),t=Yv();function n(r,a){return r&&e(r,a,t)}return Nw=n,Nw}var Mw,KP;function Zse(){if(KP)return Mw;KP=1;var e=Td();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,c=r?l:-1,f=Object(a);(r?c--:++c<l)&&o(f[c],c,f)!==!1;);return a}}return Mw=t,Mw}var Pw,ZP;function MO(){if(ZP)return Pw;ZP=1;var e=j6(),t=Zse(),n=t(e);return Pw=n,Pw}var Dw,XP;function T6(){if(XP)return Dw;XP=1;var e=MO(),t=Td();function n(r,a){var o=-1,l=t(r)?Array(r.length):[];return e(r,function(c,f,d){l[++o]=a(c,f,d)}),l}return Dw=n,Dw}var kw,QP;function Xse(){if(QP)return kw;QP=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return kw=e,kw}var $w,JP;function Qse(){if(JP)return $w;JP=1;var e=kc();function t(n,r){if(n!==r){var a=n!==void 0,o=n===null,l=n===n,c=e(n),f=r!==void 0,d=r===null,m=r===r,h=e(r);if(!d&&!h&&!c&&n>r||c&&f&&m&&!d&&!h||o&&f&&m||!a&&m||!l)return 1;if(!o&&!c&&!h&&n<r||h&&a&&l&&!o&&!c||d&&a&&l||!f&&l||!m)return-1}return 0}return $w=t,$w}var zw,eD;function Jse(){if(eD)return zw;eD=1;var e=Qse();function t(n,r,a){for(var o=-1,l=n.criteria,c=r.criteria,f=l.length,d=a.length;++o<f;){var m=e(l[o],c[o]);if(m){if(o>=d)return m;var h=a[o];return m*(h=="desc"?-1:1)}}return n.index-r.index}return zw=t,zw}var Lw,tD;function ele(){if(tD)return Lw;tD=1;var e=yO(),t=bO(),n=Lo(),r=T6(),a=Xse(),o=v6(),l=Jse(),c=Lc(),f=xr();function d(m,h,g){h.length?h=e(h,function(S){return f(S)?function(w){return t(w,S.length===1?S[0]:S)}:S}):h=[c];var x=-1;h=e(h,o(n));var A=r(m,function(S,w,O){var E=e(h,function(j){return j(S)});return{criteria:E,index:++x,value:S}});return a(A,function(S,w){return l(S,w,g)})}return Lw=d,Lw}var Iw,nD;function tle(){if(nD)return Iw;nD=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 Iw=e,Iw}var Bw,rD;function nle(){if(rD)return Bw;rD=1;var e=tle(),t=Math.max;function n(r,a,o){return a=t(a===void 0?r.length-1:a,0),function(){for(var l=arguments,c=-1,f=t(l.length-a,0),d=Array(f);++c<f;)d[c]=l[a+c];c=-1;for(var m=Array(a+1);++c<a;)m[c]=l[c];return m[a]=o(d),e(r,this,m)}}return Bw=n,Bw}var Uw,aD;function rle(){if(aD)return Uw;aD=1;function e(t){return function(){return t}}return Uw=e,Uw}var qw,iD;function C6(){if(iD)return qw;iD=1;var e=Is(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return qw=t,qw}var Hw,oD;function ale(){if(oD)return Hw;oD=1;var e=rle(),t=C6(),n=Lc(),r=t?function(a,o){return t(a,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:n;return Hw=r,Hw}var Fw,sD;function ile(){if(sD)return Fw;sD=1;var e=800,t=16,n=Date.now;function r(a){var o=0,l=0;return function(){var c=n(),f=t-(c-l);if(l=c,f>0){if(++o>=e)return arguments[0]}else o=0;return a.apply(void 0,arguments)}}return Fw=r,Fw}var Vw,lD;function ole(){if(lD)return Vw;lD=1;var e=ale(),t=ile(),n=t(e);return Vw=n,Vw}var Gw,cD;function sle(){if(cD)return Gw;cD=1;var e=Lc(),t=nle(),n=ole();function r(a,o){return n(t(a,o,e),a+"")}return Gw=r,Gw}var Yw,uD;function Kv(){if(uD)return Yw;uD=1;var e=mO(),t=Td(),n=CO(),r=zo();function a(o,l,c){if(!r(c))return!1;var f=typeof l;return(f=="number"?t(c)&&n(l,c.length):f=="string"&&l in c)?e(c[l],o):!1}return Yw=a,Yw}var Ww,fD;function lle(){if(fD)return Ww;fD=1;var e=E6(),t=ele(),n=sle(),r=Kv(),a=n(function(o,l){if(o==null)return[];var c=l.length;return c>1&&r(o,l[0],l[1])?l=[]:c>2&&r(l[0],l[1],l[2])&&(l=[l[0]]),t(o,e(l,1),[])});return Ww=a,Ww}var cle=lle();const PO=Ht(cle);function xf(e){"@babel/helpers - typeof";return xf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xf(e)}function 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 ule(e,t){return ple(e)||hle(e,t)||dle(e,t)||fle()}function fle(){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 dle(e,t){if(e){if(typeof e=="string")return dD(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 dD(e,t)}}function dD(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 hle(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.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 c}}function ple(e){if(Array.isArray(e))return e}function hD(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 Kw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hD(Object(n),!0).forEach(function(r){mle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mle(e,t,n){return t=vle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vle(e){var t=gle(e,"string");return xf(t)=="symbol"?t:t+""}function gle(e,t){if(xf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yle(e){return Array.isArray(e)&&Mn(e[0])&&Mn(e[1])?e.join(" ~ "):e}var ble=function(t){var n=t.separator,r=n===void 0?" : ":n,a=t.contentStyle,o=a===void 0?{}:a,l=t.itemStyle,c=l===void 0?{}:l,f=t.labelStyle,d=f===void 0?{}:f,m=t.payload,h=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,j=function(){if(m&&m.length){var P={padding:0,margin:0},B=(g?PO(m,g):m).map(function(q,Y){if(q.type==="none")return null;var $=Kw({display:"block",paddingTop:4,paddingBottom:4,color:q.color||"#000"},c),G=q.formatter||h||yle,F=q.value,K=q.name,ne=F,I=K;if(G&&ne!=null&&I!=null){var Z=G(F,K,q,Y,m);if(Array.isArray(Z)){var Q=ule(Z,2);ne=Q[0],I=Q[1]}else ne=Z}return L.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(Y),style:$},Mn(I)?L.createElement("span",{className:"recharts-tooltip-item-name"},I):null,Mn(I)?L.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,L.createElement("span",{className:"recharts-tooltip-item-value"},ne),L.createElement("span",{className:"recharts-tooltip-item-unit"},q.unit||""))});return L.createElement("ul",{className:"recharts-tooltip-item-list",style:P},B)}return null},R=Kw({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),T=Kw({margin:0},d),C=!yt(S),N=C?S:"",D=xt("recharts-default-tooltip",x),z=xt("recharts-tooltip-label",A);C&&w&&m!==void 0&&m!==null&&(N=w(S,m));var V=E?{role:"status","aria-live":"assertive"}:{};return L.createElement("div",VS({className:D,style:R},V),L.createElement("p",{className:z,style:T},L.isValidElement(N)?N:"".concat(N)),j())};function wf(e){"@babel/helpers - typeof";return wf=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},wf(e)}function op(e,t,n){return t=xle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xle(e){var t=wle(e,"string");return wf(t)=="symbol"?t:t+""}function wle(e,t){if(wf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bu="recharts-tooltip-wrapper",Sle={visibility:"hidden"};function _le(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return xt(Bu,op(op(op(op({},"".concat(Bu,"-right"),Ne(n)&&t&&Ne(t.x)&&n>=t.x),"".concat(Bu,"-left"),Ne(n)&&t&&Ne(t.x)&&n<t.x),"".concat(Bu,"-bottom"),Ne(r)&&t&&Ne(t.y)&&r>=t.y),"".concat(Bu,"-top"),Ne(r)&&t&&Ne(t.y)&&r<t.y))}function pD(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,a=e.offsetTopLeft,o=e.position,l=e.reverseDirection,c=e.tooltipDimension,f=e.viewBox,d=e.viewBoxDimension;if(o&&Ne(o[r]))return o[r];var m=n[r]-c-a,h=n[r]+a;if(t[r])return l[r]?m:h;if(l[r]){var g=m,x=f[r];return g<x?Math.max(h,f[r]):Math.max(m,f[r])}var A=h+c,S=f[r]+d;return A>S?Math.max(m,f[r]):Math.max(h,f[r])}function Ale(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 Ole(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,a=e.position,o=e.reverseDirection,l=e.tooltipBox,c=e.useTranslate3d,f=e.viewBox,d,m,h;return l.height>0&&l.width>0&&n?(m=pD({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:a,reverseDirection:o,tooltipDimension:l.width,viewBox:f,viewBoxDimension:f.width}),h=pD({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:a,reverseDirection:o,tooltipDimension:l.height,viewBox:f,viewBoxDimension:f.height}),d=Ale({translateX:m,translateY:h,useTranslate3d:c})):d=Sle,{cssProperties:d,cssClasses:_le({translateX:m,translateY:h,coordinate:n})}}function rc(e){"@babel/helpers - typeof";return rc=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},rc(e)}function mD(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 vD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mD(Object(n),!0).forEach(function(r){YS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ele(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jle(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,N6(r.key),r)}}function Tle(e,t,n){return t&&jle(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cle(e,t,n){return t=fm(t),Rle(e,R6()?Reflect.construct(t,n||[],fm(e).constructor):t.apply(e,n))}function Rle(e,t){if(t&&(rc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Nle(e)}function Nle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(R6=function(){return!!e})()}function fm(e){return fm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fm(e)}function Mle(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&GS(e,t)}function GS(e,t){return GS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},GS(e,t)}function YS(e,t,n){return t=N6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N6(e){var t=Ple(e,"string");return rc(t)=="symbol"?t:t+""}function Ple(e,t){if(rc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(rc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var gD=1,Dle=(function(e){function t(){var n;Ele(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=Cle(this,t,[].concat(a)),YS(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),YS(n,"handleKeyDown",function(l){if(l.key==="Escape"){var c,f,d,m;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(c=(f=n.props.coordinate)===null||f===void 0?void 0:f.x)!==null&&c!==void 0?c:0,y:(d=(m=n.props.coordinate)===null||m===void 0?void 0:m.y)!==null&&d!==void 0?d:0}})}}),n}return Mle(t,e),Tle(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>gD||Math.abs(r.height-this.state.lastBoundingBox.height)>gD)&&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,c=a.animationDuration,f=a.animationEasing,d=a.children,m=a.coordinate,h=a.hasPayload,g=a.isAnimationActive,x=a.offset,A=a.position,S=a.reverseDirection,w=a.useTranslate3d,O=a.viewBox,E=a.wrapperStyle,j=Ole({allowEscapeViewBox:l,coordinate:m,offsetTopLeft:x,position:A,reverseDirection:S,tooltipBox:this.state.lastBoundingBox,useTranslate3d:w,viewBox:O}),R=j.cssClasses,T=j.cssProperties,C=vD(vD({transition:g&&o?"transform ".concat(c,"ms ").concat(f):void 0},T),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&h?"visible":"hidden",position:"absolute",top:0,left:0},E);return L.createElement("div",{tabIndex:-1,className:R,style:C,ref:function(D){r.wrapperNode=D}},d)}}])})(y.PureComponent),kle=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ic={isSsr:kle()};function ac(e){"@babel/helpers - typeof";return ac=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},ac(e)}function yD(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 bD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yD(Object(n),!0).forEach(function(r){DO(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $le(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zle(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,P6(r.key),r)}}function Lle(e,t,n){return t&&zle(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ile(e,t,n){return t=dm(t),Ble(e,M6()?Reflect.construct(t,n||[],dm(e).constructor):t.apply(e,n))}function Ble(e,t){if(t&&(ac(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ule(e)}function Ule(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(M6=function(){return!!e})()}function dm(e){return dm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dm(e)}function qle(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&WS(e,t)}function WS(e,t){return WS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},WS(e,t)}function DO(e,t,n){return t=P6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P6(e){var t=Hle(e,"string");return ac(t)=="symbol"?t:t+""}function Hle(e,t){if(ac(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ac(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Fle(e){return e.dataKey}function Vle(e,t){return L.isValidElement(e)?L.cloneElement(e,t):typeof e=="function"?L.createElement(e,t):L.createElement(ble,t)}var Va=(function(e){function t(){return $le(this,t),Ile(this,t,arguments)}return qle(t,e),Lle(t,[{key:"render",value:function(){var r=this,a=this.props,o=a.active,l=a.allowEscapeViewBox,c=a.animationDuration,f=a.animationEasing,d=a.content,m=a.coordinate,h=a.filterNull,g=a.isAnimationActive,x=a.offset,A=a.payload,S=a.payloadUniqBy,w=a.position,O=a.reverseDirection,E=a.useTranslate3d,j=a.viewBox,R=a.wrapperStyle,T=A??[];h&&T.length&&(T=_6(A.filter(function(N){return N.value!=null&&(N.hide!==!0||r.props.includeHidden)}),S,Fle));var C=T.length>0;return L.createElement(Dle,{allowEscapeViewBox:l,animationDuration:c,animationEasing:f,isAnimationActive:g,active:o,coordinate:m,hasPayload:C,offset:x,position:w,reverseDirection:O,useTranslate3d:E,viewBox:j,wrapperStyle:R},Vle(d,bD(bD({},this.props),{},{payload:T})))}}])})(y.PureComponent);DO(Va,"displayName","Tooltip");DO(Va,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ic.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 Zw,xD;function Gle(){if(xD)return Zw;xD=1;var e=ii(),t=function(){return e.Date.now()};return Zw=t,Zw}var Xw,wD;function Yle(){if(wD)return Xw;wD=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return Xw=t,Xw}var Qw,SD;function Wle(){if(SD)return Qw;SD=1;var e=Yle(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Qw=n,Qw}var Jw,_D;function D6(){if(_D)return Jw;_D=1;var e=Wle(),t=zo(),n=kc(),r=NaN,a=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=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 h=o.test(d);return h||l.test(d)?c(d.slice(2),h?2:8):a.test(d)?r:+d}return Jw=f,Jw}var e1,AD;function Kle(){if(AD)return e1;AD=1;var e=zo(),t=Gle(),n=D6(),r="Expected a function",a=Math.max,o=Math.min;function l(c,f,d){var m,h,g,x,A,S,w=0,O=!1,E=!1,j=!0;if(typeof c!="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,j="trailing"in d?!!d.trailing:j);function R(B){var q=m,Y=h;return m=h=void 0,w=B,x=c.apply(Y,q),x}function T(B){return w=B,A=setTimeout(D,f),O?R(B):x}function C(B){var q=B-S,Y=B-w,$=f-q;return E?o($,g-Y):$}function N(B){var q=B-S,Y=B-w;return S===void 0||q>=f||q<0||E&&Y>=g}function D(){var B=t();if(N(B))return z(B);A=setTimeout(D,C(B))}function z(B){return A=void 0,j&&m?R(B):(m=h=void 0,x)}function V(){A!==void 0&&clearTimeout(A),w=0,m=S=h=A=void 0}function U(){return A===void 0?x:z(t())}function P(){var B=t(),q=N(B);if(m=arguments,h=this,S=B,q){if(A===void 0)return T(S);if(E)return clearTimeout(A),A=setTimeout(D,f),R(S)}return A===void 0&&(A=setTimeout(D,f)),x}return P.cancel=V,P.flush=U,P}return e1=l,e1}var t1,OD;function Zle(){if(OD)return t1;OD=1;var e=Kle(),t=zo(),n="Expected a function";function r(a,o,l){var c=!0,f=!0;if(typeof a!="function")throw new TypeError(n);return t(l)&&(c="leading"in l?!!l.leading:c,f="trailing"in l?!!l.trailing:f),e(a,o,{leading:c,maxWait:o,trailing:f})}return t1=r,t1}var Xle=Zle();const k6=Ht(Xle);function Sf(e){"@babel/helpers - typeof";return Sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sf(e)}function ED(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 sp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ED(Object(n),!0).forEach(function(r){Qle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ED(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qle(e,t,n){return t=Jle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jle(e){var t=ece(e,"string");return Sf(t)=="symbol"?t:t+""}function ece(e,t){if(Sf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tce(e,t){return ice(e)||ace(e,t)||rce(e,t)||nce()}function nce(){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 rce(e,t){if(e){if(typeof e=="string")return jD(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 jD(e,t)}}function jD(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 ace(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.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 c}}function ice(e){if(Array.isArray(e))return e}var oce=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,c=e.height,f=c===void 0?"100%":c,d=e.minWidth,m=d===void 0?0:d,h=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,j=e.style,R=j===void 0?{}:j,T=y.useRef(null),C=y.useRef();C.current=E,y.useImperativeHandle(t,function(){return Object.defineProperty(T.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),T.current},configurable:!0})});var N=y.useState({containerWidth:a.width,containerHeight:a.height}),D=tce(N,2),z=D[0],V=D[1],U=y.useCallback(function(B,q){V(function(Y){var $=Math.round(B),G=Math.round(q);return Y.containerWidth===$&&Y.containerHeight===G?Y:{containerWidth:$,containerHeight:G}})},[]);y.useEffect(function(){var B=function(K){var ne,I=K[0].contentRect,Z=I.width,Q=I.height;U(Z,Q),(ne=C.current)===null||ne===void 0||ne.call(C,Z,Q)};S>0&&(B=k6(B,S,{trailing:!0,leading:!1}));var q=new ResizeObserver(B),Y=T.current.getBoundingClientRect(),$=Y.width,G=Y.height;return U($,G),q.observe(T.current),function(){q.disconnect()}},[U,S]);var P=y.useMemo(function(){var B=z.containerWidth,q=z.containerHeight;if(B<0||q<0)return null;Mi(ps(l)||ps(f),`The width(%s) and height(%s) are both fixed numbers,
|
|
440
|
-
maybe you don't need to use a ResponsiveContainer.`,l,f),Mi(!n||n>0,"The aspect(%s) must be greater than zero.",n);var Y=ps(l)?B:l,$=ps(f)?q:f;n&&n>0&&(Y?$=Y/n:$&&(Y=$*n),g&&$>g&&($=g)),Mi(Y>0||$>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
441
|
-
please check the style of container, or the props width(%s) and height(%s),
|
|
442
|
-
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
443
|
-
height and width.`,Y,$,l,f,m,h,n);var G=!Array.isArray(x)&&Ni(x.type).endsWith("Chart");return L.Children.map(x,function(F){return L.isValidElement(F)?y.cloneElement(F,sp({width:Y,height:$},G?{style:sp({height:"100%",width:"100%",maxHeight:$,maxWidth:Y},F.props.style)}:{})):F})},[n,x,f,g,h,m,z,l]);return L.createElement("div",{id:w?"".concat(w):void 0,className:xt("recharts-responsive-container",O),style:sp(sp({},R),{},{width:l,height:f,minWidth:m,minHeight:h,maxHeight:g}),ref:T},P)}),$6=function(t){return null};$6.displayName="Cell";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)}function TD(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 KS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TD(Object(n),!0).forEach(function(r){sce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sce(e,t,n){return t=lce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lce(e){var t=cce(e,"string");return _f(t)=="symbol"?t:t+""}function cce(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)}var Nl={widthCache:{},cacheCount:0},uce=2e3,fce={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},CD="recharts_measurement_span";function dce(e){var t=KS({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var of=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ic.isSsr)return{width:0,height:0};var r=dce(n),a=JSON.stringify({text:t,copyStyle:r});if(Nl.widthCache[a])return Nl.widthCache[a];try{var o=document.getElementById(CD);o||(o=document.createElement("span"),o.setAttribute("id",CD),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var l=KS(KS({},fce),r);Object.assign(o.style,l),o.textContent="".concat(t);var c=o.getBoundingClientRect(),f={width:c.width,height:c.height};return Nl.widthCache[a]=f,++Nl.cacheCount>uce&&(Nl.cacheCount=0,Nl.widthCache={}),f}catch{return{width:0,height:0}}},hce=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Af(e){"@babel/helpers - typeof";return Af=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Af(e)}function hm(e,t){return gce(e)||vce(e,t)||mce(e,t)||pce()}function pce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
444
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mce(e,t){if(e){if(typeof e=="string")return RD(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 RD(e,t)}}function RD(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 vce(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],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)&&(c.push(r.value),c.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 c}}function gce(e){if(Array.isArray(e))return e}function yce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ND(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,xce(r.key),r)}}function bce(e,t,n){return t&&ND(e.prototype,t),n&&ND(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function xce(e){var t=wce(e,"string");return Af(t)=="symbol"?t:t+""}function wce(e,t){if(Af(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Af(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var MD=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,PD=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Sce=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,_ce=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,z6={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Ace=Object.keys(z6),$l="NaN";function Oce(e,t){return e*z6[t]}var lp=(function(){function e(t,n){yce(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!Sce.test(n)&&(this.num=NaN,this.unit=""),Ace.includes(n)&&(this.num=Oce(t,n),this.unit="px")}return bce(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=_ce.exec(n))!==null&&r!==void 0?r:[],o=hm(a,3),l=o[1],c=o[2];return new e(parseFloat(l),c??"")}}])})();function L6(e){if(e.includes($l))return $l;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=MD.exec(t))!==null&&n!==void 0?n:[],a=hm(r,4),o=a[1],l=a[2],c=a[3],f=lp.parse(o??""),d=lp.parse(c??""),m=l==="*"?f.multiply(d):f.divide(d);if(m.isNaN())return $l;t=t.replace(MD,m.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var h,g=(h=PD.exec(t))!==null&&h!==void 0?h:[],x=hm(g,4),A=x[1],S=x[2],w=x[3],O=lp.parse(A??""),E=lp.parse(w??""),j=S==="+"?O.add(E):O.subtract(E);if(j.isNaN())return $l;t=t.replace(PD,j.toString())}return t}var DD=/\(([^()]*)\)/;function Ece(e){for(var t=e;t.includes("(");){var n=DD.exec(t),r=hm(n,2),a=r[1];t=t.replace(DD,L6(a))}return t}function jce(e){var t=e.replace(/\s+/g,"");return t=Ece(t),t=L6(t),t}function Tce(e){try{return jce(e)}catch{return $l}}function n1(e){var t=Tce(e.slice(5,-1));return t===$l?"":t}var Cce=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Rce=["dx","dy","angle","className","breakAll"];function ZS(){return ZS=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},ZS.apply(this,arguments)}function kD(e,t){if(e==null)return{};var n=Nce(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 Nce(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){return kce(e)||Dce(e,t)||Pce(e,t)||Mce()}function Mce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
445
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pce(e,t){if(e){if(typeof e=="string")return zD(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 zD(e,t)}}function zD(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 Dce(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],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)&&(c.push(r.value),c.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 c}}function kce(e){if(Array.isArray(e))return e}var I6=/[ \f\n\r\t\v\u2028\u2029]+/,B6=function(t){var n=t.children,r=t.breakAll,a=t.style;try{var o=[];yt(n)||(r?o=n.toString().split(""):o=n.toString().split(I6));var l=o.map(function(f){return{word:f,width:of(f,a).width}}),c=r?0:of(" ",a).width;return{wordsWithComputedWidth:l,spaceWidth:c}}catch{return null}},$ce=function(t,n,r,a,o){var l=t.maxLines,c=t.children,f=t.style,d=t.breakAll,m=Ne(l),h=c,g=function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Y.reduce(function($,G){var F=G.word,K=G.width,ne=$[$.length-1];if(ne&&(a==null||o||ne.width+K+r<Number(a)))ne.words.push(F),ne.width+=K+r;else{var I={words:[F],width:K};$.push(I)}return $},[])},x=g(n),A=function(Y){return Y.reduce(function($,G){return $.width>G.width?$:G})};if(!m)return x;for(var S="…",w=function(Y){var $=h.slice(0,Y),G=B6({breakAll:d,style:f,children:$+S}).wordsWithComputedWidth,F=g(G),K=F.length>l||A(F).width>Number(a);return[K,F]},O=0,E=h.length-1,j=0,R;O<=E&&j<=h.length-1;){var T=Math.floor((O+E)/2),C=T-1,N=w(C),D=$D(N,2),z=D[0],V=D[1],U=w(T),P=$D(U,1),B=P[0];if(!z&&!B&&(O=T+1),z&&B&&(E=T-1),!z&&B){R=V;break}j++}return R||x},LD=function(t){var n=yt(t)?[]:t.toString().split(I6);return[{words:n}]},zce=function(t){var n=t.width,r=t.scaleToFit,a=t.children,o=t.style,l=t.breakAll,c=t.maxLines;if((n||r)&&!Ic.isSsr){var f,d,m=B6({breakAll:l,children:a,style:o});if(m){var h=m.wordsWithComputedWidth,g=m.spaceWidth;f=h,d=g}else return LD(a);return $ce({breakAll:l,children:a,maxLines:c,style:o},f,d,n,r)}return LD(a)},ID="#808080",pm=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,o=a===void 0?0:a,l=t.lineHeight,c=l===void 0?"1em":l,f=t.capHeight,d=f===void 0?"0.71em":f,m=t.scaleToFit,h=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?ID:w,E=kD(t,Cce),j=y.useMemo(function(){return zce({breakAll:E.breakAll,children:E.children,maxLines:E.maxLines,scaleToFit:h,style:E.style,width:E.width})},[E.breakAll,E.children,E.maxLines,h,E.style,E.width]),R=E.dx,T=E.dy,C=E.angle,N=E.className,D=E.breakAll,z=kD(E,Rce);if(!Mn(r)||!Mn(o))return null;var V=r+(Ne(R)?R:0),U=o+(Ne(T)?T:0),P;switch(S){case"start":P=n1("calc(".concat(d,")"));break;case"middle":P=n1("calc(".concat((j.length-1)/2," * -").concat(c," + (").concat(d," / 2))"));break;default:P=n1("calc(".concat(j.length-1," * -").concat(c,")"));break}var B=[];if(h){var q=j[0].width,Y=E.width;B.push("scale(".concat((Ne(Y)?Y/q:1)/q,")"))}return C&&B.push("rotate(".concat(C,", ").concat(V,", ").concat(U,")")),B.length&&(z.transform=B.join(" ")),L.createElement("text",ZS({},mt(z,!0),{x:V,y:U,className:xt("recharts-text",N),textAnchor:x,fill:O.includes("url")?ID:O}),j.map(function($,G){var F=$.words.join(D?"":" ");return L.createElement("tspan",{x:V,dy:G===0?P:c,key:"".concat(F,"-").concat(G)},F)}))};function Eo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Lce(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function kO(e){let t,n,r;e.length!==2?(t=Eo,n=(c,f)=>Eo(e(c),f),r=(c,f)=>e(c)-f):(t=e===Eo||e===Lce?e:Ice,n=e,r=e);function a(c,f,d=0,m=c.length){if(d<m){if(t(f,f)!==0)return m;do{const h=d+m>>>1;n(c[h],f)<0?d=h+1:m=h}while(d<m)}return d}function o(c,f,d=0,m=c.length){if(d<m){if(t(f,f)!==0)return m;do{const h=d+m>>>1;n(c[h],f)<=0?d=h+1:m=h}while(d<m)}return d}function l(c,f,d=0,m=c.length){const h=a(c,f,d,m-1);return h>d&&r(c[h-1],f)>-r(c[h],f)?h-1:h}return{left:a,center:l,right:o}}function Ice(){return 0}function U6(e){return e===null?NaN:+e}function*Bce(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const Uce=kO(Eo),Cd=Uce.right;kO(U6).center;class BD extends Map{constructor(t,n=Fce){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(UD(this,t))}has(t){return super.has(UD(this,t))}set(t,n){return super.set(qce(this,t),n)}delete(t){return super.delete(Hce(this,t))}}function UD({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function qce({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Hce({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Fce(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Vce(e=Eo){if(e===Eo)return q6;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 q6(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Gce=Math.sqrt(50),Yce=Math.sqrt(10),Wce=Math.sqrt(2);function mm(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>=Gce?10:o>=Yce?5:o>=Wce?2:1;let c,f,d;return a<0?(d=Math.pow(10,-a)/l,c=Math.round(e*d),f=Math.round(t*d),c/d<e&&++c,f/d>t&&--f,d=-d):(d=Math.pow(10,a)*l,c=Math.round(e/d),f=Math.round(t/d),c*d<e&&++c,f*d>t&&--f),f<c&&.5<=n&&n<2?mm(e,t,n*2):[c,f,d]}function XS(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?mm(t,e,n):mm(e,t,n);if(!(o>=a))return[];const c=o-a+1,f=new Array(c);if(r)if(l<0)for(let d=0;d<c;++d)f[d]=(o-d)/-l;else for(let d=0;d<c;++d)f[d]=(o-d)*l;else if(l<0)for(let d=0;d<c;++d)f[d]=(a+d)/-l;else for(let d=0;d<c;++d)f[d]=(a+d)*l;return f}function QS(e,t,n){return t=+t,e=+e,n=+n,mm(e,t,n)[2]}function JS(e,t,n){t=+t,e=+e,n=+n;const r=t<e,a=r?QS(t,e,n):QS(e,t,n);return(r?-1:1)*(a<0?1/-a:a)}function qD(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function HD(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function H6(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?q6:Vce(a);r>n;){if(r-n>600){const f=r-n+1,d=t-n+1,m=Math.log(f),h=.5*Math.exp(2*m/3),g=.5*Math.sqrt(m*h*(f-h)/f)*(d-f/2<0?-1:1),x=Math.max(n,Math.floor(t-d*h/f+g)),A=Math.min(r,Math.floor(t+(f-d)*h/f+g));H6(e,t,x,A,a)}const o=e[t];let l=n,c=r;for(Uu(e,n,t),a(e[r],o)>0&&Uu(e,n,r);l<c;){for(Uu(e,l,c),++l,--c;a(e[l],o)<0;)++l;for(;a(e[c],o)>0;)--c}a(e[n],o)===0?Uu(e,n,c):(++c,Uu(e,c,r)),c<=t&&(n=c+1),t<=c&&(r=c-1)}return e}function Uu(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Kce(e,t,n){if(e=Float64Array.from(Bce(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return HD(e);if(t>=1)return qD(e);var r,a=(r-1)*t,o=Math.floor(a),l=qD(H6(e,o).subarray(0,o+1)),c=HD(e.subarray(o+1));return l+(c-l)*(a-o)}}function Zce(e,t,n=U6){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),c=+n(e[o+1],o+1,e);return l+(c-l)*(a-o)}}function Xce(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 va(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Vi(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 e_=Symbol("implicit");function $O(){var e=new BD,t=[],n=[],r=e_;function a(o){let l=e.get(o);if(l===void 0){if(r!==e_)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 BD;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 $O(t,n).unknown(r)},va.apply(a,arguments),a}function Of(){var e=$O().unknown(void 0),t=e.domain,n=e.range,r=0,a=1,o,l,c=!1,f=0,d=0,m=.5;delete e.unknown;function h(){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),c&&(o=Math.floor(o)),A+=(S-A-o*(g-f))*m,l=o*(1-f),c&&(A=Math.round(A),l=Math.round(l));var w=Xce(g).map(function(O){return A+o*O});return n(x?w.reverse():w)}return e.domain=function(g){return arguments.length?(t(g),h()):t()},e.range=function(g){return arguments.length?([r,a]=g,r=+r,a=+a,h()):[r,a]},e.rangeRound=function(g){return[r,a]=g,r=+r,a=+a,c=!0,h()},e.bandwidth=function(){return l},e.step=function(){return o},e.round=function(g){return arguments.length?(c=!!g,h()):c},e.padding=function(g){return arguments.length?(f=Math.min(1,d=+g),h()):f},e.paddingInner=function(g){return arguments.length?(f=Math.min(1,g),h()):f},e.paddingOuter=function(g){return arguments.length?(d=+g,h()):d},e.align=function(g){return arguments.length?(m=Math.max(0,Math.min(1,g)),h()):m},e.copy=function(){return Of(t(),[r,a]).round(c).paddingInner(f).paddingOuter(d).align(m)},va.apply(h(),arguments)}function F6(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return F6(t())},e}function sf(){return F6(Of.apply(null,arguments).paddingInner(1))}function zO(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function V6(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Rd(){}var Ef=.7,vm=1/Ef,Gl="\\s*([+-]?\\d+)\\s*",jf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Qce=/^#([0-9a-f]{3,8})$/,Jce=new RegExp(`^rgb\\(${Gl},${Gl},${Gl}\\)$`),eue=new RegExp(`^rgb\\(${Xa},${Xa},${Xa}\\)$`),tue=new RegExp(`^rgba\\(${Gl},${Gl},${Gl},${jf}\\)$`),nue=new RegExp(`^rgba\\(${Xa},${Xa},${Xa},${jf}\\)$`),rue=new RegExp(`^hsl\\(${jf},${Xa},${Xa}\\)$`),aue=new RegExp(`^hsla\\(${jf},${Xa},${Xa},${jf}\\)$`),FD={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};zO(Rd,Tf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:VD,formatHex:VD,formatHex8:iue,formatHsl:oue,formatRgb:GD,toString:GD});function VD(){return this.rgb().formatHex()}function iue(){return this.rgb().formatHex8()}function oue(){return G6(this).formatHsl()}function GD(){return this.rgb().formatRgb()}function Tf(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Qce.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?YD(t):n===3?new br(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?cp(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?cp(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=Jce.exec(e))?new br(t[1],t[2],t[3],1):(t=eue.exec(e))?new br(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=tue.exec(e))?cp(t[1],t[2],t[3],t[4]):(t=nue.exec(e))?cp(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=rue.exec(e))?ZD(t[1],t[2]/100,t[3]/100,1):(t=aue.exec(e))?ZD(t[1],t[2]/100,t[3]/100,t[4]):FD.hasOwnProperty(e)?YD(FD[e]):e==="transparent"?new br(NaN,NaN,NaN,0):null}function YD(e){return new br(e>>16&255,e>>8&255,e&255,1)}function cp(e,t,n,r){return r<=0&&(e=t=n=NaN),new br(e,t,n,r)}function sue(e){return e instanceof Rd||(e=Tf(e)),e?(e=e.rgb(),new br(e.r,e.g,e.b,e.opacity)):new br}function t_(e,t,n,r){return arguments.length===1?sue(e):new br(e,t,n,r??1)}function br(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}zO(br,t_,V6(Rd,{brighter(e){return e=e==null?vm:Math.pow(vm,e),new br(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ef:Math.pow(Ef,e),new br(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new br(bs(this.r),bs(this.g),bs(this.b),gm(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:WD,formatHex:WD,formatHex8:lue,formatRgb:KD,toString:KD}));function WD(){return`#${ms(this.r)}${ms(this.g)}${ms(this.b)}`}function lue(){return`#${ms(this.r)}${ms(this.g)}${ms(this.b)}${ms((isNaN(this.opacity)?1:this.opacity)*255)}`}function KD(){const e=gm(this.opacity);return`${e===1?"rgb(":"rgba("}${bs(this.r)}, ${bs(this.g)}, ${bs(this.b)}${e===1?")":`, ${e})`}`}function gm(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function bs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ms(e){return e=bs(e),(e<16?"0":"")+e.toString(16)}function ZD(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Oa(e,t,n,r)}function G6(e){if(e instanceof Oa)return new Oa(e.h,e.s,e.l,e.opacity);if(e instanceof Rd||(e=Tf(e)),!e)return new Oa;if(e instanceof Oa)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,c=o-a,f=(o+a)/2;return c?(t===o?l=(n-r)/c+(n<r)*6:n===o?l=(r-t)/c+2:l=(t-n)/c+4,c/=f<.5?o+a:2-o-a,l*=60):c=f>0&&f<1?0:l,new Oa(l,c,f,e.opacity)}function cue(e,t,n,r){return arguments.length===1?G6(e):new Oa(e,t,n,r??1)}function Oa(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}zO(Oa,cue,V6(Rd,{brighter(e){return e=e==null?vm:Math.pow(vm,e),new Oa(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ef:Math.pow(Ef,e),new Oa(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 br(r1(e>=240?e-240:e+120,a,r),r1(e,a,r),r1(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Oa(XD(this.h),up(this.s),up(this.l),gm(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=gm(this.opacity);return`${e===1?"hsl(":"hsla("}${XD(this.h)}, ${up(this.s)*100}%, ${up(this.l)*100}%${e===1?")":`, ${e})`}`}}));function XD(e){return e=(e||0)%360,e<0?e+360:e}function up(e){return Math.max(0,Math.min(1,e||0))}function r1(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 LO=e=>()=>e;function uue(e,t){return function(n){return e+n*t}}function fue(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 due(e){return(e=+e)==1?Y6:function(t,n){return n-t?fue(t,n,e):LO(isNaN(t)?n:t)}}function Y6(e,t){var n=t-e;return n?uue(e,n):LO(isNaN(e)?t:e)}const QD=(function e(t){var n=due(t);function r(a,o){var l=n((a=t_(a)).r,(o=t_(o)).r),c=n(a.g,o.g),f=n(a.b,o.b),d=Y6(a.opacity,o.opacity);return function(m){return a.r=l(m),a.g=c(m),a.b=f(m),a.opacity=d(m),a+""}}return r.gamma=e,r})(1);function hue(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 pue(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function mue(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]=Bc(e[l],t[l]);for(;l<n;++l)o[l]=t[l];return function(c){for(l=0;l<r;++l)o[l]=a[l](c);return o}}function vue(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function ym(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function gue(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]=Bc(e[a],t[a]):r[a]=t[a];return function(o){for(a in n)r[a]=n[a](o);return r}}var n_=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,a1=new RegExp(n_.source,"g");function yue(e){return function(){return e}}function bue(e){return function(t){return e(t)+""}}function xue(e,t){var n=n_.lastIndex=a1.lastIndex=0,r,a,o,l=-1,c=[],f=[];for(e=e+"",t=t+"";(r=n_.exec(e))&&(a=a1.exec(t));)(o=a.index)>n&&(o=t.slice(n,o),c[l]?c[l]+=o:c[++l]=o),(r=r[0])===(a=a[0])?c[l]?c[l]+=a:c[++l]=a:(c[++l]=null,f.push({i:l,x:ym(r,a)})),n=a1.lastIndex;return n<t.length&&(o=t.slice(n),c[l]?c[l]+=o:c[++l]=o),c.length<2?f[0]?bue(f[0].x):yue(t):(t=f.length,function(d){for(var m=0,h;m<t;++m)c[(h=f[m]).i]=h.x(d);return c.join("")})}function Bc(e,t){var n=typeof t,r;return t==null||n==="boolean"?LO(t):(n==="number"?ym:n==="string"?(r=Tf(t))?(t=r,QD):xue:t instanceof Tf?QD:t instanceof Date?vue:pue(t)?hue:Array.isArray(t)?mue:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?gue:ym)(e,t)}function IO(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function wue(e,t){t===void 0&&(t=e,e=Bc);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 c=Math.max(0,Math.min(r-1,Math.floor(l*=r)));return o[c](l-c)}}function Sue(e){return function(){return e}}function bm(e){return+e}var JD=[0,1];function lr(e){return e}function r_(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Sue(isNaN(t)?NaN:.5)}function _ue(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Aue(e,t,n){var r=e[0],a=e[1],o=t[0],l=t[1];return a<r?(r=r_(a,r),o=n(l,o)):(r=r_(r,a),o=n(o,l)),function(c){return o(r(c))}}function Oue(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]=r_(e[l],e[l+1]),o[l]=n(t[l],t[l+1]);return function(c){var f=Cd(e,c,1,r)-1;return o[f](a[f](c))}}function Nd(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Zv(){var e=JD,t=JD,n=Bc,r,a,o,l=lr,c,f,d;function m(){var g=Math.min(e.length,t.length);return l!==lr&&(l=_ue(e[0],e[g-1])),c=g>2?Oue:Aue,f=d=null,h}function h(g){return g==null||isNaN(g=+g)?o:(f||(f=c(e.map(r),t,n)))(r(l(g)))}return h.invert=function(g){return l(a((d||(d=c(t,e.map(r),ym)))(g)))},h.domain=function(g){return arguments.length?(e=Array.from(g,bm),m()):e.slice()},h.range=function(g){return arguments.length?(t=Array.from(g),m()):t.slice()},h.rangeRound=function(g){return t=Array.from(g),n=IO,m()},h.clamp=function(g){return arguments.length?(l=g?!0:lr,m()):l!==lr},h.interpolate=function(g){return arguments.length?(n=g,m()):n},h.unknown=function(g){return arguments.length?(o=g,h):o},function(g,x){return r=g,a=x,m()}}function BO(){return Zv()(lr,lr)}function Eue(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function xm(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 ic(e){return e=xm(Math.abs(e)),e?e[1]:NaN}function jue(e,t){return function(n,r){for(var a=n.length,o=[],l=0,c=e[0],f=0;a>0&&c>0&&(f+c+1>r&&(c=Math.max(1,r-f)),o.push(n.substring(a-=c,a+c)),!((f+=c+1)>r));)c=e[l=(l+1)%e.length];return o.reverse().join(t)}}function Tue(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Cue=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Cf(e){if(!(t=Cue.exec(e)))throw new Error("invalid format: "+e);var t;return new UO({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]})}Cf.prototype=UO.prototype;function UO(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+""}UO.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 Rue(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 wm;function Nue(e,t){var n=xm(e,t);if(!n)return wm=void 0,e.toPrecision(t);var r=n[0],a=n[1],o=a-(wm=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")+xm(e,Math.max(0,t+o-1))[0]}function ek(e,t){var n=xm(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 tk={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Eue,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)=>ek(e*100,t),r:ek,s:Nue,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function nk(e){return e}var rk=Array.prototype.map,ak=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Mue(e){var t=e.grouping===void 0||e.thousands===void 0?nk:jue(rk.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?nk:Tue(rk.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function d(h,g){h=Cf(h);var x=h.fill,A=h.align,S=h.sign,w=h.symbol,O=h.zero,E=h.width,j=h.comma,R=h.precision,T=h.trim,C=h.type;C==="n"?(j=!0,C="g"):tk[C]||(R===void 0&&(R=12),T=!0,C="g"),(O||x==="0"&&A==="=")&&(O=!0,x="0",A="=");var N=(g&&g.prefix!==void 0?g.prefix:"")+(w==="$"?n:w==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():""),D=(w==="$"?r:/[%p]/.test(C)?l:"")+(g&&g.suffix!==void 0?g.suffix:""),z=tk[C],V=/[defgprs%]/.test(C);R=R===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,R)):Math.max(0,Math.min(20,R));function U(P){var B=N,q=D,Y,$,G;if(C==="c")q=z(P)+q,P="";else{P=+P;var F=P<0||1/P<0;if(P=isNaN(P)?f:z(Math.abs(P),R),T&&(P=Rue(P)),F&&+P==0&&S!=="+"&&(F=!1),B=(F?S==="("?S:c:S==="-"||S==="("?"":S)+B,q=(C==="s"&&!isNaN(P)&&wm!==void 0?ak[8+wm/3]:"")+q+(F&&S==="("?")":""),V){for(Y=-1,$=P.length;++Y<$;)if(G=P.charCodeAt(Y),48>G||G>57){q=(G===46?a+P.slice(Y+1):P.slice(Y))+q,P=P.slice(0,Y);break}}}j&&!O&&(P=t(P,1/0));var K=B.length+P.length+q.length,ne=K<E?new Array(E-K+1).join(x):"";switch(j&&O&&(P=t(ne+P,ne.length?E-q.length:1/0),ne=""),A){case"<":P=B+P+q+ne;break;case"=":P=B+ne+P+q;break;case"^":P=ne.slice(0,K=ne.length>>1)+B+P+q+ne.slice(K);break;default:P=ne+B+P+q;break}return o(P)}return U.toString=function(){return h+""},U}function m(h,g){var x=Math.max(-8,Math.min(8,Math.floor(ic(g)/3)))*3,A=Math.pow(10,-x),S=d((h=Cf(h),h.type="f",h),{suffix:ak[8+x/3]});return function(w){return S(A*w)}}return{format:d,formatPrefix:m}}var fp,qO,W6;Pue({thousands:",",grouping:[3],currency:["$",""]});function Pue(e){return fp=Mue(e),qO=fp.format,W6=fp.formatPrefix,fp}function Due(e){return Math.max(0,-ic(Math.abs(e)))}function kue(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ic(t)/3)))*3-ic(Math.abs(e)))}function $ue(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ic(t)-ic(e))+1}function K6(e,t,n,r){var a=JS(e,t,n),o;switch(r=Cf(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=kue(a,l))&&(r.precision=o),W6(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=$ue(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Due(a))&&(r.precision=o-(r.type==="%")*2);break}}return qO(r)}function Io(e){var t=e.domain;return e.ticks=function(n){var r=t();return XS(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return K6(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],c=r[o],f,d,m=10;for(c<l&&(d=l,l=c,c=d,d=a,a=o,o=d);m-- >0;){if(d=QS(l,c,n),d===f)return r[a]=l,r[o]=c,t(r);if(d>0)l=Math.floor(l/d)*d,c=Math.ceil(c/d)*d;else if(d<0)l=Math.ceil(l*d)/d,c=Math.floor(c*d)/d;else break;f=d}return e},e}function Sm(){var e=BO();return e.copy=function(){return Nd(e,Sm())},va.apply(e,arguments),Io(e)}function Z6(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,bm),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Z6(e).unknown(t)},e=arguments.length?Array.from(e,bm):[0,1],Io(n)}function X6(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 ik(e){return Math.log(e)}function ok(e){return Math.exp(e)}function zue(e){return-Math.log(-e)}function Lue(e){return-Math.exp(-e)}function Iue(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Bue(e){return e===10?Iue:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Uue(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 sk(e){return(t,n)=>-e(-t,n)}function HO(e){const t=e(ik,ok),n=t.domain;let r=10,a,o;function l(){return a=Uue(r),o=Bue(r),n()[0]<0?(a=sk(a),o=sk(o),e(zue,Lue)):e(ik,ok),t}return t.base=function(c){return arguments.length?(r=+c,l()):r},t.domain=function(c){return arguments.length?(n(c),l()):n()},t.ticks=c=>{const f=n();let d=f[0],m=f[f.length-1];const h=m<d;h&&([d,m]=[m,d]);let g=a(d),x=a(m),A,S;const w=c==null?10:+c;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=XS(d,m,w))}else O=XS(g,x,Math.min(x-g,w)).map(o);return h?O.reverse():O},t.tickFormat=(c,f)=>{if(c==null&&(c=10),f==null&&(f=r===10?"s":","),typeof f!="function"&&(!(r%1)&&(f=Cf(f)).precision==null&&(f.trim=!0),f=qO(f)),c===1/0)return f;const d=Math.max(1,r*c/t.ticks().length);return m=>{let h=m/o(Math.round(a(m)));return h*r<r-.5&&(h*=r),h<=d?f(m):""}},t.nice=()=>n(X6(n(),{floor:c=>o(Math.floor(a(c))),ceil:c=>o(Math.ceil(a(c)))})),t}function Q6(){const e=HO(Zv()).domain([1,10]);return e.copy=()=>Nd(e,Q6()).base(e.base()),va.apply(e,arguments),e}function lk(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function ck(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function FO(e){var t=1,n=e(lk(t),ck(t));return n.constant=function(r){return arguments.length?e(lk(t=+r),ck(t)):t},Io(n)}function J6(){var e=FO(Zv());return e.copy=function(){return Nd(e,J6()).constant(e.constant())},va.apply(e,arguments)}function uk(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function que(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Hue(e){return e<0?-e*e:e*e}function VO(e){var t=e(lr,lr),n=1;function r(){return n===1?e(lr,lr):n===.5?e(que,Hue):e(uk(n),uk(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},Io(t)}function GO(){var e=VO(Zv());return e.copy=function(){return Nd(e,GO()).exponent(e.exponent())},va.apply(e,arguments),e}function Fue(){return GO.apply(null,arguments).exponent(.5)}function fk(e){return Math.sign(e)*e*e}function Vue(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function e8(){var e=BO(),t=[0,1],n=!1,r;function a(o){var l=Vue(e(o));return isNaN(l)?r:n?Math.round(l):l}return a.invert=function(o){return e.invert(fk(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,bm)).map(fk)),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 e8(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},va.apply(a,arguments),Io(a)}function t8(){var e=[],t=[],n=[],r;function a(){var l=0,c=Math.max(1,t.length);for(n=new Array(c-1);++l<c;)n[l-1]=Zce(e,l/c);return o}function o(l){return l==null||isNaN(l=+l)?r:t[Cd(n,l)]}return o.invertExtent=function(l){var c=t.indexOf(l);return c<0?[NaN,NaN]:[c>0?n[c-1]:e[0],c<n.length?n[c]:e[e.length-1]]},o.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let c of l)c!=null&&!isNaN(c=+c)&&e.push(c);return e.sort(Eo),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 t8().domain(e).range(t).unknown(r)},va.apply(o,arguments)}function n8(){var e=0,t=1,n=1,r=[.5],a=[0,1],o;function l(f){return f!=null&&f<=f?a[Cd(r,f,0,n)]:o}function c(){var f=-1;for(r=new Array(n);++f<n;)r[f]=((f+1)*t-(f-n)*e)/(n+1);return l}return l.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,c()):[e,t]},l.range=function(f){return arguments.length?(n=(a=Array.from(f)).length-1,c()):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 n8().domain([e,t]).range(a).unknown(o)},va.apply(Io(l),arguments)}function r8(){var e=[.5],t=[0,1],n,r=1;function a(o){return o!=null&&o<=o?t[Cd(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 r8().domain(e).range(t).unknown(n)},va.apply(a,arguments)}const i1=new Date,o1=new Date;function Pn(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),c=a.ceil(o);return o-l<c-o?l:c},a.offset=(o,l)=>(t(o=new Date(+o),l==null?1:Math.floor(l)),o),a.range=(o,l,c)=>{const f=[];if(o=a.ceil(o),c=c==null?1:Math.floor(c),!(o<l)||!(c>0))return f;let d;do f.push(d=new Date(+o)),t(o,c),e(o);while(d<o&&o<l);return f},a.filter=o=>Pn(l=>{if(l>=l)for(;e(l),!o(l);)l.setTime(l-1)},(l,c)=>{if(l>=l)if(c<0)for(;++c<=0;)for(;t(l,-1),!o(l););else for(;--c>=0;)for(;t(l,1),!o(l););}),n&&(a.count=(o,l)=>(i1.setTime(+o),o1.setTime(+l),e(i1),e(o1),Math.floor(n(i1,o1))),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 _m=Pn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);_m.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Pn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):_m);_m.range;const Ei=1e3,la=Ei*60,ji=la*60,zi=ji*24,YO=zi*7,dk=zi*30,s1=zi*365,vs=Pn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ei)},(e,t)=>(t-e)/Ei,e=>e.getUTCSeconds());vs.range;const WO=Pn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ei)},(e,t)=>{e.setTime(+e+t*la)},(e,t)=>(t-e)/la,e=>e.getMinutes());WO.range;const KO=Pn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*la)},(e,t)=>(t-e)/la,e=>e.getUTCMinutes());KO.range;const ZO=Pn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ei-e.getMinutes()*la)},(e,t)=>{e.setTime(+e+t*ji)},(e,t)=>(t-e)/ji,e=>e.getHours());ZO.range;const XO=Pn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ji)},(e,t)=>(t-e)/ji,e=>e.getUTCHours());XO.range;const Md=Pn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*la)/zi,e=>e.getDate()-1);Md.range;const Xv=Pn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/zi,e=>e.getUTCDate()-1);Xv.range;const a8=Pn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/zi,e=>Math.floor(e/zi));a8.range;function Bs(e){return Pn(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())*la)/YO)}const Qv=Bs(0),Am=Bs(1),Gue=Bs(2),Yue=Bs(3),oc=Bs(4),Wue=Bs(5),Kue=Bs(6);Qv.range;Am.range;Gue.range;Yue.range;oc.range;Wue.range;Kue.range;function Us(e){return Pn(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)/YO)}const Jv=Us(0),Om=Us(1),Zue=Us(2),Xue=Us(3),sc=Us(4),Que=Us(5),Jue=Us(6);Jv.range;Om.range;Zue.range;Xue.range;sc.range;Que.range;Jue.range;const QO=Pn(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());QO.range;const JO=Pn(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());JO.range;const Li=Pn(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());Li.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pn(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)});Li.range;const Ii=Pn(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());Ii.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pn(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)});Ii.range;function i8(e,t,n,r,a,o){const l=[[vs,1,Ei],[vs,5,5*Ei],[vs,15,15*Ei],[vs,30,30*Ei],[o,1,la],[o,5,5*la],[o,15,15*la],[o,30,30*la],[a,1,ji],[a,3,3*ji],[a,6,6*ji],[a,12,12*ji],[r,1,zi],[r,2,2*zi],[n,1,YO],[t,1,dk],[t,3,3*dk],[e,1,s1]];function c(d,m,h){const g=m<d;g&&([d,m]=[m,d]);const x=h&&typeof h.range=="function"?h:f(d,m,h),A=x?x.range(d,+m+1):[];return g?A.reverse():A}function f(d,m,h){const g=Math.abs(m-d)/h,x=kO(([,,w])=>w).right(l,g);if(x===l.length)return e.every(JS(d/s1,m/s1,h));if(x===0)return _m.every(Math.max(JS(d,m,h),1));const[A,S]=l[g/l[x-1][2]<l[x][2]/g?x-1:x];return A.every(S)}return[c,f]}const[efe,tfe]=i8(Ii,JO,Jv,a8,XO,KO),[nfe,rfe]=i8(Li,QO,Qv,Md,ZO,WO);function l1(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 c1(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 qu(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function afe(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,o=e.days,l=e.shortDays,c=e.months,f=e.shortMonths,d=Hu(a),m=Fu(a),h=Hu(o),g=Fu(o),x=Hu(l),A=Fu(l),S=Hu(c),w=Fu(c),O=Hu(f),E=Fu(f),j={a:G,A:F,b:K,B:ne,c:null,d:yk,e:yk,f:jfe,g:zfe,G:Ife,H:Afe,I:Ofe,j:Efe,L:o8,m:Tfe,M:Cfe,p:I,q:Z,Q:wk,s:Sk,S:Rfe,u:Nfe,U:Mfe,V:Pfe,w:Dfe,W:kfe,x:null,X:null,y:$fe,Y:Lfe,Z:Bfe,"%":xk},R={a:Q,A:fe,b:le,B:Se,c:null,d:bk,e:bk,f:Ffe,g:ede,G:nde,H:Ufe,I:qfe,j:Hfe,L:l8,m:Vfe,M:Gfe,p:ve,q:xe,Q:wk,s:Sk,S:Yfe,u:Wfe,U:Kfe,V:Zfe,w:Xfe,W:Qfe,x:null,X:null,y:Jfe,Y:tde,Z:rde,"%":xk},T={a:V,A:U,b:P,B,c:q,d:vk,e:vk,f:xfe,g:mk,G:pk,H:gk,I:gk,j:vfe,L:bfe,m:mfe,M:gfe,p:z,q:pfe,Q:Sfe,s:_fe,S:yfe,u:cfe,U:ufe,V:ffe,w:lfe,W:dfe,x:Y,X:$,y:mk,Y:pk,Z:hfe,"%":wfe};j.x=C(n,j),j.X=C(r,j),j.c=C(t,j),R.x=C(n,R),R.X=C(r,R),R.c=C(t,R);function C(ce,Ae){return function(Oe){var oe=[],qe=-1,De=0,Je=ce.length,Ye,at,jt;for(Oe instanceof Date||(Oe=new Date(+Oe));++qe<Je;)ce.charCodeAt(qe)===37&&(oe.push(ce.slice(De,qe)),(at=hk[Ye=ce.charAt(++qe)])!=null?Ye=ce.charAt(++qe):at=Ye==="e"?" ":"0",(jt=Ae[Ye])&&(Ye=jt(Oe,at)),oe.push(Ye),De=qe+1);return oe.push(ce.slice(De,qe)),oe.join("")}}function N(ce,Ae){return function(Oe){var oe=qu(1900,void 0,1),qe=D(oe,ce,Oe+="",0),De,Je;if(qe!=Oe.length)return null;if("Q"in oe)return new Date(oe.Q);if("s"in oe)return new Date(oe.s*1e3+("L"in oe?oe.L:0));if(Ae&&!("Z"in oe)&&(oe.Z=0),"p"in oe&&(oe.H=oe.H%12+oe.p*12),oe.m===void 0&&(oe.m="q"in oe?oe.q:0),"V"in oe){if(oe.V<1||oe.V>53)return null;"w"in oe||(oe.w=1),"Z"in oe?(De=c1(qu(oe.y,0,1)),Je=De.getUTCDay(),De=Je>4||Je===0?Om.ceil(De):Om(De),De=Xv.offset(De,(oe.V-1)*7),oe.y=De.getUTCFullYear(),oe.m=De.getUTCMonth(),oe.d=De.getUTCDate()+(oe.w+6)%7):(De=l1(qu(oe.y,0,1)),Je=De.getDay(),De=Je>4||Je===0?Am.ceil(De):Am(De),De=Md.offset(De,(oe.V-1)*7),oe.y=De.getFullYear(),oe.m=De.getMonth(),oe.d=De.getDate()+(oe.w+6)%7)}else("W"in oe||"U"in oe)&&("w"in oe||(oe.w="u"in oe?oe.u%7:"W"in oe?1:0),Je="Z"in oe?c1(qu(oe.y,0,1)).getUTCDay():l1(qu(oe.y,0,1)).getDay(),oe.m=0,oe.d="W"in oe?(oe.w+6)%7+oe.W*7-(Je+5)%7:oe.w+oe.U*7-(Je+6)%7);return"Z"in oe?(oe.H+=oe.Z/100|0,oe.M+=oe.Z%100,c1(oe)):l1(oe)}}function D(ce,Ae,Oe,oe){for(var qe=0,De=Ae.length,Je=Oe.length,Ye,at;qe<De;){if(oe>=Je)return-1;if(Ye=Ae.charCodeAt(qe++),Ye===37){if(Ye=Ae.charAt(qe++),at=T[Ye in hk?Ae.charAt(qe++):Ye],!at||(oe=at(ce,Oe,oe))<0)return-1}else if(Ye!=Oe.charCodeAt(oe++))return-1}return oe}function z(ce,Ae,Oe){var oe=d.exec(Ae.slice(Oe));return oe?(ce.p=m.get(oe[0].toLowerCase()),Oe+oe[0].length):-1}function V(ce,Ae,Oe){var oe=x.exec(Ae.slice(Oe));return oe?(ce.w=A.get(oe[0].toLowerCase()),Oe+oe[0].length):-1}function U(ce,Ae,Oe){var oe=h.exec(Ae.slice(Oe));return oe?(ce.w=g.get(oe[0].toLowerCase()),Oe+oe[0].length):-1}function P(ce,Ae,Oe){var oe=O.exec(Ae.slice(Oe));return oe?(ce.m=E.get(oe[0].toLowerCase()),Oe+oe[0].length):-1}function B(ce,Ae,Oe){var oe=S.exec(Ae.slice(Oe));return oe?(ce.m=w.get(oe[0].toLowerCase()),Oe+oe[0].length):-1}function q(ce,Ae,Oe){return D(ce,t,Ae,Oe)}function Y(ce,Ae,Oe){return D(ce,n,Ae,Oe)}function $(ce,Ae,Oe){return D(ce,r,Ae,Oe)}function G(ce){return l[ce.getDay()]}function F(ce){return o[ce.getDay()]}function K(ce){return f[ce.getMonth()]}function ne(ce){return c[ce.getMonth()]}function I(ce){return a[+(ce.getHours()>=12)]}function Z(ce){return 1+~~(ce.getMonth()/3)}function Q(ce){return l[ce.getUTCDay()]}function fe(ce){return o[ce.getUTCDay()]}function le(ce){return f[ce.getUTCMonth()]}function Se(ce){return c[ce.getUTCMonth()]}function ve(ce){return a[+(ce.getUTCHours()>=12)]}function xe(ce){return 1+~~(ce.getUTCMonth()/3)}return{format:function(ce){var Ae=C(ce+="",j);return Ae.toString=function(){return ce},Ae},parse:function(ce){var Ae=N(ce+="",!1);return Ae.toString=function(){return ce},Ae},utcFormat:function(ce){var Ae=C(ce+="",R);return Ae.toString=function(){return ce},Ae},utcParse:function(ce){var Ae=N(ce+="",!0);return Ae.toString=function(){return ce},Ae}}}var hk={"-":"",_:" ",0:"0"},In=/^\s*\d+/,ife=/^%/,ofe=/[\\^$*+?|[\]().{}]/g;function At(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 sfe(e){return e.replace(ofe,"\\$&")}function Hu(e){return new RegExp("^(?:"+e.map(sfe).join("|")+")","i")}function Fu(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function lfe(e,t,n){var r=In.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function cfe(e,t,n){var r=In.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function ufe(e,t,n){var r=In.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function ffe(e,t,n){var r=In.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function dfe(e,t,n){var r=In.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function pk(e,t,n){var r=In.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function mk(e,t,n){var r=In.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function hfe(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 pfe(e,t,n){var r=In.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function mfe(e,t,n){var r=In.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function vk(e,t,n){var r=In.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function vfe(e,t,n){var r=In.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function gk(e,t,n){var r=In.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function gfe(e,t,n){var r=In.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function yfe(e,t,n){var r=In.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function bfe(e,t,n){var r=In.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function xfe(e,t,n){var r=In.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function wfe(e,t,n){var r=ife.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Sfe(e,t,n){var r=In.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function _fe(e,t,n){var r=In.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function yk(e,t){return At(e.getDate(),t,2)}function Afe(e,t){return At(e.getHours(),t,2)}function Ofe(e,t){return At(e.getHours()%12||12,t,2)}function Efe(e,t){return At(1+Md.count(Li(e),e),t,3)}function o8(e,t){return At(e.getMilliseconds(),t,3)}function jfe(e,t){return o8(e,t)+"000"}function Tfe(e,t){return At(e.getMonth()+1,t,2)}function Cfe(e,t){return At(e.getMinutes(),t,2)}function Rfe(e,t){return At(e.getSeconds(),t,2)}function Nfe(e){var t=e.getDay();return t===0?7:t}function Mfe(e,t){return At(Qv.count(Li(e)-1,e),t,2)}function s8(e){var t=e.getDay();return t>=4||t===0?oc(e):oc.ceil(e)}function Pfe(e,t){return e=s8(e),At(oc.count(Li(e),e)+(Li(e).getDay()===4),t,2)}function Dfe(e){return e.getDay()}function kfe(e,t){return At(Am.count(Li(e)-1,e),t,2)}function $fe(e,t){return At(e.getFullYear()%100,t,2)}function zfe(e,t){return e=s8(e),At(e.getFullYear()%100,t,2)}function Lfe(e,t){return At(e.getFullYear()%1e4,t,4)}function Ife(e,t){var n=e.getDay();return e=n>=4||n===0?oc(e):oc.ceil(e),At(e.getFullYear()%1e4,t,4)}function Bfe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+At(t/60|0,"0",2)+At(t%60,"0",2)}function bk(e,t){return At(e.getUTCDate(),t,2)}function Ufe(e,t){return At(e.getUTCHours(),t,2)}function qfe(e,t){return At(e.getUTCHours()%12||12,t,2)}function Hfe(e,t){return At(1+Xv.count(Ii(e),e),t,3)}function l8(e,t){return At(e.getUTCMilliseconds(),t,3)}function Ffe(e,t){return l8(e,t)+"000"}function Vfe(e,t){return At(e.getUTCMonth()+1,t,2)}function Gfe(e,t){return At(e.getUTCMinutes(),t,2)}function Yfe(e,t){return At(e.getUTCSeconds(),t,2)}function Wfe(e){var t=e.getUTCDay();return t===0?7:t}function Kfe(e,t){return At(Jv.count(Ii(e)-1,e),t,2)}function c8(e){var t=e.getUTCDay();return t>=4||t===0?sc(e):sc.ceil(e)}function Zfe(e,t){return e=c8(e),At(sc.count(Ii(e),e)+(Ii(e).getUTCDay()===4),t,2)}function Xfe(e){return e.getUTCDay()}function Qfe(e,t){return At(Om.count(Ii(e)-1,e),t,2)}function Jfe(e,t){return At(e.getUTCFullYear()%100,t,2)}function ede(e,t){return e=c8(e),At(e.getUTCFullYear()%100,t,2)}function tde(e,t){return At(e.getUTCFullYear()%1e4,t,4)}function nde(e,t){var n=e.getUTCDay();return e=n>=4||n===0?sc(e):sc.ceil(e),At(e.getUTCFullYear()%1e4,t,4)}function rde(){return"+0000"}function xk(){return"%"}function wk(e){return+e}function Sk(e){return Math.floor(+e/1e3)}var Ml,u8,f8;ade({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 ade(e){return Ml=afe(e),u8=Ml.format,Ml.parse,f8=Ml.utcFormat,Ml.utcParse,Ml}function ide(e){return new Date(e)}function ode(e){return e instanceof Date?+e:+new Date(+e)}function eE(e,t,n,r,a,o,l,c,f,d){var m=BO(),h=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"),j=d("%B"),R=d("%Y");function T(C){return(f(C)<C?x:c(C)<C?A:l(C)<C?S:o(C)<C?w:r(C)<C?a(C)<C?O:E:n(C)<C?j:R)(C)}return m.invert=function(C){return new Date(h(C))},m.domain=function(C){return arguments.length?g(Array.from(C,ode)):g().map(ide)},m.ticks=function(C){var N=g();return e(N[0],N[N.length-1],C??10)},m.tickFormat=function(C,N){return N==null?T:d(N)},m.nice=function(C){var N=g();return(!C||typeof C.range!="function")&&(C=t(N[0],N[N.length-1],C??10)),C?g(X6(N,C)):m},m.copy=function(){return Nd(m,eE(e,t,n,r,a,o,l,c,f,d))},m}function sde(){return va.apply(eE(nfe,rfe,Li,QO,Qv,Md,ZO,WO,vs,u8).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function lde(){return va.apply(eE(efe,tfe,Ii,JO,Jv,Xv,XO,KO,vs,f8).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function eg(){var e=0,t=1,n,r,a,o,l=lr,c=!1,f;function d(h){return h==null||isNaN(h=+h)?f:l(a===0?.5:(h=(o(h)-n)*a,c?Math.max(0,Math.min(1,h)):h))}d.domain=function(h){return arguments.length?([e,t]=h,n=o(e=+e),r=o(t=+t),a=n===r?0:1/(r-n),d):[e,t]},d.clamp=function(h){return arguments.length?(c=!!h,d):c},d.interpolator=function(h){return arguments.length?(l=h,d):l};function m(h){return function(g){var x,A;return arguments.length?([x,A]=g,l=h(x,A),d):[l(0),l(1)]}}return d.range=m(Bc),d.rangeRound=m(IO),d.unknown=function(h){return arguments.length?(f=h,d):f},function(h){return o=h,n=h(e),r=h(t),a=n===r?0:1/(r-n),d}}function Bo(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function d8(){var e=Io(eg()(lr));return e.copy=function(){return Bo(e,d8())},Vi.apply(e,arguments)}function h8(){var e=HO(eg()).domain([1,10]);return e.copy=function(){return Bo(e,h8()).base(e.base())},Vi.apply(e,arguments)}function p8(){var e=FO(eg());return e.copy=function(){return Bo(e,p8()).constant(e.constant())},Vi.apply(e,arguments)}function tE(){var e=VO(eg());return e.copy=function(){return Bo(e,tE()).exponent(e.exponent())},Vi.apply(e,arguments)}function cde(){return tE.apply(null,arguments).exponent(.5)}function m8(){var e=[],t=lr;function n(r){if(r!=null&&!isNaN(r=+r))return t((Cd(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(Eo),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)=>Kce(e,o/r))},n.copy=function(){return m8(t).domain(e)},Vi.apply(n,arguments)}function tg(){var e=0,t=.5,n=1,r=1,a,o,l,c,f,d=lr,m,h=!1,g;function x(S){return isNaN(S=+S)?g:(S=.5+((S=+m(S))-o)*(r*S<r*o?c:f),d(h?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),c=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?(h=!!S,x):h},x.interpolator=function(S){return arguments.length?(d=S,x):d};function A(S){return function(w){var O,E,j;return arguments.length?([O,E,j]=w,d=wue(S,[O,E,j]),x):[d(0),d(.5),d(1)]}}return x.range=A(Bc),x.rangeRound=A(IO),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),c=a===o?0:.5/(o-a),f=o===l?0:.5/(l-o),r=o<a?-1:1,x}}function v8(){var e=Io(tg()(lr));return e.copy=function(){return Bo(e,v8())},Vi.apply(e,arguments)}function g8(){var e=HO(tg()).domain([.1,1,10]);return e.copy=function(){return Bo(e,g8()).base(e.base())},Vi.apply(e,arguments)}function y8(){var e=FO(tg());return e.copy=function(){return Bo(e,y8()).constant(e.constant())},Vi.apply(e,arguments)}function nE(){var e=VO(tg());return e.copy=function(){return Bo(e,nE()).exponent(e.exponent())},Vi.apply(e,arguments)}function ude(){return nE.apply(null,arguments).exponent(.5)}const _k=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Of,scaleDiverging:v8,scaleDivergingLog:g8,scaleDivergingPow:nE,scaleDivergingSqrt:ude,scaleDivergingSymlog:y8,scaleIdentity:Z6,scaleImplicit:e_,scaleLinear:Sm,scaleLog:Q6,scaleOrdinal:$O,scalePoint:sf,scalePow:GO,scaleQuantile:t8,scaleQuantize:n8,scaleRadial:e8,scaleSequential:d8,scaleSequentialLog:h8,scaleSequentialPow:tE,scaleSequentialQuantile:m8,scaleSequentialSqrt:cde,scaleSequentialSymlog:p8,scaleSqrt:Fue,scaleSymlog:J6,scaleThreshold:r8,scaleTime:sde,scaleUtc:lde,tickFormat:K6},Symbol.toStringTag,{value:"Module"}));var u1,Ak;function b8(){if(Ak)return u1;Ak=1;var e=kc();function t(n,r,a){for(var o=-1,l=n.length;++o<l;){var c=n[o],f=r(c);if(f!=null&&(d===void 0?f===f&&!e(f):a(f,d)))var d=f,m=c}return m}return u1=t,u1}var f1,Ok;function fde(){if(Ok)return f1;Ok=1;function e(t,n){return t>n}return f1=e,f1}var d1,Ek;function dde(){if(Ek)return d1;Ek=1;var e=b8(),t=fde(),n=Lc();function r(a){return a&&a.length?e(a,n,t):void 0}return d1=r,d1}var hde=dde();const Ao=Ht(hde);var h1,jk;function pde(){if(jk)return h1;jk=1;function e(t,n){return t<n}return h1=e,h1}var p1,Tk;function mde(){if(Tk)return p1;Tk=1;var e=b8(),t=pde(),n=Lc();function r(a){return a&&a.length?e(a,n,t):void 0}return p1=r,p1}var vde=mde();const ng=Ht(vde);var m1,Ck;function gde(){if(Ck)return m1;Ck=1;var e=yO(),t=Lo(),n=T6(),r=xr();function a(o,l){var c=r(o)?e:n;return c(o,t(l,3))}return m1=a,m1}var v1,Rk;function yde(){if(Rk)return v1;Rk=1;var e=E6(),t=gde();function n(r,a){return e(t(r,a),1)}return v1=n,v1}var bde=yde();const xde=Ht(bde);var g1,Nk;function wde(){if(Nk)return g1;Nk=1;var e=NO();function t(n,r){return e(n,r)}return g1=t,g1}var Sde=wde();const Rf=Ht(Sde);var Uc=1e9,_de={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},aE,nn=!0,da="[DecimalError] ",xs=da+"Invalid argument: ",rE=da+"Exponent out of range: ",qc=Math.floor,ds=Math.pow,Ade=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Dr,Ln=1e7,Jt=7,x8=9007199254740991,Em=qc(x8/Jt),$e={};$e.absoluteValue=$e.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};$e.comparedTo=$e.cmp=function(e){var t,n,r,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};$e.decimalPlaces=$e.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Jt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};$e.dividedBy=$e.div=function(e){return Pi(this,new this.constructor(e))};$e.dividedToIntegerBy=$e.idiv=function(e){var t=this,n=t.constructor;return Yt(Pi(t,new n(e),0,1),n.precision)};$e.equals=$e.eq=function(e){return!this.cmp(e)};$e.exponent=function(){return En(this)};$e.greaterThan=$e.gt=function(e){return this.cmp(e)>0};$e.greaterThanOrEqualTo=$e.gte=function(e){return this.cmp(e)>=0};$e.isInteger=$e.isint=function(){return this.e>this.d.length-2};$e.isNegative=$e.isneg=function(){return this.s<0};$e.isPositive=$e.ispos=function(){return this.s>0};$e.isZero=function(){return this.s===0};$e.lessThan=$e.lt=function(e){return this.cmp(e)<0};$e.lessThanOrEqualTo=$e.lte=function(e){return this.cmp(e)<1};$e.logarithm=$e.log=function(e){var t,n=this,r=n.constructor,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(Dr))throw Error(da+"NaN");if(n.s<1)throw Error(da+(n.s?"NaN":"-Infinity"));return n.eq(Dr)?new r(0):(nn=!1,t=Pi(Nf(n,o),Nf(e,o),o),nn=!0,Yt(t,a))};$e.minus=$e.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?_8(t,e):w8(t,(e.s=-e.s,e))};$e.modulo=$e.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(da+"NaN");return n.s?(nn=!1,t=Pi(n,e,0,1).times(e),nn=!0,n.minus(t)):Yt(new r(n),a)};$e.naturalExponential=$e.exp=function(){return S8(this)};$e.naturalLogarithm=$e.ln=function(){return Nf(this)};$e.negated=$e.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};$e.plus=$e.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?w8(t,e):_8(t,(e.s=-e.s,e))};$e.precision=$e.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(xs+e);if(t=En(a)+1,r=a.d.length-1,n=r*Jt+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};$e.squareRoot=$e.sqrt=function(){var e,t,n,r,a,o,l,c=this,f=c.constructor;if(c.s<1){if(!c.s)return new f(0);throw Error(da+"NaN")}for(e=En(c),nn=!1,a=Math.sqrt(+c),a==0||a==1/0?(t=Wa(c.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=qc((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(Pi(c,o,l+2)).times(.5),Wa(o.d).slice(0,l)===(t=Wa(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),a==l&&t=="4999"){if(Yt(o,n+1,0),o.times(o).eq(c)){r=o;break}}else if(t!="9999")break;l+=4}return nn=!0,Yt(r,n)};$e.times=$e.mul=function(e){var t,n,r,a,o,l,c,f,d,m=this,h=m.constructor,g=m.d,x=(e=new h(e)).d;if(!m.s||!e.s)return new h(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;)c=o[a]+x[r]*g[a-r-1]+t,o[a--]=c%Ln|0,t=c/Ln|0;o[a]=(o[a]+t)%Ln|0}for(;!o[--l];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,nn?Yt(e,h.precision):e};$e.toDecimalPlaces=$e.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(ei(e,0,Uc),t===void 0?t=r.rounding:ei(t,0,8),Yt(n,e+En(n)+1,t))};$e.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=Ms(r,!0):(ei(e,0,Uc),t===void 0?t=a.rounding:ei(t,0,8),r=Yt(new a(r),e+1,t),n=Ms(r,!0,e+1)),n};$e.toFixed=function(e,t){var n,r,a=this,o=a.constructor;return e===void 0?Ms(a):(ei(e,0,Uc),t===void 0?t=o.rounding:ei(t,0,8),r=Yt(new o(a),e+En(a)+1,t),n=Ms(r.abs(),!1,e+En(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};$e.toInteger=$e.toint=function(){var e=this,t=e.constructor;return Yt(new t(e),En(e)+1,t.rounding)};$e.toNumber=function(){return+this};$e.toPower=$e.pow=function(e){var t,n,r,a,o,l,c=this,f=c.constructor,d=12,m=+(e=new f(e));if(!e.s)return new f(Dr);if(c=new f(c),!c.s){if(e.s<1)throw Error(da+"Infinity");return c}if(c.eq(Dr))return c;if(r=f.precision,e.eq(Dr))return Yt(c,r);if(t=e.e,n=e.d.length-1,l=t>=n,o=c.s,l){if((n=m<0?-m:m)<=x8){for(a=new f(Dr),t=Math.ceil(r/Jt+4),nn=!1;n%2&&(a=a.times(c),Pk(a.d,t)),n=qc(n/2),n!==0;)c=c.times(c),Pk(c.d,t);return nn=!0,e.s<0?new f(Dr).div(a):Yt(a,r)}}else if(o<0)throw Error(da+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,c.s=1,nn=!1,a=e.times(Nf(c,r+d)),nn=!0,a=S8(a),a.s=o,a};$e.toPrecision=function(e,t){var n,r,a=this,o=a.constructor;return e===void 0?(n=En(a),r=Ms(a,n<=o.toExpNeg||n>=o.toExpPos)):(ei(e,1,Uc),t===void 0?t=o.rounding:ei(t,0,8),a=Yt(new o(a),e,t),n=En(a),r=Ms(a,e<=n||n<=o.toExpNeg,e)),r};$e.toSignificantDigits=$e.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(ei(e,1,Uc),t===void 0?t=r.rounding:ei(t,0,8)),Yt(new r(n),e,t)};$e.toString=$e.valueOf=$e.val=$e.toJSON=$e[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=En(e),n=e.constructor;return Ms(e,t<=n.toExpNeg||t>=n.toExpPos)};function w8(e,t){var n,r,a,o,l,c,f,d,m=e.constructor,h=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),nn?Yt(t,h):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,c=d.length):(r=d,a=l,c=f.length),l=Math.ceil(h/Jt),c=l>c?l+1:c+1,o>c&&(o=c,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(c=f.length,o=d.length,c-o<0&&(o=c,r=d,d=f,f=r),n=0;o;)n=(f[--o]=f[o]+d[o]+n)/Ln|0,f[o]%=Ln;for(n&&(f.unshift(n),++a),c=f.length;f[--c]==0;)f.pop();return t.d=f,t.e=a,nn?Yt(t,h):t}function ei(e,t,n){if(e!==~~e||e<t||e>n)throw Error(xs+e)}function Wa(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=Jt-r.length,n&&(o+=So(n)),o+=r;l=e[t],r=l+"",n=Jt-r.length,n&&(o+=So(n))}else if(l===0)return"0";for(;l%10===0;)l/=10;return o+l}var Pi=(function(){function e(r,a){var o,l=0,c=r.length;for(r=r.slice();c--;)o=r[c]*a+l,r[c]=o%Ln|0,l=o/Ln|0;return l&&r.unshift(l),r}function t(r,a,o,l){var c,f;if(o!=l)f=o>l?1:-1;else for(c=f=0;c<o;c++)if(r[c]!=a[c]){f=r[c]>a[c]?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*Ln+r[o]-a[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,a,o,l){var c,f,d,m,h,g,x,A,S,w,O,E,j,R,T,C,N,D,z=r.constructor,V=r.s==a.s?1:-1,U=r.d,P=a.d;if(!r.s)return new z(r);if(!a.s)throw Error(da+"Division by zero");for(f=r.e-a.e,N=P.length,T=U.length,x=new z(V),A=x.d=[],d=0;P[d]==(U[d]||0);)++d;if(P[d]>(U[d]||0)&&--f,o==null?E=o=z.precision:l?E=o+(En(r)-En(a))+1:E=o,E<0)return new z(0);if(E=E/Jt+2|0,d=0,N==1)for(m=0,P=P[0],E++;(d<T||m)&&E--;d++)j=m*Ln+(U[d]||0),A[d]=j/P|0,m=j%P|0;else{for(m=Ln/(P[0]+1)|0,m>1&&(P=e(P,m),U=e(U,m),N=P.length,T=U.length),R=N,S=U.slice(0,N),w=S.length;w<N;)S[w++]=0;D=P.slice(),D.unshift(0),C=P[0],P[1]>=Ln/2&&++C;do m=0,c=t(P,S,N,w),c<0?(O=S[0],N!=w&&(O=O*Ln+(S[1]||0)),m=O/C|0,m>1?(m>=Ln&&(m=Ln-1),h=e(P,m),g=h.length,w=S.length,c=t(h,S,g,w),c==1&&(m--,n(h,N<g?D:P,g))):(m==0&&(c=m=1),h=P.slice()),g=h.length,g<w&&h.unshift(0),n(S,h,w),c==-1&&(w=S.length,c=t(P,S,N,w),c<1&&(m++,n(S,N<w?D:P,w))),w=S.length):c===0&&(m++,S=[0]),A[d++]=m,c&&S[0]?S[w++]=U[R]||0:(S=[U[R]],w=1);while((R++<T||S[0]!==void 0)&&E--)}return A[0]||A.shift(),x.e=f,Yt(x,l?o+En(x)+1:o)}})();function S8(e,t){var n,r,a,o,l,c,f=0,d=0,m=e.constructor,h=m.precision;if(En(e)>16)throw Error(rE+En(e));if(!e.s)return new m(Dr);for(nn=!1,c=h,l=new m(.03125);e.abs().gte(.1);)e=e.times(l),d+=5;for(r=Math.log(ds(2,d))/Math.LN10*2+5|0,c+=r,n=a=o=new m(Dr),m.precision=c;;){if(a=Yt(a.times(e),c),n=n.times(++f),l=o.plus(Pi(a,n,c)),Wa(l.d).slice(0,c)===Wa(o.d).slice(0,c)){for(;d--;)o=Yt(o.times(o),c);return m.precision=h,t==null?(nn=!0,Yt(o,h)):o}o=l}}function En(e){for(var t=e.e*Jt,n=e.d[0];n>=10;n/=10)t++;return t}function y1(e,t,n){if(t>e.LN10.sd())throw nn=!0,n&&(e.precision=n),Error(da+"LN10 precision limit exceeded");return Yt(new e(e.LN10),t)}function So(e){for(var t="";e--;)t+="0";return t}function Nf(e,t){var n,r,a,o,l,c,f,d,m,h=1,g=10,x=e,A=x.d,S=x.constructor,w=S.precision;if(x.s<1)throw Error(da+(x.s?"NaN":"-Infinity"));if(x.eq(Dr))return new S(0);if(t==null?(nn=!1,d=w):d=t,x.eq(10))return t==null&&(nn=!0),y1(S,d);if(d+=g,S.precision=d,n=Wa(A),r=n.charAt(0),o=En(x),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)x=x.times(e),n=Wa(x.d),r=n.charAt(0),h++;o=En(x),r>1?(x=new S("0."+n),o++):x=new S(r+"."+n.slice(1))}else return f=y1(S,d+2,w).times(o+""),x=Nf(new S(r+"."+n.slice(1)),d-g).plus(f),S.precision=w,t==null?(nn=!0,Yt(x,w)):x;for(c=l=x=Pi(x.minus(Dr),x.plus(Dr),d),m=Yt(x.times(x),d),a=3;;){if(l=Yt(l.times(m),d),f=c.plus(Pi(l,new S(a),d)),Wa(f.d).slice(0,d)===Wa(c.d).slice(0,d))return c=c.times(2),o!==0&&(c=c.plus(y1(S,d+2,w).times(o+""))),c=Pi(c,new S(h),d),S.precision=w,t==null?(nn=!0,Yt(c,w)):c;c=f,a+=2}}function Mk(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=qc(n/Jt),e.d=[],r=(n+1)%Jt,n<0&&(r+=Jt),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=Jt;r<a;)e.d.push(+t.slice(r,r+=Jt));t=t.slice(r),r=Jt-t.length}else r-=a;for(;r--;)t+="0";if(e.d.push(+t),nn&&(e.e>Em||e.e<-Em))throw Error(rE+n)}else e.s=0,e.e=0,e.d=[0];return e}function Yt(e,t,n){var r,a,o,l,c,f,d,m,h=e.d;for(l=1,o=h[0];o>=10;o/=10)l++;if(r=t-l,r<0)r+=Jt,a=t,d=h[m=0];else{if(m=Math.ceil((r+1)/Jt),o=h.length,m>=o)return e;for(d=o=h[m],l=1;o>=10;o/=10)l++;r%=Jt,a=r-Jt+l}if(n!==void 0&&(o=ds(10,l-a-1),c=d/o%10|0,f=t<0||h[m+1]!==void 0||d%o,f=n<4?(c||f)&&(n==0||n==(e.s<0?3:2)):c>5||c==5&&(n==4||f||n==6&&(r>0?a>0?d/ds(10,l-a):0:h[m-1])%10&1||n==(e.s<0?8:7))),t<1||!h[0])return f?(o=En(e),h.length=1,t=t-o-1,h[0]=ds(10,(Jt-t%Jt)%Jt),e.e=qc(-t/Jt)||0):(h.length=1,h[0]=e.e=e.s=0),e;if(r==0?(h.length=m,o=1,m--):(h.length=m+1,o=ds(10,Jt-r),h[m]=a>0?(d/ds(10,l-a)%ds(10,a)|0)*o:0),f)for(;;)if(m==0){(h[0]+=o)==Ln&&(h[0]=1,++e.e);break}else{if(h[m]+=o,h[m]!=Ln)break;h[m--]=0,o=1}for(r=h.length;h[--r]===0;)h.pop();if(nn&&(e.e>Em||e.e<-Em))throw Error(rE+En(e));return e}function _8(e,t){var n,r,a,o,l,c,f,d,m,h,g=e.constructor,x=g.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new g(e),nn?Yt(t,x):t;if(f=e.d,h=t.d,r=t.e,d=e.e,f=f.slice(),l=d-r,l){for(m=l<0,m?(n=f,l=-l,c=h.length):(n=h,r=d,c=f.length),a=Math.max(Math.ceil(x/Jt),c)+2,l>a&&(l=a,n.length=1),n.reverse(),a=l;a--;)n.push(0);n.reverse()}else{for(a=f.length,c=h.length,m=a<c,m&&(c=a),a=0;a<c;a++)if(f[a]!=h[a]){m=f[a]<h[a];break}l=0}for(m&&(n=f,f=h,h=n,t.s=-t.s),c=f.length,a=h.length-c;a>0;--a)f[c++]=0;for(a=h.length;a>l;){if(f[--a]<h[a]){for(o=a;o&&f[--o]===0;)f[o]=Ln-1;--f[o],f[a]+=Ln}f[a]-=h[a]}for(;f[--c]===0;)f.pop();for(;f[0]===0;f.shift())--r;return f[0]?(t.d=f,t.e=r,nn?Yt(t,x):t):new g(0)}function Ms(e,t,n){var r,a=En(e),o=Wa(e.d),l=o.length;return t?(n&&(r=n-l)>0?o=o.charAt(0)+"."+o.slice(1)+So(r):l>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(a<0?"e":"e+")+a):a<0?(o="0."+So(-a-1)+o,n&&(r=n-l)>0&&(o+=So(r))):a>=l?(o+=So(a+1-l),n&&(r=n-a-1)>0&&(o=o+"."+So(r))):((r=a+1)<l&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-l)>0&&(a+1===l&&(o+="."),o+=So(r))),e.s<0?"-"+o:o}function Pk(e,t){if(e.length>t)return e.length=t,!0}function A8(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(xs+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 Mk(l,o.toString())}else if(typeof o!="string")throw Error(xs+o);if(o.charCodeAt(0)===45?(o=o.slice(1),l.s=-1):l.s=1,Ade.test(o))Mk(l,o);else throw Error(xs+o)}if(a.prototype=$e,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=A8,a.config=a.set=Ode,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 Ode(e){if(!e||typeof e!="object")throw Error(da+"Object expected");var t,n,r,a=["precision",1,Uc,"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(qc(r)===r&&r>=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(xs+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(xs+n+": "+r);return this}var aE=A8(_de);Dr=new aE(1);const Ut=aE;function Ede(e){return Rde(e)||Cde(e)||Tde(e)||jde()}function jde(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
446
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tde(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 Cde(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Rde(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 Nde=function(t){return t},O8={},E8=function(t){return t===O8},Dk=function(t){return function n(){return arguments.length===0||arguments.length===1&&E8(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},Mde=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(c){return c!==O8}).length;return l>=t?n.apply(void 0,a):e(t-l,Dk(function(){for(var c=arguments.length,f=new Array(c),d=0;d<c;d++)f[d]=arguments[d];var m=a.map(function(h){return E8(h)?f.shift():h});return n.apply(void 0,Ede(m).concat(f))}))})},rg=function(t){return Mde(t.length,t)},i_=function(t,n){for(var r=[],a=t;a<n;++a)r[a-t]=a;return r},Pde=rg(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),Dde=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return Nde;var a=n.reverse(),o=a[0],l=a.slice(1);return function(){return l.reduce(function(c,f){return f(c)},o.apply(void 0,arguments))}},o_=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},j8=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(c,f){return c===n[f]})||(n=o,r=t.apply(void 0,o)),r}};function kde(e){var t;return e===0?t=1:t=Math.floor(new Ut(e).abs().log(10).toNumber())+1,t}function $de(e,t,n){for(var r=new Ut(e),a=0,o=[];r.lt(t)&&a<1e5;)o.push(r.toNumber()),r=r.add(n),a++;return o}var zde=rg(function(e,t,n){var r=+e,a=+t;return r+n*(a-r)}),Lde=rg(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),Ide=rg(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const ag={rangeStep:$de,getDigitCount:kde,interpolateNumber:zde,uninterpolateNumber:Lde,uninterpolateTruncation:Ide};function s_(e){return qde(e)||Ude(e)||T8(e)||Bde()}function Bde(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
447
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ude(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function qde(e){if(Array.isArray(e))return l_(e)}function Mf(e,t){return Vde(e)||Fde(e,t)||T8(e,t)||Hde()}function Hde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
448
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T8(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 Fde(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](),c;!(r=(c=l.next()).done)&&(n.push(c.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 Vde(e){if(Array.isArray(e))return e}function C8(e){var t=Mf(e,2),n=t[0],r=t[1],a=n,o=r;return n>r&&(a=r,o=n),[a,o]}function R8(e,t,n){if(e.lte(0))return new Ut(0);var r=ag.getDigitCount(e.toNumber()),a=new Ut(10).pow(r),o=e.div(a),l=r!==1?.05:.1,c=new Ut(Math.ceil(o.div(l).toNumber())).add(n).mul(l),f=c.mul(a);return t?f:new Ut(Math.ceil(f))}function Gde(e,t,n){var r=1,a=new Ut(e);if(!a.isint()&&n){var o=Math.abs(e);o<1?(r=new Ut(10).pow(ag.getDigitCount(e)-1),a=new Ut(Math.floor(a.div(r).toNumber())).mul(r)):o>1&&(a=new Ut(Math.floor(e)))}else e===0?a=new Ut(Math.floor((t-1)/2)):n||(a=new Ut(Math.floor(e)));var l=Math.floor((t-1)/2),c=Dde(Pde(function(f){return a.add(new Ut(f-l).mul(r)).toNumber()}),i_);return c(0,t)}function N8(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 Ut(0),tickMin:new Ut(0),tickMax:new Ut(0)};var o=R8(new Ut(t).sub(e).div(n-1),r,a),l;e<=0&&t>=0?l=new Ut(0):(l=new Ut(e).add(t).div(2),l=l.sub(new Ut(l).mod(o)));var c=Math.ceil(l.sub(e).div(o).toNumber()),f=Math.ceil(new Ut(t).sub(l).div(o).toNumber()),d=c+f+1;return d>n?N8(e,t,n,r,a+1):(d<n&&(f=t>0?f+(n-d):f,c=t>0?c:c+(n-d)),{step:o,tickMin:l.sub(new Ut(c).mul(o)),tickMax:l.add(new Ut(f).mul(o))})}function Yde(e){var t=Mf(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),c=C8([n,r]),f=Mf(c,2),d=f[0],m=f[1];if(d===-1/0||m===1/0){var h=m===1/0?[d].concat(s_(i_(0,a-1).map(function(){return 1/0}))):[].concat(s_(i_(0,a-1).map(function(){return-1/0})),[m]);return n>r?o_(h):h}if(d===m)return Gde(d,a,o);var g=N8(d,m,l,o),x=g.step,A=g.tickMin,S=g.tickMax,w=ag.rangeStep(A,S.add(new Ut(.1).mul(x)),x);return n>r?o_(w):w}function Wde(e,t){var n=Mf(e,2),r=n[0],a=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=C8([r,a]),c=Mf(l,2),f=c[0],d=c[1];if(f===-1/0||d===1/0)return[r,a];if(f===d)return[f];var m=Math.max(t,2),h=R8(new Ut(d).sub(f).div(m-1),o,0),g=[].concat(s_(ag.rangeStep(new Ut(f),new Ut(d).sub(new Ut(.99).mul(h)),h)),[d]);return r>a?o_(g):g}var Kde=j8(Yde),Zde=j8(Wde),Xde="Invariant failed";function Ps(e,t){throw new Error(Xde)}var Qde=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function lc(e){"@babel/helpers - typeof";return lc=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},lc(e)}function jm(){return jm=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},jm.apply(this,arguments)}function Jde(e,t){return rhe(e)||nhe(e,t)||the(e,t)||ehe()}function ehe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
449
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function the(e,t){if(e){if(typeof e=="string")return kk(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 kk(e,t)}}function kk(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 nhe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.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 c}}function rhe(e){if(Array.isArray(e))return e}function ahe(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}function ohe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function she(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,D8(r.key),r)}}function lhe(e,t,n){return t&&she(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function che(e,t,n){return t=Tm(t),uhe(e,M8()?Reflect.construct(t,n||[],Tm(e).constructor):t.apply(e,n))}function uhe(e,t){if(t&&(lc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fhe(e)}function fhe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(M8=function(){return!!e})()}function Tm(e){return Tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tm(e)}function dhe(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&&c_(e,t)}function c_(e,t){return c_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},c_(e,t)}function P8(e,t,n){return t=D8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D8(e){var t=hhe(e,"string");return lc(t)=="symbol"?t:t+""}function hhe(e,t){if(lc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(lc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ig=(function(e){function t(){return ohe(this,t),che(this,t,arguments)}return dhe(t,e),lhe(t,[{key:"render",value:function(){var r=this.props,a=r.offset,o=r.layout,l=r.width,c=r.dataKey,f=r.data,d=r.dataPointFormatter,m=r.xAxis,h=r.yAxis,g=ahe(r,Qde),x=mt(g,!1);this.props.direction==="x"&&m.type!=="number"&&Ps();var A=f.map(function(S){var w=d(S,c),O=w.x,E=w.y,j=w.value,R=w.errorVal;if(!R)return null;var T=[],C,N;if(Array.isArray(R)){var D=Jde(R,2);C=D[0],N=D[1]}else C=N=R;if(o==="vertical"){var z=m.scale,V=E+a,U=V+l,P=V-l,B=z(j-C),q=z(j+N);T.push({x1:q,y1:U,x2:q,y2:P}),T.push({x1:B,y1:V,x2:q,y2:V}),T.push({x1:B,y1:U,x2:B,y2:P})}else if(o==="horizontal"){var Y=h.scale,$=O+a,G=$-l,F=$+l,K=Y(j-C),ne=Y(j+N);T.push({x1:G,y1:ne,x2:F,y2:ne}),T.push({x1:$,y1:K,x2:$,y2:ne}),T.push({x1:G,y1:K,x2:F,y2:K})}return L.createElement(sn,jm({className:"recharts-errorBar",key:"bar-".concat(T.map(function(I){return"".concat(I.x1,"-").concat(I.x2,"-").concat(I.y1,"-").concat(I.y2)}))},x),T.map(function(I){return L.createElement("line",jm({},I,{key:"line-".concat(I.x1,"-").concat(I.x2,"-").concat(I.y1,"-").concat(I.y2)}))}))});return L.createElement(sn,{className:"recharts-errorBars"},A)}}])})(L.Component);P8(ig,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});P8(ig,"displayName","ErrorBar");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 $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 cs(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){phe(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 phe(e,t,n){return t=mhe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mhe(e){var t=vhe(e,"string");return Pf(t)=="symbol"?t:t+""}function vhe(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)}var k8=function(t){var n=t.children,r=t.formattedGraphicalItems,a=t.legendWidth,o=t.legendContent,l=Rr(n,Vl);if(!l)return null;var c=Vl.defaultProps,f=c!==void 0?cs(cs({},c),l.props):{},d;return l.props&&l.props.payload?d=l.props&&l.props.payload:o==="children"?d=(r||[]).reduce(function(m,h){var g=h.item,x=h.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 h=m.item,g=h.type.defaultProps,x=g!==void 0?cs(cs({},g),h.props):{},A=x.dataKey,S=x.name,w=x.legendType,O=x.hide;return{inactive:O,dataKey:A,type:f.iconType||w||"square",color:iE(h),value:S||A,payload:x}}),cs(cs(cs({},f),Vl.getWithHeight(l,a)),{},{payload:d,item:l})};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 zk(e){return xhe(e)||bhe(e)||yhe(e)||ghe()}function ghe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
450
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yhe(e,t){if(e){if(typeof e=="string")return u_(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 u_(e,t)}}function bhe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xhe(e){if(Array.isArray(e))return u_(e)}function u_(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 Lk(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 fn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lk(Object(n),!0).forEach(function(r){Yl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yl(e,t,n){return t=whe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function whe(e){var t=She(e,"string");return Df(t)=="symbol"?t:t+""}function She(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 Br(e,t,n){return yt(e)||yt(t)?n:Mn(t)?ua(e,t,n):lt(t)?t(e):n}function lf(e,t,n,r){var a=xde(e,function(c){return Br(c,t)});if(n==="number"){var o=a.filter(function(c){return Ne(c)||parseFloat(c)});return o.length?[ng(o),Ao(o)]:[1/0,-1/0]}var l=r?a.filter(function(c){return!yt(c)}):a;return l.map(function(c){return Mn(c)||c instanceof Date?c:""})}var _he=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,c=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(c<=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<c;d++){var m=d>0?a[d-1].coordinate:a[c-1].coordinate,h=a[d].coordinate,g=d>=c-1?a[0].coordinate:a[d+1].coordinate,x=void 0;if(Ta(h-m)!==Ta(g-h)){var A=[];if(Ta(g-h)===Ta(f[1]-f[0])){x=g;var S=h+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(h,(w+h)/2),A[1]=Math.max(h,(w+h)/2)}var O=[Math.min(h,(x+h)/2),Math.max(h,(x+h)/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),j=Math.max(m,g);if(t>(E+h)/2&&t<=(j+h)/2){l=a[d].index;break}}}else for(var R=0;R<c;R++)if(R===0&&t<=(r[R].coordinate+r[R+1].coordinate)/2||R>0&&R<c-1&&t>(r[R].coordinate+r[R-1].coordinate)/2&&t<=(r[R].coordinate+r[R+1].coordinate)/2||R===c-1&&t>(r[R].coordinate+r[R-1].coordinate)/2){l=r[R].index;break}return l},iE=function(t){var n,r=t,a=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?fn(fn({},t.type.defaultProps),t.props):t.props,l=o.stroke,c=o.fill,f;switch(a){case"Line":f=l;break;case"Area":case"Radar":f=l&&l!=="none"?l:c;break;default:f=c;break}return f},Ahe=function(t){var n=t.barSize,r=t.totalSize,a=t.stackGroups,o=a===void 0?{}:a;if(!o)return{};for(var l={},c=Object.keys(o),f=0,d=c.length;f<d;f++)for(var m=o[c[f]].stackGroups,h=Object.keys(m),g=0,x=h.length;g<x;g++){var A=m[h[g]],S=A.items,w=A.cateAxisId,O=S.filter(function(N){return Ni(N.type).indexOf("Bar")>=0});if(O&&O.length){var E=O[0].type.defaultProps,j=E!==void 0?fn(fn({},E),O[0].props):O[0].props,R=j.barSize,T=j[w];l[T]||(l[T]=[]);var C=yt(R)?n:R;l[T].push({item:O[0],stackList:O.slice(1),barSize:yt(C)?void 0:Ns(C,r,0)})}}return l},Ohe=function(t){var n=t.barGap,r=t.barCategoryGap,a=t.bandSize,o=t.sizeList,l=o===void 0?[]:o,c=t.maxBarSize,f=l.length;if(f<1)return null;var d=Ns(n,a,0,!0),m,h=[];if(l[0].barSize===+l[0].barSize){var g=!1,x=a/f,A=l.reduce(function(R,T){return R+T.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(R,T){var C={item:T.item,position:{offset:w.offset+w.size+d,size:g?x:T.barSize}},N=[].concat(zk(R),[C]);return w=N[N.length-1].position,T.stackList&&T.stackList.length&&T.stackList.forEach(function(D){N.push({item:D,position:w})}),N},h)}else{var O=Ns(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 j=c===+c?Math.min(E,c):E;m=l.reduce(function(R,T,C){var N=[].concat(zk(R),[{item:T.item,position:{offset:O+(E+d)*C+(E-j)/2,size:j}}]);return T.stackList&&T.stackList.length&&T.stackList.forEach(function(D){N.push({item:D,position:N[N.length-1].position})}),N},h)}return m},Ehe=function(t,n,r,a){var o=r.children,l=r.width,c=r.margin,f=l-(c.left||0)-(c.right||0),d=k8({children:o,legendWidth:f});if(d){var m=a||{},h=m.width,g=m.height,x=d.align,A=d.verticalAlign,S=d.layout;if((S==="vertical"||S==="horizontal"&&A==="middle")&&x!=="center"&&Ne(t[x]))return fn(fn({},t),{},Yl({},x,t[x]+(h||0)));if((S==="horizontal"||S==="vertical"&&x==="center")&&A!=="middle"&&Ne(t[A]))return fn(fn({},t),{},Yl({},A,t[A]+(g||0)))}return t},jhe=function(t,n,r){return yt(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},$8=function(t,n,r,a,o){var l=n.props.children,c=Na(l,ig).filter(function(d){return jhe(a,o,d.props.direction)});if(c&&c.length){var f=c.map(function(d){return d.props.dataKey});return t.reduce(function(d,m){var h=Br(m,r);if(yt(h))return d;var g=Array.isArray(h)?[ng(h),Ao(h)]:[h,h],x=f.reduce(function(A,S){var w=Br(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},The=function(t,n,r,a,o){var l=n.map(function(c){return $8(t,c,r,o,a)}).filter(function(c){return!yt(c)});return l&&l.length?l.reduce(function(c,f){return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]):null},z8=function(t,n,r,a,o){var l=n.map(function(f){var d=f.props.dataKey;return r==="number"&&d&&$8(t,f,d,a)||lf(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 c={};return l.reduce(function(f,d){for(var m=0,h=d.length;m<h;m++)c[d[m]]||(c[d[m]]=!0,f.push(d[m]));return f},[])},L8=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},I8=function(t,n,r,a){if(a)return t.map(function(f){return f.coordinate});var o,l,c=t.map(function(f){return f.coordinate===n&&(o=!0),f.coordinate===r&&(l=!0),f.coordinate});return o||c.push(n),l||c.push(r),c},Ti=function(t,n,r){if(!t)return null;var a=t.scale,o=t.duplicateDomain,l=t.type,c=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"&&(c==null?void 0:c.length)>=2?Ta(c[0]-c[1])*2*d:d,n&&(t.ticks||t.niceTicks)){var m=(t.ticks||t.niceTicks).map(function(h){var g=o?o.indexOf(h):h;return{coordinate:a(g)+d,value:h,offset:d}});return m.filter(function(h){return!zc(h.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(h,g){return{coordinate:a(h)+d,value:h,index:g,offset:d}}):a.ticks&&!r?a.ticks(t.tickCount).map(function(h){return{coordinate:a(h)+d,value:h,offset:d}}):a.domain().map(function(h,g){return{coordinate:a(h)+d,value:o?o[h]:h,index:g,offset:d}})},b1=new WeakMap,dp=function(t,n){if(typeof n!="function")return t;b1.has(t)||b1.set(t,new WeakMap);var r=b1.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},Che=function(t,n,r){var a=t.scale,o=t.type,l=t.layout,c=t.axisType;if(a==="auto")return l==="radial"&&c==="radiusAxis"?{scale:Of(),realScaleType:"band"}:l==="radial"&&c==="angleAxis"?{scale:Sm(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:sf(),realScaleType:"point"}:o==="category"?{scale:Of(),realScaleType:"band"}:{scale:Sm(),realScaleType:"linear"};if(Rs(a)){var f="scale".concat(Hv(a));return{scale:(_k[f]||sf)(),realScaleType:_k[f]?f:"point"}}return lt(a)?{scale:a}:{scale:sf(),realScaleType:"point"}},Ik=1e-4,Rhe=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])-Ik,l=Math.max(a[0],a[1])+Ik,c=t(n[0]),f=t(n[r-1]);(c<o||c>l||f<o||f>l)&&t.domain([n[0],n[r-1]])}},Nhe=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},Mhe=function(t,n){if(!n||n.length!==2||!Ne(n[0])||!Ne(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(!Ne(t[0])||t[0]<r)&&(o[0]=r),(!Ne(t[1])||t[1]>a)&&(o[1]=a),o[0]>a&&(o[0]=a),o[1]<r&&(o[1]=r),o},Phe=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,c=0;c<n;++c){var f=zc(t[c][r][1])?t[c][r][0]:t[c][r][1];f>=0?(t[c][r][0]=o,t[c][r][1]=o+f,o=t[c][r][1]):(t[c][r][0]=l,t[c][r][1]=l+f,l=t[c][r][1])}},Dhe=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 c=zc(t[l][r][1])?t[l][r][0]:t[l][r][1];c>=0?(t[l][r][0]=o,t[l][r][1]=o+c,o=t[l][r][1]):(t[l][r][0]=0,t[l][r][1]=0)}},khe={sign:Phe,expand:goe,none:ec,silhouette:yoe,wiggle:boe,positive:Dhe},$he=function(t,n,r){var a=n.map(function(c){return c.props.dataKey}),o=khe[r],l=voe().keys(a).value(function(c,f){return+Br(c,f,0)}).order(BS).offset(o);return l(t)},zhe=function(t,n,r,a,o,l){if(!t)return null;var c=l?n.reverse():n,f={},d=c.reduce(function(h,g){var x,A=(x=g.type)!==null&&x!==void 0&&x.defaultProps?fn(fn({},g.type.defaultProps),g.props):g.props,S=A.stackId,w=A.hide;if(w)return h;var O=A[r],E=h[O]||{hasStack:!1,stackGroups:{}};if(Mn(S)){var j=E.stackGroups[S]||{numericAxisId:r,cateAxisId:a,items:[]};j.items.push(g),E.hasStack=!0,E.stackGroups[S]=j}else E.stackGroups[jd("_stackId_")]={numericAxisId:r,cateAxisId:a,items:[g]};return fn(fn({},h),{},Yl({},O,E))},f),m={};return Object.keys(d).reduce(function(h,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 fn(fn({},S),{},Yl({},w,{numericAxisId:r,cateAxisId:a,items:O.items,stackedData:$he(t,O.items,o)}))},A)}return fn(fn({},h),{},Yl({},g,x))},m)},Lhe=function(t,n){var r=n.realScaleType,a=n.type,o=n.tickCount,l=n.originalDomain,c=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=Kde(d,o,c);return t.domain([ng(m),Ao(m)]),{niceTicks:m}}if(o&&a==="number"){var h=t.domain(),g=Zde(h,o,c);return{niceTicks:g}}return null};function Bk(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&&!yt(a[t.dataKey])){var c=tm(n,"value",a[t.dataKey]);if(c)return c.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var f=Br(a,yt(l)?t.dataKey:l);return yt(f)?null:t.scale(f)}var Uk=function(t){var n=t.axis,r=t.ticks,a=t.offset,o=t.bandSize,l=t.entry,c=t.index;if(n.type==="category")return r[c]?r[c].coordinate+a:null;var f=Br(l,n.dataKey,n.domain[c]);return yt(f)?null:n.scale(f)-o/2+a},Ihe=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]},Bhe=function(t,n){var r,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?fn(fn({},t.type.defaultProps),t.props):t.props,o=a.stackId;if(Mn(o)){var l=n[o];if(l){var c=l.items.indexOf(t);return c>=0?l.stackedData[c]:null}}return null},Uhe=function(t){return t.reduce(function(n,r){return[ng(r.concat([n[0]]).filter(Ne)),Ao(r.concat([n[1]]).filter(Ne))]},[1/0,-1/0])},B8=function(t,n,r){return Object.keys(t).reduce(function(a,o){var l=t[o],c=l.stackedData,f=c.reduce(function(d,m){var h=Uhe(m.slice(n,r+1));return[Math.min(d[0],h[0]),Math.max(d[1],h[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})},qk=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Hk=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,f_=function(t,n,r){if(lt(t))return t(n,r);if(!Array.isArray(t))return n;var a=[];if(Ne(t[0]))a[0]=r?t[0]:Math.min(t[0],n[0]);else if(qk.test(t[0])){var o=+qk.exec(t[0])[1];a[0]=n[0]-o}else lt(t[0])?a[0]=t[0](n[0]):a[0]=n[0];if(Ne(t[1]))a[1]=r?t[1]:Math.max(t[1],n[1]);else if(Hk.test(t[1])){var l=+Hk.exec(t[1])[1];a[1]=n[1]+l}else lt(t[1])?a[1]=t[1](n[1]):a[1]=n[1];return a},Cm=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=PO(n,function(h){return h.coordinate}),l=1/0,c=1,f=o.length;c<f;c++){var d=o[c],m=o[c-1];l=Math.min((d.coordinate||0)-(m.coordinate||0),l)}return l===1/0?0:l}return r?void 0:0},Fk=function(t,n,r){return!t||!t.length||Rf(t,ua(r,"type.defaultProps.domain"))?n:t},U8=function(t,n){var r=t.type.defaultProps?fn(fn({},t.type.defaultProps),t.props):t.props,a=r.dataKey,o=r.name,l=r.unit,c=r.formatter,f=r.tooltipType,d=r.chartType,m=r.hide;return fn(fn({},mt(t,!1)),{},{dataKey:a,unit:l,formatter:c,name:o||a,color:iE(t),value:Br(n,a),type:f,payload:n,chartType:d,hide:m})};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 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 Gk(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){qhe(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 qhe(e,t,n){return t=Hhe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hhe(e){var t=Fhe(e,"string");return kf(t)=="symbol"?t:t+""}function Fhe(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 Rm=Math.PI/180,Vhe=function(t){return t*180/Math.PI},Yn=function(t,n,r,a){return{x:t+Math.cos(-Rm*a)*r,y:n+Math.sin(-Rm*a)*r}},Ghe=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))},Yhe=function(t,n){var r=t.x,a=t.y,o=n.cx,l=n.cy,c=Ghe({x:r,y:a},{x:o,y:l});if(c<=0)return{radius:c};var f=(r-o)/c,d=Math.acos(f);return a>l&&(d=2*Math.PI-d),{radius:c,angle:Vhe(d),angleInRadian:d}},Whe=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}},Khe=function(t,n){var r=n.startAngle,a=n.endAngle,o=Math.floor(r/360),l=Math.floor(a/360),c=Math.min(o,l);return t+c*360},Yk=function(t,n){var r=t.x,a=t.y,o=Yhe({x:r,y:a},n),l=o.radius,c=o.angle,f=n.innerRadius,d=n.outerRadius;if(l<f||l>d)return!1;if(l===0)return!0;var m=Whe(n),h=m.startAngle,g=m.endAngle,x=c,A;if(h<=g){for(;x>g;)x-=360;for(;x<h;)x+=360;A=x>=h&&x<=g}else{for(;x>h;)x-=360;for(;x<g;)x+=360;A=x>=g&&x<=h}return A?Gk(Gk({},n),{},{radius:l,angle:Khe(x,n)}):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 Zhe=["offset"];function Xhe(e){return tpe(e)||epe(e)||Jhe(e)||Qhe()}function Qhe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
451
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jhe(e,t){if(e){if(typeof e=="string")return d_(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 d_(e,t)}}function epe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tpe(e){if(Array.isArray(e))return d_(e)}function d_(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 npe(e,t){if(e==null)return{};var n=rpe(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 rpe(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 Wk(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 Nn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wk(Object(n),!0).forEach(function(r){ape(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ape(e,t,n){return t=ipe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ipe(e){var t=ope(e,"string");return $f(t)=="symbol"?t:t+""}function ope(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 zf(){return zf=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},zf.apply(this,arguments)}var spe=function(t){var n=t.value,r=t.formatter,a=yt(t.children)?n:t.children;return lt(r)?r(a):a},lpe=function(t,n){var r=Ta(n-t),a=Math.min(Math.abs(n-t),360);return r*a},cpe=function(t,n,r){var a=t.position,o=t.viewBox,l=t.offset,c=t.className,f=o,d=f.cx,m=f.cy,h=f.innerRadius,g=f.outerRadius,x=f.startAngle,A=f.endAngle,S=f.clockWise,w=(h+g)/2,O=lpe(x,A),E=O>=0?1:-1,j,R;a==="insideStart"?(j=x+E*l,R=S):a==="insideEnd"?(j=A-E*l,R=!S):a==="end"&&(j=A+E*l,R=S),R=O<=0?R:!R;var T=Yn(d,m,w,j),C=Yn(d,m,w,j+(R?1:-1)*359),N="M".concat(T.x,",").concat(T.y,`
|
|
452
|
-
A`).concat(w,",").concat(w,",0,1,").concat(R?0:1,`,
|
|
453
|
-
`).concat(C.x,",").concat(C.y),D=yt(t.id)?jd("recharts-radial-line-"):t.id;return L.createElement("text",zf({},r,{dominantBaseline:"central",className:xt("recharts-radial-bar-label",c)}),L.createElement("defs",null,L.createElement("path",{id:D,d:N})),L.createElement("textPath",{xlinkHref:"#".concat(D)},n))},upe=function(t){var n=t.viewBox,r=t.offset,a=t.position,o=n,l=o.cx,c=o.cy,f=o.innerRadius,d=o.outerRadius,m=o.startAngle,h=o.endAngle,g=(m+h)/2;if(a==="outside"){var x=Yn(l,c,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:c,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:l,y:c,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:l,y:c,textAnchor:"middle",verticalAnchor:"end"};var w=(f+d)/2,O=Yn(l,c,w,g),E=O.x,j=O.y;return{x:E,y:j,textAnchor:"middle",verticalAnchor:"middle"}},fpe=function(t){var n=t.viewBox,r=t.parentViewBox,a=t.offset,o=t.position,l=n,c=l.x,f=l.y,d=l.width,m=l.height,h=m>=0?1:-1,g=h*a,x=h>0?"end":"start",A=h>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 j={x:c+d/2,y:f-h*a,textAnchor:"middle",verticalAnchor:x};return Nn(Nn({},j),r?{height:Math.max(f-r.y,0),width:d}:{})}if(o==="bottom"){var R={x:c+d/2,y:f+m+g,textAnchor:"middle",verticalAnchor:A};return Nn(Nn({},R),r?{height:Math.max(r.y+r.height-(f+m),0),width:d}:{})}if(o==="left"){var T={x:c-w,y:f+m/2,textAnchor:O,verticalAnchor:"middle"};return Nn(Nn({},T),r?{width:Math.max(T.x-r.x,0),height:m}:{})}if(o==="right"){var C={x:c+d+w,y:f+m/2,textAnchor:E,verticalAnchor:"middle"};return Nn(Nn({},C),r?{width:Math.max(r.x+r.width-C.x,0),height:m}:{})}var N=r?{width:d,height:m}:{};return o==="insideLeft"?Nn({x:c+w,y:f+m/2,textAnchor:E,verticalAnchor:"middle"},N):o==="insideRight"?Nn({x:c+d-w,y:f+m/2,textAnchor:O,verticalAnchor:"middle"},N):o==="insideTop"?Nn({x:c+d/2,y:f+g,textAnchor:"middle",verticalAnchor:A},N):o==="insideBottom"?Nn({x:c+d/2,y:f+m-g,textAnchor:"middle",verticalAnchor:x},N):o==="insideTopLeft"?Nn({x:c+w,y:f+g,textAnchor:E,verticalAnchor:A},N):o==="insideTopRight"?Nn({x:c+d-w,y:f+g,textAnchor:O,verticalAnchor:A},N):o==="insideBottomLeft"?Nn({x:c+w,y:f+m-g,textAnchor:E,verticalAnchor:x},N):o==="insideBottomRight"?Nn({x:c+d-w,y:f+m-g,textAnchor:O,verticalAnchor:x},N):$c(o)&&(Ne(o.x)||ps(o.x))&&(Ne(o.y)||ps(o.y))?Nn({x:c+Ns(o.x,d),y:f+Ns(o.y,m),textAnchor:"end",verticalAnchor:"end"},N):Nn({x:c+d/2,y:f+m/2,textAnchor:"middle",verticalAnchor:"middle"},N)},dpe=function(t){return"cx"in t&&Ne(t.cx)};function nr(e){var t=e.offset,n=t===void 0?5:t,r=npe(e,Zhe),a=Nn({offset:n},r),o=a.viewBox,l=a.position,c=a.value,f=a.children,d=a.content,m=a.className,h=m===void 0?"":m,g=a.textBreakAll;if(!o||yt(c)&&yt(f)&&!y.isValidElement(d)&&!lt(d))return null;if(y.isValidElement(d))return y.cloneElement(d,a);var x;if(lt(d)){if(x=y.createElement(d,a),y.isValidElement(x))return x}else x=spe(a);var A=dpe(o),S=mt(a,!0);if(A&&(l==="insideStart"||l==="insideEnd"||l==="end"))return cpe(a,x,S);var w=A?upe(a):fpe(a);return L.createElement(pm,zf({className:xt("recharts-label",h)},S,w,{breakAll:g}),x)}nr.displayName="Label";var q8=function(t){var n=t.cx,r=t.cy,a=t.angle,o=t.startAngle,l=t.endAngle,c=t.r,f=t.radius,d=t.innerRadius,m=t.outerRadius,h=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(Ne(S)&&Ne(w)){if(Ne(h)&&Ne(g))return{x:h,y:g,width:S,height:w};if(Ne(x)&&Ne(A))return{x,y:A,width:S,height:w}}return Ne(h)&&Ne(g)?{x:h,y:g,width:0,height:0}:Ne(n)&&Ne(r)?{cx:n,cy:r,startAngle:o||a||0,endAngle:l||a||0,innerRadius:d||0,outerRadius:m||f||c||0,clockWise:O}:t.viewBox?t.viewBox:{}},hpe=function(t,n){return t?t===!0?L.createElement(nr,{key:"label-implicit",viewBox:n}):Mn(t)?L.createElement(nr,{key:"label-implicit",viewBox:n,value:t}):y.isValidElement(t)?t.type===nr?y.cloneElement(t,{key:"label-implicit",viewBox:n}):L.createElement(nr,{key:"label-implicit",content:t,viewBox:n}):lt(t)?L.createElement(nr,{key:"label-implicit",content:t,viewBox:n}):$c(t)?L.createElement(nr,zf({viewBox:n},t,{key:"label-implicit"})):null:null},ppe=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=q8(t),l=Na(a,nr).map(function(f,d){return y.cloneElement(f,{viewBox:n||o,key:"label-".concat(d)})});if(!r)return l;var c=hpe(t.label,n||o);return[c].concat(Xhe(l))};nr.parseViewBox=q8;nr.renderCallByParent=ppe;var x1,Kk;function mpe(){if(Kk)return x1;Kk=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return x1=e,x1}var vpe=mpe();const gpe=Ht(vpe);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)}var ype=["valueAccessor"],bpe=["data","dataKey","clockWise","id","textBreakAll"];function xpe(e){return Ape(e)||_pe(e)||Spe(e)||wpe()}function wpe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
454
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Spe(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 _pe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ape(e){if(Array.isArray(e))return h_(e)}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 Nm(){return Nm=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},Nm.apply(this,arguments)}function Zk(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 Xk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zk(Object(n),!0).forEach(function(r){Ope(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ope(e,t,n){return t=Epe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Epe(e){var t=jpe(e,"string");return Lf(t)=="symbol"?t:t+""}function jpe(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 Qk(e,t){if(e==null)return{};var n=Tpe(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 Tpe(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 Cpe=function(t){return Array.isArray(t.value)?gpe(t.value):t.value};function jo(e){var t=e.valueAccessor,n=t===void 0?Cpe:t,r=Qk(e,ype),a=r.data,o=r.dataKey,l=r.clockWise,c=r.id,f=r.textBreakAll,d=Qk(r,bpe);return!a||!a.length?null:L.createElement(sn,{className:"recharts-label-list"},a.map(function(m,h){var g=yt(o)?n(m,h):Br(m&&m.payload,o),x=yt(c)?{}:{id:"".concat(c,"-").concat(h)};return L.createElement(nr,Nm({},mt(m,!0),d,x,{parentViewBox:m.parentViewBox,value:g,textBreakAll:f,viewBox:nr.parseViewBox(yt(l)?m:Xk(Xk({},m),{},{clockWise:l})),key:"label-".concat(h),index:h}))}))}jo.displayName="LabelList";function Rpe(e,t){return e?e===!0?L.createElement(jo,{key:"labelList-implicit",data:t}):L.isValidElement(e)||lt(e)?L.createElement(jo,{key:"labelList-implicit",data:t,content:e}):$c(e)?L.createElement(jo,Nm({data:t},e,{key:"labelList-implicit"})):null:null}function Npe(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=Na(r,jo).map(function(l,c){return y.cloneElement(l,{data:t,key:"labelList-".concat(c)})});if(!n)return a;var o=Rpe(e.label,t);return[o].concat(xpe(a))}jo.renderCallByParent=Npe;function If(e){"@babel/helpers - typeof";return If=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},If(e)}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 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 e$(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){Mpe(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 Mpe(e,t,n){return t=Ppe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ppe(e){var t=Dpe(e,"string");return If(t)=="symbol"?t:t+""}function Dpe(e,t){if(If(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(If(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kpe=function(t,n){var r=Ta(n-t),a=Math.min(Math.abs(n-t),359.999);return r*a},hp=function(t){var n=t.cx,r=t.cy,a=t.radius,o=t.angle,l=t.sign,c=t.isExternal,f=t.cornerRadius,d=t.cornerIsExternal,m=f*(c?1:-1)+a,h=Math.asin(f/m)/Rm,g=d?o:o+l*h,x=Yn(n,r,m,g),A=Yn(n,r,a,g),S=d?o-l*h:o,w=Yn(n,r,m*Math.cos(h*Rm),S);return{center:x,circleTangency:A,lineTangency:w,theta:h}},H8=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,o=t.outerRadius,l=t.startAngle,c=t.endAngle,f=kpe(l,c),d=l+f,m=Yn(n,r,o,l),h=Yn(n,r,o,d),g="M ".concat(m.x,",").concat(m.y,`
|
|
455
|
-
A `).concat(o,",").concat(o,`,0,
|
|
456
|
-
`).concat(+(Math.abs(f)>180),",").concat(+(l>d),`,
|
|
457
|
-
`).concat(h.x,",").concat(h.y,`
|
|
458
|
-
`);if(a>0){var x=Yn(n,r,a,l),A=Yn(n,r,a,d);g+="L ".concat(A.x,",").concat(A.y,`
|
|
459
|
-
A `).concat(a,",").concat(a,`,0,
|
|
460
|
-
`).concat(+(Math.abs(f)>180),",").concat(+(l<=d),`,
|
|
461
|
-
`).concat(x.x,",").concat(x.y," Z")}else g+="L ".concat(n,",").concat(r," Z");return g},$pe=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,o=t.outerRadius,l=t.cornerRadius,c=t.forceCornerRadius,f=t.cornerIsExternal,d=t.startAngle,m=t.endAngle,h=Ta(m-d),g=hp({cx:n,cy:r,radius:o,angle:d,sign:h,cornerRadius:l,cornerIsExternal:f}),x=g.circleTangency,A=g.lineTangency,S=g.theta,w=hp({cx:n,cy:r,radius:o,angle:m,sign:-h,cornerRadius:l,cornerIsExternal:f}),O=w.circleTangency,E=w.lineTangency,j=w.theta,R=f?Math.abs(d-m):Math.abs(d-m)-S-j;if(R<0)return c?"M ".concat(A.x,",").concat(A.y,`
|
|
462
|
-
a`).concat(l,",").concat(l,",0,0,1,").concat(l*2,`,0
|
|
463
|
-
a`).concat(l,",").concat(l,",0,0,1,").concat(-l*2,`,0
|
|
464
|
-
`):H8({cx:n,cy:r,innerRadius:a,outerRadius:o,startAngle:d,endAngle:m});var T="M ".concat(A.x,",").concat(A.y,`
|
|
465
|
-
A`).concat(l,",").concat(l,",0,0,").concat(+(h<0),",").concat(x.x,",").concat(x.y,`
|
|
466
|
-
A`).concat(o,",").concat(o,",0,").concat(+(R>180),",").concat(+(h<0),",").concat(O.x,",").concat(O.y,`
|
|
467
|
-
A`).concat(l,",").concat(l,",0,0,").concat(+(h<0),",").concat(E.x,",").concat(E.y,`
|
|
468
|
-
`);if(a>0){var C=hp({cx:n,cy:r,radius:a,angle:d,sign:h,isExternal:!0,cornerRadius:l,cornerIsExternal:f}),N=C.circleTangency,D=C.lineTangency,z=C.theta,V=hp({cx:n,cy:r,radius:a,angle:m,sign:-h,isExternal:!0,cornerRadius:l,cornerIsExternal:f}),U=V.circleTangency,P=V.lineTangency,B=V.theta,q=f?Math.abs(d-m):Math.abs(d-m)-z-B;if(q<0&&l===0)return"".concat(T,"L").concat(n,",").concat(r,"Z");T+="L".concat(P.x,",").concat(P.y,`
|
|
469
|
-
A`).concat(l,",").concat(l,",0,0,").concat(+(h<0),",").concat(U.x,",").concat(U.y,`
|
|
470
|
-
A`).concat(a,",").concat(a,",0,").concat(+(q>180),",").concat(+(h>0),",").concat(N.x,",").concat(N.y,`
|
|
471
|
-
A`).concat(l,",").concat(l,",0,0,").concat(+(h<0),",").concat(D.x,",").concat(D.y,"Z")}else T+="L".concat(n,",").concat(r,"Z");return T},zpe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},F8=function(t){var n=e$(e$({},zpe),t),r=n.cx,a=n.cy,o=n.innerRadius,l=n.outerRadius,c=n.cornerRadius,f=n.forceCornerRadius,d=n.cornerIsExternal,m=n.startAngle,h=n.endAngle,g=n.className;if(l<o||m===h)return null;var x=xt("recharts-sector",g),A=l-o,S=Ns(c,A,0,!0),w;return S>0&&Math.abs(m-h)<360?w=$pe({cx:r,cy:a,innerRadius:o,outerRadius:l,cornerRadius:Math.min(S,A/2),forceCornerRadius:f,cornerIsExternal:d,startAngle:m,endAngle:h}):w=H8({cx:r,cy:a,innerRadius:o,outerRadius:l,startAngle:m,endAngle:h}),L.createElement("path",p_({},mt(n,!0),{className:x,d:w,role:"img"}))};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 m_(){return m_=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},m_.apply(this,arguments)}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){Lpe(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 Lpe(e,t,n){return t=Ipe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ipe(e){var t=Bpe(e,"string");return Bf(t)=="symbol"?t:t+""}function Bpe(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 r$={curveBasisClosed:ioe,curveBasisOpen:ooe,curveBasis:aoe,curveBumpX:Fie,curveBumpY:Vie,curveLinearClosed:soe,curveLinear:Vv,curveMonotoneX:loe,curveMonotoneY:coe,curveNatural:uoe,curveStep:foe,curveStepAfter:hoe,curveStepBefore:doe},pp=function(t){return t.x===+t.x&&t.y===+t.y},Vu=function(t){return t.x},Gu=function(t){return t.y},Upe=function(t,n){if(lt(t))return t;var r="curve".concat(Hv(t));return(r==="curveMonotone"||r==="curveBump")&&n?r$["".concat(r).concat(n==="vertical"?"Y":"X")]:r$[r]||Vv},qpe=function(t){var n=t.type,r=n===void 0?"linear":n,a=t.points,o=a===void 0?[]:a,l=t.baseLine,c=t.layout,f=t.connectNulls,d=f===void 0?!1:f,m=Upe(r,c),h=d?o.filter(function(S){return pp(S)}):o,g;if(Array.isArray(l)){var x=d?l.filter(function(S){return pp(S)}):l,A=h.map(function(S,w){return n$(n$({},S),{},{base:x[w]})});return c==="vertical"?g=ip().y(Gu).x1(Vu).x0(function(S){return S.base.x}):g=ip().x(Vu).y1(Gu).y0(function(S){return S.base.y}),g.defined(pp).curve(m),g(A)}return c==="vertical"&&Ne(l)?g=ip().y(Gu).x1(Vu).x0(l):Ne(l)?g=ip().x(Vu).y1(Gu).y0(l):g=KB().x(Vu).y(Gu),g.defined(pp).curve(m),g(h)},cf=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?qpe(t):a;return y.createElement("path",m_({},mt(t,!1),nm(t),{className:xt("recharts-curve",n),d:l,ref:o}))},w1={exports:{}},S1,a$;function Hpe(){if(a$)return S1;a$=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return S1=e,S1}var _1,i$;function Fpe(){if(i$)return _1;i$=1;var e=Hpe();function t(){}function n(){}return n.resetWarningCache=t,_1=function(){function r(l,c,f,d,m,h){if(h!==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},_1}var o$;function Vpe(){return o$||(o$=1,w1.exports=Fpe()()),w1.exports}var Gpe=Vpe();const Mt=Ht(Gpe),{getOwnPropertyNames:Ype,getOwnPropertySymbols:Wpe}=Object,{hasOwnProperty:Kpe}=Object.prototype;function A1(e,t){return function(r,a,o){return e(r,a,o)&&t(r,a,o)}}function mp(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),c=o.get(r);if(l&&c)return l===r&&c===n;o.set(n,r),o.set(r,n);const f=e(n,r,a);return o.delete(n),o.delete(r),f}}function Zpe(e){return e!=null?e[Symbol.toStringTag]:void 0}function s$(e){return Ype(e).concat(Wpe(e))}const Xpe=Object.hasOwn||((e,t)=>Kpe.call(e,t));function qs(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const Qpe="__v",Jpe="__o",eme="_owner",{getOwnPropertyDescriptor:l$,keys:c$}=Object;function tme(e,t){return e.byteLength===t.byteLength&&Mm(new Uint8Array(e),new Uint8Array(t))}function nme(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 rme(e,t){return e.byteLength===t.byteLength&&Mm(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function ame(e,t){return qs(e.getTime(),t.getTime())}function ime(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function ome(e,t){return e===t}function u$(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,c,f=0;for(;(l=o.next())&&!l.done;){const d=t.entries();let m=!1,h=0;for(;(c=d.next())&&!c.done;){if(a[h]){h++;continue}const g=l.value,x=c.value;if(n.equals(g[0],x[0],f,h,e,t,n)&&n.equals(g[1],x[1],g[0],x[0],e,t,n)){m=a[h]=!0;break}h++}if(!m)return!1;f++}return!0}const sme=qs;function lme(e,t,n){const r=c$(e);let a=r.length;if(c$(t).length!==a)return!1;for(;a-- >0;)if(!V8(e,t,n,r[a]))return!1;return!0}function Yu(e,t,n){const r=s$(e);let a=r.length;if(s$(t).length!==a)return!1;let o,l,c;for(;a-- >0;)if(o=r[a],!V8(e,t,n,o)||(l=l$(e,o),c=l$(t,o),(l||c)&&(!l||!c||l.configurable!==c.configurable||l.enumerable!==c.enumerable||l.writable!==c.writable)))return!1;return!0}function cme(e,t){return qs(e.valueOf(),t.valueOf())}function ume(e,t){return e.source===t.source&&e.flags===t.flags}function f$(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,c;for(;(l=o.next())&&!l.done;){const f=t.values();let d=!1,m=0;for(;(c=f.next())&&!c.done;){if(!a[m]&&n.equals(l.value,c.value,l.value,c.value,e,t,n)){d=a[m]=!0;break}m++}if(!d)return!1}return!0}function Mm(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 fme(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 V8(e,t,n,r){return(r===eme||r===Jpe||r===Qpe)&&(e.$$typeof||t.$$typeof)?!0:Xpe(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const dme="[object ArrayBuffer]",hme="[object Arguments]",pme="[object Boolean]",mme="[object DataView]",vme="[object Date]",gme="[object Error]",yme="[object Map]",bme="[object Number]",xme="[object Object]",wme="[object RegExp]",Sme="[object Set]",_me="[object String]",Ame={"[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},Ome="[object URL]",Eme=Object.prototype.toString;function jme({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:a,areFunctionsEqual:o,areMapsEqual:l,areNumbersEqual:c,areObjectsEqual:f,arePrimitiveWrappersEqual:d,areRegExpsEqual:m,areSetsEqual:h,areTypedArraysEqual:g,areUrlsEqual:x,unknownTagComparators:A}){return function(w,O,E){if(w===O)return!0;if(w==null||O==null)return!1;const j=typeof w;if(j!==typeof O)return!1;if(j!=="object")return j==="number"?c(w,O,E):j==="function"?o(w,O,E):!1;const R=w.constructor;if(R!==O.constructor)return!1;if(R===Object)return f(w,O,E);if(Array.isArray(w))return t(w,O,E);if(R===Date)return r(w,O,E);if(R===RegExp)return m(w,O,E);if(R===Map)return l(w,O,E);if(R===Set)return h(w,O,E);const T=Eme.call(w);if(T===vme)return r(w,O,E);if(T===wme)return m(w,O,E);if(T===yme)return l(w,O,E);if(T===Sme)return h(w,O,E);if(T===xme)return typeof w.then!="function"&&typeof O.then!="function"&&f(w,O,E);if(T===Ome)return x(w,O,E);if(T===gme)return a(w,O,E);if(T===hme)return f(w,O,E);if(Ame[T])return g(w,O,E);if(T===dme)return e(w,O,E);if(T===mme)return n(w,O,E);if(T===pme||T===bme||T===_me)return d(w,O,E);if(A){let C=A[T];if(!C){const N=Zpe(w);N&&(C=A[N])}if(C)return C(w,O,E)}return!1}}function Tme({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:tme,areArraysEqual:n?Yu:nme,areDataViewsEqual:rme,areDatesEqual:ame,areErrorsEqual:ime,areFunctionsEqual:ome,areMapsEqual:n?A1(u$,Yu):u$,areNumbersEqual:sme,areObjectsEqual:n?Yu:lme,arePrimitiveWrappersEqual:cme,areRegExpsEqual:ume,areSetsEqual:n?A1(f$,Yu):f$,areTypedArraysEqual:n?A1(Mm,Yu):Mm,areUrlsEqual:fme,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const a=mp(r.areArraysEqual),o=mp(r.areMapsEqual),l=mp(r.areObjectsEqual),c=mp(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:c})}return r}function Cme(e){return function(t,n,r,a,o,l,c){return e(t,n,c)}}function Rme({circular:e,comparator:t,createState:n,equals:r,strict:a}){if(n)return function(c,f){const{cache:d=e?new WeakMap:void 0,meta:m}=n();return t(c,f,{cache:d,equals:r,meta:m,strict:a})};if(e)return function(c,f){return t(c,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(c,f){return t(c,f,o)}}const Nme=Uo();Uo({strict:!0});Uo({circular:!0});Uo({circular:!0,strict:!0});Uo({createInternalComparator:()=>qs});Uo({strict:!0,createInternalComparator:()=>qs});Uo({circular:!0,createInternalComparator:()=>qs});Uo({circular:!0,createInternalComparator:()=>qs,strict:!0});function Uo(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:a=!1}=e,o=Tme(e),l=jme(o),c=n?n(l):Cme(l);return Rme({circular:t,comparator:l,createState:r,equals:c,strict:a})}function Mme(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function d$(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):Mme(a)};requestAnimationFrame(r)}function v_(e){"@babel/helpers - typeof";return v_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v_(e)}function Pme(e){return zme(e)||$me(e)||kme(e)||Dme()}function Dme(){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 kme(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 $me(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zme(e){if(Array.isArray(e))return e}function Lme(){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,c=Pme(l),f=c[0],d=c.slice(1);if(typeof f=="number"){d$(a.bind(null,d),f);return}a(f),d$(a.bind(null,d));return}v_(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 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 p$(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 m$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p$(Object(n),!0).forEach(function(r){G8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function G8(e,t,n){return t=Ime(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ime(e){var t=Bme(e,"string");return Uf(t)==="symbol"?t:String(t)}function Bme(e,t){if(Uf(e)!=="object"||e===null)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)}var Ume=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,a){return r.filter(function(o){return a.includes(o)})})},qme=function(t){return t},Hme=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},uf=function(t,n){return Object.keys(n).reduce(function(r,a){return m$(m$({},r),{},G8({},a,t(a,n[a])))},{})},v$=function(t,n,r){return t.map(function(a){return"".concat(Hme(a)," ").concat(n,"ms ").concat(r)}).join(",")};function Fme(e,t){return Yme(e)||Gme(e,t)||Y8(e,t)||Vme()}function Vme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
473
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gme(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.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 c}}function Yme(e){if(Array.isArray(e))return e}function Wme(e){return Xme(e)||Zme(e)||Y8(e)||Kme()}function Kme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
474
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Y8(e,t){if(e){if(typeof e=="string")return g_(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 g_(e,t)}}function Zme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Xme(e){if(Array.isArray(e))return g_(e)}function g_(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 Pm=1e-4,W8=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},K8=function(t,n){return t.map(function(r,a){return r*Math.pow(n,a)}).reduce(function(r,a){return r+a})},g$=function(t,n){return function(r){var a=W8(t,n);return K8(a,r)}},Qme=function(t,n){return function(r){var a=W8(t,n),o=[].concat(Wme(a.map(function(l,c){return l*c}).slice(1)),[0]);return K8(o,r)}},y$=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],c=n[3];if(n.length===1)switch(n[0]){case"linear":a=0,o=0,l=1,c=1;break;case"ease":a=.25,o=.1,l=.25,c=1;break;case"ease-in":a=.42,o=0,l=1,c=1;break;case"ease-out":a=.42,o=0,l=.58,c=1;break;case"ease-in-out":a=0,o=0,l=.58,c=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=Fme(d,4);a=m[0],o=m[1],l=m[2],c=m[3]}}}var h=g$(a,l),g=g$(o,c),x=Qme(a,l),A=function(O){return O>1?1:O<0?0:O},S=function(O){for(var E=O>1?1:O,j=E,R=0;R<8;++R){var T=h(j)-E,C=x(j);if(Math.abs(T-E)<Pm||C<Pm)return g(j);j=A(j-T/C)}return g(j)};return S.isStepper=!1,S},Jme=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,c=l===void 0?17:l,f=function(m,h,g){var x=-(m-h)*r,A=g*o,S=g+(x-A)*c/1e3,w=g*c/1e3+m;return Math.abs(w-h)<Pm&&Math.abs(S)<Pm?[h,0]:[w,S]};return f.isStepper=!0,f.dt=c,f},eve=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 y$(a);case"spring":return Jme();default:if(a.split("(")[0]==="cubic-bezier")return y$(a)}return typeof a=="function"?a:null};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 b$(e){return rve(e)||nve(e)||Z8(e)||tve()}function tve(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
475
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rve(e){if(Array.isArray(e))return b_(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 Vn(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){y_(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 y_(e,t,n){return t=ave(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ave(e){var t=ive(e,"string");return qf(t)==="symbol"?t:String(t)}function ive(e,t){if(qf(e)!=="object"||e===null)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)}function ove(e,t){return cve(e)||lve(e,t)||Z8(e,t)||sve()}function sve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
476
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z8(e,t){if(e){if(typeof e=="string")return b_(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 b_(e,t)}}function b_(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 lve(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.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 c}}function cve(e){if(Array.isArray(e))return e}var Dm=function(t,n,r){return t+(n-t)*r},x_=function(t){var n=t.from,r=t.to;return n!==r},uve=function e(t,n,r){var a=uf(function(o,l){if(x_(l)){var c=t(l.from,l.to,l.velocity),f=ove(c,2),d=f[0],m=f[1];return Vn(Vn({},l),{},{from:d,velocity:m})}return l},n);return r<1?uf(function(o,l){return x_(l)?Vn(Vn({},l),{},{velocity:Dm(l.velocity,a[o].velocity,r),from:Dm(l.from,a[o].from,r)}):l},n):e(t,a,r-1)};const fve=(function(e,t,n,r,a){var o=Ume(e,t),l=o.reduce(function(w,O){return Vn(Vn({},w),{},y_({},O,[e[O],t[O]]))},{}),c=o.reduce(function(w,O){return Vn(Vn({},w),{},y_({},O,{from:e[O],velocity:0,to:t[O]}))},{}),f=-1,d,m,h=function(){return null},g=function(){return uf(function(O,E){return E.from},c)},x=function(){return!Object.values(c).filter(x_).length},A=function(O){d||(d=O);var E=O-d,j=E/n.dt;c=uve(n,c,j),a(Vn(Vn(Vn({},e),t),g())),d=O,x()||(f=requestAnimationFrame(h))},S=function(O){m||(m=O);var E=(O-m)/r,j=uf(function(T,C){return Dm.apply(void 0,b$(C).concat([n(E)]))},l);if(a(Vn(Vn(Vn({},e),t),j)),E<1)f=requestAnimationFrame(h);else{var R=uf(function(T,C){return Dm.apply(void 0,b$(C).concat([n(1)]))},l);a(Vn(Vn(Vn({},e),t),R))}};return h=n.isStepper?A:S,function(){return requestAnimationFrame(h),function(){cancelAnimationFrame(f)}}});function cc(e){"@babel/helpers - typeof";return cc=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},cc(e)}var dve=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function hve(e,t){if(e==null)return{};var n=pve(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 pve(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 O1(e){return yve(e)||gve(e)||vve(e)||mve()}function mve(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
477
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vve(e,t){if(e){if(typeof e=="string")return w_(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 w_(e,t)}}function gve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yve(e){if(Array.isArray(e))return w_(e)}function w_(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 w$(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 xa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?w$(Object(n),!0).forEach(function(r){nf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nf(e,t,n){return t=X8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xve(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,X8(r.key),r)}}function wve(e,t,n){return t&&xve(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function X8(e){var t=Sve(e,"string");return cc(t)==="symbol"?t:String(t)}function Sve(e,t){if(cc(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cc(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _ve(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 Ave(e){var t=Ove();return function(){var r=km(e),a;if(t){var o=km(this).constructor;a=Reflect.construct(r,arguments,o)}else a=r.apply(this,arguments);return __(this,a)}}function __(e,t){if(t&&(cc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A_(e)}function A_(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ove(){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 km(e){return km=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},km(e)}var Bi=(function(e){_ve(n,e);var t=Ave(n);function n(r,a){var o;bve(this,n),o=t.call(this,r,a);var l=o.props,c=l.isActive,f=l.attributeName,d=l.from,m=l.to,h=l.steps,g=l.children,x=l.duration;if(o.handleStyleChange=o.handleStyleChange.bind(A_(o)),o.changeStyle=o.changeStyle.bind(A_(o)),!c||x<=0)return o.state={style:{}},typeof g=="function"&&(o.state={style:m}),__(o);if(h&&h.length)o.state={style:h[0].style};else if(d){if(typeof g=="function")return o.state={style:d},__(o);o.state={style:f?nf({},f,d):d}}else o.state={style:{}};return o}return wve(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,c=o.canBegin,f=o.attributeName,d=o.shouldReAnimate,m=o.to,h=o.from,g=this.state.style;if(c){if(!l){var x={style:f?nf({},f,m):m};this.state&&g&&(f&&g[f]!==m||!f&&g!==m)&&this.setState(x);return}if(!(Nme(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?h:a.to;if(this.state&&g){var w={style:f?nf({},f,S):S};(f&&g[f]!==S||!f&&g!==S)&&this.setState(w)}this.runAnimation(xa(xa({},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,c=a.to,f=a.duration,d=a.easing,m=a.begin,h=a.onAnimationEnd,g=a.onAnimationStart,x=fve(l,c,eve(d),f,this.changeStyle),A=function(){o.stopJSAnimation=x()};this.manager.start([g,m,A,f,h])}},{key:"runStepAnimation",value:function(a){var o=this,l=a.steps,c=a.begin,f=a.onAnimationStart,d=l[0],m=d.style,h=d.duration,g=h===void 0?0:h,x=function(S,w,O){if(O===0)return S;var E=w.duration,j=w.easing,R=j===void 0?"ease":j,T=w.style,C=w.properties,N=w.onAnimationEnd,D=O>0?l[O-1]:w,z=C||Object.keys(T);if(typeof R=="function"||R==="spring")return[].concat(O1(S),[o.runJSAnimation.bind(o,{from:D.style,to:T,duration:E,easing:R}),E]);var V=v$(z,E,R),U=xa(xa(xa({},D.style),T),{},{transition:V});return[].concat(O1(S),[U,E,N]).filter(qme)};return this.manager.start([f].concat(O1(l.reduce(x,[m,Math.max(g,c)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=Lme());var o=a.begin,l=a.duration,c=a.attributeName,f=a.to,d=a.easing,m=a.onAnimationStart,h=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=c?nf({},c,f):f,w=v$(Object.keys(S),l,d);A.start([m,o,xa(xa({},S),{},{transition:w}),l,h])}},{key:"render",value:function(){var a=this.props,o=a.children;a.begin;var l=a.duration;a.attributeName,a.easing;var c=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var f=hve(a,dve),d=y.Children.count(o),m=this.state.style;if(typeof o=="function")return o(m);if(!c||d===0||l<=0)return o;var h=function(x){var A=x.props,S=A.style,w=S===void 0?{}:S,O=A.className,E=y.cloneElement(x,xa(xa({},f),{},{style:xa(xa({},w),m),className:O}));return E};return d===1?h(y.Children.only(o)):L.createElement("div",null,y.Children.map(o,function(g){return h(g)}))}}]),n})(y.PureComponent);Bi.displayName="Animate";Bi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Bi.propTypes={from:Mt.oneOfType([Mt.object,Mt.string]),to:Mt.oneOfType([Mt.object,Mt.string]),attributeName:Mt.string,duration:Mt.number,begin:Mt.number,easing:Mt.oneOfType([Mt.string,Mt.func]),steps:Mt.arrayOf(Mt.shape({duration:Mt.number.isRequired,style:Mt.object.isRequired,easing:Mt.oneOfType([Mt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Mt.func]),properties:Mt.arrayOf("string"),onAnimationEnd:Mt.func})),children:Mt.oneOfType([Mt.node,Mt.func]),isActive:Mt.bool,canBegin:Mt.bool,onAnimationEnd:Mt.func,shouldReAnimate:Mt.bool,onAnimationStart:Mt.func,onAnimationReStart:Mt.func};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 $m(){return $m=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},$m.apply(this,arguments)}function Eve(e,t){return Rve(e)||Cve(e,t)||Tve(e,t)||jve()}function jve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
478
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tve(e,t){if(e){if(typeof e=="string")return S$(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 S$(e,t)}}function S$(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 Cve(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.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 c}}function Rve(e){if(Array.isArray(e))return e}function _$(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 A$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_$(Object(n),!0).forEach(function(r){Nve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_$(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 Hf(t)=="symbol"?t:t+""}function Pve(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 O$=function(t,n,r,a,o){var l=Math.min(Math.abs(r)/2,Math.abs(a)/2),c=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 h=[0,0,0,0],g=0,x=4;g<x;g++)h[g]=o[g]>l?l:o[g];m="M".concat(t,",").concat(n+c*h[0]),h[0]>0&&(m+="A ".concat(h[0],",").concat(h[0],",0,0,").concat(d,",").concat(t+f*h[0],",").concat(n)),m+="L ".concat(t+r-f*h[1],",").concat(n),h[1]>0&&(m+="A ".concat(h[1],",").concat(h[1],",0,0,").concat(d,`,
|
|
479
|
-
`).concat(t+r,",").concat(n+c*h[1])),m+="L ".concat(t+r,",").concat(n+a-c*h[2]),h[2]>0&&(m+="A ".concat(h[2],",").concat(h[2],",0,0,").concat(d,`,
|
|
480
|
-
`).concat(t+r-f*h[2],",").concat(n+a)),m+="L ".concat(t+f*h[3],",").concat(n+a),h[3]>0&&(m+="A ".concat(h[3],",").concat(h[3],",0,0,").concat(d,`,
|
|
481
|
-
`).concat(t,",").concat(n+a-c*h[3])),m+="Z"}else if(l>0&&o===+o&&o>0){var A=Math.min(l,o);m="M ".concat(t,",").concat(n+c*A,`
|
|
482
|
-
A `).concat(A,",").concat(A,",0,0,").concat(d,",").concat(t+f*A,",").concat(n,`
|
|
483
|
-
L `).concat(t+r-f*A,",").concat(n,`
|
|
484
|
-
A `).concat(A,",").concat(A,",0,0,").concat(d,",").concat(t+r,",").concat(n+c*A,`
|
|
485
|
-
L `).concat(t+r,",").concat(n+a-c*A,`
|
|
486
|
-
A `).concat(A,",").concat(A,",0,0,").concat(d,",").concat(t+r-f*A,",").concat(n+a,`
|
|
487
|
-
L `).concat(t+f*A,",").concat(n+a,`
|
|
488
|
-
A `).concat(A,",").concat(A,",0,0,").concat(d,",").concat(t,",").concat(n+a-c*A," Z")}else m="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(a," h ").concat(-r," Z");return m},Dve=function(t,n){if(!t||!n)return!1;var r=t.x,a=t.y,o=n.x,l=n.y,c=n.width,f=n.height;if(Math.abs(c)>0&&Math.abs(f)>0){var d=Math.min(o,o+c),m=Math.max(o,o+c),h=Math.min(l,l+f),g=Math.max(l,l+f);return r>=d&&r<=m&&a>=h&&a<=g}return!1},kve={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},oE=function(t){var n=A$(A$({},kve),t),r=y.useRef(),a=y.useState(-1),o=Eve(a,2),l=o[0],c=o[1];y.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var R=r.current.getTotalLength();R&&c(R)}catch{}},[]);var f=n.x,d=n.y,m=n.width,h=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||h!==+h||m===0||h===0)return null;var j=xt("recharts-rectangle",x);return E?L.createElement(Bi,{canBegin:l>0,from:{width:m,height:h,x:f,y:d},to:{width:m,height:h,x:f,y:d},duration:S,animationEasing:A,isActive:E},function(R){var T=R.width,C=R.height,N=R.x,D=R.y;return L.createElement(Bi,{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},L.createElement("path",$m({},mt(n,!0),{className:j,d:O$(N,D,T,C,g),ref:r})))}):L.createElement("path",$m({},mt(n,!0),{className:j,d:O$(f,d,m,h,g)}))};function O_(){return O_=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},O_.apply(this,arguments)}var sE=function(t){var n=t.cx,r=t.cy,a=t.r,o=t.className,l=xt("recharts-dot",o);return n===+n&&r===+r&&a===+a?y.createElement("circle",O_({},mt(t,!1),nm(t),{className:l,cx:n,cy:r,r:a})):null};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)}var $ve=["x","y","top","left","width","height","className"];function E_(){return E_=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},E_.apply(this,arguments)}function E$(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 zve(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?E$(Object(n),!0).forEach(function(r){Lve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lve(e,t,n){return t=Ive(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ive(e){var t=Bve(e,"string");return Ff(t)=="symbol"?t:t+""}function Bve(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(t==="string"?String:Number)(e)}function Uve(e,t){if(e==null)return{};var n=qve(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 qve(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 Hve=function(t,n,r,a,o,l){return"M".concat(t,",").concat(o,"v").concat(a,"M").concat(l,",").concat(n,"h").concat(r)},Fve=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,o=a===void 0?0:a,l=t.top,c=l===void 0?0:l,f=t.left,d=f===void 0?0:f,m=t.width,h=m===void 0?0:m,g=t.height,x=g===void 0?0:g,A=t.className,S=Uve(t,$ve),w=zve({x:r,y:o,top:c,left:d,width:h,height:x},S);return!Ne(r)||!Ne(o)||!Ne(h)||!Ne(x)||!Ne(c)||!Ne(d)?null:L.createElement("path",E_({},mt(w,!0),{className:xt("recharts-cross",A),d:Hve(r,o,h,x,c,d)}))},E1,j$;function Vve(){if(j$)return E1;j$=1;var e=y6(),t=e(Object.getPrototypeOf,Object);return E1=t,E1}var j1,T$;function Gve(){if(T$)return j1;T$=1;var e=Hi(),t=Vve(),n=Fi(),r="[object Object]",a=Function.prototype,o=Object.prototype,l=a.toString,c=o.hasOwnProperty,f=l.call(Object);function d(m){if(!n(m)||e(m)!=r)return!1;var h=t(m);if(h===null)return!0;var g=c.call(h,"constructor")&&h.constructor;return typeof g=="function"&&g instanceof g&&l.call(g)==f}return j1=d,j1}var Yve=Gve();const Wve=Ht(Yve);var T1,C$;function Kve(){if(C$)return T1;C$=1;var e=Hi(),t=Fi(),n="[object Boolean]";function r(a){return a===!0||a===!1||t(a)&&e(a)==n}return T1=r,T1}var Zve=Kve();const Xve=Ht(Zve);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 zm(){return zm=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},zm.apply(this,arguments)}function Qve(e,t){return nge(e)||tge(e,t)||ege(e,t)||Jve()}function Jve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
489
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ege(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 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 tge(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.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 c}}function nge(e){if(Array.isArray(e))return e}function N$(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 M$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?N$(Object(n),!0).forEach(function(r){rge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rge(e,t,n){return t=age(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function age(e){var t=ige(e,"string");return Vf(t)=="symbol"?t:t+""}function ige(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)}var P$=function(t,n,r,a,o){var l=r-a,c;return c="M ".concat(t,",").concat(n),c+="L ".concat(t+r,",").concat(n),c+="L ".concat(t+r-l/2,",").concat(n+o),c+="L ".concat(t+r-l/2-a,",").concat(n+o),c+="L ".concat(t,",").concat(n," Z"),c},oge={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},sge=function(t){var n=M$(M$({},oge),t),r=y.useRef(),a=y.useState(-1),o=Qve(a,2),l=o[0],c=o[1];y.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var j=r.current.getTotalLength();j&&c(j)}catch{}},[]);var f=n.x,d=n.y,m=n.upperWidth,h=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||h!==+h||g!==+g||m===0&&h===0||g===0)return null;var E=xt("recharts-trapezoid",x);return O?L.createElement(Bi,{canBegin:l>0,from:{upperWidth:0,lowerWidth:0,height:g,x:f,y:d},to:{upperWidth:m,lowerWidth:h,height:g,x:f,y:d},duration:S,animationEasing:A,isActive:O},function(j){var R=j.upperWidth,T=j.lowerWidth,C=j.height,N=j.x,D=j.y;return L.createElement(Bi,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:S,easing:A},L.createElement("path",zm({},mt(n,!0),{className:E,d:P$(N,D,R,T,C),ref:r})))}):L.createElement("g",null,L.createElement("path",zm({},mt(n,!0),{className:E,d:P$(f,d,m,h,g)})))},lge=["option","shapeType","propTransformer","activeClassName","isActive"];function Gf(e){"@babel/helpers - typeof";return Gf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gf(e)}function cge(e,t){if(e==null)return{};var n=uge(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 uge(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 Lm(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){fge(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 fge(e,t,n){return t=dge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dge(e){var t=hge(e,"string");return Gf(t)=="symbol"?t:t+""}function hge(e,t){if(Gf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pge(e,t){return Lm(Lm({},t),e)}function mge(e,t){return e==="symbols"}function k$(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return L.createElement(oE,n);case"trapezoid":return L.createElement(sge,n);case"sector":return L.createElement(F8,n);case"symbols":if(mge(t))return L.createElement(OO,n);break;default:return null}}function vge(e){return y.isValidElement(e)?e.props:e}function gge(e){var t=e.option,n=e.shapeType,r=e.propTransformer,a=r===void 0?pge:r,o=e.activeClassName,l=o===void 0?"recharts-active-shape":o,c=e.isActive,f=cge(e,lge),d;if(y.isValidElement(t))d=y.cloneElement(t,Lm(Lm({},f),vge(t)));else if(lt(t))d=t(f);else if(Wve(t)&&!Xve(t)){var m=a(t,f);d=L.createElement(k$,{shapeType:n,elementProps:m})}else{var h=f;d=L.createElement(k$,{shapeType:n,elementProps:h})}return c?L.createElement(sn,{className:l},d):d}function og(e,t){return t!=null&&"trapezoids"in e.props}function sg(e,t){return t!=null&&"sectors"in e.props}function Yf(e,t){return t!=null&&"points"in e.props}function yge(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 bge(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function xge(e,t){var n=e.x===t.x,r=e.y===t.y,a=e.z===t.z;return n&&r&&a}function wge(e,t){var n;return og(e,t)?n=yge:sg(e,t)?n=bge:Yf(e,t)&&(n=xge),n}function Sge(e,t){var n;return og(e,t)?n="trapezoids":sg(e,t)?n="sectors":Yf(e,t)&&(n="points"),n}function _ge(e,t){if(og(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(sg(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 Yf(e,t)?t.payload:{}}function Age(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,a=Sge(n,t),o=_ge(n,t),l=r.filter(function(f,d){var m=Rf(o,f),h=n.props[a].filter(function(A){var S=wge(n,t);return S(A,t)}),g=n.props[a].indexOf(h[h.length-1]),x=d===g;return m&&x}),c=r.indexOf(l[l.length-1]);return c}var C1,$$;function Oge(){if($$)return C1;$$=1;var e=Math.ceil,t=Math.max;function n(r,a,o,l){for(var c=-1,f=t(e((a-r)/(o||1)),0),d=Array(f);f--;)d[l?f:++c]=r,r+=o;return d}return C1=n,C1}var R1,z$;function Q8(){if(z$)return R1;z$=1;var e=D6(),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 R1=r,R1}var N1,L$;function Ege(){if(L$)return N1;L$=1;var e=Oge(),t=Kv(),n=Q8();function r(a){return function(o,l,c){return c&&typeof c!="number"&&t(o,l,c)&&(l=c=void 0),o=n(o),l===void 0?(l=o,o=0):l=n(l),c=c===void 0?o<l?1:-1:n(c),e(o,l,c,a)}}return N1=r,N1}var M1,I$;function jge(){if(I$)return M1;I$=1;var e=Ege(),t=e();return M1=t,M1}var Tge=jge();const Im=Ht(Tge);function Wf(e){"@babel/helpers - typeof";return Wf=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},Wf(e)}function B$(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 U$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B$(Object(n),!0).forEach(function(r){J8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function J8(e,t,n){return t=Cge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cge(e){var t=Rge(e,"string");return Wf(t)=="symbol"?t:t+""}function Rge(e,t){if(Wf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Nge=["Webkit","Moz","O","ms"],Mge=function(t,n){var r=t.replace(/(\w)/,function(o){return o.toUpperCase()}),a=Nge.reduce(function(o,l){return U$(U$({},o),{},J8({},l+r,n))},{});return a[t]=n,a};function uc(e){"@babel/helpers - typeof";return uc=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},uc(e)}function Bm(){return Bm=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},Bm.apply(this,arguments)}function q$(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 P1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?q$(Object(n),!0).forEach(function(r){Cr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H$(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,tU(r.key),r)}}function Dge(e,t,n){return t&&H$(e.prototype,t),n&&H$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function kge(e,t,n){return t=Um(t),$ge(e,eU()?Reflect.construct(t,n||[],Um(e).constructor):t.apply(e,n))}function $ge(e,t){if(t&&(uc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zge(e)}function zge(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 Um(e){return Um=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Um(e)}function Lge(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&&j_(e,t)}function j_(e,t){return j_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},j_(e,t)}function Cr(e,t,n){return t=tU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tU(e){var t=Ige(e,"string");return uc(t)=="symbol"?t:t+""}function Ige(e,t){if(uc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(uc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Bge=function(t){var n=t.data,r=t.startIndex,a=t.endIndex,o=t.x,l=t.width,c=t.travellerWidth;if(!n||!n.length)return{};var f=n.length,d=sf().domain(Im(0,f)).range([o,o+l-c]),m=d.domain().map(function(h){return d(h)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:d(r),endX:d(a),scale:d,scaleValues:m}},F$=function(t){return t.changedTouches&&!!t.changedTouches.length},fc=(function(e){function t(n){var r;return Pge(this,t),r=kge(this,t,[n]),Cr(r,"handleDrag",function(a){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(a):r.state.isSlideMoving&&r.handleSlideDrag(a)}),Cr(r,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&r.handleDrag(a.changedTouches[0])}),Cr(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=r.props,o=a.endIndex,l=a.onDragEnd,c=a.startIndex;l==null||l({endIndex:o,startIndex:c})}),r.detachDragEndListener()}),Cr(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Cr(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Cr(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Cr(r,"handleSlideDragStart",function(a){var o=F$(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 Lge(t,e),Dge(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,c=this.props,f=c.gap,d=c.data,m=d.length-1,h=Math.min(a,o),g=Math.max(a,o),x=t.getIndexInRange(l,h),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,c=a.dataKey,f=Br(o[r],c,r);return lt(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,c=a.endX,f=this.props,d=f.x,m=f.width,h=f.travellerWidth,g=f.startIndex,x=f.endIndex,A=f.onChange,S=r.pageX-o;S>0?S=Math.min(S,d+m-h-c,d+m-h-l):S<0&&(S=Math.max(S,d-l,d-c));var w=this.getIndex({startX:l+S,endX:c+S});(w.startIndex!==g||w.endIndex!==x)&&A&&A(w),this.setState({startX:l+S,endX:c+S,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,a){var o=F$(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,c=a.endX,f=a.startX,d=this.state[l],m=this.props,h=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,h+g-x-d):E<0&&(E=Math.max(E,h-d)),O[l]=d+E;var j=this.getIndex(O),R=j.startIndex,T=j.endIndex,C=function(){var D=w.length-1;return l==="startX"&&(c>f?R%S===0:T%S===0)||c<f&&T===D||l==="endX"&&(c>f?T%S===0:R%S===0)||c>f&&T===D};this.setState(Cr(Cr({},l,d+E),"brushMoveStartX",r.pageX),function(){A&&C()&&A(j)})}},{key:"handleTravellerMoveKeyboard",value:function(r,a){var o=this,l=this.state,c=l.scaleValues,f=l.startX,d=l.endX,m=this.state[a],h=c.indexOf(m);if(h!==-1){var g=h+r;if(!(g===-1||g>=c.length)){var x=c[g];a==="startX"&&x>=d||a==="endX"&&x<=f||this.setState(Cr({},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,c=r.height,f=r.fill,d=r.stroke;return L.createElement("rect",{stroke:d,fill:f,x:a,y:o,width:l,height:c})}},{key:"renderPanorama",value:function(){var r=this.props,a=r.x,o=r.y,l=r.width,c=r.height,f=r.data,d=r.children,m=r.padding,h=y.Children.only(d);return h?L.cloneElement(h,{x:a,y:o,width:l,height:c,margin:m,compact:!0,data:f}):null}},{key:"renderTravellerLayer",value:function(r,a){var o,l,c=this,f=this.props,d=f.y,m=f.travellerWidth,h=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=P1(P1({},mt(this.props,!1)),{},{x:O,y:d,width:m,height:h}),j=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 L.createElement(sn,{tabIndex:0,role:"slider","aria-label":j,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(T){["ArrowLeft","ArrowRight"].includes(T.key)&&(T.preventDefault(),T.stopPropagation(),c.handleTravellerMoveKeyboard(T.key==="ArrowRight"?1:-1,a))},onFocus:function(){c.setState({isTravellerFocused:!0})},onBlur:function(){c.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(g,E))}},{key:"renderSlide",value:function(r,a){var o=this.props,l=o.y,c=o.height,f=o.stroke,d=o.travellerWidth,m=Math.min(r,a)+d,h=Math.max(Math.abs(a-r)-d,0);return L.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:h,height:c})}},{key:"renderText",value:function(){var r=this.props,a=r.startIndex,o=r.endIndex,l=r.y,c=r.height,f=r.travellerWidth,d=r.stroke,m=this.state,h=m.startX,g=m.endX,x=5,A={pointerEvents:"none",fill:d};return L.createElement(sn,{className:"recharts-brush-texts"},L.createElement(pm,Bm({textAnchor:"end",verticalAnchor:"middle",x:Math.min(h,g)-x,y:l+c/2},A),this.getTextOfTick(a)),L.createElement(pm,Bm({textAnchor:"start",verticalAnchor:"middle",x:Math.max(h,g)+f+x,y:l+c/2},A),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,a=r.data,o=r.className,l=r.children,c=r.x,f=r.y,d=r.width,m=r.height,h=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||!Ne(c)||!Ne(f)||!Ne(d)||!Ne(m)||d<=0||m<=0)return null;var j=xt("recharts-brush",o),R=L.Children.count(l)===1,T=Mge("userSelect","none");return L.createElement(sn,{className:j,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:T},this.renderBackground(),R&&this.renderPanorama(),this.renderSlide(x,A),this.renderTravellerLayer(x,"startX"),this.renderTravellerLayer(A,"endX"),(S||w||O||E||h)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var a=r.x,o=r.y,l=r.width,c=r.height,f=r.stroke,d=Math.floor(o+c/2)-1;return L.createElement(L.Fragment,null,L.createElement("rect",{x:a,y:o,width:l,height:c,fill:f,stroke:"none"}),L.createElement("line",{x1:a+1,y1:d,x2:a+l-1,y2:d,fill:"none",stroke:"#fff"}),L.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 L.isValidElement(r)?o=L.cloneElement(r,a):lt(r)?o=r(a):o=t.renderDefaultTraveller(a),o}},{key:"getDerivedStateFromProps",value:function(r,a){var o=r.data,l=r.width,c=r.x,f=r.travellerWidth,d=r.updateId,m=r.startIndex,h=r.endIndex;if(o!==a.prevData||d!==a.prevUpdateId)return P1({prevData:o,prevTravellerWidth:f,prevUpdateId:d,prevX:c,prevWidth:l},o&&o.length?Bge({data:o,width:l,x:c,travellerWidth:f,startIndex:m,endIndex:h}):{scale:null,scaleValues:null});if(a.scale&&(l!==a.prevWidth||c!==a.prevX||f!==a.prevTravellerWidth)){a.scale.range([c,c+l-f]);var g=a.scale.domain().map(function(x){return a.scale(x)});return{prevData:o,prevTravellerWidth:f,prevUpdateId:d,prevX:c,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,c=o-1;c-l>1;){var f=Math.floor((l+c)/2);r[f]>a?c=f:l=f}return a>=r[c]?c:l}}])})(y.PureComponent);Cr(fc,"displayName","Brush");Cr(fc,"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 D1,V$;function Uge(){if(V$)return D1;V$=1;var e=MO();function t(n,r){var a;return e(n,function(o,l,c){return a=r(o,l,c),!a}),!!a}return D1=t,D1}var k1,G$;function qge(){if(G$)return k1;G$=1;var e=f6(),t=Lo(),n=Uge(),r=xr(),a=Kv();function o(l,c,f){var d=r(l)?e:n;return f&&a(l,c,f)&&(c=void 0),d(l,t(c,3))}return k1=o,k1}var Hge=qge();const Fge=Ht(Hge);var Qa=function(t,n){var r=t.alwaysShow,a=t.ifOverflow;return r&&(a="extendDomain"),a===n},$1,Y$;function Vge(){if(Y$)return $1;Y$=1;var e=C6();function t(n,r,a){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:a,writable:!0}):n[r]=a}return $1=t,$1}var z1,W$;function Gge(){if(W$)return z1;W$=1;var e=Vge(),t=j6(),n=Lo();function r(a,o){var l={};return o=n(o,3),t(a,function(c,f,d){e(l,f,o(c,f,d))}),l}return z1=r,z1}var Yge=Gge();const Wge=Ht(Yge);var L1,K$;function Kge(){if(K$)return L1;K$=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 L1=e,L1}var I1,Z$;function Zge(){if(Z$)return I1;Z$=1;var e=MO();function t(n,r){var a=!0;return e(n,function(o,l,c){return a=!!r(o,l,c),a}),a}return I1=t,I1}var B1,X$;function Xge(){if(X$)return B1;X$=1;var e=Kge(),t=Zge(),n=Lo(),r=xr(),a=Kv();function o(l,c,f){var d=r(l)?e:t;return f&&a(l,c,f)&&(c=void 0),d(l,n(c,3))}return B1=o,B1}var Qge=Xge();const nU=Ht(Qge);var Jge=["x","y"];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 T_(){return T_=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},T_.apply(this,arguments)}function Q$(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 Wu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Q$(Object(n),!0).forEach(function(r){eye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eye(e,t,n){return t=tye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tye(e){var t=nye(e,"string");return Kf(t)=="symbol"?t:t+""}function nye(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)}function rye(e,t){if(e==null)return{};var n=aye(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 aye(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 iye(e,t){var n=e.x,r=e.y,a=rye(e,Jge),o="".concat(n),l=parseInt(o,10),c="".concat(r),f=parseInt(c,10),d="".concat(t.height||a.height),m=parseInt(d,10),h="".concat(t.width||a.width),g=parseInt(h,10);return Wu(Wu(Wu(Wu(Wu({},t),a),l?{x:l}:{}),f?{y:f}:{}),{},{height:m,width:g,name:t.name,radius:t.radius})}function J$(e){return L.createElement(gge,T_({shapeType:"rectangle",propTransformer:iye,activeClassName:"recharts-active-bar"},e))}var oye=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=Ne(r)||fie(r);return o?t(r,a):(o||Ps(),n)}},sye=["value","background"],rU;function dc(e){"@babel/helpers - typeof";return dc=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},dc(e)}function lye(e,t){if(e==null)return{};var n=cye(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 cye(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 qm(){return qm=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},qm.apply(this,arguments)}function ez(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?ez(Object(n),!0).forEach(function(r){Oo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ez(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tz(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 fye(e,t,n){return t&&tz(e.prototype,t),n&&tz(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function dye(e,t,n){return t=Hm(t),hye(e,aU()?Reflect.construct(t,n||[],Hm(e).constructor):t.apply(e,n))}function hye(e,t){if(t&&(dc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pye(e)}function pye(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 Hm(e){return Hm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hm(e)}function mye(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&&C_(e,t)}function C_(e,t){return C_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},C_(e,t)}function Oo(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 dc(t)=="symbol"?t:t+""}function vye(e,t){if(dc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(dc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Pd=(function(e){function t(){var n;uye(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=dye(this,t,[].concat(a)),Oo(n,"state",{isAnimationFinished:!1}),Oo(n,"id",jd("recharts-bar-")),Oo(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),l&&l()}),Oo(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),l&&l()}),n}return mye(t,e),fye(t,[{key:"renderRectanglesStatically",value:function(r){var a=this,o=this.props,l=o.shape,c=o.dataKey,f=o.activeIndex,d=o.activeBar,m=mt(this.props,!1);return r&&r.map(function(h,g){var x=g===f,A=x?d:l,S=An(An(An({},m),h),{},{isActive:x,option:A,index:g,dataKey:c,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return L.createElement(sn,qm({className:"recharts-bar-rectangle"},rm(a.props,h,g),{key:"rectangle-".concat(h==null?void 0:h.x,"-").concat(h==null?void 0:h.y,"-").concat(h==null?void 0:h.value,"-").concat(g)}),L.createElement(J$,S))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,a=this.props,o=a.data,l=a.layout,c=a.isAnimationActive,f=a.animationBegin,d=a.animationDuration,m=a.animationEasing,h=a.animationId,g=this.state.prevData;return L.createElement(Bi,{begin:f,duration:d,isActive:c,easing:m,from:{t:0},to:{t:1},key:"bar-".concat(h),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 j=aa(E.x,w.x),R=aa(E.y,w.y),T=aa(E.width,w.width),C=aa(E.height,w.height);return An(An({},w),{},{x:j(A),y:R(A),width:T(A),height:C(A)})}if(l==="horizontal"){var N=aa(0,w.height),D=N(A);return An(An({},w),{},{y:w.y+w.height-D,height:D})}var z=aa(0,w.width),V=z(A);return An(An({},w),{},{width:V})});return L.createElement(sn,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||!Rf(l,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var r=this,a=this.props,o=a.data,l=a.dataKey,c=a.activeIndex,f=mt(this.props.background,!1);return o.map(function(d,m){d.value;var h=d.background,g=lye(d,sye);if(!h)return null;var x=An(An(An(An(An({},g),{},{fill:"#eee"},h),f),rm(r.props,d,m)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:l,index:m,className:"recharts-bar-background-rectangle"});return L.createElement(J$,qm({key:"background-bar-".concat(m),option:r.props.background,isActive:m===c},x))})}},{key:"renderErrorBar",value:function(r,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,l=o.data,c=o.xAxis,f=o.yAxis,d=o.layout,m=o.children,h=Na(m,ig);if(!h)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:Br(w,O)}},A={clipPath:r?"url(#clipPath-".concat(a,")"):null};return L.createElement(sn,A,h.map(function(S){return L.cloneElement(S,{key:"error-bar-".concat(a,"-").concat(S.props.dataKey),data:l,xAxis:c,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,c=r.xAxis,f=r.yAxis,d=r.left,m=r.top,h=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=xt("recharts-bar",l),E=c&&c.allowDataOverflow,j=f&&f.allowDataOverflow,R=E||j,T=yt(S)?this.id:S;return L.createElement(sn,{className:O},E||j?L.createElement("defs",null,L.createElement("clipPath",{id:"clipPath-".concat(T)},L.createElement("rect",{x:E?d:d-h/2,y:j?m:m-g/2,width:E?h:h*2,height:j?g:g*2}))):null,L.createElement(sn,{className:"recharts-bar-rectangles",clipPath:R?"url(#clipPath-".concat(T,")"):null},A?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(R,T),(!x||w)&&jo.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);rU=Pd;Oo(Pd,"displayName","Bar");Oo(Pd,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Ic.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Oo(Pd,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,a=e.bandSize,o=e.xAxis,l=e.yAxis,c=e.xAxisTicks,f=e.yAxisTicks,d=e.stackedData,m=e.dataStartIndex,h=e.displayedData,g=e.offset,x=Nhe(r,n);if(!x)return null;var A=t.layout,S=n.type.defaultProps,w=S!==void 0?An(An({},S),n.props):n.props,O=w.dataKey,E=w.children,j=w.minPointSize,R=A==="horizontal"?l:o,T=d?R.scale.domain():null,C=Ihe({numericAxis:R}),N=Na(E,$6),D=h.map(function(z,V){var U,P,B,q,Y,$;d?U=Mhe(d[m+V],T):(U=Br(z,O),Array.isArray(U)||(U=[C,U]));var G=oye(j,rU.defaultProps.minPointSize)(U[1],V);if(A==="horizontal"){var F,K=[l.scale(U[0]),l.scale(U[1])],ne=K[0],I=K[1];P=Uk({axis:o,ticks:c,bandSize:a,offset:x.offset,entry:z,index:V}),B=(F=I??ne)!==null&&F!==void 0?F:void 0,q=x.size;var Z=ne-I;if(Y=Number.isNaN(Z)?0:Z,$={x:P,y:l.y,width:q,height:l.height},Math.abs(G)>0&&Math.abs(Y)<Math.abs(G)){var Q=Ta(Y||G)*(Math.abs(G)-Math.abs(Y));B-=Q,Y+=Q}}else{var fe=[o.scale(U[0]),o.scale(U[1])],le=fe[0],Se=fe[1];if(P=le,B=Uk({axis:l,ticks:f,bandSize:a,offset:x.offset,entry:z,index:V}),q=Se-le,Y=x.size,$={x:o.x,y:B,width:o.width,height:Y},Math.abs(G)>0&&Math.abs(q)<Math.abs(G)){var ve=Ta(q||G)*(Math.abs(G)-Math.abs(q));q+=ve}}return An(An(An({},z),{},{x:P,y:B,width:q,height:Y,value:d?U:U[1],payload:z,background:$},N&&N[V]&&N[V].props),{},{tooltipPayload:[U8(n,z)],tooltipPosition:{x:P+q/2,y:B+Y/2}})});return An({data:D,layout:A},g)});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 gye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nz(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 yye(e,t,n){return t&&nz(e.prototype,t),n&&nz(e,n),Object.defineProperty(e,"prototype",{writable:!1}),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 _a(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){lg(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 lg(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=bye(e,"string");return Zf(t)=="symbol"?t:t+""}function bye(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 xye=function(t,n,r,a,o){var l=t.width,c=t.height,f=t.layout,d=t.children,m=Object.keys(n),h={left:r.left,leftMirror:r.left,right:l-r.right,rightMirror:l-r.right,top:r.top,topMirror:r.top,bottom:c-r.bottom,bottomMirror:c-r.bottom},g=!!Rr(d,Pd);return m.reduce(function(x,A){var S=n[A],w=S.orientation,O=S.domain,E=S.padding,j=E===void 0?{}:E,R=S.mirror,T=S.reversed,C="".concat(w).concat(R?"Mirror":""),N,D,z,V,U;if(S.type==="number"&&(S.padding==="gap"||S.padding==="no-gap")){var P=O[1]-O[0],B=1/0,q=S.categoricalDomain.sort(pie);if(q.forEach(function(fe,le){le>0&&(B=Math.min((fe||0)-(q[le-1]||0),B))}),Number.isFinite(B)){var Y=B/P,$=S.layout==="vertical"?r.height:r.width;if(S.padding==="gap"&&(N=Y*$/2),S.padding==="no-gap"){var G=Ns(t.barCategoryGap,Y*$),F=Y*$/2;N=F-G-(F-G)/$*G}}}a==="xAxis"?D=[r.left+(j.left||0)+(N||0),r.left+r.width-(j.right||0)-(N||0)]:a==="yAxis"?D=f==="horizontal"?[r.top+r.height-(j.bottom||0),r.top+(j.top||0)]:[r.top+(j.top||0)+(N||0),r.top+r.height-(j.bottom||0)-(N||0)]:D=S.range,T&&(D=[D[1],D[0]]);var K=Che(S,o,g),ne=K.scale,I=K.realScaleType;ne.domain(O).range(D),Rhe(ne);var Z=Lhe(ne,_a(_a({},S),{},{realScaleType:I}));a==="xAxis"?(U=w==="top"&&!R||w==="bottom"&&R,z=r.left,V=h[C]-U*S.height):a==="yAxis"&&(U=w==="left"&&!R||w==="right"&&R,z=h[C]-U*S.width,V=r.top);var Q=_a(_a(_a({},S),Z),{},{realScaleType:I,x:z,y:V,scale:ne,width:a==="xAxis"?r.width:S.width,height:a==="yAxis"?r.height:S.height});return Q.bandSize=Cm(Q,Z),!S.hide&&a==="xAxis"?h[C]+=(U?-1:1)*Q.height:S.hide||(h[C]+=(U?-1:1)*Q.width),_a(_a({},x),{},lg({},A,Q))},{})},sU=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)}},wye=function(t){var n=t.x1,r=t.y1,a=t.x2,o=t.y2;return sU({x:n,y:r},{x:a,y:o})},lU=(function(){function e(t){gye(this,e),this.scale=t}return yye(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 c=this.bandwidth?this.bandwidth():0;return this.scale(n)+c}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)}}])})();lg(lU,"EPS",1e-4);var lE=function(t){var n=Object.keys(t).reduce(function(r,a){return _a(_a({},r),{},lg({},a,lU.create(t[a])))},{});return _a(_a({},n),{},{apply:function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.bandAware,c=o.position;return Wge(a,function(f,d){return n[d].apply(f,{bandAware:l,position:c})})},isInRange:function(a){return nU(a,function(o,l){return n[l].isInRange(o)})}})};function Sye(e){return(e%180+180)%180}var _ye=function(t){var n=t.width,r=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=Sye(a),l=o*Math.PI/180,c=Math.atan(r/n),f=l>c&&l<Math.PI-c?r/Math.sin(l):n/Math.cos(l);return Math.abs(f)},U1,az;function Aye(){if(az)return U1;az=1;var e=Lo(),t=Td(),n=Yv();function r(a){return function(o,l,c){var f=Object(o);if(!t(o)){var d=e(l,3);o=n(o),l=function(h){return d(f[h],h,f)}}var m=a(o,l,c);return m>-1?f[d?o[m]:m]:void 0}}return U1=r,U1}var q1,iz;function Oye(){if(iz)return q1;iz=1;var e=Q8();function t(n){var r=e(n),a=r%1;return r===r?a?r-a:r:0}return q1=t,q1}var H1,oz;function Eye(){if(oz)return H1;oz=1;var e=S6(),t=Lo(),n=Oye(),r=Math.max;function a(o,l,c){var f=o==null?0:o.length;if(!f)return-1;var d=c==null?0:n(c);return d<0&&(d=r(f+d,0)),e(o,t(l,3),d)}return H1=a,H1}var F1,sz;function jye(){if(sz)return F1;sz=1;var e=Aye(),t=Eye(),n=e(t);return F1=n,F1}var Tye=jye();const Cye=Ht(Tye);var Rye=LB();const Nye=Ht(Rye);var Mye=Nye(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("")}),cE=y.createContext(void 0),uE=y.createContext(void 0),cU=y.createContext(void 0),uU=y.createContext({}),fU=y.createContext(void 0),dU=y.createContext(0),hU=y.createContext(0),lz=function(t){var n=t.state,r=n.xAxisMap,a=n.yAxisMap,o=n.offset,l=t.clipPathId,c=t.children,f=t.width,d=t.height,m=Mye(o);return L.createElement(cE.Provider,{value:r},L.createElement(uE.Provider,{value:a},L.createElement(uU.Provider,{value:o},L.createElement(cU.Provider,{value:m},L.createElement(fU.Provider,{value:l},L.createElement(dU.Provider,{value:d},L.createElement(hU.Provider,{value:f},c)))))))},Pye=function(){return y.useContext(fU)},pU=function(t){var n=y.useContext(cE);n==null&&Ps();var r=n[t];return r==null&&Ps(),r},Dye=function(){var t=y.useContext(cE);return _o(t)},kye=function(){var t=y.useContext(uE),n=Cye(t,function(r){return nU(r.domain,Number.isFinite)});return n||_o(t)},mU=function(t){var n=y.useContext(uE);n==null&&Ps();var r=n[t];return r==null&&Ps(),r},$ye=function(){var t=y.useContext(cU);return t},zye=function(){return y.useContext(uU)},fE=function(){return y.useContext(hU)},dE=function(){return y.useContext(dU)};function hc(e){"@babel/helpers - typeof";return hc=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},hc(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,gU(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=Fm(t),qye(e,vU()?Reflect.construct(t,n||[],Fm(e).constructor):t.apply(e,n))}function qye(e,t){if(t&&(hc(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 vU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vU=function(){return!!e})()}function Fm(e){return Fm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fm(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&&R_(e,t)}function R_(e,t){return R_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},R_(e,t)}function cz(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 uz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cz(Object(n),!0).forEach(function(r){hE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hE(e,t,n){return t=gU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gU(e){var t=Vye(e,"string");return hc(t)=="symbol"?t:t+""}function Vye(e,t){if(hc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Gye(e,t){return Zye(e)||Kye(e,t)||Wye(e,t)||Yye()}function Yye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
490
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wye(e,t){if(e){if(typeof e=="string")return fz(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 fz(e,t)}}function fz(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 Kye(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.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 c}}function Zye(e){if(Array.isArray(e))return e}function N_(){return N_=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},N_.apply(this,arguments)}var Xye=function(t,n){var r;return L.isValidElement(t)?r=L.cloneElement(t,n):lt(t)?r=t(n):r=L.createElement("line",N_({},n,{className:"recharts-reference-line-line"})),r},Qye=function(t,n,r,a,o,l,c,f,d){var m=o.x,h=o.y,g=o.width,x=o.height;if(r){var A=d.y,S=t.y.apply(A,{position:l});if(Qa(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(Qa(d,"discard")&&!t.x.isInRange(E))return null;var j=[{x:E,y:h+x},{x:E,y:h}];return c==="top"?j.reverse():j}if(a){var R=d.segment,T=R.map(function(C){return t.apply(C,{position:l})});return Qa(d,"discard")&&Fge(T,function(C){return!t.isInRange(C)})?null:T}return null};function Jye(e){var t=e.x,n=e.y,r=e.segment,a=e.xAxisId,o=e.yAxisId,l=e.shape,c=e.className,f=e.alwaysShow,d=Pye(),m=pU(a),h=mU(o),g=$ye();if(!d||!g)return null;Mi(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var x=lE({x:m.scale,y:h.scale}),A=Mn(t),S=Mn(n),w=r&&r.length===2,O=Qye(x,A,S,w,g,e.position,m.orientation,h.orientation,e);if(!O)return null;var E=Gye(O,2),j=E[0],R=j.x,T=j.y,C=E[1],N=C.x,D=C.y,z=Qa(e,"hidden")?"url(#".concat(d,")"):void 0,V=uz(uz({clipPath:z},mt(e,!0)),{},{x1:R,y1:T,x2:N,y2:D});return L.createElement(sn,{className:xt("recharts-reference-line",c)},Xye(l,V),nr.renderCallByParent(e,wye({x1:R,y1:T,x2:N,y2:D})))}var pE=(function(e){function t(){return Lye(this,t),Uye(this,t,arguments)}return Fye(t,e),Bye(t,[{key:"render",value:function(){return L.createElement(Jye,this.props)}}])})(L.Component);hE(pE,"displayName","ReferenceLine");hE(pE,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function M_(){return M_=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},M_.apply(this,arguments)}function pc(e){"@babel/helpers - typeof";return pc=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},pc(e)}function dz(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 hz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dz(Object(n),!0).forEach(function(r){cg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ebe(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,bU(r.key),r)}}function nbe(e,t,n){return t&&tbe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function rbe(e,t,n){return t=Vm(t),abe(e,yU()?Reflect.construct(t,n||[],Vm(e).constructor):t.apply(e,n))}function abe(e,t){if(t&&(pc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ibe(e)}function ibe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yU=function(){return!!e})()}function Vm(e){return Vm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vm(e)}function obe(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&&P_(e,t)}function P_(e,t){return P_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},P_(e,t)}function cg(e,t,n){return t=bU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bU(e){var t=sbe(e,"string");return pc(t)=="symbol"?t:t+""}function sbe(e,t){if(pc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var lbe=function(t){var n=t.x,r=t.y,a=t.xAxis,o=t.yAxis,l=lE({x:a.scale,y:o.scale}),c=l.apply({x:n,y:r},{bandAware:!0});return Qa(t,"discard")&&!l.isInRange(c)?null:c},ug=(function(e){function t(){return ebe(this,t),rbe(this,t,arguments)}return obe(t,e),nbe(t,[{key:"render",value:function(){var r=this.props,a=r.x,o=r.y,l=r.r,c=r.alwaysShow,f=r.clipPathId,d=Mn(a),m=Mn(o);if(Mi(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!d||!m)return null;var h=lbe(this.props);if(!h)return null;var g=h.x,x=h.y,A=this.props,S=A.shape,w=A.className,O=Qa(this.props,"hidden")?"url(#".concat(f,")"):void 0,E=hz(hz({clipPath:O},mt(this.props,!0)),{},{cx:g,cy:x});return L.createElement(sn,{className:xt("recharts-reference-dot",w)},t.renderDot(S,E),nr.renderCallByParent(this.props,{x:g-l,y:x-l,width:2*l,height:2*l}))}}])})(L.Component);cg(ug,"displayName","ReferenceDot");cg(ug,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});cg(ug,"renderDot",function(e,t){var n;return L.isValidElement(e)?n=L.cloneElement(e,t):lt(e)?n=e(t):n=L.createElement(sE,M_({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function D_(){return D_=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},D_.apply(this,arguments)}function mc(e){"@babel/helpers - typeof";return mc=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},mc(e)}function pz(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 mz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pz(Object(n),!0).forEach(function(r){fg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ube(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 fbe(e,t,n){return t&&ube(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function dbe(e,t,n){return t=Gm(t),hbe(e,xU()?Reflect.construct(t,n||[],Gm(e).constructor):t.apply(e,n))}function hbe(e,t){if(t&&(mc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pbe(e)}function pbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xU=function(){return!!e})()}function Gm(e){return Gm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gm(e)}function mbe(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&&k_(e,t)}function k_(e,t){return k_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},k_(e,t)}function fg(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=vbe(e,"string");return mc(t)=="symbol"?t:t+""}function vbe(e,t){if(mc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var gbe=function(t,n,r,a,o){var l=o.x1,c=o.x2,f=o.y1,d=o.y2,m=o.xAxis,h=o.yAxis;if(!m||!h)return null;var g=lE({x:m.scale,y:h.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(c,{position:"end"}):g.x.rangeMax,y:a?g.y.apply(d,{position:"end"}):g.y.rangeMax};return Qa(o,"discard")&&(!g.isInRange(x)||!g.isInRange(A))?null:sU(x,A)},dg=(function(e){function t(){return cbe(this,t),dbe(this,t,arguments)}return mbe(t,e),fbe(t,[{key:"render",value:function(){var r=this.props,a=r.x1,o=r.x2,l=r.y1,c=r.y2,f=r.className,d=r.alwaysShow,m=r.clipPathId;Mi(d===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Mn(a),g=Mn(o),x=Mn(l),A=Mn(c),S=this.props.shape;if(!h&&!g&&!x&&!A&&!S)return null;var w=gbe(h,g,x,A,this.props);if(!w&&!S)return null;var O=Qa(this.props,"hidden")?"url(#".concat(m,")"):void 0;return L.createElement(sn,{className:xt("recharts-reference-area",f)},t.renderRect(S,mz(mz({clipPath:O},mt(this.props,!0)),w)),nr.renderCallByParent(this.props,w))}}])})(L.Component);fg(dg,"displayName","ReferenceArea");fg(dg,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});fg(dg,"renderRect",function(e,t){var n;return L.isValidElement(e)?n=L.cloneElement(e,t):lt(e)?n=e(t):n=L.createElement(oE,D_({},t,{className:"recharts-reference-area-rect"})),n});function SU(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 ybe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return _ye(r,n)}function bbe(e,t,n){var r=n==="width",a=e.x,o=e.y,l=e.width,c=e.height;return t===1?{start:r?a:o,end:r?a+l:o+c}:{start:r?a+l:o+c,end:r?a:o}}function Ym(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 xbe(e,t){return SU(e,t+1)}function wbe(e,t,n,r,a){for(var o=(r||[]).slice(),l=t.start,c=t.end,f=0,d=1,m=l,h=function(){var A=r==null?void 0:r[f];if(A===void 0)return{v:SU(r,d)};var S=f,w,O=function(){return w===void 0&&(w=n(A,S)),w},E=A.coordinate,j=f===0||Ym(e,E,O,m,c);j||(f=0,m=l,d+=1),j&&(m=E+e*(O()/2+a),f+=d)},g;d<=o.length;)if(g=h(),g)return g.v;return[]}function Xf(e){"@babel/helpers - typeof";return Xf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xf(e)}function vz(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 er(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vz(Object(n),!0).forEach(function(r){Sbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sbe(e,t,n){return t=_be(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _be(e){var t=Abe(e,"string");return Xf(t)=="symbol"?t:t+""}function Abe(e,t){if(Xf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Obe(e,t,n,r,a){for(var o=(r||[]).slice(),l=o.length,c=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=er(er({},x),{},{tickCoord:w>0?x.coordinate-w*e:x.coordinate})}else o[g]=x=er(er({},x),{},{tickCoord:x.coordinate});var O=Ym(e,x.tickCoord,S,c,f);O&&(f=x.tickCoord-e*(S()/2+a),o[g]=er(er({},x),{},{isShow:!0}))},m=l-1;m>=0;m--)d(m);return o}function Ebe(e,t,n,r,a,o){var l=(r||[]).slice(),c=l.length,f=t.start,d=t.end;if(o){var m=r[c-1],h=n(m,c-1),g=e*(m.coordinate+e*h/2-d);l[c-1]=m=er(er({},m),{},{tickCoord:g>0?m.coordinate-g*e:m.coordinate});var x=Ym(e,m.tickCoord,function(){return h},f,d);x&&(d=m.tickCoord-e*(h/2+a),l[c-1]=er(er({},m),{},{isShow:!0}))}for(var A=o?c-1:c,S=function(E){var j=l[E],R,T=function(){return R===void 0&&(R=n(j,E)),R};if(E===0){var C=e*(j.coordinate-e*T()/2-f);l[E]=j=er(er({},j),{},{tickCoord:C<0?j.coordinate-C*e:j.coordinate})}else l[E]=j=er(er({},j),{},{tickCoord:j.coordinate});var N=Ym(e,j.tickCoord,T,f,d);N&&(f=j.tickCoord+e*(T()/2+a),l[E]=er(er({},j),{},{isShow:!0}))},w=0;w<A;w++)S(w);return l}function mE(e,t,n){var r=e.tick,a=e.ticks,o=e.viewBox,l=e.minTickGap,c=e.orientation,f=e.interval,d=e.tickFormatter,m=e.unit,h=e.angle;if(!a||!a.length||!r)return[];if(Ne(f)||Ic.isSsr)return xbe(a,typeof f=="number"&&Ne(f)?f:0);var g=[],x=c==="top"||c==="bottom"?"width":"height",A=m&&x==="width"?of(m,{fontSize:t,letterSpacing:n}):{width:0,height:0},S=function(j,R){var T=lt(d)?d(j.value,R):j.value;return x==="width"?ybe(of(T,{fontSize:t,letterSpacing:n}),A,h):of(T,{fontSize:t,letterSpacing:n})[x]},w=a.length>=2?Ta(a[1].coordinate-a[0].coordinate):1,O=bbe(o,w,x);return f==="equidistantPreserveStart"?wbe(w,O,S,a,l):(f==="preserveStart"||f==="preserveStartEnd"?g=Ebe(w,O,S,a,l,f==="preserveStartEnd"):g=Obe(w,O,S,a,l),g.filter(function(E){return E.isShow}))}var jbe=["viewBox"],Tbe=["viewBox"],Cbe=["ticks"];function vc(e){"@babel/helpers - typeof";return vc=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},vc(e)}function zl(){return zl=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},zl.apply(this,arguments)}function gz(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 Rn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gz(Object(n),!0).forEach(function(r){vE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function V1(e,t){if(e==null)return{};var n=Rbe(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 Rbe(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 Nbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yz(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,AU(r.key),r)}}function Mbe(e,t,n){return t&&yz(e.prototype,t),n&&yz(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pbe(e,t,n){return t=Wm(t),Dbe(e,_U()?Reflect.construct(t,n||[],Wm(e).constructor):t.apply(e,n))}function Dbe(e,t){if(t&&(vc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kbe(e)}function kbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _U(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_U=function(){return!!e})()}function Wm(e){return Wm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wm(e)}function $be(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,t)}function $_(e,t){return $_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},$_(e,t)}function vE(e,t,n){return t=AU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AU(e){var t=zbe(e,"string");return vc(t)=="symbol"?t:t+""}function zbe(e,t){if(vc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Hc=(function(e){function t(n){var r;return Nbe(this,t),r=Pbe(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return $be(t,e),Mbe(t,[{key:"shouldComponentUpdate",value:function(r,a){var o=r.viewBox,l=V1(r,jbe),c=this.props,f=c.viewBox,d=V1(c,Tbe);return!Fl(o,f)||!Fl(l,d)||!Fl(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,c=a.width,f=a.height,d=a.orientation,m=a.tickSize,h=a.mirror,g=a.tickMargin,x,A,S,w,O,E,j=h?-1:1,R=r.tickSize||m,T=Ne(r.tickCoord)?r.tickCoord:r.coordinate;switch(d){case"top":x=A=r.coordinate,w=l+ +!h*f,S=w-j*R,E=S-j*g,O=T;break;case"left":S=w=r.coordinate,A=o+ +!h*c,x=A-j*R,O=x-j*g,E=T;break;case"right":S=w=r.coordinate,A=o+ +h*c,x=A+j*R,O=x+j*g,E=T;break;default:x=A=r.coordinate,w=l+ +h*f,S=w+j*R,E=S+j*g,O=T;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,c=r.height,f=r.orientation,d=r.mirror,m=r.axisLine,h=Rn(Rn(Rn({},mt(this.props,!1)),mt(m,!1)),{},{fill:"none"});if(f==="top"||f==="bottom"){var g=+(f==="top"&&!d||f==="bottom"&&d);h=Rn(Rn({},h),{},{x1:a,y1:o+g*c,x2:a+l,y2:o+g*c})}else{var x=+(f==="left"&&!d||f==="right"&&d);h=Rn(Rn({},h),{},{x1:a+x*l,y1:o,x2:a+x*l,y2:o+c})}return L.createElement("line",zl({},h,{className:xt("recharts-cartesian-axis-line",ua(m,"className"))}))}},{key:"renderTicks",value:function(r,a,o){var l=this,c=this.props,f=c.tickLine,d=c.stroke,m=c.tick,h=c.tickFormatter,g=c.unit,x=mE(Rn(Rn({},this.props),{},{ticks:r}),a,o),A=this.getTickTextAnchor(),S=this.getTickVerticalAnchor(),w=mt(this.props,!1),O=mt(m,!1),E=Rn(Rn({},w),{},{fill:"none"},mt(f,!1)),j=x.map(function(R,T){var C=l.getTickLineCoord(R),N=C.line,D=C.tick,z=Rn(Rn(Rn(Rn({textAnchor:A,verticalAnchor:S},w),{},{stroke:"none",fill:d},O),D),{},{index:T,payload:R,visibleTicksCount:x.length,tickFormatter:h});return L.createElement(sn,zl({className:"recharts-cartesian-axis-tick",key:"tick-".concat(R.value,"-").concat(R.coordinate,"-").concat(R.tickCoord)},rm(l.props,R,T)),f&&L.createElement("line",zl({},E,N,{className:xt("recharts-cartesian-axis-tick-line",ua(f,"className"))})),m&&t.renderTickItem(m,z,"".concat(lt(h)?h(R.value,T):R.value).concat(g||"")))});return L.createElement("g",{className:"recharts-cartesian-axis-ticks"},j)}},{key:"render",value:function(){var r=this,a=this.props,o=a.axisLine,l=a.width,c=a.height,f=a.ticksGenerator,d=a.className,m=a.hide;if(m)return null;var h=this.props,g=h.ticks,x=V1(h,Cbe),A=g;return lt(f)&&(A=g&&g.length>0?f(this.props):f(x)),l<=0||c<=0||!A||!A.length?null:L.createElement(sn,{className:xt("recharts-cartesian-axis",d),ref:function(w){r.layerReference=w}},o&&this.renderAxisLine(),this.renderTicks(A,this.state.fontSize,this.state.letterSpacing),nr.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,a,o){var l,c=xt(a.className,"recharts-cartesian-axis-tick-value");return L.isValidElement(r)?l=L.cloneElement(r,Rn(Rn({},a),{},{className:c})):lt(r)?l=r(Rn(Rn({},a),{},{className:c})):l=L.createElement(pm,zl({},a,{className:"recharts-cartesian-axis-tick-value"}),o),l}}])})(y.Component);vE(Hc,"displayName","CartesianAxis");vE(Hc,"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 Lbe=["x1","y1","x2","y2","key"],Ibe=["offset"];function Ds(e){"@babel/helpers - typeof";return Ds=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},Ds(e)}function bz(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 rr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bz(Object(n),!0).forEach(function(r){Bbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bbe(e,t,n){return t=Ube(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ube(e){var t=qbe(e,"string");return Ds(t)=="symbol"?t:t+""}function qbe(e,t){if(Ds(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ds(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gs(){return gs=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},gs.apply(this,arguments)}function xz(e,t){if(e==null)return{};var n=Hbe(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 Hbe(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 Fbe=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,c=t.height,f=t.ry;return L.createElement("rect",{x:a,y:o,ry:f,width:l,height:c,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function OU(e,t){var n;if(L.isValidElement(e))n=L.cloneElement(e,t);else if(lt(e))n=e(t);else{var r=t.x1,a=t.y1,o=t.x2,l=t.y2,c=t.key,f=xz(t,Lbe),d=mt(f,!1);d.offset;var m=xz(d,Ibe);n=L.createElement("line",gs({},m,{x1:r,y1:a,x2:o,y2:l,fill:"none",key:c}))}return n}function Vbe(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(c,f){var d=rr(rr({},e),{},{x1:t,y1:c,x2:t+n,y2:c,key:"line-".concat(f),index:f});return OU(a,d)});return L.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function Gbe(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(c,f){var d=rr(rr({},e),{},{x1:c,y1:t,x2:c,y2:t+n,key:"line-".concat(f),index:f});return OU(a,d)});return L.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function Ybe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,a=e.y,o=e.width,l=e.height,c=e.horizontalPoints,f=e.horizontal,d=f===void 0?!0:f;if(!d||!t||!t.length)return null;var m=c.map(function(g){return Math.round(g+a-a)}).sort(function(g,x){return g-x});a!==m[0]&&m.unshift(0);var h=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 L.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 L.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},h)}function Wbe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,a=e.fillOpacity,o=e.x,l=e.y,c=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 h=m.map(function(g,x){var A=!m[x+1],S=A?o+c-g:m[x+1]-g;if(S<=0)return null;var w=x%r.length;return L.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 L.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},h)}var Kbe=function(t,n){var r=t.xAxis,a=t.width,o=t.height,l=t.offset;return I8(mE(rr(rr(rr({},Hc.defaultProps),r),{},{ticks:Ti(r,!0),viewBox:{x:0,y:0,width:a,height:o}})),l.left,l.left+l.width,n)},Zbe=function(t,n){var r=t.yAxis,a=t.width,o=t.height,l=t.offset;return I8(mE(rr(rr(rr({},Hc.defaultProps),r),{},{ticks:Ti(r,!0),viewBox:{x:0,y:0,width:a,height:o}})),l.top,l.top+l.height,n)},Pl={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function EU(e){var t,n,r,a,o,l,c=fE(),f=dE(),d=zye(),m=rr(rr({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Pl.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Pl.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Pl.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:Pl.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:Pl.vertical,verticalFill:(l=e.verticalFill)!==null&&l!==void 0?l:Pl.verticalFill,x:Ne(e.x)?e.x:d.left,y:Ne(e.y)?e.y:d.top,width:Ne(e.width)?e.width:d.width,height:Ne(e.height)?e.height:d.height}),h=m.x,g=m.y,x=m.width,A=m.height,S=m.syncWithTicks,w=m.horizontalValues,O=m.verticalValues,E=Dye(),j=kye();if(!Ne(x)||x<=0||!Ne(A)||A<=0||!Ne(h)||h!==+h||!Ne(g)||g!==+g)return null;var R=m.verticalCoordinatesGenerator||Kbe,T=m.horizontalCoordinatesGenerator||Zbe,C=m.horizontalPoints,N=m.verticalPoints;if((!C||!C.length)&<(T)){var D=w&&w.length,z=T({yAxis:j?rr(rr({},j),{},{ticks:D?w:j.ticks}):void 0,width:c,height:f,offset:d},D?!0:S);Mi(Array.isArray(z),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Ds(z),"]")),Array.isArray(z)&&(C=z)}if((!N||!N.length)&<(R)){var V=O&&O.length,U=R({xAxis:E?rr(rr({},E),{},{ticks:V?O:E.ticks}):void 0,width:c,height:f,offset:d},V?!0:S);Mi(Array.isArray(U),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Ds(U),"]")),Array.isArray(U)&&(N=U)}return L.createElement("g",{className:"recharts-cartesian-grid"},L.createElement(Fbe,{fill:m.fill,fillOpacity:m.fillOpacity,x:m.x,y:m.y,width:m.width,height:m.height,ry:m.ry}),L.createElement(Vbe,gs({},m,{offset:d,horizontalPoints:C,xAxis:E,yAxis:j})),L.createElement(Gbe,gs({},m,{offset:d,verticalPoints:N,xAxis:E,yAxis:j})),L.createElement(Ybe,gs({},m,{horizontalPoints:C})),L.createElement(Wbe,gs({},m,{verticalPoints:N})))}EU.displayName="CartesianGrid";var Xbe=["layout","type","stroke","connectNulls","isRange","ref"],Qbe=["key"],jU;function gc(e){"@babel/helpers - typeof";return gc=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},gc(e)}function TU(e,t){if(e==null)return{};var n=Jbe(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 Jbe(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 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 wz(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 xo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wz(Object(n),!0).forEach(function(r){Ka(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function e0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sz(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 t0e(e,t,n){return t&&Sz(e.prototype,t),n&&Sz(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function n0e(e,t,n){return t=Km(t),r0e(e,CU()?Reflect.construct(t,n||[],Km(e).constructor):t.apply(e,n))}function r0e(e,t){if(t&&(gc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a0e(e)}function a0e(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 Km(e){return Km=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Km(e)}function i0e(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&&z_(e,t)}function z_(e,t){return z_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},z_(e,t)}function Ka(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=o0e(e,"string");return gc(t)=="symbol"?t:t+""}function o0e(e,t){if(gc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var qo=(function(e){function t(){var n;e0e(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=n0e(this,t,[].concat(a)),Ka(n,"state",{isAnimationFinished:!0}),Ka(n,"id",jd("recharts-area-")),Ka(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),lt(l)&&l()}),Ka(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),lt(l)&&l()}),n}return i0e(t,e),t0e(t,[{key:"renderDots",value:function(r,a,o){var l=this.props.isAnimationActive,c=this.state.isAnimationFinished;if(l&&!c)return null;var f=this.props,d=f.dot,m=f.points,h=f.dataKey,g=mt(this.props,!1),x=mt(d,!0),A=m.map(function(w,O){var E=xo(xo(xo({key:"dot-".concat(O),r:3},g),x),{},{index:O,cx:w.x,cy:w.y,dataKey:h,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 L.createElement(sn,ys({className:"recharts-area-dots"},S),A)}},{key:"renderHorizontalRect",value:function(r){var a=this.props,o=a.baseLine,l=a.points,c=a.strokeWidth,f=l[0].x,d=l[l.length-1].x,m=r*Math.abs(f-d),h=Ao(l.map(function(g){return g.y||0}));return Ne(o)&&typeof o=="number"?h=Math.max(o,h):o&&Array.isArray(o)&&o.length&&(h=Math.max(Ao(o.map(function(g){return g.y||0})),h)),Ne(h)?L.createElement("rect",{x:f<d?f:f-m,y:0,width:m,height:Math.floor(h+(c?parseInt("".concat(c),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var a=this.props,o=a.baseLine,l=a.points,c=a.strokeWidth,f=l[0].y,d=l[l.length-1].y,m=r*Math.abs(f-d),h=Ao(l.map(function(g){return g.x||0}));return Ne(o)&&typeof o=="number"?h=Math.max(o,h):o&&Array.isArray(o)&&o.length&&(h=Math.max(Ao(o.map(function(g){return g.x||0})),h)),Ne(h)?L.createElement("rect",{x:0,y:f<d?f:f-m,width:h+(c?parseInt("".concat(c),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 c=this.props,f=c.layout,d=c.type,m=c.stroke,h=c.connectNulls,g=c.isRange;c.ref;var x=TU(c,Xbe);return L.createElement(sn,{clipPath:o?"url(#clipPath-".concat(l,")"):null},L.createElement(cf,ys({},mt(x,!0),{points:r,connectNulls:h,type:d,baseLine:a,layout:f,stroke:"none",className:"recharts-area-area"})),m!=="none"&&L.createElement(cf,ys({},mt(this.props,!1),{className:"recharts-area-curve",layout:f,type:d,connectNulls:h,fill:"none",points:r})),m!=="none"&&g&&L.createElement(cf,ys({},mt(this.props,!1),{className:"recharts-area-curve",layout:f,type:d,connectNulls:h,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(r,a){var o=this,l=this.props,c=l.points,f=l.baseLine,d=l.isAnimationActive,m=l.animationBegin,h=l.animationDuration,g=l.animationEasing,x=l.animationId,A=this.state,S=A.prevPoints,w=A.prevBaseLine;return L.createElement(Bi,{begin:m,duration:h,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 j=S.length/c.length,R=c.map(function(D,z){var V=Math.floor(z*j);if(S[V]){var U=S[V],P=aa(U.x,D.x),B=aa(U.y,D.y);return xo(xo({},D),{},{x:P(E),y:B(E)})}return D}),T;if(Ne(f)&&typeof f=="number"){var C=aa(w,f);T=C(E)}else if(yt(f)||zc(f)){var N=aa(w,0);T=N(E)}else T=f.map(function(D,z){var V=Math.floor(z*j);if(w[V]){var U=w[V],P=aa(U.x,D.x),B=aa(U.y,D.y);return xo(xo({},D),{},{x:P(E),y:B(E)})}return D});return o.renderAreaStatically(R,T,r,a)}return L.createElement(sn,null,L.createElement("defs",null,L.createElement("clipPath",{id:"animationClipPath-".concat(a)},o.renderClipRect(E))),L.createElement(sn,{clipPath:"url(#animationClipPath-".concat(a,")")},o.renderAreaStatically(c,f,r,a)))})}},{key:"renderArea",value:function(r,a){var o=this.props,l=o.points,c=o.baseLine,f=o.isAnimationActive,d=this.state,m=d.prevPoints,h=d.prevBaseLine,g=d.totalLength;return f&&l&&l.length&&(!m&&g>0||!Rf(m,l)||!Rf(h,c))?this.renderAreaWithAnimation(r,a):this.renderAreaStatically(l,c,r,a)}},{key:"render",value:function(){var r,a=this.props,o=a.hide,l=a.dot,c=a.points,f=a.className,d=a.top,m=a.left,h=a.xAxis,g=a.yAxis,x=a.width,A=a.height,S=a.isAnimationActive,w=a.id;if(o||!c||!c.length)return null;var O=this.state.isAnimationFinished,E=c.length===1,j=xt("recharts-area",f),R=h&&h.allowDataOverflow,T=g&&g.allowDataOverflow,C=R||T,N=yt(w)?this.id:w,D=(r=mt(l,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},z=D.r,V=z===void 0?3:z,U=D.strokeWidth,P=U===void 0?2:U,B=_ie(l)?l:{},q=B.clipDot,Y=q===void 0?!0:q,$=V*2+P;return L.createElement(sn,{className:j},R||T?L.createElement("defs",null,L.createElement("clipPath",{id:"clipPath-".concat(N)},L.createElement("rect",{x:R?m:m-x/2,y:T?d:d-A/2,width:R?x:x*2,height:T?A:A*2})),!Y&&L.createElement("clipPath",{id:"clipPath-dots-".concat(N)},L.createElement("rect",{x:m-$/2,y:d-$/2,width:x+$,height:A+$}))):null,E?null:this.renderArea(C,N),(l||E)&&this.renderDots(C,Y,N),(!S||O)&&jo.renderCallByParent(this.props,c))}}],[{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);jU=qo;Ka(qo,"displayName","Area");Ka(qo,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ic.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Ka(qo,"getBaseValue",function(e,t,n,r){var a=e.layout,o=e.baseValue,l=t.props.baseValue,c=l??o;if(Ne(c)&&typeof c=="number")return c;var f=a==="horizontal"?r:n,d=f.scale.domain();if(f.type==="number"){var m=Math.max(d[0],d[1]),h=Math.min(d[0],d[1]);return c==="dataMin"?h:c==="dataMax"||m<0?m:Math.max(Math.min(d[0],d[1]),0)}return c==="dataMin"?d[0]:c==="dataMax"?d[1]:d[0]});Ka(qo,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,a=e.yAxis,o=e.xAxisTicks,l=e.yAxisTicks,c=e.bandSize,f=e.dataKey,d=e.stackedData,m=e.dataStartIndex,h=e.displayedData,g=e.offset,x=t.layout,A=d&&d.length,S=jU.getBaseValue(t,n,r,a),w=x==="horizontal",O=!1,E=h.map(function(R,T){var C;A?C=d[m+T]:(C=Br(R,f),Array.isArray(C)?O=!0:C=[S,C]);var N=C[1]==null||A&&Br(R,f)==null;return w?{x:Bk({axis:r,ticks:o,bandSize:c,entry:R,index:T}),y:N?null:a.scale(C[1]),value:C,payload:R}:{x:N?null:r.scale(C[1]),y:Bk({axis:a,ticks:l,bandSize:c,entry:R,index:T}),value:C,payload:R}}),j;return A||O?j=E.map(function(R){var T=Array.isArray(R.value)?R.value[0]:null;return w?{x:R.x,y:T!=null&&R.y!=null?a.scale(T):null}:{x:T!=null?r.scale(T):null,y:R.y}}):j=w?a.scale(S):r.scale(S),xo({points:E,baseLine:j,layout:x,isRange:O},g)});Ka(qo,"renderDotItem",function(e,t){var n;if(L.isValidElement(e))n=L.cloneElement(e,t);else if(lt(e))n=e(t);else{var r=xt("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,o=TU(t,Qbe);n=L.createElement(sE,ys({},o,{key:a,className:r}))}return n});function yc(e){"@babel/helpers - typeof";return yc=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},yc(e)}function s0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l0e(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,PU(r.key),r)}}function c0e(e,t,n){return t&&l0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function u0e(e,t,n){return t=Zm(t),f0e(e,NU()?Reflect.construct(t,n||[],Zm(e).constructor):t.apply(e,n))}function f0e(e,t){if(t&&(yc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return d0e(e)}function d0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function NU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(NU=function(){return!!e})()}function Zm(e){return Zm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zm(e)}function h0e(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&&L_(e,t)}function L_(e,t){return L_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},L_(e,t)}function MU(e,t,n){return t=PU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PU(e){var t=p0e(e,"string");return yc(t)=="symbol"?t:t+""}function p0e(e,t){if(yc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function I_(){return I_=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},I_.apply(this,arguments)}function m0e(e){var t=e.xAxisId,n=fE(),r=dE(),a=pU(t);return a==null?null:y.createElement(Hc,I_({},a,{className:xt("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(l){return Ti(l,!0)}}))}var hg=(function(e){function t(){return s0e(this,t),u0e(this,t,arguments)}return h0e(t,e),c0e(t,[{key:"render",value:function(){return y.createElement(m0e,this.props)}}])})(y.Component);MU(hg,"displayName","XAxis");MU(hg,"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 bc(e){"@babel/helpers - typeof";return bc=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},bc(e)}function v0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g0e(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 y0e(e,t,n){return t&&g0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function b0e(e,t,n){return t=Xm(t),x0e(e,DU()?Reflect.construct(t,n||[],Xm(e).constructor):t.apply(e,n))}function x0e(e,t){if(t&&(bc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return w0e(e)}function w0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(DU=function(){return!!e})()}function Xm(e){return Xm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xm(e)}function S0e(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 kU(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=_0e(e,"string");return bc(t)=="symbol"?t:t+""}function _0e(e,t){if(bc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function U_(){return U_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},U_.apply(this,arguments)}var A0e=function(t){var n=t.yAxisId,r=fE(),a=dE(),o=mU(n);return o==null?null:y.createElement(Hc,U_({},o,{className:xt("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:r,height:a},ticksGenerator:function(c){return Ti(c,!0)}}))},pg=(function(e){function t(){return v0e(this,t),b0e(this,t,arguments)}return S0e(t,e),y0e(t,[{key:"render",value:function(){return y.createElement(A0e,this.props)}}])})(y.Component);kU(pg,"displayName","YAxis");kU(pg,"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 _z(e){return T0e(e)||j0e(e)||E0e(e)||O0e()}function O0e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
491
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E0e(e,t){if(e){if(typeof e=="string")return q_(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 q_(e,t)}}function j0e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function T0e(e){if(Array.isArray(e))return q_(e)}function q_(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 H_=function(t,n,r,a,o){var l=Na(t,pE),c=Na(t,ug),f=[].concat(_z(l),_z(c)),d=Na(t,dg),m="".concat(a,"Id"),h=a[0],g=n;if(f.length&&(g=f.reduce(function(S,w){if(w.props[m]===r&&Qa(w.props,"extendDomain")&&Ne(w.props[h])){var O=w.props[h];return[Math.min(S[0],O),Math.max(S[1],O)]}return S},g)),d.length){var x="".concat(h,"1"),A="".concat(h,"2");g=d.reduce(function(S,w){if(w.props[m]===r&&Qa(w.props,"extendDomain")&&Ne(w.props[x])&&Ne(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 Ne(w)?[Math.min(S[0],w),Math.max(S[1],w)]:S},g)),g},G1={exports:{}},Az;function C0e(){return Az||(Az=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,h,g){if(typeof m!="function")throw new TypeError("The listener must be a function");var x=new a(m,h||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 c(){this._events=new r,this._eventsCount=0}c.prototype.eventNames=function(){var d=[],m,h;if(this._eventsCount===0)return d;for(h in m=this._events)t.call(m,h)&&d.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(m)):d},c.prototype.listeners=function(d){var m=n?n+d:d,h=this._events[m];if(!h)return[];if(h.fn)return[h.fn];for(var g=0,x=h.length,A=new Array(x);g<x;g++)A[g]=h[g].fn;return A},c.prototype.listenerCount=function(d){var m=n?n+d:d,h=this._events[m];return h?h.fn?1:h.length:0},c.prototype.emit=function(d,m,h,g,x,A){var S=n?n+d:d;if(!this._events[S])return!1;var w=this._events[S],O=arguments.length,E,j;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,h),!0;case 4:return w.fn.call(w.context,m,h,g),!0;case 5:return w.fn.call(w.context,m,h,g,x),!0;case 6:return w.fn.call(w.context,m,h,g,x,A),!0}for(j=1,E=new Array(O-1);j<O;j++)E[j-1]=arguments[j];w.fn.apply(w.context,E)}else{var R=w.length,T;for(j=0;j<R;j++)switch(w[j].once&&this.removeListener(d,w[j].fn,void 0,!0),O){case 1:w[j].fn.call(w[j].context);break;case 2:w[j].fn.call(w[j].context,m);break;case 3:w[j].fn.call(w[j].context,m,h);break;case 4:w[j].fn.call(w[j].context,m,h,g);break;default:if(!E)for(T=1,E=new Array(O-1);T<O;T++)E[T-1]=arguments[T];w[j].fn.apply(w[j].context,E)}}return!0},c.prototype.on=function(d,m,h){return o(this,d,m,h,!1)},c.prototype.once=function(d,m,h){return o(this,d,m,h,!0)},c.prototype.removeListener=function(d,m,h,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)&&(!h||A.context===h)&&l(this,x);else{for(var S=0,w=[],O=A.length;S<O;S++)(A[S].fn!==m||g&&!A[S].once||h&&A[S].context!==h)&&w.push(A[S]);w.length?this._events[x]=w.length===1?w[0]:w:l(this,x)}return this},c.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},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,e.exports=c})(G1)),G1.exports}var R0e=C0e();const N0e=Ht(R0e);var Y1=new N0e,W1="recharts.syncMouseEvents";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 M0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P0e(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,zU(r.key),r)}}function D0e(e,t,n){return t&&P0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function K1(e,t,n){return t=zU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zU(e){var t=k0e(e,"string");return Qf(t)=="symbol"?t:t+""}function k0e(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 String(e)}var $0e=(function(){function e(){M0e(this,e),K1(this,"activeIndex",0),K1(this,"coordinateList",[]),K1(this,"layout","horizontal")}return D0e(e,[{key:"setDetails",value:function(n){var r,a=n.coordinateList,o=a===void 0?null:a,l=n.container,c=l===void 0?null:l,f=n.layout,d=f===void 0?null:f,m=n.offset,h=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=c??this.container,this.layout=d??this.layout,this.offset=h??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,c=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,h=o+f+d,g=l+this.offset.top+c/2+m;this.mouseHandlerCallback({pageX:h,pageY:g})}}}])})();function z0e(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&&Ne(r)&&Ne(a))return!0}return!1}function L0e(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 LU(e){var t=e.cx,n=e.cy,r=e.radius,a=e.startAngle,o=e.endAngle,l=Yn(t,n,r,a),c=Yn(t,n,r,o);return{points:[l,c],cx:t,cy:n,radius:r,startAngle:a,endAngle:o}}function I0e(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 c=t.cx,f=t.cy,d=t.innerRadius,m=t.outerRadius,h=t.angle,g=Yn(c,f,d,h),x=Yn(c,f,m,h);r=g.x,a=g.y,o=x.x,l=x.y}else return LU(t);return[{x:r,y:a},{x:o,y:l}]}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 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 vp(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){B0e(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 B0e(e,t,n){return t=U0e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U0e(e){var t=q0e(e,"string");return Jf(t)=="symbol"?t:t+""}function q0e(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)}function H0e(e){var t,n,r=e.element,a=e.tooltipEventType,o=e.isActive,l=e.activeCoordinate,c=e.activePayload,f=e.offset,d=e.activeTooltipIndex,m=e.tooltipAxisBandSize,h=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=cf;if(g==="ScatterChart")A=l,S=Fve;else if(g==="BarChart")A=L0e(h,l,f,m),S=oE;else if(h==="radial"){var w=LU(l),O=w.cx,E=w.cy,j=w.radius,R=w.startAngle,T=w.endAngle;A={cx:O,cy:E,startAngle:R,endAngle:T,innerRadius:j,outerRadius:j},S=F8}else A={points:I0e(h,l,f)},S=cf;var C=vp(vp(vp(vp({stroke:"#ccc",pointerEvents:"none"},f),A),mt(x,!1)),{},{payload:c,payloadIndex:d,className:xt("recharts-tooltip-cursor",x.className)});return y.isValidElement(x)?y.cloneElement(x,C):y.createElement(S,C)}var F0e=["item"],V0e=["children","className","width","height","style","compact","title","desc"];function xc(e){"@babel/helpers - typeof";return xc=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},xc(e)}function Ll(){return Ll=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},Ll.apply(this,arguments)}function Ez(e,t){return W0e(e)||Y0e(e,t)||BU(e,t)||G0e()}function G0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
492
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Y0e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.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 c}}function W0e(e){if(Array.isArray(e))return e}function jz(e,t){if(e==null)return{};var n=K0e(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 K0e(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 Z0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X0e(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,UU(r.key),r)}}function Q0e(e,t,n){return t&&X0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function J0e(e,t,n){return t=Qm(t),exe(e,IU()?Reflect.construct(t,n||[],Qm(e).constructor):t.apply(e,n))}function exe(e,t){if(t&&(xc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return txe(e)}function txe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function IU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(IU=function(){return!!e})()}function Qm(e){return Qm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qm(e)}function nxe(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 wc(e){return ixe(e)||axe(e)||BU(e)||rxe()}function rxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
493
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BU(e,t){if(e){if(typeof e=="string")return V_(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 V_(e,t)}}function axe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ixe(e){if(Array.isArray(e))return V_(e)}function V_(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 Tz(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?Tz(Object(n),!0).forEach(function(r){Xe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xe(e,t,n){return t=UU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UU(e){var t=oxe(e,"string");return xc(t)=="symbol"?t:t+""}function oxe(e,t){if(xc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sxe={xAxis:["bottom","top"],yAxis:["left","right"]},lxe={width:"100%",height:"100%"},qU={x:0,y:0};function gp(e){return e}var cxe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},uxe=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,c=a.radius;return pe(pe(pe({},a),Yn(a.cx,a.cy,c,l)),{},{angle:l,radius:c})}var f=o.coordinate,d=a.angle;return pe(pe(pe({},a),Yn(a.cx,a.cy,f,d)),{},{angle:d,radius:f})}return qU},mg=function(t,n){var r=n.graphicalItems,a=n.dataStartIndex,o=n.dataEndIndex,l=(r??[]).reduce(function(c,f){var d=f.props.data;return d&&d.length?[].concat(wc(c),wc(d)):c},[]);return l.length>0?l:t&&t.length&&Ne(a)&&Ne(o)?t.slice(a,o+1):[]};function HU(e){return e==="number"?[0,"auto"]:void 0}var G_=function(t,n,r,a){var o=t.graphicalItems,l=t.tooltipAxis,c=mg(n,t);return r<0||!o||!o.length||r>=c.length?null:o.reduce(function(f,d){var m,h=(m=d.props.data)!==null&&m!==void 0?m:n;h&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(h=h.slice(t.dataStartIndex,t.dataEndIndex+1));var g;if(l.dataKey&&!l.allowDuplicatedCategory){var x=h===void 0?c:h;g=tm(x,l.dataKey,a)}else g=h&&h[r]||c[r];return g?[].concat(wc(f),[U8(d,g)]):f},[])},Cz=function(t,n,r,a){var o=a||{x:t.chartX,y:t.chartY},l=cxe(o,r),c=t.orderedTooltipTicks,f=t.tooltipAxis,d=t.tooltipTicks,m=_he(l,c,d,f);if(m>=0&&d){var h=d[m]&&d[m].value,g=G_(t,n,m,h),x=uxe(r,c,m,o);return{activeTooltipIndex:m,activeLabel:h,activePayload:g,activeCoordinate:x}}return null},fxe=function(t,n){var r=n.axes,a=n.graphicalItems,o=n.axisType,l=n.axisIdKey,c=n.stackGroups,f=n.dataStartIndex,d=n.dataEndIndex,m=t.layout,h=t.children,g=t.stackOffset,x=L8(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,j=O.dataKey,R=O.allowDataOverflow,T=O.allowDuplicatedCategory,C=O.scale,N=O.ticks,D=O.includeHidden,z=O[l];if(A[z])return A;var V=mg(t.data,{graphicalItems:a.filter(function(Z){var Q,fe=l in Z.props?Z.props[l]:(Q=Z.type.defaultProps)===null||Q===void 0?void 0:Q[l];return fe===z}),dataStartIndex:f,dataEndIndex:d}),U=V.length,P,B,q;z0e(O.domain,R,E)&&(P=f_(O.domain,null,R),x&&(E==="number"||C!=="auto")&&(q=lf(V,j,"category")));var Y=HU(E);if(!P||P.length===0){var $,G=($=O.domain)!==null&&$!==void 0?$:Y;if(j){if(P=lf(V,j,E),E==="category"&&x){var F=hie(P);T&&F?(B=P,P=Im(0,U)):T||(P=Fk(G,P,S).reduce(function(Z,Q){return Z.indexOf(Q)>=0?Z:[].concat(wc(Z),[Q])},[]))}else if(E==="category")T?P=P.filter(function(Z){return Z!==""&&!yt(Z)}):P=Fk(G,P,S).reduce(function(Z,Q){return Z.indexOf(Q)>=0||Q===""||yt(Q)?Z:[].concat(wc(Z),[Q])},[]);else if(E==="number"){var K=The(V,a.filter(function(Z){var Q,fe,le=l in Z.props?Z.props[l]:(Q=Z.type.defaultProps)===null||Q===void 0?void 0:Q[l],Se="hide"in Z.props?Z.props.hide:(fe=Z.type.defaultProps)===null||fe===void 0?void 0:fe.hide;return le===z&&(D||!Se)}),j,o,m);K&&(P=K)}x&&(E==="number"||C!=="auto")&&(q=lf(V,j,"category"))}else x?P=Im(0,U):c&&c[z]&&c[z].hasStack&&E==="number"?P=g==="expand"?[0,1]:B8(c[z].stackGroups,f,d):P=z8(V,a.filter(function(Z){var Q=l in Z.props?Z.props[l]:Z.type.defaultProps[l],fe="hide"in Z.props?Z.props.hide:Z.type.defaultProps.hide;return Q===z&&(D||!fe)}),E,m,!0);if(E==="number")P=H_(h,P,z,o,N),G&&(P=f_(G,P,R));else if(E==="category"&&G){var ne=G,I=P.every(function(Z){return ne.indexOf(Z)>=0});I&&(P=ne)}}return pe(pe({},A),{},Xe({},z,pe(pe({},O),{},{axisType:o,domain:P,categoricalDomain:q,duplicateDomain:B,originalDomain:(w=O.domain)!==null&&w!==void 0?w:Y,isCategorical:x,layout:m})))},{})},dxe=function(t,n){var r=n.graphicalItems,a=n.Axis,o=n.axisType,l=n.axisIdKey,c=n.stackGroups,f=n.dataStartIndex,d=n.dataEndIndex,m=t.layout,h=t.children,g=mg(t.data,{graphicalItems:r,dataStartIndex:f,dataEndIndex:d}),x=g.length,A=L8(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,j=E[l],R=HU("number");if(!w[j]){S++;var T;return A?T=Im(0,x):c&&c[j]&&c[j].hasStack?(T=B8(c[j].stackGroups,f,d),T=H_(h,T,j,o)):(T=f_(R,z8(g,r.filter(function(C){var N,D,z=l in C.props?C.props[l]:(N=C.type.defaultProps)===null||N===void 0?void 0:N[l],V="hide"in C.props?C.props.hide:(D=C.type.defaultProps)===null||D===void 0?void 0:D.hide;return z===j&&!V}),"number",m),a.defaultProps.allowDataOverflow),T=H_(h,T,j,o)),pe(pe({},w),{},Xe({},j,pe(pe({axisType:o},a.defaultProps),{},{hide:!0,orientation:ua(sxe,"".concat(o,".").concat(S%2),null),domain:T,originalDomain:R,isCategorical:A,layout:m})))}return w},{})},hxe=function(t,n){var r=n.axisType,a=r===void 0?"xAxis":r,o=n.AxisComp,l=n.graphicalItems,c=n.stackGroups,f=n.dataStartIndex,d=n.dataEndIndex,m=t.children,h="".concat(a,"Id"),g=Na(m,o),x={};return g&&g.length?x=fxe(t,{axes:g,graphicalItems:l,axisType:a,axisIdKey:h,stackGroups:c,dataStartIndex:f,dataEndIndex:d}):l&&l.length&&(x=dxe(t,{Axis:o,graphicalItems:l,axisType:a,axisIdKey:h,stackGroups:c,dataStartIndex:f,dataEndIndex:d})),x},pxe=function(t){var n=_o(t),r=Ti(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:PO(r,function(a){return a.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Cm(n,r)}},Rz=function(t){var n=t.children,r=t.defaultShowTooltip,a=Rr(n,fc),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}},mxe=function(t){return!t||!t.length?!1:t.some(function(n){var r=Ni(n&&n.type);return r&&r.indexOf("Bar")>=0})},Nz=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"}},vxe=function(t,n){var r=t.props,a=t.graphicalItems,o=t.xAxisMap,l=o===void 0?{}:o,c=t.yAxisMap,f=c===void 0?{}:c,d=r.width,m=r.height,h=r.children,g=r.margin||{},x=Rr(h,fc),A=Rr(h,Vl),S=Object.keys(f).reduce(function(T,C){var N=f[C],D=N.orientation;return!N.mirror&&!N.hide?pe(pe({},T),{},Xe({},D,T[D]+N.width)):T},{left:g.left||0,right:g.right||0}),w=Object.keys(l).reduce(function(T,C){var N=l[C],D=N.orientation;return!N.mirror&&!N.hide?pe(pe({},T),{},Xe({},D,ua(T,"".concat(D))+N.height)):T},{top:g.top||0,bottom:g.bottom||0}),O=pe(pe({},w),S),E=O.bottom;x&&(O.bottom+=x.props.height||fc.defaultProps.height),A&&n&&(O=Ehe(O,a,r,n));var j=d-O.left-O.right,R=m-O.top-O.bottom;return pe(pe({brushBottom:E},O),{},{width:Math.max(j,0),height:Math.max(R,0)})},gxe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},yxe=function(t){var n=t.chartName,r=t.GraphicalChild,a=t.defaultTooltipEventType,o=a===void 0?"axis":a,l=t.validateTooltipEventTypes,c=l===void 0?["axis"]:l,f=t.axisComponents,d=t.legendContent,m=t.formatAxisMap,h=t.defaultProps,g=function(O,E){var j=E.graphicalItems,R=E.stackGroups,T=E.offset,C=E.updateId,N=E.dataStartIndex,D=E.dataEndIndex,z=O.barSize,V=O.layout,U=O.barGap,P=O.barCategoryGap,B=O.maxBarSize,q=Nz(V),Y=q.numericAxisName,$=q.cateAxisName,G=mxe(j),F=[];return j.forEach(function(K,ne){var I=mg(O.data,{graphicalItems:[K],dataStartIndex:N,dataEndIndex:D}),Z=K.type.defaultProps!==void 0?pe(pe({},K.type.defaultProps),K.props):K.props,Q=Z.dataKey,fe=Z.maxBarSize,le=Z["".concat(Y,"Id")],Se=Z["".concat($,"Id")],ve={},xe=f.reduce(function(on,Tt){var Ft=E["".concat(Tt.axisType,"Map")],H=Z["".concat(Tt.axisType,"Id")];Ft&&Ft[H]||Tt.axisType==="zAxis"||Ps();var ee=Ft[H];return pe(pe({},on),{},Xe(Xe({},Tt.axisType,ee),"".concat(Tt.axisType,"Ticks"),Ti(ee)))},ve),ce=xe[$],Ae=xe["".concat($,"Ticks")],Oe=R&&R[le]&&R[le].hasStack&&Bhe(K,R[le].stackGroups),oe=Ni(K.type).indexOf("Bar")>=0,qe=Cm(ce,Ae),De=[],Je=G&&Ahe({barSize:z,stackGroups:R,totalSize:gxe(xe,$)});if(oe){var Ye,at,jt=yt(fe)?B:fe,dt=(Ye=(at=Cm(ce,Ae,!0))!==null&&at!==void 0?at:jt)!==null&&Ye!==void 0?Ye:0;De=Ohe({barGap:U,barCategoryGap:P,bandSize:dt!==qe?dt:qe,sizeList:Je[Se],maxBarSize:jt}),dt!==qe&&(De=De.map(function(on){return pe(pe({},on),{},{position:pe(pe({},on.position),{},{offset:on.position.offset-dt/2})})}))}var gn=K&&K.type&&K.type.getComposedData;gn&&F.push({props:pe(pe({},gn(pe(pe({},xe),{},{displayedData:I,props:O,dataKey:Q,item:K,bandSize:qe,barPosition:De,offset:T,stackedData:Oe,layout:V,dataStartIndex:N,dataEndIndex:D}))),{},Xe(Xe(Xe({key:K.key||"item-".concat(ne)},Y,xe[Y]),$,xe[$]),"animationId",C)),childIndex:Eie(K,O.children),item:K})}),F},x=function(O,E){var j=O.props,R=O.dataStartIndex,T=O.dataEndIndex,C=O.updateId;if(!aM({props:j}))return null;var N=j.children,D=j.layout,z=j.stackOffset,V=j.data,U=j.reverseStackOrder,P=Nz(D),B=P.numericAxisName,q=P.cateAxisName,Y=Na(N,r),$=zhe(V,Y,"".concat(B,"Id"),"".concat(q,"Id"),z,U),G=f.reduce(function(Z,Q){var fe="".concat(Q.axisType,"Map");return pe(pe({},Z),{},Xe({},fe,hxe(j,pe(pe({},Q),{},{graphicalItems:Y,stackGroups:Q.axisType===B&&$,dataStartIndex:R,dataEndIndex:T}))))},{}),F=vxe(pe(pe({},G),{},{props:j,graphicalItems:Y}),E==null?void 0:E.legendBBox);Object.keys(G).forEach(function(Z){G[Z]=m(j,G[Z],F,Z.replace("Map",""),n)});var K=G["".concat(q,"Map")],ne=pxe(K),I=g(j,pe(pe({},G),{},{dataStartIndex:R,dataEndIndex:T,updateId:C,graphicalItems:Y,stackGroups:$,offset:F}));return pe(pe({formattedGraphicalItems:I,graphicalItems:Y,offset:F,stackGroups:$},ne),G)},A=(function(w){function O(E){var j,R,T;return Z0e(this,O),T=J0e(this,O,[E]),Xe(T,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Xe(T,"accessibilityManager",new $0e),Xe(T,"handleLegendBBoxUpdate",function(C){if(C){var N=T.state,D=N.dataStartIndex,z=N.dataEndIndex,V=N.updateId;T.setState(pe({legendBBox:C},x({props:T.props,dataStartIndex:D,dataEndIndex:z,updateId:V},pe(pe({},T.state),{},{legendBBox:C}))))}}),Xe(T,"handleReceiveSyncEvent",function(C,N,D){if(T.props.syncId===C){if(D===T.eventEmitterSymbol&&typeof T.props.syncMethod!="function")return;T.applySyncEvent(N)}}),Xe(T,"handleBrushChange",function(C){var N=C.startIndex,D=C.endIndex;if(N!==T.state.dataStartIndex||D!==T.state.dataEndIndex){var z=T.state.updateId;T.setState(function(){return pe({dataStartIndex:N,dataEndIndex:D},x({props:T.props,dataStartIndex:N,dataEndIndex:D,updateId:z},T.state))}),T.triggerSyncEvent({dataStartIndex:N,dataEndIndex:D})}}),Xe(T,"handleMouseEnter",function(C){var N=T.getMouseInfo(C);if(N){var D=pe(pe({},N),{},{isTooltipActive:!0});T.setState(D),T.triggerSyncEvent(D);var z=T.props.onMouseEnter;lt(z)&&z(D,C)}}),Xe(T,"triggeredAfterMouseMove",function(C){var N=T.getMouseInfo(C),D=N?pe(pe({},N),{},{isTooltipActive:!0}):{isTooltipActive:!1};T.setState(D),T.triggerSyncEvent(D);var z=T.props.onMouseMove;lt(z)&&z(D,C)}),Xe(T,"handleItemMouseEnter",function(C){T.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),Xe(T,"handleItemMouseLeave",function(){T.setState(function(){return{isTooltipActive:!1}})}),Xe(T,"handleMouseMove",function(C){C.persist(),T.throttleTriggeredAfterMouseMove(C)}),Xe(T,"handleMouseLeave",function(C){T.throttleTriggeredAfterMouseMove.cancel();var N={isTooltipActive:!1};T.setState(N),T.triggerSyncEvent(N);var D=T.props.onMouseLeave;lt(D)&&D(N,C)}),Xe(T,"handleOuterEvent",function(C){var N=Oie(C),D=ua(T.props,"".concat(N));if(N&<(D)){var z,V;/.*touch.*/i.test(N)?V=T.getMouseInfo(C.changedTouches[0]):V=T.getMouseInfo(C),D((z=V)!==null&&z!==void 0?z:{},C)}}),Xe(T,"handleClick",function(C){var N=T.getMouseInfo(C);if(N){var D=pe(pe({},N),{},{isTooltipActive:!0});T.setState(D),T.triggerSyncEvent(D);var z=T.props.onClick;lt(z)&&z(D,C)}}),Xe(T,"handleMouseDown",function(C){var N=T.props.onMouseDown;if(lt(N)){var D=T.getMouseInfo(C);N(D,C)}}),Xe(T,"handleMouseUp",function(C){var N=T.props.onMouseUp;if(lt(N)){var D=T.getMouseInfo(C);N(D,C)}}),Xe(T,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&T.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),Xe(T,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&T.handleMouseDown(C.changedTouches[0])}),Xe(T,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&T.handleMouseUp(C.changedTouches[0])}),Xe(T,"handleDoubleClick",function(C){var N=T.props.onDoubleClick;if(lt(N)){var D=T.getMouseInfo(C);N(D,C)}}),Xe(T,"handleContextMenu",function(C){var N=T.props.onContextMenu;if(lt(N)){var D=T.getMouseInfo(C);N(D,C)}}),Xe(T,"triggerSyncEvent",function(C){T.props.syncId!==void 0&&Y1.emit(W1,T.props.syncId,C,T.eventEmitterSymbol)}),Xe(T,"applySyncEvent",function(C){var N=T.props,D=N.layout,z=N.syncMethod,V=T.state.updateId,U=C.dataStartIndex,P=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)T.setState(pe({dataStartIndex:U,dataEndIndex:P},x({props:T.props,dataStartIndex:U,dataEndIndex:P,updateId:V},T.state)));else if(C.activeTooltipIndex!==void 0){var B=C.chartX,q=C.chartY,Y=C.activeTooltipIndex,$=T.state,G=$.offset,F=$.tooltipTicks;if(!G)return;if(typeof z=="function")Y=z(F,C);else if(z==="value"){Y=-1;for(var K=0;K<F.length;K++)if(F[K].value===C.activeLabel){Y=K;break}}var ne=pe(pe({},G),{},{x:G.left,y:G.top}),I=Math.min(B,ne.x+ne.width),Z=Math.min(q,ne.y+ne.height),Q=F[Y]&&F[Y].value,fe=G_(T.state,T.props.data,Y),le=F[Y]?{x:D==="horizontal"?F[Y].coordinate:I,y:D==="horizontal"?Z:F[Y].coordinate}:qU;T.setState(pe(pe({},C),{},{activeLabel:Q,activeCoordinate:le,activePayload:fe,activeTooltipIndex:Y}))}else T.setState(C)}),Xe(T,"renderCursor",function(C){var N,D=T.state,z=D.isTooltipActive,V=D.activeCoordinate,U=D.activePayload,P=D.offset,B=D.activeTooltipIndex,q=D.tooltipAxisBandSize,Y=T.getTooltipEventType(),$=(N=C.props.active)!==null&&N!==void 0?N:z,G=T.props.layout,F=C.key||"_recharts-cursor";return L.createElement(H0e,{key:F,activeCoordinate:V,activePayload:U,activeTooltipIndex:B,chartName:n,element:C,isActive:$,layout:G,offset:P,tooltipAxisBandSize:q,tooltipEventType:Y})}),Xe(T,"renderPolarAxis",function(C,N,D){var z=ua(C,"type.axisType"),V=ua(T.state,"".concat(z,"Map")),U=C.type.defaultProps,P=U!==void 0?pe(pe({},U),C.props):C.props,B=V&&V[P["".concat(z,"Id")]];return y.cloneElement(C,pe(pe({},B),{},{className:xt(z,B.className),key:C.key||"".concat(N,"-").concat(D),ticks:Ti(B,!0)}))}),Xe(T,"renderPolarGrid",function(C){var N=C.props,D=N.radialLines,z=N.polarAngles,V=N.polarRadius,U=T.state,P=U.radiusAxisMap,B=U.angleAxisMap,q=_o(P),Y=_o(B),$=Y.cx,G=Y.cy,F=Y.innerRadius,K=Y.outerRadius;return y.cloneElement(C,{polarAngles:Array.isArray(z)?z:Ti(Y,!0).map(function(ne){return ne.coordinate}),polarRadius:Array.isArray(V)?V:Ti(q,!0).map(function(ne){return ne.coordinate}),cx:$,cy:G,innerRadius:F,outerRadius:K,key:C.key||"polar-grid",radialLines:D})}),Xe(T,"renderLegend",function(){var C=T.state.formattedGraphicalItems,N=T.props,D=N.children,z=N.width,V=N.height,U=T.props.margin||{},P=z-(U.left||0)-(U.right||0),B=k8({children:D,formattedGraphicalItems:C,legendWidth:P,legendContent:d});if(!B)return null;var q=B.item,Y=jz(B,F0e);return y.cloneElement(q,pe(pe({},Y),{},{chartWidth:z,chartHeight:V,margin:U,onBBoxUpdate:T.handleLegendBBoxUpdate}))}),Xe(T,"renderTooltip",function(){var C,N=T.props,D=N.children,z=N.accessibilityLayer,V=Rr(D,Va);if(!V)return null;var U=T.state,P=U.isTooltipActive,B=U.activeCoordinate,q=U.activePayload,Y=U.activeLabel,$=U.offset,G=(C=V.props.active)!==null&&C!==void 0?C:P;return y.cloneElement(V,{viewBox:pe(pe({},$),{},{x:$.left,y:$.top}),active:G,label:Y,payload:G?q:[],coordinate:B,accessibilityLayer:z})}),Xe(T,"renderBrush",function(C){var N=T.props,D=N.margin,z=N.data,V=T.state,U=V.offset,P=V.dataStartIndex,B=V.dataEndIndex,q=V.updateId;return y.cloneElement(C,{key:C.key||"_recharts-brush",onChange:dp(T.handleBrushChange,C.props.onChange),data:z,x:Ne(C.props.x)?C.props.x:U.left,y:Ne(C.props.y)?C.props.y:U.top+U.height+U.brushBottom-(D.bottom||0),width:Ne(C.props.width)?C.props.width:U.width,startIndex:P,endIndex:B,updateId:"brush-".concat(q)})}),Xe(T,"renderReferenceElement",function(C,N,D){if(!C)return null;var z=T,V=z.clipPathId,U=T.state,P=U.xAxisMap,B=U.yAxisMap,q=U.offset,Y=C.type.defaultProps||{},$=C.props,G=$.xAxisId,F=G===void 0?Y.xAxisId:G,K=$.yAxisId,ne=K===void 0?Y.yAxisId:K;return y.cloneElement(C,{key:C.key||"".concat(N,"-").concat(D),xAxis:P[F],yAxis:B[ne],viewBox:{x:q.left,y:q.top,width:q.width,height:q.height},clipPathId:V})}),Xe(T,"renderActivePoints",function(C){var N=C.item,D=C.activePoint,z=C.basePoint,V=C.childIndex,U=C.isRange,P=[],B=N.props.key,q=N.item.type.defaultProps!==void 0?pe(pe({},N.item.type.defaultProps),N.item.props):N.item.props,Y=q.activeDot,$=q.dataKey,G=pe(pe({index:V,dataKey:$,cx:D.x,cy:D.y,r:4,fill:iE(N.item),strokeWidth:2,stroke:"#fff",payload:D.payload,value:D.value},mt(Y,!1)),nm(Y));return P.push(O.renderActiveDot(Y,G,"".concat(B,"-activePoint-").concat(V))),z?P.push(O.renderActiveDot(Y,pe(pe({},G),{},{cx:z.x,cy:z.y}),"".concat(B,"-basePoint-").concat(V))):U&&P.push(null),P}),Xe(T,"renderGraphicChild",function(C,N,D){var z=T.filterFormatItem(C,N,D);if(!z)return null;var V=T.getTooltipEventType(),U=T.state,P=U.isTooltipActive,B=U.tooltipAxis,q=U.activeTooltipIndex,Y=U.activeLabel,$=T.props.children,G=Rr($,Va),F=z.props,K=F.points,ne=F.isRange,I=F.baseLine,Z=z.item.type.defaultProps!==void 0?pe(pe({},z.item.type.defaultProps),z.item.props):z.item.props,Q=Z.activeDot,fe=Z.hide,le=Z.activeBar,Se=Z.activeShape,ve=!!(!fe&&P&&G&&(Q||le||Se)),xe={};V!=="axis"&&G&&G.props.trigger==="click"?xe={onClick:dp(T.handleItemMouseEnter,C.props.onClick)}:V!=="axis"&&(xe={onMouseLeave:dp(T.handleItemMouseLeave,C.props.onMouseLeave),onMouseEnter:dp(T.handleItemMouseEnter,C.props.onMouseEnter)});var ce=y.cloneElement(C,pe(pe({},z.props),xe));function Ae(Tt){return typeof B.dataKey=="function"?B.dataKey(Tt.payload):null}if(ve)if(q>=0){var Oe,oe;if(B.dataKey&&!B.allowDuplicatedCategory){var qe=typeof B.dataKey=="function"?Ae:"payload.".concat(B.dataKey.toString());Oe=tm(K,qe,Y),oe=ne&&I&&tm(I,qe,Y)}else Oe=K==null?void 0:K[q],oe=ne&&I&&I[q];if(Se||le){var De=C.props.activeIndex!==void 0?C.props.activeIndex:q;return[y.cloneElement(C,pe(pe(pe({},z.props),xe),{},{activeIndex:De})),null,null]}if(!yt(Oe))return[ce].concat(wc(T.renderActivePoints({item:z,activePoint:Oe,basePoint:oe,childIndex:q,isRange:ne})))}else{var Je,Ye=(Je=T.getItemByXY(T.state.activeCoordinate))!==null&&Je!==void 0?Je:{graphicalItem:ce},at=Ye.graphicalItem,jt=at.item,dt=jt===void 0?C:jt,gn=at.childIndex,on=pe(pe(pe({},z.props),xe),{},{activeIndex:gn});return[y.cloneElement(dt,on),null,null]}return ne?[ce,null,null]:[ce,null]}),Xe(T,"renderCustomized",function(C,N,D){return y.cloneElement(C,pe(pe({key:"recharts-customized-".concat(D)},T.props),T.state))}),Xe(T,"renderMap",{CartesianGrid:{handler:gp,once:!0},ReferenceArea:{handler:T.renderReferenceElement},ReferenceLine:{handler:gp},ReferenceDot:{handler:T.renderReferenceElement},XAxis:{handler:gp},YAxis:{handler:gp},Brush:{handler:T.renderBrush,once:!0},Bar:{handler:T.renderGraphicChild},Line:{handler:T.renderGraphicChild},Area:{handler:T.renderGraphicChild},Radar:{handler:T.renderGraphicChild},RadialBar:{handler:T.renderGraphicChild},Scatter:{handler:T.renderGraphicChild},Pie:{handler:T.renderGraphicChild},Funnel:{handler:T.renderGraphicChild},Tooltip:{handler:T.renderCursor,once:!0},PolarGrid:{handler:T.renderPolarGrid,once:!0},PolarAngleAxis:{handler:T.renderPolarAxis},PolarRadiusAxis:{handler:T.renderPolarAxis},Customized:{handler:T.renderCustomized}}),T.clipPathId="".concat((j=E.id)!==null&&j!==void 0?j:jd("recharts"),"-clip"),T.throttleTriggeredAfterMouseMove=k6(T.triggeredAfterMouseMove,(R=E.throttleDelay)!==null&&R!==void 0?R:1e3/60),T.state={},T}return nxe(O,w),Q0e(O,[{key:"componentDidMount",value:function(){var j,R;this.addListener(),this.accessibilityManager.setDetails({container:this.container,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},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var j=this.props,R=j.children,T=j.data,C=j.height,N=j.layout,D=Rr(R,Va);if(D){var z=D.props.defaultIndex;if(!(typeof z!="number"||z<0||z>this.state.tooltipTicks.length-1)){var V=this.state.tooltipTicks[z]&&this.state.tooltipTicks[z].value,U=G_(this.state,T,z,V),P=this.state.tooltipTicks[z].coordinate,B=(this.state.offset.top+C)/2,q=N==="horizontal",Y=q?{x:P,y:B}:{y:P,x:B},$=this.state.formattedGraphicalItems.find(function(F){var K=F.item;return K.type.name==="Scatter"});$&&(Y=pe(pe({},Y),$.props.points[z].tooltipPosition),U=$.props.points[z].tooltipPayload);var G={activeTooltipIndex:z,isTooltipActive:!0,activeLabel:V,activePayload:U,activeCoordinate:Y};this.setState(G),this.renderCursor(D),this.accessibilityManager.setIndex(z)}}}},{key:"getSnapshotBeforeUpdate",value:function(j,R){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==R.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==j.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==j.margin){var T,C;this.accessibilityManager.setDetails({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}})}return null}},{key:"componentDidUpdate",value:function(j){PS([Rr(j.children,Va)],[Rr(this.props.children,Va)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var j=Rr(this.props.children,Va);if(j&&typeof j.props.shared=="boolean"){var R=j.props.shared?"axis":"item";return c.indexOf(R)>=0?R:o}return o}},{key:"getMouseInfo",value:function(j){if(!this.container)return null;var R=this.container,T=R.getBoundingClientRect(),C=hce(T),N={chartX:Math.round(j.pageX-C.left),chartY:Math.round(j.pageY-C.top)},D=T.width/R.offsetWidth||1,z=this.inRange(N.chartX,N.chartY,D);if(!z)return null;var V=this.state,U=V.xAxisMap,P=V.yAxisMap,B=this.getTooltipEventType(),q=Cz(this.state,this.props.data,this.props.layout,z);if(B!=="axis"&&U&&P){var Y=_o(U).scale,$=_o(P).scale,G=Y&&Y.invert?Y.invert(N.chartX):null,F=$&&$.invert?$.invert(N.chartY):null;return pe(pe({},N),{},{xValue:G,yValue:F},q)}return q?pe(pe({},N),q):null}},{key:"inRange",value:function(j,R){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,N=j/T,D=R/T;if(C==="horizontal"||C==="vertical"){var z=this.state.offset,V=N>=z.left&&N<=z.left+z.width&&D>=z.top&&D<=z.top+z.height;return V?{x:N,y:D}:null}var U=this.state,P=U.angleAxisMap,B=U.radiusAxisMap;if(P&&B){var q=_o(P);return Yk({x:N,y:D},q)}return null}},{key:"parseEventsOfWrapper",value:function(){var j=this.props.children,R=this.getTooltipEventType(),T=Rr(j,Va),C={};T&&R==="axis"&&(T.props.trigger==="click"?C={onClick:this.handleClick}:C={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=nm(this.props,this.handleOuterEvent);return pe(pe({},N),C)}},{key:"addListener",value:function(){Y1.on(W1,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Y1.removeListener(W1,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(j,R,T){for(var C=this.state.formattedGraphicalItems,N=0,D=C.length;N<D;N++){var z=C[N];if(z.item===j||z.props.key===j.key||R===Ni(z.item.type)&&T===z.childIndex)return z}return null}},{key:"renderClipPath",value:function(){var j=this.clipPathId,R=this.state.offset,T=R.left,C=R.top,N=R.height,D=R.width;return L.createElement("defs",null,L.createElement("clipPath",{id:j},L.createElement("rect",{x:T,y:C,height:N,width:D})))}},{key:"getXScales",value:function(){var j=this.state.xAxisMap;return j?Object.entries(j).reduce(function(R,T){var C=Ez(T,2),N=C[0],D=C[1];return pe(pe({},R),{},Xe({},N,D.scale))},{}):null}},{key:"getYScales",value:function(){var j=this.state.yAxisMap;return j?Object.entries(j).reduce(function(R,T){var C=Ez(T,2),N=C[0],D=C[1];return pe(pe({},R),{},Xe({},N,D.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(j){var R;return(R=this.state.xAxisMap)===null||R===void 0||(R=R[j])===null||R===void 0?void 0:R.scale}},{key:"getYScaleByAxisId",value:function(j){var R;return(R=this.state.yAxisMap)===null||R===void 0||(R=R[j])===null||R===void 0?void 0:R.scale}},{key:"getItemByXY",value:function(j){var R=this.state,T=R.formattedGraphicalItems,C=R.activeItem;if(T&&T.length)for(var N=0,D=T.length;N<D;N++){var z=T[N],V=z.props,U=z.item,P=U.type.defaultProps!==void 0?pe(pe({},U.type.defaultProps),U.props):U.props,B=Ni(U.type);if(B==="Bar"){var q=(V.data||[]).find(function(F){return Dve(j,F)});if(q)return{graphicalItem:z,payload:q}}else if(B==="RadialBar"){var Y=(V.data||[]).find(function(F){return Yk(j,F)});if(Y)return{graphicalItem:z,payload:Y}}else if(og(z,C)||sg(z,C)||Yf(z,C)){var $=Age({graphicalItem:z,activeTooltipItem:C,itemData:P.data}),G=P.activeIndex===void 0?$:P.activeIndex;return{graphicalItem:pe(pe({},z),{},{childIndex:G}),payload:Yf(z,C)?P.data[$]:z.props.data[$]}}}return null}},{key:"render",value:function(){var j=this;if(!aM(this))return null;var R=this.props,T=R.children,C=R.className,N=R.width,D=R.height,z=R.style,V=R.compact,U=R.title,P=R.desc,B=jz(R,V0e),q=mt(B,!1);if(V)return L.createElement(lz,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},L.createElement(kS,Ll({},q,{width:N,height:D,title:U,desc:P}),this.renderClipPath(),oM(T,this.renderMap)));if(this.props.accessibilityLayer){var Y,$;q.tabIndex=(Y=this.props.tabIndex)!==null&&Y!==void 0?Y:0,q.role=($=this.props.role)!==null&&$!==void 0?$:"application",q.onKeyDown=function(F){j.accessibilityManager.keyboardEvent(F)},q.onFocus=function(){j.accessibilityManager.focus()}}var G=this.parseEventsOfWrapper();return L.createElement(lz,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},L.createElement("div",Ll({className:xt("recharts-wrapper",C),style:pe({position:"relative",cursor:"default",width:N,height:D},z)},G,{ref:function(K){j.container=K}}),L.createElement(kS,Ll({},q,{width:N,height:D,title:U,desc:P,style:lxe}),this.renderClipPath(),oM(T,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(y.Component);Xe(A,"displayName",n),Xe(A,"defaultProps",pe({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},h)),Xe(A,"getDerivedStateFromProps",function(w,O){var E=w.dataKey,j=w.data,R=w.children,T=w.width,C=w.height,N=w.layout,D=w.stackOffset,z=w.margin,V=O.dataStartIndex,U=O.dataEndIndex;if(O.updateId===void 0){var P=Rz(w);return pe(pe(pe({},P),{},{updateId:0},x(pe(pe({props:w},P),{},{updateId:0}),O)),{},{prevDataKey:E,prevData:j,prevWidth:T,prevHeight:C,prevLayout:N,prevStackOffset:D,prevMargin:z,prevChildren:R})}if(E!==O.prevDataKey||j!==O.prevData||T!==O.prevWidth||C!==O.prevHeight||N!==O.prevLayout||D!==O.prevStackOffset||!Fl(z,O.prevMargin)){var B=Rz(w),q={chartX:O.chartX,chartY:O.chartY,isTooltipActive:O.isTooltipActive},Y=pe(pe({},Cz(O,j,N)),{},{updateId:O.updateId+1}),$=pe(pe(pe({},B),q),Y);return pe(pe(pe({},$),x(pe({props:w},$),O)),{},{prevDataKey:E,prevData:j,prevWidth:T,prevHeight:C,prevLayout:N,prevStackOffset:D,prevMargin:z,prevChildren:R})}if(!PS(R,O.prevChildren)){var G,F,K,ne,I=Rr(R,fc),Z=I&&(G=(F=I.props)===null||F===void 0?void 0:F.startIndex)!==null&&G!==void 0?G:V,Q=I&&(K=(ne=I.props)===null||ne===void 0?void 0:ne.endIndex)!==null&&K!==void 0?K:U,fe=Z!==V||Q!==U,le=!yt(j),Se=le&&!fe?O.updateId:O.updateId+1;return pe(pe({updateId:Se},x(pe(pe({props:w},O),{},{updateId:Se,dataStartIndex:Z,dataEndIndex:Q}),O)),{},{prevChildren:R,dataStartIndex:Z,dataEndIndex:Q})}return null}),Xe(A,"renderActiveDot",function(w,O,E){var j;return y.isValidElement(w)?j=y.cloneElement(w,O):lt(w)?j=w(O):j=L.createElement(sE,O),L.createElement(sn,{className:"recharts-active-dot",key:E},j)});var S=y.forwardRef(function(O,E){return L.createElement(A,Ll({},O,{ref:E}))});return S.displayName=A.displayName,S},bxe=yxe({chartName:"AreaChart",GraphicalChild:qo,axisComponents:[{axisType:"xAxis",AxisComp:hg},{axisType:"yAxis",AxisComp:pg}],formatAxisMap:xye});const xxe={light:"",dark:".dark"},FU=y.createContext(null);function VU(){const e=y.useContext(FU);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const GU=y.forwardRef(({id:e,className:t,children:n,config:r,...a},o)=>{const l=y.useId(),c=`chart-${e||l.replace(/:/g,"")}`;return v.jsx(FU.Provider,{value:{config:r},children:v.jsxs("div",{"data-chart":c,ref:o,className:be("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(wxe,{id:c,config:r}),v.jsx(oce,{children:n})]})})});GU.displayName="Chart";const wxe=({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(xxe).map(([r,a])=>`
|
|
494
|
-
${a} [data-chart=${e}] {
|
|
495
|
-
${n.map(([o,l])=>{var f;const c=((f=l.theme)==null?void 0:f[r])||l.color;return c?` --color-${o}: ${c};`:null}).join(`
|
|
496
|
-
`)}
|
|
497
|
-
}
|
|
498
|
-
`).join(`
|
|
499
|
-
`)}}):null},Sxe=Va,_xe=y.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:a=!1,hideIndicator:o=!1,label:l,labelFormatter:c,labelClassName:f,formatter:d,color:m,nameKey:h,labelKey:g},x)=>{const{config:A}=VU(),S=y.useMemo(()=>{var T;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"}`,j=Y_(A,O,E),R=!g&&typeof l=="string"?((T=A[l])==null?void 0:T.label)||l:j==null?void 0:j.label;return c?v.jsx("div",{className:be("font-medium",f),children:c(R,t)}):R?v.jsx("div",{className:be("font-medium",f),children:R}):null},[l,c,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:be("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 j=`${h||O.name||O.dataKey||"value"}`,R=Y_(A,O,j),T=m||O.payload.fill||O.color;return v.jsx("div",{className:be("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:[R!=null&&R.icon?v.jsx(R.icon,{}):!o&&v.jsx("div",{className:be("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":T,"--color-border":T}}),v.jsxs("div",{className:be("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:(R==null?void 0:R.label)||O.name})]}),O.value&&v.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:O.value.toLocaleString()})]})]})},O.dataKey)})})]})});_xe.displayName="ChartTooltip";const Axe=y.forwardRef(({className:e,hideIcon:t=!1,payload:n,verticalAlign:r="bottom",nameKey:a},o)=>{const{config:l}=VU();return n!=null&&n.length?v.jsx("div",{ref:o,className:be("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.filter(c=>c.type!=="none").map(c=>{const f=`${a||c.dataKey||"value"}`,d=Y_(l,c,f);return v.jsxs("div",{className:be("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:c.color}}),d==null?void 0:d.label]},c.value)})}):null});Axe.displayName="ChartLegend";function Y_(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 Mz={cpu:{label:"CPU",color:"#60a5fa"},mem:{label:"RAM",color:"#a78bfa"}},Pz={"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 Oxe(){const[e,t]=y.useState([]),[n,r]=y.useState([]),[a,o]=y.useState(null),[l,c]=y.useState("24h"),[f,d]=y.useState([]),[m,h]=y.useState(!1),{setNode:g}=BA();y.useEffect(()=>(g(v.jsx("span",{className:"text-sm font-medium",children:"Mac Resources"})),()=>g(null)),[g]);const x=y.useCallback(R=>{R.type==="agents:listed"&&t(R.sessions??[])},[]),{send:A,connected:S}=iO(x);y.useEffect(()=>{if(!S)return;A({type:"agents:list"});const R=setInterval(()=>A({type:"agents:list"}),1e4);return()=>clearInterval(R)},[S,A]),y.useEffect(()=>{fetch("/api/v1/agents",{credentials:"include"}).then(R=>R.ok?R.json():[]).then(r)},[]);const w=e.map(R=>R.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&&(h(!0),fetch(`/api/v1/agents/${encodeURIComponent(a)}/resources?range=${l}`,{credentials:"include"}).then(R=>R.ok?R.json():[]).then(d).finally(()=>h(!1)))},[a,l]);const j=f.map(R=>({time:R.recorded_at,cpu:Math.round(R.cpu_percent*10)/10,mem:Math.round(R.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(R=>{const T=E.has(R),C=a===R;return v.jsxs("button",{onClick:()=>o(R),className:["flex items-center gap-2 rounded-md px-2 py-2 text-left text-sm hover:bg-accent transition-colors",C?"bg-accent font-medium":""].join(" "),children:[v.jsx("span",{className:`inline-block h-1.5 w-1.5 shrink-0 rounded-full ${T?"bg-emerald-400":"bg-muted-foreground/40"}`}),v.jsx("span",{className:"truncate min-w-0",children:R})]},R)})]}),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(cB,{value:l,onValueChange:R=>c(R),children:v.jsx(lO,{children:Object.keys(Pz).map(R=>v.jsx(Qp,{value:R,children:Pz[R]},R))})})]}),m?v.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading…"}):j.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(kz,{title:"CPU %",color:"cpu",data:j,dataKey:"cpu",range:l,formatTick:Dz}),v.jsx(kz,{title:"RAM %",color:"mem",data:j,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(f5,{className:"h-8 w-8"}),v.jsx("p",{className:"text-sm",children:"Select a Mac to view resource history."})]})})]})}function kz({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),c=Math.max(1,Math.floor(n.length/l)),f=n.filter((h,g)=>g%c===0).map(h=>h.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(GU,{config:Mz,className:"h-[220px] w-full",children:v.jsxs(bxe,{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(EU,{strokeDasharray:"3 3",vertical:!1,className:"stroke-border"}),v.jsx(hg,{dataKey:"time",ticks:f,tickFormatter:h=>o(h,a),tick:{fontSize:11},tickLine:!1,axisLine:!1,dy:6,padding:{left:16,right:16}}),v.jsx(pg,{domain:[0,100],ticks:[0,25,50,75,100],tickFormatter:h=>`${h}%`,tick:{fontSize:11},tickLine:!1,axisLine:!1,width:40,dx:-4,padding:{top:16,bottom:0}}),v.jsx(Sxe,{content:({active:h,payload:g})=>{if(!h||!(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:[Mz[r].label,": ",S,"%"]})]})}}),v.jsx(qo,{type:"monotone",dataKey:r,stroke:t==="cpu"?"#60a5fa":"#a78bfa",strokeWidth:1.5,fill:`url(#fill-${r})`,dot:!1,isAnimationActive:!1})]})})]})}const Exe=ri({teamName:On().min(1),logo:rO(File).nullable().optional()}),jxe=ri({displayName:On().min(1),avatar:rO(File).nullable().optional()}),Txe=ri({currentPassword:On().min(1),newPassword:On().min(8),confirmPassword:On()}).refine(e=>e.newPassword===e.confirmPassword,{message:"Passwords do not match",path:["confirmPassword"]});function Cxe(){const{resolvedTheme:e}=Sc(),t=e==="dark"?"/logo-dark.svg":"/logo.svg",{user:n}=LA(),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),c=y.useRef(null),f=Ci({resolver:Ri(Exe),mode:"onBlur",defaultValues:{teamName:"",logo:null}});y.useEffect(()=>{r&&fetch("/api/v1/settings",{credentials:"include"}).then(P=>P.ok?P.json():null).then(P=>{P&&(f.reset({teamName:P.team_name,logo:null}),l(P.logo_url))})},[r]);async function d(P){const B=new FormData;B.append("team_name",P.teamName),P.logo&&B.append("logo",P.logo);try{if(!(await fetch("/api/v1/settings",{method:"PATCH",credentials:"include",body:B})).ok){_t.error("Failed to update workspace");return}_t.success("Workspace updated")}catch{_t.error("Failed to update workspace")}}const[m,h]=y.useState(null),g=y.useRef(null),x=Ci({resolver:Ri(jxe),mode:"onBlur",defaultValues:{displayName:"",avatar:null}});y.useEffect(()=>{n&&(x.reset({displayName:n.displayName??"",avatar:null}),h(n.avatarUrl??null))},[n]);async function A(P){const B=new FormData;B.append("display_name",P.displayName),P.avatar&&B.append("avatar",P.avatar);try{if(!(await fetch("/api/v1/profile",{method:"PATCH",credentials:"include",body:B})).ok){_t.error("Failed to update profile");return}_t.success("Profile updated")}catch{_t.error("Failed to update profile")}}const S=Ci({resolver:Ri(Txe),mode:"onBlur"});async function w(P){try{const B=await fetch("/api/v1/auth/change-password",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:P.currentPassword,newPassword:P.newPassword})});if(!B.ok){const q=await B.json();S.setError("root",{message:q.error??"Failed to change password"});return}S.reset(),_t.success("Password changed")}catch{S.setError("root",{message:"Network error"})}}const[O,E]=y.useState([]),[j,R]=y.useState({}),[T,C]=y.useState({}),[N,D]=y.useState({});y.useEffect(()=>{a&&fetch("/api/v1/apps",{credentials:"include"}).then(P=>P.ok?P.json():null).then(P=>{if(!P)return;E(P.items);const B={};P.items.forEach(q=>{B[q.id]=q.name}),R(B)})},[a]);async function z(P){D(B=>({...B,[P]:!0}));try{if(!(await fetch(`/api/v1/apps/${P}`,{method:"DELETE",credentials:"include"})).ok){_t.error("Failed to delete app");return}E(q=>q.filter(Y=>Y.id!==P)),_t.success("App deleted")}catch{_t.error("Failed to delete app")}finally{D(B=>({...B,[P]:!1}))}}async function V(P){C(B=>({...B,[P]:!0}));try{if(!(await fetch(`/api/v1/apps/${P}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:j[P]})})).ok){_t.error("Failed to update app");return}_t.success("App updated")}catch{_t.error("Failed to update app")}finally{C(B=>({...B,[P]:!1}))}}const U=GA({control:x.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($r,{children:[v.jsx(zr,{children:v.jsx(Lr,{children:"Workspace"})}),v.jsx(ja,{children:v.jsxs("form",{onSubmit:f.handleSubmit(d),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Pt,{htmlFor:"team-name",children:"Team name"}),v.jsx(tn,{id:"team-name",placeholder:"My QA Team",...f.register("teamName")}),f.formState.errors.teamName&&v.jsx("p",{className:"text-sm text-destructive",children:f.formState.errors.teamName.message})]}),v.jsx(Ja,{}),v.jsxs("div",{className:"grid gap-2",children:[v.jsxs(Pt,{children:["Logo ",v.jsx("span",{className:"text-muted-foreground text-xs",children:"(png · jpg, max 2MB)"})]}),v.jsx(Hp,{name:"logo",control:f.control,render:({field:P})=>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 B;return(B=c.current)==null?void 0:B.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(tS,{className:"w-3 h-3"})}),v.jsx("input",{ref:c,type:"file",accept:".png,.jpg,.jpeg",className:"hidden",onChange:B=>{var Y;const q=(Y=B.target.files)==null?void 0:Y[0];if(q&&q.size>2*1024*1024){_t.error("Image must be 2MB or less");return}q&&(P.onChange(q),l(URL.createObjectURL(q)))}})]})})]}),v.jsx("div",{className:"flex justify-end",children:v.jsx(ct,{type:"submit",size:"sm",disabled:f.formState.isSubmitting,children:f.formState.isSubmitting?"Saving…":"Save changes"})})]})})]}),v.jsxs($r,{children:[v.jsx(zr,{children:v.jsx(Lr,{children:"Profile"})}),v.jsx(ja,{children:v.jsxs("form",{onSubmit:x.handleSubmit(A),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Pt,{htmlFor:"display-name",children:"Nickname"}),v.jsx(tn,{id:"display-name",placeholder:"Your name",...x.register("displayName")}),x.formState.errors.displayName&&v.jsx("p",{className:"text-sm text-destructive",children:x.formState.errors.displayName.message})]}),v.jsx(Ja,{}),v.jsxs("div",{className:"grid gap-2",children:[v.jsxs(Pt,{children:["Avatar ",v.jsx("span",{className:"text-muted-foreground text-xs",children:"(png · jpg, max 2MB)"})]}),v.jsx(Hp,{name:"avatar",control:x.control,render:({field:P})=>{var B;return v.jsxs("div",{className:"relative w-14 h-14",children:[m?v.jsx("img",{src:m,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 q=IA(U||(n==null?void 0:n.email)||"");return{backgroundColor:q.bg,color:q.fg}})(),children:((B=U==null?void 0:U[0])==null?void 0:B.toUpperCase())??"?"}),v.jsx("button",{type:"button",onClick:()=>{var q;return(q=g.current)==null?void 0:q.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(tS,{className:"w-3 h-3"})}),v.jsx("input",{ref:g,type:"file",accept:".png,.jpg,.jpeg",className:"hidden",onChange:q=>{var $;const Y=($=q.target.files)==null?void 0:$[0];if(Y&&Y.size>2*1024*1024){_t.error("Image must be 2MB or less");return}Y&&(P.onChange(Y),h(URL.createObjectURL(Y)))}})]})}})]}),v.jsx("div",{className:"flex justify-end",children:v.jsx(ct,{type:"submit",size:"sm",disabled:x.formState.isSubmitting,children:x.formState.isSubmitting?"Saving…":"Save changes"})})]})})]}),v.jsxs($r,{children:[v.jsx(zr,{children:v.jsx(Lr,{children:"Password"})}),v.jsx(ja,{children:v.jsxs("form",{onSubmit:S.handleSubmit(w),className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Pt,{htmlFor:"current-password",children:"Current password"}),v.jsx(tn,{id:"current-password",type:"password",...S.register("currentPassword")}),S.formState.errors.currentPassword&&v.jsx("p",{className:"text-sm text-destructive",children:S.formState.errors.currentPassword.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Pt,{htmlFor:"new-password",children:"New password"}),v.jsx(tn,{id:"new-password",type:"password",...S.register("newPassword")}),S.formState.errors.newPassword&&v.jsx("p",{className:"text-sm text-destructive",children:S.formState.errors.newPassword.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Pt,{htmlFor:"confirm-password",children:"Confirm new password"}),v.jsx(tn,{id:"confirm-password",type:"password",...S.register("confirmPassword")}),S.formState.errors.confirmPassword&&v.jsx("p",{className:"text-sm text-destructive",children:S.formState.errors.confirmPassword.message})]}),S.formState.errors.root&&v.jsx("p",{className:"text-sm text-destructive",children:S.formState.errors.root.message}),v.jsx("div",{className:"flex justify-end",children:v.jsx(ct,{type:"submit",size:"sm",disabled:S.formState.isSubmitting,children:S.formState.isSubmitting?"Saving…":"Change password"})})]})})]}),a&&O.length>0&&v.jsxs($r,{children:[v.jsx(zr,{children:v.jsx(Lr,{children:"Apps"})}),v.jsx(ja,{children:v.jsx("div",{className:"flex flex-col divide-y divide-border",children:O.map(P=>v.jsxs("div",{className:"flex flex-col gap-2 py-4 first:pt-0 last:pb-0",children:[v.jsx(Pt,{htmlFor:`app-${P.id}`,children:"App Name"}),v.jsx(tn,{id:`app-${P.id}`,value:j[P.id]??"",onChange:B=>R(q=>({...q,[P.id]:B.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:P.bundle_id_key}),v.jsx(Ql,{tone:P.platform==="ios"?"ios":P.platform==="android"?"android":void 0,variant:P.platform==="both"?"secondary":void 0,className:"capitalize",children:P.platform})]}),v.jsxs("div",{className:"flex items-center justify-end gap-2",children:[v.jsx(ct,{size:"sm",variant:"outline",disabled:T[P.id],onClick:()=>V(P.id),children:T[P.id]?"Saving…":"Save"}),v.jsxs(Mv,{children:[v.jsx(hre,{asChild:!0,children:v.jsx(ct,{size:"sm",variant:"destructive",disabled:N[P.id],children:N[P.id]?"Deleting…":"Delete"})}),v.jsxs(xd,{children:[v.jsxs(wd,{children:[v.jsx(_d,{children:"Delete app?"}),v.jsxs(Ad,{children:["This will permanently delete ",v.jsx("strong",{children:P.name})," and all its builds. This action cannot be undone."]})]}),v.jsxs(Sd,{children:[v.jsx(Od,{className:"w-24",children:"Cancel"}),v.jsx(Pv,{className:be(nv({variant:"destructive"}),"w-24"),onClick:()=>z(P.id),children:"Delete"})]})]})]})]})]})]},P.id))})})]})]})}const gE=y.forwardRef(({className:e,...t},n)=>v.jsx("div",{className:"relative w-full overflow-auto",children:v.jsx("table",{ref:n,className:be("w-full caption-bottom text-sm",e),...t})}));gE.displayName="Table";const yE=y.forwardRef(({className:e,...t},n)=>v.jsx("thead",{ref:n,className:be("[&_tr]:border-b",e),...t}));yE.displayName="TableHeader";const bE=y.forwardRef(({className:e,...t},n)=>v.jsx("tbody",{ref:n,className:be("[&_tr:last-child]:border-0",e),...t}));bE.displayName="TableBody";const Rxe=y.forwardRef(({className:e,...t},n)=>v.jsx("tfoot",{ref:n,className:be("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Rxe.displayName="TableFooter";const Wl=y.forwardRef(({className:e,...t},n)=>v.jsx("tr",{ref:n,className:be("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Wl.displayName="TableRow";const Ea=y.forwardRef(({className:e,...t},n)=>v.jsx("th",{ref:n,className:be("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Ea.displayName="TableHead";const ia=y.forwardRef(({className:e,...t},n)=>v.jsx("td",{ref:n,className:be("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));ia.displayName="TableCell";const Nxe=y.forwardRef(({className:e,...t},n)=>v.jsx("caption",{ref:n,className:be("mt-4 text-sm text-muted-foreground",e),...t}));Nxe.displayName="TableCaption";const Mxe=ri({email:On().email(),role:On().min(1)}),Pxe=ri({token:On(),emailSent:Ete()});function Dxe(){const[e,t]=y.useState([]),[n,r]=y.useState({}),[a,o]=y.useState(""),[l,c]=y.useState(!1),[f,d]=y.useState(null),{register:m,handleSubmit:h,control:g,reset:x,formState:{errors:A,isSubmitting:S}}=Ci({resolver:Ri(Mxe),mode:"onBlur",defaultValues:{email:"",role:"QA"}});function w(){fetch("/api/v1/team/members",{credentials:"include"}).then(C=>C.json()).then(t)}y.useEffect(()=>{w()},[]);async function O(C){try{const N=await fetch("/api/v1/team/invite",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:C.email,role:C.role})});if(!N.ok)throw new Error(`Server error: ${N.status}`);const D=Pxe.parse(await N.json()),z=`${location.origin}/invite?token=${D.token}`;o(z),navigator.clipboard.writeText(z).catch(()=>{}),D.emailSent?_t.success(`Invite email sent to ${C.email}`):_t.warning("Invite link copied — email could not be sent. Check your SMTP settings.")}catch{_t.error("Failed to create invite link")}}function E(C){c(C),C||(o(""),x())}async function j(C,N){await fetch(`/api/v1/team/members/${C}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({role:N})}),w()}async function R(C){const z=(await(await fetch(`/api/v1/team/members/${C}/send-reset`,{method:"POST",credentials:"include"})).json()).emailSent?"Sent":"No SMTP";r(V=>({...V,[C]:z})),setTimeout(()=>r(V=>{const U={...V};return delete U[C],U}),3e3)}async function T(C){await fetch(`/api/v1/team/members/${C}`,{method:"DELETE",credentials:"include"}),d(null),w()}return v.jsxs("div",{className:"flex flex-col gap-6 max-w-[900px] mx-auto w-full p-6",children:[v.jsx(Mv,{open:f!==null,onOpenChange:C=>{C||d(null)},children:v.jsxs(xd,{children:[v.jsxs(wd,{children:[v.jsx(_d,{children:"Remove this member?"}),v.jsx(Ad,{children:"This member will lose access to the team immediately."})]}),v.jsxs(Sd,{children:[v.jsx(Od,{children:"Cancel"}),v.jsx(Pv,{className:"bg-destructive/10 text-destructive hover:bg-destructive/20 border-0",onClick:()=>f!==null&&T(f),children:"Remove"})]})]})}),v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h1",{className:"text-xl font-semibold",children:"Team"}),v.jsxs(yd,{open:l,onOpenChange:E,children:[v.jsx(Nv,{asChild:!0,children:v.jsxs(ct,{size:"sm",children:[v.jsx(fV,{className:"mr-2 h-4 w-4"}),"Invite member"]})}),v.jsxs(Pc,{className:"sm:max-w-md",children:[v.jsx(bd,{children:v.jsx(Dc,{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:()=>c(!1),children:"Done"})]}):v.jsxs("form",{onSubmit:h(O),className:"flex flex-col gap-4 pt-2",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Pt,{htmlFor:"invite-email",children:"Email"}),v.jsx(tn,{id:"invite-email",type:"email",...m("email")}),A.email&&v.jsx("p",{className:"text-sm text-destructive",children:A.email.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Pt,{children:"Role"}),v.jsx(Hp,{name:"role",control:g,render:({field:C})=>v.jsxs(Ts,{value:C.value,onValueChange:C.onChange,children:[v.jsx(No,{children:v.jsx(Cs,{})}),v.jsxs(Mo,{children:[v.jsx(zt,{value:"Admin",children:"Admin"}),v.jsx(zt,{value:"Developer",children:"Developer"}),v.jsx(zt,{value:"QA",children:"QA"}),v.jsx(zt,{value:"Viewer",children:"Viewer"})]})]})})]}),v.jsx(ct,{type:"submit",disabled:S,children:S?"Creating link…":"Generate invite link"})]})]})]})]}),v.jsxs($r,{children:[v.jsx(zr,{children:v.jsxs(Lr,{children:["Members (",e.length,")"]})}),v.jsx(ja,{className:"px-4 pt-0 pb-2",children:v.jsxs(gE,{children:[v.jsx(yE,{children:v.jsxs(Wl,{children:[v.jsx(Ea,{children:"Nickname"}),v.jsx(Ea,{children:"Email"}),v.jsx(Ea,{children:"Role"}),v.jsx(Ea,{children:"Joined"}),v.jsx(Ea,{className:"w-10"})]})}),v.jsx(bE,{children:e.map(C=>v.jsxs(Wl,{className:"hover:bg-transparent",children:[v.jsx(ia,{className:"font-medium",children:C.display_name||"—"}),v.jsx(ia,{className:"text-muted-foreground text-sm",children:C.email}),v.jsx(ia,{children:v.jsxs(Ts,{value:C.role,onValueChange:N=>j(C.id,N),children:[v.jsx(No,{className:"h-7 w-28",children:v.jsx(Cs,{})}),v.jsxs(Mo,{children:[v.jsx(zt,{value:"Admin",children:"Admin"}),v.jsx(zt,{value:"Developer",children:"Developer"}),v.jsx(zt,{value:"QA",children:"QA"}),v.jsx(zt,{value:"Viewer",children:"Viewer"})]})]})}),v.jsx(ia,{className:"text-muted-foreground text-sm",children:new Date(C.joined_at).toLocaleDateString()}),v.jsx(ia,{children:v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(ct,{variant:"secondary",size:"nav",onClick:()=>R(C.id),children:n[C.id]??"Reset pwd"}),v.jsx(ct,{variant:"destructive",size:"nav",onClick:()=>d(C.id),children:"Remove"})]})})]},C.id))})]})})]})]})}const kxe=ri({name:On().min(1),expiresDays:On().refine(e=>{const t=parseInt(e,10);return!isNaN(t)&&t>=1&&t<=365},{message:"Must be between 1 and 365"})});function $xe(){const[e,t]=y.useState([]),[n,r]=y.useState(!1),[a,o]=y.useState(""),[l,c]=y.useState(null),{register:f,handleSubmit:d,reset:m,formState:{errors:h,isSubmitting:g}}=Ci({resolver:Ri(kxe),mode:"onBlur",defaultValues:{name:"",expiresDays:"30"}});function x(){fetch("/api/v1/tokens",{credentials:"include"}).then(E=>E.json()).then(t)}y.useEffect(()=>{x()},[]);async function A(E){try{const j=await fetch("/api/v1/tokens",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:E.name,expires_in_days:parseInt(E.expiresDays,10)})});if(!j.ok){_t.error("Failed to create token");return}const R=await j.json();_t.success("Token created"),o(R.token),x()}catch{_t.error("Network error")}}function S(E){r(E),E||(o(""),m())}async function w(E){try{return(await fetch(`/api/v1/tokens/${E}`,{method:"DELETE",credentials:"include"})).ok?(_t.success("Token revoked"),x(),!0):(_t.error("Failed to revoke token"),!1)}catch{return _t.error("Network error"),!1}}function O(E){return E.expires_at&&new Date(E.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(yd,{open:n,onOpenChange:S,children:[v.jsx(Nv,{asChild:!0,children:v.jsxs(ct,{size:"sm",children:[v.jsx(d5,{className:"mr-2 h-4 w-4"}),"New token"]})}),v.jsxs(Pc,{className:"sm:max-w-md",children:[v.jsx(bd,{children:v.jsx(Dc,{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).then(()=>{_t.success("Token copied to clipboard"),r(!1)}).catch(()=>_t.error("Failed to copy — copy manually"))},children:"Copy & close"})]}):v.jsxs("form",{onSubmit:d(A),className:"flex flex-col gap-4 pt-2",children:[v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Pt,{htmlFor:"token-name",children:"Name"}),v.jsx(tn,{id:"token-name",placeholder:"e.g. ci-deploy",...f("name")}),h.name&&v.jsx("p",{className:"text-sm text-destructive",children:h.name.message})]}),v.jsxs("div",{className:"grid gap-2",children:[v.jsx(Pt,{htmlFor:"expires",children:"Expires in (days)"}),v.jsx(tn,{id:"expires",type:"number",...f("expiresDays")}),h.expiresDays&&v.jsx("p",{className:"text-sm text-destructive",children:h.expiresDays.message})]}),v.jsxs("p",{className:"text-xs text-muted-foreground",children:["Scope: ",v.jsx(Ql,{variant:"secondary",children:"builds:write"})]}),v.jsx(ct,{type:"submit",disabled:g,children:g?"Creating…":"Create token"})]})]})]})]}),v.jsxs($r,{children:[v.jsxs(zr,{children:[v.jsx(Lr,{children:"Active tokens"}),v.jsxs(Os,{children:["Use these tokens with ",v.jsx("code",{className:"text-xs",children:"Authorization: Bearer <token>"})," for API deployments."]})]}),v.jsx(ja,{className:"px-4 pt-0 pb-2",children:v.jsxs(gE,{children:[v.jsx(yE,{children:v.jsxs(Wl,{children:[v.jsx(Ea,{children:"Name"}),v.jsx(Ea,{children:"Scope"}),v.jsx(Ea,{children:"Last used"}),v.jsx(Ea,{children:"Expires"}),v.jsx(Ea,{className:"w-10"})]})}),v.jsx(bE,{children:e.length===0?v.jsx(Wl,{children:v.jsx(ia,{colSpan:5,className:"h-20 text-center text-muted-foreground",children:"No tokens yet."})}):e.map(E=>v.jsxs(Wl,{className:"hover:bg-transparent",children:[v.jsx(ia,{className:"font-medium",children:E.name}),v.jsx(ia,{children:v.jsx(Ql,{variant:"secondary",children:E.scope})}),v.jsx(ia,{className:"text-muted-foreground text-sm",children:E.last_used_at?new Date(E.last_used_at).toLocaleDateString():"Never"}),v.jsx(ia,{children:E.expires_at?v.jsx("span",{className:O(E)?"text-destructive text-sm":"text-muted-foreground text-sm",children:O(E)?"Expired":new Date(E.expires_at).toLocaleDateString()}):v.jsx("span",{className:"text-muted-foreground text-sm",children:"Never"})}),v.jsx(ia,{children:v.jsx(ct,{variant:"destructive",size:"icon",className:"h-7 w-7","aria-label":"Revoke token",onClick:()=>c(E.id),children:v.jsx(cV,{className:"h-4 w-4"})})})]},E.id))})]})})]}),v.jsx(Mv,{open:l!==null,onOpenChange:E=>{E||c(null)},children:v.jsxs(xd,{children:[v.jsxs(wd,{children:[v.jsx(_d,{children:"Revoke token?"}),v.jsx(Ad,{children:"Any active API calls using this token will immediately fail."})]}),v.jsxs(Sd,{children:[v.jsx(Od,{children:"Cancel"}),v.jsx(ct,{variant:"destructive",onClick:async()=>{if(l===null)return;await w(l)&&c(null)},children:"Revoke"})]})]})})]})}function zxe(){const{resolvedTheme:e}=Sc();return v.jsxs(Y7,{children:[v.jsxs(S7,{children:[v.jsx(gr,{path:"/login",element:v.jsx(one,{})}),v.jsx(gr,{path:"/setup",element:v.jsx(lne,{})}),v.jsx(gr,{path:"/invite",element:v.jsx(une,{})}),v.jsx(gr,{path:"/reset-password",element:v.jsx(dne,{})}),v.jsxs(gr,{element:v.jsx(sX,{}),children:[v.jsx(gr,{index:!0,element:v.jsx(X1,{to:"/app-center",replace:!0})}),v.jsx(gr,{path:"/app-center",element:v.jsx(yre,{})}),v.jsx(gr,{path:"/app-center/build",element:v.jsx(_ae,{})}),v.jsx(gr,{path:"/mac-resources",element:v.jsx(Oxe,{})}),v.jsx(gr,{path:"/settings/default",element:v.jsx(Cxe,{})}),v.jsx(gr,{path:"/settings/team",element:v.jsx(Dxe,{})}),v.jsx(gr,{path:"/settings/tokens",element:v.jsx($xe,{})}),v.jsx(gr,{path:"*",element:v.jsx(X1,{to:"/app-center",replace:!0})})]})]}),v.jsx(CF,{position:"bottom-right",richColors:!0,theme:e})]})}d9.createRoot(document.getElementById("root")).render(v.jsx(y.StrictMode,{children:v.jsx(v9,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,children:v.jsx(zxe,{})})}));
|